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

Settings of the game being set up or played, among them the rule set and the timing the world publishes. More...

#include <gamedb.h>

Public Types

enum  RuleSet { kRuleSetGame = 1 , kRuleSetRemix = 2 , kRuleSetDuel = 3 }
 Values of mRuleSet, one for each World subclass WorldMgr::Load() can build. More...
enum  Community { kCommunityNone = 0 , kCommunitySolo = 1 , kCommunityLocal = 2 , kCommunityOnline = 3 }
 Values of mCommunity. More...
enum  SkillLevel {
  kSkillNovice = 0 , kSkillIntermediate = 1 , kSkillAdvanced = 2 , kSkillInsane = 3 ,
  kSkillAny = 4
}
 Values of mSkillLevel. More...

Public Member Functions

 GameDb ()
 Construct the database with its defaults.
void Init ()
 Read the "db" section of the configuration.
void Terminate ()
 Release what Init() created.
void InitSfx ()
 Build TheFxMidi from the fx_midi_file entry of the "db" section, and start mSfxScheduler at the tempo of that file.
void TerminateSfx ()
 Stop mSfxScheduler and release TheFxMidi.
void Poll ()
 Service the database once per frame.
DataArray * FindSong (const char *pszSong)
 Find the entry of a song in the "songs" section.
int GetNumPlayers () const
 Report the number of players.
void SetGameParams (const NetGameParams *pParams)
 Take the settings of an online game the host published.
void SetRemixBuffer (int nSize)
 Replace the buffer of the remix data with a new one, billed to RemixBuf.
char * GetRemixBuffer ()
 Report the buffer of the remix data.
void SetRemix (const RemixInfo *pInfo)
 Copy the description of the remix the game plays.
void SetRemixActive (int nActive)
 Set the flag that the screens which choose an existing or a tutorial remix set.
int GetRemixActive () const
 Report the flag SetRemixActive() set.
void SetRemixName (const char *pszName)
 Set mRemixName.
void GetHostSongs (std::vector< SongEntry > *pSongs, int nSkillLevel, bool bDuelOnly)
 List the songs of every arena but the tutorial that are available at a skill level, without the songs of type 3 that the first profile has not unlocked.
int GetNumPads () const
 Report the number of controllers the players on this console use.
int IsLocalPlayer (int nPlayer) const
 Report whether a player plays on this console.
int GetPlayerSlot (int nPlayer) const
 Report the slot of a player, which selects the player's sounds and colours.
const char * GetPlayerName (int nPlayer) const
 Report the name of a player.
const char * GetPlayerColor (int nPlayer) const
 Report the colour symbol of a player's difficulty.
int GetPlayerNetOrder (int nPlayer) const
 Report the position of a player in the order of the online session.
int GetPlayerPad (int nPlayer) const
 Report the controller of a player.
Campaign * GetProfile (int nPlayer)
 Report the profile of a player.
AvatarPartSet * GetAvatar (int nPlayer)
 Report the avatar parts of a player, which its profile stores.
int GetPlayerScore (int nPlayer) const
 Report the score SetPlayerScore() recorded for a player.
int GetPlayerRank (int nPlayer) const
 Report the rank SetPlayerScore() gave a player, 0 for the best score.
InputMap * GetInputMap (int nPlayer)
 Report the controller bindings in the profile of a player.
void SetPlayerScore (int nPlayer, int nScore)
 Record the score of a player and rank the players by their scores.
const char * GetDemo () const
 Report the file of the demo being played.
void SetWon (bool bWon)
 Record whether the song was won.
const char * FindSongGroup ()
 Report the arena whose songs include mSong, the tutorial included.
int GetSongIndex ()
 Report the index of the arena of the game, from the digit that ends mArena, less one.
GameOptions * GetOptions ()
 Report the settings of the game options screen.
void SetOptions (const GameOptions *pOptions)
 Replace the settings of the game options screen and apply the speaker output mode.
void SetAvatarCameraParams (float fNear, float fFar)
 Set the depth range of the camera the avatars share, with Avatar::SetDepthRange().
void UnlockAllSongs ()
 Unlock every song.
int IsWinSequence () const
 Report whether the campaign win sequence runs.
void SetWinSequence (bool bWinSequence)
 Start or end the campaign win sequence.
void SetPracticeMode (bool bPracticeMode)
 Set the practice mode.
void ClearPlayers ()
 Remove every player.
void AddPlayer (const Campaign *pProfile)
 Add a player with a copy of a profile.
void AddPlayer (int bLocal, const Campaign *pProfile, int nSlot, int nNetOrder)
 Add a player of an online game with a copy of a profile.
void SetSkillLevel (int nSkillLevel)
 Set mSkillLevel.
void SetPowerupLevel (int nPowerupLevel)
 Set mPowerupLevel.
void SetTutorial (int nTutorial)
 Set whether the tutorial is played.
void SetSong (const char *pszSong)
 Set mSong.
