usbloadergx/source/settings/GameTitles.h
strtoul 76df2b26b6 *fix reloading into another IOS before launch of game
*add loading of wii games / nand channels / emu nand channels in all combinations into one list
*add button on main view for quick choice between the combinations of the three
*add "Real Nand" or "Emulated Nand" text on the game window prompt when starting a channel
*removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). The warning that a cIOS is needed is still present.
*removed support for both usb ports at once on hermes cIOS. Each can still be used individually but only one at a time. This is done because of some bugs in the new ehci module which make some games unbootable. The ehcimodule is now reverted to the last working one. Need feedback if the games work fine again.
*some preparations for the upcoming stealth mode feature of the d2x cIOS
*isfs is now initiated once and deinitated when cleaning up only (instead of the whole init/deinit every single access)
*removed choice for emulated nand channel modes. Emulated nand channels always need full emulation which is now always used on emu nand for channels.
*removed unused settings for channels from the per game setting
*changed default partition to 0 when starting with fresh settings (instead of -1 wtf?)
2011-12-22 22:44:48 +00:00

54 lines
1.4 KiB
C++

#ifndef GAMETDB_TITLES_H_
#define GAMETDB_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 GameTDB
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 GameTDB
void LoadTitlesFromGameTDB(const char * path, bool forceCacheReload = false, bool removeUnused = 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 GetMissingTitles(std::vector<std::string> &MissingTitles, bool removeUnused);
std::vector<GameTitle> TitleList;
};
extern CGameTitles GameTitles;
#endif