move MultiPlayer and MultiPlayer join info into GameState
This commit is contained in:
@@ -166,6 +166,8 @@ void GameState::Reset()
|
||||
m_pCurStyle.Set( NULL );
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_bSideIsJoined[p] = false;
|
||||
FOREACH_MultiPlayer( p )
|
||||
m_bIsMultiPlayerJoined[p] = false;
|
||||
MEMCARDMAN->UnlockCards();
|
||||
// m_iCoins = 0; // don't reset coin count!
|
||||
m_MasterPlayerNumber = PLAYER_INVALID;
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
const Game* m_pCurGame;
|
||||
BroadcastOnChangePtr<const Style> m_pCurStyle;
|
||||
bool m_bSideIsJoined[NUM_PLAYERS]; // left side, right side
|
||||
bool m_bIsMultiPlayerJoined[NUM_MultiPlayer];
|
||||
BroadcastOnChange<PlayMode> m_PlayMode; // many screens display different info depending on this value
|
||||
int m_iCoins; // not "credits"
|
||||
PlayerNumber m_MasterPlayerNumber; // used in Styles where one player controls both sides
|
||||
|
||||
@@ -29,6 +29,22 @@ PlayerNumber GetNextPotentialCpuPlayer( PlayerNumber pn );
|
||||
|
||||
const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 };
|
||||
|
||||
|
||||
enum MultiPlayer {
|
||||
MultiPlayer_1 = 0,
|
||||
MultiPlayer_2,
|
||||
MultiPlayer_3,
|
||||
MultiPlayer_4,
|
||||
MultiPlayer_5,
|
||||
MultiPlayer_6,
|
||||
MultiPlayer_7,
|
||||
MultiPlayer_8,
|
||||
NUM_MultiPlayer, // leave this at the end
|
||||
MultiPlayer_Invalid
|
||||
};
|
||||
#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM( MultiPlayer, NUM_MultiPlayer, pn )
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -554,7 +554,7 @@ void ScreenGameplayMultiplayer::Input( const DeviceInput& DeviceI, const InputEv
|
||||
|
||||
MultiPlayer mp = (MultiPlayer)(DeviceI.device - DEVICE_JOY1);
|
||||
|
||||
ASSERT( mp>=0 && mp<NUM_MULTI_PLAYERS );
|
||||
ASSERT( mp>=0 && mp<NUM_MultiPlayer );
|
||||
m_HumanPlayer[mp].Step( _StyleI.col, DeviceI.ts );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,28 +14,6 @@
|
||||
#include "PlayerState.h"
|
||||
#include "StageStats.h"
|
||||
|
||||
enum MultiPlayer {
|
||||
MPLAYER_1 = 0,
|
||||
MPLAYER_2,
|
||||
MPLAYER_3,
|
||||
MPLAYER_4,
|
||||
MPLAYER_5,
|
||||
MPLAYER_6,
|
||||
MPLAYER_7,
|
||||
MPLAYER_8,
|
||||
MPLAYER_9,
|
||||
MPLAYER_10,
|
||||
MPLAYER_11,
|
||||
MPLAYER_12,
|
||||
MPLAYER_13,
|
||||
MPLAYER_14,
|
||||
MPLAYER_15,
|
||||
MPLAYER_16,
|
||||
NUM_MULTI_PLAYERS, // leave this at the end
|
||||
MULTI_PLAYER_INVALID
|
||||
};
|
||||
#define FOREACH_MultiPlayer( pn ) FOREACH_ENUM( MultiPlayer, NUM_MULTI_PLAYERS, pn )
|
||||
|
||||
class Song;
|
||||
class Steps;
|
||||
|
||||
@@ -72,17 +50,17 @@ protected:
|
||||
Background m_Background;
|
||||
Foreground m_Foreground;
|
||||
|
||||
ScoreDisplay* m_pPrimaryScoreDisplay[NUM_MULTI_PLAYERS];
|
||||
ScoreKeeper* m_pPrimaryScoreKeeper[NUM_MULTI_PLAYERS];
|
||||
ScoreDisplay* m_pPrimaryScoreDisplay[NUM_MultiPlayer];
|
||||
ScoreKeeper* m_pPrimaryScoreKeeper[NUM_MultiPlayer];
|
||||
|
||||
Transition m_In;
|
||||
Transition m_Out;
|
||||
Transition m_Cancel;
|
||||
|
||||
Player m_AutoPlayer;
|
||||
PlayerState m_PlayerState[NUM_MULTI_PLAYERS];
|
||||
PlayerStageStats m_PlayerStageStats[NUM_MULTI_PLAYERS];
|
||||
Player m_HumanPlayer[NUM_MULTI_PLAYERS];
|
||||
PlayerState m_PlayerState[NUM_MultiPlayer];
|
||||
PlayerStageStats m_PlayerStageStats[NUM_MultiPlayer];
|
||||
Player m_HumanPlayer[NUM_MultiPlayer];
|
||||
|
||||
AutoKeysounds m_AutoKeysounds;
|
||||
RageSound *m_pSoundMusic;
|
||||
|
||||
Reference in New Issue
Block a user