Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/yabause/src/cheat.h
2 views
1
/* Copyright 2007 Theo Berkau
2
3
This file is part of Yabause.
4
5
Yabause is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
Yabause is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Yabause; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
#ifndef CHEAT_H
21
#define CHEAT_H
22
23
#include "core.h"
24
25
enum
26
{
27
CHEATTYPE_NONE=0,
28
CHEATTYPE_ENABLE,
29
CHEATTYPE_BYTEWRITE,
30
CHEATTYPE_WORDWRITE,
31
CHEATTYPE_LONGWRITE
32
};
33
34
typedef struct
35
{
36
int type;
37
u32 addr;
38
u32 val;
39
char *desc;
40
int enable;
41
} cheatlist_struct;
42
43
int CheatInit(void);
44
void CheatDeInit(void);
45
int CheatAddCode(int type, u32 addr, u32 val);
46
int CheatAddARCode(const char *code);
47
int CheatChangeDescription(int type, u32 addr, u32 val, char *desc);
48
int CheatChangeDescriptionByIndex(int i, char *desc);
49
int CheatRemoveCode(int type, u32 addr, u32 val);
50
int CheatRemoveCodeByIndex(int i);
51
int CheatRemoveARCode(const char *code);
52
void CheatClearCodes(void);
53
void CheatEnableCode(int index);
54
void CheatDisableCode(int index);
55
void CheatDoPatches(void);
56
cheatlist_struct *CheatGetList(int *cheatnum);
57
int CheatSave(const char *filename);
58
int CheatLoad(const char *filename);
59
60
#endif
61
62