From 48a41bd11c4bc9bd5383dffd4cfcd3323a74a67c Mon Sep 17 00:00:00 2001 From: Sarge-117 Date: Sun, 7 Aug 2022 16:31:50 -0700 Subject: [PATCH] Comment clarity --- soh/src/code/z_message_PAL.c | 3 +- soh/src/code/z_message_RandoNaviTips.c | 28 +++++++++++++++++-- .../actors/ovl_player_actor/z_player.c | 8 +++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index 0d0da60517..0a12047757 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1750,7 +1750,8 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) { break; } msgCtx->msgLength = font->msgLength = strlen(font->msgBuf); - } else if (textId == 0x0140 && gSaveContext.n64ddFlag) { //888888888 + // Give Navi rando-specific gameplay tips + } else if (textId == 0x0140 && gSaveContext.n64ddFlag) { RandoNaviTip(globalCtx); msgCtx->msgLength = font->msgLength = strlen(font->msgBuf); } else { diff --git a/soh/src/code/z_message_RandoNaviTips.c b/soh/src/code/z_message_RandoNaviTips.c index edb1b7f9b5..4d2bd0a925 100644 --- a/soh/src/code/z_message_RandoNaviTips.c +++ b/soh/src/code/z_message_RandoNaviTips.c @@ -4,8 +4,14 @@ #include +// Function for letting Navi give general rando tips to the player instead of her +// normal generic quest tips. + +// Only applies to Navi's overworld quest hints - does not apply to enemy information +// or contextual hints (e.g. "This hallway is twisted!" in Forest Temple) + void RandoNaviTip(GlobalContext* globalCtx) { - u16 randNaviTip = rand() % 3; + u16 randNaviTip = rand() % 4; MessageContext* msgCtx = &globalCtx->msgCtx; Font* font = &msgCtx->font; @@ -51,7 +57,25 @@ void RandoNaviTip(GlobalContext* globalCtx) { default: strcpy(font->msgBuf, "\x08\x05\x44There are three\x05\x42 business scrubs\x05\x44 in\x01" - "Hyrule who sell \x05\x46mysterious items\x05\x44. Do\x01you know where they are?\x02"); + "Hyrule who sell \x05\x49mysterious items\x05\x44. Do\x01you know where they are?\x02"); + break; + } + } + if (randNaviTip == 3) { + switch (gSaveContext.language) { + case LANGUAGE_FRA: + strcpy(font->msgBuf, "\x08\x05\x44" + "French tip about playing rando!\x02"); + break; + case LANGUAGE_GER: + strcpy(font->msgBuf, "\x08German tip about playing rando!\x02"); + break; + case LANGUAGE_ENG: + default: + strcpy(font->msgBuf, + "\x08\x05\x44Stuck on this seed? You could\x01" + "throw in the towel and check the \x01" + "\x05\x49spoiler log\x05\x44...\x02"); break; } } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 61f013d4c7..7d5d616159 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -15286,9 +15286,9 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) { if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) { this->naviActor->flags |= ACTOR_FLAG_8; func_80835EA4(globalCtx, 0xB); - - if (actor->textId >= 0x0140 && actor->textId <= 0x015F && gSaveContext.n64ddFlag) { - Message_StartTextbox(globalCtx, 0x0140, NULL); - } + // If rando'd and Navi wants to give you a general quest tip, give a rando tip instead + // if (actor->textId >= 0x0140 && actor->textId <= 0x015F && gSaveContext.n64ddFlag) { + // Message_StartTextbox(globalCtx, 0x0140, NULL); + // } } }