remove unused ActiveItemList

This commit is contained in:
Chris Danford
2003-08-14 07:30:00 +00:00
parent 18d457db94
commit 0f1743a468
4 changed files with 0 additions and 136 deletions
-82
View File
@@ -1,82 +0,0 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
File: ActiveItemList.h
Desc: A graphic displayed in the ActiveItemList during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ActiveItemList.h"
#include "RageUtil.h"
#include "GameState.h"
#include "ThemeManager.h"
#include "Inventory.h"
#include "RageTimer.h"
#define TEXT_HORIZ_ALIGN( p ) THEME->GetMetricI("ActiveItemList",ssprintf("TextHorizAlignP%d",p+1))
#define TEXT_ZOOM THEME->GetMetricF("ActiveItemList","TextZoom")
#define SPACING_Y THEME->GetMetricF("ActiveItemList","SpacingY")
ActiveItemList::ActiveItemList()
{
}
void ActiveItemList::Init( PlayerNumber pn )
{
m_PlayerNumber = pn;
int i;
for( i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
{
m_text[i].LoadFromFont( THEME->GetPathToF("Common normal") );
m_text[i].SetZoom( TEXT_ZOOM );
// m_text[i].SetText( "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" );
this->AddChild( &m_text[i] );
}
for( i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
{
m_text[i].SetHorizAlign( (Actor::HorizAlign)TEXT_HORIZ_ALIGN(pn) );
bool bReverse = GAMESTATE->m_PlayerOptions[pn].m_fReverseScroll == 1;
float fHeight = SPACING_Y*MAX_ACTIVE_ITEMS_LINES * (bReverse ? 1 : -1 );
float fY = SCALE(i,0.f,MAX_ACTIVE_ITEMS_LINES,0.f,fHeight);
m_text[i].SetY( fY );
}
}
void ActiveItemList::Update( float fDelta )
{
ActorFrame::Update( fDelta );
// refresh text only once every second
float fNowSeconds = RageTimer::GetTimeSinceStart();
float fLastSeconds = RageTimer::GetTimeSinceStart() - fDelta;
if( (int)fNowSeconds != (int)fLastSeconds )
{
GameState::Attack* sActiveAttacks = GAMESTATE->m_ActiveAttacks[m_PlayerNumber]; // NUM_INVENTORY_SLOTS
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
{
GameState::Attack& a = sActiveAttacks[s];
CString sDisplayText = a.sModifier;
if( sDisplayText == "" )
m_text[s].SetText( "" );
else
{
int iDisplaySecondsLeft = (int)(a.fSecsRemaining+1);
m_text[s].SetText( ssprintf("%s %02d:%02d", sDisplayText.c_str(), iDisplaySecondsLeft/60, iDisplaySecondsLeft%60) );
}
}
}
}
-39
View File
@@ -1,39 +0,0 @@
#ifndef _ActiveItemList_H_
#define _ActiveItemList_H_
/*
-----------------------------------------------------------------------------
File: ActiveItemList.h
Desc: A graphic displayed in the ActiveItemList during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Sprite.h"
#include "ActorFrame.h"
#include "BitmapText.h"
#include "PlayerNumber.h"
class Inventory;
const int MAX_ACTIVE_ITEMS_LINES = 10;
class ActiveItemList : public ActorFrame
{
public:
ActiveItemList();
void Init( PlayerNumber pn );
virtual void Update( float fDelta );
protected:
BitmapText m_text[MAX_ACTIVE_ITEMS_LINES];
PlayerNumber m_PlayerNumber;
};
#endif
-13
View File
@@ -265,16 +265,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
m_TimingAssist.Load((PlayerNumber)p, &m_Player[p]);
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_HUMAN_BATTLE:
case PLAY_MODE_CPU_BATTLE:
m_ActiveItemList[p].Init( (PlayerNumber)p );
/* Position it in LoadNextSong. */
this->AddChild( &m_ActiveItemList[p] );
break;
}
m_sprOniGameOver[p].Load( THEME->GetPathToG("ScreenGameplay oni gameover") );
m_sprOniGameOver[p].SetX( fPlayerX );
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
@@ -809,9 +799,6 @@ void ScreenGameplay::LoadNextSong()
if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
continue;
m_ActiveItemList[p].SetName( ssprintf("ActiveItemsP%d%s%s",p+1,bExtra?"Extra":"",bReverse[p]?"Reverse":"") );
SET_XY( m_ActiveItemList[p] );
m_DifficultyIcon[p].SetName( ssprintf("DifficultyP%d%s%s",p+1,bExtra?"Extra":"",bReverse[p]?"Reverse":"") );
SET_XY( m_DifficultyIcon[p] );
}
-2
View File
@@ -24,7 +24,6 @@
#include "DifficultyIcon.h"
#include "BPMDisplay.h"
class Inventory;
#include "ActiveItemList.h"
//#include "BeginnerHelper.h" // uncomment once it's checked in
#include "LyricDisplay.h"
#include "TimingAssist.h"
@@ -144,7 +143,6 @@ protected:
// used in PLAY_MODE_BATTLE
Inventory* m_pInventory[NUM_PLAYERS];
ActiveItemList m_ActiveItemList[NUM_PLAYERS];
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];