2009-10-01 01:10:58 +02:00
|
|
|
|
|
|
|
#ifndef _XML_H_
|
|
|
|
#define _XML_H_
|
|
|
|
|
|
|
|
#include <mxml.h>
|
|
|
|
|
|
|
|
|
|
|
|
// open database, close database, load info for a game
|
2010-09-19 22:25:12 +02:00
|
|
|
bool OpenXMLDatabase( char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool keepopen );
|
|
|
|
void CloseXMLDatabase();
|
|
|
|
bool LoadGameInfoFromXML( char* gameid, char* langcode );
|
2009-10-01 01:10:58 +02:00
|
|
|
|
|
|
|
#define XML_ELEMMAX 15
|
|
|
|
#define XML_SYNOPSISLEN 4000
|
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
struct gameXMLinfo
|
|
|
|
{
|
2009-10-01 01:10:58 +02:00
|
|
|
char id[7];
|
|
|
|
char version[50];
|
|
|
|
char region[7];
|
|
|
|
char title[200];
|
|
|
|
char synopsis[XML_SYNOPSISLEN];
|
|
|
|
char title_EN[200];
|
|
|
|
char synopsis_EN[XML_SYNOPSISLEN];
|
|
|
|
char locales[XML_ELEMMAX+1][5];
|
|
|
|
int localeCnt;
|
|
|
|
char developer[75];
|
|
|
|
char publisher[75];
|
|
|
|
char publisherfromid[75];
|
|
|
|
char year[5];
|
|
|
|
char month[3];
|
|
|
|
char day[3];
|
|
|
|
char genre[75];
|
|
|
|
char genresplit[XML_ELEMMAX+1][20];
|
|
|
|
int genreCnt;
|
|
|
|
char ratingtype[5];
|
|
|
|
char ratingvalue[5];
|
|
|
|
char ratingdescriptors[XML_ELEMMAX+1][40];
|
|
|
|
int descriptorCnt;
|
|
|
|
char ratingvalueCERO[5];
|
|
|
|
char ratingvalueESRB[5];
|
|
|
|
char ratingvaluePEGI[5];
|
|
|
|
char wifiplayers[4];
|
|
|
|
char wififeatures[XML_ELEMMAX+1][20];
|
|
|
|
int wifiCnt;
|
|
|
|
char players[4];
|
|
|
|
char accessories[XML_ELEMMAX+1][20];
|
|
|
|
int accessoryCnt;
|
|
|
|
char accessoriesReq[XML_ELEMMAX+1][20];
|
|
|
|
int accessoryReqCnt;
|
|
|
|
char iso_crc[9];
|
|
|
|
char iso_md5[33];
|
|
|
|
char iso_sha1[41];
|
|
|
|
} ;
|
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
bool OpenXMLFile( char* filename );
|
|
|
|
void LoadTitlesFromXML( char *langcode, bool forcejptoen );
|
|
|
|
void GetPublisherFromGameid( char *idtxt, char *dest, int destsize );
|
2010-09-19 22:25:12 +02:00
|
|
|
const char *ConvertLangTextToCode( char *langtext );
|
|
|
|
void ConvertRating( char *ratingvalue, char *fromrating, const char *torating, char *destvalue, int destsize );
|
2010-09-19 01:16:05 +02:00
|
|
|
void PrintGameInfo( bool showfullinfo );
|
2009-10-01 01:10:58 +02:00
|
|
|
char *MemInfo();
|
2010-09-19 22:25:12 +02:00
|
|
|
void GetTextFromNode( mxml_node_t *currentnode, mxml_node_t *topnode, const char *nodename,
|
|
|
|
const char *attributename, char *value, int descend, char *dest, int destsize );
|
2010-09-19 01:16:05 +02:00
|
|
|
int GetRatingForGame( char *gameid );
|
|
|
|
char * get_nodetext( mxml_node_t *node, char *buffer, int buflen );
|
2009-12-12 19:04:35 +01:00
|
|
|
|
2009-10-01 01:10:58 +02:00
|
|
|
#endif
|
|
|
|
|