1
0
mirror of synced 2024-11-27 16:10:52 +01:00

add Dead Heat and WMMT3

This commit is contained in:
Boomslangnz 2022-06-08 17:06:23 +12:00
parent ff1b57c1d1
commit 70bfc036de
11 changed files with 322 additions and 16 deletions

View File

@ -12,26 +12,28 @@ TeknoParrotGame::TeknoParrotGame()
if (secData)
{
if (*((int*)secData + 2) > 0)
{
*((int*)secData + 2) = 0;
}
if (*((int*)secData + 6) > 0)
{
*((int*)secData + 6) = 0;
}
if (*((int*)secData + 7) > 0)
{
*((int*)secData + 7) = 0;
}
if (*((int*)secData + 8) > 0)
{
*((int*)secData + 8) = 0;
}
if (configGameId == 54 || configGameId == 55)
if (*((int*)secData + 9) > 0)
*((int*)secData + 9) = 0;
if (configGameId == 61)
{
ffbOffset = *((int*)secData + 6);
ffbOffset2 = *((int*)secData + 7);
ffbOffset3 = *((int*)secData + 8);
ffbOffset4 = *((int*)secData + 9);
}
else if (configGameId == 54 || configGameId == 55)
{
ffbOffset = *((int*)secData + 6);
ffbOffset2 = *((int*)secData + 7);
@ -42,23 +44,19 @@ TeknoParrotGame::TeknoParrotGame()
ffbOffset = *((int*)secData + 6);
ffbOffset2 = *((int*)secData + 7);
}
else if (configGameId == 62)
ffbOffset = *((int*)secData + 6);
else
{
ffbOffset = *((int*)secData + 2);
}
}
}
int TeknoParrotGame::GetTeknoParrotFFB()
{
if (configGameId == 19 || configGameId == 54 || configGameId == 55)
{
if (configGameId == 19 || configGameId == 54 || configGameId == 55 || configGameId == 61 || configGameId == 62)
ffbOffset = *((int*)secData + 6);
}
else
{
ffbOffset = *((int*)secData + 2);
}
return ffbOffset;
}
@ -75,6 +73,12 @@ int TeknoParrotGame::GetTeknoParrotFFB3()
return ffbOffset3;
}
int TeknoParrotGame::GetTeknoParrotFFB4()
{
ffbOffset4 = *((int*)secData + 9);
return ffbOffset4;
}
void TeknoParrotGame::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
helpers->log("TeknoParrot game not implemented");
}

View File

@ -11,9 +11,11 @@ protected:
int ffbOffset = 0;
int ffbOffset2 = 0;
int ffbOffset3 = 0;
int ffbOffset4 = 0;
int GetTeknoParrotFFB();
int GetTeknoParrotFFB2();
int GetTeknoParrotFFB3();
int GetTeknoParrotFFB4();
TeknoParrotGame();
public:

View File

@ -224,6 +224,18 @@ FeedbackLength=500
EnableDamper=0
DamperStrength=100
[WMMT3]
GameId=61
FeedbackLength=500
EnableDamper=0
DamperStrength=100
[Dead Heat]
GameId=62
FeedbackLength=500
EnableDamper=0
DamperStrength=100
[Winter X Games SnoCross]
GameId=44
FeedbackLength=500

View File

@ -27,6 +27,7 @@
<ClInclude Include="Game Files\CrazyTaxi.h" />
<ClInclude Include="Game Files\D1GP.h" />
<ClInclude Include="Game Files\Daytona3NSE.h" />
<ClInclude Include="Game Files\DeadHeat.h" />
<ClInclude Include="Game Files\DirtyDrivin.h" />
<ClInclude Include="Game Files\Flycast.h" />
<ClInclude Include="Game Files\FordRacingOther.h" />
@ -55,6 +56,7 @@
<ClInclude Include="Game Files\LGI3D.h" />
<ClInclude Include="Game Files\StormRacerG.h" />
<ClInclude Include="Game Files\SWDC2018.h" />
<ClInclude Include="Game Files\WMMT3.h" />
<ClInclude Include="Game Files\WMMT5DX+.h" />
<ClInclude Include="Game Files\WMMT5DX.h" />
<ClInclude Include="Game Files\WMMT6.h" />
@ -73,6 +75,7 @@
<ClCompile Include="Game Files\CrazyTaxi.cpp" />
<ClCompile Include="Game Files\D1GP.cpp" />
<ClCompile Include="Game Files\Daytona3NSE.cpp" />
<ClCompile Include="Game Files\DeadHeat.cpp" />
<ClCompile Include="Game Files\DemulATVTrackInputs.cpp" />
<ClCompile Include="Game Files\DemulFasterThanSpeedInputs.cpp" />
<ClCompile Include="Game Files\DemulMaximumSpeedInputs.cpp" />
@ -125,6 +128,7 @@
<ClCompile Include="Game Files\TestGame.cpp" />
<ClCompile Include="Game Files\Transformers.cpp" />
<ClCompile Include="Game Files\WackyRaces.cpp" />
<ClCompile Include="Game Files\WMMT3.cpp" />
<ClCompile Include="Game Files\WMMT5.cpp" />
<ClCompile Include="Game Files\InitialD4Japan.cpp" />
<ClCompile Include="Game Files\GTIClub3.cpp" />

