Added some metrics to unlock screen (animations for unlock icons, mainly, as well as "seconds to display")

Fixed bug with roulette seeds (selecting a song that does not exist in unlock database caused a crash upon selecting a song)
This commit is contained in:
Andrew Wong
2003-07-10 07:22:31 +00:00
parent da81d1aebd
commit 987f152891
4 changed files with 17 additions and 4 deletions
+12 -1
View File
@@ -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") );
}
+1 -1
View File
@@ -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"
+3 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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,