Skip to content

Commit b3cde28

Browse files
authored
Add regional languages to Text class (#150)
* Prepare Text class for regional languages - Add NA prefix to current languages - Bring "generic" definition over from OOT3DR - Deprecate MakeColored in favor of generic Text "#" * Split Text class languages into NA and EUR - Add EUR versions of English, French, and Spanish - Support assiging values to EUR strings - Update functions to support EUR strings * Add planned languages to text class To be uncommented once all Text objects are updated to match * Fix oversights in Text class - Add EU languages to iterative funtions - Fix error in planned languages
1 parent f9228a0 commit b3cde28

6 files changed

Lines changed: 139 additions & 81 deletions

File tree

source/fill.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ std::vector<LocationKey> GetAccessibleLocations(const std::vector<LocationKey>&
177177
//Item is an advancement item, figure out if it should be added to this sphere
178178
if (!playthroughBeatable && location->GetPlacedItem().IsAdvancement()) {
179179
//ItemType type = location->GetPlacedItem().GetItemType();//type needed to check for gold skulltula
180-
std::string itemName(location->GetPlacedItemName().GetEnglish());
180+
std::string itemName(location->GetPlacedItemName().GetNAEnglish());
181181
//bool bombchus = itemName.find("Bombchu") != std::string::npos; //Is a bombchu location
182182

183183
//Decide whether to exclude this location
@@ -282,7 +282,7 @@ static void PareDownPlaythrough() {
282282
//Playthrough is still beatable without this item, therefore it can be removed from playthrough section.
283283
if (playthroughBeatable) {
284284
//Uncomment to print playthrough deletion log in citra
285-
std::string itemname(ItemTable(copy).GetName().GetEnglish());
285+
std::string itemname(ItemTable(copy).GetName().GetNAEnglish());
286286
std::string locationname(Location(loc)->GetName());
287287
std::string removallog = itemname + " at " + locationname + " removed from playthrough";
288288
// CitraPrint(removallog);
@@ -354,7 +354,7 @@ static void FastFill(std::vector<ItemKey> items, std::vector<LocationKey> locati
354354
/*if ( (Location(loc)->IsRepeatable() == false) && (ItemTable(item).IsReusable() == true) ){
355355
//unsuccessfulPlacement = true;
356356
CitraPrint("Attemting to place repeatable item in nonrepeatable spot in FastFill");
357-
PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetEnglish() + " at " + Location(loc)->GetName());
357+
PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(loc)->GetName());
358358
items.push_back(item);
359359
locations.push_back(loc);
360360
}*/
@@ -396,7 +396,7 @@ static void AssumedFill(const std::vector<ItemKey>& items, const std::vector<Loc
396396
PlacementLog_Msg("Items:\n");
397397
for (const ItemKey item : items) {
398398
PlacementLog_Msg("\t");
399-
PlacementLog_Msg(ItemTable(item).GetName().GetEnglish());
399+
PlacementLog_Msg(ItemTable(item).GetName().GetNAEnglish());
400400
PlacementLog_Msg("\n");
401401
}
402402
PlacementLog_Msg("\nAllowed Locations:\n");
@@ -435,13 +435,13 @@ static void AssumedFill(const std::vector<ItemKey>& items, const std::vector<Loc
435435
//copy all not yet placed advancement items so that we can apply their effects for the fill algorithm
436436
//std::vector<ItemKey> itemsToNotPlace = FilterFromPool(ItemPool, [](const ItemKey i) {
437437
//CitraPrint("Added item to itemsToNotPlace: ");
438-
//CitraPrint(ItemTable(i).GetName().GetEnglish());
438+
//CitraPrint(ItemTable(i).GetName().GetNAEnglish());
439439
// return ItemTable(i).IsAdvancement();});
440440
std::vector<ItemKey> itemsToNotPlace = ItemPool;
441441
//PlacementLog_Msg("ItemsNotToPlace:\n");
442442
//for (ItemKey items : itemsToNotPlace)
443443
//{
444-
// PlacementLog_Msg(" " + ItemTable(items).GetName().GetEnglish() + "," );
444+
// PlacementLog_Msg(" " + ItemTable(items).GetName().GetNAEnglish() + "," );
445445
//}
446446
//shuffle the order of items to place
447447
Shuffle(itemsToPlace);
@@ -453,11 +453,11 @@ static void AssumedFill(const std::vector<ItemKey>& items, const std::vector<Loc
453453

454454
//assume we have all unplaced items
455455
LogicReset();
456-
//PlacementLog_Msg("\nCurrent item for placement is: " + ItemTable(item).GetName().GetEnglish());
456+
//PlacementLog_Msg("\nCurrent item for placement is: " + ItemTable(item).GetName().GetNAEnglish());
457457
//PlacementLog_Msg("\nitemsToPlace: ");
458458
for (ItemKey unplacedItem : itemsToPlace) {
459459
ItemTable(unplacedItem).ApplyEffect();
460-
//PlacementLog_Msg(" " + ItemTable(unplacedItem).GetName().GetEnglish() + ", ");
460+
//PlacementLog_Msg(" " + ItemTable(unplacedItem).GetName().GetNAEnglish() + ", ");
461461
}
462462
for (ItemKey unplacedItem : itemsToNotPlace) {
463463
ItemTable(unplacedItem).ApplyEffect();
@@ -500,7 +500,7 @@ static void AssumedFill(const std::vector<ItemKey>& items, const std::vector<Loc
500500
}
501501

502502
PlacementLog_Msg("\nCANNOT PLACE ");
503-
PlacementLog_Msg(ItemTable(item).GetName().GetEnglish());
503+
PlacementLog_Msg(ItemTable(item).GetName().GetNAEnglish());
504504
PlacementLog_Msg(". TRYING AGAIN...\n");
505505
//DebugPrint("%s: accessable locations according to code %u\n", __func__, accessibleLocations);
506506

@@ -560,13 +560,13 @@ static void AssumedFill(const std::vector<ItemKey>& items, const std::vector<Loc
560560
if ( !(Location(selectedLocation)->IsRepeatable()) && ItemTable(item).IsReusable() ){
561561
//unsuccessfulPlacement = true;
562562
CitraPrint("Attemting to place repeatable item in non repeatable spot in AssumedFill");
563-
PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName());
563+
PlacementLog_Msg("\n Attempted to place " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName());
564564
itemsToPlace.push_back(item);
565565
}
566566
else {
567567
PlaceItemInLocation(selectedLocation, item);
568-
//PlacementLog_Msg("Placed " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName());
569-
//CitraPrint("Placed " + ItemTable(item).GetName().GetEnglish() + " at " + Location(selectedLocation)->GetName());
568+
//PlacementLog_Msg("Placed " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName());
569+
//CitraPrint("Placed " + ItemTable(item).GetName().GetNAEnglish() + " at " + Location(selectedLocation)->GetName());
570570
attemptedLocations.push_back(selectedLocation);
571571

572572
//This tells us the location went through the randomization algorithm
@@ -722,7 +722,7 @@ static void RandomizeDungeonItems() {
722722
};
723723
//for (ItemKey item : dungeonRewards) {
724724
// CitraPrint("Rewards:\n");
725-
// CitraPrint(ItemTable(item).GetName().GetEnglish() + "\n");
725+
// CitraPrint(ItemTable(item).GetName().GetNAEnglish() + "\n");
726726
// }
727727
//CitraPrint("About to start attempting Reward Shuffle Any Dungeon");
728728
if (ShuffleRewards.Is((u8)RewardShuffleSetting::REWARDSHUFFLE_ANY_DUNGEON)) {

0 commit comments

Comments
 (0)