blob: 3e32c7538c787817bfb6e06dd79d433d29a26ef8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* Cheat Support for PCSX-Reloaded
*
* Copyright (C) 2009, Wei Mingzhi <whistler@openoffice.org>.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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 Steet, Fifth Floor, Boston, MA 02111-1307 USA
*/
#ifndef CHEAT_H
#define CHEAT_H
typedef struct {
uint32_t Addr;
uint16_t Val;
} CheatCode;
typedef struct {
char *Descr;
int First; // index of the first cheat code
int n; // number of cheat codes for this cheat
int Enabled;
} Cheat;
void ClearAllCheats();
void LoadCheats(const char *filename);
void SaveCheats(const char *filename);
void ApplyCheats();
int AddCheat(const char *descr, char *code);
void RemoveCheat(int index);
int EditCheat(int index, const char *descr, char *code);
extern Cheat *Cheats;
extern CheatCode *CheatCodes;
extern int NumCheats;
extern int NumCodes;
#endif
|