diff --git a/source/hint_list.cpp b/source/hint_list.cpp index 18e96bc..bd179e7 100644 --- a/source/hint_list.cpp +++ b/source/hint_list.cpp @@ -215,7 +215,13 @@ void HintTable_Init() { //clear Text{"Double Defense", "**FRENCH**", "**SPANISH**"} ); - // OCARINA_OF_TIME, + hintTable[OCARINA_OF_TIME] = HintText::Item({ + //obscure + Text{"a musical instrument", "**FRENCH**", "**SPANISH**"} + }, + //clear + Text{"the Ocarina of Time", "**FRENCH**", "**SPANISH**"} + ); hintTable[PICTOGRAPH_BOX] = HintText::Item({ //obscure Text{"a capture device", "**FRENCH**", "**SPANISH**"} @@ -2012,6 +2018,7 @@ void HintTable_Init() { /*---------------------- | REGTION HINT TEXT | ----------------------*/ + hintTable[LINKS_POCKET] = HintText::Region({ Text{"Your Pocket", "**FRENCH**", "**SPANISH**"}}); hintTable[N_CLOCK_TOWN] = HintText::Region({ Text{"N Clock Town", "**FRENCH**", "**SPANISH**"}}); hintTable[CLOCK_TOWN_FAIRY_FOUNTAIN] = HintText::Region({Text{"Clock Town Fairy Fountain", "**FRENCH**", "**SPANISH**"}}); hintTable[CLOCK_TOWN_DEKU_PLAYGROUND] = HintText::Region({Text{"Deku Playground", "**FRENCH**", "**SPANISH**"}}); diff --git a/source/hints.cpp b/source/hints.cpp index 03b98c6..ed01f21 100644 --- a/source/hints.cpp +++ b/source/hints.cpp @@ -123,9 +123,9 @@ static Area* GetHintRegion(const AreaKey area) { } //add unchecked exits to spot queue - bool checked = false; - for (auto& exit : AreaTable(region)->exits) { + bool checked = false; + for (AreaKey checkedExit : alreadyChecked) { if (exit.GetAreaKey() == checkedExit) { checked = true; @@ -484,13 +484,58 @@ void CreateTingleHintText() { } } //Find the location which has the given itemKey and create the generic altar text for the reward -/* -static Text BuildDungeonRewardText(ItemID itemID, const ItemKey itemKey) { + +/*static Text BuildDungeonRewardText(ItemID itemID, const ItemKey itemKey) { LocationKey location = FilterFromPool(allLocations, [itemKey](const LocationKey loc){return Location(loc)->GetPlacedItemKey() == itemKey;})[0]; //Calling ITEM_OBTAINED draws the passed in itemID to the left side of the textbox return Text()+ITEM_OBTAINED(itemID)+"#"+GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText()+"#...^"; +}*/ + +static std::string BuildDoorText(const ItemKey itemKey) { + LocationKey location = FilterFromPool(allLocations, [itemKey](const LocationKey loc){return Location(loc)->GetPlacedItemKey() == itemKey;})[0]; + if (Location(location)->GetParentRegionKey() == NONE) { + Location(location)->SetParentRegion(LINKS_POCKET); + } + return "#"+GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText().GetEnglish()+"#."; } -*/ + +void CreateClockTowerDoorHints() { + // Create hint text + std::string ocarinaHint = "Hey, didn't you have some sort of #musical instrument#?&If I know the Skull Kid, I bet he hid it at "+BuildDoorText(OCARINA_OF_TIME); + std::string odolwaHint = "There's one with a #crown# and #jewellery# said to be found at "+BuildDoorText(ODOLWAS_REMAINS); + std::string gohtHint = "Another #extremely sturdy# one with #huge horns# at "+BuildDoorText(GOHTS_REMAINS); + std::string gyorgHint = "One with #giant fins# and #razor sharp teeth# at "+BuildDoorText(GYORGS_REMAINS); + std::string twinmoldHint = "And one with #three eyes# and #enormous mandibles# at "+BuildDoorText(TWINMOLDS_REMAINS); + if (StartingOdolwaRemains.Value() == 1) { + odolwaHint = "There's one with a #crown# and #jewellery# said to be found in "+BuildDoorText(ODOLWAS_REMAINS); + } + if (StartingGohtRemains.Value() == 1) { + gohtHint = "Another #extremely sturdy# one with #huge horns# in "+BuildDoorText(GOHTS_REMAINS); + } + if (StartingGyorgRemains.Value() == 1) { + gyorgHint = "One with #giant fins# and #razor sharp teeth# in "+BuildDoorText(GYORGS_REMAINS); + } + if (StartingTwinmoldRemains.Value() == 1){ + twinmoldHint = "And one with #three eyes# and #enormous mandibles# in "+BuildDoorText(TWINMOLDS_REMAINS); + } + + CustomMessages::CreateMessage(0x0630, (StartingOcarina.Value() == 0) ? 0x8000 : 0x8002, 0x3FFFFFFF, 0x0FF0211, + "Rooftop access strictly prohibited!&(Enforceable until #midnight# on the&#eve# of the carnival.)^" + "#Notice of carnival activities:#&Musical Performance Contest&Unique Mask Contest&#Prizes available!#", + {QM_RED, QM_RED, QM_RED, QM_MAGENTA}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8000, 0x8001, 0x3FFFFFFF, 0x1000000, ocarinaHint.c_str(), {QM_BLUE, QM_RED}, {}, {}, 0x037C, false, false); + CustomMessages::CreateMessage(0x8001, 0x8003, 0x3FFFFFFF, 0x1FF0000, + "Also, that #mask competition# sounds interesting! I've heard rumours of some pretty #rare masks# around here, truly one of a kind stuff!", + {QM_RED, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8002, 0x8003, 0x3FFFFFFF, 0x1FF0000, + "Hey, that #mask competition# sounds interesting! I've heard rumours of some pretty #rare masks# around here, truly one of a kind stuff!", + {QM_RED, QM_RED}, {}, {}, 0x037C, false, false); + CustomMessages::CreateMessage(0x8003, 0x8004, 0x3FFFFFFF, 0x15D0000, odolwaHint.c_str(), {QM_GREEN, QM_GREEN, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8004, 0x8005, 0x3FFFFFFF, 0x15E0000, gohtHint.c_str(), {QM_MAGENTA, QM_MAGENTA, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8005, 0x8006, 0x3FFFFFFF, 0x15F0000, gyorgHint.c_str(), {QM_CYAN, QM_CYAN, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8006, 0xFFFF, 0x3FFFFFFF, 0x0600000, twinmoldHint.c_str(), {QM_YELLOW, QM_YELLOW, QM_RED}, {}, {}, 0x0, false, false); +} + //insert the required number into the hint and set the singular/plural form /* static Text BuildCountReq(const HintKey req, const Option& count) { @@ -599,4 +644,4 @@ void CreateAllHints() { GetAccessibleLocations({}); -} +} \ No newline at end of file diff --git a/source/include/hints.hpp b/source/include/hints.hpp index fe2a0cf..594ace6 100644 --- a/source/include/hints.hpp +++ b/source/include/hints.hpp @@ -166,3 +166,4 @@ class HintText { extern void CreateAllHints(); extern void CreateTingleHintText(); +extern void CreateClockTowerDoorHints(); \ No newline at end of file diff --git a/source/location_access.cpp b/source/location_access.cpp index 34e853e..e866fa4 100644 --- a/source/location_access.cpp +++ b/source/location_access.cpp @@ -212,6 +212,11 @@ void AreaTable_Init() { Entrance(S_CLOCK_TOWN, {[]{return true;}}), }); + areaTable[LINKS_POCKET] = Area("Links Pocket", "Links Pocket", LINKS_POCKET, {}, {}, { + //Exits + Entrance(S_CLOCK_TOWN, {[]{return true;}}), + }); + /*-------------------------- | OVERWORLD | ---------------------------*/ @@ -750,6 +755,7 @@ void AreaTable_Init() { }, { //Exits + Entrance(TERMINA_FIELD, {[]{return true;}}), }); areaTable[TERMINA_FIELD_BUSINESS_SCRUB_GROTTO] = Area("Termina Field Business Scrub Grotto","Termina Field Business Scrub Grotto", NONE, { //Events diff --git a/source/playthrough.cpp b/source/playthrough.cpp index 2db9c7e..c3d3b42 100644 --- a/source/playthrough.cpp +++ b/source/playthrough.cpp @@ -78,6 +78,7 @@ namespace Playthrough { PlacementLog_Clear(); } CreateTingleHintText(); + CreateClockTowerDoorHints(); playthroughLocations.clear(); wothLocations.clear();