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

Assignment of the players of a game to its tracks, with the rotation between the tracks. More...

#include <gametrackselector.h>

Public Member Functions

 GameTrackSelector (const std::vector< Track * > &tracks, FreestyleTrack *pFreestyleTrack, int nFreestyleType, int nFreestyleInstrument)
 Construct the assignment over the tracks of a song, with no players.
bool IsFreestyleTrack (int nTrack) const
 Report whether a track is the freestyle track.
void AddPlayer (Player *pPlayer, int nTrack)
 Add a player on a track.
int GetNumPlayers () const
 Report the number of players.
int GetNumTracks () const
 Report the number of tracks, the freestyle track included.
void EnterFreestyle (int nPlayer, bool bVictory)
 Move a player to the freestyle track.
void MovePlayer (int nPlayer, int nTrack)
 Move a player to a track.
void SetPlayerTrack (int nPlayer, int nTrack, bool bVictory)
 Move a player to a track or off every track, and give each track its first player.
void RotatePrevious (int nPlayer)
 Move a player to the previous track, unless the player is on the first one.
void RotateNext (int nPlayer)
 Move a player to the next track, unless that is the last track.
int GetPlayerTrack (int nPlayer) const
 Report the track of a player.
int GetPlayerSlot (int nPlayer) const
 Report the slot of a player on its track.
void SwapPlayer (int nPlayer, int nTrack, int nSlot)
 Swap a player with the player in a slot of a track.
void Resync ()
 Give every player its track and every track its first player after a swap.
void RemovePlayer (int nPlayer)
 Remove a player from every track and hide its displays.
void RefreshTrack (int nTrack)
 Show the players on a track.

Detailed Description

Assignment of the players of a game to its tracks, with the rotation between the tracks.

The RTTI includes the class name through a member command. The class is not polymorphic. The catch tracks come first in mTracks, and the freestyle track, when the song has one, comes last. The first player on each track is the one the track plays for. Every change is shown through TheGfxManager, and the controllers of the first player on a track pulse on the beat.

Constructor & Destructor Documentation

◆ GameTrackSelector()

GameTrackSelector::GameTrackSelector ( const std::vector< Track * > & tracks,
FreestyleTrack * pFreestyleTrack,
int nFreestyleType,
int nFreestyleInstrument )

Construct the assignment over the tracks of a song, with no players.

Parameters
tracksThe catch tracks.
pFreestyleTrackThe freestyle track, or null.
nFreestyleTypeThe track type of the freestyle track.
nFreestyleInstrumentThe instrument of the freestyle track.
Ghidra address:
NTSC-U/C: 0x00115bb8
Ghidra address:
PAL: 0x00117350

Member Function Documentation

◆ IsFreestyleTrack()

bool GameTrackSelector::IsFreestyleTrack ( int nTrack) const

Report whether a track is the freestyle track.

Parameters
nTrackThe track.
Returns
Whether the song has a freestyle track and the track is the last one.
Ghidra address:
NTSC-U/C: 0x00116008
Ghidra address:
PAL: 0x001177a0

◆ AddPlayer()

void GameTrackSelector::AddPlayer ( Player * pPlayer,
int nTrack )

Add a player on a track.

Parameters
pPlayerThe player.
nTrackThe track.
Ghidra address:
NTSC-U/C: 0x00116040
Ghidra address:
PAL: 0x001177d8

◆ GetNumPlayers()

int GameTrackSelector::GetNumPlayers ( ) const

Report the number of players.

Returns
The number of players.
Ghidra address:
NTSC-U/C: 0x00116228
Ghidra address:
PAL: 0x001179c0

◆ GetNumTracks()

int GameTrackSelector::GetNumTracks ( ) const

Report the number of tracks, the freestyle track included.

Returns
The number of tracks.
Ghidra address:
NTSC-U/C: 0x00116248
Ghidra address:
PAL: 0x001179e0

◆ EnterFreestyle()

void GameTrackSelector::EnterFreestyle ( int nPlayer,
bool bVictory )

Move a player to the freestyle track.

Parameters
nPlayerThe player.
bVictoryWhether the freestyle rewards a won song.
Ghidra address:
NTSC-U/C: 0x00116268
Ghidra address:
PAL: 0x00117a00

◆ MovePlayer()

void GameTrackSelector::MovePlayer ( int nPlayer,
int nTrack )

Move a player to a track.

Parameters
nPlayerThe player.
nTrackThe track.
Ghidra address:
NTSC-U/C: 0x001162a0
Ghidra address:
PAL: 0x00117a38

◆ SetPlayerTrack()

void GameTrackSelector::SetPlayerTrack ( int nPlayer,
int nTrack,
bool bVictory )

Move a player to a track or off every track, and give each track its first player.

Parameters
nPlayerThe player.
nTrackThe track, or -1 to remove the player from every track.
bVictoryWhether a move to the freestyle track rewards a won song.
Ghidra address:
NTSC-U/C: 0x001162c0
Ghidra address:
PAL: 0x00117a58

◆ RotatePrevious()

void GameTrackSelector::RotatePrevious ( int nPlayer)

Move a player to the previous track, unless the player is on the first one.

Parameters
nPlayerThe player.
Ghidra address:
NTSC-U/C: 0x00116510
Ghidra address:
PAL: 0x00117ca8

◆ RotateNext()

void GameTrackSelector::RotateNext ( int nPlayer)

Move a player to the next track, unless that is the last track.

Parameters
nPlayerThe player.
Ghidra address:
NTSC-U/C: 0x00116558
Ghidra address:
PAL: 0x00117cf0

◆ GetPlayerTrack()

int GameTrackSelector::GetPlayerTrack ( int nPlayer) const

Report the track of a player.

Parameters
nPlayerThe player.
Returns
The track, or -1.
Ghidra address:
NTSC-U/C: 0x001165b8
Ghidra address:
PAL: 0x00117d50

◆ GetPlayerSlot()

int GameTrackSelector::GetPlayerSlot ( int nPlayer) const

Report the slot of a player on its track.

Parameters
nPlayerThe player.
Returns
The slot, 0 for the first player on the track.
Ghidra address:
NTSC-U/C: 0x001165d8
Ghidra address:
PAL: 0x00117d70

◆ SwapPlayer()

void GameTrackSelector::SwapPlayer ( int nPlayer,
int nTrack,
int nSlot )

Swap a player with the player in a slot of a track.

Resync() applies the swap to the tracks.

Parameters
nPlayerThe player.
nTrackThe track.
nSlotThe slot.
Ghidra address:
NTSC-U/C: 0x001165f8
Ghidra address:
PAL: 0x00117d90

◆ Resync()

void GameTrackSelector::Resync ( )

Give every player its track and every track its first player after a swap.

Ghidra address:
NTSC-U/C: 0x00116618
Ghidra address:
PAL: 0x00117db0

◆ RemovePlayer()

void GameTrackSelector::RemovePlayer ( int nPlayer)

Remove a player from every track and hide its displays.

Parameters
nPlayerThe player.
Ghidra address:
NTSC-U/C: 0x00116868
Ghidra address:
PAL: 0x00118000

◆ RefreshTrack()

void GameTrackSelector::RefreshTrack ( int nTrack)

Show the players on a track.

Parameters
nTrackThe track.
Ghidra address:
NTSC-U/C: 0x001168e8
Ghidra address:
PAL: 0x00118080

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