2003-02-16 04:01:45 +00:00
|
|
|
#include "global.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-09-05 03:45:07 +00:00
|
|
|
Class: ScoreDisplayOni
|
2002-07-23 01:41:40 +00:00
|
|
|
|
|
|
|
|
Desc: A graphic displayed in the ScoreDisplayOni during Dancing.
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "ScoreDisplayOni.h"
|
|
|
|
|
#include "RageUtil.h"
|
|
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "PrefsManager.h"
|
|
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "GameState.h"
|
2002-11-11 04:53:31 +00:00
|
|
|
#include "ThemeManager.h"
|
2003-12-23 00:26:00 +00:00
|
|
|
#include "StageStats.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
ScoreDisplayOni::ScoreDisplayOni()
|
|
|
|
|
{
|
2002-07-31 19:40:40 +00:00
|
|
|
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
|
2002-07-23 01:41:40 +00:00
|
|
|
|
2003-05-05 06:48:20 +00:00
|
|
|
m_sprFrame.Load( THEME->GetPathToG("ScoreDisplayOni frame") );
|
|
|
|
|
this->AddChild( &m_sprFrame );
|
|
|
|
|
|
2002-07-23 01:41:40 +00:00
|
|
|
// init the text
|
2004-05-30 23:23:39 +00:00
|
|
|
m_text.LoadFromFont( THEME->GetPathToN("ScoreDisplayOni") );
|
2004-03-20 02:59:08 +00:00
|
|
|
m_text.SetShadowLength( 0 );
|
2003-02-25 00:33:42 +00:00
|
|
|
this->AddChild( &m_text );
|
2002-07-23 01:41:40 +00:00
|
|
|
}
|
|
|
|
|
|
2003-02-25 00:33:42 +00:00
|
|
|
void ScoreDisplayOni::Init( PlayerNumber pn )
|
2002-07-23 01:41:40 +00:00
|
|
|
{
|
2003-02-25 00:33:42 +00:00
|
|
|
ScoreDisplay::Init( pn );
|
|
|
|
|
m_text.SetDiffuse( PlayerToColor(pn) );
|
2002-07-23 01:41:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-02-25 00:33:42 +00:00
|
|
|
void ScoreDisplayOni::Update( float fDelta )
|
2002-07-23 01:41:40 +00:00
|
|
|
{
|
2003-02-25 00:33:42 +00:00
|
|
|
ScoreDisplay::Update( fDelta );
|
2002-07-23 01:41:40 +00:00
|
|
|
|
2003-09-27 03:54:31 +00:00
|
|
|
float fSecsIntoPlay = 0;
|
2002-08-01 13:42:56 +00:00
|
|
|
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
2003-12-23 00:26:00 +00:00
|
|
|
fSecsIntoPlay = g_CurStageStats.fAliveSeconds[m_PlayerNumber];
|
2002-07-28 20:28:37 +00:00
|
|
|
|
2004-02-22 19:51:46 +00:00
|
|
|
m_text.SetText( SecondsToMMSSMsMs(fSecsIntoPlay) );
|
2002-07-23 01:41:40 +00:00
|
|
|
}
|