diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 59a00d992..9b09c4771 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -2532,13 +2532,14 @@ inline void dComIfGp_setNowVibration(u8 vibration) { } #if VERSION != VERSION_JPN -// Inline name is fake (not present in JP debug maps), but was guessed based on the similar -// dComIfGs_getPalLanguage inline in TP debug. -inline u8 dComIfGp_getPalLanguage() { +// Inline name is official because while it's not present in the JPN debug maps, it is present in +// the USA release maps because there was one TU where it failed to get inlined (f_op_msg_mng). +inline u8 dComIfGs_getPalLanguage() { return g_dComIfG_gameInfo.play.getPalLanguage(); } -// Inline name is fake (not present in JP debug maps). -inline void dComIfGp_setPalLanguage(u8 lang) { + +// Inline name is fake, but guessed based on the above inline. +inline void dComIfGs_setPalLanguage(u8 lang) { g_dComIfG_gameInfo.play.setPalLanguage(lang); } #endif diff --git a/src/d/actor/d_a_agb.cpp b/src/d/actor/d_a_agb.cpp index f9907f475..9b009062b 100644 --- a/src/d/actor/d_a_agb.cpp +++ b/src/d/actor/d_a_agb.cpp @@ -375,7 +375,7 @@ int daAgb_c::uploadSelect() { char path[28]; char pathNum[4]; strcpy(path, "/res/Gba/client_"); - sprintf(pathNum, "%d", dComIfGp_getPalLanguage()); + sprintf(pathNum, "%d", dComIfGs_getPalLanguage()); strcat(path, pathNum); strcat(path, ".bin"); l_gbaCommand = mDoDvdThd_toMainRam_c::create(path, 0, dMsg_getAgbWorkArea()); @@ -451,7 +451,7 @@ int daAgb_c::uploadMessageLoad() { char path[28]; char pathNum[4]; strcpy(path, "/res/Gba/msg_LZ"); - sprintf(pathNum, "%d", dComIfGp_getPalLanguage()); + sprintf(pathNum, "%d", dComIfGs_getPalLanguage()); strcat(path, pathNum); strcat(path, ".bin"); l_gbaCommand = mDoDvdThd_toMainRam_c::create(path, 0, NULL); diff --git a/src/d/d_place_name.cpp b/src/d/d_place_name.cpp index d5c85b3e3..82733b7fe 100644 --- a/src/d/d_place_name.cpp +++ b/src/d/d_place_name.cpp @@ -168,7 +168,7 @@ s32 dPn_c::_create() { JUT_ASSERT(VERSION_SELECT(175, 201, 201), dComIfGp_getNowStageNum() < dPn_stage_max_e); #if VERSION == VERSION_PAL - u32 lang = dComIfGp_getPalLanguage(); + u32 lang = dComIfGs_getPalLanguage(); char buf[32]; sprintf(buf, "/res/placename/PN%d/pn_%02d_%d.bti", lang, dComIfGp_getNowStageNum() + 1, lang); dvd = mDoDvdThd_toMainRam_c::create(buf, 0, mpHeap); diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index e44e24d41..64ad87c5f 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -663,13 +663,13 @@ s32 phase_1(dScnLogo_c* i_this) { if (g_mDoMemCd_control.field_0x165B >= 5) { g_mDoMemCd_control.field_0x165B = 0; } - dComIfGp_setPalLanguage(g_mDoMemCd_control.field_0x165B); + dComIfGs_setPalLanguage(g_mDoMemCd_control.field_0x165B); } else { u8 language = OSGetLanguage(); if (language >= 5) { language = 0; } - dComIfGp_setPalLanguage(language); + dComIfGs_setPalLanguage(language); g_mDoMemCd_control.field_0x165B = language; } #endif @@ -771,7 +771,7 @@ s32 phase_2(dScnLogo_c* i_this) { #endif #if VERSION == VERSION_PAL - timg = (ResTIMG *)dComIfG_getObjectRes("Logo", choice[dComIfGp_getPalLanguage()]); + timg = (ResTIMG *)dComIfG_getObjectRes("Logo", choice[dComIfGs_getPalLanguage()]); #else timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_CHOICE); #endif @@ -781,7 +781,7 @@ s32 phase_2(dScnLogo_c* i_this) { i_this->progchoiceImg->setAlpha(0x00); #if VERSION == VERSION_PAL - timg = (ResTIMG *)dComIfG_getObjectRes("Logo", yes[dComIfGp_getPalLanguage()]); + timg = (ResTIMG *)dComIfG_getObjectRes("Logo", yes[dComIfGs_getPalLanguage()]); #else timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_YES); #endif @@ -792,7 +792,7 @@ s32 phase_2(dScnLogo_c* i_this) { i_this->progyesImg->setAlpha(0x00); #if VERSION == VERSION_PAL - timg = (ResTIMG *)dComIfG_getObjectRes("Logo", no[dComIfGp_getPalLanguage()]); + timg = (ResTIMG *)dComIfG_getObjectRes("Logo", no[dComIfGs_getPalLanguage()]); #else timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_NO); #endif @@ -803,7 +803,7 @@ s32 phase_2(dScnLogo_c* i_this) { i_this->prognoImg->setAlpha(0x00); #if VERSION == VERSION_PAL - timg = (ResTIMG *)dComIfG_getObjectRes("Logo", prog[dComIfGp_getPalLanguage()]); + timg = (ResTIMG *)dComIfG_getObjectRes("Logo", prog[dComIfGs_getPalLanguage()]); #else timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_PRO); #endif @@ -813,7 +813,7 @@ s32 phase_2(dScnLogo_c* i_this) { i_this->progImg->setAlpha(0x00); #if VERSION == VERSION_PAL - timg = (ResTIMG *)dComIfG_getObjectRes("Logo", intr[dComIfGp_getPalLanguage()]); + timg = (ResTIMG *)dComIfG_getObjectRes("Logo", intr[dComIfGs_getPalLanguage()]); #else timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_INTER); #endif @@ -851,7 +851,7 @@ s32 phase_2(dScnLogo_c* i_this) { #if VERSION == VERSION_PAL delete g_dComIfG_gameInfo.play.field_0x4820; char buf[40]; - sprintf(buf, "/res/Msg/data%d/acticon.arc", dComIfGp_getPalLanguage()); + sprintf(buf, "/res/Msg/data%d/acticon.arc", dComIfGs_getPalLanguage()); l_actioniconCommand = aramMount(buf); #else l_actioniconCommand = aramMount("/res/Msg/acticon.arc"); @@ -868,7 +868,7 @@ s32 phase_2(dScnLogo_c* i_this) { l_saveResCommand = aramMount("/res/Msg/saveres.arc"); #if VERSION == VERSION_PAL - sprintf(buf, "/res/Msg/data%d/bmgres.arc", dComIfGp_getPalLanguage()); + sprintf(buf, "/res/Msg/data%d/bmgres.arc", dComIfGs_getPalLanguage()); l_msgDtCommand = onMemMount(buf); #else l_msgDtCommand = onMemMount("/res/Msg/bmgres.arc"); diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp index c0e89cb2d..6360d78ce 100644 --- a/src/d/d_s_menu.cpp +++ b/src/d/d_s_menu.cpp @@ -72,7 +72,7 @@ static BOOL dScnMenu_Draw(menu_of_scene_class* i_this) { JUTReport(200, 400, "曜日:%s", weekpat_str[l_weekpat]); #if VERSION != VERSION_JPN static const char* language[] = {"ENGLISH", "GERMAN", "FRENCH", "SPANISH", "ITALIAN"}; - JUTReport(40, 440, "%s", language[dComIfGp_getPalLanguage()]); + JUTReport(40, 440, "%s", language[dComIfGs_getPalLanguage()]); #endif if (dComIfGs_isEventBit(0x2d01)) { JUTReport(400, 420, "3コン(A):デモ23 ON"); @@ -176,7 +176,7 @@ static BOOL dScnMenu_Execute(menu_of_scene_class* i_this) { if (CPad_CHECK_TRIG_Z(3)) { if (++l_languageType > 4) l_languageType = 0; - dComIfGp_setPalLanguage(language[l_languageType]); + dComIfGs_setPalLanguage(language[l_languageType]); } #endif @@ -298,7 +298,7 @@ static s32 dScnMenu_Create(scene_class* i_scn) { }; menu_of_scene_class* i_this = (menu_of_scene_class *)i_scn; #if VERSION != VERSION_JPN - l_languageType = dComIfGp_getPalLanguage(); + l_languageType = dComIfGs_getPalLanguage(); #endif return dComLbG_PhaseHandler(&i_this->mPhs, l_method, i_this); } diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp index 84ded4347..ab636b581 100644 --- a/src/f_pc/f_pc_manager.cpp +++ b/src/f_pc/f_pc_manager.cpp @@ -62,13 +62,13 @@ struct BMG_INF1 : JUTDataBlockHeader { void messageSet(u32 status) { #if VERSION == VERSION_PAL BMG_INF1* inf1; - if (dComIfGp_getPalLanguage() == 1) { + if (dComIfGs_getPalLanguage() == 1) { inf1 = (BMG_INF1*)&msg_data_ge[0x20]; - } else if (dComIfGp_getPalLanguage() == 2) { + } else if (dComIfGs_getPalLanguage() == 2) { inf1 = (BMG_INF1*)&msg_data_fr[0x20]; - } else if (dComIfGp_getPalLanguage() == 3) { + } else if (dComIfGs_getPalLanguage() == 3) { inf1 = (BMG_INF1*)&msg_data_sp[0x20]; - } else if (dComIfGp_getPalLanguage() == 4) { + } else if (dComIfGs_getPalLanguage() == 4) { inf1 = (BMG_INF1*)&msg_data_it[0x20]; } else { inf1 = (BMG_INF1*)&msg_data[0x20]; // English @@ -149,7 +149,7 @@ void messageSet(u32 status) { ppane->draw(-12.0f, -24.0f, 665.0f, 530.0f, false, false, false); #if VERSION == VERSION_PAL - if (dComIfGp_getPalLanguage() == 0) { + if (dComIfGs_getPalLanguage() == 0) { spane->draw(x + 2.0f, y + 10.0f + 2.0f, 660.0f, HBIND_LEFT); tpane->draw(x, y + 10.0f, 660.0f, HBIND_LEFT); } else {