Add Spring Effect
This commit is contained in:
parent
ddd1d7c298
commit
363341b82e
@ -121,6 +121,13 @@ EnableDamper=0
|
|||||||
DamperStrength=100
|
DamperStrength=100
|
||||||
FFBOrRumble=0
|
FFBOrRumble=0
|
||||||
|
|
||||||
|
[Spring Effect]
|
||||||
|
GameId=74
|
||||||
|
FeedbackLength=500
|
||||||
|
EnableDamper=0
|
||||||
|
DamperStrength=100
|
||||||
|
SpringStrength=100
|
||||||
|
|
||||||
[GRID Real]
|
[GRID Real]
|
||||||
GameId=10
|
GameId=10
|
||||||
FeedbackLength=80
|
FeedbackLength=80
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -64,6 +64,7 @@
|
|||||||
<ClInclude Include="Game Files\LGI.h" />
|
<ClInclude Include="Game Files\LGI.h" />
|
||||||
<ClInclude Include="Game Files\LGI3D.h" />
|
<ClInclude Include="Game Files\LGI3D.h" />
|
||||||
<ClInclude Include="Game Files\Showdown.h" />
|
<ClInclude Include="Game Files\Showdown.h" />
|
||||||
|
<ClInclude Include="Game Files\SpringEffect.h" />
|
||||||
<ClInclude Include="Game Files\StormRacerG.h" />
|
<ClInclude Include="Game Files\StormRacerG.h" />
|
||||||
<ClInclude Include="Game Files\SWDC2018.h" />
|
<ClInclude Include="Game Files\SWDC2018.h" />
|
||||||
<ClInclude Include="Game Files\TokyoCop.h" />
|
<ClInclude Include="Game Files\TokyoCop.h" />
|
||||||
@ -143,6 +144,7 @@
|
|||||||
<ClCompile Include="Game Files\Showdown.cpp" />
|
<ClCompile Include="Game Files\Showdown.cpp" />
|
||||||
<ClCompile Include="Game Files\SnoCross.cpp" />
|
<ClCompile Include="Game Files\SnoCross.cpp" />
|
||||||
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SpringEffect.cpp" />
|
||||||
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
||||||
<ClCompile Include="Game Files\SWDC2018.cpp" />
|
<ClCompile Include="Game Files\SWDC2018.cpp" />
|
||||||
<ClCompile Include="Game Files\TestGame.cpp" />
|
<ClCompile Include="Game Files\TestGame.cpp" />
|
||||||
|
@ -158,6 +158,7 @@
|
|||||||
<ClCompile Include="Game Files\GRIDCustom.cpp" />
|
<ClCompile Include="Game Files\GRIDCustom.cpp" />
|
||||||
<ClCompile Include="Game Files\MarioKartGPDX1.18Custom.cpp" />
|
<ClCompile Include="Game Files\MarioKartGPDX1.18Custom.cpp" />
|
||||||
<ClCompile Include="Game Files\Showdown.cpp" />
|
<ClCompile Include="Game Files\Showdown.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SpringEffect.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Game Files\Daytona3.h">
|
<ClInclude Include="Game Files\Daytona3.h">
|
||||||
@ -395,6 +396,9 @@
|
|||||||
<ClInclude Include="Game Files\Showdown.h">
|
<ClInclude Include="Game Files\Showdown.h">
|
||||||
<Filter>Common Header Files</Filter>
|
<Filter>Common Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\SpringEffect.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MASM Include="DLLWrapper.asm" />
|
<MASM Include="DLLWrapper.asm" />
|
||||||
|
@ -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/AfterburnerClimax.h"
|
||||||
#include "Game Files/PokkenTournament.h"
|
#include "Game Files/PokkenTournament.h"
|
||||||
#include "Game Files/SonicSegaAllStarsRacing.h"
|
#include "Game Files/SonicSegaAllStarsRacing.h"
|
||||||
|
#include "Game Files/SpringEffect.h"
|
||||||
#include "Game Files/M2Emulator.h"
|
#include "Game Files/M2Emulator.h"
|
||||||
#include "Game Files/GTIClub3.h"
|
#include "Game Files/GTIClub3.h"
|
||||||
#include "Game Files/Demul.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 GRID_Custom = 71;
|
||||||
const int MARIO_KART_GPDX_118_CUSTOM = 72;
|
const int MARIO_KART_GPDX_118_CUSTOM = 72;
|
||||||
const int SEGA_SHOWDOWN = 73;
|
const int SEGA_SHOWDOWN = 73;
|
||||||
|
const int SPRING_EFFECT = 74;
|
||||||
|
|
||||||
HINSTANCE Get_hInstance()
|
HINSTANCE Get_hInstance()
|
||||||
{
|
{
|
||||||
@ -2571,6 +2573,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
|||||||
case SEGA_SHOWDOWN:
|
case SEGA_SHOWDOWN:
|
||||||
game = new Showdown;
|
game = new Showdown;
|
||||||
break;
|
break;
|
||||||
|
case SPRING_EFFECT:
|
||||||
|
game = new SpringEffect;
|
||||||
|
break;
|
||||||
case TEST_GAME_CONST:
|
case TEST_GAME_CONST:
|
||||||
case TEST_GAME_FRICTION:
|
case TEST_GAME_FRICTION:
|
||||||
case TEST_GAME_SINE:
|
case TEST_GAME_SINE:
|
||||||
|
30
Game Files/SpringEffect.cpp
Normal file
30
Game Files/SpringEffect.cpp
Normal 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
20
Game Files/SpringEffect.h
Normal 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);
|
||||||
|
};
|
@ -1 +1 @@
|
|||||||
v2.0.0.31
|
v2.0.0.32
|
Loading…
Reference in New Issue
Block a user