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

Track whose phrases a player captures by playing them. More...

#include <catchtrack.h>

Inheritance diagram for CatchTrack:
Collaboration diagram for CatchTrack:

Classes

class  DeactivateCmd
 Command that ends the captured run of the track. More...
class  CaptureReceiver
 Receiver of the runs of the capturer of a track. More...

Public Member Functions

 CatchTrack (GameLogic *pLogic, CatchTrackData *pData, const float *pfMsPerTick, PlayMap *pPlayMap, SectionBoundaries *pSections, int nIndex, int nIntroBars, int nNumBars, int nTicksPerBar, int nFlags)
 Construct a catch track.
 ~CatchTrack () override
 Stop and release the track.
void Start () override
 Start the display, the music, and the guide ticker of the track, once.
void Stop () override
 Stop the track and every scheduled command.
void SetPlayer (Player *pPlayer) override
 Give the track to the player it plays for.
void HandleInput (Player *pPlayer, const PlayNoteEvent &event) override
 Pass a button press of the track's player to the capturer, or show another player that the track is behind.
void HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override
 Ignore the input.
void HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override
 Ignore the input.
void HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override
 Ignore the input.
void HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override
 Ignore the input.
void AddBackMusic (BackMusic *pMusic)
 Play a background music track while a captured run of this track plays.
void Loop (int nBar)
 Redraw the track from a bar and restart the capturer after the song gained a loop.
void SetPowerup (int nBar, int nPowerup)
 Place a power-up in a bar.
void SetBarPowerup (int nBar, int nPowerup)
 Place a power-up in a bar as written.
void Enable (int nBar)
 Enable the bars with gems from a bar on, except the checkpoint bars at the start of each section, then redraw the track and start the capturer.
void Restart (Player *pPlayer, int nTick)
 Enable every bar, give every bar to a player, and move the display to a tick.
bool HasPhraseAt (int nBar)
 Report whether a phrase of the track is in a bar.
bool FindPhrase (int nBar, int *pTick, int *pLane)
 Find the first gem of the next phrase from a bar.
int GetNextGemTick (int nTick, int *pLane)
 Report the tick of the first gem at or after a tick.
void Capture (int nBar, Player *pPlayer)
 Capture the phrase of a bar for a player.
bool Autocatch (int nBar, Player *pPlayer)
 Capture the phrase of a bar or the next bar for a player with the autocatcher power-up.
void Freestyle (int nBar, int nBars, Player *pPlayer)
 Give a player the freestyle power-up for a number of bars.
void AssignBars (int nBar, int nBars, Player *pPlayer)
 Give a run of bars as written to a player, or take them from every player.
void SetAutopilot (bool bAutopilot)
 Turn on or off the automatic play of the track's gems.
void SetNoSeeker (bool bNoSeeker)
 Hide or show the seeker of the track.
Public Member Functions inherited from Track
 Track (int nIndex)
 Construct a track with no player.
virtual ~Track ()
 Release the track.
int GetIndex () const
Player * GetPlayer () const

Static Public Member Functions

static void operator delete (void *pBlock)
 Release a track to the pool heap GameLogic allocated it from.

Additional Inherited Members

Protected Attributes inherited from Track
int mIndex
Player * mPlayer

Detailed Description

Track whose phrases a player captures by playing them.

The RTTI records the class as deriving from Track, and includes the nested CatchTrack::DeactivateCmd and CatchTrack::CaptureReceiver. The object is 0x148 bytes, and GameLogic allocates it under the tag "CatchTrack". A captured run of bars plays its music and the background music of the track until the run ends.

Constructor & Destructor Documentation

◆ CatchTrack()

CatchTrack::CatchTrack ( GameLogic * pLogic,
CatchTrackData * pData,
const float * pfMsPerTick,
PlayMap * pPlayMap,
SectionBoundaries * pSections,
int nIndex,
int nIntroBars,
int nNumBars,
int nTicksPerBar,
int nFlags )

Construct a catch track.

