summaryrefslogtreecommitdiff
path: root/src/d/d_error_msg.cpp
diff options
context:
space:
mode:
authorhatal175 <hatal175@users.noreply.github.com>2025-09-21 22:26:34 +0300
committerGitHub <noreply@github.com>2025-09-21 13:26:34 -0600
commite82806047b81a74abda21f2dd917eb4fd64199d2 (patch)
treef9c8d9e552e37dd4bdc134b50935413e59fb39ad /src/d/d_error_msg.cpp
parente17e537ea0a5aa1822bb939e999a6614e86303a5 (diff)
d_a_obj_kznkarm OK (#2678)
* d_a_obj_kznkarm OK * d_a_title GZ2P01 Matching * More GZ2P01 Matches * d_s_name matching for PAL * d_msg_scrn_light Matching for PAL * d_menu_fishing Matches on PAL * d_file_sel_info Matches on PAL * d_a_npc_cd Matching on PAL * d_error_msg Matches on PAL * d_cam_param matches as is on PAL * Fix PAL JSystem and Z2AudioLib splits/symbols * Aligning the rest of TUs to compile on all GC versions
Diffstat (limited to 'src/d/d_error_msg.cpp')
-rw-r--r--src/d/d_error_msg.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/d/d_error_msg.cpp b/src/d/d_error_msg.cpp
index 3507fd4a4b..6416755509 100644
--- a/src/d/d_error_msg.cpp
+++ b/src/d/d_error_msg.cpp
@@ -17,6 +17,12 @@
#include "assets/black_tex.h"
#include "assets/msg_data.h"
+#if VERSION == VERSION_GCN_PAL
+#include "assets/msg_data_ge.h"
+#include "assets/msg_data_fr.h"
+#include "assets/msg_data_sp.h"
+#include "assets/msg_data_it.h"
+#endif
#include "assets/font_data.h"
#define MSG_READING_DISC 0
@@ -44,8 +50,26 @@ struct BMG_INF1 : JUTDataBlockHeader {
/* 8009CB88-8009D194 0974C8 060C+00 1/1 0/0 0/0 .text messageSet__FUlb */
static void messageSet(u32 status, bool i_drawBg) {
- BMG_INF1* inf1 = (BMG_INF1*)&msg_data[0x20];
- const char* msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]);
+ BMG_INF1* inf1;
+ const char* msg_p;
+
+ #if VERSION == VERSION_GCN_PAL
+ if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_GERMAN) {
+ inf1 = (BMG_INF1*)&msg_data_ge[0x20];
+ } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_FRENCH) {
+ inf1 = (BMG_INF1*)&msg_data_fr[0x20];
+ } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_SPANISH) {
+ inf1 = (BMG_INF1*)&msg_data_sp[0x20];
+ } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ITALIAN) {
+ inf1 = (BMG_INF1*)&msg_data_it[0x20];
+ } else {
+ inf1 = (BMG_INF1*)&msg_data[0x20];
+ }
+ #else
+ inf1 = (BMG_INF1*)&msg_data[0x20];
+ #endif
+
+ msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]);
JUT_ASSERT(102, strlen(msg_p)-1 < 512);
@@ -141,9 +165,19 @@ static void messageSet(u32 status, bool i_drawBg) {
ppane.draw(0.0f, 0.0f, 608.0f, 448.0f, false, false, false);
}
+ #if VERSION == VERSION_GCN_PAL
+ if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) {
+ spane.draw(x + 2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_LEFT);
+ tpane.draw(x, y + 10.0f, 608.0f, HBIND_LEFT);
+ } else {
+ spane.draw(2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_CENTER);
+ tpane.draw(0.0f, y + 10.0f, 608.0f, HBIND_CENTER);
+ }
+ #else
spane.draw(x + 2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_LEFT);
tpane.draw(x, y + 10.0f, 608.0f, HBIND_LEFT);
#endif
+ #endif
}
/* 8009D194-8009D354 097AD4 01C0+00 1/1 0/0 0/0 .text draw__14dDvdErrorMsg_cFl */