wavelength 1.0.0
Loading...
Searching...
No Matches
TrackCapturer Class Reference

Rules of capturing the phrases of a catch track. More...

#include <trackcapturer.h>

Inheritance diagram for TrackCapturer:
Collaboration diagram for TrackCapturer:

Classes

class  Receiver
 Interface told when a run is started, lost, or captured. More...
class  CatchReceiver
 Receiver of the judgements of the gem catcher, passed on to the capturer. More...
class  SetCaptureStartCmd
 Command that looks for the next run from a bar. More...
class  Faker
 Stand-in that presses each gem of an active bar when the autopilot is on. More...

Public Member Functions

 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.
 ~TrackCapturer () override
 Stop and release the helpers.
void Start ()
 Look for the run from the current bar and start judging the presses.
void Stop ()
 Stop judging the presses and hide the run.
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 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 SetRunHidden (int nHidden)
 Hide or show the run and the catch meter.
void RefreshRun ()
 Look for the run again from the current bar.
bool GetRunStart (int nBar, int *pTick, int *pLane)
 Find the first gem of the next run from a bar.
int GetTicksPerBar () const override
 Report the song ticks in one bar.
Player * GetPlayer () const override
 Report the player who plays the track.
bool IsBarActive (int nBar) override
 Report whether a bar can be caught and is not yet captured.
void HitGem (int nTick, const GemCursor &cursor, bool bRemote) override
 Act on a gem the player hit.
void MissGem (int nTick, const GemCursor &cursor, bool bRemote) override
 Act on a gem the player let pass.
GemCursor GetCursor () override
 Report a cursor at the first gem of the track.
Public Member Functions inherited from TrackReactor
virtual ~TrackReactor ()
 Release the interface.

Detailed Description

Rules of capturing the phrases of a catch track.

The RTTI records TrackReactor as the one base, and the nested TrackCapturer::Receiver, TrackCapturer::CatchReceiver, TrackCapturer::SetCaptureStartCmd, and TrackCapturer::Faker. CatchTrack has one. A run is the stretch of active bars the player must catch next, at most GameConfig::mBarCaptureThreshold bars long. Catching every gem of a run captures it, and a miss inside the run loses it.

Constructor & Destructor Documentation

◆ TrackCapturer()

TrackCapturer::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.

Parameters
pReceiverThe receiver of the runs.
pStateThe state of the bars of the track.
pMsPerTickThe length of a tick in milliseconds.
pPlayMapThe play map of the song.
pSectionsThe sections of the song, stored and not read here.
nNumBarsThe length of the song in bars, which the body does not read.
nTrackThe track.
nTicksPerBarThe song ticks in one bar.
nStopPreviousNoteNon-zero to stop the note of the previous gem at each hit.
Ghidra address:
NTSC-U/C: 0x00155628
Ghidra address:
PAL: 0x00156e90

◆ ~TrackCapturer()

TrackCapturer::~TrackCapturer ( )
override

Stop and release the helpers.

Ghidra address:
NTSC-U/C: 0x001558f8
Ghidra address:
PAL: 0x00157160

Member Function Documentation

◆ Start()

void TrackCapturer::Start ( )

Look for the run from the current bar and start judging the presses.

Ghidra address:
NTSC-U/C: 0x001559e0
Ghidra address:
PAL: 0x00157248

◆ Stop()

void TrackCapturer::Stop ( )

Stop judging the presses and hide the run.

Ghidra address:
NTSC-U/C: 0x00155af8
Ghidra address:
PAL: 0x00157360

◆ Restart()

void TrackCapturer::Restart ( )

Stop and start again when started.

Ghidra address:
NTSC-U/C: 0x00155ba8
Ghidra address:
PAL: 0x00157410

◆ SetPlayer()

void TrackCapturer::SetPlayer ( Player * pPlayer)

Give the track to a player, ending the run of the previous player when it was catching.

The PAL build also clears mGemsCaught.

Parameters
pPlayerThe player, or null.
Ghidra address:
NTSC-U/C: 0x00155be8
Ghidra address:
PAL: 0x00157450

