2003-02-16 04:01:45 +00:00
|
|
|
#include "global.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#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
|
|
|
}
|
2004-06-08 00:08:04 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2004 Chris Danford
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|