Event the game passes between a MsgSource and a MsgSink.
Definition autocatchmsg.h:25
int mPhraseRunBars
Definition catcher.h:396
int mMuffedGems
Definition catcher.h:394
void SchedulePostGemCommand(int nTick)
Build a PostGemCmd for the gem after nTick and queue it one tick after PostGemDelay() under the handl...
int mSeekerEnabled
Definition catcher.h:400
int mSeekerEndBar
Definition catcher.h:399
int mCatchWindow
Definition catcher.h:387
Quantizer * mQuantizer
Definition catcher.h:378
int mLastMuffedBar
Definition catcher.h:397
Sch::Tick mLastCaughtPosition
Definition catcher.h:389
float mRemoteSuccess
Definition catcher.h:402
Catcher(PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData, Sch::TickClock *pClock, int nSeekerBarCount, Sch::Tick catchWindow)
virtual int IsPhraseRunEmpty()
Report whether the catcher has nothing outstanding.
void SimulateRemoteGem(int nTick)
Play the remote player's gem at a song position, then schedule the next gem command.
virtual void ReportCaughtPowerbar(int nBar)=0
Report a caught bar's power bar.
int mSeekerBarCount
Definition catcher.h:386
int mLastEndedBar
Definition catcher.h:395
virtual void MissGem(int nTick, int nGem)
Record a missed gem.
Sch::CmdID mPostGemCommand
Definition catcher.h:383
void ScheduleGemCommand(int nTick)
Build a GemCmd for the gem after nTick and queue it at that gem under the handle mGemCommand.
const TrackData * mTrackData
Definition catcher.h:380
int FindNextGemTick(int nTick)
Returns the first gem position after nTick.
virtual void CatchGem(int nTick, int nGem)
Record a caught gem.
void EndBar(int nBar)
Closes the counts for a bar.
virtual void Start()
Schedule the catcher's two commands on the clock.
Sch::TickClock * mClock
Definition catcher.h:382
virtual ~Catcher()
Withdraw both commands through Stop().
int mSeekerFirstBar
Definition catcher.h:398
void OnTrackSelect(TrackSelectMsg *pMsg)
Takes the track for the player a TrackSelectMsg names.
void PostSeekerRangeMsg(int nFirstBar, int nBarCount)
Sends a SeekerMsg for nBarCount bars from nFirstBar at position 0, and records the range in mSeekerFi...
Sch::Tick mRemotePosition
Definition catcher.h:403
int mCaughtGems
Definition catcher.h:392
int mMissedGems
Definition catcher.h:393
void ProcessGemCommand(int nTick)
Run the post-gem command at a song position.
virtual void DispatchPriv(Message *pMsg)
Act on a message.
void PostCaughtBarMsg(int nBar, int nNextBar)
Does nothing once a gem of the phrase was missed or muffed.
int SnapToNearestGem(int nTick)
Returns the gem on either side of nTick nearer to it when that gem lies within mCatchWindow,...
PhraseMgr * mPhraseMgr
Definition catcher.h:379
virtual void Stop()
Withdraw the catcher's two commands from the clock.
Sch::Tick mLastMissedPosition
Definition catcher.h:390
void OnInvalidateSeeker(InvalidateSeekerMsg *pMsg)
The out-of-line copy of the InvalidateSeekerMsg branch DispatchPriv() expands inline.
int mTrack
Definition catcher.h:391
Sch::CmdID mGemCommand
Definition catcher.h:384
void UpdateSeeker(int nBar)
Finds the next free bar within 32 bars of nBar (or of the bar after mLastMuffedBar) and points the se...
Player * mPlayer
Definition catcher.h:381
int PostGemDelay(int nTick)
Returns the earlier of the midpoint between nTick and the next gem, and nTick plus mCatchWindow.
virtual void CapturePhrase(int nBar, int nRun, int nAutoCatch)=0
Capture the phrase a caught run of bars completes.
void PostCatchMsg(PitchRiffMsg *pMsg)
Scores a PitchRiffMsg for this track.
void PostPhraseMuffedMsg(int nBar, Sch::Tick position)
Sends a PhraseMuffedMsg for a bar once, recording the bar in mLastMuffedBar.
Sch::Tick mTicksPerBar
Definition catcher.h:385
void OnAutoCatch(AutoCatchMsg *pMsg)
Plays a free bar for the player an AutoCatchMsg identifies through CapturePhrase(),...
Player * mRemotePlayer
Definition catcher.h:401
int mEnabled
Definition catcher.h:388
int IsBarFree(int nBar)
Returns whether a bar is non-negative, playable according to TrackData::QueryBar(),...
void PostSeekerMsg()
Sends a SeekerMsg that turns the seeker off and clears mSeekerEnabled.
void SetPhraseOwners(int nFirstBar, int nEndBar, Player *pPlayer)
Gives every bar from nFirstBar up to nEndBar to one player.
Event the game passes between a MsgSource and a MsgSink.
Definition invalidateseekermsg.h:19
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Owner of the gem phrases on one track, and the seam between the network and the gems.
Definition phrasemgr.h:51
Event the game passes between a MsgSource and a MsgSink.
Definition pitchriffmsg.h:26
One participant in a session, local or remote.
Definition player.h:39
Holder of the track description the beat-quantising paths consult.
Definition quantizer.h:14
Handle that identifies one batch of commands the scheduler has queued.
Definition cmdid.h:35
Pausable view of scheduler time, together with the tempo that maps it to a song position.
Definition tickclock.h:40
Song position in MIDI ticks, printed as measure, beat, and tick.
Definition tick.h:70
Converted events of one track of a level.
Definition trackdata.h:52
Event the game passes between a MsgSource and a MsgSink.
Definition trackselectmsg.h:24