Move some player-specific data out of the bloated GameState class.
Have gameplay objects hold a PlayerState pointer instead of a PlayerNumber and indexing back into GameState. This will simplify off-screen players (e.g. CPU ghosts, network replicated human players, >2 players using one NoteField)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "MenuTimer.h"
|
||||
#include "StepsUtil.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "PlayerState.h"
|
||||
|
||||
#define SCROLLING_LIST_X THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListX")
|
||||
#define SCROLLING_LIST_Y THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListY")
|
||||
@@ -309,7 +310,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
|
||||
void ScreenEz2SelectMusic::UpdateOptions(PlayerNumber pn, int nosound)
|
||||
{
|
||||
sOptions = GAMESTATE->m_PlayerOptions[pn].GetString();
|
||||
sOptions = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetString();
|
||||
|
||||
#ifdef DEBUG
|
||||
m_debugtext.SetText( "DEBUG: " + sOptions );
|
||||
|
||||
Reference in New Issue
Block a user