Files
itgmania212121/stepmania/src/ScoreDisplayBattle.cpp
T

72 lines
1.7 KiB
C++
Raw Normal View History

2003-02-25 00:33:42 +00:00
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScoreDisplayBattle.h
Desc: A graphic displayed in the ScoreDisplayBattle during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScoreDisplayBattle.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "PrefsManager.h"
#include "RageLog.h"
#include "GameState.h"
#include "ThemeManager.h"
ScoreDisplayBattle::ScoreDisplayBattle()
{
LOG->Trace( "ScoreDisplayBattle::ScoreDisplayBattle()" );
for( int i=0; i<NUM_INVENTORY_SLOTS; i++ )
2003-02-25 00:33:42 +00:00
{
float fX = (float)SCALE(i,0.f,2.f,-60.f,60.f);
m_Inventory[i].SetX( fX );
this->AddChild( &m_Inventory[i] );
}
}
2003-02-25 00:33:42 +00:00
void ScoreDisplayBattle::Init( PlayerNumber pn )
{
ScoreDisplay::Init( pn );
for( int i=0; i<NUM_INVENTORY_SLOTS; i++ )
m_Inventory[i].Load( m_PlayerNumber, "" );
2003-02-25 00:33:42 +00:00
}
void ScoreDisplayBattle::Update( float fDelta )
{
ScoreDisplay::Update( fDelta );
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
2003-02-25 00:33:42 +00:00
{
CString sNewItem = GAMESTATE->m_sInventory[m_PlayerNumber][s];
2003-02-25 02:51:04 +00:00
if( sNewItem != m_iLastSeenInventory[s] )
2003-02-25 00:33:42 +00:00
{
m_iLastSeenInventory[s] = sNewItem;
m_Inventory[s].Load( m_PlayerNumber, sNewItem );
if( sNewItem == "" )
m_Inventory[s].Command( "linear,0.25;zoom,0" );
2003-02-25 02:51:04 +00:00
else
{
m_Inventory[s].StopTweening();
m_Inventory[s].Command( "diffuse,1,1,1,1;zoom,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;"
"sleep,0.1;linear,0;diffusealpha,0;"
"sleep,0.1;linear,0;diffusealpha,1;" );
2003-02-25 02:51:04 +00:00
}
2003-02-25 00:33:42 +00:00
}
}
}