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

Added H2Overdrive

This commit is contained in:
Aaron M 2019-12-25 11:33:42 +13:00
parent c0268cb2eb
commit bb803992f0
6 changed files with 74 additions and 0 deletions

View File

@ -148,6 +148,10 @@ HowtoRumbleHealthEffect=0
GameId=42
FeedbackLength=500
[H2Overdrive]
GameId=43
FeedbackLength=500
[Sega Racing Classic]
GameId=5
FeedbackLength=500

View File

@ -24,6 +24,7 @@
<ClInclude Include="Game Files\FordRacingOther.h" />
<ClInclude Include="Game Files\GoldenGun.h" />
<ClInclude Include="Game Files\GRID.h" />
<ClInclude Include="Game Files\H2Overdrive.h" />
<ClInclude Include="Game Files\HOTD4.h" />
<ClInclude Include="Game Files\InitialD0.h" />
<ClInclude Include="Game Files\KODrive.h" />
@ -55,6 +56,7 @@
<ClCompile Include="Game Files\FordRacingOther.cpp" />
<ClCompile Include="Game Files\GoldenGun.cpp" />
<ClCompile Include="Game Files\GRID.cpp" />
<ClCompile Include="Game Files\H2Overdrive.cpp" />
<ClCompile Include="Game Files\HOTD4.cpp" />
<ClCompile Include="Game Files\InitialD0.cpp" />
<ClCompile Include="Game Files\KODrive.cpp" />

View File

@ -121,6 +121,7 @@
<ClCompile Include="Game Files\Transformers.cpp" />
<ClCompile Include="Game Files\GoldenGun.cpp" />
<ClCompile Include="Game Files\DirtyDrivin.cpp" />
<ClCompile Include="Game Files\H2Overdrive.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Game Files\Daytona3.h">
@ -259,6 +260,9 @@
<ClInclude Include="Game Files\DirtyDrivin.h">
<Filter>Common Header Files</Filter>
</ClInclude>
<ClInclude Include="Game Files\H2Overdrive.h">
<Filter>Common Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<MASM Include="DLLWrapper.asm" />

View File

@ -69,6 +69,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
#include "Game Files/HOTD4.h"
#include "Game Files/Rambo.h"
#include "Game Files/Transformers.h"
#include "Game Files/H2Overdrive.h"
// typedefs
typedef unsigned char U8;
@ -955,6 +956,7 @@ const int KO_Drive = 39;
const int Transformers_ = 40;
const int Golden_Gun = 41;
const int Dirty_Drivin = 42;
const int H2_Overdrive = 43;
HINSTANCE Get_hInstance()
{
@ -2082,6 +2084,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
case Dirty_Drivin:
game = new DirtyDrivin;
break;
case H2_Overdrive:
game = new H2Overdrive;
break;
case TEST_GAME_CONST:
case TEST_GAME_FRICTION:
case TEST_GAME_SINE:

View File

@ -0,0 +1,39 @@
/*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 <string>
#include "H2Overdrive.h"
void H2Overdrive::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
float ff = helpers->ReadFloat32(0x392C58, true);
helpers->log("got value: ");
std::string ffs = std::to_string(ff);
helpers->log((char*)ffs.c_str());
if (ff > 0)
{
double percentForce = ff;
double percentLength = 100;
triggers->Rumble(percentForce, 0, percentLength);
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
}
else if (ff < 0)
{
double percentForce = -ff;
double percentLength = 100;
triggers->Rumble(0, percentForce, percentLength);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
}
}

20
Game Files/H2Overdrive.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 H2Overdrive : public Game {
public:
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
};