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

Per-bar state of one catch track during a song. More...

#include <catchtrackstate.h>

Classes

struct  BarState
 State of one bar of the song as written. More...

Public Member Functions

 CatchTrackState (CatchTrackData *pData, int nNumBars, int nTicksPerBar, PlayMap *pPlayMap)
 Construct the state of every bar and mark the bars that have gems.
 ~CatchTrackState ()
 Release the state of the bars.
void SetWrittenCapturedBy (int nBar, Player *pPlayer)
 Record the player who captured the phrase of a bar.
void SetCapturedBy (int nStartBar, int nEndBar, Player *pPlayer)
 Record the player who captured the phrases of a range of bars.
Player * GetCapturedBy (int nBar)
 Report the player who captured the phrase of a bar.
void SetEnabled (int nStartBar, int nEndBar, bool bEnabled)
 Set whether the gems of a range of bars can be caught.
bool IsEnabled (int nBar)
 Report whether the gems of a bar can be caught.
bool IsBarEmpty (int nBar)
 Report whether no gem of the track lies in a bar.
bool IsWrittenBarEmpty (int nBar)
 Report whether no gem of the track lies in a bar.
void SetWrittenEnabled (int nBar, bool bEnabled)
 Set whether the gems of a bar can be caught.
int GetPowerup (int nBar)
 Report the power-up a bar awards when its phrase is caught.
void SetPowerup (int nBar, int nPowerup)
 Set the power-up a bar awards when its phrase is caught.
void SetWrittenPowerup (int nBar, int nPowerup)
 Set the power-up a bar awards when its phrase is caught.
GemCursor GetCursor ()
 Construct a cursor at the first gem of the track.
GemCursor GetCursor (int nLane, int nTick)
 Construct a cursor at the first gem of a lane at or after a tick.
GemCursor GetCursor (int nTick)
 Construct a cursor at the first gem of any lane at or after a tick.
void ClearBars (int nStartBar, int nEndBar)
 Disable a range of bars and remove the gems the range has.
CatchTrackData * GetData () const
 Report the gems of the track.

Detailed Description

Per-bar state of one catch track during a song.

The RTTI includes the nested CatchTrackState::BarState. The state is kept for each bar of the song as written. The members that take a bar the song plays map it through the play map, and the members that take a bar as written index the state directly.

Constructor & Destructor Documentation

◆ CatchTrackState()

CatchTrackState::CatchTrackState ( CatchTrackData * pData,
int nNumBars,
int nTicksPerBar,
PlayMap * pPlayMap )

Construct the state of every bar and mark the bars that have gems.

Parameters
pDataThe gems of the track.
nNumBarsThe length of the song in bars.
nTicksPerBarThe song ticks in one bar.
pPlayMapThe play map of the song.
Ghidra address:
NTSC-U/C: 0x0014e000
Ghidra address:
PAL: 0x0014f9a0

◆ ~CatchTrackState()

CatchTrackState::~CatchTrackState ( )

Release the state of the bars.

Ghidra address:
NTSC-U/C: 0x0014e100
Ghidra address:
PAL: 0x0014faa0

Member Function Documentation

◆ SetWrittenCapturedBy()

void CatchTrackState::SetWrittenCapturedBy ( int nBar,
Player * pPlayer )

Record the player who captured the phrase of a bar.

The name is inferred.

Parameters
nBarThe bar as written.
pPlayerThe player, or null.
Ghidra address:
NTSC-U/C: 0x0014e1a0
Ghidra address:
PAL: 0x0014fb40

◆ SetCapturedBy()

void CatchTrackState::SetCapturedBy ( int nStartBar,
int nEndBar,
Player * pPlayer )

Record the player who captured the phrases of a range of bars.

The name is inferred.

Parameters
nStartBarThe first bar the song plays.
nEndBarThe bar after the range.
pPlayerThe player, or null.
Ghidra address:
NTSC-U/C: 0x0014e1b8
Ghidra address:
PAL: 0x0014fb58

◆ GetCapturedBy()

Player * CatchTrackState::GetCapturedBy ( int nBar)

Report the player who captured the phrase of a bar.

Parameters
nBarThe bar the song plays.
Returns
The player, or null while the phrase is not captured.
Ghidra address:
NTSC-U/C: 0x0014e230
Ghidra address:
PAL: 0x0014fbd0

◆ SetEnabled()

void CatchTrackState::SetEnabled ( int nStartBar,
int nEndBar,
bool bEnabled )

