diff --git a/source/fill.cpp b/source/fill.cpp index 4c783ee..1bfff0f 100644 --- a/source/fill.cpp +++ b/source/fill.cpp @@ -177,7 +177,7 @@ std::vector GetAccessibleLocations(const std::vector& //Item is an advancement item, figure out if it should be added to this sphere if (!playthroughBeatable && location->GetPlacedItem().IsAdvancement()) { //ItemType type = location->GetPlacedItem().GetItemType();//type needed to check for gold skulltula - std::string itemName(location->GetPlacedItemName().GetEnglish()); + std::string itemName(location->GetPlacedItemName().GetNAEnglish()); //bool bombchus = itemName.find("Bombchu") != std::string::npos; //Is a bombchu location //Decide whether to exclude this location @@ -282,7 +282,7 @@ static void PareDownPlaythrough() { //Playthrough is still beatable without this item, therefore it can be removed from playthrough section. if (playthroughBeatable) { //Uncomment to print playthrough deletion log in citra - std::string itemname(ItemTable(copy).GetName().GetEnglish()); + std::string itemname(ItemTable(copy).GetName().GetNAEnglish()); std::string locationname(Location(loc)->GetName()); std::string removallog = itemname + " at " + locationname + " removed from playthrough"; // CitraPrint(removallog); @@ -354,7 +354,7 @@ static void FastFill(std::vector items, std::vector locati /*if ( (Location(loc)->IsRepeatable() == false) && (ItemTable(item).IsReusable() == true) ){ //unsuccessfulPlacement = true; CitraPrint("Attemting to place repeatable item in nonrepeatable spot in FastFill"); - PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetEnglish() + " at " + Location(loc)->GetName()); + PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(loc)->GetName()); items.push_back(item); locations.push_back(loc); }*/ @@ -396,7 +396,7 @@ static void AssumedFill(const std::vector& items, const std::vector& items, const std::vector itemsToNotPlace = FilterFromPool(ItemPool, [](const ItemKey i) { //CitraPrint("Added item to itemsToNotPlace: "); - //CitraPrint(ItemTable(i).GetName().GetEnglish()); + //CitraPrint(ItemTable(i).GetName().GetNAEnglish()); // return ItemTable(i).IsAdvancement();}); std::vector itemsToNotPlace = ItemPool; //PlacementLog_Msg("ItemsNotToPlace:\n"); //for (ItemKey items : itemsToNotPlace) //{ - // PlacementLog_Msg(" " + ItemTable(items).GetName().GetEnglish() + "," ); + // PlacementLog_Msg(" " + ItemTable(items).GetName().GetNAEnglish() + "," ); //} //shuffle the order of items to place Shuffle(itemsToPlace); @@ -453,11 +453,11 @@ static void AssumedFill(const std::vector& items, const std::vector& items, const std::vector& items, const std::vectorIsRepeatable()) && ItemTable(item).IsReusable() ){ //unsuccessfulPlacement = true; CitraPrint("Attemting to place repeatable item in non repeatable spot in AssumedFill"); - PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName()); + PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName()); itemsToPlace.push_back(item); } else { PlaceItemInLocation(selectedLocation, item); - //PlacementLog_Msg("Placed " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName()); - //CitraPrint("Placed " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName()); + //PlacementLog_Msg("Placed " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName()); + //CitraPrint("Placed " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName()); attemptedLocations.push_back(selectedLocation); //This tells us the location went through the randomization algorithm @@ -722,7 +722,7 @@ static void RandomizeDungeonItems() { }; //for (ItemKey item : dungeonRewards) { // CitraPrint("Rewards:\n"); - // CitraPrint(ItemTable(item).GetName().GetEnglish() + "\n"); + // CitraPrint(ItemTable(item).GetName().GetNAEnglish() + "\n"); // } //CitraPrint("About to start attempting Reward Shuffle Any Dungeon"); if (ShuffleRewards.Is((u8)RewardShuffleSetting::REWARDSHUFFLE_ANY_DUNGEON)) { diff --git a/source/hints.cpp b/source/hints.cpp index 13d7cd4..41ba718 100644 --- a/source/hints.cpp +++ b/source/hints.cpp @@ -164,11 +164,11 @@ static void AddHint(Text hint, const LocationKey gossipStone, const std::vector< u16 messageId = Location(gossipStone)->GetTextID(); std::vector icons = {}; //u32 sariaMessageId = 0xA00 + Location(gossipStone)->GetFlag(); - // CitraPrint("Our hint text is " + hint.GetEnglish()); - if (hint.GetEnglish().find("$")) { + // CitraPrint("Our hint text is " + hint.GetNAEnglish()); + if (hint.GetNAEnglish().find("$")) { icons.push_back(B_BUTTON); } - CustomMessages::CreateMessage(messageId, 0xFFFF, 0x3FFFFFFF, 0xFF0020, {hint.GetEnglish().c_str()}, colors, icons, {}, 0x0, false, false); + CustomMessages::CreateMessage(messageId, 0xFFFF, 0x3FFFFFFF, 0xFF0020, {hint.GetNAEnglish().c_str()}, colors, icons, {}, 0x0, false, false); //CreateMessageFromTextObject(messageId, 0, 2, 3, AddColorsAndFormat(hint, colors)); //CreateMessageFromTextObject(sariaMessageId, 0, 2, 3, AddColorsAndFormat(hint + EVENT_TRIGGER(), colors)); } @@ -188,7 +188,7 @@ static void CreateLocationHint(const std::vector& possibleHintLocat PlacementLog_Msg("\n"); PlacementLog_Msg("\tItem: "); - PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetEnglish()); + PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetNAEnglish()); PlacementLog_Msg("\n"); if (accessibleGossipStones.empty()) { @@ -206,7 +206,7 @@ static void CreateLocationHint(const std::vector& possibleHintLocat Text finalHint = prefix + locationHintText + " #"+itemHintText+"#."; PlacementLog_Msg("\tMessage: "); - PlacementLog_Msg(finalHint.english); + PlacementLog_Msg(finalHint.NAenglish); PlacementLog_Msg("\n\n"); AddHint(finalHint, gossipStone, {QM_GREEN, QM_RED}); @@ -235,7 +235,7 @@ static void CreateWothHint(u8* remainingDungeonWothHints) { PlacementLog_Msg("\n"); PlacementLog_Msg("\tItem: "); - PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetEnglish()); + PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetNAEnglish()); PlacementLog_Msg("\n"); //get an accessible gossip stone @@ -263,7 +263,7 @@ static void CreateWothHint(u8* remainingDungeonWothHints) { } Text finalWothHint = Hint(PREFIX).GetText()+"#"+locationText+"#"+Hint(WAY_OF_THE_HERO).GetText(); PlacementLog_Msg("\tMessage: "); - PlacementLog_Msg(finalWothHint.english); + PlacementLog_Msg(finalWothHint.NAenglish); PlacementLog_Msg("\n\n"); AddHint(finalWothHint, gossipStone, {QM_BLUE}); } @@ -285,7 +285,7 @@ static void CreateBarrenHint(u8* remainingDungeonBarrenHints, std::vectorGetPlacedItemName().GetEnglish()); + PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetNAEnglish()); PlacementLog_Msg("\n"); //get an accessible gossip stone @@ -311,7 +311,7 @@ static void CreateBarrenHint(u8* remainingDungeonBarrenHints, std::vectorGetPlacedItemName().GetEnglish()); + PlacementLog_Msg(Location(hintedLocation)->GetPlacedItemName().GetNAEnglish()); PlacementLog_Msg("\n"); //get an acessible gossip stone @@ -352,12 +352,12 @@ static void CreateRandomLocationHint(const bool goodItem = false) { //form hint text /* CitraPrint("Checking location " + Location(hintedLocation)->GetName() + \ - "'s item which is " + Location(hintedLocation)->GetPlacedItemName().GetEnglish() + \ + "'s item which is " + Location(hintedLocation)->GetPlacedItemName().GetNAEnglish() + \ " and GetItemID of " + Location(hintedLocation)->GetPlacedItem().GetItemId() + "\n"); DebugPrint("Checking location %s's item which is %s and GetItemID of %#04x and hint text is %s\n", Location(hintedLocation)->GetName().c_str(), \ - Location(hintedLocation)->GetPlacedItemName().GetEnglish().c_str(), \ + Location(hintedLocation)->GetPlacedItemName().GetNAEnglish().c_str(), \ Location(hintedLocation)->GetPlacedItem().GetItemId(), \ - Location(hintedLocation)->GetPlacedItem().GetHint().GetText().GetEnglish().c_str()); */ + Location(hintedLocation)->GetPlacedItem().GetHint().GetText().GetNAEnglish().c_str()); */ Text itemText = Location(hintedLocation)->GetPlacedItem().GetHint().GetText(); if (Location(hintedLocation)->IsDungeon()) { AreaKey parentRegion = Location(hintedLocation)->GetParentRegionKey(); @@ -365,7 +365,7 @@ static void CreateRandomLocationHint(const bool goodItem = false) { // CitraPrint("Random Loc Hint: Getting " + Location(hintedLocation)->GetName() + "'s parent region which is " + Location(parentRegion)->GetName()); Text finalHint = Hint(PREFIX).GetText()+"#"+locationText+"# "+Hint(HOARDS).GetText()+" #"+itemText+"#."; PlacementLog_Msg("\tMessage: "); - PlacementLog_Msg(finalHint.english); + PlacementLog_Msg(finalHint.NAenglish); PlacementLog_Msg("\n\n"); AddHint(finalHint, gossipStone, {QM_GREEN, QM_RED}); } else { @@ -373,7 +373,7 @@ static void CreateRandomLocationHint(const bool goodItem = false) { Text locationText = GetHintRegion(Location(hintedLocation)->GetParentRegionKey())->GetHint().GetText(); Text finalHint = Hint(PREFIX).GetText()+"#"+itemText+"# "+Hint(CAN_BE_FOUND_AT).GetText()+" #"+locationText+"#."; PlacementLog_Msg("\tMessage: "); - PlacementLog_Msg(finalHint.english); + PlacementLog_Msg(finalHint.NAenglish); PlacementLog_Msg("\n\n"); AddHint(finalHint, gossipStone, {QM_RED, QM_GREEN}); } @@ -397,7 +397,7 @@ static void CreateJunkHint() { Text hint = junkHint.GetText(); PlacementLog_Msg("\tMessage: "); - PlacementLog_Msg(hint.english); + PlacementLog_Msg(hint.NAenglish); PlacementLog_Msg("\n"); PlacementLog_Msg("\tLocation: "); @@ -441,17 +441,17 @@ void CreateTingleHintText() { if (Settings::ShuffleTingleMaps.Is(true)) { // Logic: Get item names from location. // Create custom message for each tingle location (6) - Text clockTownMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName().MakeColored(); - Text woodfallMap = ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName().MakeColored(); - Text snowHeadMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName().MakeColored(); - Text romaniMap = ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName().MakeColored(); - Text greatBayMap = ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName().MakeColored(); - Text ikanaMap = ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName().MakeColored(); + Text clockTownMap = Text{"#"}+ItemTable(Location(TINGLE_N_CLOCK_TOWN_CT)->GetPlacedItemKey()).GetName(); + Text woodfallMap = Text{"#"}+ItemTable(Location(TINGLE_N_CLOCK_TOWN_WF)->GetPlacedItemKey()).GetName(); + Text snowHeadMap = Text{"#"}+ItemTable(Location(TINGLE_TWIN_ISLANDS_SH)->GetPlacedItemKey()).GetName(); + Text romaniMap = Text{"#"}+ItemTable(Location(TINGLE_TWIN_ISLANDS_RR)->GetPlacedItemKey()).GetName(); + Text greatBayMap = Text{"#"}+ItemTable(Location(TINGLE_GBC_GB)->GetPlacedItemKey()).GetName(); + Text ikanaMap = Text{"#"}+ItemTable(Location(TINGLE_GBC_ST)->GetPlacedItemKey()).GetName(); // {"English", "French", "Spanish"} - Text priceFive = {" #5 Rupees#&", " #5 Rubis#&", ""}; - Text priceTwenty = {" #20 Rupees#&", " #20 Rubis#&", ""}; - Text priceForty = {" #40 Rupees#", " #40 Rubis#", ""}; + Text priceFive = {" ##5 Rupees#&", " ##5 Rubis#&", ""}; + Text priceTwenty = {" ##20 Rupees#&", " ##20 Rubis#&", ""}; + Text priceForty = {" ##40 Rupees#", " ##40 Rubis#", ""}; Text leaveShop = {"&#No thanks#", "&#Non merci#", ""}; Text tingleTextClockTown = clockTownMap+priceFive+woodfallMap+priceForty+leaveShop; @@ -462,27 +462,27 @@ void CreateTingleHintText() { Text tingleTextIkana = ikanaMap+priceTwenty+clockTownMap+priceForty+leaveShop; CustomMessages::CreateMessage(0x1D11, 0xFFFF, 0x3FF0A005, 0xFF1001, - {tingleTextClockTown.GetEnglish().c_str()}, + {tingleTextClockTown.GetNAEnglish().c_str()}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); CustomMessages::CreateMessage(0x1D12, 0xFFFF, 0x3FF0A014, 0xFF1001, - {tingleTextWoodfall.GetEnglish().c_str()}, + {tingleTextWoodfall.GetNAEnglish().c_str()}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); CustomMessages::CreateMessage(0x1D13, 0xFFFF, 0x3FF0A014, 0xFF1001, - {tingleTextSnowhead.GetEnglish().c_str(),}, + {tingleTextSnowhead.GetNAEnglish().c_str(),}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); CustomMessages::CreateMessage(0x1D14, 0xFFFF, 0x3FF0A014, 0xFF1001, - {tingleTextMilkRoad.GetEnglish().c_str()}, + {tingleTextMilkRoad.GetNAEnglish().c_str()}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); CustomMessages::CreateMessage(0x1D15, 0xFFFF, 0x3FF0A014, 0xFF1001, - {tingleTextGreatBay.GetEnglish().c_str()}, + {tingleTextGreatBay.GetNAEnglish().c_str()}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); CustomMessages::CreateMessage(0x1D16, 0xFFFF, 0x3FF0A014, 0xFF1001, - {tingleTextIkana.GetEnglish().c_str()}, + {tingleTextIkana.GetNAEnglish().c_str()}, {QM_GREEN, QM_RED, QM_GREEN, QM_RED, QM_GREEN}, {}, {}, 0x0, false, false); } } @@ -499,7 +499,7 @@ static Text BuildDoorText(const ItemKey itemKey) { if (Location(location)->GetParentRegionKey() == NONE) { Location(location)->SetParentRegion(LINKS_POCKET); } - return GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText().MakeColored()+"."; + return Text{"#"}+GetHintRegion(Location(location)->GetParentRegionKey())->GetHint().GetText()+"#."; } void CreateClockTowerDoorHints() { @@ -589,17 +589,17 @@ void CreateClockTowerDoorHints() { {"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.GetEnglish().c_str()}, {QM_BLUE, QM_RED}, {}, {}, 0x083E, false, false); + CustomMessages::CreateMessage(0x8000, 0x8001, 0x3FFFFFFF, 0x1000000, {ocarinaHint.GetNAEnglish().c_str()}, {QM_BLUE, QM_RED}, {}, {}, 0x083E, 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}, {}, {}, 0x083E, false, false); - CustomMessages::CreateMessage(0x8003, 0x8004, 0x3FFFFFFF, 0x15D0000, {odolwaHint.GetEnglish().c_str()}, {QM_GREEN, QM_GREEN, QM_RED}, {}, {}, 0x0, false, false); - CustomMessages::CreateMessage(0x8004, 0x8005, 0x3FFFFFFF, 0x15E0000, {gohtHint.GetEnglish().c_str()}, {QM_MAGENTA, QM_MAGENTA, QM_RED}, {}, {}, 0x0, false, false); - CustomMessages::CreateMessage(0x8005, 0x8006, 0x3FFFFFFF, 0x15F0000, {gyorgHint.GetEnglish().c_str()}, {QM_CYAN, QM_CYAN, QM_RED}, {}, {}, 0x0, false, false); - CustomMessages::CreateMessage(0x8006, 0xFFFF, 0x3FFFFFFF, 0x0600000, {twinmoldHint.GetEnglish().c_str()}, {QM_YELLOW, QM_YELLOW, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8003, 0x8004, 0x3FFFFFFF, 0x15D0000, {odolwaHint.GetNAEnglish().c_str()}, {QM_GREEN, QM_GREEN, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8004, 0x8005, 0x3FFFFFFF, 0x15E0000, {gohtHint.GetNAEnglish().c_str()}, {QM_MAGENTA, QM_MAGENTA, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8005, 0x8006, 0x3FFFFFFF, 0x15F0000, {gyorgHint.GetNAEnglish().c_str()}, {QM_CYAN, QM_CYAN, QM_RED}, {}, {}, 0x0, false, false); + CustomMessages::CreateMessage(0x8006, 0xFFFF, 0x3FFFFFFF, 0x0600000, {twinmoldHint.GetNAEnglish().c_str()}, {QM_YELLOW, QM_YELLOW, QM_RED}, {}, {}, 0x0, false, false); } //insert the required number into the hint and set the singular/plural form diff --git a/source/include/hints.hpp b/source/include/hints.hpp index 594ace6..c81f027 100644 --- a/source/include/hints.hpp +++ b/source/include/hints.hpp @@ -126,7 +126,7 @@ class HintText { } const Text& GetClear() const { - if (clearText.GetEnglish().empty()) { + if (clearText.GetNAEnglish().empty()) { return GetObscure(); } return clearText; diff --git a/source/include/text.hpp b/source/include/text.hpp index dd9d3c4..654e681 100644 --- a/source/include/text.hpp +++ b/source/include/text.hpp @@ -8,43 +8,96 @@ class Text { public: Text() = default; + Text(std::string generic) + : NAenglish(generic), NAfrench(generic), NAspanish(generic), + //EURgerman(generic), //EURItalian(generic), //Japanese? Either way, MM3D doesn't support Dutch + EURenglish(generic), EURfrench(generic), EURspanish(generic) {} + Text(std::string english_, std::string french_, std::string spanish_) - : english(std::move(english_)), - french(std::move(french_)), - spanish(std::move(spanish_)) {} + : NAenglish(std::move(english_)), NAfrench(std::move(french_)), NAspanish(std::move(spanish_)), + //EURgerman(std::move(german_)), //EURitalian(std::move(italian_)), + EURenglish(std::move(english_)), EURfrench(std::move(french_)), EURspanish(std::move(spanish_)) {} + + Text(std::string NAenglish_, std::string NAfrench_, std::string NAspanish_, + std::string EURenglish_, std::string EURfrench_, std::string EURspanish_) + : NAenglish(std::move(NAenglish_)), NAfrench(std::move(NAfrench_)), NAspanish(std::move(NAspanish_)), + //EURgerman(std::move(EURgerman_)), //EURitalian(std::move(EURitalian_)), + EURenglish(std::move(EURenglish_)), EURfrench(std::move(EURfrench_)), EURspanish(std::move(EURspanish_)) { + //Fallback to NA string if EUR one is blank + //Should allow for easier selective definition + if (EURenglish.length() == 0) {EURenglish = NAenglish;} + if (EURfrench.length() == 0) {EURfrench = NAfrench;} + if (EURspanish.length() == 0) {EURspanish = NAspanish;} + } - const std::string& GetEnglish() const { - return english; + const std::string& GetNAEnglish() const { + return NAenglish; } - const std::string& GetFrench() const { - if (french.length() > 0) { - return french; + const std::string& GetNAFrench() const { + if (NAfrench.length() > 0) { + return NAfrench; } - return english; + return NAenglish; } - const std::string& GetSpanish() const { - if (spanish.length() > 0) { - return spanish; + const std::string& GetNASpanish() const { + if (NAspanish.length() > 0) { + return NAspanish; } - return english; + return NAenglish; } - Text operator+ (const Text& right) const { - return Text{english + right.GetEnglish(), french + right.GetFrench(), spanish + right.GetSpanish()}; + // const std::string& GetEURGerman() const { + // if (EURgerman.length() > 0) { + // return EURgerman; + // } + // return EURenglish; + // } + + // const std::string& GetEURItalian() const { + // if (EURitalian.length() > 0) { + // return EURitalian; + // } + // return EURenglish; + // } + + const std::string& GetEUREnglish() const { + return EURenglish; } - Text operator+ (const std::string& right) const { - return Text{english + right, french + right, spanish + right}; + const std::string& GetEURFrench() const { + if (EURfrench.length() > 0) { + return EURfrench; + } + return EURenglish; + } + + const std::string& GetEURSpanish() const { + if (EURspanish.length() > 0) { + return EURspanish; + } + return EURenglish; + } + + Text operator+ (const Text& right) const { + return Text{ + NAenglish + right.GetNAEnglish(), NAfrench + right.GetNAFrench(), NAspanish + right.GetNASpanish(), + //EURgerman + right.GetEURGerman(), //EURitalian + right.GetEURItalian(), + EURenglish + right.GetEUREnglish(), EURfrench + right.GetEURFrench(), EURspanish + right.GetEURSpanish() + }; } - Text MakeColored() const { - return Text{"#" + english + "#", "#" + french + "#", "#" + spanish + "#"}; + Text operator+ (const std::string& right) const { + return Text{ + NAenglish + right, NAfrench + right, NAspanish + right, + //EURgerman + right, //EURitalian + right, + EURenglish + right, EURfrench + right, EURspanish + right + }; } bool operator==(const Text& right) const { - return english == right.english; + return NAenglish == right.NAenglish; } bool operator!=(const Text& right) const { @@ -53,7 +106,7 @@ class Text { void Replace(std::string oldStr, std::string newStr) { - for (std::string* str : {&english, &french, &spanish}) { + for (std::string* str : {&NAenglish, &NAfrench, &NAspanish, /*&EURgerman, &EURitalian,*/ &EURenglish, &EURfrench, &EURspanish}) { size_t position = str->find(oldStr); while (position != std::string::npos) { str->replace(position, oldStr.length(), newStr); @@ -64,7 +117,7 @@ class Text { //find the appropriate bars that separate singular from plural void SetForm(int form) { - for (std::string* str : {&english, &french, &spanish}) { + for (std::string* str : {&NAenglish, &NAfrench, &NAspanish, /*&EURgerman, &EURitalian,*/ &EURenglish, &EURfrench, &EURspanish}) { size_t firstBar = str->find('|'); if (firstBar != std::string::npos) { @@ -88,7 +141,12 @@ class Text { this->Replace("|", ""); } - std::string english = ""; - std::string french = ""; - std::string spanish = ""; + std::string NAenglish = ""; + std::string NAfrench = ""; + std::string NAspanish = ""; + //std::string EURgerman = ""; + //std::string EURitalian = ""; + std::string EURenglish = ""; + std::string EURfrench = ""; + std::string EURspanish = ""; }; diff --git a/source/item_location.cpp b/source/item_location.cpp index 66abb1e..01bf7e4 100644 --- a/source/item_location.cpp +++ b/source/item_location.cpp @@ -1097,7 +1097,7 @@ void GenerateLocationPool() { void PlaceItemInLocation(LocationKey locKey, ItemKey item, bool applyEffectImmediately/* = false*/) { auto loc = Location(locKey); PlacementLog_Msg("\n"); - PlacementLog_Msg(ItemTable(item).GetName().GetEnglish()); + PlacementLog_Msg(ItemTable(item).GetName().GetNAEnglish()); PlacementLog_Msg(" placed at "); PlacementLog_Msg(loc->GetName()); PlacementLog_Msg("\n\n"); @@ -1260,7 +1260,7 @@ void CreateItemOverrides() { PlacementLog_Msg("\t"); PlacementLog_Msg(loc->GetName()); PlacementLog_Msg(": "); - PlacementLog_Msg(loc->GetPlacedItemName().GetEnglish()); + PlacementLog_Msg(loc->GetPlacedItemName().GetNAEnglish()); PlacementLog_Msg("\n"); } PlacementLog_Msg("Overrides Created: "); diff --git a/source/spoiler_log.cpp b/source/spoiler_log.cpp index 68f9f74..d99d829 100644 --- a/source/spoiler_log.cpp +++ b/source/spoiler_log.cpp @@ -270,7 +270,7 @@ static void WriteIngameSpoilerLog() { } } - auto locItem = loc->GetPlacedItemName().GetEnglish(); + auto locItem = loc->GetPlacedItemName().GetNAEnglish(); /*if (loc->IsCategory(Category::cShop)) { if (loc->GetPlacedItemKey() == ICE_TRAP) { locItem = NonShopItems[TransformShopIndex(GetShopIndex(key))].Name.GetNAEnglish(); @@ -365,7 +365,7 @@ static void WriteIngameSpoilerLog() { auto node = parentNode->InsertNewChildElement("location"); node->SetAttribute("name", location->GetName().c_str()); - node->SetText(location->GetPlacedItemName().GetEnglish().c_str()); + node->SetText(location->GetPlacedItemName().GetNAEnglish().c_str()); if (withPadding) { constexpr int16_t LONGEST_NAME = 56; // The longest name of a location. @@ -613,7 +613,7 @@ static void WriteHints(tinyxml2::XMLDocument& spoilerLog) { auto node = parentNode->InsertNewChildElement("hint"); node->SetAttribute("location", location->GetName().c_str()); - auto text = location->GetPlacedItemName().GetEnglish(); + auto text = location->GetPlacedItemName().GetNAEnglish(); std::replace(text.begin(), text.end(), '&', ' '); std::replace(text.begin(), text.end(), '^', ' '); node->SetText(text.c_str());