104 mTrack->OnCapture(cursor);
126 mTrack->OnRunStart(cursor, nEndBar);
138 static void operator delete(
void *pBlock) {
160 const float *pfMsPerTick,
222 [[maybe_unused]]
const BtnEvent<8> &event)
override {
440 void CaptureBars(
int nBar,
Player *pPlayer,
bool bAuto);
456 void ActivateBars(
int nStartBar,
int nEndBar,
Player *pPlayer,
bool bAuto,
bool bFreestyle);
487 static int GetStrandBars();
520 void OnRunStart(
const GemCursor &cursor,
int nEndBar);
531 std::unique_ptr<CaptureReceiver> mReceiver;
535 std::vector<BackMusic *> mBackMusic;
Background music of a song, played alone or along with a catch track.
Definition backmusic.h:20
Input event of a button press that names only the player.
Definition btnevent.h:15
The gems of one catch track, in the order of their ticks.
Definition catchtrackdata.h:14
Drawer of the bars and gems of one catch track ahead of the song.
Definition catchtrackdisplay.h:16
Player of the music of the captured bars of one catch track.
Definition catchtrackmusic.h:21
Per-bar state of one catch track during a song.
Definition catchtrackstate.h:17
void OnCapture(const GemCursor &cursor) override
Pass a capture to the track.
Definition catchtrack.h:103
void OnRunStart(const GemCursor &cursor, int nEndBar) override
Pass the start of a run to the track.
Definition catchtrack.h:125
CaptureReceiver(CatchTrack *pTrack)
Construct the receiver of a track.
Definition catchtrack.h:84
~CaptureReceiver() override
Release the receiver.
Definition catchtrack.h:93
void OnRunLost() override
Pass a lost run to the track.
Definition catchtrack.h:113
void Execute() override
End the phrase of the track and stop its background music.
DeactivateCmd(CatchTrack *pTrack)
Construct the command of a track.
Definition catchtrack.h:47
~DeactivateCmd() override
Release the command.
Definition catchtrack.h:56
void AddBackMusic(BackMusic *pMusic)
Play a background music track while a captured run of this track plays.
void HandleInput(Player *pPlayer, const PlayNoteEvent &event) override
Pass a button press of the track's player to the capturer, or show another player that the track is b...
void HandleInput(Player *pPlayer, const StickEvent< 2 > &event) override
Ignore the input.
Definition catchtrack.h:233
void Restart(Player *pPlayer, int nTick)
Enable every bar, give every bar to a player, and move the display to a tick.
void Capture(int nBar, Player *pPlayer)
Capture the phrase of a bar for a player.
bool Autocatch(int nBar, Player *pPlayer)
Capture the phrase of a bar or the next bar for a player with the autocatcher power-up.
bool HasPhraseAt(int nBar)
Report whether a phrase of the track is in a bar.
void SetNoSeeker(bool bNoSeeker)
Hide or show the seeker of the track.
void HandleInput(Player *pPlayer, const BtnEvent< 8 > &event) override
Ignore the input.
Definition catchtrack.h:221
void HandleInput(Player *pPlayer, const StickEvent< 6 > &event) override
Ignore the input.
Definition catchtrack.h:245
bool FindPhrase(int nBar, int *pTick, int *pLane)
Find the first gem of the next phrase from a bar.
void HandleInput(Player *pPlayer, const BtnEvent< 10 > &event) override
Ignore the input.
Definition catchtrack.h:257
int GetNextGemTick(int nTick, int *pLane)
Report the tick of the first gem at or after a tick.
void Stop() override
Stop the track and every scheduled command.
~CatchTrack() override
Stop and release the track.
void Enable(int nBar)
Enable the bars with gems from a bar on, except the checkpoint bars at the start of each section,...
void AssignBars(int nBar, int nBars, Player *pPlayer)
Give a run of bars as written to a player, or take them from every player.
void SetAutopilot(bool bAutopilot)
Turn on or off the automatic play of the track's gems.
void SetPlayer(Player *pPlayer) override
Give the track to the player it plays for.
void Start() override
Start the display, the music, and the guide ticker of the track, once.
void SetBarPowerup(int nBar, int nPowerup)
Place a power-up in a bar as written.
void Freestyle(int nBar, int nBars, Player *pPlayer)
Give a player the freestyle power-up for a number of bars.
CatchTrack(GameLogic *pLogic, CatchTrackData *pData, const float *pfMsPerTick, PlayMap *pPlayMap, SectionBoundaries *pSections, int nIndex, int nIntroBars, int nNumBars, int nTicksPerBar, int nFlags)
Construct a catch track.
void Loop(int nBar)
Redraw the track from a bar and restart the capturer after the song gained a loop.
void SetPowerup(int nBar, int nPowerup)
Place a power-up in a bar.
Unit of work a Scheduler runs at a set time.
Definition command.h:13
Rules of the main game, shared by the solo, multiplayer, and tutorial logic.
Definition gamelogic.h:39
Position at one gem of a catch track, walked in the order the song plays the gems.
Definition gemcursor.h:14
Player of the guide sound of each gem of a catch track as the song reaches the gem.
Definition guideticker.h:15
Map from the bars a song plays to the bars of the song as written, with the loops that repeat stretch...
Definition playmap.h:11
Input event that plays a note on one of the three gem buttons.
Definition playnoteevent.h:10
One participant in a song: the track the participant plays, the score, and the streak.
Definition player.h:19
Owner of one reference to an Attachment.
Definition ptr.h:16
Ascending list of the measures at which the sections of a song end.
Definition sectionboundaries.h:12
Input event of an analog stick position.
Definition stickevent.h:15
Interface told when a run is started, lost, or captured.
Definition trackcapturer.h:33
Rules of capturing the phrases of a catch track.
Definition trackcapturer.h:26
Track(int nIndex)
Construct a track with no player.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.