more small changes...
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: FootMeter.h
|
||||
|
||||
Desc: The song's foot difficulty displayed in SelectSteps.
|
||||
|
||||
Copyright (c) 2001 Chris Danford. All rights reserved.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "FootMeter.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: FootMeter.h
|
||||
|
||||
Desc: The song's foot difficulty displayed in SelectSteps.
|
||||
|
||||
Copyright (c) 2001 Chris Danford. All rights reserved.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _FootBar_H_
|
||||
#define _FootBar_H_
|
||||
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "BitmapText.h"
|
||||
|
||||
|
||||
const int MAX_NUM_FEET = 9;
|
||||
|
||||
|
||||
class FootMeter : public Sprite
|
||||
{
|
||||
public:
|
||||
|
||||
void SetNumFeet( int iNumFeet )
|
||||
{
|
||||
m_iNumFeet = iNumFeet;
|
||||
}
|
||||
|
||||
void Draw()
|
||||
{
|
||||
float fCenterX = GetX();
|
||||
float fCenterY = GetY();
|
||||
float fWidth = GetZoomedWidth() * 0.8f;
|
||||
D3DXCOLOR color = GetColor();
|
||||
|
||||
for( int i=0; i<MAX_NUM_FEET; i++ ) {
|
||||
// set X acording to offset
|
||||
SetX( fCenterX + fWidth * i - fWidth * MAX_NUM_FEET / 2.0f );
|
||||
|
||||
// set color depending on m_iNumFeet
|
||||
if( i < m_iNumFeet )
|
||||
SetColor( color );
|
||||
else
|
||||
SetColor( color * 0.5f + D3DXCOLOR(0,0,0,1) ); // full alpha
|
||||
|
||||
Sprite::Draw();
|
||||
}
|
||||
|
||||
// set properties back to original
|
||||
SetXY( fCenterX, fCenterY );
|
||||
SetColor( color );
|
||||
};
|
||||
|
||||
int m_iNumFeet;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
+17
-15
@@ -47,7 +47,8 @@ const float JUDGEMENT_DISPLAY_TIME = 0.6f;
|
||||
const CString JUDGEMENT_SPRITE = "Sprites\\Judgement.sprite";
|
||||
const float JUDGEMENT_Y = CENTER_Y;
|
||||
|
||||
const CString FONT_COMBO = "Fonts\\Font - Arial Bold numbers 30px.font";
|
||||
|
||||
const CString SEQUENCE_NUMBERS = "SpriteSequences\\Bold Numbers.seq";
|
||||
|
||||
const float COMBO_TWEEN_TIME = 0.5f;
|
||||
const CString COMBO_SPRITE = "Sprites\\Combo.sprite";
|
||||
@@ -194,8 +195,7 @@ Player::Player()
|
||||
// combo
|
||||
m_bComboVisible = FALSE;
|
||||
m_sprCombo.LoadFromSpriteFile( COMBO_SPRITE );
|
||||
m_textComboNum.LoadFromFontName( "Arial Bold" );
|
||||
m_textComboNum.SetText( "" );
|
||||
m_ComboNumber.LoadFromSequenceFile( SEQUENCE_NUMBERS );
|
||||
|
||||
// life meter
|
||||
m_sprLifeMeterFrame.LoadFromSpriteFile( LIFEMETER_FRAME_SPRITE );
|
||||
@@ -203,8 +203,9 @@ Player::Player()
|
||||
|
||||
// score
|
||||
m_sprScoreFrame.LoadFromTexture( SCORE_FRAME_TEXTURE );
|
||||
m_textScoreNum.LoadFromFontName( "Arial Black with Outline" );
|
||||
m_textScoreNum.SetText( " " );
|
||||
m_ScoreNumber.LoadFromSequenceFile( SEQUENCE_NUMBERS );
|
||||
m_ScoreNumber.SetSequence( " " );
|
||||
|
||||
|
||||
|
||||
SetX( CENTER_X );
|
||||
@@ -571,20 +572,20 @@ void Player::SetJudgement( StepScore score )
|
||||
void Player::SetComboX( int iNewX )
|
||||
{
|
||||
m_sprCombo.SetXY( iNewX+40, COMBO_Y );
|
||||
m_textComboNum.SetXY( iNewX-50, COMBO_Y );
|
||||
m_ComboNumber.SetXY( iNewX-50, COMBO_Y );
|
||||
}
|
||||
|
||||
void Player::UpdateCombo( const float &fDeltaTime )
|
||||
{
|
||||
m_sprCombo.Update( fDeltaTime );
|
||||
m_textComboNum.Update( fDeltaTime );
|
||||
m_ComboNumber.Update( fDeltaTime );
|
||||
}
|
||||
|
||||
void Player::DrawCombo()
|
||||
{
|
||||
if( m_bComboVisible )
|
||||
{
|
||||
m_textComboNum.Draw();
|
||||
m_ComboNumber.Draw();
|
||||
m_sprCombo.Draw();
|
||||
}
|
||||
}
|
||||
@@ -606,9 +607,10 @@ void Player::SetCombo( int iNewCombo )
|
||||
{
|
||||
m_bComboVisible = TRUE;
|
||||
|
||||
m_textComboNum.SetText( ssprintf("%d", iNewCombo) );
|
||||
m_textComboNum.SetZoom( 1.0f + iNewCombo/200.0f );
|
||||
m_textComboNum.TweenTo( COMBO_TWEEN_TIME, m_textComboNum.GetX(), m_textComboNum.GetY() );
|
||||
m_ComboNumber.SetSequence( ssprintf("%d", iNewCombo) );
|
||||
m_ComboNumber.SetZoom( 1.0f + iNewCombo/200.0f );
|
||||
//m_ComboNumber.BeginTweening( COMBO_TWEEN_TIME );
|
||||
//m_ComboNumber.SetTweenZoom( 1 );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -683,18 +685,18 @@ void Player::ChangeLife( StepScore score )
|
||||
void Player::SetScoreX( int iNewX )
|
||||
{
|
||||
m_sprScoreFrame.SetXY( iNewX, SCORE_Y );
|
||||
m_textScoreNum.SetXY( iNewX, SCORE_Y );
|
||||
m_ScoreNumber.SetXY( iNewX, SCORE_Y );
|
||||
}
|
||||
|
||||
void Player::UpdateScore( const float &fDeltaTime )
|
||||
{
|
||||
m_sprScoreFrame.Update( fDeltaTime );
|
||||
m_textScoreNum.Update( fDeltaTime );
|
||||
m_ScoreNumber.Update( fDeltaTime );
|
||||
}
|
||||
|
||||
void Player::DrawScore()
|
||||
{
|
||||
m_textScoreNum.Draw();
|
||||
m_ScoreNumber.Draw();
|
||||
m_sprScoreFrame.Draw();
|
||||
}
|
||||
|
||||
@@ -735,5 +737,5 @@ void Player::ChangeScore( StepScore score, int iCurCombo )
|
||||
ASSERT( m_fScore > 0 );
|
||||
|
||||
|
||||
m_textScoreNum.SetText( ssprintf( "%9.0f", m_fScore ) );
|
||||
m_ScoreNumber.SetSequence( ssprintf( "%9.0f", m_fScore ) );
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "GameInfo.h" // for ScoreSummary
|
||||
#include "Steps.h"
|
||||
#include "Sprite.h"
|
||||
#include "BitmapText.h"
|
||||
#include "SpriteSequence.h"
|
||||
|
||||
|
||||
const int MAX_NUM_COLUMNS = 8;
|
||||
@@ -94,7 +94,7 @@ protected:
|
||||
void SetCombo( int iNum );
|
||||
BOOL m_bComboVisible;
|
||||
Sprite m_sprCombo;
|
||||
BitmapText m_textComboNum;
|
||||
SpriteSequence m_ComboNumber;
|
||||
|
||||
// life meter
|
||||
void SetLifeMeterX( int iX );
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
void ChangeScore( StepScore stepscore, int iCurCombo );
|
||||
float m_fScore;
|
||||
Sprite m_sprScoreFrame;
|
||||
BitmapText m_textScoreNum;
|
||||
SpriteSequence m_ScoreNumber;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
D3DXCOLOR Color = D3DXCOLOR(0,0,0,1),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(1,1,1,1) );
|
||||
void SetEffectGlowing( FLOAT fDeltaPercentPerSecond = 2.5,
|
||||
D3DXCOLOR Color = D3DXCOLOR(0.4f,0.4f,0.4f,0),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(1.0f,1.0f,1.0f,0) );
|
||||
D3DXCOLOR Color = D3DXCOLOR(0.2f,0.2f,0.2f,0),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(0.8f,0.8f,0.8f,0) );
|
||||
void SetEffectWagging( FLOAT fWagRadians = 0.2,
|
||||
FLOAT fWagPeriod = 2.0 );
|
||||
void SetEffectSpinning( FLOAT fRadsPerSpeed = 2.0 );
|
||||
|
||||
@@ -308,14 +308,6 @@ SOURCE=.\BlurredTitle.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FootMeter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FootMeter.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GameInfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -368,6 +360,14 @@ SOURCE=.\Sprite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SpriteSequence.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SpriteSequence.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Steps.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
Reference in New Issue
Block a user