mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-31 08:12:15 -04:00
add support for JP iso
This commit is contained in:
@@ -268,11 +268,19 @@ void hookPostSetSaveData(ModContext* ctx, void* args, void* retval, void* userda
|
||||
|
||||
// Overwrite "Save time" text with "Randomizer"
|
||||
auto saveTimeText = (J2DTextBox*)i_this->mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'));
|
||||
// If this text is hidden, then we're playing on JP
|
||||
if (!saveTimeText->isVisible()) {
|
||||
saveTimeText = (J2DTextBox*)i_this->mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01'));
|
||||
}
|
||||
SafeStringCopy(saveTimeText->getStringPtr(), "Randomizer");
|
||||
setHBinding(saveTimeText, J2DTextBoxHBinding::HBIND_LEFT);
|
||||
|
||||
// Overwrite the "Total play time" text with the seed hash
|
||||
auto playTimeText = (J2DTextBox*)i_this->mFileInfo.Scr->search(MULTI_CHAR('f_p_t_02'));
|
||||
// If this text is hidden, then we're playing on JP
|
||||
if (!playTimeText->isVisible()) {
|
||||
playTimeText = (J2DTextBox*)i_this->mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01'));
|
||||
}
|
||||
SafeStringCopy(playTimeText->getStringPtr(), curFileSeedHash.c_str());
|
||||
|
||||
// Give the text double the space on the menu incase the seed hash is long
|
||||
|
||||
@@ -141,7 +141,7 @@ ModResult register_custom_messages(const RandomizerContext& context, MessageIdMa
|
||||
const auto style = message_style(definition.style);
|
||||
std::vector<mods::flow::MessageVariant> variants;
|
||||
for (const auto& [language, text] : definition.text) {
|
||||
if (language < MESSAGE_LANGUAGE_ENGLISH || language > MESSAGE_LANGUAGE_ITALIAN) {
|
||||
if (language < MESSAGE_LANGUAGE_ENGLISH || language > MESSAGE_LANGUAGE_JAPANESE) {
|
||||
continue;
|
||||
}
|
||||
variants.emplace_back(static_cast<MessageLanguage>(language),
|
||||
@@ -198,7 +198,7 @@ bool formatted_override(
|
||||
|
||||
ModResult register_native_overrides(const RandomizerContext& context) {
|
||||
for (const auto& [language, overrides] : context.mTextOverrides) {
|
||||
if (language < MESSAGE_LANGUAGE_ENGLISH || language > MESSAGE_LANGUAGE_ITALIAN) {
|
||||
if (language < MESSAGE_LANGUAGE_ENGLISH || language > MESSAGE_LANGUAGE_JAPANESE) {
|
||||
continue;
|
||||
}
|
||||
for (const auto& [key, value] : overrides) {
|
||||
|
||||
Reference in New Issue
Block a user