From a6dd6f4ad77f59f48c511edcca83f5a8c811431b Mon Sep 17 00:00:00 2001 From: FMS-Cat Date: Tue, 20 Oct 2020 01:38:55 +0900 Subject: [PATCH] feat (RateModsAffectFGChanges): add a PREFSMAN RateModsAffectFGChanges --- src/PrefsManager.cpp | 13 ++++++------ src/PrefsManager.h | 50 +++++++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index a8c911c58b..9cb9359ad5 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -190,6 +190,7 @@ PrefsManager::PrefsManager() : m_fLifeDifficultyScale ( "LifeDifficultyScale", 1.0f ), + m_bRateModsAffectTweens ( "RateModsAffectFGChanges", false ), m_iRegenComboAfterMiss ( "RegenComboAfterMiss", 5 ), m_iMaxRegenComboAfterMiss ( "MaxRegenComboAfterMiss", 5 ), // this was 10 by default in SM3.95 -dguzek @@ -276,7 +277,7 @@ PrefsManager::PrefsManager() : m_iRageSoundSampleCountClamp ("RageSoundSampleCountClamp", 0), //some sound drivers mask the sample location number, the most popular number for this is 2^27, this causes lockup after ~50 minutes at 44.1khz sample rate m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 0 ), m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "hard,medium" ), - m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ), + m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ), m_bThreadedInput ( "ThreadedInput", true ), m_bThreadedMovieDecode ( "ThreadedMovieDecode", true ), m_sTestInitialScreen ( "TestInitialScreen", "" ), @@ -546,7 +547,7 @@ RString PrefsManager::GetPreferencesSection() const // lua start #include "LuaBinding.h" -/** @brief Allow Lua to have access to the PrefsManager. */ +/** @brief Allow Lua to have access to the PrefsManager. */ class LunaPrefsManager: public Luna { public: @@ -607,9 +608,9 @@ public: lua_pushboolean( L, true ); return 1; } - + static int SavePreferences( T* p, lua_State *L ) { p->SavePrefsToDisk(); COMMON_RETURN_SELF; } - + LunaPrefsManager() { ADD_METHOD( GetPreference ); @@ -626,7 +627,7 @@ LUA_REGISTER_CLASS( PrefsManager ) /* * (c) 2001-2004 Chris Danford, Chris Gomez * All rights reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -636,7 +637,7 @@ LUA_REGISTER_CLASS( PrefsManager ) * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF diff --git a/src/PrefsManager.h b/src/PrefsManager.h index 5445f06bec..11f1509f6d 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -15,36 +15,36 @@ void ValidateSongsPerPlay( int &val ); const int MAX_SONGS_PER_PLAY = 7; enum MusicWheelUsesSections -{ - MusicWheelUsesSections_NEVER, - MusicWheelUsesSections_ALWAYS, - MusicWheelUsesSections_ABC_ONLY, - NUM_MusicWheelUsesSections, +{ + MusicWheelUsesSections_NEVER, + MusicWheelUsesSections_ALWAYS, + MusicWheelUsesSections_ABC_ONLY, + NUM_MusicWheelUsesSections, MusicWheelUsesSections_Invalid }; /** @brief The options for allowing the W1 timing. */ enum AllowW1 -{ +{ ALLOW_W1_NEVER, /**< The W1 timing is not used. */ ALLOW_W1_COURSES_ONLY, /**< The W1 timing is used for courses only. */ ALLOW_W1_EVERYWHERE, /**< The W1 timing is used for all modes. */ - NUM_AllowW1, + NUM_AllowW1, AllowW1_Invalid }; enum Maybe -{ - Maybe_ASK, - Maybe_NO, - Maybe_YES, - NUM_Maybe, - Maybe_Invalid +{ + Maybe_ASK, + Maybe_NO, + Maybe_YES, + NUM_Maybe, + Maybe_Invalid }; -enum GetRankingName -{ - RANKING_OFF, - RANKING_ON, - RANKING_LIST, - NUM_GetRankingName, +enum GetRankingName +{ + RANKING_OFF, + RANKING_ON, + RANKING_LIST, + NUM_GetRankingName, GetRankingName_Invalid }; enum RandomBackgroundMode @@ -182,6 +182,12 @@ public: Preference m_fLifeDifficultyScale; + /** + * Whether ratemod should affect playback speeds of FGChanges or not. + * Originally introduced in NotITG. + */ + Preference m_bRateModsAffectTweens; + // Whoever added these: Please add a comment saying what they do. -Chris Preference m_iRegenComboAfterMiss; // combo that must be met after a Miss to regen life Preference m_iMaxRegenComboAfterMiss; // caps RegenComboAfterMiss if multiple Misses occur in rapid succession @@ -281,7 +287,7 @@ public: Preference m_sVideoRenderers; // StepMania.cpp sets these on first run based on the card Preference m_bSmoothLines; Preference m_iSoundWriteAhead; - Preference m_iSoundDevice; + Preference m_iSoundDevice; Preference m_iRageSoundSampleCountClamp; Preference m_iSoundPreferredSampleRate; Preference m_sLightsStepsDifficulty; @@ -363,7 +369,7 @@ extern PrefsManager* PREFSMAN; // global and accessible from anywhere in our pro * @author Chris Danford, Chris Gomez (c) 2001-2004 * @section LICENSE * All rights reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -373,7 +379,7 @@ extern PrefsManager* PREFSMAN; // global and accessible from anywhere in our pro * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF