This commit is contained in:
Chris Danford
2004-12-23 23:12:25 +00:00
parent 9032ee0163
commit e01f6ed77e
3 changed files with 13 additions and 9 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ GraphDisplay::GraphDisplay()
}
void GraphDisplay::Load( CString TexturePath, float height )
void GraphDisplay::Load( const CString &TexturePath, float height )
{
m_Position = 1;
memset( m_CurValues, 0, sizeof(m_CurValues) );
@@ -39,11 +39,11 @@ void GraphDisplay::Unload()
m_pTexture = NULL;
}
void GraphDisplay::LoadFromStageStats( const StageStats &s, PlayerNumber pn )
void GraphDisplay::LoadFromStageStats( const PlayerStageStats &s )
{
memcpy( m_LastValues, m_CurValues, sizeof(m_CurValues) );
m_Position = 0;
s.m_player[pn].GetLifeRecord( m_DestValues, VALUE_RESOLUTION );
s.GetLifeRecord( m_DestValues, VALUE_RESOLUTION );
for( unsigned i=0; i<ARRAYSIZE(m_DestValues); i++ )
CLAMP( m_DestValues[i], 0.f, 1.f );
UpdateVerts();
+4 -4
View File
@@ -2,19 +2,19 @@
#define GRAPH_DISPLAY_H
#include "ActorFrame.h"
#include "PlayerNumber.h"
#include "RageTexture.h"
struct StageStats;
struct PlayerStageStats;
class GraphDisplay: public ActorFrame
{
public:
GraphDisplay();
~GraphDisplay() { Unload(); }
void Load( CString TexturePath, float height );
void Load( const CString &TexturePath, float height );
void Unload();
void LoadFromStageStats( const StageStats &s, PlayerNumber pn );
void LoadFromStageStats( const PlayerStageStats &s );
void Update( float fDeltaTime );
void DrawPrimitives();
+6 -2
View File
@@ -119,6 +119,10 @@ void ScreenEvaluation::Init()
GAMESTATE->m_iCurrentStageIndex = 0;
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.ChooseRandomMofifiers();
GAMESTATE->m_pPlayerState[PLAYER_2]->m_PlayerOptions.ChooseRandomMofifiers();
if( rand() % 2 )
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.m_bTransforms[PlayerOptions::TRANSFORM_ECHO] = true; // show "disqualified"
if( rand() % 2 )
GAMESTATE->m_pPlayerState[PLAYER_2]->m_PlayerOptions.m_bTransforms[PlayerOptions::TRANSFORM_ECHO] = true; // show "disqualified"
for( float f = 0; f < 100.0f; f += 1.0f )
{
@@ -449,7 +453,7 @@ void ScreenEvaluation::Init()
m_Graph[p].SetName( ssprintf("GraphP%i",p+1) );
m_Graph[p].Load( THEME->GetPathToG(ssprintf("%s graph p%i",m_sName.c_str(), p+1)), GRAPH_START_HEIGHT );
m_Graph[p].LoadFromStageStats( stageStats, (PlayerNumber)p );
m_Graph[p].LoadFromStageStats( stageStats.m_player[p] );
SET_XY_AND_ON_COMMAND( m_Graph[p] );
this->AddChild( &m_Graph[p] );
}
@@ -460,7 +464,7 @@ void ScreenEvaluation::Init()
FOREACH_EnabledPlayer( p )
{
m_Combo[p].SetName( m_sName, ssprintf("ComboP%i",p+1) );
m_Combo[p].Load( ssprintf("ScreenEvaluationStage combo p%i", p+1), stageStats, (PlayerNumber)p );
m_Combo[p].Load( ssprintf("ScreenEvaluationStage combo p%i", p+1), stageStats, p );
SET_XY_AND_ON_COMMAND( m_Combo[p] );
this->AddChild( &m_Combo[p] );