Added H2Overdrive
This commit is contained in:
parent
c0268cb2eb
commit
bb803992f0
@ -148,6 +148,10 @@ HowtoRumbleHealthEffect=0
|
|||||||
GameId=42
|
GameId=42
|
||||||
FeedbackLength=500
|
FeedbackLength=500
|
||||||
|
|
||||||
|
[H2Overdrive]
|
||||||
|
GameId=43
|
||||||
|
FeedbackLength=500
|
||||||
|
|
||||||
[Sega Racing Classic]
|
[Sega Racing Classic]
|
||||||
GameId=5
|
GameId=5
|
||||||
FeedbackLength=500
|
FeedbackLength=500
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
<ClInclude Include="Game Files\FordRacingOther.h" />
|
<ClInclude Include="Game Files\FordRacingOther.h" />
|
||||||
<ClInclude Include="Game Files\GoldenGun.h" />
|
<ClInclude Include="Game Files\GoldenGun.h" />
|
||||||
<ClInclude Include="Game Files\GRID.h" />
|
<ClInclude Include="Game Files\GRID.h" />
|
||||||
|
<ClInclude Include="Game Files\H2Overdrive.h" />
|
||||||
<ClInclude Include="Game Files\HOTD4.h" />
|
<ClInclude Include="Game Files\HOTD4.h" />
|
||||||
<ClInclude Include="Game Files\InitialD0.h" />
|
<ClInclude Include="Game Files\InitialD0.h" />
|
||||||
<ClInclude Include="Game Files\KODrive.h" />
|
<ClInclude Include="Game Files\KODrive.h" />
|
||||||
@ -55,6 +56,7 @@
|
|||||||
<ClCompile Include="Game Files\FordRacingOther.cpp" />
|
<ClCompile Include="Game Files\FordRacingOther.cpp" />
|
||||||
<ClCompile Include="Game Files\GoldenGun.cpp" />
|
<ClCompile Include="Game Files\GoldenGun.cpp" />
|
||||||
<ClCompile Include="Game Files\GRID.cpp" />
|
<ClCompile Include="Game Files\GRID.cpp" />
|
||||||
|
<ClCompile Include="Game Files\H2Overdrive.cpp" />
|
||||||
<ClCompile Include="Game Files\HOTD4.cpp" />
|
<ClCompile Include="Game Files\HOTD4.cpp" />
|
||||||
<ClCompile Include="Game Files\InitialD0.cpp" />
|
<ClCompile Include="Game Files\InitialD0.cpp" />
|
||||||
<ClCompile Include="Game Files\KODrive.cpp" />
|
<ClCompile Include="Game Files\KODrive.cpp" />
|
||||||
|
@ -121,6 +121,7 @@
|
|||||||
<ClCompile Include="Game Files\Transformers.cpp" />
|
<ClCompile Include="Game Files\Transformers.cpp" />
|
||||||
<ClCompile Include="Game Files\GoldenGun.cpp" />
|
<ClCompile Include="Game Files\GoldenGun.cpp" />
|
||||||
<ClCompile Include="Game Files\DirtyDrivin.cpp" />
|
<ClCompile Include="Game Files\DirtyDrivin.cpp" />
|
||||||
|
<ClCompile Include="Game Files\H2Overdrive.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Game Files\Daytona3.h">
|
<ClInclude Include="Game Files\Daytona3.h">
|
||||||
@ -259,6 +260,9 @@
|
|||||||
<ClInclude Include="Game Files\DirtyDrivin.h">
|
<ClInclude Include="Game Files\DirtyDrivin.h">
|
||||||
<Filter>Common Header Files</Filter>
|
<Filter>Common Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\H2Overdrive.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MASM Include="DLLWrapper.asm" />
|
<MASM Include="DLLWrapper.asm" />
|
||||||
|
@ -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/HOTD4.h"
|
||||||
#include "Game Files/Rambo.h"
|
#include "Game Files/Rambo.h"
|
||||||
#include "Game Files/Transformers.h"
|
#include "Game Files/Transformers.h"
|
||||||
|
#include "Game Files/H2Overdrive.h"
|
||||||
|
|
||||||
// typedefs
|
// typedefs
|
||||||
typedef unsigned char U8;
|
typedef unsigned char U8;
|
||||||
@ -955,6 +956,7 @@ const int KO_Drive = 39;
|
|||||||
const int Transformers_ = 40;
|
const int Transformers_ = 40;
|
||||||
const int Golden_Gun = 41;
|
const int Golden_Gun = 41;
|
||||||
const int Dirty_Drivin = 42;
|
const int Dirty_Drivin = 42;
|
||||||
|
const int H2_Overdrive = 43;
|
||||||
|
|
||||||
HINSTANCE Get_hInstance()
|
HINSTANCE Get_hInstance()
|
||||||
{
|
{
|
||||||
@ -2082,6 +2084,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
|||||||
case Dirty_Drivin:
|
case Dirty_Drivin:
|
||||||
game = new DirtyDrivin;
|
game = new DirtyDrivin;
|
||||||
break;
|
break;
|
||||||
|
case H2_Overdrive:
|
||||||
|
game = new H2Overdrive;
|
||||||
|
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:
|
||||||
|
39
Game Files/H2Overdrive.cpp
Normal file
39
Game Files/H2Overdrive.cpp
Normal 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
20
Game Files/H2Overdrive.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 H2Overdrive : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user