diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 64f0bacbd3..e244fe11f2 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,6 +10,8 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/16 ---------- +* [ProfileManager] Added ProfileWasLoadedFromMemoryCard(PlayerNumber) + Lua binding. [AJ] * Added #FAKES to the SSC format. Similar to the fake arrows, these blocks prevent all judgments within the range. [Wolfman2000] * Changed the syntax of #WARPS slightly. Now the second value is the relative @@ -18,6 +20,9 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/15 ---------- +* [ScreenGameplay] Removed hardcoded commands for Debug (give up text) and + replace them with DebugStartOnCommand, DebugBackOnCommand, and + DebugTweenOffCommand. [AJ] * Added #SPEEDS to the SSC format. This multiplies your scrolling speed during gameplay, not replaces it (see mod attacks for replacing). [Wolfman2000] diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 1e519bf91c..bf0978bca6 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -1626,12 +1626,11 @@ - - Return the Edit Local or nil if - it does not exist. + Return the Edit Local (during Profile editing) + or nil if it does not exist. - + Returns the ID of the Edit Local (during Profile editing). Return the source for the editor or nil diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index d5abd2703b..c4dd4b0bd6 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3217,6 +3217,9 @@ SongOptionsOffCommand= DebugX=SCREEN_CENTER_X DebugY=SCREEN_BOTTOM-72 DebugOnCommand=zoom,0.75 +DebugStartOnCommand=stoptweening;diffusealpha,0;linear,1/8;diffusealpha,1 +DebugBackOnCommand=stoptweening;diffusealpha,0;linear,1/8;diffusealpha,1 +DebugTweenOffCommand=stoptweening;linear,1/8;diffusealpha,0 # SongNumberFormat="%d" SongNumberP1X=THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") - 60 diff --git a/src/OptionsCursor.cpp b/src/OptionsCursor.cpp index a18ce96750..b1a69a8c14 100644 --- a/src/OptionsCursor.cpp +++ b/src/OptionsCursor.cpp @@ -24,7 +24,7 @@ OptionsCursor::OptionsCursor( const OptionsCursor &cpy ): m_iOriginalCanGoLeftX( cpy.m_iOriginalCanGoLeftX ), m_iOriginalCanGoRightX( cpy.m_iOriginalCanGoRightX ) { - /* Re-add children, or m_SubActors will point to cpy's children and not our own. */ + // Re-add children, or m_SubActors will point to cpy's children and not our own. m_SubActors.clear(); this->AddChild( m_sprMiddle ); this->AddChild( m_sprLeft ); diff --git a/src/OptionsCursor.h b/src/OptionsCursor.h index cf27850d4e..9f0652fe24 100644 --- a/src/OptionsCursor.h +++ b/src/OptionsCursor.h @@ -28,11 +28,11 @@ protected: AutoActor m_sprMiddle; AutoActor m_sprLeft; AutoActor m_sprRight; - + AutoActor m_sprCanGoLeft; AutoActor m_sprCanGoRight; - // save the metrics-set X because it gets oblitterated on a call to SetBarWidth + // save the metrics-set X because it gets obliterated on a call to SetBarWidth int m_iOriginalLeftX; int m_iOriginalRightX; int m_iOriginalCanGoLeftX; diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index 812db73a8c..39821a75e1 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -833,6 +833,7 @@ public: static int GetNumLocalProfiles( T* p, lua_State *L ) { lua_pushnumber(L, p->GetNumLocalProfiles() ); return 1; } static int GetProfileDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetProfileDir(Enum::Check(L, 1)) ); return 1; } static int IsSongNew( T* p, lua_State *L ) { lua_pushboolean(L, p->IsSongNew(Luna::check(L,1)) ); return 1; } + static int ProfileWasLoadedFromMemoryCard( T* p, lua_State *L ) { lua_pushboolean(L, p->ProfileWasLoadedFromMemoryCard(Enum::Check(L, 1)) ); return 1; } LunaProfileManager() { @@ -847,6 +848,7 @@ public: ADD_METHOD( GetNumLocalProfiles ); ADD_METHOD( GetProfileDir ); ADD_METHOD( IsSongNew ); + ADD_METHOD( ProfileWasLoadedFromMemoryCard ); } }; diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index fd7600be36..231047f933 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -2156,11 +2156,7 @@ void ScreenGameplay::Input( const InputEventPlus &input ) else if( input.type==IET_FIRST_PRESS && m_GiveUpTimer.IsZero() ) { m_textDebug.SetText( GIVE_UP_START_TEXT ); - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,1) ); + m_textDebug.PlayCommand( "StartOn" ); m_GiveUpTimer.Touch(); // start the timer } @@ -2187,18 +2183,11 @@ void ScreenGameplay::Input( const InputEventPlus &input ) else if( PREFSMAN->m_bDelayedBack && input.type==IET_FIRST_PRESS ) { m_textDebug.SetText( GIVE_UP_BACK_TEXT ); - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,1) ); + m_textDebug.PlayCommand( "BackOn" ); } else if( PREFSMAN->m_bDelayedBack && input.type==IET_RELEASE ) { - // todo: un-hardcode commands and move to metrics -aj - m_textDebug.StopTweening(); - m_textDebug.BeginTweening( 1/8.f ); - m_textDebug.SetDiffuse( RageColor(1,1,1,0) ); + m_textDebug.PlayCommand( "TweenOff" ); } return; diff --git a/src/ScreenHowToPlay.cpp b/src/ScreenHowToPlay.cpp index 21aeef437b..81e8d73d6b 100644 --- a/src/ScreenHowToPlay.cpp +++ b/src/ScreenHowToPlay.cpp @@ -144,8 +144,7 @@ void ScreenHowToPlay::Init() const Style* pStyle = GAMESTATE->GetCurrentStyle(); Steps *pSteps = SongUtil::GetStepsByDescription( &m_Song, pStyle->m_StepsType, "" ); - // todo: make StepsType human readable. -aj - ASSERT_M( pSteps != NULL, "No playable steps for ScreenHowToPlay" ); + ASSERT_M( pSteps != NULL, ssprintf("No playable steps of StepsType '%s' for ScreenHowToPlay", StringConversion::ToString(pStyle->m_StepsType).c_str()) ); NoteData tempNoteData; pSteps->GetNoteData( tempNoteData ); diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index 6ef345ceaf..347ecf041d 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -181,7 +181,7 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption ) sel = 0; for(unsigned i = 0; i < choices.size(); ++i) - if( !choices[i].EqualsNoCase(sCurGameName) ) + if( !stricmp(choices[i], sCurGameName) ) sel = i; } else { vector aGames; @@ -222,12 +222,12 @@ static void Language( int &sel, bool ToSel, const ConfOption *pConfOption ) { sel = -1; for( unsigned i=0; sel == -1 && i < vs.size(); ++i ) - if( !vs[i].EqualsNoCase(THEME->GetCurLanguage()) ) + if( !stricmp(vs[i], THEME->GetCurLanguage()) ) sel = i; // If the current language doesn't exist, we'll show BASE_LANGUAGE, so select that. for( unsigned i=0; sel == -1 && i < vs.size(); ++i ) - if( !vs[i].EqualsNoCase(SpecialFiles::BASE_LANGUAGE) ) + if( !stricmp(vs[i], SpecialFiles::BASE_LANGUAGE) ) sel = i; if( sel == -1 ) @@ -276,7 +276,7 @@ static void RequestedTheme( int &sel, bool ToSel, const ConfOption *pConfOption { sel = 0; for( unsigned i=1; im_sTheme.Get()) ) + if( !stricmp(vsThemeNames[i], PREFSMAN->m_sTheme.Get()) ) sel = i; } else @@ -302,7 +302,7 @@ static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption ) { sel = 0; for( unsigned i=1; iGetCurAnnouncerName()) ) + if( !stricmp(choices[i], ANNOUNCER->GetCurAnnouncerName()) ) sel = i; } else @@ -329,7 +329,7 @@ static void DefaultNoteSkin( int &sel, bool ToSel, const ConfOption *pConfOption po.FromString( PREFSMAN->m_sDefaultModifiers ); sel = 0; for( unsigned i=0; i < choices.size(); i++ ) - if( !choices[i].EqualsNoCase(po.m_sNoteSkin) ) + if( !stricmp(choices[i], po.m_sNoteSkin) ) sel = i; } else