usbloadergx/source/cheats/gct.h
giantpune 30535c6f5d *code beautification*
formatted the code to make it easier to read.  no functional changes at all.

i didn't put anything from the libwiigui folder or banner folder in the beautifier.

my automated .bat seems to have done a good job.  the only places i see it fucked up was on (GXColor){blablabla}.  it treated the brackets in the color like all the other brackets and put the color on a new line and indented it.  i think i fixed most of them.  not sure if it messed up anywhere else.  also not sure about how it handled different linebreaks.  it looks fine on windows.  if it looks messed up on linux, it can be reverted.

the code still compiles and runs fine.
2009-07-30 05:41:12 +00:00

104 lines
2.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* gct.h
* Class to handle Ocarina TXT Cheatfiles
* WIP: Actually it´s needed to call fatInitDefault() or the file will not be found
* and no Comments supported for now
*/
#ifndef _GCT_H
#define _GCT_H
#include <sstream>
#define MAXCHEATS 40
using namespace std;
struct chtentrie {
string sGameID;
string sGameTitle;
string sCheatName[MAXCHEATS];
string sCheats[MAXCHEATS];
string sCheatComment[MAXCHEATS];
int iCntCheats;
};
//!Handles Ocarina TXT Cheatfiles
class GCTCheats {
private:
chtentrie ccc;
string sGameID;
string sGameTitle;
string sCheatName[MAXCHEATS];
string sCheats[MAXCHEATS];
string sCheatComment[MAXCHEATS];
int iCntCheats;
public:
struct chtentries {
string sGameID;
string sGameTitle;
string sCheatName[MAXCHEATS];
string sCheats[MAXCHEATS];
int iCntCheats;
};
//!Constructor
GCTCheats(void);
//!Destructor
~GCTCheats(void);
//!Open txt file with cheats
//!\param filename name of TXT file
//!\return error code
int openTxtfile(const char * filename);
//!Creates GCT file for one cheat
//!\param nr selected Cheat Numbers
//!\param filename name of GCT file
//!\return error code
int createGCT(int nr,const char * filename);
//!Creates GCT file from a buffer
//!\param chtbuffer buffer that holds the cheat data
//!\param filename name of GCT file
//!\return error code
int createGCT(const char * chtbuffer,const char * filename);
//!Creates GCT file
//!\param nr[] array of selected Cheat Numbers
//!\param cnt size of array
//!\param filename name of GCT file
//!\return error code
int createGCT(int nr[],int cnt,const char * filename);
//!Gets Count cheats
//!\return Count cheats
int getCnt();
//!Gets Game Name
//!\return Game Name
string getGameName(void);
//!Gets GameID
//!\return GameID
string getGameID(void);
//!Gets cheat data
//!\return cheat data
string getCheat(int nr);
//!Gets Cheat Name
//!\return Cheat Name
string getCheatName(int nr);
//!Gets Cheat Comment
//!\return Cheat Comment
string getCheatComment(int nr);
//!Gets Cheat List
//!\return struct chtentrie
//struct chtentrie getCheatList2(void);
//!Gets Cheat List
//!\return struct chtentries
struct chtentries getCheatList(void);
//!Gets Cheat List from file
//!\param filename name of TXT file
//!\return struct chtentries
struct chtentries getCheatList(const char * filename);
int download_txtcheat(int id);
};
#endif /* _GCT_H */