Parameters
pLogicThe logic of the game.
pDataThe gems of the track.
pfMsPerTickThe duration of one tick in milliseconds.
pPlayMapThe map of the song positions.
pSectionsThe sections of the song.
nIndexThe index of the track among the catch tracks.
nIntroBarsThe bars before the first section.
nNumBarsThe length of the song in bars.
nTicksPerBarThe length of a bar in ticks.
nFlagsNonzero for each bar of music to stop the bar before it.
Ghidra address:
NTSC-U/C: 0x0014c4a8
Ghidra address:
PAL: 0x0014de48

◆ ~CatchTrack()

CatchTrack::~CatchTrack ( )
override

Stop and release the track.

Ghidra address:
NTSC-U/C: 0x0014c698
Ghidra address:
PAL: 0x0014e038

Member Function Documentation

◆ operator delete()

void CatchTrack::operator delete ( void * pBlock)
inlinestatic

Release a track to the pool heap GameLogic allocated it from.

Parameters
pBlockThe block.

◆ Start()

void CatchTrack::Start ( )
overridevirtual

Start the display, the music, and the guide ticker of the track, once.

Ghidra address:
NTSC-U/C: 0x0014c8e0
Ghidra address:
PAL: 0x0014e280

Implements Track.

◆ Stop()

void CatchTrack::Stop ( )
overridevirtual

Stop the track and every scheduled command.

Ghidra address:
NTSC-U/C: 0x0014ca38
Ghidra address:
PAL: 0x0014e3d8

Implements Track.

◆ SetPlayer()

void CatchTrack::SetPlayer ( Player * pPlayer)
overridevirtual

Give the track to the player it plays for.

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

Reimplemented from Track.

◆ HandleInput() [1/5]

void CatchTrack::HandleInput ( Player * pPlayer,
const PlayNoteEvent & event )
overridevirtual

Pass a button press of the track's player to the capturer, or show another player that the track is behind.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0014cde0
Ghidra address:
PAL: 0x0014e780

Implements Track.

◆ HandleInput() [2/5]

void CatchTrack::HandleInput ( Player * pPlayer,
const BtnEvent< 8 > & event )
inlineoverridevirtual

Ignore the input.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0034a950
Ghidra address:
PAL: 0x003b7d80

Implements Track.

◆ HandleInput() [3/5]

void CatchTrack::HandleInput ( Player * pPlayer,
const StickEvent< 2 > & event )
inlineoverridevirtual

Ignore the input.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0034a958
Ghidra address:
PAL: 0x003b7d88

Implements Track.

◆ HandleInput() [4/5]

void CatchTrack::HandleInput ( Player * pPlayer,
const StickEvent< 6 > & event )
inlineoverridevirtual

Ignore the input.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0034a960
Ghidra address:
PAL: 0x003b7d90

Implements Track.

◆ HandleInput() [5/5]

void CatchTrack::HandleInput ( Player * pPlayer,
const BtnEvent< 10 > & event )
inlineoverridevirtual

Ignore the input.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0034a968
Ghidra address:
PAL: 0x003b7d98

Implements Track.

◆ AddBackMusic()

void CatchTrack::AddBackMusic ( BackMusic * pMusic)

Play a background music track while a captured run of this track plays.

Parameters
pMusicThe background music.
Ghidra address:
NTSC-U/C: 0x0014c798
Ghidra address:
PAL: 0x0014e138

◆ Loop()

void CatchTrack::Loop ( int nBar)

Redraw the track from a bar and restart the capturer after the song gained a loop.

The name is inferred.

Parameters
nBarThe bar the loop plays from.
Ghidra address:
NTSC-U/C: 0x0014cc18
Ghidra address:
PAL: 0x0014e5b8

◆ SetPowerup()

void CatchTrack::SetPowerup ( int nBar,
int nPowerup )

Place a power-up in a bar.

Parameters
nBarThe bar the song plays.
nPowerupOne of GameLogic::Powerup.
Ghidra address:
NTSC-U/C: 0x0014cc50
Ghidra address:
PAL: 0x0014e5f0

◆ SetBarPowerup()

void CatchTrack::SetBarPowerup ( int nBar,
int nPowerup )

Place a power-up in a bar as written.

The name is inferred.

Parameters
nBarThe bar as written.
nPowerupOne of GameLogic::Powerup.
Ghidra address:
NTSC-U/C: 0x0014cc70
Ghidra address:
PAL: 0x0014e610

