summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Dubé <serprex@users.noreply.github.com>2026-03-27 02:07:11 +0000
committerGitHub <noreply@github.com>2026-03-27 02:07:11 +0000
commit7edf44e1709f2537b99ae5c6ae1df108e8462ffd (patch)
tree98b6375a423bf29be862a2265e794c0a28f459c4
parent53dc7f43ba1bb2ae813ad239623d7090dd7a3f78 (diff)
add tts for Roc's Feather (#6418)
-rw-r--r--soh/assets/custom/accessibility/texts/kaleidoscope_eng.json1
-rw-r--r--soh/assets/custom/accessibility/texts/kaleidoscope_fra.json1
-rw-r--r--soh/assets/custom/accessibility/texts/kaleidoscope_ger.json1
-rw-r--r--soh/soh/Enhancements/tts/tts.cpp29
4 files changed, 11 insertions, 21 deletions
diff --git a/soh/assets/custom/accessibility/texts/kaleidoscope_eng.json b/soh/assets/custom/accessibility/texts/kaleidoscope_eng.json
index 04fc1f8f2..8409287b5 100644
--- a/soh/assets/custom/accessibility/texts/kaleidoscope_eng.json
+++ b/soh/assets/custom/accessibility/texts/kaleidoscope_eng.json
@@ -172,6 +172,7 @@
"153": "STICK UPGRADE 30",
"154": "NUT UPGRADE 30",
"155": "NUT UPGRADE 40",
+ "157": "Roc's Feather",
"255": "",
"256": "Haunted Wasteland",
"257": "Gerudos Fortress",
diff --git a/soh/assets/custom/accessibility/texts/kaleidoscope_fra.json b/soh/assets/custom/accessibility/texts/kaleidoscope_fra.json
index 93e0058dc..0e26e8e93 100644
--- a/soh/assets/custom/accessibility/texts/kaleidoscope_fra.json
+++ b/soh/assets/custom/accessibility/texts/kaleidoscope_fra.json
@@ -172,6 +172,7 @@
"153": "AMÉLIORATION BÂTON MOJO 30",
"154": "AMÉLIORATION NOIX MOJO 30",
"155": "AMÉLIORATION NOIX MOJO 40",
+ "157": "Plume de Roc",
"255": "",
"256": "Désert Hanté",
"257": "Forteresse Gerudo",
diff --git a/soh/assets/custom/accessibility/texts/kaleidoscope_ger.json b/soh/assets/custom/accessibility/texts/kaleidoscope_ger.json
index 95fb567b6..cafb22d54 100644
--- a/soh/assets/custom/accessibility/texts/kaleidoscope_ger.json
+++ b/soh/assets/custom/accessibility/texts/kaleidoscope_ger.json
@@ -172,6 +172,7 @@
"153": "DEKU-STAB-KAPAZITÄT 30",
"154": "DEKU-NUẞ-KAPAZITÄT 30",
"155": "DEKU-NUẞ-KAPAZITÄT 40",
+ "157": "Greifenfeder",
"255": "",
"256": "Gespensterwüste",
"257": "Gerudo-Festung",
diff --git a/soh/soh/Enhancements/tts/tts.cpp b/soh/soh/Enhancements/tts/tts.cpp
index b1cb15812..fddcb77ce 100644
--- a/soh/soh/Enhancements/tts/tts.cpp
+++ b/soh/soh/Enhancements/tts/tts.cpp
@@ -6,7 +6,6 @@
#include <ship/resource/type/Json.h>
#include <libultraship/classes.h>
#include <nlohmann/json.hpp>
-#include <spdlog/fmt/fmt.h>
#include "soh/ShipInit.hpp"
#include "message_data_static.h"
@@ -37,11 +36,10 @@ nlohmann::json fileChooseMap = nullptr;
std::string GetParameritizedText(std::string key, TextBank bank, const char* arg) {
switch (bank) {
case TEXT_BANK_SCENES: {
- return sceneMap[key].get<std::string>();
- break;
+ return sceneMap.value(key, "unknown");
}
case TEXT_BANK_MISC: {
- auto value = miscMap[key].get<std::string>();
+ auto value = miscMap.value(key, "unknown");
std::string searchString = "$0";
size_t index = value.find(searchString);
@@ -49,15 +47,11 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
if (index != std::string::npos) {
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
- return value;
- } else {
- return value;
}
-
- break;
+ return value;
}
case TEXT_BANK_KALEIDO: {
- auto value = kaleidoMap[key].get<std::string>();
+ auto value = kaleidoMap.value(key, "unknown");
std::string searchString = "$0";
size_t index = value.find(searchString);
@@ -65,15 +59,11 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
if (index != std::string::npos) {
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
- return value;
- } else {
- return value;
}
-
- break;
+ return value;
}
case TEXT_BANK_FILECHOOSE: {
- auto value = fileChooseMap[key].get<std::string>();
+ auto value = fileChooseMap.value(key, "unknown");
std::string searchString = "$0";
size_t index = value.find(searchString);
@@ -81,14 +71,11 @@ std::string GetParameritizedText(std::string key, TextBank bank, const char* arg
if (index != std::string::npos) {
assert(arg != nullptr);
value.replace(index, searchString.size(), std::string(arg));
- return value;
- } else {
- return value;
}
-
- break;
+ return value;
}
}
+ return "unknown";
}
const char* GetLanguageCode() {