diff options
author | neonloop | 2021-08-30 15:25:52 +0000 |
---|---|---|
committer | neonloop | 2021-08-30 15:25:52 +0000 |
commit | 05c5d66301f14bd8ae50490ebdc7e32e371f851b (patch) | |
tree | 2a7a376bf0c7e32fcd0c16bb931d4ac2f046269b /cheat.h | |
parent | 8a8a5726cef8b8cb3c32e670fd200d49f3b04c28 (diff) | |
download | picoarch-05c5d66301f14bd8ae50490ebdc7e32e371f851b.tar.gz picoarch-05c5d66301f14bd8ae50490ebdc7e32e371f851b.tar.bz2 picoarch-05c5d66301f14bd8ae50490ebdc7e32e371f851b.zip |
Adds cheat support
Cheats use RetroArch .cht file format. Cheats are loaded from
[save_dir]/cheats/[name].cht, where name is the name of the ROM
without extension. Cheat menu only shows when cheat file is found.
Diffstat (limited to 'cheat.h')
-rw-r--r-- | cheat.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#ifndef __CHEAT_H_ +#define __CHEAT_H_ + +#include <stdlib.h> + +struct cheat { + const char *name; + const char *info; + int enabled; + const char *code; +}; + +struct cheats { + int enabled; + size_t count; + struct cheat *cheats; +}; + +struct cheats *cheats_load(const char *filename); +void cheats_free(struct cheats *cheats); + +#endif |