From d7ec9b193b82ac00e3e5bf3a5e79216d7c71d923 Mon Sep 17 00:00:00 2001 From: "Carl.Kenner" Date: Wed, 8 Apr 2009 07:33:33 +0000 Subject: [PATCH] Make it easy to disable cheats before release, which I should have done last time. Note to self/Tantric: comment out ALLOWCHEATS in inputzelda before releasing. --- source/ngc/inputzelda.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/ngc/inputzelda.cpp b/source/ngc/inputzelda.cpp index 02cd4c0..caa4c61 100644 --- a/source/ngc/inputzelda.cpp +++ b/source/ngc/inputzelda.cpp @@ -30,6 +30,8 @@ #include "gba/bios.h" #include "gba/GBAinline.h" +#define ALLOWCHEAT + u8 ZeldaDxLeftPos = 2, ZeldaDxRightPos = 3, ZeldaDxDownPos = 4; u8 ZeldaDxShieldPos = 5, ZeldaDxSwordPos = 5, ZeldaDxBraceletPos = 5; @@ -121,6 +123,7 @@ void ZeldaDxSheathSword() void ZeldaDxCheat() { +#ifdef ALLOWCHEAT gbWriteMemory(0xDB00 + 11, 0); for (int i = 0; i <= 10; i++) { @@ -137,10 +140,12 @@ void ZeldaDxCheat() gbWriteMemory(0xDB5D, 0x9); // rupees gbWriteMemory(0xDB5E, 0x99); // rupees gbWriteMemory(0xDBD0, 1); // keys +#endif } void ZeldaAgesCheat() { +#ifdef ALLOWCHEAT int j = 1; for (int i = 0; i <= 14; i++, j++) { @@ -167,10 +172,12 @@ void ZeldaAgesCheat() for (j=0xC6B9; j<=0xC6BD; j++) gbWriteMemory(j, 0x05); // seeds gbWriteMemory(0xC6BF, 0xFF); // essences gbWriteMemory(0xCF14, 0xEA); // GBA shop +#endif } void ZeldaSeasonsCheat() { +#ifdef ALLOWCHEAT gbWriteMemory(0xC68F, 0); gbWriteMemory(0xC690, 0); gbWriteMemory(0xC691, 0); @@ -199,6 +206,7 @@ void ZeldaSeasonsCheat() gbWriteMemory(0xC6BF, 0xFF); // essences gbWriteMemory(0xC6C6, 3); // ring box gbWriteMemory(0xCF14, 0xEA); // GBA shop +#endif } u32 LinksAwakeningInput(unsigned short pad) // aka Zelda DX