◆ Press()

void TrackCapturer::Press ( int nLane)

Judge a press on a lane, or explain the controls when the capturer is stopped.

Parameters
nLaneThe lane.
Ghidra address:
NTSC-U/C: 0x00155c68
Ghidra address:
PAL: 0x001574d0

◆ SetFakeInput()

void TrackCapturer::SetFakeInput ( int nEnabled)

Turn the autopilot on or off.

Parameters
nEnabledNon-zero to press each gem automatically.
Ghidra address:
NTSC-U/C: 0x00155ca0
Ghidra address:
PAL: 0x00157508

◆ SetRunHidden()

void TrackCapturer::SetRunHidden ( int nHidden)

Hide or show the run and the catch meter.

Parameters
nHiddenNon-zero to hide them.
Ghidra address:
NTSC-U/C: 0x00155cb0
Ghidra address:
PAL: 0x00157518

◆ RefreshRun()

void TrackCapturer::RefreshRun ( )

Look for the run again from the current bar.

The PAL build then clears mGemsCaught when the player is not catching.

Ghidra address:
NTSC-U/C: 0x00155ce8
Ghidra address:
PAL: 0x00157550

◆ GetRunStart()

bool TrackCapturer::GetRunStart ( int nBar,
int * pTick,
int * pLane )

Find the first gem of the next run from a bar.

Parameters
nBarThe bar.
pTickReceives the tick of the gem.
pLaneReceives the lane of the gem.
Returns
Whether a run was found, and true without writing the outputs past the last bar.
Ghidra address:
NTSC-U/C: 0x00155d28
Ghidra address:
PAL: 0x001575b0

◆ GetTicksPerBar()

int TrackCapturer::GetTicksPerBar ( ) const
inlineoverridevirtual

Report the song ticks in one bar.

Returns
The ticks.
Ghidra address:
NTSC-U/C: 0x0034cf40
Ghidra address:
PAL: 0x003ba370

Implements TrackReactor.

◆ GetPlayer()

Player * TrackCapturer::GetPlayer ( ) const
inlineoverridevirtual

Report the player who plays the track.

Returns
The player, or null.
Ghidra address:
NTSC-U/C: 0x0034cf48
Ghidra address:
PAL: 0x003ba378

Implements TrackReactor.

◆ IsBarActive()

bool TrackCapturer::IsBarActive ( int nBar)
overridevirtual

Report whether a bar can be caught and is not yet captured.

Parameters
nBarThe bar.
Returns
Whether the bar is active.
Ghidra address:
NTSC-U/C: 0x00155e60
Ghidra address:
PAL: 0x001576e8

Implements TrackReactor.

◆ HitGem()

void TrackCapturer::HitGem ( int nTick,
const GemCursor & cursor,
bool bRemote )
overridevirtual

Act on a gem the player hit.

A gem at or before the last gem hit counts as a miss. Inside the run the hit adds to the catch meter and the last gem of a bar completes the bar.

Parameters
nTickThe song tick of the hit.
cursorThe gem.
bRemoteWhether the hit came from another console.
Ghidra address:
NTSC-U/C: 0x00156758
Ghidra address:
PAL: 0x00157fe0

Implements TrackReactor.

◆ MissGem()

void TrackCapturer::MissGem ( int nTick,
const GemCursor & cursor,
bool bRemote )
overridevirtual

Act on a gem the player let pass.

Parameters
nTickThe song tick of the miss.
cursorThe gem.
bRemoteWhether the miss came from another console.
Ghidra address:
NTSC-U/C: 0x00156b08
Ghidra address:
PAL: 0x00158390

Implements TrackReactor.

◆ GetCursor()

GemCursor TrackCapturer::GetCursor ( )
overridevirtual

Report a cursor at the first gem of the track.

Returns
The cursor.
Ghidra address:
NTSC-U/C: 0x00156bc0
Ghidra address:
PAL: 0x00158448

Implements TrackReactor.


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