usbloadergx/source/settings/GameTitles.h
dimok321 00e9a9ffee *Added new ehcmodules with better and more drives support on Hermes IOS (thx rodries)
*Fixed reset of the loader when loading game with IOS reload and disabled WiiTDB titles (Issue 1874)
*Added new 'Inherit' or 'Use global' setting for game settings. If that option is set than the global setting is used for that option. (Issue 1842)
*Fixed timeout timer on startup to count correctly. (Issue 1907)
*Added two new video modes to force progressive video mode, 'FORCE PAL480p' and 'FORCE NTSC480p' (basically the same but oh well) (Issue 1902)
*Added the new 'Return to' procedure for the d2x v4 IOS for Test purpose (didn't test it, need feedback on this one). The old method is used if this procedure fails. Please test it on problematic games (e.g. PoP). (Issue 1892)
2011-05-28 19:52:00 +00:00

54 lines
1.6 KiB
C++

#ifndef WIITDB_TITLES_H_
#define WIITDB_TITLES_H_
#include <string>
#include <vector>
#include <gctypes.h>
#include "usbloader/disc.h"
typedef struct _GameTitle
{
char GameID[7];
std::string Title;
int ParentalRating;
int PlayersCount;
} GameTitle;
class CGameTitles
{
public:
//! Set a game title from wiitdb
void SetGameTitle(const char * id, const char * title);
//! Overload
void SetGameTitle(const u8 * id, const char * title) { SetGameTitle((const char *) id, title); };
//! Get a game title
const char * GetTitle(const char * id) const;
//! Overload
const char * GetTitle(const u8 * id) const { return GetTitle((const char *) id); };
//! Overload
const char * GetTitle(const struct discHdr *header) const;
//! Get game parental rating
int GetParentalRating(const char * id) const;
//! Get possible number of players for this game
int GetPlayersCount(const char * id) const;
//! Load Game Titles from WiiTDB
void LoadTitlesFromWiiTDB(const char * path, bool forceCacheReload = false);
//! Set default game titles
void SetDefault();
//! Free memory and remove all titles - Same as SetDefault()
void Clear() { SetDefault(); }
protected:
u32 ReadCachedTitles(const char * path);
void WriteCachedTitles(const char * path);
void RemoveUnusedCache(std::vector<std::string> &MissingTitles);
std::vector<GameTitle> TitleList;
};
extern CGameTitles GameTitles;
#endif