◆ Enable()

void CatchTrack::Enable ( int nBar)

Enable the bars with gems from a bar on, except the checkpoint bars at the start of each section, then redraw the track and start the capturer.

Parameters
nBarThe bar. A song with a loop enables every bar.
Ghidra address:
NTSC-U/C: 0x0014cc90
Ghidra address:
PAL: 0x0014e630

◆ Restart()

void CatchTrack::Restart ( Player * pPlayer,
int nTick )

Enable every bar, give every bar to a player, and move the display to a tick.

The name is inferred.

Parameters
pPlayerThe player, or null.
nTickThe song tick to show from.
Ghidra address:
NTSC-U/C: 0x0014ce80
Ghidra address:
PAL: 0x0014e820

◆ HasPhraseAt()

bool CatchTrack::HasPhraseAt ( int nBar)

Report whether a phrase of the track is in a bar.

Parameters
nBarThe bar.
Returns
Whether a phrase is in the bar.
Ghidra address:
NTSC-U/C: 0x0014cef8
Ghidra address:
PAL: 0x0014e898

◆ FindPhrase()

bool CatchTrack::FindPhrase ( int nBar,
int * pTick,
int * pLane )

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

The name is inferred.

Parameters
nBarThe bar.
pTickReceives the tick of the gem.
pLaneReceives the lane of the gem.
Returns
True when a phrase was found.
Ghidra address:
NTSC-U/C: 0x0014cf20
Ghidra address:
PAL: 0x0014e8c0

◆ GetNextGemTick()

int CatchTrack::GetNextGemTick ( int nTick,
int * pLane )

Report the tick of the first gem at or after a tick.

Parameters
nTickThe tick.
pLaneReceives the lane of the gem when not null.
Returns
The tick of the gem, or -1 when no gem follows.
Ghidra address:
NTSC-U/C: 0x0014cf40
Ghidra address:
PAL: 0x0014e8e0

◆ Capture()

void CatchTrack::Capture ( int nBar,
Player * pPlayer )

Capture the phrase of a bar for a player.

Parameters
nBarThe bar.
pPlayerThe player.
Ghidra address:
NTSC-U/C: 0x0014cfa0
Ghidra address:
PAL: 0x0014e940

◆ Autocatch()

bool CatchTrack::Autocatch ( int nBar,
Player * pPlayer )

Capture the phrase of a bar or the next bar for a player with the autocatcher power-up.

Parameters
nBarThe bar.
pPlayerThe player.
Returns
Whether a phrase was captured.
Ghidra address:
NTSC-U/C: 0x0014cfd0
Ghidra address:
PAL: 0x0014e970

◆ Freestyle()

void CatchTrack::Freestyle ( int nBar,
int nBars,
Player * pPlayer )

Give a player the freestyle power-up for a number of bars.

Parameters
nBarThe first bar.
nBarsThe number of bars.
pPlayerThe player.
Ghidra address:
NTSC-U/C: 0x0014d250
Ghidra address:
PAL: 0x0014ebf0

◆ AssignBars()

void CatchTrack::AssignBars ( int nBar,
int nBars,
Player * pPlayer )

Give a run of bars as written to a player, or take them from every player.

The name is inferred.

Parameters
nBarThe first bar.
nBarsThe number of bars.
pPlayerThe player, or null.
Ghidra address:
NTSC-U/C: 0x0014d420
Ghidra address:
PAL: 0x0014edc0

◆ SetAutopilot()

void CatchTrack::SetAutopilot ( bool bAutopilot)

Turn on or off the automatic play of the track's gems.

The name is inferred.

Parameters
bAutopilotPlay the gems automatically.
Ghidra address:
NTSC-U/C: 0x0014d790
Ghidra address:
PAL: 0x0014f130

◆ SetNoSeeker()

void CatchTrack::SetNoSeeker ( bool bNoSeeker)

Hide or show the seeker of the track.

The name is inferred.

Parameters
bNoSeekerHide the seeker.
Ghidra address:
NTSC-U/C: 0x0014d7b0
Ghidra address:
PAL: 0x0014f150

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