ref: 608af92760c022f28ca4fcbe6f9e2d50bb847909
parent: d9ec4b11e473a9202a28b127a5fd8105d022ef71
author: Snesrev <snesrev@protonmail.com>
date: Thu Sep 29 18:56:02 EDT 2022
Add cheat to walk through walls
--- a/config.c
+++ b/config.c
@@ -34,8 +34,10 @@
_(SDLK_1), _(SDLK_2), _(SDLK_3), _(SDLK_4), _(SDLK_5), _(SDLK_6), _(SDLK_7), _(SDLK_8), _(SDLK_9), _(SDLK_0), _(SDLK_MINUS), _(SDLK_EQUALS), _(SDLK_BACKSPACE), N, N, N, N, N, N, N,
// Replay Ref State
C(SDLK_1), C(SDLK_2), C(SDLK_3), C(SDLK_4), C(SDLK_5), C(SDLK_6), C(SDLK_7), C(SDLK_8), C(SDLK_9), C(SDLK_0), C(SDLK_MINUS), C(SDLK_EQUALS), C(SDLK_BACKSPACE), N, N, N, N, N, N, N,
- // CheatLife, CheatKeys, CheatEquipment, ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ReplayTurbo, WindowBigger, WindowSmaller, DisplayPerf, ToggleRenderer
- _(SDLK_w), _(SDLK_o), S(SDLK_w), _(SDLK_k), _(SDLK_l), A(SDLK_RETURN), _(SDLK_e), S(SDLK_p), _(SDLK_p), _(SDLK_TAB), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r),
+ // CheatLife, CheatKeys, CheatEquipment, CheatWalkThroughWalls
+ _(SDLK_w), _(SDLK_o), S(SDLK_w), C(SDLK_e),
+ // ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ReplayTurbo, WindowBigger, WindowSmaller, DisplayPerf, ToggleRenderer
+ _(SDLK_k), _(SDLK_l), A(SDLK_RETURN), C(SDLK_r), S(SDLK_p), _(SDLK_p), _(SDLK_TAB), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r),
};
#undef _
#undef A
@@ -52,7 +54,8 @@
#define S(n) {#n, kKeys_##n, 1}
static const KeyNameId kKeyNameId[] = {
M(Controls), M(Load), M(Save), M(Replay), M(LoadRef), M(ReplayRef),
- S(CheatLife), S(CheatKeys), S(CheatEquipment), S(ClearKeyLog), S(StopReplay), S(Fullscreen), S(Reset),
+ S(CheatLife), S(CheatKeys), S(CheatEquipment), S(CheatWalkThroughWalls),
+ S(ClearKeyLog), S(StopReplay), S(Fullscreen), S(Reset),
S(Pause), S(PauseDimmed), S(Turbo), S(ReplayTurbo), S(WindowBigger), S(WindowSmaller), S(DisplayPerf), S(ToggleRenderer),
};
#undef S
@@ -315,6 +318,8 @@
return ParseBoolBit(value, &g_config.features0, kFeatures0_MoreActiveBombs);
} else if (StringEqualsNoCase(key, "CarryMoreRupees")) {
return ParseBoolBit(value, &g_config.features0, kFeatures0_CarryMoreRupees);
+ } else if (StringEqualsNoCase(key, "MiscBugFixes")) {
+ return ParseBoolBit(value, &g_config.features0, kFeatures0_MiscBugFixes);
}
}
return false;
--- a/config.h
+++ b/config.h
@@ -18,6 +18,7 @@
kKeys_CheatLife,
kKeys_CheatKeys,
kKeys_CheatEquipment,
+ kKeys_CheatWalkThroughWalls,
kKeys_ClearKeyLog,
kKeys_StopReplay,
kKeys_Fullscreen,
--- a/main.c
+++ b/main.c
@@ -523,6 +523,7 @@
case kKeys_CheatLife: PatchCommand('w'); break;
case kKeys_CheatEquipment: PatchCommand('W'); break;
case kKeys_CheatKeys: PatchCommand('o'); break;
+ case kKeys_CheatWalkThroughWalls: PatchCommand('E'); break;
case kKeys_ClearKeyLog: PatchCommand('k'); break;
case kKeys_StopReplay: PatchCommand('l'); break;
case kKeys_Fullscreen:
--- a/zelda3.ini
+++ b/zelda3.ini
@@ -88,10 +88,11 @@
CheatLife = w
CheatKeys = o
+CheatWalkThroughWalls = Ctrl+e
ClearKeyLog = k
StopReplay = l
Fullscreen = Alt+Return
-Reset = Ctrl+e
+Reset = Ctrl+r
Pause = Shift+p
PauseDimmed = p
Turbo = Tab
--- a/zelda_rtl.c
+++ b/zelda_rtl.c
@@ -886,6 +886,8 @@
StateRecoderMultiPatch_Patch(&mp, 0xf36f, 1);
} else if (c == 'l') {
StateRecorder_StopReplay(&state_recorder);
+ } else if (c == 'E') {
+ StateRecoderMultiPatch_Patch(&mp, 0x37f, g_ram[0x37f] ^ 1);
}
StateRecoderMultiPatch_Commit(&mp);
}