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

Position at one gem of a catch track, walked in the order the song plays the gems. More...

#include <gemcursor.h>

Public Member Functions

 GemCursor (PlayMap *pPlayMap, CatchTrackData *pData, int nTick)
 Construct a cursor at the first gem at or after a tick.
 GemCursor ()
 Construct a cursor past the last gem of no track.
 GemCursor (const GemCursor &other)
 Copy another cursor.
GemCursor & operator= (const GemCursor &other)
 Copy another cursor.
bool IsValid () const
 Report whether the cursor is at a gem.
int GetTick () const
 Report the tick the song plays the gem at.
int GetLane () const
 Report the lane of the gem.
Muse * GetMuse () const
 Report the music of the gem.
void Advance ()
 Move to the next gem.
void AdvanceToTick (int nTick, bool bSkipCurrent, int *pIsLast)
 Move to the first gem the song plays at or after a tick, following the loops of the play map.
void AdvanceToLane (int nLane)
 Move to the next gem in a lane.
bool operator== (const GemCursor &other) const
 Report whether two cursors are at the same gem.
GemCursor Next ()
 Move to the next gem.

Detailed Description

Position at one gem of a catch track, walked in the order the song plays the gems.

The class is not polymorphic and has no RTTI. The name is inferred. A cursor whose index is -1 is past the last gem. The play map repeats stretches of the song, and mOffset maps the tick of the gem in the song as written to the tick the song plays it at.

Constructor & Destructor Documentation

◆ GemCursor() [1/3]

GemCursor::GemCursor ( PlayMap * pPlayMap,
CatchTrackData * pData,
int nTick )

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

Parameters
pPlayMapThe play map of the song.
pDataThe gems.
nTickThe tick the song plays at.
Ghidra address:
NTSC-U/C: 0x00117428
Ghidra address:
PAL: 0x00118bc0

◆ GemCursor() [2/3]

GemCursor::GemCursor ( )

Construct a cursor past the last gem of no track.

Ghidra address:
NTSC-U/C: 0x001174c8
Ghidra address:
PAL: 0x00118c60

◆ GemCursor() [3/3]

GemCursor::GemCursor ( const GemCursor & other)

Copy another cursor.

Parameters
otherThe cursor.
Ghidra address:
NTSC-U/C: 0x001174e8
Ghidra address:
PAL: 0x00118c80

Member Function Documentation

◆ operator=()

GemCursor & GemCursor::operator= ( const GemCursor & other)

Copy another cursor.

Parameters
otherThe cursor.
Returns
This cursor.
Ghidra address:
NTSC-U/C: 0x00117510
Ghidra address:
PAL: 0x00118ca8

◆ IsValid()

bool GemCursor::IsValid ( ) const

Report whether the cursor is at a gem.

Returns
Whether the index is not -1.
Ghidra address:
NTSC-U/C: 0x00117548
Ghidra address:
PAL: 0x00118ce0

◆ GetTick()

int GemCursor::GetTick ( ) const

Report the tick the song plays the gem at.

Returns
The tick of the gem plus mOffset.
Ghidra address:
NTSC-U/C: 0x00117558
Ghidra address:
PAL: 0x00118cf0

◆ GetLane()

int GemCursor::GetLane ( ) const

Report the lane of the gem.

Returns
The lane.
Ghidra address:
NTSC-U/C: 0x00117590
Ghidra address:
PAL: 0x00118d28

◆ GetMuse()

Muse * GemCursor::GetMuse ( ) const

Report the music of the gem.

Returns
The music.
Ghidra address:
NTSC-U/C: 0x001175b8
Ghidra address:
PAL: 0x00118d50

◆ Advance()

void GemCursor::Advance ( )

Move to the next gem.

Ghidra address:
NTSC-U/C: 0x001175e0
Ghidra address:
PAL: 0x00118d78

◆ AdvanceToTick()

void GemCursor::AdvanceToTick ( int nTick,
bool bSkipCurrent,
int * pIsLast )

Move to the first gem the song plays at or after a tick, following the loops of the play map.

Parameters
nTickThe tick the song plays at.
bSkipCurrentWhether to step past the current gem first.
pIsLastReceives whether the search arrived at the last loop of the play map.
Ghidra address:
NTSC-U/C: 0x00117620
Ghidra address:
PAL: 0x00118db8

◆ AdvanceToLane()

void GemCursor::AdvanceToLane ( int nLane)

Move to the next gem in a lane.

In a loop that repeats without end, the cursor moves past the last gem once it returns to the gem it started from.

Parameters
nLaneThe lane.
Ghidra address:
NTSC-U/C: 0x001177e0
Ghidra address:
PAL: 0x00118f78

◆ operator==()

bool GemCursor::operator== ( const GemCursor & other) const

Report whether two cursors are at the same gem.

Parameters
otherThe other cursor.
Returns
Whether both cursors are past the last gem, or both are at one gem of one track.
Ghidra address:
NTSC-U/C: 0x001178a0
Ghidra address:
PAL: 0x00119038

◆ Next()

GemCursor GemCursor::Next ( )

Move to the next gem.

Returns
A copy of the cursor at its new position.
Ghidra address:
NTSC-U/C: 0x00117908
Ghidra address:
PAL: 0x001190a0

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