Remove Lastwasstop etc
This commit is contained in:
parent
57d812e6af
commit
04e446f586
@ -9,7 +9,6 @@ class TeknoParrotGame : public Game {
|
||||
int ffbOffset = 0;
|
||||
|
||||
protected:
|
||||
int lastWasStop = 0;
|
||||
int GetTeknoParrotFFB();
|
||||
TeknoParrotGame();
|
||||
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class BG4JP : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -114,7 +114,6 @@ void ChaseHQ2::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTrigg
|
||||
// direction from left => makes wheel turn right
|
||||
triggers->Rumble(percentForce, 0, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); // old logic: 31 - ff
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else if (ff > 0)
|
||||
{
|
||||
@ -125,13 +124,5 @@ void ChaseHQ2::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTrigg
|
||||
// direction from right => makes wheel turn left
|
||||
triggers->Rumble(0, percentForce, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); // old logic: 15 - ff
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastWasStop == 0) {
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||
lastWasStop = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class ChaseHQ2 : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Daytona3 : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -23,33 +23,17 @@ void FordRacing::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTri
|
||||
if (ff < -65505 && ff > -65515)
|
||||
{
|
||||
helpers->log("moving wheel left");
|
||||
// -65507 => 9
|
||||
// -65508 => 8
|
||||
// -65515 => 1
|
||||
// weirdly, FR has 9 levels, not 15, utilizing only -65506 (weakest) to -65514 (strongest)
|
||||
double percentForce = (-65505 - ff) / 9.0;
|
||||
double percentLength = 50;
|
||||
// direction from left => makes wheel turn right
|
||||
triggers->Rumble(0, percentForce, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else if (ff > 0 && ff < 16)
|
||||
{
|
||||
helpers->log("moving wheel right");
|
||||
// weirdly, FR has 9 levels, not 15, utilizing 15 (weakest) through 7 (strongest)
|
||||
double percentForce = (16 - ff) / 9.0;
|
||||
double percentLength = 50;
|
||||
// direction from right => makes wheel turn left
|
||||
triggers->Rumble(percentForce, 0, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastWasStop == 0) {
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||
lastWasStop = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class Machstorm : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class MarioKartGPDX100 : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class MarioKartGPDX110 : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class PokkenTournament : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class SegaRacingClassic : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -23,30 +23,17 @@ void SegaRally3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTri
|
||||
if (ff > 15)
|
||||
{
|
||||
helpers->log("moving wheel right");
|
||||
// assume that 30 is the weakest and 16 is the strongest
|
||||
double percentForce = (31 - ff) / 15.0;
|
||||
double percentLength = 100;
|
||||
// direction from left => makes wheel turn right
|
||||
triggers->Rumble(percentForce, 0, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||
lastWasStop = 0;
|
||||
|
||||
}
|
||||
else if (ff > 0)
|
||||
{
|
||||
helpers->log("moving wheel left");
|
||||
// assume that 1 is the strongest and 15 is the weakest
|
||||
double percentForce = (16 - ff) / 15.0;
|
||||
double percentLength = 100;
|
||||
// direction from right => makes wheel turn left
|
||||
triggers->Rumble(0, percentForce, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastWasStop == 0) {
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||
lastWasStop = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -34,7 +34,6 @@ void SonicSegaAllStarsRacing::FFBLoop(EffectConstants *constants, Helpers *helpe
|
||||
double percentLength = 100;
|
||||
triggers->Rumble(0, percentForce, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||
lastWasStop = 0;
|
||||
|
||||
}
|
||||
else if ((FFB > 237) & (FFB < 256))
|
||||
@ -44,13 +43,5 @@ void SonicSegaAllStarsRacing::FFBLoop(EffectConstants *constants, Helpers *helpe
|
||||
double percentLength = 100;
|
||||
triggers->Rumble(percentForce, 0, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastWasStop == 0) {
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||
lastWasStop = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class SonicSegaAllStarsRacing : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -15,7 +15,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "TestGame.h"
|
||||
#include "SDL.h"
|
||||
|
||||
//settingsFN copied from DllMain.cpp; renamed from settingsFilename
|
||||
wchar_t *settingsFN = TEXT(".\\FFBPlugin.ini");
|
||||
|
||||
//GameId test values:
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class TestGame : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -14,7 +14,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
#include "../Common Files/Game.h"
|
||||
class WMMT5 : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
@ -112,7 +112,6 @@ void WackyRaces::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTri
|
||||
// direction from left => makes wheel turn right
|
||||
triggers->Rumble(0, percentForce, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); // old logic: 31 - ff
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else if (ff > 0)
|
||||
{
|
||||
@ -123,13 +122,5 @@ void WackyRaces::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTri
|
||||
// direction from right => makes wheel turn left
|
||||
triggers->Rumble(percentForce, 0, percentLength);
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); // old logic: 15 - ff
|
||||
lastWasStop = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastWasStop == 0) {
|
||||
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||
lastWasStop = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,6 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
||||
#include "../Common Files/Game.h"
|
||||
|
||||
class WackyRaces : public Game {
|
||||
int lastWasStop = 0;
|
||||
|
||||
public:
|
||||
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||
|
Loading…
Reference in New Issue
Block a user