View File

@ -146,6 +146,8 @@
<ClCompile Include="Game Files\CrazyTaxi.cpp" />
<ClCompile Include="Game Files\Daytona3NSE.cpp" />
<ClCompile Include="Game Files\Flycast.cpp" />
<ClCompile Include="Game Files\WMMT3.cpp" />
<ClCompile Include="Game Files\DeadHeat.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Game Files\Daytona3.h">
@ -344,6 +346,12 @@
<ClInclude Include="Game Files\Flycast.h">
<Filter>Common Header Files</Filter>
</ClInclude>
<ClInclude Include="Game Files\WMMT3.h">
<Filter>Common Header Files</Filter>
</ClInclude>
<ClInclude Include="Game Files\DeadHeat.h">
<Filter>Common Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<MASM Include="DLLWrapper.asm" />

View File

@ -39,6 +39,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
#include "Game Files/D1GP.h"
#include "Game Files/Daytona3.h"
#include "Game Files/Daytona3NSE.h"
#include "Game Files/DeadHeat.h"
#include "Game Files/DirtyDrivin.h"
#include "Game Files/FordRacing.h"
#include "Game Files/FordRacingOther.h"
@ -64,6 +65,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
#include "Game Files/SegaRally3Other.h"
#include "Game Files/SnoCross.h"
#include "Game Files/WackyRaces.h"
#include "Game Files/WMMT3.h"
#include "Game Files/WMMT5.h"
#include "Game Files/WMMT5DX.h"
#include "Game Files/WMMT5DX+.h"
@ -1028,6 +1030,8 @@ const int WMMT_5DX = 57;
const int Crazy_Taxi = 58;
const int DAYTONA_3_NSE = 59;
const int FLYCAST = 60;
const int WMMT_3 = 61;
const int DEAD_HEAT = 62;
HINSTANCE Get_hInstance()
{
@ -2492,6 +2496,12 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
case FLYCAST:
game = new Flycast;
break;
case WMMT_3:
game = new WMMT3;
break;
case DEAD_HEAT:
game = new DeadHeat;
break;
case TEST_GAME_CONST:
case TEST_GAME_FRICTION:
case TEST_GAME_SINE:

109
Game Files/DeadHeat.cpp Normal file
View File

@ -0,0 +1,109 @@
/*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 "DeadHeat.h"
#include "../Common Files/Game.h"
extern int EnableDamper;
extern int DamperStrength;
static wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
static int EnableForceSpringEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffect"), 0, settingsFilename);
static int ForceSpringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrength"), 0, settingsFilename);
static int OldsetSpring;
static int OldsetViosity;
static int OldsetCenterOffset;
static int OldsetReflect;
void DeadHeat::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers)
{
int setSpring = GetTeknoParrotFFB();
int setViosity = GetTeknoParrotFFB2();
int setCenterOffset = GetTeknoParrotFFB3();
int setReflect = GetTeknoParrotFFB4();
if (EnableDamper)
triggers->Damper(DamperStrength / 100.0);
if (EnableForceSpringEffect)
triggers->Springi(ForceSpringStrength / 100.0);
if (setSpring != OldsetSpring)
{
if (!setSpring)
triggers->Spring(0);
double percentForce = setSpring / 63.0;
triggers->Spring(percentForce);
}
if (setViosity)
{
double percentForce = setViosity / 63.0;
triggers->Friction(percentForce);
}
if (setReflect != OldsetReflect)
{
if (setReflect == 0x00)
{
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
}
else if (setReflect > 0x00 && setReflect <= 0x3F)
{
double percentForce = setReflect / 63.0;
double percentLength = 100;
triggers->Rumble(percentForce, 0, percentLength);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
}
else
{
double percentForce = (0xFF - setReflect) / 63.0;
double percentLength = 100;
triggers->Rumble(0, percentForce, percentLength);
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
}
}
if (setCenterOffset != OldsetCenterOffset)
{
if (setCenterOffset == 0x00)
{
triggers->Rumble(0, 0, 0);
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
}
else if (setCenterOffset > 0x00 && setCenterOffset <= 0x3F)
{
double percentForce = setCenterOffset / 63.0;
double percentLength = 100;
triggers->Rumble(percentForce, 0, percentLength);
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
}
else
{
double percentForce = ((0xFFFFFFFF - setCenterOffset) + 1) / 63.0;
double percentLength = 100;
triggers->Rumble(0, percentForce, percentLength);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
}
}
OldsetSpring = setSpring;
OldsetViosity = setViosity;
OldsetCenterOffset = setCenterOffset;
OldsetReflect = setReflect;
}

21
Game Files/DeadHeat.h Normal file
View 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/TeknoParrotGame.h"
class DeadHeat : public TeknoParrotGame {
public:
DeadHeat() : TeknoParrotGame() { }
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
};

113
Game Files/WMMT3.cpp Normal file
View File

@ -0,0 +1,113 @@
/*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 "WMMT3.h"
#include "../Common Files/Game.h"
extern int EnableDamper;
extern int DamperStrength;
static wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
static int EnableForceSpringEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffect"), 0, settingsFilename);
static int ForceSpringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrength"), 0, settingsFilename);
static int OldsetSpring;
static int OldsetViosity;
static int OldsetCenterOffset;
static int OldsetReflect;
static bool init;
void WMMT3::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers)
{
int setSpring = GetTeknoParrotFFB();
int setViosity = GetTeknoParrotFFB2();
int setCenterOffset = GetTeknoParrotFFB3();
int setReflect = GetTeknoParrotFFB4();
if (EnableDamper)
triggers->Damper(DamperStrength / 100.0);
if (EnableForceSpringEffect)
triggers->Springi(ForceSpringStrength / 100.0);
if (setSpring != OldsetSpring)
{
if (!setSpring)
triggers->Spring(0);
double percentForce = setSpring / 63.0;
triggers->Spring(percentForce);
}
if (setViosity)
{
double percentForce = setViosity / 63.0;
triggers->Friction(percentForce);
}
if (setReflect != OldsetReflect)
{
//if (setReflect == 0x00)
//{
// triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
//}
//else
if (setReflect > 0x00 && setReflect <= 0x3F)
{
double percentForce = setReflect / 63.0;
double percentLength = 100;
triggers->Rumble(percentForce, 0, percentLength);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
}
else
{
double percentForce = ((0xFFFFFFFF - setReflect) + 1) / 63.0;
double percentLength = 100;
triggers->Rumble(0, percentForce, percentLength);
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
}
}
if (setCenterOffset != OldsetCenterOffset)
{
/* if (setCenterOffset == 0x00)
{
triggers->Rumble(0, 0, 0);
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
}
else*/
if (setCenterOffset > 0x00 && setCenterOffset <= 0x3F)
{
double percentForce = setCenterOffset / 63.0;
double percentLength = 100;
triggers->Rumble(percentForce, 0, percentLength);
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
}
else
{
double percentForce = ((0xFFFFFFFF - setCenterOffset) + 1) / 63.0;
double percentLength = 100;
triggers->Rumble(0, percentForce, percentLength);
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
}
}
OldsetSpring = setSpring;
OldsetViosity = setViosity;
OldsetCenterOffset = setCenterOffset;
OldsetReflect = setReflect;
}

21
Game Files/WMMT3.h Normal file
View 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/TeknoParrotGame.h"
class WMMT3 : public TeknoParrotGame {
public:
WMMT3() : TeknoParrotGame() { }
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
};

View File

@ -105,6 +105,7 @@ extremely generous.
-Daytona USA 2 - Battle on the Edge
-Daytona Championship USA
-Daytona Championship USA New Season Edition
-Dead Heat
-Dirt Devils
-Dirty Drivin
-Emergency Call Ambulance
@ -184,6 +185,7 @@ extremely generous.
-Vapor TRX
-Virtua Racing (CHANGE TO UPRIGHT CABINET)
-Wacky Races
-Wangan Midnight Maximum Tune 3
-Wangan Midnight Maximum Tune 5
-Wangan Midnight Maximum Tune 5DX
-Wangan Midnight Maximum Tune 5DX+