1
0
mirror of synced 2024-11-23 22:40:57 +01:00

Add Spring Effect

This commit is contained in:
Boomslangnz 2023-08-26 18:36:41 +12:00
parent ddd1d7c298
commit 363341b82e
9 changed files with 69 additions and 1 deletions

View File

@ -121,6 +121,13 @@ EnableDamper=0
DamperStrength=100
FFBOrRumble=0
[Spring Effect]
GameId=74
FeedbackLength=500
EnableDamper=0
DamperStrength=100
SpringStrength=100
[GRID Real]
GameId=10
FeedbackLength=80

Binary file not shown.

Binary file not shown.

View File

@ -64,6 +64,7 @@
<ClInclude Include="Game Files\LGI.h" />
<ClInclude Include="Game Files\LGI3D.h" />
<ClInclude Include="Game Files\Showdown.h" />
<ClInclude Include="Game Files\SpringEffect.h" />
<ClInclude Include="Game Files\StormRacerG.h" />
<ClInclude Include="Game Files\SWDC2018.h" />
<ClInclude Include="Game Files\TokyoCop.h" />
@ -143,6 +144,7 @@
<ClCompile Include="Game Files\Showdown.cpp" />
<ClCompile Include="Game Files\SnoCross.cpp" />
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
<ClCompile Include="Game Files\SpringEffect.cpp" />
<ClCompile Include="Game Files\StormRacerG.cpp" />
<ClCompile Include="Game Files\SWDC2018.cpp" />
<ClCompile Include="Game Files\TestGame.cpp" />

View File

@ -158,6 +158,7 @@
<ClCompile Include="Game Files\GRIDCustom.cpp" />
<ClCompile Include="Game Files\MarioKartGPDX1.18Custom.cpp" />
<ClCompile Include="Game Files\Showdown.cpp" />
<ClCompile Include="Game Files\SpringEffect.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Game Files\Daytona3.h">
@ -395,6 +396,9 @@
<ClInclude Include="Game Files\Showdown.h">
<Filter>Common Header Files</Filter>
</ClInclude>
<ClInclude Include="Game Files\SpringEffect.h">
<Filter>Common Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<MASM Include="DLLWrapper.asm" />

View File

@ -84,6 +84,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
#include "Game Files/AfterburnerClimax.h"
#include "Game Files/PokkenTournament.h"
#include "Game Files/SonicSegaAllStarsRacing.h"
#include "Game Files/SpringEffect.h"
#include "Game Files/M2Emulator.h"
#include "Game Files/GTIClub3.h"
#include "Game Files/Demul.h"
@ -1061,6 +1062,7 @@ const int MARIO_KART_GPDX_USA_REAL = 70;
const int GRID_Custom = 71;
const int MARIO_KART_GPDX_118_CUSTOM = 72;
const int SEGA_SHOWDOWN = 73;
const int SPRING_EFFECT = 74;
HINSTANCE Get_hInstance()
{
@ -2571,6 +2573,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
case SEGA_SHOWDOWN:
game = new Showdown;
break;
case SPRING_EFFECT:
game = new SpringEffect;
break;
case TEST_GAME_CONST:
case TEST_GAME_FRICTION:
case TEST_GAME_SINE:

View File

@ -0,0 +1,30 @@
/*This file is part of FFB Arcade Plugin.
FFB Arcade Plugin is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FFB Arcade Plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
*/
#include "SpringEffect.h"
extern int EnableDamper;
extern int DamperStrength;
static wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
static int SpringEnable = GetPrivateProfileInt(TEXT("Settings"), TEXT("SpringEnable"), 0, settingsFilename);
static int SpringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("SpringStrength"), 0, settingsFilename);
void SpringEffect::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
if (EnableDamper)
triggers->Damper(DamperStrength / 100.0);
if (SpringEnable)
triggers->Springi(SpringStrength / 100.0);
}

20
Game Files/SpringEffect.h Normal file
View File

@ -0,0 +1,20 @@
/*This file is part of FFB Arcade Plugin.
FFB Arcade Plugin is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FFB Arcade Plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
*/
#pragma once
#include "../Common Files/Game.h"
class SpringEffect : public Game {
public:
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
};

View File

@ -1 +1 @@
v2.0.0.31
v2.0.0.32