wavelength 1.0.0
Loading...
Searching...
No Matches
GemCatcher::CatchCheckCmd Class Reference

Command that judges the presses on one lane and passes each gem the player lets go by. More...

#include <gemcatcher.h>

Inheritance diagram for GemCatcher::CatchCheckCmd:
Collaboration diagram for GemCatcher::CatchCheckCmd:

Public Member Functions

 ~CatchCheckCmd () override=default
 Destroy the object.
 CatchCheckCmd (Receiver *pReceiver, CatchTrackState *pState, const float *pMsPerTick, int nTrack, int nLane, int nSlopMs, int nTicksPerBar)
 Construct the command for a lane.
void Schedule ()
 Move to the next gem of the lane from the current tick and queue the command for it.
void Execute () override
 Pass the gem when its bar is open, and wait on the next gem.
void Restart ()
 Withdraw the queued command and queue it again from the current tick.
void Catch ()
 Judge a press at the current tick.
void ScheduleNext ()
 Move to the next gem of the lane and queue the command for it.
GemCursor Nearest (const GemCursor &first, const GemCursor &second, int nTick) const
 Report the cursor whose gem is nearer a tick.
void Hit (int nTick, const GemCursor &cursor, float fErrorMs)
 Report a caught gem.
void Pass (int nTick, const GemCursor &cursor)
 Report a gem that passed without a press.
void Miss (int nTick, const GemCursor &cursor, float fErrorMs)
 Report a press too far from the nearest gem.
void Miss (int nTick)
 Report a press with no gem near it.
Public Member Functions inherited from Command
 ~Command () override
 Release the command.
virtual bool IsSerializable ()
 Report whether a recording saves the command.
virtual int GetSerialId ()
 Report the identifier a recording rebuilds the command by.
virtual void Save (BinStream &stream) const
 Write the command to a recording.
virtual void Load (BinStream &stream)
 Read the command Save() writes.
Public Member Functions inherited from Attachment
 Attachment ()
 Construct an object with no reference.
virtual ~Attachment ()
 Release the object.
void AddRef ()
 Take one reference.
void Release ()
 Give back one reference and delete the object once the last one is gone.

Additional Inherited Members

Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Detailed Description

Command that judges the presses on one lane and passes each gem the player lets go by.

The RTTI includes the class name. The scheduler runs the command once the time of slop after the next gem of the lane has elapsed.

Constructor & Destructor Documentation

◆ ~CatchCheckCmd()

GemCatcher::CatchCheckCmd::~CatchCheckCmd ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x003385b8
Ghidra address:
PAL: 0x003a5b68

◆ CatchCheckCmd()

GemCatcher::CatchCheckCmd::CatchCheckCmd ( Receiver * pReceiver,
CatchTrackState * pState,
const float * pMsPerTick,
int nTrack,
int nLane,
int nSlopMs,
int nTicksPerBar )

Construct the command for a lane.

Parameters
pReceiverThe receiver of the judgements.
pStateThe state of the track.
pMsPerTickThe length of a tick in milliseconds.
nTrackThe track.
nLaneThe lane.
nSlopMsThe largest time between a press and a gem that catches the gem.
nTicksPerBarThe length of a bar in ticks.
Ghidra address:
NTSC-U/C: 0x001169a0
Ghidra address:
PAL: 0x00118138

Member Function Documentation

◆ Schedule()

void GemCatcher::CatchCheckCmd::Schedule ( )

Move to the next gem of the lane from the current tick and queue the command for it.

Ghidra address:
NTSC-U/C: 0x00116a08
Ghidra address:
PAL: 0x001181a0

◆ Execute()

void GemCatcher::CatchCheckCmd::Execute ( )
overridevirtual

Pass the gem when its bar is open, and wait on the next gem.

Ghidra address:
NTSC-U/C: 0x00116ab8
Ghidra address:
PAL: 0x00118250

Implements Command.

◆ Restart()

void GemCatcher::CatchCheckCmd::Restart ( )

Withdraw the queued command and queue it again from the current tick.

Ghidra address:
NTSC-U/C: 0x00116b58
Ghidra address:
PAL: 0x001182f0

◆ Catch()

void GemCatcher::CatchCheckCmd::Catch ( )

Judge a press at the current tick.

Ghidra address:
NTSC-U/C: 0x00116ba0
Ghidra address:
PAL: 0x00118338

◆ ScheduleNext()

void GemCatcher::CatchCheckCmd::ScheduleNext ( )

Move to the next gem of the lane and queue the command for it.

Ghidra address:
NTSC-U/C: 0x00116e00
Ghidra address:
PAL: 0x00118598

◆ Nearest()

GemCursor GemCatcher::CatchCheckCmd::Nearest ( const GemCursor & first,
const GemCursor & second,
int nTick ) const

Report the cursor whose gem is nearer a tick.

Parameters
firstThe first cursor.
secondThe second cursor.
nTickThe tick.
Returns
The valid cursor when only one is valid, otherwise the nearer one, and the second on a tie.
Ghidra address:
NTSC-U/C: 0x00116eb8
Ghidra address:
PAL: 0x00118650

◆ Hit()

void GemCatcher::CatchCheckCmd::Hit ( int nTick,
const GemCursor & cursor,
float fErrorMs )

Report a caught gem.

Parameters
nTickThe tick of the press.
cursorThe gem.
fErrorMsThe time from the press to the gem in milliseconds.
Ghidra address:
NTSC-U/C: 0x00116f78
Ghidra address:
PAL: 0x00118710

◆ Pass()

void GemCatcher::CatchCheckCmd::Pass ( int nTick,
const GemCursor & cursor )

Report a gem that passed without a press.

Parameters
nTickThe tick the gem was judged at.
cursorThe gem.
Ghidra address:
NTSC-U/C: 0x00117008
Ghidra address:
PAL: 0x001187a0

◆ Miss() [1/2]

void GemCatcher::CatchCheckCmd::Miss ( int nTick,
const GemCursor & cursor,
float fErrorMs )

Report a press too far from the nearest gem.

Parameters
nTickThe tick of the press.
cursorThe nearest gem.
fErrorMsThe time from the press to the gem in milliseconds.
Ghidra address:
NTSC-U/C: 0x00117080
Ghidra address:
PAL: 0x00118818

◆ Miss() [2/2]

void GemCatcher::CatchCheckCmd::Miss ( int nTick)

Report a press with no gem near it.

Parameters
nTickThe tick of the press.
Ghidra address:
NTSC-U/C: 0x00117100
Ghidra address:
PAL: 0x00118898

The documentation for this class was generated from the following file: