96 mCapturer->HitGem(nTick, cursor,
false);
108 mCapturer->MissGem(nTick, cursor,
false);
119 void OnMiss(
int nTick,
int nLane)
override {
120 mCapturer->MissPress(nTick, nLane);
158 mCapturer->UpdateRun(mBar);
246 const float *pMsPerTick,
252 int nStopPreviousNote);
421 bool IsLastGemOfBar(
const GemCursor &cursor);
434 int FindActiveBar(
int nFrom,
int nTo);
445 int FindRunEnd(
int nStart,
int nMaxBars);
458 bool FindRun(
int nFrom,
int nTo,
int *pStart,
int *pEnd);
467 void UpdateRun(
int nBar);
477 void EndRunIfStarted(
int nTick,
int nQuiet);
487 void EndRun(
int nTick,
int nQuiet);
498 void CompleteBar(
const GemCursor &cursor,
int nQuiet);
508 void Capture(
const GemCursor &cursor,
int nQuiet);
533 void ShowRun(
int nStyle);
542 void ShowPressHint(
int nTick);
552 void MissPress(
int nTick,
int nLane);
554 std::unique_ptr<CatchReceiver> mCatchReceiver;
558 std::unique_ptr<NetFaker> mNetFaker;
559 std::unique_ptr<Faker> mFaker;
565 int mStopPreviousNote;
Per-bar state of one catch track during a song.
Definition catchtrackstate.h:17
Unit of work a Scheduler runs at a set time.
Definition command.h:13
Object told of each judged gem and press.
Definition gemcatcher.h:25
Judge of the presses on the lanes of one catch track.
Definition gemcatcher.h:15
Position at one gem of a catch track, walked in the order the song plays the gems.
Definition gemcursor.h:14
Piece of MIDI performance that a Scheduler plays.
Definition muse.h:12
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
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
~CatchReceiver() override=default
Destroy the object.
void OnHit(int nTick, const GemCursor &cursor) override
Pass a caught gem on as a local hit.
Definition trackcapturer.h:95
void OnMiss(int nTick, int nLane) override
Pass a press that caught no gem on.
Definition trackcapturer.h:119
CatchReceiver(TrackCapturer *pCapturer)
Construct the receiver of a capturer.
Definition trackcapturer.h:84
void OnPass(int nTick, const GemCursor &cursor) override
Pass a gem that passed without a press on as a local miss.
Definition trackcapturer.h:107
void Update()
Press the gem of the current tick when the autopilot is on and schedule the next gem.
Faker(TrackCapturer *pCapturer)
Construct a stand-in at the first gem of the track.
void Start()
Move to the first gem at or after the current tick and schedule it.
void Stop()
Withdraw the scheduled gem.
void SetEnabled(int nEnabled)
Set whether the autopilot presses the gems.
Definition trackcapturer.h:218
Interface told when a run is started, lost, or captured.
Definition trackcapturer.h:33
virtual void OnRunLost()=0
Handle a lost run.
virtual void OnRunStart(const GemCursor &cursor, int nEndBar)=0
Handle the first gem caught in a run.
virtual ~Receiver()
Release the receiver.
Definition trackcapturer.h:41
virtual void OnCapture(const GemCursor &cursor)=0
Handle a captured run.
void Execute() override
Look for the next run from mBar.
Definition trackcapturer.h:157
SetCaptureStartCmd(TrackCapturer *pCapturer)
Construct the command of a capturer.
Definition trackcapturer.h:148
~SetCaptureStartCmd() override=default
Destroy the object.
void SetBar(int nBar)
Set the bar to look from.
Definition trackcapturer.h:166
void Restart()
Stop and start again when started.
void SetPlayer(Player *pPlayer)
Give the track to a player, ending the run of the previous player when it was catching.
void MissGem(int nTick, const GemCursor &cursor, bool bRemote) override
Act on a gem the player let pass.
void Press(int nLane)
Judge a press on a lane, or explain the controls when the capturer is stopped.
void SetFakeInput(int nEnabled)
Turn the autopilot on or off.
void RefreshRun()
Look for the run again from the current bar.
Player * GetPlayer() const override
Report the player who plays the track.
Definition trackcapturer.h:364
GemCursor GetCursor() override
Report a cursor at the first gem of the track.
void Stop()
Stop judging the presses and hide the run.
~TrackCapturer() override
Stop and release the helpers.
void SetRunHidden(int nHidden)
Hide or show the run and the catch meter.
TrackCapturer(Receiver *pReceiver, CatchTrackState *pState, const float *pMsPerTick, PlayMap *pPlayMap, const SectionBoundaries *pSections, int nNumBars, int nTrack, int nTicksPerBar, int nStopPreviousNote)
Construct the rules of a track and look for the first run.
int GetTicksPerBar() const override
Report the song ticks in one bar.
Definition trackcapturer.h:353
void HitGem(int nTick, const GemCursor &cursor, bool bRemote) override
Act on a gem the player hit.
bool IsBarActive(int nBar) override
Report whether a bar can be caught and is not yet captured.
bool GetRunStart(int nBar, int *pTick, int *pLane)
Find the first gem of the next run from a bar.
void Start()
Look for the run from the current bar and start judging the presses.
Interface through which the rules react to the phrases of a player's track.
Definition trackreactor.h:12