Added Hummer support
This commit is contained in:
parent
b76672cdd4
commit
0ae69f17ef
@ -369,6 +369,14 @@ DefaultCentering=15
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
[FNF SuperCars 369]
|
||||
GameId=86
|
||||
FeedbackLength=500
|
||||
DefaultCentering=15
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
|
||||
[Sega Race TV]
|
||||
GameId=80
|
||||
FeedbackLength=500
|
||||
@ -389,6 +397,13 @@ FeedbackLength=500
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
[Hummer]
|
||||
GameId=84
|
||||
FeedbackLength=500
|
||||
DefaultCentering=15
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
[KODrive]
|
||||
GameId=39
|
||||
PowerMode=0
|
||||
|
@ -43,6 +43,7 @@
|
||||
<ClInclude Include="Game Files\GRIDReal.h" />
|
||||
<ClInclude Include="Game Files\H2Overdrive.h" />
|
||||
<ClInclude Include="Game Files\HOTD4.h" />
|
||||
<ClInclude Include="Game Files\Hummer.h" />
|
||||
<ClInclude Include="Game Files\HummerExtreme.h" />
|
||||
<ClInclude Include="Game Files\IDTAv231.h" />
|
||||
<ClInclude Include="Game Files\InitialD0v131.h" />
|
||||
@ -116,6 +117,7 @@
|
||||
<ClCompile Include="Game Files\GRIDReal.cpp" />
|
||||
<ClCompile Include="Game Files\H2Overdrive.cpp" />
|
||||
<ClCompile Include="Game Files\HOTD4.cpp" />
|
||||
<ClCompile Include="Game Files\Hummer.cpp" />
|
||||
<ClCompile Include="Game Files\HummerExtreme.cpp" />
|
||||
<ClCompile Include="Game Files\IDTAv231.cpp" />
|
||||
<ClCompile Include="Game Files\InitialD0v131.cpp" />
|
||||
|
@ -168,6 +168,8 @@
|
||||
<ClCompile Include="Game Files\IDTAv231.cpp" />
|
||||
<ClCompile Include="Game Files\HummerExtreme.cpp" />
|
||||
<ClCompile Include="Game Files\WastelandRacers2071.cpp" />
|
||||
<ClCompile Include="Game Files\FnFSuperCars369.cpp" />
|
||||
<ClCompile Include="Game Files\Hummer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Game Files\Daytona3.h">
|
||||
@ -435,6 +437,12 @@
|
||||
<ClInclude Include="Game Files\WastelandRacers2071.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\FnFSuperCars369.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\Hummer.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MASM Include="DLLWrapper.asm" />
|
||||
|
@ -53,6 +53,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "Game Files/GRIDReal.h"
|
||||
#include "Game Files/GRIDCustom.h"
|
||||
#include "Game Files/GoldenGun.h"
|
||||
#include "Game Files/Hummer.h"
|
||||
#include "Game Files/HummerExtreme.h"
|
||||
#include "Game Files/InitialD0v131.h"
|
||||
#include "Game Files/InitialD0v211.h"
|
||||
@ -1084,7 +1085,7 @@ const int SEGA_RACE_TV = 80;
|
||||
const int HUMMER_EXTREME = 81;
|
||||
const int INITIAL_D_THEARCADE_V231 = 82;
|
||||
const int WASTELAND_RACERS_2071 = 83;
|
||||
|
||||
const int HUMMER = 84;
|
||||
HINSTANCE Get_hInstance()
|
||||
{
|
||||
MEMORY_BASIC_INFORMATION mbi;
|
||||
@ -2626,6 +2627,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
||||
case SEGA_RACE_TV:
|
||||
game = new SegaRaceTV;
|
||||
break;
|
||||
case HUMMER:
|
||||
game = new Hummer;
|
||||
break;
|
||||
case HUMMER_EXTREME:
|
||||
game = new HummerExtreme;
|
||||
break;
|
||||
|
74
Game Files/Hummer.cpp
Normal file
74
Game Files/Hummer.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
/*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 "Hummer.h"
|
||||
|
||||
static EffectTriggers* myTriggers;
|
||||
static EffectConstants* myConstants;
|
||||
static Helpers* myHelpers;
|
||||
|
||||
extern int EnableDamper;
|
||||
extern int DamperStrength;
|
||||
|
||||
static bool init = false;
|
||||
extern int EnableDamper;
|
||||
extern int DamperStrength;
|
||||
|
||||
static void(__cdecl* clSteerDualDeviceSetTRQCurveHalfPointOrig)(void* thisParam, int param_1, float param_2, float param_3);
|
||||
static void __cdecl clSteerDualDeviceSetTRQCurveHalfPoint(void* thisParam, int param_1, float param_2, float param_3) {
|
||||
return clSteerDualDeviceSetTRQCurveHalfPointOrig(thisParam, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
static void(__cdecl* clSteerDualDeviceSetVibrateOrig)(void* thisParam, int param_1, float param_2, float param_3);
|
||||
static void __cdecl clSteerDualDeviceSetVibrate(void* thisParam, int param_1, float param_2, float param_3) {
|
||||
myTriggers->Sine(param_3 * 100, 1, param_2 * 60);
|
||||
myTriggers->Rumble(param_2 * 60, 0, param_3 * 100);
|
||||
return clSteerDualDeviceSetVibrateOrig(thisParam, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
static void(__cdecl* clSteerDualDeviceSetViscosityOrig)(void* thisParam, int param_1, float param_2, float param_3);
|
||||
static void __cdecl clSteerDualDeviceSetViscosity(void* thisParam, int param_1, float param_2, float param_3) {
|
||||
myTriggers->Friction((double)param_2);
|
||||
return clSteerDualDeviceSetViscosityOrig(thisParam, param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
static void(__cdecl* clSteerDualDeviceInitCenterOrig)(void* thisParam, int param_1, unsigned char param_2);
|
||||
static void __cdecl clSteerDualDeviceInitCenter(void* thisParam, int param_1, unsigned char param_2) {
|
||||
myTriggers->Springi(param_2);
|
||||
return clSteerDualDeviceInitCenterOrig(thisParam, param_1, param_2);
|
||||
}
|
||||
|
||||
static int(__cdecl* clSteerDualDeviceWaitOrig)(int param_1);
|
||||
static int __cdecl clSteerDualDeviceWait(int param_1) {
|
||||
return 0;
|
||||
}
|
||||
void Hummer::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
|
||||
|
||||
if (!init)
|
||||
{
|
||||
init = true;
|
||||
myTriggers = triggers;
|
||||
myConstants = constants;
|
||||
myHelpers = helpers;
|
||||
MH_Initialize();
|
||||
//checking wheel is cool for an update
|
||||
MH_CreateHook((LPVOID)0x82cdd1a, clSteerDualDeviceWait, (LPVOID*)&clSteerDualDeviceWaitOrig);
|
||||
//Ingame effects
|
||||
MH_CreateHook((LPVOID)0x82cd9ba, clSteerDualDeviceSetTRQCurveHalfPoint, (LPVOID*)&clSteerDualDeviceSetTRQCurveHalfPointOrig);
|
||||
MH_CreateHook((LPVOID)0x82cdbfa, clSteerDualDeviceSetVibrate, (LPVOID*)&clSteerDualDeviceSetVibrateOrig);
|
||||
MH_CreateHook((LPVOID)0x82cdada, clSteerDualDeviceSetViscosity, (LPVOID*)&clSteerDualDeviceSetViscosityOrig);
|
||||
MH_CreateHook((LPVOID)0x82cd786, clSteerDualDeviceInitCenter, (LPVOID*)&clSteerDualDeviceInitCenterOrig);
|
||||
MH_EnableHook(MH_ALL_HOOKS);
|
||||
}
|
||||
}
|
20
Game Files/Hummer.h
Normal file
20
Game Files/Hummer.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 Hummer : public Game {
|
||||
public:
|
||||
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
|
||||
};
|
@ -211,6 +211,7 @@ TEKNOPARROT:
|
||||
-GTI Club Supermini Festa
|
||||
-House of the dead 4
|
||||
-Hummer Extreme
|
||||
-Hummer
|
||||
-Initial D Arcade Stage 4
|
||||
-Initial D Arcade Stage 4 Japan
|
||||
-Initial D Arcade Stage 5
|
||||
|
Loading…
Reference in New Issue
Block a user