void SetLoadRemix (bool bLoadRemix)
 Set mLoadRemix.
void SetRuleSet (int nRuleSet)
 Set mRuleSet.
void SetCommunity (int nCommunity)
 Set mCommunity.
void SetMaxPlayers (int nMaxPlayers)
 Set mMaxPlayers.
void SetDemo (const char *pszDemo)
 Choose the demo to play, or none.
void SetEnergized (float fEnergized)
 Record the fraction of the possible capture bars a solo song captured.
void SetFullMixBars (int nBars)
 Record the bars a solo song played with every track captured.
void SetBestStreak (int nStreak)
 Record the longest streak of a solo song.
void SetProgress (float fProgress)
 Record the fraction of the song played.
float GetEnergized () const
 Report the value of SetEnergized().
int GetFullMixBars () const
 Report the value of SetFullMixBars().
int GetBestStreak () const
 Report the value of SetBestStreak().
float GetProgress () const
 Report the value of SetProgress().
void SetArena (const char *pszArena)
 Set the arena of the game.
RemixInfo * GetRemixInfo ()
 Report the description of the remix being played.
void SetRemixReadOnly (int nReadOnly)
 Set mRemixReadOnly.
int GetNetRemixEnded () const
 Report whether the remix of an online game has ended.
void SetNetRemixEnded (int nEnded)
 Record whether the remix of an online game has ended.
const char * GetDifficultyName () const
 Report the localised name of the difficulty of the game.
const char * GetDifficultyName (int nSkillLevel, int nRuleSet) const
 Report the localised name of a difficulty.
const char * GetModeName () const
 Report the localised name of the mode of the game, from mRuleSet.
const char * GetModeName (int nRuleSet) const
 Report the localised name of a mode.
const char * GetPowerupName (int nPowerupLevel) const
 Report the localised name of a power-up level.
void GetArenaNames (std::vector< const char * > *pArenas, bool bIncludeTutorial)
 Append the names of the arenas of the "arenas" section, in their order there.
void GetUnlockedArenas (std::vector< const char * > *pArenas, int nSkillLevel, bool bFirstPlayerOnly, bool bIncludeTutorial)
 List the arenas the players have unlocked at a skill level.
void GetArenaSongs (std::vector< SongEntry > *pSongs, const char *pszArena, int nSkillLevel, int nFilter)
 Append the songs of an arena that are available at a skill level.
void GetUnlockedSongs (std::vector< SongEntry > *pSongs, const char *pszArena, int nSkillLevel, bool bFirstPlayerOnly)
 List the songs the players have unlocked in an arena, or in every unlocked arena.
void GetAllSongs (std::vector< SongEntry > *pSongs, bool bDuelOnly, int nSkillLevel)
 List the songs of every arena but the tutorial that are available at a skill level.
bool HasSong (const char *pszSong)
 Report whether an arena lists a song.
bool FindSongById (DataArray **ppSong, int nId)
 Find the song whose id matches.
const std::vector< std::unique_ptr< PlayerInfo > > & GetPlayers () const
const String & GetSong () const
int GetLoadRemix () const
int GetRemixReadOnly () const
const String & GetRemixName () const
void SetRemixName (const String &name)
 Set the name of the saved remix played.
int GetPracticeMode () const
int GetTutorial () const
int GetSkillLevel () const
int GetPowerupLevel () const
int GetRuleSet () const
int GetCommunity () const
int GetMaxPlayers () const
const String & GetArena () const
void SetArena (const String &arena)
 Set the arena of the game from a string.
int GetUnlockAll () const
int GetWon () const
int GetReservedA4 () const
void SetReservedA4 (int nValue)
 Set the value at +0xa4, not yet identified.
DataArray * GetSongs () const
void SetSongs (DataArray *pSongs)
 Set the songs array of the "db" section.
float GetSongTick () const
void SetSongTick (float fTick)
 Set the running world's position in ticks.
float GetSongTime () const
void SetSongTime (float fTime)
 Set the running world's position on its song clock.
Scheduler & GetSfxScheduler ()
const Scheduler & GetSfxScheduler () const

Static Public Member Functions

static GameDb * shared ()
 Report the single instance, constructing it on first use.

Static Public Attributes

static constexpr int kPowerupLevelNone = 2
 The value of mPowerupLevel that places no power-up.

Detailed Description

Settings of the game being set up or played, among them the rule set and the timing the world publishes.

The class is not polymorphic and has no RTTI. The name is inferred from the "db" section of the configuration Init() reads. The one instance is the function-local static of shared(), and TheGameDb addresses it. WorldMgr::Load() reads the rule set from +0x50, and WorldMgr::UpdateTime() writes the two timing floats at +0x158 and +0x15c.

Member Enumeration Documentation

◆ RuleSet

Values of mRuleSet, one for each World subclass WorldMgr::Load() can build.

Enumerator
kRuleSetGame 

WorldMgr::Load() builds a Game.

kRuleSetRemix 

WorldMgr::Load() builds a Remix.

kRuleSetDuel 

WorldMgr::Load() builds a Duel.

◆ Community

Values of mCommunity.

Enumerator
kCommunityNone 

No game is being set up, as in the options menu.

kCommunitySolo 

One player.

kCommunityLocal 

Several players on this console.

kCommunityOnline 

Players on several consoles.

◆ SkillLevel

Values of mSkillLevel.

The names follow the buttons of the skill menu.

Enumerator
kSkillNovice 

The novice_but level.

kSkillIntermediate 

The intermediate_but level.

kSkillAdvanced 

The advanced_but level.

kSkillInsane 

The insane_but level.

kSkillAny 

Any level, for the song and arena queries.

Constructor & Destructor Documentation

◆ GameDb()

GameDb::GameDb ( )

Construct the database with its defaults.

Ghidra address:
NTSC-U/C: 0x0026cf50
Ghidra address:
PAL: 0x00276af0

Member Function Documentation

◆ shared()

GameDb * GameDb::shared ( )
static

Report the single instance, constructing it on first use.

Returns
The instance.
Ghidra address:
NTSC-U/C: 0x0026e4c0
Ghidra address:
PAL: 0x00278060

◆ Init()

void GameDb::Init ( )

Read the "db" section of the configuration.

Ghidra address:
NTSC-U/C: 0x0026e1b0
Ghidra address:
PAL: 0x00277d50

◆ Terminate()

void GameDb::Terminate ( )

Release what Init() created.

Ghidra address:
NTSC-U/C: 0x0026e3f0
Ghidra address:
PAL: 0x00277f90

◆ InitSfx()

void GameDb::InitSfx ( )

Build TheFxMidi from the fx_midi_file entry of the "db" section, and start mSfxScheduler at the tempo of that file.

Init() calls it. The PAL build reads the <language>_fx_midi_file entry of the console's language instead.

Ghidra address:
NTSC-U/C: 0x0027f8e0
Ghidra address:
PAL: 0x002891c8

◆ TerminateSfx()

void GameDb::TerminateSfx ( )

Stop mSfxScheduler and release TheFxMidi.

Terminate() calls it.

Ghidra address:
NTSC-U/C: 0x0027f998
Ghidra address:
PAL: 0x00289298

◆ Poll()

void GameDb::Poll ( )

Service the database once per frame.

Ghidra address:
NTSC-U/C: 0x0026e518
Ghidra address:
PAL: 0x002780b8

◆ FindSong()

DataArray * GameDb::FindSong ( const char * pszSong)

Find the entry of a song in the "songs" section.

Parameters
pszSongThe song.
Returns
The entry, or null.
Ghidra address:
NTSC-U/C: 0x0026de90
Ghidra address:
PAL: 0x00277a30

◆ GetNumPlayers()

int GameDb::GetNumPlayers ( ) const

Report the number of players.

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

◆ SetGameParams()

void GameDb::SetGameParams ( const NetGameParams * pParams)

Take the settings of an online game the host published.

Parameters
pParamsThe settings.
Ghidra address:
NTSC-U/C: 0x0026eae0
Ghidra address:
PAL: 0x00278680

◆ SetRemixBuffer()

void GameDb::SetRemixBuffer ( int nSize)

Replace the buffer of the remix data with a new one, billed to RemixBuf.

Parameters
nSizeThe size of the new buffer, or 0 for none.
Ghidra address:
NTSC-U/C: 0x0026e0f8
Ghidra address:
PAL: 0x00277c98

◆ GetRemixBuffer()

char * GameDb::GetRemixBuffer ( )
inline

Report the buffer of the remix data.

Returns
mRemixBuffer.
Ghidra address:
NTSC-U/C: 0x0026e0e0
Ghidra address:
PAL: 0x00277c80

◆ SetRemix()

void GameDb::SetRemix ( const RemixInfo * pInfo)

Copy the description of the remix the game plays.

Parameters
pInfoThe description.
Ghidra address:
NTSC-U/C: 0x0026e150
Ghidra address:
PAL: 0x00277cf0

◆ SetRemixActive()

void GameDb::SetRemixActive ( int nActive)

Set the flag that the screens which choose an existing or a tutorial remix set.

The name is inferred.

Parameters
nActiveThe flag.
Ghidra address:
NTSC-U/C: 0x0026e198
Ghidra address:
PAL: 0x00277d38

◆ GetRemixActive()

int GameDb::GetRemixActive ( ) const

Report the flag SetRemixActive() set.

The name is inferred.

Returns
The flag.
Ghidra address:
NTSC-U/C: 0x0026e190
Ghidra address:
PAL: 0x00277d30

◆ SetRemixName() [1/2]

void GameDb::SetRemixName ( const char * pszName)

Set mRemixName.

Parameters
pszNameThe name of the saved remix played.
Ghidra address:
NTSC-U/C: 0x0026ec10
Ghidra address:
PAL: 0x002787b0

◆ GetHostSongs()

void GameDb::GetHostSongs ( std::vector< SongEntry > * pSongs,
int nSkillLevel,
bool bDuelOnly )

List the songs of every arena but the tutorial that are available at a skill level, without the songs of type 3 that the first profile has not unlocked.

The name is inferred.

Parameters
pSongsThe list to fill.
nSkillLevelThe skill level, or 4 for any.
bDuelOnlyWhether only the songs a duel can play are listed.
Ghidra address:
NTSC-U/C: 0x0026d8a0
Ghidra address:
PAL: 0x00277440

◆ GetNumPads()

int GameDb::GetNumPads ( ) const

Report the number of controllers the players on this console use.

Returns
The number of controllers.
Ghidra address:
NTSC-U/C: 0x0026e950
Ghidra address:
PAL: 0x002784f0

◆ IsLocalPlayer()

int GameDb::IsLocalPlayer ( int nPlayer) const

Report whether a player plays on this console.

Parameters
nPlayerThe player.
Returns
PlayerInfo::GetLocal() of the player, non-zero for a local player.
Ghidra address:
NTSC-U/C: 0x0026e958
Ghidra address:
PAL: 0x002784f8

◆ GetPlayerSlot()

int GameDb::GetPlayerSlot ( int nPlayer) const

Report the slot of a player, which selects the player's sounds and colours.

Parameters
nPlayerThe player.
Returns
The slot.
Ghidra address:
NTSC-U/C: 0x0026e970
Ghidra address:
PAL: 0x00278510

◆ GetPlayerName()

const char * GameDb::GetPlayerName ( int nPlayer) const

Report the name of a player.

Parameters
nPlayerThe player.
Returns
The name.
Ghidra address:
NTSC-U/C: 0x0026e9b8
Ghidra address:
PAL: 0x00278558

◆ GetPlayerColor()

const char * GameDb::GetPlayerColor ( int nPlayer) const

Report the colour symbol of a player's difficulty.

The name is inferred.

Parameters
nPlayerThe player.
Returns
The symbol.
Ghidra address:
NTSC-U/C: 0x0026e988
Ghidra address:
PAL: 0x00278528

◆ GetPlayerNetOrder()

int GameDb::GetPlayerNetOrder ( int nPlayer) const

Report the position of a player in the order of the online session.

Parameters
nPlayerThe player.
Returns
The position.
Ghidra address:
NTSC-U/C: 0x0026e9d0
Ghidra address:
PAL: 0x00278570

◆ GetPlayerPad()

int GameDb::GetPlayerPad ( int nPlayer) const

Report the controller of a player.

An online session gives every local player controller 0 and every other player none.

Parameters
nPlayerThe player.
Returns
The controller, or -1 for none.
Ghidra address:
NTSC-U/C: 0x0026e9e8
Ghidra address:
PAL: 0x00278588

◆ GetProfile()

Campaign * GameDb::GetProfile ( int nPlayer)

Report the profile of a player.

Parameters
nPlayerThe player.
Returns
The profile.
Ghidra address:
NTSC-U/C: 0x0026ea20
Ghidra address:
PAL: 0x002785c0

◆ GetAvatar()

AvatarPartSet * GameDb::GetAvatar ( int nPlayer)

Report the avatar parts of a player, which its profile stores.

Parameters
nPlayerThe player.
Returns
The parts.
Ghidra address:
NTSC-U/C: 0x0026ea38
Ghidra address:
PAL: 0x002785d8

◆ GetPlayerScore()

int GameDb::GetPlayerScore ( int nPlayer) const

Report the score SetPlayerScore() recorded for a player.

Parameters
nPlayerThe player.
Returns
The score.
Ghidra address:
NTSC-U/C: 0x0026ea50
Ghidra address:
PAL: 0x002785f0

◆ GetPlayerRank()

int GameDb::GetPlayerRank ( int nPlayer) const

Report the rank SetPlayerScore() gave a player, 0 for the best score.

Parameters
nPlayerThe player.
Returns
The rank.
Ghidra address:
NTSC-U/C: 0x0026ea68
Ghidra address:
PAL: 0x00278608

◆ GetInputMap()

InputMap * GameDb::GetInputMap ( int nPlayer)

Report the controller bindings in the profile of a player.

Parameters
nPlayerThe player.
Returns
The bindings.
Ghidra address:
NTSC-U/C: 0x0026ea80
Ghidra address:
PAL: 0x00278620

◆ SetPlayerScore()

void GameDb::SetPlayerScore ( int nPlayer,
int nScore )

Record the score of a player and rank the players by their scores.

Parameters
nPlayerThe player.
nScoreThe score.
Ghidra address:
NTSC-U/C: 0x0026eab0
Ghidra address:
PAL: 0x00278650

◆ GetDemo()

const char * GameDb::GetDemo ( ) const

Report the file of the demo being played.

Returns
The file, or null when no demo is played.
Ghidra address:
NTSC-U/C: 0x0026ec78
Ghidra address:
PAL: 0x00278818

◆ SetWon()

void GameDb::SetWon ( bool bWon)

Record whether the song was won.

Parameters
bWonWhether the song was won.
Ghidra address:
NTSC-U/C: 0x0026ecf8
Ghidra address:
PAL: 0x00278898

◆ FindSongGroup()

const char * GameDb::FindSongGroup ( )

Report the arena whose songs include mSong, the tutorial included.

Returns
The name of the arena, or null when no arena lists the song.
Ghidra address:
NTSC-U/C: 0x0026efb0
Ghidra address:
PAL: 0x00278b50

◆ GetSongIndex()

int GameDb::GetSongIndex ( )

Report the index of the arena of the game, from the digit that ends mArena, less one.

Returns
The index, or -1 when mSong has a type or mArena is shorter than two characters.
Ghidra address:
NTSC-U/C: 0x0026f1d0
Ghidra address:
PAL: 0x00278d70

◆ GetOptions()

GameOptions * GameDb::GetOptions ( )

Report the settings of the game options screen.

Returns
The settings.
Ghidra address:
NTSC-U/C: 0x0026f508
Ghidra address:
PAL: 0x002790a8

◆ SetOptions()

void GameDb::SetOptions ( const GameOptions * pOptions)

Replace the settings of the game options screen and apply the speaker output mode.

Parameters
pOptionsThe settings.
Ghidra address:
NTSC-U/C: 0x0026f510
Ghidra address:
PAL: 0x002790b0

◆ SetAvatarCameraParams()

void GameDb::SetAvatarCameraParams ( float fNear,
float fFar )

Set the depth range of the camera the avatars share, with Avatar::SetDepthRange().

The metagame passes 0.05 and 1 as the front end starts. The name is inferred.

Parameters
fNearThe near end of the range.
fFarThe far end of the range.
Ghidra address:
NTSC-U/C: 0x0026f4e8
Ghidra address:
PAL: 0x00279088

◆ UnlockAllSongs()

void GameDb::UnlockAllSongs ( )

Unlock every song.

The unlock_all songs cheat calls it. The name is inferred.

Ghidra address:
NTSC-U/C: 0x0026e0b0
Ghidra address:
PAL: 0x00277c50

◆ IsWinSequence()

int GameDb::IsWinSequence ( ) const

Report whether the campaign win sequence runs.

Returns
Non-zero while the sequence runs.
Ghidra address:
NTSC-U/C: 0x0026e0d0
Ghidra address:
PAL: 0x00277c70

◆ SetWinSequence()

void GameDb::SetWinSequence ( bool bWinSequence)

Start or end the campaign win sequence.

Parameters
bWinSequenceStart the sequence.
Ghidra address:
NTSC-U/C: 0x0026e0d8
Ghidra address:
PAL: 0x00277c78

◆ SetPracticeMode()

void GameDb::SetPracticeMode ( bool bPracticeMode)

Set the practice mode.

Parameters
bPracticeModePlay in practice mode.
Ghidra address:
NTSC-U/C: 0x0026eba8
Ghidra address:
PAL: 0x00278748

◆ ClearPlayers()

void GameDb::ClearPlayers ( )

Remove every player.

Ghidra address:
NTSC-U/C: 0x0026e548
Ghidra address:
PAL: 0x002780e8

◆ AddPlayer() [1/2]

void GameDb::AddPlayer ( const Campaign * pProfile)

Add a player with a copy of a profile.

Parameters
pProfileThe profile to copy.
Ghidra address:
NTSC-U/C: 0x0026e5e0
Ghidra address:
PAL: 0x00278180

◆ AddPlayer() [2/2]

void GameDb::AddPlayer ( int bLocal,
const Campaign * pProfile,
int nSlot,
int nNetOrder )

Add a player of an online game with a copy of a profile.

Parameters
bLocalNon-zero for the player of this console, which also counts it as local.
pProfileThe profile to copy.
nSlotThe value GetPlayerSlot() reports for the player.
nNetOrderThe value GetPlayerNetOrder() reports for the player.
Ghidra address:
NTSC-U/C: 0x0026e790
Ghidra address:
PAL: 0x00278330

◆ SetSkillLevel()

void GameDb::SetSkillLevel ( int nSkillLevel)

Set mSkillLevel.

Parameters
nSkillLevelThe skill level.
Ghidra address:
NTSC-U/C: 0x0026eb98
Ghidra address:
PAL: 0x00278738

◆ SetPowerupLevel()

void GameDb::SetPowerupLevel ( int nPowerupLevel)

Set mPowerupLevel.

Parameters
nPowerupLevelThe power-up level.
Ghidra address:
NTSC-U/C: 0x0026eba0
Ghidra address:
PAL: 0x00278740

◆ SetTutorial()

