big checkin - new noteskin format and XY positioning. I probably broke a lot of things.

This commit is contained in:
Chris Danford
2002-08-13 23:26:46 +00:00
parent 9346564080
commit 7c1bfb3a0d
133 changed files with 4813 additions and 2626 deletions
+7 -12
View File
@@ -16,18 +16,13 @@
#include "RageTimer.h"
#include "GameState.h"
const int NUM_LIFE_STREAM_SECTIONS = 3;
const float LIFE_STREAM_SECTION_WIDTH = 1.0f/NUM_LIFE_STREAM_SECTIONS;
const float METER_WIDTH = 258;
const float METER_HEIGHT = 20;
const float DANGER_THRESHOLD = 0.4f;
#define METER_WIDTH THEME->GetMetricF("LifeMeterBar","MeterWidth")
#define METER_HEIGHT THEME->GetMetricF("LifeMeterBar","MeterHeight")
#define DANGER_THRESHOLD THEME->GetMetricF("LifeMeterBar","DangerThreshold")
const float FAIL_THRESHOLD = 0;
LifeMeterBar::LifeMeterBar()
{
switch( GAMESTATE->m_SongOptions.m_DrainType )
@@ -48,13 +43,13 @@ LifeMeterBar::LifeMeterBar()
m_quadBlackBackground.SetZoomY( METER_HEIGHT );
m_frame.AddSubActor( &m_quadBlackBackground );
m_sprStreamNormal.Load( THEME->GetPathTo(GRAPHIC_GAMEPLAY_LIFEMETER_STREAM_NORMAL) );
m_sprStreamNormal.Load( THEME->GetPathTo("Graphics","gameplay lifemeter stream normal") );
m_frame.AddSubActor( &m_sprStreamNormal );
m_sprStreamHot.Load( THEME->GetPathTo(GRAPHIC_GAMEPLAY_LIFEMETER_STREAM_HOT) );
m_sprStreamHot.Load( THEME->GetPathTo("Graphics","gameplay lifemeter stream hot") );
m_frame.AddSubActor( &m_sprStreamHot );
m_sprFrame.Load( THEME->GetPathTo(GRAPHIC_GAMEPLAY_LIFEMETER_BAR) );
m_sprFrame.Load( THEME->GetPathTo("Graphics","gameplay lifemeter bar") );
m_frame.AddSubActor( &m_sprFrame );
this->AddSubActor( &m_frame );
@@ -199,7 +194,7 @@ void LifeMeterBar::Update( float fDeltaTime )
void LifeMeterBar::DrawPrimitives()
{
float fPercentRed = IsInDanger() ? sinf( TIMER->GetTimeSinceStart()*D3DX_PI*4 )/2+0.5f : 0;
float fPercentRed = (m_fTrailingLifePercentage<DANGER_THRESHOLD) ? sinf( TIMER->GetTimeSinceStart()*D3DX_PI*4 )/2+0.5f : 0;
m_quadBlackBackground.SetDiffuseColor( D3DXCOLOR(fPercentRed*0.8f,0,0,1) );
if( !GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )