| 1 | /* Cheats converter |
| 2 | |
| 3 | Copyright 2009 DeSmuME team |
| 4 | |
| 5 | This file is part of DeSmuME |
| 6 | |
| 7 | DeSmuME is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 2 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | DeSmuME is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with DeSmuME; if not, write to the Free Software |
| 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ |
| 21 | |
| 22 | #ifndef __CONVERT_H__ |
| 23 | #define __CONVERT_H__ |
| 24 | |
| 25 | #include "common.h" |
| 26 | |
| 27 | #define CHEAT_VERSION_MAJOR 2 |
| 28 | #define CHEAT_VERSION_MINOR 0 |
| 29 | #define MAX_CHEAT_LIST 200 |
| 30 | #define MAX_XX_CODE 512 |
| 31 | |
| 32 | typedef struct |
| 33 | { |
| 34 | u8 type; // 0 - internal cheat system |
| 35 | // 1 - Action Replay |
| 36 | // 2 - Codebreakers |
| 37 | bool enabled; |
| 38 | u32 code[MAX_XX_CODE][2]; |
| 39 | u32 hi[MAX_XX_CODE]; |
| 40 | u32 lo[MAX_XX_CODE]; |
| 41 | char description[75]; |
| 42 | int num; |
| 43 | u8 size; |
| 44 | |
| 45 | } CHEATS_LIST; |
| 46 | |
| 47 | extern bool convertFile(char *fname); |
| 48 | #endif |