From 94e19ae4082af67378e6b7d5458ef8f0a971d678 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 25 Feb 2006 00:08:55 +0000 Subject: [PATCH] cleanup --- stepmania/src/SongOptions.cpp | 18 +++++++++--------- stepmania/src/Steps.cpp | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/stepmania/src/SongOptions.cpp b/stepmania/src/SongOptions.cpp index bb85a08caf..78294d6d5f 100644 --- a/stepmania/src/SongOptions.cpp +++ b/stepmania/src/SongOptions.cpp @@ -43,7 +43,7 @@ void SongOptions::GetMods( vector &AddTo ) const case FAIL_IMMEDIATE: break; case FAIL_END_OF_SONG: AddTo.push_back("FailEndOfSong"); break; case FAIL_OFF: AddTo.push_back("FailOff"); break; - default: ASSERT(0); + default: ASSERT(0); } if( m_fMusicRate != 1 ) @@ -56,10 +56,10 @@ void SongOptions::GetMods( vector &AddTo ) const switch( m_AutosyncType ) { - case AUTOSYNC_OFF: break; + case AUTOSYNC_OFF: break; case AUTOSYNC_SONG: AddTo.push_back("AutosyncSong"); break; case AUTOSYNC_MACHINE: AddTo.push_back("AutosyncMachine"); break; - default: ASSERT(0); + default: ASSERT(0); } } @@ -132,13 +132,13 @@ void SongOptions::FromString( const RString &sOptions ) on = false; } - if( sBit == "norecover" ) m_DrainType = DRAIN_NO_RECOVER; + if( sBit == "norecover" ) m_DrainType = DRAIN_NO_RECOVER; else if( sBit == "suddendeath" ) m_DrainType = DRAIN_SUDDEN_DEATH; else if( sBit == "power-drop" ) m_DrainType = DRAIN_NO_RECOVER; - else if( sBit == "death" ) m_DrainType = DRAIN_SUDDEN_DEATH; + else if( sBit == "death" ) m_DrainType = DRAIN_SUDDEN_DEATH; else if( sBit == "normal-drain" ) m_DrainType = DRAIN_NORMAL; else if( sBit == "failarcade" || - sBit == "failimmediate" ) m_FailType = FAIL_IMMEDIATE; + sBit == "failimmediate" ) m_FailType = FAIL_IMMEDIATE; else if( sBit == "failendofsong" ) m_FailType = FAIL_END_OF_SONG; else if( sBit == "failoff" ) m_FailType = FAIL_OFF; @@ -151,11 +151,11 @@ void SongOptions::FromString( const RString &sOptions ) else if( sBit == "assisttick" ) m_bAssistTick = on; else if( sBit == "autosync" || sBit == "autosyncsong" ) - m_AutosyncType = on ? AUTOSYNC_SONG : AUTOSYNC_OFF; + m_AutosyncType = on ? AUTOSYNC_SONG : AUTOSYNC_OFF; else if( sBit == "autosyncmachine" ) - m_AutosyncType = on ? AUTOSYNC_MACHINE : AUTOSYNC_OFF; + m_AutosyncType = on ? AUTOSYNC_MACHINE : AUTOSYNC_OFF; else if( sBit == "savescore" ) m_bSaveScore = on; - else if( sBit == "bar" ) m_LifeType = LIFE_BAR; + else if( sBit == "bar" ) m_LifeType = LIFE_BAR; else if( sBit == "battery" ) m_LifeType = LIFE_BATTERY; else if( sBit == "lifetime" ) m_LifeType = LIFE_TIME; } diff --git a/stepmania/src/Steps.cpp b/stepmania/src/Steps.cpp index fc2196a114..da07cbc2b6 100644 --- a/stepmania/src/Steps.cpp +++ b/stepmania/src/Steps.cpp @@ -134,10 +134,10 @@ void Steps::TidyUpData() if( GetDifficulty() == DIFFICULTY_INVALID ) { - if( GetMeter() == 1 ) SetDifficulty( DIFFICULTY_BEGINNER ); + if( GetMeter() == 1 ) SetDifficulty( DIFFICULTY_BEGINNER ); else if( GetMeter() <= 3 ) SetDifficulty( DIFFICULTY_EASY ); else if( GetMeter() <= 6 ) SetDifficulty( DIFFICULTY_MEDIUM ); - else SetDifficulty( DIFFICULTY_HARD ); + else SetDifficulty( DIFFICULTY_HARD ); } if( GetMeter() < 1) // meter is invalid @@ -270,10 +270,10 @@ void Steps::DeAutogen() Decompress(); // fills in m_pNoteData with sliding window transform - m_sDescription = Real()->m_sDescription; - m_Difficulty = Real()->m_Difficulty; + m_sDescription = Real()->m_sDescription; + m_Difficulty = Real()->m_Difficulty; m_iMeter = Real()->m_iMeter; - m_CachedRadarValues = Real()->m_CachedRadarValues; + m_CachedRadarValues = Real()->m_CachedRadarValues; parent = NULL; @@ -363,7 +363,7 @@ public: static int GetStepsType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_StepsType ); return 1; } static int GetDifficulty( T* p, lua_State *L ) { lua_pushnumber(L, p->GetDifficulty() ); return 1; } static int GetDescription( T* p, lua_State *L ) { lua_pushstring(L, p->GetDescription() ); return 1; } - static int GetMeter( T* p, lua_State *L ) { lua_pushnumber(L, p->GetMeter() ); return 1; } + static int GetMeter( T* p, lua_State *L ) { lua_pushnumber(L, p->GetMeter() ); return 1; } static int GetFilename( T* p, lua_State *L ) { lua_pushstring(L, p->GetFilename() ); return 1; } static void Register(lua_State *L)