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()" );
|
|
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
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);
|
|
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
m_Inventory[i].SetX( fX );
|
|
|
|
|
this->AddChild( &m_Inventory[i] );
|
|
|
|
|
}
|
|
|
|
|
}
|
2003-02-25 00:33:42 +00:00
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
void ScoreDisplayBattle::Init( PlayerNumber pn )
|
|
|
|
|
{
|
|
|
|
|
ScoreDisplay::Init( pn );
|
2003-02-26 00:20:00 +00:00
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
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 );
|
|
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
|
2003-02-25 00:33:42 +00:00
|
|
|
{
|
2003-04-07 03:25:44 +00:00
|
|
|
CString sNewItem = GAMESTATE->m_sInventory[m_PlayerNumber][s];
|
2003-02-25 02:51:04 +00:00
|
|
|
|
2003-04-07 03:25:44 +00:00
|
|
|
if( sNewItem != m_iLastSeenInventory[s] )
|
2003-02-25 00:33:42 +00:00
|
|
|
{
|
2003-04-07 03:25:44 +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
|
|
|
|
|
{
|
2003-04-07 03:25:44 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|