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

Track of one player in a duel, on which the player places a phrase or catches the phrase the other player placed. More...

#include <dueltrack.h>

Inheritance diagram for DuelTrack:
Collaboration diagram for DuelTrack:

Public Types

enum  Mode { kModeIdle = 0 , kModePitch = 1 , kModeCatch = 2 }
 The values of SetMode() and ShowPhrase(). More...

Public Member Functions

 DuelTrack (DuelLogic *pLogic, Player *pPlayer, CatchTrackData *pCatchGems, CatchTrackData *pPitchGems, PitchTrackRiffData *pRiffData, DuelPatternTable *pPatterns, const float *pTickDuration, PlayMap *pPlayMap, SectionBoundaries *pSections, int nSide, int nOpponentSide, int nLeadInBars, int nNumBars, int nTicksPerBar, int nPhraseBars, bool bEasiest)
 Construct the track of one player.
 ~DuelTrack () override
 Release the track.
void Start () override
 Start the track with the song.
void Stop () override
 Stop the track with the song.
void HandleInput (Player *pPlayer, const PlayNoteEvent &event) override
 Hand a press of the player on the track to the pitcher or to the catcher.
void HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override
 Ignore a button event.
void HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override
 Ignore a stick event.
void HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override
 Ignore a stick event.
void HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override
 Ignore a button event.
int GetTicksPerBar () const override
 Report the song ticks in one bar.
Player * GetPlayer () const override
 Report the player of the side the track belongs to.
bool IsBarActive (int nBar) override
 Report that the phrase of every bar can be played.
void HitGem (int nTick, const GemCursor &cursor, bool bRemote) override
 Play the riff of a caught gem and show the catch.
void MissGem (int nTick, const GemCursor &cursor, bool bRemote) override
 End the catch as missed when a gem of the phrase to catch passes without a press.
GemCursor GetCursor () override
 Report a cursor at the first gem the player catches.
void ShowPhrase (int nMode, int nStartBar, int nEndBar)
 Show the bars of the next phrase.
void SetMode (int nMode, int nBar)
 Change what the player does on the track.
void CountGem ()
 Count one more gem in the phrase to catch.
void DropBars (int nStartBar, int nEndBar)
 Disable a range of bars the song has passed and remove the gems the range has.
void Rewind ()
 Move the playback of the track to the current song position.
void CancelPhrase ()
 Withdraw the command that runs once per phrase.
void MissCatch ()
 End the current catch as missed.
void MakeCatch (int nBar)
 End the current catch as made.
void SetRiffData (PitchTrackRiffData *pRiffData)
 Change the riffs the gems the player places play.
Public Member Functions inherited from Track
 Track (int nIndex)
 Construct a track with no player.
virtual ~Track ()
 Release the track.
virtual void SetPlayer (Player *pPlayer)
 Assign the player, and record the assignment in the session statistics.
int GetIndex () const
Player * GetPlayer () const
Public Member Functions inherited from TrackReactor
virtual ~TrackReactor ()
 Release the interface.

Additional Inherited Members

Protected Attributes inherited from Track
int mIndex
Player * mPlayer

Detailed Description

Track of one player in a duel, on which the player places a phrase or catches the phrase the other player placed.

The RTTI records the class as deriving from Track and TrackReactor. The object is 0x10c bytes. The presses of a phrase to place go to a DuelTrackPitcher, and the presses of a phrase to catch go to a GemCatcher. Each reports to the track through a nested receiver. The names of the members other than the constructor, the destructor, and the Track and TrackReactor overrides are inferred.

Member Enumeration Documentation

◆ Mode

The values of SetMode() and ShowPhrase().

Enumerator
kModeIdle 

The track shows no phrase.

kModePitch 

The player places a phrase.

kModeCatch 

The player catches the phrase the other player placed.

Constructor & Destructor Documentation

◆ DuelTrack()

DuelTrack::DuelTrack ( DuelLogic * pLogic,
Player * pPlayer,
CatchTrackData * pCatchGems,
CatchTrackData * pPitchGems,
PitchTrackRiffData * pRiffData,
DuelPatternTable * pPatterns,
const float * pTickDuration,
PlayMap * pPlayMap,
SectionBoundaries * pSections,
int nSide,
int nOpponentSide,
int nLeadInBars,
int nNumBars,
int nTicksPerBar,
int nPhraseBars,
bool bEasiest )

Construct the track of one player.

Parameters
pLogicThe rules the track reports to.
pPlayerThe player.
pCatchGemsThe gems the other player places for the player to catch.
pPitchGemsThe gems the player places for the other player to catch.
pRiffDataThe riffs of the song track the duel plays first.
pPatternsThe duel patterns of the song.
pTickDurationThe duration of one tick on the song clock.
pPlayMapThe map of the song positions.
pSectionsThe sections of the song. It is unused.
nSideThe side of the player.
nOpponentSideThe side of the other player.
nLeadInBarsOne more than the bars the song plays before bar 0. It is unused.
nNumBarsThe length of the song in bars.
nTicksPerBarThe song ticks in one bar.
nPhraseBarsThe length of a phrase in bars.
bEasiestWhether the song is at the easiest difficulty, at which the duel coaches the players.
Ghidra address:
NTSC-U/C: 0x0010ab10
Ghidra address:
PAL: 0x0010c248

◆ ~DuelTrack()

DuelTrack::~DuelTrack ( )
override

Release the track.

Ghidra address:
NTSC-U/C: 0x0010adc0
Ghidra address:
PAL: 0x0010c4f8

Member Function Documentation

◆ Start()

void DuelTrack::Start ( )
overridevirtual

Start the track with the song.

Ghidra address:
NTSC-U/C: 0x0010aef8
Ghidra address:
PAL: 0x0010c630

