From d30d703d6720e18521bfc48ac1e78fcd9f0badc6 Mon Sep 17 00:00:00 2001 From: Boomslangnz Date: Fri, 10 Jun 2022 15:58:54 +1200 Subject: [PATCH] Forced Spring Effect on Daytona2,Scud and LeMans --- Config/FFBPlugin.ini | 12 ++++++++++++ Game Files/MAMESupermodel.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Config/FFBPlugin.ini b/Config/FFBPlugin.ini index c7aac12..6bcc08f 100644 --- a/Config/FFBPlugin.ini +++ b/Config/FFBPlugin.ini @@ -1161,6 +1161,8 @@ EnableDamperDaytona2=0 DamperStrengthDaytona2=100 FeedbackLengthDaytona2=500 PowerModeDaytona2=0 +EnableForceSpringEffectDaytona2=0 +ForceSpringStrengthDaytona2=80 MinForceDaytona2=0 MaxForceDaytona2=100 AlternativeMinForceLeftDaytona2=0 @@ -1171,6 +1173,8 @@ EnableDamperScud=0 DamperStrengthScud=100 FeedbackLengthScud=500 PowerModeScud=0 +EnableForceSpringEffectScud=0 +ForceSpringStrengthScud=80 MinForceScud=0 MaxForceScud=100 AlternativeMinForceLeftScud=0 @@ -1181,6 +1185,8 @@ EnableDamperLeMans=0 DamperStrengthLeMans=100 FeedbackLengthLeMans=500 PowerModeLeMans=0 +EnableForceSpringEffectLeMans=0 +ForceSpringStrengthLeMans=80 MinForceLeMans=0 MaxForceLeMans=100 AlternativeMinForceLeftLeMans=0 @@ -1230,6 +1236,8 @@ EnableDamperDaytona2=0 DamperStrengthDaytona2=100 FeedbackLengthDaytona2=500 PowerModeDaytona2=0 +EnableForceSpringEffectDaytona2=0 +ForceSpringStrengthDaytona2=80 MinForceDaytona2=0 MaxForceDaytona2=100 AlternativeMinForceLeftDaytona2=0 @@ -1240,6 +1248,8 @@ EnableDamperScud=0 DamperStrengthScud=100 FeedbackLengthScud=500 PowerModeScud=0 +EnableForceSpringEffectScud=0 +ForceSpringStrengthScud=80 MinForceScud=0 MaxForceScud=100 AlternativeMinForceLeftScud=0 @@ -1250,6 +1260,8 @@ EnableDamperLeMans=0 DamperStrengthLeMans=100 FeedbackLengthLeMans=500 PowerModeLeMans=0 +EnableForceSpringEffectLeMans=0 +ForceSpringStrengthLeMans=80 MinForceLeMans=0 MaxForceLeMans=100 AlternativeMinForceLeftLeMans=0 diff --git a/Game Files/MAMESupermodel.cpp b/Game Files/MAMESupermodel.cpp index 022df6b..1796103 100644 --- a/Game Files/MAMESupermodel.cpp +++ b/Game Files/MAMESupermodel.cpp @@ -336,6 +336,8 @@ static int configAlternativeMinForceRightDaytona2 = GetPrivateProfileInt(TEXT("S static int configAlternativeMaxForceRightDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMaxForceRightDaytona2"), 100, settingsFilename); static int configFeedbackLengthDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("FeedbackLengthDaytona2"), 120, settingsFilename); static int PowerModeDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("PowerModeDaytona2"), 0, settingsFilename); +static int EnableForceSpringEffectDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectDaytona2"), 0, settingsFilename); +static int ForceSpringStrengthDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthDaytona2"), 0, settingsFilename); static int EnableDamperDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableDamperDaytona2"), 0, settingsFilename); static int DamperStrengthDaytona2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("DamperStrengthDaytona2"), 100, settingsFilename); @@ -347,6 +349,8 @@ static int configAlternativeMinForceRightScud = GetPrivateProfileInt(TEXT("Setti static int configAlternativeMaxForceRightScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMaxForceRightScud"), 100, settingsFilename); static int configFeedbackLengthScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("FeedbackLengthScud"), 120, settingsFilename); static int PowerModeScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("PowerModeScud"), 0, settingsFilename); +static int EnableForceSpringEffectScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectScud"), 0, settingsFilename); +static int ForceSpringStrengthScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthScud"), 0, settingsFilename); static int EnableDamperScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableDamperScud"), 0, settingsFilename); static int DamperStrengthScud = GetPrivateProfileInt(TEXT("Settings"), TEXT("DamperStrengthScud"), 100, settingsFilename); @@ -358,6 +362,8 @@ static int configAlternativeMinForceRightLeMans = GetPrivateProfileInt(TEXT("Set static int configAlternativeMaxForceRightLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMaxForceRightLeMans"), 100, settingsFilename); static int configFeedbackLengthLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("FeedbackLengthLeMans"), 120, settingsFilename); static int PowerModeLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("PowerModeLeMans"), 0, settingsFilename); +static int EnableForceSpringEffectLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectLeMans"), 0, settingsFilename); +static int ForceSpringStrengthLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthLeMans"), 0, settingsFilename); static int EnableDamperLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableDamperLeMans"), 0, settingsFilename); static int DamperStrengthLeMans = GetPrivateProfileInt(TEXT("Settings"), TEXT("DamperStrengthLeMans"), 100, settingsFilename); @@ -1732,6 +1738,8 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec PowerMode = PowerModeDaytona2; EnableDamper = EnableDamperDaytona2; DamperStrength = DamperStrengthDaytona2; + EnableForceSpringEffect = EnableForceSpringEffectDaytona2; + ForceSpringStrength = ForceSpringStrengthDaytona2; RunningFFB = "Daytona2Active"; } @@ -1748,6 +1756,8 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec PowerMode = PowerModeScud; EnableDamper = EnableDamperScud; DamperStrength = DamperStrengthScud; + EnableForceSpringEffect = EnableForceSpringEffectScud; + ForceSpringStrength = ForceSpringStrengthScud; RunningFFB = "Daytona2Active"; } @@ -1764,6 +1774,8 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec PowerMode = PowerModeLeMans; EnableDamper = EnableDamperLeMans; DamperStrength = DamperStrengthLeMans; + EnableForceSpringEffect = EnableForceSpringEffectLeMans; + ForceSpringStrength = ForceSpringStrengthLeMans; RunningFFB = "Daytona2Active"; }