ref: 9f1c5a293dc25dba3e5155d6bcd4ee9ad7ae058d
parent: e6fb7c20acff18ccfadd6ad4584e30984ae948d1
author: Snesrev <snesrev@protonmail.com>
date: Sat Sep 17 22:40:06 EDT 2022
Add 'MirrorToDarkworld' to allow mirror to warp both ways
--- a/config.c
+++ b/config.c
@@ -272,6 +272,9 @@
} else if (StringEqualsNoCase(key, "TurnWhileDashing")) {
g_config.turn_while_dashing = (bool)strtol(value, (char **)NULL, 10);
return true;
+ } else if (StringEqualsNoCase(key, "MirrorToDarkworld")) {
+ g_config.mirror_to_darkworld = (bool)strtol(value, (char **)NULL, 10);
+ return true;
}
}
return false;
--- a/config.h
+++ b/config.h
@@ -48,6 +48,7 @@
bool enable_msu;
bool item_switch_lr;
bool turn_while_dashing;
+ bool mirror_to_darkworld;
} Config;
extern Config g_config;
--- a/main.c
+++ b/main.c
@@ -190,6 +190,7 @@
f |= (g_zenv.ppu->extraLeftRight && !g_config.extended_aspect_ratio_nospr) ? kFeatures0_ExtendScreen64 : 0;
f |= g_config.item_switch_lr * kFeatures0_SwitchLR;
f |= g_config.turn_while_dashing * kFeatures0_TurnWhileDashing;
+ f |= g_config.mirror_to_darkworld * kFeatures0_MirrorToDarkworld;
g_wanted_zelda_features = f;
}
--- a/player.c
+++ b/player.c
@@ -2848,7 +2848,9 @@
}
button_mask_b_y &= ~0x40;
- if (is_standing_in_doorway || !cheatWalkThroughWalls && !player_is_indoors && !(overworld_screen_index & 0x40)) {
+ if (is_standing_in_doorway ||
+ !cheatWalkThroughWalls && !(enhanced_features0 & kFeatures0_MirrorToDarkworld) &&
+ !player_is_indoors && !(overworld_screen_index & 0x40)) {
Ancilla_Sfx2_Near(60);
return;
}
--- a/zelda3.ini
+++ b/zelda3.ini
@@ -40,6 +40,10 @@
# Allow turning while dashing
TurnWhileDashing = 0
+# Allow mirror to be used to warp to the darkworld
+MirrorToDarkworld = 0
+
+
[KeyMap]
# Change what keyboard keys map to the joypad
# Order: Up, Down, Left, Right, Select, Start, A, B, X, Y, L, R
--- a/zelda_rtl.h
+++ b/zelda_rtl.h
@@ -117,6 +117,7 @@
kFeatures0_ExtendScreen64 = 1,
kFeatures0_SwitchLR = 2,
kFeatures0_TurnWhileDashing = 4,
+ kFeatures0_MirrorToDarkworld = 8,
};
#define enhanced_features0 (*(uint32*)(g_ram+0x64c))