Implements Track.

◆ Stop()

void DuelTrack::Stop ( )
overridevirtual

Stop the track with the song.

Ghidra address:
NTSC-U/C: 0x0010af58
Ghidra address:
PAL: 0x0010c690

Implements Track.

◆ HandleInput() [1/5]

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

Hand a press of the player on the track to the pitcher or to the catcher.

A press while the phrase is already decided plays the refusal sound.

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

Implements Track.

◆ HandleInput() [2/5]

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

Ignore a button event.

The body is empty.

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

Implements Track.

◆ HandleInput() [3/5]

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

Ignore a stick event.

The body is empty.

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

Implements Track.

◆ HandleInput() [4/5]

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

Ignore a stick event.

The body is empty.

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

Implements Track.

◆ HandleInput() [5/5]

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

Ignore a button event.

The body is empty.

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

Implements Track.

◆ GetTicksPerBar()

int DuelTrack::GetTicksPerBar ( ) const
inlineoverridevirtual

Report the song ticks in one bar.

Returns
The ticks.
Ghidra address:
NTSC-U/C: 0x003352f8
Ghidra address:
PAL: 0x003a28a8

Implements TrackReactor.

◆ GetPlayer()

Player * DuelTrack::GetPlayer ( ) const
inlineoverridevirtual

Report the player of the side the track belongs to.

Returns
The player.
Ghidra address:
NTSC-U/C: 0x00335300
Ghidra address:
PAL: 0x003a28b0

Implements TrackReactor.

◆ IsBarActive()

bool DuelTrack::IsBarActive ( int nBar)
overridevirtual

Report that the phrase of every bar can be played.

Parameters
nBarThe bar.
Returns
True.
Ghidra address:
NTSC-U/C: 0x0010bdc0
Ghidra address:
PAL: 0x0010d4f8

Implements TrackReactor.

◆ HitGem()

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

Play the riff of a caught gem and show the catch.

The gem counts towards the catch when it lies in the phrase to catch, and catching the last gem of the phrase ends the catch as made.

Parameters
nTickThe song tick of the press.
cursorThe gem.
bRemoteWhether the catch came from another console.
Ghidra address:
NTSC-U/C: 0x0010b5a0
Ghidra address:
PAL: 0x0010ccd8

Implements TrackReactor.

◆ MissGem()

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

End the catch as missed when a gem of the phrase to catch passes without a press.

Only a player on this console misses a gem this way.

Parameters
nTickThe song tick the gem was judged at.
cursorThe gem.
bRemoteWhether the miss came from another console.
Ghidra address:
NTSC-U/C: 0x0010b7c8
Ghidra address:
PAL: 0x0010cf00

Implements TrackReactor.

◆ GetCursor()

GemCursor DuelTrack::GetCursor ( )
overridevirtual

Report a cursor at the first gem the player catches.

Returns
The cursor.
Ghidra address:
NTSC-U/C: 0x0010bd90
Ghidra address:
PAL: 0x0010d4c8

Implements TrackReactor.

◆ ShowPhrase()

void DuelTrack::ShowPhrase ( int nMode,
int nStartBar,
int nEndBar )

Show the bars of the next phrase.

Parameters
nModeOne of Mode. kModePitch also shows the steps the duel pattern allows.
nStartBarThe first bar of the phrase.
nEndBarThe bar after the phrase.
Ghidra address:
NTSC-U/C: 0x0010b088
Ghidra address:
PAL: 0x0010c7c0

◆ SetMode()

void DuelTrack::SetMode ( int nMode,
int nBar )

Change what the player does on the track.

Catching a phrase with no gems ends the catch as made at once.

Parameters
nModeOne of Mode.
nBarThe bar the change takes effect at.
Ghidra address:
NTSC-U/C: 0x0010b0e0
Ghidra address:
PAL: 0x0010c818

◆ CountGem()

void DuelTrack::CountGem ( )

Count one more gem in the phrase to catch.

Ghidra address:
NTSC-U/C: 0x0010b3a0
Ghidra address:
PAL: 0x0010cad8

◆ DropBars()

void DuelTrack::DropBars ( int nStartBar,
int nEndBar )

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

Parameters
nStartBarThe first bar of the range.
nEndBarThe bar after the range.
Ghidra address:
NTSC-U/C: 0x0010b3b0
Ghidra address:
PAL: 0x0010cae8

◆ Rewind()

void DuelTrack::Rewind ( )

Move the playback of the track to the current song position.

Ghidra address:
NTSC-U/C: 0x0010b3d0
Ghidra address:
PAL: 0x0010cb08

◆ CancelPhrase()

void DuelTrack::CancelPhrase ( )

Withdraw the command that runs once per phrase.

Ghidra address:
NTSC-U/C: 0x0010b438
Ghidra address:
PAL: 0x0010cb70

◆ MissCatch()

void DuelTrack::MissCatch ( )

End the current catch as missed.

In an online duel, the miss is sent to the other console first.

Ghidra address:
NTSC-U/C: 0x0010ba20
Ghidra address:
PAL: 0x0010d158

◆ MakeCatch()

void DuelTrack::MakeCatch ( int nBar)

End the current catch as made.

In an online duel, the catch is sent to the other console.

Parameters
nBarThe bar the catch ended in.
Ghidra address:
NTSC-U/C: 0x0010bbb0
Ghidra address:
PAL: 0x0010d2e8

◆ SetRiffData()

void DuelTrack::SetRiffData ( PitchTrackRiffData * pRiffData)

Change the riffs the gems the player places play.

Parameters
pRiffDataThe riffs.
Ghidra address:
NTSC-U/C: 0x0010bd70
Ghidra address:
PAL: 0x0010d4a8

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