/* Copyright 2007 Theo Berkau12This file is part of Yabause.34Yabause is free software; you can redistribute it and/or modify5it under the terms of the GNU General Public License as published by6the Free Software Foundation; either version 2 of the License, or7(at your option) any later version.89Yabause is distributed in the hope that it will be useful,10but WITHOUT ANY WARRANTY; without even the implied warranty of11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12GNU General Public License for more details.1314You should have received a copy of the GNU General Public License15along with Yabause; if not, write to the Free Software16Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA17*/1819#ifndef CHEAT_H20#define CHEAT_H2122#include "core.h"2324enum25{26CHEATTYPE_NONE=0,27CHEATTYPE_ENABLE,28CHEATTYPE_BYTEWRITE,29CHEATTYPE_WORDWRITE,30CHEATTYPE_LONGWRITE31};3233typedef struct34{35int type;36u32 addr;37u32 val;38char *desc;39int enable;40} cheatlist_struct;4142int CheatInit(void);43void CheatDeInit(void);44int CheatAddCode(int type, u32 addr, u32 val);45int CheatAddARCode(const char *code);46int CheatChangeDescription(int type, u32 addr, u32 val, char *desc);47int CheatChangeDescriptionByIndex(int i, char *desc);48int CheatRemoveCode(int type, u32 addr, u32 val);49int CheatRemoveCodeByIndex(int i);50int CheatRemoveARCode(const char *code);51void CheatClearCodes(void);52void CheatEnableCode(int index);53void CheatDisableCode(int index);54void CheatDoPatches(void);55cheatlist_struct *CheatGetList(int *cheatnum);56int CheatSave(const char *filename);57int CheatLoad(const char *filename);5859#endif606162