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

Freestyle track played as a guitar. More...

#include <axetrack.h>

Inheritance diagram for AxeTrack:
Collaboration diagram for AxeTrack:

Public Member Functions

 AxeTrack (AxeTrackData *pData, SectionBoundaries *pSections, PlayMap *pPlayMap, const float *pfMsPerTick, int nIndex, int nIntroBars, int nNumBars, int nTicksPerBar)
 Construct a guitar track.
 ~AxeTrack () override
 Stop the track and release its players.
void Start () override
 Give the players the chord and the notes of the song position, and keep them updated.
void Stop () override
 Withdraw the scheduled commands and stop every player.
void SetPlayer (Player *pPlayer) override
 End the held note and give the track to the player it plays for.
void HandleInput (Player *pPlayer, const PlayNoteEvent &event) override
 Start the note of a pressed gem button, or end it when the button is released.
void HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override
 Move the held note with the stick.
void HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override
 Ignore the input.
bool IsActive () override
 Report whether a gem button is held.
void Refresh () override
 Withdraw the scheduled commands and give the players the chord and the notes of the song position again.
void HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override
 Ignore the event.
void HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override
 Pass a stick position of the track's player to the graphics.
Public Member Functions inherited from FreestyleTrack
 FreestyleTrack (const SectionBoundaries *pSections, PlayMap *pPlayMap, const float *pfMsPerTick, int nIndex, int nNumBars, int nTicksPerBar)
 Construct a track.
 ~FreestyleTrack () override
 Release the track.
void Stop () override
 Stop the track with the song.
void SetPlayer (Player *pPlayer) override
 Commit the points of the player that leaves, assign the player, and start the bars of the player that arrives.
void HandleInput (Player *pPlayer, const PlayNoteEvent &event) override
 Send a note the track's player played, and start or stop the scoring of the time it sounds.
void HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override
 Ignore the event.
void HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override
 Pass a stick position of the track's player to the graphics and the other consoles.
void HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override
 Pass a stick position of the track's player to the graphics.
int WrapTick (int nTick)
 Wrap a tick into the repeat period of the track.
int SpanEnd (int nTick, int nStart, int nEnd)
 Report the tick at which the span that starts at a tick ends.
void UpdatePoints ()
 Award the player pending points for the time the active note sounded in the bar, and run again a twentieth of a bar later.
void StartBar (bool bSchedule)
 Commit the pending points of the bar that ends and restart the timing of the active note.
void SendUpdate (Player *pPlayer, float fX, float fY)
 Send the button and a stick position of a local player to the other consoles, at most once every 150 milliseconds.
int GetTickOffset () const
void SetTickOffset (int nTickOffset)
virtual void HandleInput (Player *pPlayer, const BtnEvent< 10 > &event)=0
 Act on a button event of a player on this 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.

Static Public Attributes

static constexpr int kNumAxers = AxeTrackData::kSetSize
 The number of gem buttons, each with an Axer.

Additional Inherited Members

Protected Attributes inherited from FreestyleTrack
int mTickOffset
Protected Attributes inherited from Track
int mIndex
Player * mPlayer

Detailed Description

Freestyle track played as a guitar.

The RTTI records the class as deriving from FreestyleTrack. The object is 0x88 bytes, and GameLogic allocates it under the tag "AxeTrack". Each gem button has an Axer that plays the notes of the button over the chord of the song position. The stick selects the note and bends the pitch while a button is held.

Constructor & Destructor Documentation

◆ AxeTrack()

AxeTrack::AxeTrack ( AxeTrackData * pData,
SectionBoundaries * pSections,
PlayMap * pPlayMap,
const float * pfMsPerTick,
int nIndex,
int nIntroBars,
int nNumBars,
int nTicksPerBar )

Construct a guitar track.

Parameters
pDataThe notes and chords of the track.
pSectionsThe sections of the song.
pPlayMapThe map of the song positions.
pfMsPerTickThe duration of one tick in milliseconds.
nIndexThe index of the track in the song.
nIntroBarsThe bars before the first section, which the track ignores.
nNumBarsThe length of the song in bars.
nTicksPerBarThe length of a bar in ticks.
Ghidra address:
NTSC-U/C: 0x00147438
Ghidra address:
PAL: 0x00148df8

◆ ~AxeTrack()

AxeTrack::~AxeTrack ( )
override

Stop the track and release its players.

Ghidra address:
NTSC-U/C: 0x00147688
Ghidra address:
PAL: 0x00149048

Member Function Documentation

◆ operator delete()

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

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

Parameters
pBlockThe block.

◆ Start()

void AxeTrack::Start ( )
overridevirtual

Give the players the chord and the notes of the song position, and keep them updated.

Ghidra address:
NTSC-U/C: 0x00147768
Ghidra address:
PAL: 0x00149128

Implements Track.

◆ Stop()

void AxeTrack::Stop ( )
overridevirtual

Withdraw the scheduled commands and stop every player.

Ghidra address:
NTSC-U/C: 0x00147798
Ghidra address:
PAL: 0x00149158

Implements Track.

◆ SetPlayer()

void AxeTrack::SetPlayer ( Player * pPlayer)
overridevirtual

End the held note and give the track to the player it plays for.

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

Reimplemented from Track.

◆ HandleInput() [1/5]

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

Start the note of a pressed gem button, or end it when the button is released.

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

Implements Track.

◆ HandleInput() [2/5]

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

Move the held note with the stick.

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

Implements Track.

◆ HandleInput() [3/5]

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

Ignore the input.

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

Implements Track.

◆ IsActive()

bool AxeTrack::IsActive ( )
inlineoverridevirtual

Report whether a gem button is held.

Returns
True while a note sounds.
Ghidra address:
NTSC-U/C: 0x00347d98
Ghidra address:
PAL: 0x003b51c8

Implements FreestyleTrack.

◆ Refresh()

void AxeTrack::Refresh ( )
overridevirtual

Withdraw the scheduled commands and give the players the chord and the notes of the song position again.

Ghidra address:
NTSC-U/C: 0x00147dd8
Ghidra address:
PAL: 0x00149798

Implements FreestyleTrack.

◆ HandleInput() [4/5]

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

Ignore the event.

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

Implements Track.

◆ HandleInput() [5/5]

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

Pass a stick position of the track's player to the graphics.

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

Implements Track.

Member Data Documentation

◆ kNumAxers

int AxeTrack::kNumAxers = AxeTrackData::kSetSize
staticconstexpr

The number of gem buttons, each with an Axer.


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