From deb47ea430c2c424f00b552bcc740a527719d1ad Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 15 Feb 2023 21:00:44 -0500 Subject: [PATCH] hintless altar text (#2456) Co-authored-by: briaguya --- .../Enhancements/randomizer/3drando/fill.cpp | 4 +- .../Enhancements/randomizer/3drando/hints.cpp | 60 +++++++++++-------- .../Enhancements/randomizer/3drando/hints.hpp | 2 +- soh/soh/OTRGlobals.cpp | 2 +- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 84fce11a2..47ab9f4a7 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -1079,9 +1079,7 @@ int Fill() { } //Always execute ganon hint generation for the funny line CreateGanonText(); - if (AltarHintText) { - CreateAltarText(); - } + CreateAltarText(AltarHintText); if (DampeHintText) { CreateDampesDiaryText(); } diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp index 09c6a6528..8a43e0aab 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp @@ -678,37 +678,45 @@ static Text BuildGanonBossKeyText() { return Text()+"$b"+ganonBossKeyText+"^"; } -void CreateAltarText() { +void CreateAltarText(Option withHints) { //Child Altar Text - childAltarText = Hint(SPIRITUAL_STONE_TEXT_START).GetText()+"^"+ - //Spiritual Stones - (StartingKokiriEmerald.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(KOKIRI_EMERALD)) + - (StartingGoronRuby.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(GORON_RUBY)) + - (StartingZoraSapphire.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(ZORA_SAPPHIRE)) + - //How to open Door of Time, the event trigger is necessary to read the altar multiple times - BuildDoorOfTimeText(); + if (withHints) { + childAltarText = Hint(SPIRITUAL_STONE_TEXT_START).GetText()+"^"+ + //Spiritual Stones + (StartingKokiriEmerald.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(KOKIRI_EMERALD)) + + (StartingGoronRuby.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(GORON_RUBY)) + + (StartingZoraSapphire.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(ZORA_SAPPHIRE)) + + //How to open Door of Time, the event trigger is necessary to read the altar multiple times + BuildDoorOfTimeText(); + } else { + childAltarText = BuildDoorOfTimeText(); + } + CreateMessageFromTextObject(0x7040, 0, 2, 3, AddColorsAndFormat(childAltarText, {QM_GREEN, QM_RED, QM_BLUE})); //Adult Altar Text - adultAltarText = Hint(ADULT_ALTAR_TEXT_START).GetText()+"^"+ - //Medallion Areas - (StartingLightMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(LIGHT_MEDALLION)) + - (StartingForestMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(FOREST_MEDALLION)) + - (StartingFireMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(FIRE_MEDALLION)) + - (StartingWaterMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(WATER_MEDALLION)) + - (StartingSpiritMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(SPIRIT_MEDALLION)) + - (StartingShadowMedallion.Value() ? Text{ "##", "##", "##" } - : BuildDungeonRewardText(SHADOW_MEDALLION)) + - + adultAltarText = Hint(ADULT_ALTAR_TEXT_START).GetText() + "^"; + if (withHints) { + adultAltarText = adultAltarText + + //Medallion Areas + (StartingLightMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(LIGHT_MEDALLION)) + + (StartingForestMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(FOREST_MEDALLION)) + + (StartingFireMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(FIRE_MEDALLION)) + + (StartingWaterMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(WATER_MEDALLION)) + + (StartingSpiritMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(SPIRIT_MEDALLION)) + + (StartingShadowMedallion.Value() ? Text{ "##", "##", "##" } + : BuildDungeonRewardText(SHADOW_MEDALLION)); + } + adultAltarText = adultAltarText + //Bridge requirement BuildBridgeReqsText()+ diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.hpp b/soh/soh/Enhancements/randomizer/3drando/hints.hpp index 5e8df5286..a397d12ac 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.hpp @@ -223,7 +223,7 @@ extern void CreateMerchantsHints(); extern void CreateWarpSongTexts(); extern void CreateDampesDiaryText(); extern void CreateGanonText(); -extern void CreateAltarText(); +extern void CreateAltarText(Option withHints); Text& GetChildAltarText(); Text& GetAdultAltarText(); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 09e227db3..490b53b46 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1570,7 +1570,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { Randomizer_GetCheckFromActor(stone->id, play->sceneNum, actorParams); messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, hintCheck); - } else if ((textId == TEXT_ALTAR_CHILD || textId == TEXT_ALTAR_ADULT) && Randomizer_GetSettingValue(RSK_TOT_ALTAR_HINT)) { + } else if ((textId == TEXT_ALTAR_CHILD || textId == TEXT_ALTAR_ADULT)) { // rando hints at altar messageEntry = (LINK_IS_ADULT) ? CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_ALTAR_ADULT)