From 89e63225bb059560787ae67444c2cc1fd2a38a66 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Sun, 2 Nov 2014 07:59:49 +0100 Subject: disable cheats. --- source/cheats.c | 4 ++++ source/cheats.h | 4 ++++ source/cheats2.c | 5 +++++ source/cpu.c | 10 +++++++--- source/gfx.c | 2 ++ source/globals.c | 2 ++ source/memmap.c | 2 ++ 7 files changed, 26 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/cheats.c b/source/cheats.c index f9f1ac8..403738d 100644 --- a/source/cheats.c +++ b/source/cheats.c @@ -86,6 +86,9 @@ Super NES and Super Nintendo Entertainment System are trademarks of Nintendo Co., Limited and its subsidiary companies. *******************************************************************************/ + +#ifdef WANT_CHEATS + #include #include #include @@ -459,3 +462,4 @@ void S9xOutputCheatSearchResults(SCheatData* d) } } +#endif diff --git a/source/cheats.h b/source/cheats.h index c3b38d5..c3a7a54 100644 --- a/source/cheats.h +++ b/source/cheats.h @@ -89,6 +89,8 @@ #ifndef _CHEATS_H_ #define _CHEATS_H_ +#ifdef WANT_CHEATS + #define MAX_SFCCHEAT_NAME 48 #define MAX_CHEATS_T 800 @@ -159,3 +161,5 @@ void S9xOutputCheatSearchResults (SCheatData *cheats); #endif +#endif + diff --git a/source/cheats2.c b/source/cheats2.c index 8118552..aaee684 100644 --- a/source/cheats2.c +++ b/source/cheats2.c @@ -86,6 +86,9 @@ Super NES and Super Nintendo Entertainment System are trademarks of Nintendo Co., Limited and its subsidiary companies. *******************************************************************************/ + +#ifdef WANT_CHEATS + #include #include #include @@ -288,3 +291,5 @@ bool8 S9xSaveCheatFile(const char* filename) fclose(fs); return (TRUE); } + +#endif diff --git a/source/cpu.c b/source/cpu.c index 1109a4e..be74003 100644 --- a/source/cpu.c +++ b/source/cpu.c @@ -185,11 +185,13 @@ void S9xReset(void) S9xSA1Init(); if (Settings.C4) S9xInitC4(); + +#ifdef WANT_CHEATS S9xInitCheatData(); +#endif + if (Settings.OBC1) ResetOBC1(); - - // Settings.Paused = FALSE; } void S9xSoftReset(void) { @@ -216,8 +218,10 @@ void S9xSoftReset(void) S9xSA1Init(); if (Settings.C4) S9xInitC4(); + +#ifdef WANT_CHEATS S9xInitCheatData(); +#endif - // Settings.Paused = FALSE; } diff --git a/source/gfx.c b/source/gfx.c index db89ec2..5e8d350 100644 --- a/source/gfx.c +++ b/source/gfx.c @@ -712,7 +712,9 @@ void S9xEndScreenRefresh() GFX.PPL = GFX.PPLx2 >> 1; } +#ifdef WANT_CHEATS S9xApplyCheats(); +#endif if (CPU.SRAMModified) { diff --git a/source/globals.c b/source/globals.c index 87307df..e2c9d7c 100644 --- a/source/globals.c +++ b/source/globals.c @@ -165,7 +165,9 @@ uint32 odd_low[4][16]; uint32 even_high[4][16]; uint32 even_low[4][16]; +#ifdef WANT_CHEATS SCheatData Cheat; +#endif SoundStatus so; diff --git a/source/memmap.c b/source/memmap.c index 13fcd9c..587a2c2 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -910,9 +910,11 @@ again: FreeSDD1Data(); InitROM(Tales); +#ifdef WANT_CHEATS S9xLoadCheatFile(S9xGetFilename("cht")); S9xInitCheatData(); S9xApplyCheats(); +#endif S9xReset(); -- cgit v1.2.3