1
0
mirror of synced 2025-01-31 19:55:26 +01:00

Adding Demul games to the persistent values controller.

This commit is contained in:
Adam Pooley 2020-07-03 13:33:16 +01:00
parent d1cce9d8ba
commit c4d4f7f4a0
2 changed files with 111 additions and 7 deletions

View File

@ -20,6 +20,14 @@ int defaultMaxForce;
int defaultAlternativeMaxForceLeft;
int defaultAlternativeMaxForceRight;
//Demul Emulator Games
static std::string Nascar("Nascar");
static std::string InitialDArcadeStage("Initial D Arcade Stage");
static std::string SmashingDrive("Smashing Drive");
static std::string MaximumSpeed("Maximum Speed");
static std::string FasterThanSpeed("Faster Than Speed");
static std::string ATVTrack("ATV Track");
//M2 Emulator Games
static std::string SegaRallyChampionship("Sega Rally Championship");
static std::string SegaRallyChampionshipRevB("Sega Rally Championship (Rev B)");
@ -750,7 +758,7 @@ void CustomFFBStrengthSetup()
}
else if (configGameId == 25)
{
if (romname == DaytonaUSA || romname == DaytonaUSA93Edition || romname == DaytonaUSASaturnAds || romname == DaytonaUSASpecialEdition || romname == DaytonaUSATurbo || romname == DaytonaUSATurboRevA || romname == DaytonaUSAGTX2004 || romname == DaytonaUSAToTheMaxx)
if (romnameM2 == DaytonaUSA || romnameM2 == DaytonaUSA93Edition || romnameM2 == DaytonaUSASaturnAds || romnameM2 == DaytonaUSASpecialEdition || romnameM2 == DaytonaUSATurbo || romnameM2 == DaytonaUSATurboRevA || romnameM2 == DaytonaUSAGTX2004 || romnameM2 == DaytonaUSAToTheMaxx)
{
if (AlternativeFFB == 1)
{
@ -763,7 +771,7 @@ void CustomFFBStrengthSetup()
}
}
if (romname == SegaRallyChampionship || romname == SegaRallyChampionshipRevB || romname == SegaRallyProDrivin)
if (romnameM2 == SegaRallyChampionship || romnameM2 == SegaRallyChampionshipRevB || romnameM2 == SegaRallyProDrivin)
{
if (AlternativeFFB == 1)
{
@ -776,7 +784,7 @@ void CustomFFBStrengthSetup()
}
}
if (romname == Indianapolis500RevADeluxe || romname == Indianapolis500RevATwinNewerrev || romname == Indianapolis500RevATwinOlderrev)
if (romnameM2 == Indianapolis500RevADeluxe || romnameM2 == Indianapolis500RevATwinNewerrev || romnameM2 == Indianapolis500RevATwinOlderrev)
{
if (AlternativeFFB == 1)
{
@ -789,7 +797,7 @@ void CustomFFBStrengthSetup()
}
}
if (romname == SegaTouringCarChampionship || romname == SegaTouringCarChampionshipRevA || romname == SegaTouringCarChampionshipRevB)
if (romnameM2 == SegaTouringCarChampionship || romnameM2 == SegaTouringCarChampionshipRevA || romnameM2 == SegaTouringCarChampionshipRevB)
{
if (AlternativeFFB == 1)
{
@ -802,7 +810,7 @@ void CustomFFBStrengthSetup()
}
}
if (romname == OverRev || romname == OverRevModel2B)
if (romnameM2 == OverRev || romnameM2 == OverRevModel2B)
{
if (AlternativeFFB == 1)
{
@ -815,7 +823,7 @@ void CustomFFBStrengthSetup()
}
}
if (romname == SuperGT24h)
if (romnameM2 == SuperGT24h)
{
if (AlternativeFFB == 1)
{
@ -830,7 +838,83 @@ void CustomFFBStrengthSetup()
}
else if (configGameId == 26)
{
// Demul
if (romnameDemul == Nascar)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftNascarRacing";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightNascarRacing";
}
else
{
CustomMaxForce = "MaxForceNascarRacing";
}
}
if (romnameDemul == InitialDArcadeStage)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftInitialDDemul";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightInitialDDemul";
}
else
{
CustomMaxForce = "MaxForceInitialDDemul";
}
}
if (romnameDemul == SmashingDrive)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftSmashingDrive";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightSmashingDrive";
}
else
{
CustomMaxForce = "MaxForceSmashingDrive";
}
}
if (romnameDemul == MaximumSpeed)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftMaximumSpeed";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightMaximumSpeed";
}
else
{
CustomMaxForce = "MaxForceMaximumSpeed";
}
}
if (romnameDemul == FasterThanSpeed)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftFasterSpeed";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightFasterSpeed";
}
else
{
CustomMaxForce = "MaxForceFasterSpeed";
}
}
if (romnameDemul == ATVTrack)
{
if (AlternativeFFB == 1)
{
CustomAlternativeMaxForceLeft = "AlternativeMaxForceLeftATVTrack";
CustomAlternativeMaxForceRight = "AlternativeMaxForceRightATVTrack";
}
else
{
CustomMaxForce = "MaxForceATVTrack";
}
}
}
else
{

View File

@ -22,6 +22,14 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
#include "../Common Files/CRCCheck.h"
#include "../Common Files/SignatureScanning.h"
//Demul Emulator Games
std::string Nascar("Nascar");
std::string InitialDArcadeStage("Initial D Arcade Stage");
std::string SmashingDrive("Smashing Drive");
std::string MaximumSpeed("Maximum Speed");
std::string FasterThanSpeed("Faster Than Speed");
std::string ATVTrack("ATV Track");
extern void NascarInputsEnabled(Helpers* helpers);
extern void InitialDInputsEnabled(Helpers* helpers);
extern void SmashingDriveInputsEnabled(Helpers* helpers);
@ -688,6 +696,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
NascarRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", Nascar);
}
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring2))
@ -705,6 +715,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
InitialDRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", InitialDArcadeStage);
}
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring3))
@ -722,6 +734,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
SmashingDriveRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", SmashingDrive);
}
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring4))
@ -739,6 +753,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
MaximumSpeedRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", MaximumSpeed);
}
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring5))
@ -756,6 +772,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
FasterThanSpeedRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", FasterThanSpeed);
}
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring6))
@ -773,6 +791,8 @@ void Demul::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
ATVTrackRunning = true;
WindowSearch = true;
sprintf(romnameDemul, "%s", ATVTrack);
}
}
}