void GameDb::SetTutorial ( int nTutorial)

Set whether the tutorial is played.

The solo arena screen sets it when the player confirms the "Tutorial" arena, and the song screen sets it for a song whose type is 4. Every other way into a song clears it.

Parameters
nTutorialNon-zero to play the tutorial.
Ghidra address:
NTSC-U/C: 0x0026ebb0
Ghidra address:
PAL: 0x00278750

◆ SetSong()

void GameDb::SetSong ( const char * pszSong)

Set mSong.

Parameters
pszSongThe song.
Ghidra address:
NTSC-U/C: 0x0026ebb8
Ghidra address:
PAL: 0x00278758

◆ SetLoadRemix()

void GameDb::SetLoadRemix ( bool bLoadRemix)

Set mLoadRemix.

Parameters
bLoadRemixWhether a saved remix is played.
Ghidra address:
NTSC-U/C: 0x0026ec58
Ghidra address:
PAL: 0x002787f8

◆ SetRuleSet()

void GameDb::SetRuleSet ( int nRuleSet)

Set mRuleSet.

Parameters
nRuleSetOne of RuleSet.
Ghidra address:
NTSC-U/C: 0x0026ec60
Ghidra address:
PAL: 0x00278800

◆ SetCommunity()

void GameDb::SetCommunity ( int nCommunity)

Set mCommunity.

Parameters
nCommunityOne of Community.
Ghidra address:
NTSC-U/C: 0x0026ec68
Ghidra address:
PAL: 0x00278808

◆ SetMaxPlayers()

void GameDb::SetMaxPlayers ( int nMaxPlayers)

Set mMaxPlayers.

Parameters
nMaxPlayersThe number of players the session takes.
Ghidra address:
NTSC-U/C: 0x0026ec70
Ghidra address:
PAL: 0x00278810

◆ SetDemo()

void GameDb::SetDemo ( const char * pszDemo)

Choose the demo to play, or none.

Parameters
pszDemoThe demo recording, or null for none.
Ghidra address:
NTSC-U/C: 0x0026ec98
Ghidra address:
PAL: 0x00278838

◆ SetEnergized()

void GameDb::SetEnergized ( float fEnergized)

Record the fraction of the possible capture bars a solo song captured.

Parameters
fEnergizedThe fraction.
Ghidra address:
NTSC-U/C: 0x0026ecb8
Ghidra address:
PAL: 0x00278858

◆ SetFullMixBars()

void GameDb::SetFullMixBars ( int nBars)

Record the bars a solo song played with every track captured.

Parameters
nBarsThe bars.
Ghidra address:
NTSC-U/C: 0x0026ecc8
Ghidra address:
PAL: 0x00278868

◆ SetBestStreak()

void GameDb::SetBestStreak ( int nStreak)

Record the longest streak of a solo song.

Parameters
nStreakThe streak.
Ghidra address:
NTSC-U/C: 0x0026ecd8
Ghidra address:
PAL: 0x00278878

◆ SetProgress()

void GameDb::SetProgress ( float fProgress)

Record the fraction of the song played.

Parameters
fProgressThe fraction.
Ghidra address:
NTSC-U/C: 0x0026ece8
Ghidra address:
PAL: 0x00278888

◆ GetEnergized()

float GameDb::GetEnergized ( ) const

Report the value of SetEnergized().

Returns
The value.
Ghidra address:
NTSC-U/C: 0x0026ecc0
Ghidra address:
PAL: 0x00278860

◆ GetFullMixBars()

int GameDb::GetFullMixBars ( ) const

Report the value of SetFullMixBars().

Returns
The bars.
Ghidra address:
NTSC-U/C: 0x0026ecd0
Ghidra address:
PAL: 0x00278870

◆ GetBestStreak()

int GameDb::GetBestStreak ( ) const

Report the value of SetBestStreak().

Returns
The streak.
Ghidra address:
NTSC-U/C: 0x0026ece0
Ghidra address:
PAL: 0x00278880

◆ GetProgress()

float GameDb::GetProgress ( ) const

Report the value of SetProgress().

Returns
The fraction.
Ghidra address:
NTSC-U/C: 0x0026ecf0
Ghidra address:
PAL: 0x00278890

◆ SetArena() [1/2]

void GameDb::SetArena ( const char * pszArena)

Set the arena of the game.

Parameters
pszArenaThe arena.
Ghidra address:
NTSC-U/C: 0x0026ec38
Ghidra address:
PAL: 0x002787d8

◆ GetRemixInfo()

RemixInfo * GameDb::GetRemixInfo ( )

Report the description of the remix being played.

Returns
The description.
Ghidra address:
NTSC-U/C: 0x0026e0e8
Ghidra address:
PAL: 0x00277c88

◆ SetRemixReadOnly()

void GameDb::SetRemixReadOnly ( int nReadOnly)

Set mRemixReadOnly.

