108 void SetPaused(
bool bPaused,
int nPad,
int nReason)
override;
234 bool IsPastEnd()
const {
247 void PauseOnline(
bool bPaused,
int nPad,
int nReason);
258 void PauseLocal(
bool bPaused,
int nPad,
int nReason);
286 void PlayLeaderSound();
317 static void WinCheat(DataArray *pCommand,
void *pUserData);
328 void ApplyWinCheat();
346 int GetPlayerFromNetOrder(
int nNetOrder);
355 bool AllPlayersFinished();
382 void OnPlayerUpdate(PlayerUpdatePacket *pPacket);
391 void OnArbiter(ArbiterPacket *pPacket);
400 void OnCapture(CapturePacket *pPacket);
409 void OnBumper(BumperPacket *pPacket);
418 void OnCrippler(CripplerPacket *pPacket);
427 void OnSlowdown(SlowdownPacket *pPacket);
436 void OnMultiplier(MultiplierPacket *pPacket);
445 void OnFreestyle(FreestylePacket *pPacket);
454 void OnFreestyleBump(FreestyleBumpPacket *pPacket);
463 void OnFinalScore(FinalScorePacket *pPacket);
472 void OnGameEnded(GameEndedMsg *pMsg);
481 void OnPlayerAborted(PlayerAbortedMsg *pMsg);
483 Player *mLocalPlayer;
485 Ptr<Command> mFinishCommand;
486 Ptr<Command> mLeaderCommand;
487 std::vector<unsigned> mVersions;
488 unsigned mArbiterVersion;
489 std::vector<int> mNetToPlayer;
490 std::unique_ptr<NetArbiter> mArbiter;
491 std::vector<bool> mFinished;
Track whose phrases a player captures by playing them.
Definition catchtrack.h:33
Reference-counted array of script data nodes.
Definition dataarray.h:20
int mNumBars
Definition gamelogic.h:673
GameLogic(Song *pSong, DataArray *pConfig, int nSeed)
Construct the logic of a song.
int mTicksPerBar
Definition gamelogic.h:672
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
~MultiGameLogic() override
Release the arbiter, restore the song speed, and unregister the cheat.
void SetPaused(bool bPaused, int nPad, int nReason) override
Pause or resume, and show the pause dialog when pausing.
bool DeployFreestyle(Player *pPlayer) override
Move a player to the freestyle track.
void OnSection() override
Announce the completed stage while sections remain.
MultiGameLogic(Song *pSong, DataArray *pConfig, int nSeed)
Construct the logic of a song and register the win_cheat script command.
float GetTime() override
Report the time of the scheduler's clock.
bool DeploySlowdown(Player *pPlayer) override
Slow the song down for a player and, for a local player online, send a SlowdownPacket.
void EndFreestyle(Player *pPlayer) override
Move a player from the freestyle track back to a catch track.
bool DeployCrippler(Player *pPlayer) override
Cripple every other player on a player's track.
void OnPhraseMissed(Track *pTrack) override
Act once a player missed a phrase.
Definition multigamelogic.h:223
void OnBar(int nBar) override
Update the score leader.
void OnPhraseEnded(Track *pTrack) override
Act once a phrase of a track ended.
void OnStart() override
Enable the catch tracks, schedule the end of the song, and start the arbiter.
bool DeployBumper(Player *pPlayer) override
Bump every other player on a player's track to a random other track.
int GetTick() override
Report the tick of the scheduler's clock.
bool DispatchPriv(Message *pMsg) override
Apply a packet from another console, or hand any other message to WorldLogic.
void HandleInput(const RotateEvent &event) override
Move a player to a neighbouring track and ask the arbiter to settle the move.
void OnPhraseCaptured(CatchTrack *pTrack, Player *pPlayer, int nBar, bool bAutocatch) override
Update the score leader and, for a local player online, send a CapturePacket.
void OnFinish(bool bWon) override
Celebrate a won song and collect or send the final score.
One participant in a song: the track the participant plays, the score, and the streak.
Definition player.h:19
Input event that rotates a player's view of the tracks by one track.
Definition rotateevent.h:11
One song: its configuration from the song text file and the tracks its MIDI file builds.
Definition song.h:38
One instrument track of the song that a player can play.
Definition track.h:18
Scheduler TheSongScheduler
The scheduler of the song clock.