add metric to put timer in stealth mode

This commit is contained in:
Chris Danford
2004-12-04 21:13:29 +00:00
parent e15d1da6b7
commit 6181e142dc
4 changed files with 13 additions and 1 deletions
+3
View File
@@ -94,7 +94,10 @@ void MenuTimer::Update( float fDeltaTime )
} }
if( iNewDisplay <= WARNING_BEEP_START ) if( iNewDisplay <= WARNING_BEEP_START )
{
if( m_soundBeep.IsLoaded() )
m_soundBeep.Play(); m_soundBeep.Play();
}
} }
+5
View File
@@ -136,6 +136,11 @@ void RageSound::Unload()
databuf.clear(); databuf.clear();
} }
bool RageSound::IsLoaded()
{
return Sample != NULL;
}
void RageSound::Fail(CString reason) void RageSound::Fail(CString reason)
{ {
LOG->Warn("Decoding %s failed: %s", GetLoadedFilePath().c_str(), reason.c_str() ); LOG->Warn("Decoding %s failed: %s", GetLoadedFilePath().c_str(), reason.c_str() );
+1
View File
@@ -97,6 +97,7 @@ public:
* be set up only if needed. Doesn't fail. */ * be set up only if needed. Doesn't fail. */
void LoadSoundReader( SoundReader *pSound ); void LoadSoundReader( SoundReader *pSound );
void Unload(); void Unload();
bool IsLoaded();
void StartPlaying(); void StartPlaying();
void StopPlaying(); void StopPlaying();
+3
View File
@@ -10,6 +10,7 @@
#include "ScreenManager.h" #include "ScreenManager.h"
#define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds") #define TIMER_SECONDS THEME->GetMetricI(m_sName,"TimerSeconds")
#define TIMER_STEALTH THEME->GetMetricB(m_sName,"TimerStealth")
#define STYLE_ICON THEME->GetMetricB(m_sName,"StyleIcon") #define STYLE_ICON THEME->GetMetricB(m_sName,"StyleIcon")
#define MEMORY_CARD_ICONS THEME->GetMetricB(m_sName,"MemoryCardIcons") #define MEMORY_CARD_ICONS THEME->GetMetricB(m_sName,"MemoryCardIcons")
@@ -65,6 +66,8 @@ ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( s
if( m_bTimerEnabled ) if( m_bTimerEnabled )
{ {
m_MenuTimer->SetName( "Timer" ); m_MenuTimer->SetName( "Timer" );
if( TIMER_STEALTH )
m_MenuTimer->EnableStealth( true );
UtilSetXY( m_MenuTimer, m_sName ); UtilSetXY( m_MenuTimer, m_sName );
UtilOnCommand( m_MenuTimer, m_sName ); UtilOnCommand( m_MenuTimer, m_sName );
ResetTimer(); ResetTimer();