Parameters
nReadOnlyNon-zero when the remix may not be saved over.
Ghidra address:
NTSC-U/C: 0x0026ec30
Ghidra address:
PAL: 0x002787d0

◆ GetNetRemixEnded()

int GameDb::GetNetRemixEnded ( ) const

Report whether the remix of an online game has ended.

Returns
Non-zero once the remix has ended.
Ghidra address:
NTSC-U/C: 0x0026e1a0
Ghidra address:
PAL: 0x00277d40

◆ SetNetRemixEnded()

void GameDb::SetNetRemixEnded ( int nEnded)

Record whether the remix of an online game has ended.

Parameters
nEndedNon-zero once the remix has ended.
Ghidra address:
NTSC-U/C: 0x0026e1a8
Ghidra address:
PAL: 0x00277d48

◆ GetDifficultyName() [1/2]

const char * GameDb::GetDifficultyName ( ) const

Report the localised name of the difficulty of the game.

Returns
The name.
Ghidra address:
NTSC-U/C: 0x0026f238
Ghidra address:
PAL: 0x00278dd8

◆ GetDifficultyName() [2/2]

const char * GameDb::GetDifficultyName ( int nSkillLevel,
int nRuleSet ) const

Report the localised name of a difficulty.

Parameters
nSkillLevelThe skill level.
nRuleSetThe rule set, one of RuleSet.
Returns
The name.
Ghidra address:
NTSC-U/C: 0x0026f290
Ghidra address:
PAL: 0x00278e30

◆ GetModeName() [1/2]

const char * GameDb::GetModeName ( ) const

Report the localised name of the mode of the game, from mRuleSet.

Returns
The name.
Ghidra address:
NTSC-U/C: 0x0026f3d0
Ghidra address:
PAL: 0x00278f70

◆ GetModeName() [2/2]

const char * GameDb::GetModeName ( int nRuleSet) const

Report the localised name of a mode.

Parameters
nRuleSetThe rule set, one of RuleSet.
Returns
The name, or the empty string for another value.
Ghidra address:
NTSC-U/C: 0x0026f3f0
Ghidra address:
PAL: 0x00278f90

◆ GetPowerupName()

const char * GameDb::GetPowerupName ( int nPowerupLevel) const

Report the localised name of a power-up level.

The name is inferred.

Parameters
nPowerupLevelThe level, 0 to 2.
Returns
The name, or the empty string for another value.
Ghidra address:
NTSC-U/C: 0x0026f470
Ghidra address:
PAL: 0x00279010

◆ GetArenaNames()

void GameDb::GetArenaNames ( std::vector< const char * > * pArenas,
bool bIncludeTutorial )

Append the names of the arenas of the "arenas" section, in their order there.

Parameters
pArenasThe list to append to.
bIncludeTutorialWhether the Tutorial arena is listed.
Ghidra address:
NTSC-U/C: 0x0026d0a0
Ghidra address:
PAL: 0x00276c40

◆ GetUnlockedArenas()

void GameDb::GetUnlockedArenas ( std::vector< const char * > * pArenas,
int nSkillLevel,
bool bFirstPlayerOnly,
bool bIncludeTutorial )

List the arenas the players have unlocked at a skill level.

Parameters
pArenasThe list to fill.
nSkillLevelThe skill level, or 4 for any.
bFirstPlayerOnlyWhether only the first player's unlocks count.
bIncludeTutorialWhether the Tutorial arena is considered.
Ghidra address:
NTSC-U/C: 0x0026dd40
Ghidra address:
PAL: 0x002778e0

◆ GetArenaSongs()

void GameDb::GetArenaSongs ( std::vector< SongEntry > * pSongs,
const char * pszArena,
int nSkillLevel,
int nFilter )

Append the songs of an arena that are available at a skill level.

Parameters
pSongsThe list to append to.
pszArenaThe arena.
nSkillLevelThe skill level, or 4 for any.
nFilterWhich songs are listed. The callers pass 0 and 1.
Ghidra address:
NTSC-U/C: 0x0026d2b0
Ghidra address:
PAL: 0x00276e50

◆ GetUnlockedSongs()

void GameDb::GetUnlockedSongs ( std::vector< SongEntry > * pSongs,
const char * pszArena,
int nSkillLevel,
bool bFirstPlayerOnly )

List the songs the players have unlocked in an arena, or in every unlocked arena.

Parameters
pSongsThe list to fill.
pszArenaThe arena, or an empty string for every unlocked arena.
nSkillLevelThe skill level, or 4 for any.
bFirstPlayerOnlyWhether only the first player's unlocks count.
Ghidra address:
NTSC-U/C: 0x0026d9a0
Ghidra address:
PAL: 0x00277540

◆ GetAllSongs()

void GameDb::GetAllSongs ( std::vector< SongEntry > * pSongs,
bool bDuelOnly,
int nSkillLevel )

List the songs of every arena but the tutorial that are available at a skill level.

