usbloadergx/source/settings/GameTitles.h
dimok321 500dc4020f *Reworked the whole WiiTDB.xml parsing. This is now done with mxml due to a lack of memory the file is now streamed. Now the full wiitdb.xml file with all languages is always used. The update of WiiTDB is also changed. It is now only updated if the version of the wiitdb.xml file does not match the version of the online file.
*WiiTDB now falls back to english if the locale language is not found for Titles/Synopsis
*Some clean up and memory leak fixes in game info prompt and adjusted the info get to the new WiiTDB reading method.
*Added a few new useful functions from WiiXplorer (DownloadToFileWithProgress, ShowError,...)
*Disabled the console output after the GUI is started up. The info is only output to gecko in GUI mode now.
2010-12-03 18:38:57 +00:00

42 lines
1013 B
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;
} 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);
//! Overload
const char * GetTitle(const u8 * id) { return GetTitle((const char *) id); };
//! Overload
const char * GetTitle(const struct discHdr *header);
//! Load Game Titles from WiiTDB
void LoadTitlesFromWiiTDB(const char * path);
//! Set default game titles
void SetDefault();
protected:
std::vector<GameTitle> TitleList;
};
extern CGameTitles GameTitles;
#endif