Major rewrite of all classes related to gameplay (Song, Steps, Player,
WindowDancing and all its UI elements). All of the dancing UI elements have been consolidated into the Player class, which simplifies things a great deal. Steps and the classes that use them have been generalized to use a variable number of panels (6 panel, 8 panel). Only a little more work is needed on the ColorArrows portion of Player to fully support these panel modes.
This commit is contained in:
@@ -1,83 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: Combo.cpp
|
||||
//
|
||||
// Desc: Combo counter that displays while dancing.
|
||||
//
|
||||
// Copyright (c) 2001 Chris Danford. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "Combo.h"
|
||||
|
||||
|
||||
#define CENTER_X 320
|
||||
#define CENTER_Y 240
|
||||
|
||||
|
||||
#define FONT "Fonts\\Font - Arial Bold numbers 30px.font"
|
||||
|
||||
#define COMBO_TWEEN_TIME 0.5f
|
||||
#define COMBO_SPRITE "Sprites\\Combo.sprite"
|
||||
#define COMBO_Y (CENTER_Y+60)
|
||||
|
||||
|
||||
Combo::Combo()
|
||||
{
|
||||
m_bVisible = FALSE;
|
||||
|
||||
m_sprCombo.LoadFromSpriteFile( COMBO_SPRITE );
|
||||
m_textNum.LoadFromFontFile( FONT );
|
||||
m_textNum.SetText( "" );
|
||||
|
||||
SetX( CENTER_X );
|
||||
}
|
||||
|
||||
Combo::~Combo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Combo::SetX( int iNewX )
|
||||
{
|
||||
m_sprCombo.SetXY( iNewX+40, COMBO_Y );
|
||||
m_textNum.SetXY( iNewX-50, COMBO_Y );
|
||||
}
|
||||
|
||||
void Combo::Update( const FLOAT &fDeltaTime )
|
||||
{
|
||||
m_sprCombo.Update( fDeltaTime );
|
||||
m_textNum.Update( fDeltaTime );
|
||||
}
|
||||
|
||||
void Combo::Draw()
|
||||
{
|
||||
if( m_bVisible )
|
||||
{
|
||||
m_textNum.Draw();
|
||||
m_sprCombo.Draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Combo::SetCombo( int iNum )
|
||||
{
|
||||
if( iNum <= 4 )
|
||||
{
|
||||
m_bVisible = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bVisible = TRUE;
|
||||
|
||||
m_textNum.SetText( ssprintf("%d", iNum) );
|
||||
m_textNum.SetZoom( 1.0f + iNum/200.0f );
|
||||
m_textNum.TweenTo( COMBO_TWEEN_TIME, m_textNum.GetX(), m_textNum.GetY() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user