Add new preference: DefaultGroupOffsetSeconds to dictate the default sync bias on the machine when no group.ini is present (or if there is no SyncOffset field in said file).
- Generally Supports either ITG (9ms) or NULL (0ms). - Alternatively, one could edit the preference manually to put a different value - Name/Description probably worth ironing out
This commit is contained in:
+9
-7
@@ -43,7 +43,7 @@ Group::Group(const RString sDir, const RString &sGroupDirName) {
|
||||
RString Series = "";
|
||||
RString bannerPath = "";
|
||||
RString authorsNotes = "";
|
||||
float fOffset = 0;
|
||||
float fOffset = PREFSMAN->m_fDefaultGroupOffsetSeconds;
|
||||
|
||||
if (FILEMAN->DoesFileExist(sGroupIniPath)) {
|
||||
IniFile ini;
|
||||
@@ -65,12 +65,14 @@ Group::Group(const RString sDir, const RString &sGroupDirName) {
|
||||
RString sValue = "";
|
||||
|
||||
ini.GetValue("Group", "SyncOffset", sValue);
|
||||
if (sValue.CompareNoCase("null") == 0) {
|
||||
fOffset = 0;
|
||||
} else if (sValue.CompareNoCase("itg") == 0) {
|
||||
fOffset = 0.009f;
|
||||
} else {
|
||||
fOffset = StringToFloat(sValue);
|
||||
if (!sValue.empty()) {
|
||||
if (sValue.CompareNoCase("null") == 0) {
|
||||
fOffset = 0.0f;
|
||||
} else if (sValue.CompareNoCase("itg") == 0) {
|
||||
fOffset = 0.009f;
|
||||
} else {
|
||||
fOffset = StringToFloat(sValue);
|
||||
}
|
||||
}
|
||||
ini.GetValue("Group", "Year", m_iYearReleased);
|
||||
ini.GetValue( "Group", "Credits", credits );
|
||||
|
||||
@@ -237,6 +237,7 @@ PrefsManager::PrefsManager() :
|
||||
m_ShowDancingCharacters ( "ShowDancingCharacters", SDC_Random ),
|
||||
m_bUseUnlockSystem ( "UseUnlockSystem", false ),
|
||||
m_fGlobalOffsetSeconds ( "GlobalOffsetSeconds", -0.008f ),
|
||||
m_fDefaultGroupOffsetSeconds ( "DefaultGroupOffsetSeconds", 0.0f ),
|
||||
m_iProgressiveLifebar ( "ProgressiveLifebar", 0 ),
|
||||
m_iProgressiveStageLifebar ( "ProgressiveStageLifebar", 0 ),
|
||||
m_iProgressiveNonstopLifebar ( "ProgressiveNonstopLifebar", 0 ),
|
||||
|
||||
@@ -240,6 +240,7 @@ public:
|
||||
Preference<ShowDancingCharacters> m_ShowDancingCharacters;
|
||||
Preference<bool> m_bUseUnlockSystem;
|
||||
Preference<float> m_fGlobalOffsetSeconds;
|
||||
Preference<float> m_fDefaultGroupOffsetSeconds;
|
||||
Preference<int> m_iProgressiveLifebar;
|
||||
Preference<int> m_iProgressiveStageLifebar;
|
||||
Preference<int> m_iProgressiveNonstopLifebar;
|
||||
|
||||
@@ -710,6 +710,12 @@ static void GlobalOffsetSeconds( int &sel, bool ToSel, const ConfOption *pConfOp
|
||||
MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) );
|
||||
}
|
||||
|
||||
static void DefaultGroupOffsetSeconds( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const float mapping[] = { 0.0f, 0.009f };
|
||||
MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) );
|
||||
}
|
||||
|
||||
static void EditRecordModeLeadIn(int &sel, bool to_sel, const ConfOption* conf_option)
|
||||
{
|
||||
float mapping[32];
|
||||
@@ -941,6 +947,7 @@ static void InitializeConfOptions()
|
||||
c.AddOption( ssprintf("%+i ms", i) );
|
||||
ADD( c );
|
||||
}
|
||||
ADD( ConfOption( "DefaultGroupOffsetSeconds", DefaultGroupOffsetSeconds, "Null","|ITG" ) );
|
||||
ADD( ConfOption( "EnableAttackSounds", MovePref<bool>, "No","Yes" ) );
|
||||
ADD( ConfOption( "EnableMineHitSound", MovePref<bool>, "No","Yes" ) );
|
||||
ADD( ConfOption( "RateModPreservesPitch", MovePref<bool>, "No","Yes") );
|
||||
|
||||
@@ -418,8 +418,6 @@ void SongManager::LoadSongDir( RString sDir, LoadingWindow *ld, bool onlyAdditio
|
||||
const std::vector<Steps*>& vpSteps = pNewSong->GetAllSteps();
|
||||
for (Steps* s : vpSteps)
|
||||
{
|
||||
// Empty TimingData means it's inherited
|
||||
// from the song and is already changed.
|
||||
if( s->m_Timing.empty() )
|
||||
continue;
|
||||
s->m_Timing.m_fBeat0GroupOffsetInSeconds = group->GetSyncOffset();
|
||||
|
||||
Reference in New Issue
Block a user