annotate src/gba/GBACheats.h @ 280:d5e5c73af7e6

reorginazed save corruption code
author Robert McIntyre <rlm@mit.edu>
date Tue, 27 Mar 2012 21:08:44 -0500
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 #ifndef VBA_GBA_CHEATS_H
rlm@1 2 #define VBA_GBA_CHEATS_H
rlm@1 3
rlm@1 4 #if _MSC_VER > 1000
rlm@1 5 #pragma once
rlm@1 6 #endif // _MSC_VER > 1000
rlm@1 7
rlm@1 8 #include "zlib.h"
rlm@1 9 #include "../Port.h"
rlm@1 10
rlm@1 11 struct CheatsData
rlm@1 12 {
rlm@1 13 int code;
rlm@1 14 int size;
rlm@1 15 int status;
rlm@1 16 bool enabled;
rlm@1 17 u32 address;
rlm@1 18 u32 value;
rlm@1 19 u32 oldValue;
rlm@1 20 char codestring[20];
rlm@1 21 char desc[32];
rlm@1 22 };
rlm@1 23
rlm@1 24 extern void cheatsAdd(const char *, const char *, u32, u32, int, int);
rlm@1 25 extern void cheatsAddCheatCode(const char *code, const char *desc);
rlm@1 26 extern void cheatsAddGSACode(const char *code, const char *desc, bool v3);
rlm@1 27 extern void cheatsAddCBACode(const char *code, const char *desc);
rlm@1 28 extern bool cheatsImportGSACodeFile(const char *name, int game, bool v3);
rlm@1 29 extern void cheatsDelete(int number, bool restore);
rlm@1 30 extern void cheatsDeleteAll(bool restore);
rlm@1 31 extern void cheatsEnable(int number);
rlm@1 32 extern void cheatsDisable(int number);
rlm@1 33 extern void cheatsSaveGame(gzFile file);
rlm@1 34 extern void cheatsReadGame(gzFile file);
rlm@1 35 extern void cheatsSaveCheatList(const char *file);
rlm@1 36 extern bool cheatsLoadCheatList(const char *file);
rlm@1 37 extern void cheatsWriteMemory(u32 *, u32, u32);
rlm@1 38 extern void cheatsWriteHalfWord(u16 *, u16, u16);
rlm@1 39 extern void cheatsWriteByte(u8 *, u8);
rlm@1 40 extern int cheatsCheckKeys(u32, u32);
rlm@1 41 extern int cheatsNumber;
rlm@1 42 extern CheatsData cheatsList[100];
rlm@1 43
rlm@1 44 #endif // GBA_CHEATS_H