Parameters
pSongsThe list to fill.
bDuelOnlyWhether only the songs a duel can play are listed.
nSkillLevelThe skill level, or kSkillAny.
Ghidra address:
NTSC-U/C: 0x0026d580
Ghidra address:
PAL: 0x00277120

◆ HasSong()

bool GameDb::HasSong ( const char * pszSong)

Report whether an arena lists a song.

Parameters
pszSongThe song.
Returns
Whether an arena lists the song.
Ghidra address:
NTSC-U/C: 0x0026df10
Ghidra address:
PAL: 0x00277ab0

◆ FindSongById()

bool GameDb::FindSongById ( DataArray ** ppSong,
int nId )

Find the song whose id matches.

Parameters
ppSongReceives the entry of the song found in the last arena that lists one.
nIdThe identifier.
Returns
Whether a song matched.
Ghidra address:
NTSC-U/C: 0x0026df90
Ghidra address:
PAL: 0x00277b30

◆ GetPlayers()

const std::vector< std::unique_ptr< PlayerInfo > > & GameDb::GetPlayers ( ) const
inline
Returns
The players, freed with the database.

◆ GetSong()

const String & GameDb::GetSong ( ) const
inline
Returns
The song of the game.

◆ GetLoadRemix()

int GameDb::GetLoadRemix ( ) const
inline
Returns
Whether a saved remix is played.

◆ GetRemixReadOnly()

int GameDb::GetRemixReadOnly ( ) const
inline
Returns
Non-zero when the remix may not be saved over.

◆ GetRemixName()

const String & GameDb::GetRemixName ( ) const
inline
Returns
The name of the saved remix played.

◆ SetRemixName() [2/2]

void GameDb::SetRemixName ( const String & name)
inline

Set the name of the saved remix played.

Parameters
nameThe name.

◆ GetPracticeMode()

int GameDb::GetPracticeMode ( ) const
inline
Returns
Whether the game plays in practice mode.

◆ GetTutorial()

int GameDb::GetTutorial ( ) const
inline
Returns
Whether the tutorial is played.

◆ GetSkillLevel()

int GameDb::GetSkillLevel ( ) const
inline
Returns
The skill level.

◆ GetPowerupLevel()

int GameDb::GetPowerupLevel ( ) const
inline
Returns
The power-up level.

◆ GetRuleSet()

int GameDb::GetRuleSet ( ) const
inline
Returns
The rule set, one of RuleSet.

◆ GetCommunity()

int GameDb::GetCommunity ( ) const
inline
Returns
The community, one of Community.

◆ GetMaxPlayers()

int GameDb::GetMaxPlayers ( ) const
inline
Returns
The number of players an online session takes.

◆ GetArena()

const String & GameDb::GetArena ( ) const
inline
Returns
The arena of the game.

◆ SetArena() [2/2]

void GameDb::SetArena ( const String & arena)
inline

Set the arena of the game from a string.

Parameters
arenaThe arena.

◆ GetUnlockAll()

int GameDb::GetUnlockAll ( ) const
inline
Returns
Non-zero once UnlockAllSongs() ran and lifted every lock.

◆ GetWon()

int GameDb::GetWon ( ) const
inline
Returns
The value of SetWon().

◆ GetReservedA4()

int GameDb::GetReservedA4 ( ) const
inline
Returns
The value at +0xa4, not yet identified.

◆ SetReservedA4()

void GameDb::SetReservedA4 ( int nValue)
inline

Set the value at +0xa4, not yet identified.

Parameters
nValueThe value.

◆ GetSongs()

DataArray * GameDb::GetSongs ( ) const
inline
Returns
The songs array of the "db" section. Borrowed.

◆ SetSongs()

void GameDb::SetSongs ( DataArray * pSongs)
inline

Set the songs array of the "db" section.

Borrowed.

Parameters
pSongsThe array. The caller retains ownership.

◆ GetSongTick()

float GameDb::GetSongTick ( ) const
inline
Returns
The running world's position in ticks.

◆ SetSongTick()

void GameDb::SetSongTick ( float fTick)
inline

Set the running world's position in ticks.

Parameters
fTickThe position in ticks.

◆ GetSongTime()

float GameDb::GetSongTime ( ) const
inline
Returns
The running world's position on its song clock.

◆ SetSongTime()

void GameDb::SetSongTime ( float fTime)
inline

Set the running world's position on its song clock.

Parameters
fTimeThe position on the song clock.

◆ GetSfxScheduler() [1/2]

Scheduler & GameDb::GetSfxScheduler ( )
inline
Returns
The scheduler the interface sounds play on.

◆ GetSfxScheduler() [2/2]

const Scheduler & GameDb::GetSfxScheduler ( ) const
inline
Returns
The scheduler the interface sounds play on.

Member Data Documentation

◆ kPowerupLevelNone

int GameDb::kPowerupLevelNone = 2
staticconstexpr

The value of mPowerupLevel that places no power-up.


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