mirror of
https://github.com/snesrev/zelda3.git
synced 2025-12-25 02:14:49 -05:00
Fill rupees, bombs, and arrows (Fixes #64)
This commit is contained in:
6
config.c
6
config.c
@@ -33,8 +33,8 @@ static const uint16 kDefaultKbdControls[kKeys_Total] = {
|
||||
_(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, ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ZoomIn, ZoomOut, DisplayPerf, ToggleRenderer
|
||||
_(SDLK_w), _(SDLK_o), _(SDLK_k), _(SDLK_l), A(SDLK_RETURN), _(SDLK_e), S(SDLK_p), _(SDLK_p), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r),
|
||||
// CheatLife, CheatKeys, CheatEquipment, ClearKeyLog, StopReplay, Fullscreen, Reset, Pause, PauseDimmed, Turbo, ZoomIn, ZoomOut, DisplayPerf, ToggleRenderer
|
||||
_(SDLK_w), _(SDLK_o), S(SDLK_w), _(SDLK_k), _(SDLK_l), A(SDLK_RETURN), _(SDLK_e), S(SDLK_p), _(SDLK_p), _(SDLK_t), N, N, _(SDLK_f), _(SDLK_r),
|
||||
};
|
||||
#undef _
|
||||
#undef A
|
||||
@@ -51,7 +51,7 @@ typedef struct KeyNameId {
|
||||
#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(ClearKeyLog), S(StopReplay), S(Fullscreen), S(Reset),
|
||||
S(CheatLife), S(CheatKeys), S(CheatEquipment), S(ClearKeyLog), S(StopReplay), S(Fullscreen), S(Reset),
|
||||
S(Pause), S(PauseDimmed), S(Turbo), S(ZoomIn), S(ZoomOut), S(DisplayPerf), S(ToggleRenderer),
|
||||
};
|
||||
#undef S
|
||||
|
||||
1
config.h
1
config.h
@@ -17,6 +17,7 @@ enum {
|
||||
kKeys_ReplayRef_Last = kKeys_ReplayRef + 19,
|
||||
kKeys_CheatLife,
|
||||
kKeys_CheatKeys,
|
||||
kKeys_CheatEquipment,
|
||||
kKeys_ClearKeyLog,
|
||||
kKeys_StopReplay,
|
||||
kKeys_Fullscreen,
|
||||
|
||||
1
main.c
1
main.c
@@ -420,6 +420,7 @@ static void HandleCommand(uint32 j, bool pressed) {
|
||||
} else {
|
||||
switch (j) {
|
||||
case kKeys_CheatLife: PatchCommand('w'); break;
|
||||
case kKeys_CheatEquipment: PatchCommand('W'); break;
|
||||
case kKeys_CheatKeys: PatchCommand('o'); break;
|
||||
case kKeys_ClearKeyLog: PatchCommand('k'); break;
|
||||
case kKeys_StopReplay: PatchCommand('l'); break;
|
||||
|
||||
@@ -999,6 +999,12 @@ void PatchCommand(char c) {
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf372, 80); // health filler
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf373, 80); // magic filler
|
||||
// b.Patch(0x1FE01, 25);
|
||||
} else if (c == 'W') {
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf375, 10); // link_bomb_filler
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf376, 10); // link_arrow_filler
|
||||
uint16 rupees = link_rupees_goal + 100;
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf360, rupees); // link_rupees_goal
|
||||
StateRecoderMultiPatch_Patch(&mp, 0xf361, rupees >> 8); // link_rupees_goal
|
||||
} else if (c == 'k') {
|
||||
StateRecorder_ClearKeyLog(&state_recorder);
|
||||
} else if (c == 'o') {
|
||||
|
||||
Reference in New Issue
Block a user