58 virtual void OnMiss(
int nTick,
int nLane) = 0;
92 const float *pMsPerTick,
195 const float *mMsPerTick;
217 const float *pMsPerTick,
Per-bar state of one catch track during a song.
Definition catchtrackstate.h:17
Tag that a Scheduler stores beside each queued command.
Definition commandid.h:8
Unit of work a Scheduler runs at a set time.
Definition command.h:13
void Restart()
Withdraw the queued command and queue it again from the current tick.
void ScheduleNext()
Move to the next gem of the lane and queue the command for it.
CatchCheckCmd(Receiver *pReceiver, CatchTrackState *pState, const float *pMsPerTick, int nTrack, int nLane, int nSlopMs, int nTicksPerBar)
Construct the command for a lane.
GemCursor Nearest(const GemCursor &first, const GemCursor &second, int nTick) const
Report the cursor whose gem is nearer a tick.
void Pass(int nTick, const GemCursor &cursor)
Report a gem that passed without a press.
void Execute() override
Pass the gem when its bar is open, and wait on the next gem.
void Schedule()
Move to the next gem of the lane from the current tick and queue the command for it.
void Miss(int nTick)
Report a press with no gem near it.
~CatchCheckCmd() override=default
Destroy the object.
void Miss(int nTick, const GemCursor &cursor, float fErrorMs)
Report a press too far from the nearest gem.
void Catch()
Judge a press at the current tick.
void Hit(int nTick, const GemCursor &cursor, float fErrorMs)
Report a caught gem.
Object told of each judged gem and press.
Definition gemcatcher.h:25
virtual void OnMiss(int nTick, int nLane)=0
Handle a press that caught no gem.
virtual ~Receiver()
Release the receiver.
Definition gemcatcher.h:33
virtual void OnHit(int nTick, const GemCursor &cursor)=0
Handle a caught gem.
virtual void OnPass(int nTick, const GemCursor &cursor)=0
Handle a gem that passed without a press.
static constexpr int kNumLanes
The number of lanes of a catch track.
Definition gemcatcher.h:18
GemCatcher(Receiver *pReceiver, CatchTrackState *pState, const float *pMsPerTick, int nTrack, int nTicksPerBar)
Construct the commands of every lane.
void Start()
Queue the command of every lane from the current tick.
~GemCatcher()
Withdraw the queued commands.
void Catch(int nLane)
Judge a press on a lane at the current tick.
void Stop()
Withdraw the command of every lane.
void Reset()
Queue the command of every lane again from the current tick.
Position at one gem of a catch track, walked in the order the song plays the gems.
Definition gemcursor.h:14
Owner of one reference to an Attachment.
Definition ptr.h:16