Add SWDC 2018 and MK USA
This commit is contained in:
parent
e931f1fdd0
commit
c3424aadaa
@ -256,6 +256,12 @@ GameId=18
|
|||||||
FeedbackLength=5000
|
FeedbackLength=5000
|
||||||
PowerMode=0
|
PowerMode=0
|
||||||
|
|
||||||
|
[SWDC 2018]
|
||||||
|
GameId=50
|
||||||
|
FeedbackLength=80
|
||||||
|
PowerMode=0
|
||||||
|
EscapeKeyExitViaPlugin=0
|
||||||
|
|
||||||
[Ford Racing]
|
[Ford Racing]
|
||||||
GameId=7
|
GameId=7
|
||||||
FeedbackLength=600
|
FeedbackLength=600
|
||||||
@ -577,6 +583,45 @@ BridgeRumble=1
|
|||||||
BridgeRumbleStrength=40
|
BridgeRumbleStrength=40
|
||||||
HideCursor=0
|
HideCursor=0
|
||||||
|
|
||||||
|
[Mario Kart Arcade GP DX USA]
|
||||||
|
GameId=51
|
||||||
|
DefaultCentering=-1
|
||||||
|
FeedbackLength=80
|
||||||
|
ConstantEffectForSteering=1
|
||||||
|
ConstantEffectForSteeringStrength=128
|
||||||
|
WeaponRumble=1
|
||||||
|
WeaponRumbleStrength=30
|
||||||
|
CoinRumble=1
|
||||||
|
CoinRumbleStrength=20
|
||||||
|
DriftRumble=1
|
||||||
|
DriftRumbleControllerStrengthMultiplier=100
|
||||||
|
HitGroundRumble=1
|
||||||
|
HitGroundRumbleStrength=15
|
||||||
|
BoostRumble=1
|
||||||
|
BoostRumbleStrength=50
|
||||||
|
MainShakeRumble=1
|
||||||
|
MainShakeRumbleStrength=100
|
||||||
|
DirtRumble=1
|
||||||
|
DirtRumbleStrength=30
|
||||||
|
GrassRumble=1
|
||||||
|
GrassRumbleStrength=20
|
||||||
|
SandRumble=1
|
||||||
|
SandRumbleStrength=10
|
||||||
|
WaterRumble=1
|
||||||
|
WaterRumbleWheelStrength=65
|
||||||
|
WaterRumbleControllerStrengthMultiplier=100
|
||||||
|
TileRumble=1
|
||||||
|
TileRumbleStrength=20
|
||||||
|
CarpetRumble=1
|
||||||
|
CarpetRumbleStrength=20
|
||||||
|
SpeedBumpRumble=1
|
||||||
|
SpeedBumpRumbleStrength=20
|
||||||
|
RoughTrackRumble=1
|
||||||
|
RoughTrackRumbleStrength=10
|
||||||
|
BridgeRumble=1
|
||||||
|
BridgeRumbleStrength=40
|
||||||
|
HideCursor=0
|
||||||
|
|
||||||
[Demul]
|
[Demul]
|
||||||
GameId=26
|
GameId=26
|
||||||
AutoCloseWindowError=0
|
AutoCloseWindowError=0
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<ClInclude Include="Game Files\InitialD0v211.h" />
|
<ClInclude Include="Game Files\InitialD0v211.h" />
|
||||||
<ClInclude Include="Game Files\KODrive.h" />
|
<ClInclude Include="Game Files\KODrive.h" />
|
||||||
<ClInclude Include="Game Files\MAMESupermodel.h" />
|
<ClInclude Include="Game Files\MAMESupermodel.h" />
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDXUSA.h" />
|
||||||
<ClInclude Include="Game Files\OutRun2Real.h" />
|
<ClInclude Include="Game Files\OutRun2Real.h" />
|
||||||
<ClInclude Include="Game Files\ButtonRumble.h" />
|
<ClInclude Include="Game Files\ButtonRumble.h" />
|
||||||
<ClInclude Include="Game Files\Demul.h" />
|
<ClInclude Include="Game Files\Demul.h" />
|
||||||
@ -49,6 +50,7 @@
|
|||||||
<ClInclude Include="Game Files\LGI.h" />
|
<ClInclude Include="Game Files\LGI.h" />
|
||||||
<ClInclude Include="Game Files\LGI3D.h" />
|
<ClInclude Include="Game Files\LGI3D.h" />
|
||||||
<ClInclude Include="Game Files\StormRacerG.h" />
|
<ClInclude Include="Game Files\StormRacerG.h" />
|
||||||
|
<ClInclude Include="Game Files\SWDC2018.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
<None Include="Config\FFBPlugin.ini">
|
<None Include="Config\FFBPlugin.ini">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
@ -76,6 +78,7 @@
|
|||||||
<ClCompile Include="Game Files\InitialD0v211.cpp" />
|
<ClCompile Include="Game Files\InitialD0v211.cpp" />
|
||||||
<ClCompile Include="Game Files\KODrive.cpp" />
|
<ClCompile Include="Game Files\KODrive.cpp" />
|
||||||
<ClCompile Include="Game Files\MAMESupermodel.cpp" />
|
<ClCompile Include="Game Files\MAMESupermodel.cpp" />
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDXUSA.cpp" />
|
||||||
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
||||||
<ClCompile Include="Game Files\ButtonRumble.cpp" />
|
<ClCompile Include="Game Files\ButtonRumble.cpp" />
|
||||||
<ClCompile Include="Common Files\TeknoParrotGame.cpp" />
|
<ClCompile Include="Common Files\TeknoParrotGame.cpp" />
|
||||||
@ -103,6 +106,7 @@
|
|||||||
<ClCompile Include="Game Files\SnoCross.cpp" />
|
<ClCompile Include="Game Files\SnoCross.cpp" />
|
||||||
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
||||||
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SWDC2018.cpp" />
|
||||||
<ClCompile Include="Game Files\TestGame.cpp" />
|
<ClCompile Include="Game Files\TestGame.cpp" />
|
||||||
<ClCompile Include="Game Files\Transformers.cpp" />
|
<ClCompile Include="Game Files\Transformers.cpp" />
|
||||||
<ClCompile Include="Game Files\WackyRaces.cpp" />
|
<ClCompile Include="Game Files\WackyRaces.cpp" />
|
||||||
|
@ -133,6 +133,8 @@
|
|||||||
<ClCompile Include="Game Files\DemulNascarInputs.cpp" />
|
<ClCompile Include="Game Files\DemulNascarInputs.cpp" />
|
||||||
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
<ClCompile Include="Game Files\StormRacerG.cpp" />
|
||||||
<ClCompile Include="Game Files\InitialD0v211.cpp" />
|
<ClCompile Include="Game Files\InitialD0v211.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SWDC2018.cpp" />
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDXUSA.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Game Files\Daytona3.h">
|
<ClInclude Include="Game Files\Daytona3.h">
|
||||||
@ -301,6 +303,12 @@
|
|||||||
<ClInclude Include="Game Files\InitialD0v211.h">
|
<ClInclude Include="Game Files\InitialD0v211.h">
|
||||||
<Filter>Common Header Files</Filter>
|
<Filter>Common Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\SWDC2018.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDXUSA.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MASM Include="DLLWrapper.asm" />
|
<MASM Include="DLLWrapper.asm" />
|
||||||
|
12
DllMain.cpp
12
DllMain.cpp
@ -50,6 +50,8 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
|||||||
#include "Game Files/InitialD7.h"
|
#include "Game Files/InitialD7.h"
|
||||||
#include "Game Files/InitialD8.h"
|
#include "Game Files/InitialD8.h"
|
||||||
#include "Game Files/MarioKartGPDX.h"
|
#include "Game Files/MarioKartGPDX.h"
|
||||||
|
#include "Game Files/MarioKartGPDX1.10.h"
|
||||||
|
#include "Game Files/MarioKartGPDXUSA.h"
|
||||||
#include "Game Files/MAMESupermodel.h"
|
#include "Game Files/MAMESupermodel.h"
|
||||||
#include "Game Files/OutRun2Fake.h"
|
#include "Game Files/OutRun2Fake.h"
|
||||||
#include "Game Files/OutRun2Real.h"
|
#include "Game Files/OutRun2Real.h"
|
||||||
@ -62,7 +64,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
|||||||
#include "Game Files/Machstorm.h"
|
#include "Game Files/Machstorm.h"
|
||||||
#include "Game Files/AfterburnerClimax.h"
|
#include "Game Files/AfterburnerClimax.h"
|
||||||
#include "Game Files/PokkenTournament.h"
|
#include "Game Files/PokkenTournament.h"
|
||||||
#include "Game Files/MarioKartGPDX1.10.h"
|
|
||||||
#include "Game Files/SonicSegaAllStarsRacing.h"
|
#include "Game Files/SonicSegaAllStarsRacing.h"
|
||||||
#include "Game Files/StormRacerG.h"
|
#include "Game Files/StormRacerG.h"
|
||||||
#include "Game Files/M2Emulator.h"
|
#include "Game Files/M2Emulator.h"
|
||||||
@ -76,6 +77,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/R-Tuned.h"
|
#include "Game Files/R-Tuned.h"
|
||||||
|
#include "Game Files/SWDC2018.h"
|
||||||
#include "Game Files/Transformers.h"
|
#include "Game Files/Transformers.h"
|
||||||
#include "Game Files/H2Overdrive.h"
|
#include "Game Files/H2Overdrive.h"
|
||||||
|
|
||||||
@ -1003,6 +1005,8 @@ const int R_Tuned = 46;
|
|||||||
const int SEGA_RALLY_3_Other = 47;
|
const int SEGA_RALLY_3_Other = 47;
|
||||||
const int Storm_Racer_G = 48;
|
const int Storm_Racer_G = 48;
|
||||||
const int INITIAL_D_0_211 = 49;
|
const int INITIAL_D_0_211 = 49;
|
||||||
|
const int SWDC_2018 = 50;
|
||||||
|
const int MARIO_KART_GPDX_USA = 51;
|
||||||
|
|
||||||
HINSTANCE Get_hInstance()
|
HINSTANCE Get_hInstance()
|
||||||
{
|
{
|
||||||
@ -2360,6 +2364,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
|||||||
case MARIO_KART_GPDX_110:
|
case MARIO_KART_GPDX_110:
|
||||||
game = new MarioKartGPDX110;
|
game = new MarioKartGPDX110;
|
||||||
break;
|
break;
|
||||||
|
case MARIO_KART_GPDX_USA:
|
||||||
|
game = new MarioKartGPDXUSA;
|
||||||
|
break;
|
||||||
case Sonic_Sega_AllStars_Racing:
|
case Sonic_Sega_AllStars_Racing:
|
||||||
game = new SonicSegaAllStarsRacing;
|
game = new SonicSegaAllStarsRacing;
|
||||||
break;
|
break;
|
||||||
@ -2408,6 +2415,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam)
|
|||||||
case R_Tuned:
|
case R_Tuned:
|
||||||
game = new RTuned;
|
game = new RTuned;
|
||||||
break;
|
break;
|
||||||
|
case SWDC_2018:
|
||||||
|
game = new SWDC;
|
||||||
|
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:
|
||||||
|
240
Game Files/MarioKartGPDXUSA.cpp
Normal file
240
Game Files/MarioKartGPDXUSA.cpp
Normal file
@ -0,0 +1,240 @@
|
|||||||
|
/*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 "MarioKartGPDXUSA.h"
|
||||||
|
|
||||||
|
void MarioKartGPDXUSA::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int ConstantEffectForSteering = GetPrivateProfileInt(TEXT("Settings"), TEXT("ConstantEffectForSteering"), 0, settingsFilename);
|
||||||
|
int ConstantEffectForSteeringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ConstantEffectForSteeringStrength"), 0, settingsFilename);
|
||||||
|
int WeaponRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("WeaponRumble"), 0, settingsFilename);
|
||||||
|
int WeaponRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("WeaponRumbleStrength"), 0, settingsFilename);
|
||||||
|
int CoinRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("CoinRumble"), 0, settingsFilename);
|
||||||
|
int CoinRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("CoinRumbleStrength"), 0, settingsFilename);
|
||||||
|
int DriftRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("DriftRumble"), 0, settingsFilename);
|
||||||
|
int DriftRumbleControllerStrengthMultiplier = GetPrivateProfileInt(TEXT("Settings"), TEXT("DriftRumbleControllerStrengthMultiplier"), 0, settingsFilename);
|
||||||
|
int HitGroundRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("HitGroundRumble"), 0, settingsFilename);
|
||||||
|
int HitGroundRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("HitGroundRumbleStrength"), 0, settingsFilename);
|
||||||
|
int BoostRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("BoostRumble"), 0, settingsFilename);
|
||||||
|
int BoostRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("BoostRumbleStrength"), 0, settingsFilename);
|
||||||
|
int MainShakeRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("MainShakeRumble"), 0, settingsFilename);
|
||||||
|
int MainShakeRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("MainShakeRumbleStrength"), 0, settingsFilename);
|
||||||
|
int DirtRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("DirtRumble"), 0, settingsFilename);
|
||||||
|
int DirtRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("DirtRumbleStrength"), 0, settingsFilename);
|
||||||
|
int GrassRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("GrassRumble"), 0, settingsFilename);
|
||||||
|
int GrassRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("GrassRumbleStrength"), 0, settingsFilename);
|
||||||
|
int SandRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("SandRumble"), 0, settingsFilename);
|
||||||
|
int SandRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("SandRumbleStrength"), 0, settingsFilename);
|
||||||
|
int WaterRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumble"), 0, settingsFilename);
|
||||||
|
int WaterRumbleWheelStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumbleWheelStrength"), 0, settingsFilename);
|
||||||
|
int WaterRumbleControllerStrengthMultiplier = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumbleControllerStrengthMultiplier"), 0, settingsFilename);
|
||||||
|
int TileRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("TileRumble"), 0, settingsFilename);
|
||||||
|
int TileRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("TileRumbleStrength"), 0, settingsFilename);
|
||||||
|
int CarpetRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("CarpetRumble"), 0, settingsFilename);
|
||||||
|
int CarpetRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("CarpetRumbleStrength"), 0, settingsFilename);
|
||||||
|
int SpeedBumpRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("SmallBumpRumble"), 0, settingsFilename);
|
||||||
|
int SpeedBumpRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("SmallBumpRumbleStrength"), 0, settingsFilename);
|
||||||
|
int RoughTrackRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("RoughTrackRumble"), 0, settingsFilename);
|
||||||
|
int RoughTrackRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RoughTrackRumbleStrength"), 0, settingsFilename);
|
||||||
|
int BridgeRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("BridgeRumble"), 0, settingsFilename);
|
||||||
|
int BridgeRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("BridgeRumbleStrength"), 0, settingsFilename);
|
||||||
|
|
||||||
|
INT_PTR ff1 = helpers->ReadIntPtr(0xB96B74, /* isRelativeOffset */ true); //shake
|
||||||
|
INT_PTR ff2 = helpers->ReadIntPtr(0xB4F324,/* isRelativeOffset */ true);
|
||||||
|
UINT8 ff3 = helpers->ReadInt32(ff2 + 0x628, /* isRelativeOffset */ false); // terrain data
|
||||||
|
UINT8 ff5 = helpers->ReadInt32(ff2 + 0x658, /* isRelativeOffset */ false); //kart flying or on ground
|
||||||
|
INT_PTR ff6 = helpers->ReadIntPtr(0xB486BC,/* isRelativeOffset */ true);
|
||||||
|
INT_PTR ff7 = helpers->ReadIntPtr(ff6 + 0x2E0, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff8 = helpers->ReadIntPtr(ff7 + 0xAC, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff9 = helpers->ReadIntPtr(ff8 + 0xC, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff10 = helpers->ReadIntPtr(ff9 + 0xC, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff11 = helpers->ReadByte(ff10 + 0x330, /* isRelativeOffset */ false); // 1 during race only
|
||||||
|
float Speed = helpers->ReadFloat32(ff2 + 0x558, /* isRelativeOffset */ false); //Speed of Kart
|
||||||
|
UINT8 ff13 = helpers->ReadByte(0xB4E330, /* isRelativeOffset */ true); //picking up coins
|
||||||
|
UINT8 ff14 = helpers->ReadByte(0xB9548D, /* isRelativeOffset */ true); //picking up weapon box
|
||||||
|
INT_PTR Wheelbase = helpers->ReadIntPtr(0xB4F2E0, /* isRelativeOffset */ true);
|
||||||
|
UINT8 Wheel = helpers->ReadByte(Wheelbase + 0x125, /* isRelativeOffset */ false); //0-255 steering
|
||||||
|
INT_PTR ff16 = helpers->ReadIntPtr(0xB441C8, /* isRelativeOffset*/ true);
|
||||||
|
UINT8 ff17 = helpers->ReadByte(ff2 + 0x674, /* isRelativeOffset */ false); // Drift
|
||||||
|
UINT8 ff18 = helpers->ReadByte(ff16 + 0x3A4, /* isRelativeOffset */ false); // Boost
|
||||||
|
|
||||||
|
int static oldcoins = 0;
|
||||||
|
int newcoins = ff13;
|
||||||
|
int static oldweapon = 0;
|
||||||
|
int newweapon = ff14;
|
||||||
|
int static oldhitground = 0;
|
||||||
|
int newhitground = ff5;
|
||||||
|
|
||||||
|
if ((ConstantEffectForSteering == 1) && (ff11 == 1))
|
||||||
|
{
|
||||||
|
if ((Wheel >= 0) & (Wheel < 128))
|
||||||
|
{
|
||||||
|
double percentForce = ((128 - Wheel) / (ConstantEffectForSteeringStrength / 1.0));
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((Wheel > 127) & (Wheel < 256))
|
||||||
|
{
|
||||||
|
double percentForce = ((Wheel - 127) / (ConstantEffectForSteeringStrength / 1.0));
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((MainShakeRumble == 1) & (4194308 == ff1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Large Shake when hitting walls, other karts or getting hit by items
|
||||||
|
double percentForce = ((MainShakeRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (500);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((BoostRumble == 1) & (ff18 == 1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when Boost
|
||||||
|
double percentForce = ((BoostRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(60, 60, percentForce);
|
||||||
|
}
|
||||||
|
else if ((DriftRumble == 1) & (ff17 == 1) & (Wheel >= 0) & (Wheel < 128) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Drift Effect including steering left
|
||||||
|
double percentForce = (((128 - Wheel) / 128.0) * (DriftRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((DriftRumble == 1) & (ff17 == 1) & (Wheel > 127) & (Wheel < 256) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Drift Effect including steering right
|
||||||
|
double percentForce = (((Wheel - 127) / 128.0) * (DriftRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((HitGroundRumble == 1) & (oldhitground != newhitground) & (ff5 == 1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when hitting ground
|
||||||
|
double percentForce = ((HitGroundRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
Sleep(50);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((WeaponRumble == 1) & (oldweapon != newweapon) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when picking up new weapons or using them
|
||||||
|
double percentForce = ((WeaponRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (300);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(80, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((CoinRumble == 1) & (oldcoins != newcoins) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when picking up coins
|
||||||
|
double percentForce = ((CoinRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((DirtRumble == 1) & (3 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// small friction when driving on dirt while moving
|
||||||
|
double percentForce = ((DirtRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((SpeedBumpRumble == 1) & (10 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Small constant when hitting bumps
|
||||||
|
double percentForce = ((SpeedBumpRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
|
||||||
|
}
|
||||||
|
else if ((GrassRumble == 1) & (4 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Wheel rumbles while driving on grass
|
||||||
|
double percentForce = ((GrassRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((CarpetRumble == 1) & (9 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Wheel rumbles while driving on carpet
|
||||||
|
double percentForce = ((CarpetRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((WaterRumble == 1) & (7 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1) & (Wheel >= 0) & (Wheel < 128))
|
||||||
|
{
|
||||||
|
//wheel hard to turn while driving through water
|
||||||
|
double percentForce = ((WaterRumbleWheelStrength) / 100.0);
|
||||||
|
double percentForce1 = ((128 - Wheel / 128.0) * (WaterRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce1, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((WaterRumble == 1) & (7 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1) & (Wheel > 127))
|
||||||
|
{
|
||||||
|
double percentForce = ((WaterRumbleWheelStrength) / 100.0);
|
||||||
|
double percentForce1 = ((Wheel - 127 / 128.0) * (WaterRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce1, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((TileRumble == 1) & (12 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over tiles
|
||||||
|
double percentForce = ((TileRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((SandRumble == 1) & (14 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over sand
|
||||||
|
double percentForce = ((SandRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Sine(70, 70, percentForce);
|
||||||
|
}
|
||||||
|
else if ((RoughTrackRumble == 1) & (11 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over rough part of track
|
||||||
|
double percentForce = ((RoughTrackRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(40, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((BridgeRumble == 1) & (8 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles moderately when driving over wooden bridges
|
||||||
|
double percentForce = ((BridgeRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 150, percentForce);
|
||||||
|
}
|
||||||
|
oldcoins = newcoins;
|
||||||
|
oldweapon = newweapon;
|
||||||
|
oldhitground = newhitground;
|
||||||
|
}
|
20
Game Files/MarioKartGPDXUSA.h
Normal file
20
Game Files/MarioKartGPDXUSA.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 MarioKartGPDXUSA : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
88
Game Files/SWDC2018.cpp
Normal file
88
Game Files/SWDC2018.cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/*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 "SWDC2018.h"
|
||||||
|
|
||||||
|
static wchar_t* settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
static int EscapeKeyExitViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("EscapeKeyExitViaPlugin"), 0, settingsFilename);
|
||||||
|
|
||||||
|
void SWDC::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
if (GetAsyncKeyState((VK_ESCAPE)) && (EscapeKeyExitViaPlugin == 1))
|
||||||
|
{
|
||||||
|
ExitProcess(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 ff1 = helpers->ReadByte(0x8E5CCF4, true);
|
||||||
|
UINT8 ff2 = helpers->ReadByte(0x8E5CCF5, true);
|
||||||
|
UINT8 ff3 = helpers->ReadByte(0x8E5CCF6, true);
|
||||||
|
|
||||||
|
if (ff1 == 80)
|
||||||
|
{
|
||||||
|
triggers->Spring(1.0);
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x85)
|
||||||
|
{
|
||||||
|
if ((ff2 > 0x00) && (ff2 < 0x30))
|
||||||
|
{
|
||||||
|
double percentForce = ff2 / 47.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(40, 0, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x86)
|
||||||
|
{
|
||||||
|
if ((ff3 > 0x00) && (ff3 < 0x4E))
|
||||||
|
{
|
||||||
|
double percentForce = ff3 / 77.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Spring(percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x84)
|
||||||
|
{
|
||||||
|
if ((ff2 == 0x00) && (ff3 > 0x37) && (ff3 < 0x80))
|
||||||
|
{
|
||||||
|
double percentForce = (128 - ff3) / 72.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff2 == 0x01) && (ff3 > 0x00) && (ff3 < 0x49))
|
||||||
|
{
|
||||||
|
double percentForce = (ff3 / 72.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((ff2 == 0x00) && (ff3 > 0x00) && (ff3 < 0x38))
|
||||||
|
{
|
||||||
|
double percentForce = 1.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff2 == 0x01) && (ff3 > 0x48))
|
||||||
|
{
|
||||||
|
double percentForce = 1.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
Game Files/SWDC2018.h
Normal file
20
Game Files/SWDC2018.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 SWDC : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers);
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user