summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorvaguerant <vaguerant@users.noreply.github.com>2022-10-25 05:16:59 +1100
committerGitHub <noreply@github.com>2022-10-24 14:16:59 -0400
commit67e98d43b737ddf9b0f6bf1efc6822f5406b2561 (patch)
tree0b588c375e596557d1cf5345b6bf3f6847c76373 /soh/src/code
parente2a94610051f71c7e2240996314b517780d5be07 (diff)
Time Savers: Ask to Equip New Items (#1133)
* Time Savers: Ask to Equip New Items * Add to presets; fix early SFX * Simplify text reading * Shrug, does this fix it * Merge error * Merge develop
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_message_PAL.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c
index ad6e3fd12..e756f9ed4 100644
--- a/soh/src/code/z_message_PAL.c
+++ b/soh/src/code/z_message_PAL.c
@@ -1748,6 +1748,19 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
// OTRTODO
//DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_staff_message_data_staticSegmentRomStart + 4 + font->msgOffset),
//font->msgLength, __FILE__, __LINE__);
+
+ } else if (CVar_GetS32("gAskToEquip", 0) &&
+ (((LINK_IS_ADULT || CVar_GetS32("gNoRestrictAge", 0)) &&
+ // 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics
+ (textId == 0x0C || textId == 0x4B || textId == 0x4E ||
+ textId == 0x50 || textId == 0x51)) ||
+ ((!LINK_IS_ADULT || CVar_GetS32("gNoRestrictAge", 0)) &&
+ // 4C = Deku Shield, A4 = Kokiri Sword
+ (textId == 0x4C || textId == 0xA4)) ||
+ // 4D == Hylian Shield
+ textId == 0x4D)) {
+ Message_FindMessage(globalCtx, textId);
+ msgCtx->msgLength = font->msgLength = GetEquipNowMessage(font->msgBuf, font->msgOffset, sizeof(font->msgBuf));
} else {
Message_FindMessage(globalCtx, textId);
msgCtx->msgLength = font->msgLength;