diff --git a/stepmania/src/ScreenUnlock.cpp b/stepmania/src/ScreenUnlock.cpp index 744b6026f7..84c6d714e3 100644 --- a/stepmania/src/ScreenUnlock.cpp +++ b/stepmania/src/ScreenUnlock.cpp @@ -5,7 +5,7 @@ Desc: See header. Copyright (c) 2003 by the person(s) listed below. All rights reserved. - curewater + Andrew Wong ----------------------------------------------------------------------------- */ @@ -29,6 +29,9 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") CString sSP = ssprintf( "%d", (int)GAMESTATE->m_pUnlockingSys->SongPointsUntilNextUnlock() ); CString PointDisplay = THEME->GetMetric("ScreenUnlock", "TypeOfPointsToDisplay"); + + CString IconCommand = + THEME->GetMetric("ScreenUnlock", "UnlockIconCommand"); for(int i=1; i <= THEME->GetMetricI("ScreenUnlock", "NumUnlocks"); i++) { @@ -42,6 +45,8 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") if( pSong == NULL ) continue; + Unlocks[i].Command(IconCommand); + const bool SongIsLocked = GAMESTATE->m_pUnlockingSys->SongIsLocked( pSong ); if ( !SongIsLocked ) this->AddChild(&Unlocks[i]); @@ -65,4 +70,10 @@ ScreenUnlock::ScreenUnlock() : ScreenAttract("ScreenUnlock") PointsUntilNextUnlock.SetZoom( THEME->GetMetricF("ScreenUnlock","PointsZoom") ); SET_XY( PointsUntilNextUnlock ); this->AddChild( &PointsUntilNextUnlock ); + + this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow + + this->PostScreenMessage( SM_BeginFadingOut, + THEME->GetMetricI("ScreenUnlock", "TimeToDisplay") ); + } diff --git a/stepmania/src/ScreenUnlock.h b/stepmania/src/ScreenUnlock.h index b7bcdd73f2..a3dc9bc807 100644 --- a/stepmania/src/ScreenUnlock.h +++ b/stepmania/src/ScreenUnlock.h @@ -6,7 +6,7 @@ Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford - curewater + Andrew Wong ----------------------------------------------------------------------------- */ #include "ScreenAttract.h" diff --git a/stepmania/src/UnlockSystem.cpp b/stepmania/src/UnlockSystem.cpp index 3cf7bcb0ef..6b5346265e 100644 --- a/stepmania/src/UnlockSystem.cpp +++ b/stepmania/src/UnlockSystem.cpp @@ -6,7 +6,7 @@ Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved. Kevin Slaughter - curewater + Andrew Wong ----------------------------------------------------------------------------- */ @@ -31,9 +31,11 @@ UnlockSystem::UnlockSystem() bool UnlockSystem::RouletteUnlock( const Song *song ) { SongEntry *p = FindSong( song ); + if (!p) return false; // does not exist if (p->m_iRouletteSeed == 0) return false; // already unlocked PREFSMAN->m_RouletteSeeds[p->m_iRouletteSeed] = '1'; + PREFSMAN->SaveGamePrefsToDisk(); return true; } diff --git a/stepmania/src/UnlockSystem.h b/stepmania/src/UnlockSystem.h index 7e910197b7..533a524145 100644 --- a/stepmania/src/UnlockSystem.h +++ b/stepmania/src/UnlockSystem.h @@ -10,7 +10,7 @@ Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved. Kevin Slaughter - curewater + Andrew Wong ----------------------------------------------------------------------------- */ enum UnlockTypes { UNLOCK_AP, UNLOCK_DP, UNLOCK_SP,