From a194b850037c03f5fb3ac1ecc9f7a99f73b84104 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sat, 22 Dec 2012 22:16:55 -0500 Subject: Preliminary Snes9x-based cheat code support. Not tested, because the file selection interface freezes when it gets to the folder containing Mightymo's cheat files, whereas it did not do this before with the converted Mightymo cheats. (335 files -> 679, though.) --- source/nds/gcheat.h | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) (limited to 'source/nds/gcheat.h') diff --git a/source/nds/gcheat.h b/source/nds/gcheat.h index e5131f6..3c9e440 100644 --- a/source/nds/gcheat.h +++ b/source/nds/gcheat.h @@ -15,51 +15,24 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __GCHEAT_H__ -#define __GCHEAT_H__ + */ + +#ifndef __GCHEAT_H__ +#define __GCHEAT_H__ #ifdef __cplusplus extern "C" { #endif - -#define CHEAT_NAME_LENGTH (32) -#define MAX_CHEATS_PAGE 10 -#define CHEATS_PER_PAGE 4 -#define MAX_CHEATS (MAX_CHEATS_PAGE * CHEATS_PER_PAGE) -//Support EMU Cheat(emulator cheat) code -typedef struct -{ - u32 name_id; //name ID in another table - u32 active; //status - u16 item_num; //sub-item number - u16 sub_active; - u32 item_id; //There is another struct array to store the cheat data - char name_shot[CHEAT_NAME_LENGTH]; - u32 reserved; -} GCHEAT_STRUCT; +#include "cheats.h" -typedef struct -{ - unsigned char** msg_index; - unsigned char* msg_pool; - unsigned int msg_num; -} MSG_TABLE; - -extern GCHEAT_STRUCT gcheat[MAX_CHEATS]; -extern unsigned int g_cheat_cell_num; -extern unsigned int g_cheat_num; +#define CHEATS_PER_PAGE 4 +#define MAX_CHEATS_PAGE (MAX_CHEATS_T / CHEATS_PER_PAGE) -extern int load_cheatfile(const char* filename, unsigned int *string_num, - unsigned int *string_len, GCHEAT_STRUCT *gcheat); -extern int load_cheatname(const char* filename, unsigned int string_num, - unsigned int string_len, MSG_TABLE* mssg_table); -extern void gcheat_Managment(GCHEAT_STRUCT *gcheat); +extern int NDSSFCLoadCheatFile(const char* filename); #ifdef __cplusplus } #endif - -#endif //__GCHEAT_H__ + +#endif //__GCHEAT_H__ -- cgit v1.2.3