Set whether the gems of a range of bars can be caught.

Parameters
nStartBarThe first bar the song plays.
nEndBarThe bar after the range.
bEnabledWhether the gems can be caught.
Ghidra address:
NTSC-U/C: 0x0014e270
Ghidra address:
PAL: 0x0014fc10

◆ IsEnabled()

bool CatchTrackState::IsEnabled ( int nBar)

Report whether the gems of a bar can be caught.

Parameters
nBarThe bar the song plays.
Returns
Whether the gems can be caught.
Ghidra address:
NTSC-U/C: 0x0014e2e8
Ghidra address:
PAL: 0x0014fc88

◆ IsBarEmpty()

bool CatchTrackState::IsBarEmpty ( int nBar)

Report whether no gem of the track lies in a bar.

Parameters
nBarThe bar the song plays.
Returns
Whether the bar has no gems.
Ghidra address:
NTSC-U/C: 0x0014e320
Ghidra address:
PAL: 0x0014fcc0

◆ IsWrittenBarEmpty()

bool CatchTrackState::IsWrittenBarEmpty ( int nBar)

Report whether no gem of the track lies in a bar.

The name is inferred.

Parameters
nBarThe bar as written.
Returns
Whether the bar has no gems.
Ghidra address:
NTSC-U/C: 0x0014e360
Ghidra address:
PAL: 0x0014fd00

◆ SetWrittenEnabled()

void CatchTrackState::SetWrittenEnabled ( int nBar,
bool bEnabled )

Set whether the gems of a bar can be caught.

The name is inferred.

Parameters
nBarThe bar as written.
bEnabledWhether the gems can be caught.
Ghidra address:
NTSC-U/C: 0x0014e378
Ghidra address:
PAL: 0x0014fd18

◆ GetPowerup()

int CatchTrackState::GetPowerup ( int nBar)

Report the power-up a bar awards when its phrase is caught.

Parameters
nBarThe bar the song plays.
Returns
The kind of power-up, or 0 for none.
Ghidra address:
NTSC-U/C: 0x0014e390
Ghidra address:
PAL: 0x0014fd30

◆ SetPowerup()

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

Set the power-up a bar awards when its phrase is caught.

The name is inferred.

Parameters
nBarThe bar the song plays.
nPowerupThe kind of power-up, or 0 for none.
Ghidra address:
NTSC-U/C: 0x0014e3c8
Ghidra address:
PAL: 0x0014fd68

◆ SetWrittenPowerup()

void CatchTrackState::SetWrittenPowerup ( int nBar,
int nPowerup )

Set the power-up a bar awards when its phrase is caught.

The name is inferred.

Parameters
nBarThe bar as written.
nPowerupThe kind of power-up, or 0 for none.
Ghidra address:
NTSC-U/C: 0x0014e410
Ghidra address:
PAL: 0x0014fdb0

◆ GetCursor() [1/3]

GemCursor CatchTrackState::GetCursor ( )

Construct a cursor at the first gem of the track.

Returns
The cursor.
Ghidra address:
NTSC-U/C: 0x0014e428
Ghidra address:
PAL: 0x0014fdc8

◆ GetCursor() [2/3]

GemCursor CatchTrackState::GetCursor ( int nLane,
int nTick )

Construct a cursor at the first gem of a lane at or after a tick.

Parameters
nLaneThe lane.
nTickThe tick the song plays at.
Returns
The cursor.
Ghidra address:
NTSC-U/C: 0x0014e458
Ghidra address:
PAL: 0x0014fdf8

◆ GetCursor() [3/3]

GemCursor CatchTrackState::GetCursor ( int nTick)

Construct a cursor at the first gem of any lane at or after a tick.

Parameters
nTickThe tick the song plays at.
Returns
The cursor.
Ghidra address:
NTSC-U/C: 0x0014e480
Ghidra address:
PAL: 0x0014fe20

◆ ClearBars()

void CatchTrackState::ClearBars ( int nStartBar,
int nEndBar )

Disable a range of bars and remove the gems the range has.

Parameters
nStartBarThe first bar the song plays.
nEndBarThe bar after the range.
Ghidra address:
NTSC-U/C: 0x0014e560
Ghidra address:
PAL: 0x0014ff00

◆ GetData()

CatchTrackData * CatchTrackState::GetData ( ) const
inline

Report the gems of the track.

Inline.

Returns
The gems.

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