hintless altar text (#2456)

Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
briaguya 2023-02-15 21:00:44 -05:00 committed by GitHub
parent 622d8c4aff
commit deb47ea430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 31 deletions

View File

@ -1079,9 +1079,7 @@ int Fill() {
}
//Always execute ganon hint generation for the funny line
CreateGanonText();
if (AltarHintText) {
CreateAltarText();
}
CreateAltarText(AltarHintText);
if (DampeHintText) {
CreateDampesDiaryText();
}

View File

@ -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<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(KOKIRI_EMERALD)) +
(StartingGoronRuby.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(GORON_RUBY)) +
(StartingZoraSapphire.Value<uint8_t>() ? 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<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(KOKIRI_EMERALD)) +
(StartingGoronRuby.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(GORON_RUBY)) +
(StartingZoraSapphire.Value<uint8_t>() ? 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<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(LIGHT_MEDALLION)) +
(StartingForestMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(FOREST_MEDALLION)) +
(StartingFireMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(FIRE_MEDALLION)) +
(StartingWaterMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(WATER_MEDALLION)) +
(StartingSpiritMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(SPIRIT_MEDALLION)) +
(StartingShadowMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(SHADOW_MEDALLION)) +
adultAltarText = Hint(ADULT_ALTAR_TEXT_START).GetText() + "^";
if (withHints) {
adultAltarText = adultAltarText +
//Medallion Areas
(StartingLightMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(LIGHT_MEDALLION)) +
(StartingForestMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(FOREST_MEDALLION)) +
(StartingFireMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(FIRE_MEDALLION)) +
(StartingWaterMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(WATER_MEDALLION)) +
(StartingSpiritMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(SPIRIT_MEDALLION)) +
(StartingShadowMedallion.Value<uint8_t>() ? Text{ "##", "##", "##" }
: BuildDungeonRewardText(SHADOW_MEDALLION));
}
adultAltarText = adultAltarText +
//Bridge requirement
BuildBridgeReqsText()+

View File

@ -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();

View File

@ -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)