add wasteland racers and update version
This commit is contained in:
parent
71ef119912
commit
dd522f6583
@ -383,6 +383,12 @@ DefaultCentering=15
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
[Wasteland Racers 2071]
|
||||
GameId=83
|
||||
FeedbackLength=500
|
||||
EnableDamper=0
|
||||
DamperStrength=100
|
||||
|
||||
[KODrive]
|
||||
GameId=39
|
||||
PowerMode=0
|
||||
|
Binary file not shown.
Binary file not shown.
@ -76,6 +76,7 @@
|
||||
<ClInclude Include="Game Files\StormRacerG.h" />
|
||||
<ClInclude Include="Game Files\SWDC2018.h" />
|
||||
<ClInclude Include="Game Files\TokyoCop.h" />
|
||||
<ClInclude Include="Game Files\WastelandRacers2071.h" />
|
||||
<ClInclude Include="Game Files\WMMT3.h" />
|
||||
<ClInclude Include="Game Files\WMMT5DX+.h" />
|
||||
<ClInclude Include="Game Files\WMMT5DX.h" />
|
||||
@ -167,6 +168,7 @@
|
||||
<ClCompile Include="Game Files\TokyoCop.cpp" />
|
||||
<ClCompile Include="Game Files\Transformers.cpp" />
|
||||
<ClCompile Include="Game Files\WackyRaces.cpp" />
|
||||
<ClCompile Include="Game Files\WastelandRacers2071.cpp" />
|
||||
<ClCompile Include="Game Files\WMMT3.cpp" />
|
||||
<ClCompile Include="Game Files\WMMT5.cpp" />
|
||||
<ClCompile Include="Game Files\InitialD4Japan.cpp" />
|
||||
|
@ -167,6 +167,7 @@
|
||||
<ClCompile Include="Game Files\SegaRaceTV.cpp" />
|
||||
<ClCompile Include="Game Files\IDTAv231.cpp" />
|
||||
<ClCompile Include="Game Files\HummerExtreme.cpp" />
|
||||
<ClCompile Include="Game Files\WastelandRacers2071.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Game Files\Daytona3.h">
|
||||
@ -431,6 +432,9 @@
|
||||
<ClInclude Include="Game Files\HummerExtreme.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game Files\WastelandRacers2071.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MASM Include="DLLWrapper.asm" />
|
||||
|
@ -81,6 +81,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "Game Files/Showdown.h"
|
||||
#include "Game Files/SnoCross.h"
|
||||
#include "Game Files/WackyRaces.h"
|
||||
#include "Game Files/WastelandRacers2071.h"
|
||||
#include "Game Files/WMMT3.h"
|
||||
#include "Game Files/WMMT5.h"
|
||||
#include "Game Files/WMMT5DX.h"
|
||||
@ -1082,6 +1083,7 @@ const int FNF_SUPERCARS = 79;
|
||||
const int SEGA_RACE_TV = 80;
|
||||
const int HUMMER_EXTREME = 81;
|
||||
const int INITIAL_D_THEARCADE_V231 = 82;
|
||||
const int WASTELAND_RACERS_2071 = 83;
|
||||
|
||||
HINSTANCE Get_hInstance()
|
||||
{
|
||||
@ -2630,6 +2632,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
||||
case INITIAL_D_THEARCADE_V231:
|
||||
game = new InitialDTA231;
|
||||
break;
|
||||
case WASTELAND_RACERS_2071:
|
||||
game = new WasteLandRacers2071;
|
||||
break;
|
||||
case TEST_GAME_CONST:
|
||||
case TEST_GAME_FRICTION:
|
||||
case TEST_GAME_SINE:
|
||||
|
78
Game Files/WastelandRacers2071.cpp
Normal file
78
Game Files/WastelandRacers2071.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
/*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 "WasteLandRacers2071.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include "SDL.h"
|
||||
|
||||
static EffectTriggers* myTriggers;
|
||||
static EffectConstants* myConstants;
|
||||
static Helpers* myHelpers;
|
||||
|
||||
extern int EnableDamper;
|
||||
extern int DamperStrength;
|
||||
|
||||
static bool init;
|
||||
static double ffb = 1;
|
||||
|
||||
static int(__cdecl* SetForceOrig)(int param_1, int param_2, int param_3, int param_4);
|
||||
static int __cdecl SetForce(int param_1, int param_2, int param_3, int param_4) {
|
||||
|
||||
ffb = (double)param_1 / 32768.0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int(__cdecl* SetSteeringPosOrig)(int param_1, int param_2, int param_3, int param_4);
|
||||
static int __cdecl SetSteeringPos(int param_1, int param_2, int param_3, int param_4) {
|
||||
|
||||
double wheelPos = (double)param_1 / 128000.0;
|
||||
|
||||
if (wheelPos >= 0) {
|
||||
myTriggers->Rumble(0, param_1, 100.0);
|
||||
myTriggers->Constant(myConstants->DIRECTION_FROM_RIGHT, wheelPos);
|
||||
}
|
||||
else if (wheelPos <= 0) {
|
||||
myTriggers->Rumble(0, param_1 * -1, 100.0);
|
||||
myTriggers->Constant(myConstants->DIRECTION_FROM_LEFT, wheelPos * -1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int(__cdecl* SetDigitalOutOrig)(int param_1, int param_2, int param_3, int param_4);
|
||||
static int __cdecl SetDigitalOut(int param_1, int param_2, int param_3, int param_4) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WasteLandRacers2071::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
|
||||
|
||||
//check a DLL has been loaded
|
||||
if (GetModuleHandleA("sdc2.dll") != NULL && !init) {
|
||||
init = true;
|
||||
MH_Initialize();
|
||||
MH_CreateHookApi(L"sdc2.dll", "SetForce", SetForce, (void**)&SetForceOrig);
|
||||
MH_CreateHookApi(L"sdc2.dll", "SetSteeringPos", SetSteeringPos, (void**)&SetSteeringPosOrig);
|
||||
MH_CreateHookApi(L"sdc2.dll", "SetDigitalOut", SetDigitalOut, (void**)&SetDigitalOutOrig);
|
||||
MH_EnableHook(MH_ALL_HOOKS);
|
||||
}
|
||||
|
||||
if (EnableDamper)
|
||||
triggers->Damper(DamperStrength / 100.0);
|
||||
|
||||
triggers->Spring(ffb);
|
||||
|
||||
myTriggers = triggers;
|
||||
myConstants = constants;
|
||||
myHelpers = helpers;
|
||||
}
|
21
Game Files/WastelandRacers2071.h
Normal file
21
Game Files/WastelandRacers2071.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*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 WasteLandRacers2071 : public Game {
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
|
||||
};
|
@ -1 +1 @@
|
||||
v2.0.0.50
|
||||
v2.0.0.51
|
Loading…
Reference in New Issue
Block a user