diff --git a/Config/FFBPlugin.ini b/Config/FFBPlugin.ini index 41ae281..92bbe7f 100644 --- a/Config/FFBPlugin.ini +++ b/Config/FFBPlugin.ini @@ -152,6 +152,10 @@ FeedbackLength=500 GameId=43 FeedbackLength=500 +[Winter X Games SnoCross] +GameId=44 +FeedbackLength=500 + [Sega Racing Classic] GameId=5 FeedbackLength=500 diff --git a/Dinput8Wrapper.vcxproj b/Dinput8Wrapper.vcxproj index f4e6b92..f74e543 100644 --- a/Dinput8Wrapper.vcxproj +++ b/Dinput8Wrapper.vcxproj @@ -84,6 +84,7 @@ + @@ -117,6 +118,7 @@ + diff --git a/Dinput8Wrapper.vcxproj.filters b/Dinput8Wrapper.vcxproj.filters index 3f36493..382ba45 100644 --- a/Dinput8Wrapper.vcxproj.filters +++ b/Dinput8Wrapper.vcxproj.filters @@ -122,6 +122,7 @@ + @@ -263,6 +264,9 @@ Common Header Files + + Common Header Files + diff --git a/DllMain.cpp b/DllMain.cpp index a472052..ed697ee 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -49,6 +49,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>. #include "Game Files/OutRun2Real.h" #include "Game Files/SegaRacingClassic.h" #include "Game Files/SegaRally3.h" +#include "Game Files/SnoCross.h" #include "Game Files/OldMame.h" #include "Game Files/WackyRaces.h" #include "Game Files/WMMT5.h" @@ -957,6 +958,7 @@ const int Transformers_ = 40; const int Golden_Gun = 41; const int Dirty_Drivin = 42; const int H2_Overdrive = 43; +const int Sno_Cross = 44; HINSTANCE Get_hInstance() { @@ -2087,6 +2089,9 @@ DWORD WINAPI FFBLoop(LPVOID lpParam) case H2_Overdrive: game = new H2Overdrive; break; + case Sno_Cross: + game = new SnoCross; + break; case TEST_GAME_CONST: case TEST_GAME_FRICTION: case TEST_GAME_SINE: diff --git a/Game Files/SnoCross.cpp b/Game Files/SnoCross.cpp new file mode 100644 index 0000000..348d85c --- /dev/null +++ b/Game Files/SnoCross.cpp @@ -0,0 +1,39 @@ +/*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 "SnoCross.h" + +void SnoCross::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) { + + float ff = helpers->ReadFloat32(0x99AB6C, false); + + helpers->log("got value: "); + std::string ffs = std::to_string(ff); + helpers->log((char*)ffs.c_str()); + + if (ff > 0) + { + double percentForce = ff / 1.24; + double percentLength = 100; + triggers->Rumble(percentForce, 0, percentLength); + triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); + } + else if (ff < 0) + { + double percentForce = -ff / 1.24; + 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/SnoCross.h b/Game Files/SnoCross.h new file mode 100644 index 0000000..a489b6d --- /dev/null +++ b/Game Files/SnoCross.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 SnoCross : 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 b3fbbfe..5216c12 100644 --- a/Includes/FFBPluginReadme.txt +++ b/Includes/FFBPluginReadme.txt @@ -1,6 +1,6 @@ ***FFB Arcade Plugin*** -Version 1.6 +Version 1.7 Brought to you by Boomslangnz, Ducon2016, Spazzy & pinkimo.