215 void GetHostSongs(std::vector<SongEntry> *pSongs,
int nSkillLevel,
bool bDuelOnly);
742 void GetArenaNames(std::vector<const char *> *pArenas,
bool bIncludeTutorial);
756 bool bFirstPlayerOnly,
757 bool bIncludeTutorial);
770 const char *pszArena,
785 const char *pszArena,
787 bool bFirstPlayerOnly);
798 void GetAllSongs(std::vector<SongEntry> *pSongs,
bool bDuelOnly,
int nSkillLevel);
822 const std::vector<std::unique_ptr<PlayerInfo>> &
GetPlayers()
const {
838 return mRemixReadOnly;
857 return mPracticeMode;
872 return mPowerupLevel;
925 mReservedA4 = nValue;
972 return mSfxScheduler;
977 return mSfxScheduler;
981 std::vector<std::unique_ptr<PlayerInfo>> mPlayers;
1024 static int FindInt(
const char *pszName,
DataArray *pData,
bool bFail);
1036 static const char *FindSymbol(
const char *pszName,
DataArray *pData,
bool bFail);
1046 static const char *GetSlotColor(
int nSlot);
1058 static void GetSkillRange(
int nSkillLevel,
bool bExact,
int *pnFirst,
int *pnEnd);
Parts and colours of a player's avatar, the Freq the Freq maker edits.
Definition avatarpartset.h:23
Saved settings and progress of one player, among them the controller bindings.
Definition campaign.h:20
Reference-counted array of script data nodes.
Definition dataarray.h:20
Settings of the game being set up or played, among them the rule set and the timing the world publish...
Definition gamedb.h:27
int GetNumPlayers() const
Report the number of players.
int GetFullMixBars() const
Report the value of SetFullMixBars().
const char * GetModeName() const
Report the localised name of the mode of the game, from mRuleSet.
void InitSfx()
Build TheFxMidi from the fx_midi_file entry of the "db" section, and start mSfxScheduler at the tempo...
void SetWon(bool bWon)
Record whether the song was won.
void SetProgress(float fProgress)
Record the fraction of the song played.
GameOptions * GetOptions()
Report the settings of the game options screen.
int GetSongIndex()
Report the index of the arena of the game, from the digit that ends mArena, less one.
void SetRemixReadOnly(int nReadOnly)
Set mRemixReadOnly.
int GetMaxPlayers() const
Definition gamedb.h:886
void SetFullMixBars(int nBars)
Record the bars a solo song played with every track captured.
bool HasSong(const char *pszSong)
Report whether an arena lists a song.
void Init()
Read the "db" section of the configuration.
void UnlockAllSongs()
Unlock every song.
const std::vector< std::unique_ptr< PlayerInfo > > & GetPlayers() const
Definition gamedb.h:822
void Terminate()
Release what Init() created.
int IsWinSequence() const
Report whether the campaign win sequence runs.
int GetRemixReadOnly() const
Definition gamedb.h:837
const char * GetPlayerColor(int nPlayer) const
Report the colour symbol of a player's difficulty.
int GetReservedA4() const
Definition gamedb.h:915
const char * GetDifficultyName() const
Report the localised name of the difficulty of the game.
int GetNumPads() const
Report the number of controllers the players on this console use.
int GetPracticeMode() const
Definition gamedb.h:856
void AddPlayer(const Campaign *pProfile)
Add a player with a copy of a profile.
const char * GetPowerupName(int nPowerupLevel) const
Report the localised name of a power-up level.
void SetEnergized(float fEnergized)
Record the fraction of the possible capture bars a solo song captured.
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,...
void SetWinSequence(bool bWinSequence)
Start or end the campaign win sequence.
const char * GetPlayerName(int nPlayer) const
Report the name of a player.
Community
Values of mCommunity.
Definition gamedb.h:37
@ kCommunityLocal
Definition gamedb.h:40
@ kCommunitySolo
Definition gamedb.h:39
@ kCommunityNone
Definition gamedb.h:38
@ kCommunityOnline
Definition gamedb.h:41
DataArray * FindSong(const char *pszSong)
Find the entry of a song in the "songs" section.
void SetSongTick(float fTick)
Set the running world's position in ticks.
Definition gamedb.h:952
void SetAvatarCameraParams(float fNear, float fFar)
Set the depth range of the camera the avatars share, with Avatar::SetDepthRange().
void SetPlayerScore(int nPlayer, int nScore)
Record the score of a player and rank the players by their scores.
void TerminateSfx()
Stop mSfxScheduler and release TheFxMidi.
RemixInfo * GetRemixInfo()
Report the description of the remix being played.
void SetPracticeMode(bool bPracticeMode)
Set the practice mode.
void SetArena(const String &arena)
Set the arena of the game from a string.
Definition gamedb.h:900
Scheduler & GetSfxScheduler()
Definition gamedb.h:971
float GetEnergized() const
Report the value of SetEnergized().
void SetNetRemixEnded(int nEnded)
Record whether the remix of an online game has ended.
RuleSet
Values of mRuleSet, one for each World subclass WorldMgr::Load() can build.
Definition gamedb.h:30
@ kRuleSetRemix
Definition gamedb.h:32
@ kRuleSetDuel
Definition gamedb.h:33
@ kRuleSetGame
Definition gamedb.h:31
const char * GetDifficultyName(int nSkillLevel, int nRuleSet) const
Report the localised name of a difficulty.
void SetSong(const char *pszSong)
Set mSong.
void SetRemixActive(int nActive)
Set the flag that the screens which choose an existing or a tutorial remix set.
Campaign * GetProfile(int nPlayer)
Report the profile of a player.
float GetProgress() const
Report the value of SetProgress().
const char * GetDemo() const
Report the file of the demo being played.
const char * GetModeName(int nRuleSet) const
Report the localised name of a mode.
char * GetRemixBuffer()
Report the buffer of the remix data.
Definition gamedb.h:159
void SetDemo(const char *pszDemo)
Choose the demo to play, or none.
int GetPlayerPad(int nPlayer) const
Report the controller of a player.
InputMap * GetInputMap(int nPlayer)
Report the controller bindings in the profile of a player.
int GetLoadRemix() const
Definition gamedb.h:832
void SetSongTime(float fTime)
Set the running world's position on its song clock.
Definition gamedb.h:966
void SetSkillLevel(int nSkillLevel)
Set mSkillLevel.
void SetMaxPlayers(int nMaxPlayers)
Set mMaxPlayers.
int GetNetRemixEnded() const
Report whether the remix of an online game has ended.
void SetRemix(const RemixInfo *pInfo)
Copy the description of the remix the game plays.
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.
const Scheduler & GetSfxScheduler() const
Definition gamedb.h:976
void Poll()
Service the database once per frame.
int GetUnlockAll() const
Definition gamedb.h:905
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.
AvatarPartSet * GetAvatar(int nPlayer)
Report the avatar parts of a player, which its profile stores.
int IsLocalPlayer(int nPlayer) const
Report whether a player plays on this console.
void GetArenaNames(std::vector< const char * > *pArenas, bool bIncludeTutorial)
Append the names of the arenas of the "arenas" section, in their order there.
void SetRemixBuffer(int nSize)
Replace the buffer of the remix data with a new one, billed to RemixBuf.
static GameDb * shared()
Report the single instance, constructing it on first use.
void SetRuleSet(int nRuleSet)
Set mRuleSet.
void SetArena(const char *pszArena)
Set the arena of the game.
const String & GetRemixName() const
Definition gamedb.h:842
void SetReservedA4(int nValue)
Set the value at +0xa4, not yet identified.
Definition gamedb.h:924
const char * FindSongGroup()
Report the arena whose songs include mSong, the tutorial included.
float GetSongTick() const
Definition gamedb.h:943
int GetPlayerNetOrder(int nPlayer) const
Report the position of a player in the order of the online session.
const String & GetArena() const
Definition gamedb.h:891
int GetRemixActive() const
Report the flag SetRemixActive() set.
void AddPlayer(int bLocal, const Campaign *pProfile, int nSlot, int nNetOrder)
Add a player of an online game with a copy of a profile.
int GetSkillLevel() const
Definition gamedb.h:866
void SetSongs(DataArray *pSongs)
Set the songs array of the "db" section.
Definition gamedb.h:938
static constexpr int kPowerupLevelNone
The value of mPowerupLevel that places no power-up.
Definition gamedb.h:54
void GetUnlockedArenas(std::vector< const char * > *pArenas, int nSkillLevel, bool bFirstPlayerOnly, bool bIncludeTutorial)
List the arenas the players have unlocked at a skill level.
int GetTutorial() const
Definition gamedb.h:861
void SetTutorial(int nTutorial)
Set whether the tutorial is played.
bool FindSongById(DataArray **ppSong, int nId)
Find the song whose id matches.
void SetPowerupLevel(int nPowerupLevel)
Set mPowerupLevel.
int GetPowerupLevel() const
Definition gamedb.h:871
float GetSongTime() const
Definition gamedb.h:957
int GetWon() const
Definition gamedb.h:910
void SetCommunity(int nCommunity)
Set mCommunity.
void SetRemixName(const char *pszName)
Set mRemixName.
void SetBestStreak(int nStreak)
Record the longest streak of a solo song.
const String & GetSong() const
Definition gamedb.h:827
int GetPlayerScore(int nPlayer) const
Report the score SetPlayerScore() recorded for a player.
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.
void SetGameParams(const NetGameParams *pParams)
Take the settings of an online game the host published.
DataArray * GetSongs() const
Definition gamedb.h:929
int GetRuleSet() const
Definition gamedb.h:876
int GetPlayerRank(int nPlayer) const
Report the rank SetPlayerScore() gave a player, 0 for the best score.
SkillLevel
Values of mSkillLevel.
Definition gamedb.h:45
@ kSkillInsane
Definition gamedb.h:49
@ kSkillIntermediate
Definition gamedb.h:47
@ kSkillNovice
Definition gamedb.h:46
@ kSkillAny
Definition gamedb.h:50
@ kSkillAdvanced
Definition gamedb.h:48
void ClearPlayers()
Remove every player.
GameDb()
Construct the database with its defaults.
int GetCommunity() const
Definition gamedb.h:881
void SetLoadRemix(bool bLoadRemix)
Set mLoadRemix.
void SetRemixName(const String &name)
Set the name of the saved remix played.
Definition gamedb.h:851
void SetOptions(const GameOptions *pOptions)
Replace the settings of the game options screen and apply the speaker output mode.
int GetPlayerSlot(int nPlayer) const
Report the slot of a player, which selects the player's sounds and colours.
int GetBestStreak() const
Report the value of SetBestStreak().
The settings of the game options screen, which are saved apart from the players to the settings file ...
Definition gameoptions.h:13
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
Description of a saved remix.
Definition remixinfo.h:26
Queue of commands that run when the song clock reaches their tick.
Definition scheduler.h:20
Growable text buffer that is also a PrnStream.
Definition string.h:19
GameDb * TheGameDb
The game database, GameDb::shared() as the unit's static initialiser stored it.