ScreenGameplay is getting out of hand--58 #includes. Cleanup.
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "LifeMeter.h"
|
||||||
|
#include "LifeMeterBar.h"
|
||||||
|
#include "LifeMeterBattery.h"
|
||||||
|
#include "LifeMeterTime.h"
|
||||||
|
|
||||||
|
LifeMeter *LifeMeter::MakeLifeMeter( SongOptions::LifeType t )
|
||||||
|
{
|
||||||
|
switch( t )
|
||||||
|
{
|
||||||
|
case SongOptions::LIFE_BAR: return new LifeMeterBar;
|
||||||
|
case SongOptions::LIFE_BATTERY: return new LifeMeterBattery;
|
||||||
|
case SongOptions::LIFE_TIME: return new LifeMeterTime;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (c) 2005 Glenn Maynard
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||||
|
* whom the Software is furnished to do so, provided that the above
|
||||||
|
* copyright notice(s) and this permission notice appear in all copies of
|
||||||
|
* the Software and that both the above copyright notice(s) and this
|
||||||
|
* permission notice appear in supporting documentation.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||||
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||||
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||||
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "PlayerNumber.h"
|
#include "PlayerNumber.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
|
#include "SongOptions.h"
|
||||||
|
|
||||||
class PlayerState;
|
class PlayerState;
|
||||||
class PlayerStageStats;
|
class PlayerStageStats;
|
||||||
@@ -35,6 +36,8 @@ public:
|
|||||||
virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) = 0;
|
virtual void UpdateNonstopLifebar(int cleared, int total, int ProgressiveLifebarDifficulty) = 0;
|
||||||
virtual void ForceFail() = 0;
|
virtual void ForceFail() = 0;
|
||||||
|
|
||||||
|
static LifeMeter *MakeLifeMeter( SongOptions::LifeType t );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const PlayerState *m_pPlayerState;
|
const PlayerState *m_pPlayerState;
|
||||||
PlayerStageStats *m_pPlayerStageStats;
|
PlayerStageStats *m_pPlayerStageStats;
|
||||||
|
|||||||
@@ -8,9 +8,7 @@
|
|||||||
#include "SongManager.h"
|
#include "SongManager.h"
|
||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "LifeMeterBar.h"
|
#include "LifeMeter.h"
|
||||||
#include "LifeMeterBattery.h"
|
|
||||||
#include "LifeMeterTime.h"
|
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "ScoreDisplayNormal.h"
|
#include "ScoreDisplayNormal.h"
|
||||||
#include "ScoreDisplayPercentage.h"
|
#include "ScoreDisplayPercentage.h"
|
||||||
@@ -562,21 +560,7 @@ void ScreenGameplay::Init()
|
|||||||
if( !GAMESTATE->IsPlayerEnabled(pi->m_pn) && !SHOW_LIFE_METER_FOR_DISABLED_PLAYERS )
|
if( !GAMESTATE->IsPlayerEnabled(pi->m_pn) && !SHOW_LIFE_METER_FOR_DISABLED_PLAYERS )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
switch( GAMESTATE->m_SongOptions.m_LifeType )
|
pi->m_pLifeMeter = LifeMeter::MakeLifeMeter( GAMESTATE->m_SongOptions.m_LifeType );
|
||||||
{
|
|
||||||
case SongOptions::LIFE_BAR:
|
|
||||||
pi->m_pLifeMeter = new LifeMeterBar;
|
|
||||||
break;
|
|
||||||
case SongOptions::LIFE_BATTERY:
|
|
||||||
pi->m_pLifeMeter = new LifeMeterBattery;
|
|
||||||
break;
|
|
||||||
case SongOptions::LIFE_TIME:
|
|
||||||
pi->m_pLifeMeter = new LifeMeterTime;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
pi->m_pLifeMeter->Load( pi->GetPlayerState(), pi->GetPlayerStageStats() );
|
pi->m_pLifeMeter->Load( pi->GetPlayerState(), pi->GetPlayerStageStats() );
|
||||||
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
||||||
SET_XY( pi->m_pLifeMeter );
|
SET_XY( pi->m_pLifeMeter );
|
||||||
|
|||||||
Reference in New Issue
Block a user