+ Oldschool behavior for BPMSegment loading ( Just In Case )
+ WIP Preference for DefaultFailType
This commit is contained in:
+16
-6
@@ -129,6 +129,9 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
const float fFreezeBeat = StringToFloat( arrayFreezeValues[0] );
|
||||
const float fFreezeSeconds = StringToFloat( arrayFreezeValues[1] );
|
||||
StopSegment new_seg( BeatToNoteRow(fFreezeBeat), fFreezeSeconds );
|
||||
// XXX: Remove Negatives Bug?
|
||||
new_seg.m_iStartRow = BeatToNoteRow(fFreezeBeat);
|
||||
new_seg.m_fStopSeconds = fFreezeSeconds;
|
||||
|
||||
if(fFreezeSeconds > 0.0f)
|
||||
{
|
||||
@@ -169,7 +172,10 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
const float fFreezeSeconds = StringToFloat( arrayDelayValues[1] );
|
||||
|
||||
StopSegment new_seg( BeatToNoteRow(fFreezeBeat), fFreezeSeconds, true );
|
||||
|
||||
// XXX: Remove Negatives Bug?
|
||||
new_seg.m_iStartRow = BeatToNoteRow(fFreezeBeat);
|
||||
new_seg.m_fStopSeconds = fFreezeSeconds;
|
||||
|
||||
// LOG->Trace( "Adding a delay segment: beat: %f, seconds = %f", new_seg.m_fStartBeat, new_seg.m_fStopSeconds );
|
||||
|
||||
if(fFreezeSeconds > 0.0f)
|
||||
@@ -198,7 +204,11 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
|
||||
const float fBeat = StringToFloat( arrayBPMChangeValues[0] );
|
||||
const float fNewBPM = StringToFloat( arrayBPMChangeValues[1] );
|
||||
|
||||
// XXX: Remove Negatives Bug?
|
||||
BPMSegment new_seg;
|
||||
new_seg.m_iStartRow = BeatToNoteRow(fBeat);
|
||||
new_seg.SetBPM( fNewBPM );
|
||||
|
||||
// convert negative BPMs into Warp segments
|
||||
if( fNewBPM < 0.0f )
|
||||
{
|
||||
@@ -239,25 +249,25 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
|
||||
);
|
||||
*/
|
||||
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(fBeat), fNewBPM) );
|
||||
out.AddBPMSegment( new_seg );
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// last BPM is a negative one? ugh. -aj (MAX_NOTE_ROW exists btw)
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(fBeat), fNewBPM) );
|
||||
out.AddBPMSegment( new_seg );
|
||||
}
|
||||
}
|
||||
|
||||
if(fNewBPM > 0.0f)
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(fBeat), fNewBPM) );
|
||||
out.AddBPMSegment( new_seg );
|
||||
else
|
||||
{
|
||||
out.m_bHasNegativeBpms = true;
|
||||
// only add Negative BPMs in quirks mode -aj
|
||||
if( PREFSMAN->m_bQuirksMode )
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(fBeat), fNewBPM) );
|
||||
out.AddBPMSegment( new_seg );
|
||||
else
|
||||
LOG->UserLog( "Song file", "(UNKNOWN)", "has an invalid BPM change at beat %f, BPM %f.", fBeat, fNewBPM );
|
||||
}
|
||||
|
||||
@@ -134,6 +134,17 @@ XToString( ScoringType );
|
||||
StringToX( ScoringType );
|
||||
LuaXType( ScoringType );
|
||||
|
||||
// XXX: Fix fail bug?
|
||||
/* static const char *DefaultFailTypeNames[] = {
|
||||
"Immediate",
|
||||
"ImmediateContinue",
|
||||
"EndOfSong",
|
||||
"Off",
|
||||
};
|
||||
XToString( DefualtFailType );
|
||||
StringToX( DefualtFailType );
|
||||
LuaXType( DefualtFailType ); */
|
||||
|
||||
bool g_bAutoRestart = false;
|
||||
#ifdef DEBUG
|
||||
# define TRUE_IF_DEBUG true
|
||||
|
||||
@@ -115,6 +115,16 @@ enum ScoringType
|
||||
ScoringType_Invalid
|
||||
};
|
||||
|
||||
enum DefaultFailType
|
||||
{
|
||||
FAIL_IMMEDIATE,
|
||||
FAIL_IMMEDIATECONTINUE,
|
||||
FAIL_ENDOFSONG,
|
||||
FAIL_OFF,
|
||||
NUM_DefaultFailType,
|
||||
DefaultFailType_Invalid
|
||||
};
|
||||
|
||||
class PrefsManager
|
||||
{
|
||||
public:
|
||||
@@ -279,6 +289,7 @@ public:
|
||||
Preference<RString> m_sCoursesToShowRanking;
|
||||
|
||||
Preference<bool> m_bQuirksMode; // enable quirky behavior desired by users of microsoft stepmania explorer 6.9
|
||||
// Preference<RString> m_sDefaultFailType; // XXX: Fix fail bug?
|
||||
|
||||
// Debug:
|
||||
Preference<bool> m_bLogToDisk;
|
||||
|
||||
@@ -721,7 +721,7 @@ static void InitializeConfOptions()
|
||||
ADD( ConfOption( "ProgressiveLifebar", MovePref<int>, "Off","|1","|2","|3","|4","|5","|6","|7","|8") );
|
||||
ADD( ConfOption( "ProgressiveStageLifebar", MovePref<int>, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "ProgressiveNonstopLifebar", MovePref<int>, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "DefaultFailType", DefaultFailType, "Immediate","ImmediateContinue","End of Song","Off" ) );
|
||||
ADD( ConfOption( "DefaultFailType", DefaultFailType, "Immediate","ImmediateContinue","EndOfSong","Off" ) );
|
||||
ADD( ConfOption( "CoinsPerCredit", CoinsPerCredit, "|1","|2","|3","|4","|5","|6","|7","|8","|9","|10","|11","|12","|13","|14","|15","|16" ) );
|
||||
ADD( ConfOption( "Premium", MovePref<Premium>, "Off","Double for 1 Credit","2 Players for 1 Credit" ) );
|
||||
ADD( ConfOption( "JointPremium", JointPremium, "Off","2 Players for 1 Credit" ) );
|
||||
|
||||
Reference in New Issue
Block a user