diff --git a/Config/FFBPlugin.ini b/Config/FFBPlugin.ini index 6de2416..e27ac6a 100644 --- a/Config/FFBPlugin.ini +++ b/Config/FFBPlugin.ini @@ -144,6 +144,10 @@ HowtoRumbleKnockEffect=0 HowtoRumbleMotorEffect=0 HowtoRumbleHealthEffect=0 +[Dirty Drivin'] +GameId=42 +FeedbackLength=500 + [Sega Racing Classic] GameId=5 FeedbackLength=500 diff --git a/Dinput8Wrapper.vcxproj b/Dinput8Wrapper.vcxproj index 4b47e41..5a355c5 100644 --- a/Dinput8Wrapper.vcxproj +++ b/Dinput8Wrapper.vcxproj @@ -20,6 +20,7 @@ + @@ -50,6 +51,7 @@ + diff --git a/Dinput8Wrapper.vcxproj.filters b/Dinput8Wrapper.vcxproj.filters index 0816681..93d0aca 100644 --- a/Dinput8Wrapper.vcxproj.filters +++ b/Dinput8Wrapper.vcxproj.filters @@ -120,6 +120,7 @@ + @@ -255,6 +256,9 @@ Common Header Files + + Common Header Files + diff --git a/DllMain.cpp b/DllMain.cpp index 724de56..369575a 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -31,6 +31,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>. #include "Game Files/AliensExtermination.h" #include "Game Files/ChaseHQ2.h" #include "Game Files/Daytona3.h" +#include "Game Files/DirtyDrivin.h" #include "Game Files/FordRacing.h" #include "Game Files/FordRacingOther.h" #include "Game Files/GRID.h" @@ -953,6 +954,7 @@ const int FORD_RACING_OTHER = 38; const int KO_Drive = 39; const int Transformers_ = 40; const int Golden_Gun = 41; +const int Dirty_Drivin = 42; HINSTANCE Get_hInstance() { @@ -2077,6 +2079,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam) case HOTD_4: game = new HOTD4; break; + case Dirty_Drivin: + game = new DirtyDrivin; + break; case TEST_GAME_CONST: case TEST_GAME_FRICTION: case TEST_GAME_SINE: diff --git a/Game Files/DirtyDrivin.cpp b/Game Files/DirtyDrivin.cpp new file mode 100644 index 0000000..bb4c156 --- /dev/null +++ b/Game Files/DirtyDrivin.cpp @@ -0,0 +1,35 @@ +/*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 +#include "DirtyDrivin.h" + +void DirtyDrivin::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) { + + float ff = helpers->ReadFloat32(0x886EC4, false); + + 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); + } +} \ No newline at end of file diff --git a/Game Files/DirtyDrivin.h b/Game Files/DirtyDrivin.h new file mode 100644 index 0000000..922670b --- /dev/null +++ b/Game Files/DirtyDrivin.h @@ -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 DirtyDrivin : public Game { + +public: + void FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers); +}; \ No newline at end of file diff --git a/Includes/FFBPluginReadme.txt b/Includes/FFBPluginReadme.txt index 1e55034..7a1f936 100644 --- a/Includes/FFBPluginReadme.txt +++ b/Includes/FFBPluginReadme.txt @@ -1,6 +1,6 @@ ***FFB Arcade Plugin*** -Version 1.4b +Version 1.5 Brought to you by Boomslangnz, Ducon2016, Spazzy & pinkimo. @@ -10,7 +10,9 @@ While best efforts were made to try to resemble the real arcade force feedback, in some cases eg Mario Kart GP DX, Pokken Tournament and Battle Gear 4,effects were created entirely from scratch so are not using real force feedback values. Most games use REAL ffb values however :) -***1.4b Changes*** +***1.5 Changes*** + +- Added FFB support for Dirty Drivin - Added rumble support for Golden Gun (up to 2 players)