From 11ebeb3fe04496ec46ab30a5aebb424f2b1175e3 Mon Sep 17 00:00:00 2001 From: Max Roncace Date: Fri, 19 Sep 2025 14:32:05 -0400 Subject: [PATCH] Link all oustanding US-matched TUs for JP (#2671) --- config/GZ2J01/rels/d_a_midna/splits.txt | 1 + config/GZ2J01/rels/d_a_obj_drop/splits.txt | 1 + .../GZ2J01/rels/d_a_obj_kshutter/splits.txt | 1 + .../rels/d_a_obj_lv4RailWall/splits.txt | 1 + config/GZ2J01/rels/d_a_obj_lv4sand/splits.txt | 1 + .../rels/d_a_obj_master_sword/splits.txt | 1 + config/GZ2J01/rels/d_a_obj_swhang/splits.txt | 1 + config/GZ2J01/splits.txt | 3 +- config/GZ2J01/symbols.txt | 29 +- configure.py | 74 ++-- include/d/d_com_inf_game.h | 10 + include/d/d_file_select.h | 2 +- include/d/d_menu_option.h | 8 + include/d/d_msg_class.h | 8 + include/d/d_save.h | 4 + include/d/d_timer.h | 3 + src/Z2AudioLib/Z2SoundObjMgr.cpp | 10 + src/d/actor/d_a_e_pm.cpp | 145 +++++-- src/d/d_file_select.cpp | 70 ++-- src/d/d_menu_fmap2D.cpp | 103 ++++- src/d/d_menu_insect.cpp | 12 + src/d/d_menu_item_explain.cpp | 10 + src/d/d_menu_letter.cpp | 298 +++++++++----- src/d/d_menu_option.cpp | 374 +++++++++++++++--- src/d/d_menu_ring.cpp | 47 +++ src/d/d_menu_save.cpp | 55 +++ src/d/d_menu_skill.cpp | 26 ++ src/d/d_menu_window.cpp | 2 +- src/d/d_meter2_info.cpp | 18 + src/d/d_meter_button.cpp | 41 +- src/d/d_msg_scrn_3select.cpp | 80 +++- src/d/d_msg_scrn_explain.cpp | 38 ++ src/d/d_msg_scrn_item.cpp | 39 ++ src/d/d_msg_scrn_jimaku.cpp | 29 ++ src/d/d_msg_scrn_kanban.cpp | 35 +- src/d/d_msg_scrn_talk.cpp | 57 +++ src/d/d_msg_scrn_tree.cpp | 35 ++ src/d/d_timer.cpp | 33 +- 38 files changed, 1430 insertions(+), 275 deletions(-) diff --git a/config/GZ2J01/rels/d_a_midna/splits.txt b/config/GZ2J01/rels/d_a_midna/splits.txt index 7b9849aad64..6ad8be17f57 100644 --- a/config/GZ2J01/rels/d_a_midna/splits.txt +++ b/config/GZ2J01/rels/d_a_midna/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_midna.cpp: .text start:0x00000078 end:0x0000A320 .rodata start:0x00000000 end:0x0000076C .data start:0x00000000 end:0x000000A0 + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/rels/d_a_obj_drop/splits.txt b/config/GZ2J01/rels/d_a_obj_drop/splits.txt index 47b3cca304f..d304035ce59 100644 --- a/config/GZ2J01/rels/d_a_obj_drop/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_drop/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_obj_drop.cpp: .text start:0x00000078 end:0x00002320 .rodata start:0x00000000 end:0x000000D8 .data start:0x00000000 end:0x000001D8 + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/rels/d_a_obj_kshutter/splits.txt b/config/GZ2J01/rels/d_a_obj_kshutter/splits.txt index 13e10b47cba..cfece7b41d2 100644 --- a/config/GZ2J01/rels/d_a_obj_kshutter/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_kshutter/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_obj_kshutter.cpp: .text start:0x00000078 end:0x00002260 .rodata start:0x00000000 end:0x000001B8 .data start:0x00000000 end:0x00000284 + .bss start:0x00000000 end:0x00000008 diff --git a/config/GZ2J01/rels/d_a_obj_lv4RailWall/splits.txt b/config/GZ2J01/rels/d_a_obj_lv4RailWall/splits.txt index 273a6416067..322f38c79a8 100644 --- a/config/GZ2J01/rels/d_a_obj_lv4RailWall/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_lv4RailWall/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_obj_lv4RailWall.cpp: .text start:0x00000078 end:0x00001130 .rodata start:0x00000000 end:0x00000084 .data start:0x00000000 end:0x0000017C + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/rels/d_a_obj_lv4sand/splits.txt b/config/GZ2J01/rels/d_a_obj_lv4sand/splits.txt index 29cc891c051..b2d2c79fb25 100644 --- a/config/GZ2J01/rels/d_a_obj_lv4sand/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_lv4sand/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_obj_lv4sand.cpp: .text start:0x00000078 end:0x00000990 .rodata start:0x00000000 end:0x00000028 .data start:0x00000000 end:0x00000128 + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/rels/d_a_obj_master_sword/splits.txt b/config/GZ2J01/rels/d_a_obj_master_sword/splits.txt index 4d079b81dd6..480c5267a52 100644 --- a/config/GZ2J01/rels/d_a_obj_master_sword/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_master_sword/splits.txt @@ -14,3 +14,4 @@ d/actor/d_a_obj_master_sword.cpp: .ctors start:0x00000000 end:0x00000004 .rodata start:0x00000000 end:0x0000003C .data start:0x00000000 end:0x00000154 + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/rels/d_a_obj_swhang/splits.txt b/config/GZ2J01/rels/d_a_obj_swhang/splits.txt index 9410542649d..f6cf8841083 100644 --- a/config/GZ2J01/rels/d_a_obj_swhang/splits.txt +++ b/config/GZ2J01/rels/d_a_obj_swhang/splits.txt @@ -13,3 +13,4 @@ d/actor/d_a_obj_swhang.cpp: .text start:0x00000078 end:0x00001914 .rodata start:0x00000000 end:0x000000DC .data start:0x00000000 end:0x00000214 + .bss start:0x00000000 end:0x00000004 diff --git a/config/GZ2J01/splits.txt b/config/GZ2J01/splits.txt index 63bd7a9dfca..760a21d8503 100644 --- a/config/GZ2J01/splits.txt +++ b/config/GZ2J01/splits.txt @@ -1162,7 +1162,7 @@ d/d_msg_unit.cpp: .rodata start:0x803937C8 end:0x803937E8 .data start:0x803BAD30 end:0x803BAD40 .bss start:0x8042A7F8 end:0x8042A808 - .sbss start:0x8044B210 end:0x8044B220 + .sbss start:0x8044B210 end:0x8044B218 .sdata2 start:0x8044EC68 end:0x8044EC80 d/d_msg_scrn_3select.cpp: @@ -1227,6 +1227,7 @@ d/d_msg_scrn_light.cpp: .rodata start:0x80393C18 end:0x80393C88 .data start:0x803BB3D8 end:0x803BB3F0 .bss start:0x8042A808 end:0x8042A868 + .sbss start:0x8044B218 end:0x8044B220 .sdata2 start:0x8044EE00 end:0x8044EE10 d/d_msg_scrn_place.cpp: diff --git a/config/GZ2J01/symbols.txt b/config/GZ2J01/symbols.txt index d3283b94333..4853d0e9a7c 100644 --- a/config/GZ2J01/symbols.txt +++ b/config/GZ2J01/symbols.txt @@ -21499,10 +21499,10 @@ VOL_SE_CHAR_VOICE_PAUSING__7Z2Param = .sdata:0x8044A990; // type:object size:0x4 VOL_SE_CHAR_MOVE_PAUSING__7Z2Param = .sdata:0x8044A994; // type:object size:0x4 scope:global align:4 data:float VOL_SE_OBJECT_PAUSING__7Z2Param = .sdata:0x8044A998; // type:object size:0x4 scope:global align:4 data:float VOL_SE_ATMOSPHERE_PAUSING__7Z2Param = .sdata:0x8044A99C; // type:object size:0x4 scope:global align:4 data:float -lbl_8044A9A0 = .sdata:0x8044A9A0; // type:object size:0x1 scope:global align:1 data:byte +struct_80450860 = .sdata:0x8044A9A0; // type:object size:0x1 scope:global align:1 data:byte lbl_8044A9A1 = .sdata:0x8044A9A1; // type:object size:0x1 scope:global align:1 data:byte lbl_8044A9A2 = .sdata:0x8044A9A2; // type:object size:0x1 scope:global align:1 data:byte -lbl_8044A9A3 = .sdata:0x8044A9A3; // type:object size:0x1 scope:global align:1 data:byte +struct_80450863 = .sdata:0x8044A9A3; // type:object size:0x1 scope:global align:1 data:byte lbl_8044A9A4 = .sdata:0x8044A9A4; // type:object size:0x1 scope:global align:1 data:byte lbl_8044A9A5 = .sdata:0x8044A9A5; // type:object size:0x1 scope:global align:1 data:byte lbl_8044A9A6 = .sdata:0x8044A9A6; // type:object size:0x1 scope:global align:1 data:byte @@ -21899,7 +21899,7 @@ init$11661 = .sbss:0x8044B084; // type:object size:0x1 data:byte rot$12032 = .sbss:0x8044B088; // type:object size:0x4 scope:local align:4 data:float init$12033 = .sbss:0x8044B08C; // type:object size:0x1 data:byte data$3831 = .sbss:0x8044B090; // type:object size:0x8 scope:local align:4 -lbl_8044B098 = .sbss:0x8044B098; // type:object size:0x1 data:byte +l_isFinalBossStg = .sbss:0x8044B098; // type:object size:0x1 data:byte l_SetCounter = .sbss:0x8044B0A0; // type:object size:0x4 scope:global align:4 data:4byte lbl_8044B0A8 = .sbss:0x8044B0A8; // type:object size:0x1 data:byte m_name__16dBgS_MoveBgActor = .sbss:0x8044B0B0; // type:object size:0x4 scope:global align:4 data:4byte @@ -21996,7 +21996,7 @@ lbl_8044B1FC = .sbss:0x8044B1FC; // type:object size:0x1 data:byte mMoji$3770 = .sbss:0x8044B200; // type:object size:0x3 scope:local align:4 data:byte s_groupID = .sbss:0x8044B208; // type:object size:0x2 scope:global align:4 data:2byte g_msg_unit = .sbss:0x8044B210; // type:object size:0x4 scope:global align:4 -lbl_8044B218 = .sbss:0x8044B218; // type:object size:0x1 data:byte +l_lightCount = .sbss:0x8044B218; // type:object size:0x1 data:byte dOvlpFd_execute_f = .sbss:0x8044B220; // type:object size:0x4 scope:global align:4 data:4byte g_LogHIO = .sbss:0x8044B228; // type:object size:0x8 scope:global align:4 g_snHIO = .sbss:0x8044B230; // type:object size:0x8 scope:global align:4 @@ -22112,25 +22112,26 @@ init$localstatic4$getMemPool___26JASPoolAllocObject<5JAISe>Fv = .sbss:0x8044B450 init$localstatic4$getMemPool___35JASPoolAllocObject<13JAISoundChild>Fv = .sbss:0x8044B458; // type:object size:0x1 data:byte init$localstatic4$getMemPool___27JASPoolAllocObject<6JAISeq>Fv = .sbss:0x8044B460; // type:object size:0x1 data:byte init$localstatic4$getMemPool___30JASPoolAllocObject<9JAIStream>Fv = .sbss:0x8044B468; // type:object size:0x1 data:byte -init$80 = .sbss:0x8044B470; // type:object size:0x1 data:byte +init$80 = .sbss:0x8044B470; // type:object size:0x1 scope:local align:1 data:byte oRandom$401 = .sbss:0x8044B474; // type:object size:0x4 scope:local align:4 data:4byte MIN_DISTANCE_VOLUME__7Z2Param = .sbss:0x8044B478; // type:object size:0x4 scope:global align:4 data:float ENEMY_LASTHIT_MUTE_VOLUME__7Z2Param = .sbss:0x8044B47C; // type:object size:0x4 scope:global align:4 data:float -lbl_8044B480 = .sbss:0x8044B480; // type:object size:0x1 data:byte -lbl_8044B481 = .sbss:0x8044B481; // type:object size:0x1 data:byte -lbl_8044B482 = .sbss:0x8044B482; // type:object size:0x1 data:byte -lbl_8044B488 = .sbss:0x8044B488; // type:object size:0x1 data:byte +lbl_8044B480 = .sbss:0x8044B480; // type:object size:0x1 scope:global align:1 data:byte +lbl_8044B481 = .sbss:0x8044B481; // type:object size:0x1 scope:global align:1 data:byte +lbl_8044B482 = .sbss:0x8044B482; // type:object size:0x1 scope:global align:1 data:byte +pad_8044B484 = .sbss:0x8044B484; // type:object size:0x4 scope:global align:4 +init$localstatic4$getMemPool___39JASPoolAllocObject<17Z2SoundHandlePool>Fv = .sbss:0x8044B488; // type:object size:0x1 data:byte cNearFarRatio = .sbss:0x8044B490; // type:object size:0x4 scope:global align:4 data:float -lbl_8044B494 = .sbss:0x8044B494; // type:object size:0x1 data:byte -lbl_8044B498 = .sbss:0x8044B498; // type:object size:0x1 data:byte -lbl_8044B499 = .sbss:0x8044B499; // type:object size:0x1 data:byte +init$localstatic4$getMemPool___30JASPoolAllocObject<9Z2Audible>Fv = .sbss:0x8044B494; // type:object size:0x1 data:byte +data_80451358 = .sbss:0x8044B498; // type:object size:0x1 align:1 data:byte +data_80451359 = .sbss:0x8044B499; // type:object size:0x1 align:1 data:byte mLinkPtr__14Z2CreatureLink = .sbss:0x8044B4A0; // type:object size:0x4 scope:global align:4 data:4byte mAudioMgrPtr__10Z2AudioMgr = .sbss:0x8044B4A8; // type:object size:0x4 scope:global align:4 data:4byte sSystemHeap__7JKRHeap = .sbss:0x8044B4B0; // type:object size:0x4 scope:global align:4 data:4byte sCurrentHeap__7JKRHeap = .sbss:0x8044B4B4; // type:object size:0x4 scope:global align:4 data:4byte sRootHeap__7JKRHeap = .sbss:0x8044B4B8; // type:object size:0x4 scope:global align:4 data:4byte mErrorHandler__7JKRHeap = .sbss:0x8044B4BC; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8044B4C0 = .sbss:0x8044B4C0; // type:object size:0x1 data:byte +lbl_8044B4C0 = .sbss:0x8044B4C0; // type:object size:0x1 scope:local align:1 data:byte mCodeStart__7JKRHeap = .sbss:0x8044B4C4; // type:object size:0x4 scope:global align:4 data:4byte mCodeEnd__7JKRHeap = .sbss:0x8044B4C8; // type:object size:0x4 scope:global align:4 data:4byte mUserRamStart__7JKRHeap = .sbss:0x8044B4CC; // type:object size:0x4 scope:global align:4 data:4byte @@ -26429,7 +26430,7 @@ j2dDefaultAlphaCmp = .sdata2:0x804502CE; // type:object size:0x2 scope:global al @1171 = .sdata2:0x804504D8; // type:object size:0x8 scope:local align:4 data:double j3dDefaultColInfo = .sdata2:0x804504E0; // type:object size:0x4 scope:global align:4 data:4byte j3dDefaultAmbInfo = .sdata2:0x804504E4; // type:object size:0x4 scope:global align:4 data:4byte -data_804563C8 = .sdata2:0x804504E8; // type:object size:0x1 data:byte +j3dDefaultNumChans = .sdata2:0x804504E8; // type:object size:0x1 data:byte j3dDefaultTevOrderInfoNull = .sdata2:0x804504EC; // type:object size:0x4 scope:global align:4 data:4byte j3dDefaultIndTexOrderNull = .sdata2:0x804504F0; // type:object size:0x4 scope:global align:4 data:4byte j3dDefaultTevColor = .sdata2:0x804504F4; // type:object size:0x8 scope:global align:4 data:4byte diff --git a/configure.py b/configure.py index 8d404d66e34..d9941f1137a 100755 --- a/configure.py +++ b/configure.py @@ -645,7 +645,7 @@ config.libs = [ Object(NonMatching, "d/d_cc_s.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_cc_uty.cpp"), Object(Equivalent, "d/d_cam_param.cpp"), # weak func order - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_ev_camera.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_ev_camera.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_spline_path.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_item_data.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_item.cpp"), @@ -666,7 +666,7 @@ config.libs = [ Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/actor/d_a_player.cpp"), Object(NonMatching, "d/d_camera.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_envse.cpp"), - Object(NonMatching, "d/d_file_select.cpp"), + Object(Equivalent, "d/d_file_select.cpp"), # issue with J2DAnmTransform::getTransform Object(NonMatching, "d/d_file_sel_warning.cpp"), Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_file_sel_info.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_bright_check.cpp"), @@ -690,44 +690,44 @@ config.libs = [ Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_menu_fishing.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_fmap.cpp"), Object(NonMatching, "d/d_menu_fmap_map.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_fmap2D.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_insect.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_item_explain.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_letter.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_option.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_ring.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_save.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_menu_skill.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_fmap2D.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_insect.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_item_explain.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_letter.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_option.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_ring.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_save.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_skill.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_menu_window_HIO.cpp"), Object(Equivalent, "d/d_menu_window.cpp"), # weak func order Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_HIO.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_meter_button.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_button.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_haihai.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_hakusha.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_map.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter_string.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter2_draw.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_meter2_info.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter2_info.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_meter2.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_out_font.cpp"), Object(NonMatching, "d/d_msg_class.cpp"), Object(NonMatching, "d/d_msg_object.cpp"), Object(NonMatching, "d/d_msg_unit.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_3select.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_3select.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_arrow.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_base.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_boss.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_explain.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_item.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_explain.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_item.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_howl.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_jimaku.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_kanban.cpp"), - Object(MatchingFor("GZ2E01"), "d/d_msg_scrn_light.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_jimaku.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_kanban.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "d/d_msg_scrn_light.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_place.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_staff.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_talk.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_scrn_tree.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_msg_string_base.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_talk.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_scrn_tree.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_string_base.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_msg_string.cpp"), Object(NonMatching, "d/d_msg_flow.cpp"), Object(Equivalent, "d/d_name.cpp"), # missing vtable padding @@ -745,7 +745,7 @@ config.libs = [ Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_s_room.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_s_title.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_save_HIO.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "d/d_timer.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_timer.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_k_wmark.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_k_wpillar.cpp"), ], @@ -992,20 +992,20 @@ config.libs = [ "objects": [ Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2Calc.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2AudioArcLoader.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2Param.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2SoundMgr.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2Param.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2SoundMgr.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2SoundStarter.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2SoundHandles.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2SoundHandles.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2SeMgr.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2SeqMgr.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2StatusMgr.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2SeqMgr.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2StatusMgr.cpp"), Object(NonMatching, "Z2AudioLib/Z2SceneMgr.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2FxLineMgr.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2SoundInfo.cpp"), Object(Equivalent, "Z2AudioLib/Z2Audience.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2SoundObject.cpp"), - Object(MatchingFor("GZ2E01", "GZ2P01"), "Z2AudioLib/Z2SoundObjMgr.cpp"), - Object(MatchingFor("GZ2E01"), "Z2AudioLib/Z2Creature.cpp"), + Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2SoundObjMgr.cpp"), + Object(MatchingFor("GZ2E01", "GZ2J01"), "Z2AudioLib/Z2Creature.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2LinkMgr.cpp"), Object(NonMatching, "Z2AudioLib/Z2EnvSeMgr.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "Z2AudioLib/Z2WolfHowlMgr.cpp"), @@ -1635,7 +1635,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_metalbox"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_mgate"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_nameplate"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_obj_ornament_cloth"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_ornament_cloth"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_rope_bridge"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_sWallShutter"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_stick"), @@ -1746,7 +1746,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_oct_bg"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ot"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ph"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2P01"), "d_a_e_pm"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pm"), ActorRel(NonMatching, "d_a_e_po"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pz"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_rb"), @@ -1876,7 +1876,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_npc_post"), ActorRel(NonMatching, "d_a_npc_pouya"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_prayer", extra_cflags=[DANPCF_C_HACK]), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_npc_raca"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_raca"), ActorRel(NonMatching, "d_a_npc_rafrel"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_saru"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_seib"), @@ -1965,7 +1965,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_digholl"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_digsnow"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_dmelevator"), - ActorRel(NonMatching, "d_a_obj_drop"), + ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_obj_drop"), ActorRel(NonMatching, "d_a_obj_dust"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_enemy_create"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_fallobj"), @@ -2032,7 +2032,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_kjgjs"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_kkanban"), ActorRel(NonMatching, "d_a_obj_knBullet"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_obj_kshutter"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_kshutter"), ActorRel(NonMatching, "d_a_obj_kuwagata"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_kwheel00"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_kwheel01"), @@ -2055,8 +2055,8 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4Gate"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4HsTarget"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4PoGate"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_obj_lv4RailWall"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_obj_lv4SlideWall"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4RailWall"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4SlideWall"), ActorRel(NonMatching, "d_a_obj_lv4bridge"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4chandelier"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4digsand"), @@ -2064,7 +2064,7 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4gear"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4prelvtr"), ActorRel(NonMatching, "d_a_obj_lv4prwall"), - ActorRel(MatchingFor("GZ2E01", "GZ2P01"), "d_a_obj_lv4sand"), + ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv4sand"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5FloorBoard"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5IceWall"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_lv5SwIce"), diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index f4c4a2a91f3..13b49095bd7 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1392,6 +1392,11 @@ inline u8 dComIfGs_getSelectItemIndex(int i_no) { return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectItemIndex(i_no); } +//TODO: actual name is unknown +inline u8 dComIfGs_getOptUnk0() { + return g_dComIfG_gameInfo.info.getPlayer().getConfig().getUnk0(); +} + inline u8 dComIfGs_getOptVibration() { return g_dComIfG_gameInfo.info.getPlayer().getConfig().getVibration(); } @@ -1951,6 +1956,11 @@ inline void dComIfGs_setLastWarpAcceptStage(s8 param_0) { g_dComIfG_gameInfo.info.getPlayer().getPlayerLastMarkInfo().setWarpAcceptStage(param_0); } +//TODO: actual name is unknown +inline void dComIfGs_setOptUnk0(u8 i_unk0) { + g_dComIfG_gameInfo.info.getPlayer().getConfig().setUnk0(i_unk0); +} + inline void dComIfGs_setOptSound(u8 i_mode) { g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(i_mode); } diff --git a/include/d/d_file_select.h b/include/d/d_file_select.h index 52db7307da2..38808c21a5d 100644 --- a/include/d/d_file_select.h +++ b/include/d/d_file_select.h @@ -13,7 +13,7 @@ class dFile_info_c; class dDlst_FileSel_c : public dDlst_base_c { public: /* 8018DEBC */ void draw(); - /* 8019135C */ ~dDlst_FileSel_c() { + /* 8019135C */ virtual ~dDlst_FileSel_c() { delete Scr; delete mpMessageString; } diff --git a/include/d/d_menu_option.h b/include/d/d_menu_option.h index 81d7ff4a865..4599aa65e5c 100644 --- a/include/d/d_menu_option.h +++ b/include/d/d_menu_option.h @@ -31,6 +31,10 @@ public: /* 801E3DE0 */ bool _close(); /* 801E3F6C */ void atten_init(); /* 801E3FC4 */ void atten_move(); +#if VERSION == VERSION_GCN_JPN + void ruby_init(); + void ruby_move(); +#endif /* 801E41A0 */ void vib_init(); /* 801E41F8 */ void vib_move(); /* 801E4488 */ void sound_init(); @@ -61,6 +65,7 @@ public: /* 801E5678 */ void screenSet(); /* 801E6FBC */ void setSoundMode(u32); /* 801E7004 */ void setAttenString(); + /* 801E70E8 */ void setRubyString(); /* 801E70E8 */ void setVibString(); /* 801E71CC */ void setSoundString(); /* 801E7314 */ void setCursorPos(u8); @@ -179,6 +184,9 @@ private: /* 0x3E2 */ u8 field_0x3e2; /* 0x3E3 */ u8 field_0x3e3; /* 0x3E4 */ u8 field_0x3e4; +#if VERSION == VERSION_GCN_JPN + /* 0x3E5 */ u8 field_0x3e5_JPN; +#endif /* 0x3E5 */ u8 field_0x3e5; /* 0x3E6 */ u8 field_0x3e6; /* 0x3E7 */ u8 field_0x3e7; diff --git a/include/d/d_msg_class.h b/include/d/d_msg_class.h index d143da05388..c8b65625b5b 100644 --- a/include/d/d_msg_class.h +++ b/include/d/d_msg_class.h @@ -578,8 +578,13 @@ struct jmessage_string_tReference : public JMessage::TReference { /* 0x0C */ J2DTextBox* mRubyPanePtr; /* 0x10 */ COutFont_c* mOutFontPtr; /* 0x14 */ JUTFont* mpFont; +#if VERSION == VERSION_GCN_JPN + /* 0x18 */ f32 mLineLength[9]; + /* 0x3C */ f32 mOutfontLength[9]; +#else /* 0x18 */ f32 mLineLength[12]; /* 0x48 */ f32 mOutfontLength[12]; +#endif /* 0x78 */ u32 mCCColor; /* 0x7C */ u32 mGCColor; /* 0x80 */ s16 mLineCount; @@ -659,6 +664,9 @@ struct jmessage_string_tRenderingProcessor : public JMessage::TRenderingProcesso /* 0x550 */ s16 field_0x550; /* 0x552 */ s16 field_0x552; /* 0x554 */ u8 field_0x554; +#if VERSION == VERSION_GCN_JPN + /* 0x558 */ u8 field_0x558[0x578 - 0x558]; +#endif }; #define MSGTAG_GROUP(g) (g << 16) diff --git a/include/d/d_save.h b/include/d/d_save.h index 733ee3fcef1..56fb73e6a1c 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -504,6 +504,10 @@ public: void setVibration(u8 i_status); u8 getPalLanguage() const; + //TODO: placeholder name, actual name is not known + u8 getUnk0() { return unk0; } + void setUnk0(u8 i_unk0) { unk0 = i_unk0; } + u8 getAttentionType() { return mAttentionType; } void setAttentionType(u8 i_mAttentionType) { mAttentionType = i_mAttentionType; } u16 getCalibrateDist() { return mCalibrateDist; } diff --git a/include/d/d_timer.h b/include/d/d_timer.h index 20c9e0a5592..e50bb790fdd 100644 --- a/include/d/d_timer.h +++ b/include/d/d_timer.h @@ -52,6 +52,9 @@ public: /* 80260574 */ s32 createStart(u16); /* 80260AA8 */ bool checkStartAnimeEnd(); /* 80260AD4 */ void playBckAnimation(f32); +#if VERSION == VERSION_GCN_JPN + bool isLeadByte(int); +#endif /* 80260B54 */ void drawPikari(int); /* 80260690 */ virtual void draw(); diff --git a/src/Z2AudioLib/Z2SoundObjMgr.cpp b/src/Z2AudioLib/Z2SoundObjMgr.cpp index 761b8dba4d7..7bd01335d2a 100644 --- a/src/Z2AudioLib/Z2SoundObjMgr.cpp +++ b/src/Z2AudioLib/Z2SoundObjMgr.cpp @@ -187,6 +187,10 @@ void Z2SoundObjMgr::searchEnemy() { case Z2_ENEMY_RD: if (iVar16 != 0) continue; +#if VERSION == VERSION_GCN_JPN + } + switch (enemyId) { +#endif case Z2_ENEMY_DN: case Z2_ENEMY_DB: case Z2_ENEMY_GE: @@ -196,6 +200,12 @@ void Z2SoundObjMgr::searchEnemy() { case Z2_ENEMY_HB: case Z2_ENEMY_TT: case Z2_ENEMY_SM2: +#if VERSION == VERSION_GCN_JPN + case Z2_ENEMY_WB: + case Z2_ENEMY_RD: + case Z2_ENEMY_SH: + case Z2_ENEMY_HP: +#endif if (!Z2GetLink()->isRiding()) break; if (Z2GetLink()->getMoveSpeed() <= 0x26) diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index 0543e9fe943..dc4910a931e 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -13,6 +13,7 @@ #include "d/d_camera.h" #include "d/d_com_inf_game.h" #include "d/d_path.h" +#include "d/actor/d_a_alink.h" #include "d/actor/d_a_e_fs.h" #include "d/actor/d_a_player.h" #include "d/actor/d_a_obj_smw_stone.h" @@ -113,6 +114,20 @@ enum Joint { /* 0x1A */ JNT_SKIRT, }; +enum Mode { +#if VERSION == VERSION_GCN_JPN + /* 0x00 */ Mode0_JPN, +#endif + /* 0x00 */ Mode0, + /* 0x01 */ Mode1, + /* 0x02 */ Mode2, + /* 0x03 */ Mode3, + /* 0x04 */ Mode4, + /* 0x05 */ Mode5, + /* 0x06 */ Mode6, + /* 0x07 */ Mode7, +}; + /* 8074C384-8074C388 -00001 0004+00 2/2 0/0 0/0 .bss None */ /* 8074C385 0003+00 data_8074C385 None */ static bool hioInit; @@ -482,13 +497,26 @@ void daE_PM_c::Ap_StartAction() { bool bVar3 = false; switch (mMode) { - case 0: +#if VERSION == VERSION_GCN_JPN + case Mode0_JPN: + if (mAppear) { + bVar3 = true; + mMode++; + } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { + bVar3 = true; + mMode++; + } + break; + case Mode0: + bVar3 = true; +#else + case Mode0: if (mAppear) { bVar3 = true; } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { bVar3 = true; } - +#endif if (bVar3 && CameraSet()) { if (dComIfG_play_c::getLayerNo(0) == 2) { player_pos.set(-10477.0f, mAcch.GetGroundH(), 17710.0f); @@ -506,7 +534,7 @@ void daE_PM_c::Ap_StartAction() { } break; - case 1: + case Mode1: if (fopAcM_SearchByName(PROC_Obj_SmWStone, (fopAc_ac_c**)&stone) && stone != NULL) { stone->deleteStone(); } @@ -529,7 +557,7 @@ void daE_PM_c::Ap_StartAction() { } break; - case 2: + case Mode2: if (mTimer[0] == 0) { mTargetAngleY = shape_angle.y; mMode++; @@ -546,7 +574,7 @@ void daE_PM_c::Ap_StartAction() { } break; - case 3: + case Mode3: mParticleKey = dComIfGp_particle_set(mParticleKey, 0x880C, ¤t.pos, &tevStr, ¤t.angle, &scale, 0xff, NULL, -1, NULL, NULL, NULL); @@ -583,7 +611,7 @@ void daE_PM_c::Ap_StartAction() { SetMoveCam2(0.15f, 50.0f); break; - case 4: + case Mode4: if (mTimer[0] == 0) { mAction = ACT_CREATE; mMode = 0; @@ -820,6 +848,11 @@ void daE_PM_c::DemoBeforeEscape() { for (int i = 0; i < 4; i++) { e_fs_class* puppet; if (fopAcM_SearchByID(mPuppetID[i], (fopAc_ac_c**)&puppet)) { +#if VERSION == VERSION_GCN_JPN + if (puppet == NULL) { + continue; + } +#endif puppet->mAction = e_fs_class::ACT_END; puppet->mMode = 0; } @@ -1272,10 +1305,17 @@ void daE_PM_c::Action() { /* 80745ED0-80746624 0040D0 0754+00 2/1 0/0 0/0 .text DemoBossStart2__8daE_PM_cFv */ void daE_PM_c::DemoBossStart2() { + daPy_py_c* player; bool bVar1 = false; cXyz vec1, vec2; - if (mDemoMode != 0) { + player = (daPy_py_c*)dComIfGp_getPlayer(0); + +#if VERSION == VERSION_GCN_JPN + if (mDemoMode > Mode0) { +#else + if (mDemoMode != Mode0) { +#endif SetMoveCam(0.1f, 50.0f); } else { SetMoveCam(0.03f, 50.0f); @@ -1284,7 +1324,34 @@ void daE_PM_c::DemoBossStart2() { mTargetAngleY = s_TargetAngle; switch (mDemoMode) { - case 0: +#if VERSION == VERSION_GCN_JPN + case Mode0_JPN: + if (!CameraSet()) { + break; + } + + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + if (mSecondEncounter) { + mTimer[0] = 180; + vec1.set(current.pos.x, 1900.0f, current.pos.z); + SetStopCam(vec1, 500.0f, 0.0f, s_TargetAngle); + mCamEye.set(mCamEyeTarget); + actor_status &= ~0x100; + } + if (mSecondEncounter) { + player->mDemo.setDemoType(3); + player->mDemo.setParam0(0); + player->mDemo.setDemoMode(4); + player->mDemo.setParam0(0); + player->mDemo.setParam1(0); + player->mDemo.setParam2(0); + } + mDemoMode++; + break; +#endif + case Mode0: current.pos.y = 10000.0f; old.pos.y = current.pos.y; if (mTimer[0] < 150) { @@ -1301,7 +1368,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 1: + case Mode1: if (mAnm == ANM_APPEAR01) { mParticleKey = dComIfGp_particle_set(mParticleKey, 0x880C, ¤t.pos, &tevStr, ¤t.angle, &scale, 0xff, NULL, -1, @@ -1321,7 +1388,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 2: + case Mode2: if (mpMorf->isStop()) { mDemoMode++; @@ -1352,7 +1419,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 3: + case Mode3: if (mTimer[0] == 0) { SetAnm(ANM_FOGBLOW_ST, J3DFrameCtrl::EMode_NONE, 5.0f, 1.0f); mCreatureSound.startCreatureVoice(Z2SE_EN_PM_V_FOGBLOW, -1); @@ -1363,7 +1430,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 4: + case Mode4: vec1.set(current.pos.x, current.pos.y, current.pos.z); GakkiLoopAction(vec1, 400.0f); @@ -1379,7 +1446,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 5: + case Mode5: if (mpMorf->isStop()) { SetAnm(ANM_WAIT01, J3DFrameCtrl::EMode_LOOP, 5.0f, 1.0f); mpTrumpetMorf->setPlaySpeed(0.0f); @@ -1388,7 +1455,7 @@ void daE_PM_c::DemoBossStart2() { } break; - case 6: + case Mode6: if (mTimer[0] == 0) { if (mDoorAction == 0) { SetReleaseCam(); @@ -1412,12 +1479,28 @@ void daE_PM_c::DemoBossStart2() { void daE_PM_c::DemoBossStart() { bool bVar1 = false; cXyz vec1, vec2; - if (mDemoMode > 2) { + if (mDemoMode > Mode2) { mTargetAngleY = cLib_targetAngleY(¤t.pos, s_LinkPos); } switch (mDemoMode) { - case 0: +#if VERSION == VERSION_GCN_JPN + case Mode0_JPN: + if (!CameraSet()) { + break; + } + + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + vec1.set(current.pos.x, current.pos.y + 80.0f, current.pos.z); + mTargetAngleY = shape_angle.y; + SetStopCam(vec1, 500.0f, -150.0f, shape_angle.y); + mDemoMode++; + + break; +#endif + case Mode0: if (mTimer[0] == 100) { vec1.set(0.0f, 50.0f, 300.0f); cLib_offsetPos(&mCamEyeTarget, ¤t.pos, shape_angle.y, &vec1); @@ -1432,7 +1515,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 1: + case Mode1: if (mpMorf->isStop()) { SetAnm(ANM_HIDE, J3DFrameCtrl::EMode_NONE, 5.0f, 1.0f); mCreatureSound.startCreatureVoice(Z2SE_EN_PM_FADEOUT, -1); @@ -1469,7 +1552,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 2: + case Mode2: if (mpMorf->isStop() && mAnm == ANM_HIDE) { mPoint = dPath_GetPnt(mpPath, 1)->m_position; current.pos.set(mPoint.x, mPoint.y + 10000.0f, mPoint.z); @@ -1512,7 +1595,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 3: + case Mode3: mCamCenterTarget.y = current.pos.y + 100.0f; if (mAnm == ANM_APPEAR01) { @@ -1542,7 +1625,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.08f, 50.0f); break; - case 4: + case Mode4: if (mTimer[0] == 0) { SetAnm(ANM_FOGBLOW_ST, J3DFrameCtrl::EMode_NONE, 5.0f, 1.0f); mCreatureSound.startCreatureVoice(Z2SE_EN_PM_V_FOGBLOW, -1); @@ -1555,7 +1638,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 5: + case Mode5: vec1.set(current.pos.x, current.pos.y, current.pos.z); GakkiLoopAction(vec1, 400.0f); @@ -1573,7 +1656,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 6: + case Mode6: if (mpMorf->isStop()) { SetAnm(ANM_WAIT01, J3DFrameCtrl::EMode_LOOP, 5.0f, 1.0f); mpTrumpetMorf->setPlaySpeed(0.0f); @@ -1584,7 +1667,7 @@ void daE_PM_c::DemoBossStart() { SetMoveCam(0.1f, 50.0f); break; - case 7: + case Mode7: if (mTimer[0] == 0) { if (mDoorAction == 0) { SetReleaseCam(); @@ -2171,13 +2254,17 @@ void daE_PM_c::StartAction() { old.pos.y = current.pos.y; } if (fopAcM_gc_c::gndCheck(&pos) && current.pos.absXZ(*s_LinkPos) < 1000.0f - && mAnm == ANM_WAIT01 && s_LinkPos->y <= fopAcM_gc_c::getGroundY() + 100.0f - && CameraSet()) + && mAnm == ANM_WAIT01 && s_LinkPos->y <= fopAcM_gc_c::getGroundY() + 100.0f) { +#if VERSION != VERSION_GCN_JPN + if (!CameraSet()) { + break; + } + mPuppetNum = 4; gravity = -9.0f; mAction = ACT_DEMO; - mMode = 1; + mMode = Mode1; mTimer[0] = 130; if (mSecondEncounter) { @@ -2196,6 +2283,12 @@ void daE_PM_c::StartAction() { player->changeOriginalDemo(); player->changeDemoMode(4, 0, 0, 0); } +#else + mPuppetNum = 4; + mAction = 6; + mMode = Mode0; + mDemoMode = 0; +#endif } } } diff --git a/src/d/d_file_select.cpp b/src/d/d_file_select.cpp index 2a8d6363d01..50b7ef09a8b 100644 --- a/src/d/d_file_select.cpp +++ b/src/d/d_file_select.cpp @@ -2475,9 +2475,15 @@ void dFile_select_c::screenSet() { field_0x020c[i] = new CPaneMgrAlpha(fileSel.Scr, l_tagName21[i], 0, NULL); ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setFont(fileSel.mpMessageFont[0]); ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setString(512, ""); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setCharSpace(2.0f); +#else ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setFontSize(24.0f, 24.0f); ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setLineSpace(20.0f); ((J2DTextBox*)field_0x020c[i]->getPanePtr())->setCharSpace(0.0f); +#endif field_0x0214[i] = ((J2DTextBox*)field_0x020c[i]->getPanePtr())->getStringPtr(); } field_0x020c[0]->setAlpha(0xff); @@ -2688,8 +2694,13 @@ void dFile_select_c::screenSetYesNo() { field_0x008c->searchUpdateMaterialID(mYnSel.ScrYn); for (int i = 0; i < 2; i++) { field_0x00f0[i] = new CPaneMgr(mYnSel.ScrYn, l_tagName012[i], 0, NULL); +#if VERSION == VERSION_GCN_JPN + field_0x01c0[i] = new CPaneMgr(mYnSel.ScrYn, l_tagName013[i], 0, NULL); + mYnSel.ScrYn->search(l_tagName013U[i])->hide(); +#else field_0x01c0[i] = new CPaneMgr(mYnSel.ScrYn, l_tagName013U[i], 0, NULL); mYnSel.ScrYn->search(l_tagName013[i])->hide(); +#endif ((J2DTextBox*)field_0x01c0[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); char acStack_30[16]; fopMsgM_messageGet(acStack_30, l_msgNum2[i]); @@ -2754,8 +2765,13 @@ void dFile_select_c::screenSet3Menu() { field_0x0118->animationTransform(); for (int i = 0; i < 3; i++) { field_0x0340[i] = new CPaneMgr(m3mSel.Scr3m, l_tagName1[i], 0, NULL); +#if VERSION == VERSION_GCN_JPN + mpPaneMgr2[i] = new CPaneMgr(m3mSel.Scr3m, l_tagName011[i], 0, NULL); + m3mSel.Scr3m->search(l_tagName011U[i])->hide(); +#else mpPaneMgr2[i] = new CPaneMgr(m3mSel.Scr3m, l_tagName011U[i], 0, NULL); m3mSel.Scr3m->search(l_tagName011[i])->hide(); +#endif ((J2DTextBox*)mpPaneMgr2[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); char acStack_30[32]; @@ -3306,7 +3322,7 @@ void dFile_select_c::MemCardStatCheck() { field_0x0280 = false; field_0x0284 = NULL; field_0x0273 = 2; - field_0x0290 = &dFile_select_c::noSaveSelDispInit; + field_0x0290 = &dFile_select_c::noFileSpaceDispInit; field_0x0274 = 3; break; case 8: @@ -4134,18 +4150,23 @@ void dFile_select3D_c::draw() { } /* 8019065C-8019095C 18AF9C 0300+00 2/2 0/0 0/0 .text setJ3D__16dFile_select3D_cFPCcPCcPCc */ -// NONMATCHING extra mr void dFile_select3D_c::setJ3D(char const* param_0, char const* param_1, char const* param_2) { - JKRArchive* archive = dComIfGp_getCollectResArchive(); - J3DAnmTransform* pbck; - J3DAnmTevRegKey* pbrk; + JKRArchive* archive; + J3DAnmBase* anmBase; + void* bmdRes; + J3DMaterialAnm* material; + void* bckRes; + void* brkRes; + J3DModelData* modelData; - void* res = archive->getResource('BMD ', param_0); - J3DModelData* modelData = J3DModelLoaderDataBase::load(res, 0x51020010); + archive = dComIfGp_getCollectResArchive(); + + bmdRes = archive->getResource('BMD ', param_0); + modelData = J3DModelLoaderDataBase::load(bmdRes, 0x51020010); JUT_ASSERT(8823, modelData != 0); for (u16 i = 0; i < modelData->getMaterialNum(); i++) { - J3DMaterialAnm* material = new J3DMaterialAnm(); + material = new J3DMaterialAnm(); modelData->getMaterialNodePointer(i)->change(); modelData->getMaterialNodePointer(i)->setMaterialAnm(material); } @@ -4154,24 +4175,24 @@ void dFile_select3D_c::setJ3D(char const* param_0, char const* param_1, char con JUT_ASSERT(8836, mpModel != 0); if (param_1) { - void* res = archive->getResource('BCK ', param_1); - pbck = (J3DAnmTransform*)J3DAnmLoaderDataBase::load(res); - JUT_ASSERT(8846, pbck != 0); + bckRes = archive->getResource('BCK ', param_1); + anmBase = (J3DAnmTransform*)J3DAnmLoaderDataBase::load(bckRes); + JUT_ASSERT(8846, anmBase != 0); mBckAnm = new mDoExt_bckAnm(); - if (mBckAnm == NULL || !mBckAnm->init(pbck, 1, 2, 1.0f, 0, -1, false)) { + if (mBckAnm == NULL || !mBckAnm->init((J3DAnmTransform*)anmBase, 1, 2, 1.0f, 0, -1, false)) { return; } } if (param_2) { - void* res = archive->getResource('BRK ', param_2); - pbrk = (J3DAnmTevRegKey*)J3DAnmLoaderDataBase::load(res); - JUT_ASSERT(8859, pbrk != 0); - pbrk->searchUpdateMaterialID(modelData); + brkRes = archive->getResource('BRK ', param_2); + anmBase = (J3DAnmTevRegKey*)J3DAnmLoaderDataBase::load(brkRes); + JUT_ASSERT(8859, anmBase != 0); + ((J3DAnmTevRegKey*)anmBase)->searchUpdateMaterialID(modelData); mBrkAnm = new mDoExt_brkAnm(); - if (mBrkAnm == NULL || !mBrkAnm->init(modelData, pbrk, -1, 2, 1.0f, 0, -1)) { + if (mBrkAnm == NULL || !mBrkAnm->init(modelData, (J3DAnmTevRegKey*)anmBase, -1, 2, 1.0f, 0, -1)) { return; } } @@ -4315,22 +4336,21 @@ void dFile_select3D_c::createMirrorModel() { } /* 80190FE8-801910D4 18B928 00EC+00 1/1 0/0 0/0 .text toItem3Dpos__16dFile_select3D_cFfffP4cXyz */ -// NONMATCHING this is the same function as dMenu_Collect3D_c::toItem3Dpos #pragma push #pragma optimization_level 2 void dFile_select3D_c::toItem3Dpos(f32 param_0, f32 param_1, f32 param_2, cXyz* param_3) { Mtx adStack_98; Mtx auStack_c8; - f32 dVar7 = + param_0 = (2.0f * ((param_0 - mDoGph_gInf_c::getMinXF()) / mDoGph_gInf_c::getWidthF()) - 1.0f); - f32 dVar11 = (2.0f * ((param_1 - -100.0f) / 448.0f) - 1.0f); + param_1 = (2.0f * ((param_1 - -100.0f) / 448.0f) - 1.0f); calcViewMtx(adStack_98); - MTXInverse(adStack_98, auStack_c8); - f32 tangent = tan(0.39269909262657166); + cMtx_inverse(adStack_98, auStack_c8); + f32 tangent = std::tan(0.39269909262657166); f32 dVar12 = -param_2; - cXyz cStack_d4((dVar7 * param_2) * (mDoGph_gInf_c::getAspect() * tangent), - (tangent * (dVar11 * dVar12)), dVar12); - MTXMultVec(auStack_c8, &cStack_d4, param_3); + cXyz cStack_d4((param_0 * param_2) * (mDoGph_gInf_c::getAspect() * tangent), + (tangent * (param_1 * dVar12)), dVar12); + cMtx_multVec(auStack_c8, &cStack_d4, param_3); } #pragma pop diff --git a/src/d/d_menu_fmap2D.cpp b/src/d/d_menu_fmap2D.cpp index c9e7c8481be..2a81428eedd 100644 --- a/src/d/d_menu_fmap2D.cpp +++ b/src/d/d_menu_fmap2D.cpp @@ -2225,10 +2225,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 area_name[3] = {'i_name_s', 'i_name' ,'i_name1'}; static const u64 farea_name[3] = {'f_name_1', 'f_name3', 'f_name2'}; for (int i = 0; i < 3; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(area_name[i])) + ->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(area_name[i]))->setString(0x40, ""); + mpTitleScreen->search(farea_name[i])->hide(); +#else static_cast(mpTitleScreen->search(farea_name[i])) ->setFont(mDoExt_getRubyFont()); static_cast(mpTitleScreen->search(farea_name[i]))->setString(0x40, ""); mpTitleScreen->search(area_name[i])->hide(); +#endif } static const u64 sfont_name[7] = { @@ -2238,60 +2245,102 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { 'ffont00', 'ffontl0', 'ffontl1', 'ffontl2', 'ffontb0', 'ffontb3', 'ffontb4' }; for (int i = 0; i < 7; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(sfont_name[i])) + ->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(sfont_name[i]))->setString(0x40, ""); + mpTitleScreen->search(ffont_name[i])->hide(); +#else static_cast(mpTitleScreen->search(ffont_name[i])) ->setFont(mDoExt_getRubyFont()); static_cast(mpTitleScreen->search(ffont_name[i]))->setString(0x40, ""); mpTitleScreen->search(sfont_name[i])->hide(); +#endif } setTitleNameString(0x3e0); static const u64 cont_zt[5] = {'cont_zt', 'cont_zt1', 'cont_zt2', 'cont_zt3', 'cont_zt4'}; static const u64 font_zt[5] = {'font_zt1', 'font_zt2', 'font_zt3', 'font_zt4', 'font_zt5'}; for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(cont_zt[i])) + ->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_zt[i]))->setString(0x20, ""); + mpTitleScreen->search(font_zt[i])->hide(); +#else static_cast(mpTitleScreen->search(font_zt[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(font_zt[i]))->setString(0x20, ""); mpTitleScreen->search(cont_zt[i])->hide(); +#endif } setZButtonString(0x529, 0xff); static const u64 cont_bt[5] = {'cont_bt1', 'cont_bt2', 'cont_bt3', 'cont_bt4', 'cont_bt'}; static const u64 font_bt[5] = {'font_bt1', 'font_bt2', 'font_bt3', 'font_bt4', 'font_bt5'}; for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(cont_bt[i])) + ->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_bt[i]))->setString(0x20, ""); + mpTitleScreen->search(font_bt[i])->hide(); +#else static_cast(mpTitleScreen->search(font_bt[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(font_bt[i]))->setString(0x20, ""); mpTitleScreen->search(cont_bt[i])->hide(); +#endif } setBButtonString(0x522, 0xff); static const u64 cont_at[5] = {'cont_at', 'cont_at1', 'cont_at2', 'cont_at3', 'cont_at4'}; static const u64 font_at[5] = {'font_at1', 'font_at2', 'font_at3', 'font_at4', 'font_at5'}; for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(cont_at[i])) + ->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_at[i]))->setString(0x20, ""); + mpTitleScreen->search(font_at[i])->hide(); +#else static_cast(mpTitleScreen->search(font_at[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(font_at[i]))->setString(0x20, ""); mpTitleScreen->search(cont_at[i])->hide(); +#endif } setAButtonString(0x527, 0xff); static const u64 juji_c[5] = {'juji_c00', 'juji_c01', 'juji_c02', 'juji_c03', 'juji_c04'}; static const u64 fuji_c[5] = {'fuji_c00', 'fuji_c01', 'fuji_c02', 'fuji_c03', 'fuji_c04'}; for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(juji_c[i])) + ->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(juji_c[i]))->setString(0x20, ""); + mpTitleScreen->search(fuji_c[i])->hide(); +#else static_cast(mpTitleScreen->search(fuji_c[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(fuji_c[i]))->setString(0x20, ""); mpTitleScreen->search(juji_c[i])->hide(); +#endif } setCrossLRString(0x3f9); static const u64 ast_c[5] = {'ast_00', 'ast_01', 'ast_02', 'ast_03', 'ast_04'}; static const u64 fst_c[5] = {'fst_00', 'fst_01', 'fst_02', 'fst_03', 'fst_04'}; for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + static_cast(mpTitleScreen->search(ast_c[i])) + ->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(ast_c[i]))->setString(0x20, ""); + mpTitleScreen->search(fst_c[i])->hide(); +#else static_cast(mpTitleScreen->search(fst_c[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(fst_c[i]))->setString(0x20, ""); mpTitleScreen->search(ast_c[i])->hide(); +#endif } set3DStickString(0x524); @@ -2475,15 +2524,23 @@ void dMenu_Fmap2DTop_c::setMoyaAlpha(u8 i_alpha) { /* 801D6F38-801D7010 1D1878 00D8+00 1/1 1/1 0/0 .text setTitleNameString__17dMenu_Fmap2DTop_cFUl */ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) { +#if VERSION == VERSION_GCN_JPN + static const u64 sfont_name[7] = { + 'sfont00', 'sfontl0', 'sfontl1', 'sfontl2', 'sfontb0', 'sfontb1', 'sfontb2' + }; +#define setTitleNameString_font_name sfont_name +#else static const u64 ffont_name[7] = { 'ffont00', 'ffontl0', 'ffontl1', 'ffontl2', 'ffontb0', 'ffontb3', 'ffontb4' }; +#define setTitleNameString_font_name ffont_name +#endif for (int i = 0; i < 7; i++) { if (param_0 == 0) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(ffont_name[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setTitleNameString_font_name[i])); strcpy(text_box->getStringPtr(), ""); } else { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(ffont_name[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setTitleNameString_font_name[i])); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } } @@ -2491,13 +2548,19 @@ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) { /* 801D7010-801D70E8 1D1950 00D8+00 0/0 2/2 0/0 .text setAreaNameString__17dMenu_Fmap2DTop_cFUl */ void dMenu_Fmap2DTop_c::setAreaNameString(u32 param_0) { +#if VERSION == VERSION_GCN_JPN + static const u64 iarea_name[3] = {'i_name_s', 'i_name', 'i_name1'}; +#define setAreaNameString_area_name iarea_name +#else static const u64 farea_name[3] = {'f_name_1', 'f_name3', 'f_name2'}; +#define setAreaNameString_area_name farea_name +#endif for (int i = 0; i < 3; i++) { if (param_0 == 0) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(farea_name[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setAreaNameString_area_name[i])); strcpy(text_box->getStringPtr(), ""); } else { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(farea_name[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setAreaNameString_area_name[i])); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } } @@ -2510,12 +2573,18 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) { param_0 = 0x533; } +#if VERSION == VERSION_GCN_JPN + static const u64 cont_zt[5] = {'cont_zt', 'cont_zt1', 'cont_zt2', 'cont_zt3', 'cont_zt4'}; + #define setZButtonString_font_zt cont_zt +#else static const u64 font_zt[5] = {'font_zt1', 'font_zt2', 'font_zt3', 'font_zt4', 'font_zt5'}; + #define setZButtonString_font_zt font_zt +#endif if (param_0 == 0 || !isWarpAccept()) { mAlphaButtonZ = ALPHA_MID; } else { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(font_zt[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setZButtonString_font_zt[i])); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } @@ -2534,12 +2603,18 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) { /* 801D7210-801D72D4 1D1B50 00C4+00 1/1 9/9 0/0 .text setBButtonString__17dMenu_Fmap2DTop_cFUlUc */ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) { +#if VERSION == VERSION_GCN_JPN + static const u64 cont_bt[5] = {'cont_bt1', 'cont_bt2', 'cont_bt3', 'cont_bt4', 'cont_bt'}; +#define setBButtonString_font_bt cont_bt +#else static const u64 font_bt[5] = {'font_bt1', 'font_bt2', 'font_bt3', 'font_bt4', 'font_bt5'}; +#define setBButtonString_font_bt font_bt +#endif if (param_0 == 0) { mAlphaButtonB = ALPHA_MIN; } else { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(font_bt[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setBButtonString_font_bt[i])); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } @@ -2554,12 +2629,18 @@ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) { /* 801D72D4-801D7398 1D1C14 00C4+00 1/1 14/14 0/0 .text setAButtonString__17dMenu_Fmap2DTop_cFUlUc */ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) { +#if VERSION == VERSION_GCN_JPN + static const u64 cont_at[5] = {'cont_at', 'cont_at1', 'cont_at2', 'cont_at3', 'cont_at4'}; +#define setAButtonString_font_at cont_at +#else static const u64 font_at[5] = {'font_at1', 'font_at2', 'font_at3', 'font_at4', 'font_at5'}; +#define setAButtonString_font_at font_at +#endif if (param_0 == 0) { mAlphaButtonA = ALPHA_MIN; } else { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(font_at[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(setAButtonString_font_at[i])); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } @@ -2573,7 +2654,11 @@ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) { /* 801D7398-801D74EC 1D1CD8 0154+00 1/1 8/8 0/0 .text setCrossLRString__17dMenu_Fmap2DTop_cFUl */ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) { +#if VERSION == VERSION_GCN_JPN + static const u64 juji_c[5] = {'juji_c00', 'juji_c01', 'juji_c02', 'juji_c03', 'juji_c04'}; +#else static const u64 juji_c[5] = {'fuji_c00', 'fuji_c01', 'fuji_c02', 'fuji_c03', 'fuji_c04'}; +#endif if (param_0 == 0) { for (int i = 0; i < 5; i++) { J2DTextBox* text_box = static_cast(mpTitleScreen->search(juji_c[i])); @@ -2594,7 +2679,11 @@ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) { /* 801D74EC-801D7640 1D1E2C 0154+00 1/1 10/10 0/0 .text set3DStickString__17dMenu_Fmap2DTop_cFUl */ void dMenu_Fmap2DTop_c::set3DStickString(u32 param_0) { +#if VERSION == VERSION_GCN_JPN + static const u64 ast_c[5] = {'ast_00', 'ast_01', 'ast_02', 'ast_03', 'ast_04'}; +#else static const u64 ast_c[5] = {'fst_00', 'fst_01', 'fst_02', 'fst_03', 'fst_04'}; +#endif if (param_0 == 0) { for (int i = 0; i < 5; i++) { J2DTextBox* text_box = static_cast(mpTitleScreen->search(ast_c[i])); diff --git a/src/d/d_menu_insect.cpp b/src/d/d_menu_insect.cpp index d2a20a745a5..41797211238 100644 --- a/src/d/d_menu_insect.cpp +++ b/src/d/d_menu_insect.cpp @@ -495,8 +495,13 @@ void dMenu_Insect_c::screenSetBase() { } } } +#if VERSION == VERSION_GCN_JPN + J2DTextBox* textBox = (J2DTextBox*)mpScreen->search('t_t00'); + mpScreen->search('f_t00')->hide(); +#else J2DTextBox* textBox = (J2DTextBox*)mpScreen->search('f_t00'); mpScreen->search('t_t00')->hide(); +#endif textBox->setFont(mDoExt_getSubFont()); textBox->setString(0x200, ""); mpString->getString(0x5ba, textBox, NULL, NULL, NULL, 0); @@ -514,10 +519,17 @@ void dMenu_Insect_c::screenSetExplain() { if (field_0xf6 == 0) { mpExpSubWin[1]->hide(); } +#if VERSION == VERSION_GCN_JPN + mpInfoText = new CPaneMgr(mpExpScreen, 'mg_3line', 0, NULL); + mpExpScreen->search('n_e4line')->hide(); + field_0x5c = (J2DTextBox*)mpExpScreen->search('w_msg_jp'); + mpExpScreen->search('ms_for_2')->hide(); +#else mpInfoText = new CPaneMgr(mpExpScreen, 'mg_e4lin', 0, NULL); mpExpScreen->search('n_3line')->hide(); field_0x5c = (J2DTextBox*)mpExpScreen->search('ms_for_2'); mpExpScreen->search('w_msg_jp')->hide(); +#endif mpExpScreen->search('ms_for_3')->hide(); field_0x54[0] = (J2DPicture*)mpExpScreen->search('insects'); field_0x54[1] = (J2DPicture*)mpExpScreen->search('insectss'); diff --git a/src/d/d_menu_item_explain.cpp b/src/d/d_menu_item_explain.cpp index 47b22f08d66..2f821ee5a4b 100644 --- a/src/d/d_menu_item_explain.cpp +++ b/src/d/d_menu_item_explain.cpp @@ -104,14 +104,24 @@ dMenu_ItemExplain_c::dMenu_ItemExplain_c(JKRExpHeap* i_heap, JKRArchive* i_archi mDescAlpha = 0.0f; field_0x78 = 0; mAlphaRatio = 201.0f; +#if VERSION == VERSION_GCN_JPN + mpInfoText = new CPaneMgr(mpInfoScreen, 'i_text4', 0, NULL); + mpInfoScreen->search('i_text1')->hide(); +#else mpInfoText = new CPaneMgr(mpInfoScreen, 'i_text1', 0, NULL); mpInfoScreen->search('i_text4')->hide(); +#endif ((J2DTextBox*)(mpInfoText->getPanePtr()))->setFont(mDoExt_getMesgFont()); ((J2DTextBox*)(mpInfoText->getPanePtr()))->setString(0x200, ""); mpInfoText->show(); for (int i = 0; i < 4; i++) { +#if VERSION == VERSION_GCN_JPN + mpNameText[i] = new CPaneMgr(mpInfoScreen, name_tag[i], 0, NULL); + mpInfoScreen->search(fame_tag[i])->hide(); +#else mpNameText[i] = new CPaneMgr(mpInfoScreen, fame_tag[i], 0, NULL); mpInfoScreen->search(name_tag[i])->hide(); +#endif ((J2DTextBox*)(mpNameText[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); ((J2DTextBox*)(mpNameText[i]->getPanePtr()))->setString(0x20, ""); } diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp index b3d6ebaa281..bf4b35dabc4 100644 --- a/src/d/d_menu_letter.cpp +++ b/src/d/d_menu_letter.cpp @@ -22,6 +22,12 @@ #include "d/d_msg_scrn_arrow.h" #include "d/d_lib.h" +#if VERSION == VERSION_GCN_JPN +#define LINE_MAX 9 +#else +#define LINE_MAX 12 +#endif + typedef void (dMenu_Letter_c::*initFunc)(); static initFunc map_init_process[] = { &dMenu_Letter_c::wait_init, @@ -262,7 +268,7 @@ void dMenu_Letter_c::_draw() { uVar10 = (J2DTextBox*)field_0x2f4[i]->getPanePtr(); } J2DTextBox* uVar18 = (J2DTextBox*)field_0x2ec[i]->getPanePtr(); - mpString->getStringPage(dMenu_Letter::getLetterText(dVar1), field_0x3e3 - 1, 0xc, + mpString->getStringPage(dMenu_Letter::getLetterText(dVar1), field_0x3e3 - 1, LINE_MAX, uVar18, uVar10, NULL, NULL, 0); } mpString->drawOutFont((J2DTextBox*)field_0x2ec[1]->getPanePtr(), -1.0f); @@ -439,8 +445,13 @@ void dMenu_Letter_c::wait_move() { } if (mProcess == 1 || mProcess == 2) { +#if VERSION == VERSION_GCN_JPN + J2DTextBox* textBox = (J2DTextBox*)mpBaseScreen->search('t_t00'); + mpBaseScreen->search('f_t_00')->hide(); +#else J2DTextBox* textBox = (J2DTextBox*)mpBaseScreen->search('f_t_00'); mpBaseScreen->search('t_t00')->hide(); +#endif dComIfGp_setMessageCountNumber(field_0x374 + (field_0x36f + 1) * 100); mpString->getString(0x4d6, textBox, NULL, NULL, NULL, 0); } @@ -505,10 +516,10 @@ void dMenu_Letter_c::read_open_init() { text1 = (J2DTextBox*)field_0x2f4[i]->getPanePtr(); } J2DTextBox* text2 = (J2DTextBox*)field_0x2ec[i]->getPanePtr(); - mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, 12, text2, text1, + mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1, NULL, NULL, NULL); } - field_0x3e2 = mpString->getPageMax(12); + field_0x3e2 = mpString->getPageMax(LINE_MAX); if (field_0x3e2 > 1) { char acStack_30[20]; sprintf(acStack_30, "%d/%d", field_0x3e3, field_0x3e2); @@ -667,7 +678,7 @@ void dMenu_Letter_c::read_next_fadein_init() { text1 = (J2DTextBox*)field_0x2f4[i]->getPanePtr(); } J2DTextBox* text2 = (J2DTextBox*)field_0x2ec[i]->getPanePtr(); - mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, 12, text2, text1, NULL, NULL, NULL); + mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1, NULL, NULL, NULL); } char acStack_30[10]; sprintf(acStack_30, "%d/%d", field_0x3e3, field_0x3e2); @@ -733,74 +744,57 @@ void dMenu_Letter_c::read_close_move() { } } -/* 803969C8-803969F8 023028 0030+00 2/2 0/0 0/0 .rodata tag_sub0$4610 */ -static const u64 tag_sub0[6] = { - 'menu_t0s', 'menu_t1s', 'menu_t2s', 'menu_t3s', 'menu_t4s', 'menu_t5s', -}; - -/* 803969F8-80396A28 023058 0030+00 0/1 0/0 0/0 .rodata tag_sub1$4611 */ -static const u64 tag_sub1[6] = { - 'menu_t0', 'menu_t1', 'menu_t2', 'menu_t3', 'menu_t4', 'menu_t5', -}; - -/* 80396A28-80396A58 023088 0030+00 0/1 0/0 0/0 .rodata tag_name0$4612 */ -static const u64 tag_name0[6] = { - 'menu_t6s', 'menu_f7s', 'menu_f8s', 'menu_t9s', 'menu_10s', 'menu_11s', -}; - -/* 80396A58-80396A88 0230B8 0030+00 0/1 0/0 0/0 .rodata tag_name1$4613 */ -static const u64 tag_name1[6] = { - 'menu_f6', 'menu_f7', 'menu_t8', 'menu_t9', 'menu_t10', 'menu_t11', -}; - -/* 80396A88-80396AB8 0230E8 0030+00 0/1 0/0 0/0 .rodata ftag_sub0$4614 */ -static const u64 ftag_sub0[6] = { - 'fenu_t0s', 'fenu_t1s', 'fenu_t2s', 'fenu_t3s', 'fenu_t4s', 'fenu_t5s', -}; - -/* 80396AB8-80396AE8 023118 0030+00 0/1 0/0 0/0 .rodata ftag_sub1$4615 */ -static const u64 ftag_sub1[6] = { - 'fenu_t0', 'fenu_t1', 'fenu_t2', 'fenu_t3', 'fenu_t4', 'fenu_t5', -}; - -/* 80396AE8-80396B18 023148 0030+00 0/1 0/0 0/0 .rodata ftag_name0$4616 */ -static const u64 ftag_name0[6] = { - 'fenu_t6s', 'fenu_t7s', 'fenu_f8s', 'fenu_t9s', 'fenu_10s', 'fenu_11s', -}; - -/* 80396B18-80396B48 023178 0030+00 0/1 0/0 0/0 .rodata ftag_name1$4617 */ -static const u64 ftag_name1[6] = { - 'fenu_t6', 'fenu_t7', 'fenu_t8', 'fenu_t9', 'fenu_t10', 'fenu_t11', -}; - -/* 80396B48-80396B78 0231A8 0030+00 0/1 0/0 0/0 .rodata tag_letter$4628 */ -static const u64 tag_letter[6] = { - 'let_00_n', 'let_01_n', 'let_02_n', 'let_03_n', 'let_04_n', 'let_05_n', -}; - -/* 80396B78-80396BA8 0231D8 0030+00 0/1 0/0 0/0 .rodata tag_frame$4635 */ -static const u64 tag_frame[6] = { - 'flame_00', 'flame_01', 'flame_02', 'flame_03', 'flame_04', 'flame_05', -}; - -/* 80396BA8-80396BD8 023208 0030+00 0/1 0/0 0/0 .rodata tag_menu0$4636 */ -static const u64 tag_menu0[6] = { - 'fenu_t0', 'fenu_t1', 'fenu_t2', 'fenu_t3', 'fenu_t4', 'fenu_t5', -}; - -/* 80396BD8-80396C08 023238 0030+00 0/1 0/0 0/0 .rodata tag_menu1$4637 */ -static const u64 tag_menu1[6] = { - 'fenu_t6', 'fenu_t7', 'fenu_t8', 'fenu_t9', 'fenu_t10', 'fenu_t11', -}; - -/* 80396C08-80396C38 023268 0030+00 0/1 0/0 0/0 .rodata tag_midoku$4638 */ -static const u64 tag_midoku[6] = { - 'midoku_0', 'midoku_1', 'midoku_2', 'midoku_3', 'midoku_4', 'midoku_5', -}; - /* 801DF010-801DFA28 1D9950 0A18+00 1/1 0/0 0/0 .text screenSetMenu__14dMenu_Letter_cFv */ void dMenu_Letter_c::screenSetMenu() { + static const u64 tag_sub0[6] = { + 'menu_t0s', 'menu_t1s', 'menu_t2s', 'menu_t3s', 'menu_t4s', 'menu_t5s', + }; + static const u64 tag_sub1[6] = { + 'menu_t0', 'menu_t1', 'menu_t2', 'menu_t3', 'menu_t4', 'menu_t5', + }; + static const u64 tag_name0[6] = { + 'menu_t6s', 'menu_f7s', 'menu_f8s', 'menu_t9s', 'menu_10s', 'menu_11s', + }; + static const u64 tag_name1[6] = { + 'menu_f6', 'menu_f7', 'menu_t8', 'menu_t9', 'menu_t10', 'menu_t11', + }; + static const u64 ftag_sub0[6] = { + 'fenu_t0s', 'fenu_t1s', 'fenu_t2s', 'fenu_t3s', 'fenu_t4s', 'fenu_t5s', + }; + static const u64 ftag_sub1[6] = { + 'fenu_t0', 'fenu_t1', 'fenu_t2', 'fenu_t3', 'fenu_t4', 'fenu_t5', + }; + static const u64 ftag_name0[6] = { + 'fenu_t6s', 'fenu_t7s', 'fenu_f8s', 'fenu_t9s', 'fenu_10s', 'fenu_11s', + }; + static const u64 ftag_name1[6] = { + 'fenu_t6', 'fenu_t7', 'fenu_t8', 'fenu_t9', 'fenu_t10', 'fenu_t11', + }; + static const u64 tag_letter[6] = { + 'let_00_n', 'let_01_n', 'let_02_n', 'let_03_n', 'let_04_n', 'let_05_n', + }; + static const u64 tag_frame[6] = { + 'flame_00', 'flame_01', 'flame_02', 'flame_03', 'flame_04', 'flame_05', + }; + static const u64 tag_menu0[6] = { +#if VERSION == VERSION_GCN_JPN + 'menu_t0', 'menu_t1', 'menu_t2', 'menu_t3', 'menu_t4', 'menu_t5', +#else + 'fenu_t0', 'fenu_t1', 'fenu_t2', 'fenu_t3', 'fenu_t4', 'fenu_t5', +#endif + }; + static const u64 tag_menu1[6] = { +#if VERSION == VERSION_GCN_JPN + 'menu_f6', 'menu_f7', 'menu_t8', 'menu_t9', 'menu_t10', 'menu_t11', +#else + 'fenu_t6', 'fenu_t7', 'fenu_t8', 'fenu_t9', 'fenu_t10', 'fenu_t11', +#endif + }; + static const u64 tag_midoku[6] = { + 'midoku_0', 'midoku_1', 'midoku_2', 'midoku_3', 'midoku_4', 'midoku_5', + }; + mpMenuScreen = new J2DScreen(); JUT_ASSERT(1146, mpMenuScreen != 0); bool fg = mpMenuScreen->setPriority("zelda_letter_select_6menu.blo", 0x20000, mpArchive); @@ -810,6 +804,16 @@ void dMenu_Letter_c::screenSetMenu() { JUT_ASSERT(1161, mpParent[0] != 0); mpParent[0]->setAlphaRate(0.0f); for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); + field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); + field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); + field_0x124[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]); + mpMenuScreen->search(ftag_sub0[i])->hide(); + mpMenuScreen->search(ftag_sub1[i])->hide(); + mpMenuScreen->search(ftag_name0[i])->hide(); + mpMenuScreen->search(ftag_name1[i])->hide(); +#else field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]); field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]); field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]); @@ -818,6 +822,7 @@ void dMenu_Letter_c::screenSetMenu() { mpMenuScreen->search(tag_sub1[i])->hide(); mpMenuScreen->search(tag_name0[i])->hide(); mpMenuScreen->search(tag_name1[i])->hide(); +#endif for (int j = 0; j < 4; j++) { field_0x124[i][j]->setFont(mDoExt_getMesgFont()); field_0x124[i][j]->setString(0x40, ""); @@ -870,6 +875,16 @@ void dMenu_Letter_c::screenSetMenu() { mpDMYParent = new CPaneMgr(mpMenuDMYScreen, 'n_all', 2, NULL); JUT_ASSERT(1285, mpDMYParent != 0); for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub0[i]); + field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub1[i]); + field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name0[i]); + field_0x184[i][3] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name1[i]); + mpMenuDMYScreen->search(ftag_sub0[i])->hide(); + mpMenuDMYScreen->search(ftag_sub1[i])->hide(); + mpMenuDMYScreen->search(ftag_name0[i])->hide(); + mpMenuDMYScreen->search(ftag_name1[i])->hide(); +#else field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub0[i]); field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub1[i]); field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_name0[i]); @@ -878,6 +893,7 @@ void dMenu_Letter_c::screenSetMenu() { mpMenuDMYScreen->search(tag_sub1[i])->hide(); mpMenuDMYScreen->search(tag_name0[i])->hide(); mpMenuDMYScreen->search(tag_name1[i])->hide(); +#endif for (int j = 0; j < 4; j = j + 1) { field_0x184[i][j]->setFont(mDoExt_getMesgFont()); field_0x184[i][j]->setString(0x40, ""); @@ -892,26 +908,21 @@ void dMenu_Letter_c::screenSetMenu() { } } -//* 80396C38-80396C80 023298 0048+00 0/1 0/0 0/0 .rodata tag_pip$4827 */ -static const u64 tag_pip[9] = { - 'pi_00_n', 'pi_01_n', 'pi_02_n', 'pi_03_n', 'pi_04_n', - 'pi_05_n', 'pi_06_n', 'pi_07_n', 'pi_08_n', -}; - -/* 80396C80-80396CC8 0232E0 0048+00 0/1 0/0 0/0 .rodata tag_pil$4828 */ -static const u64 tag_pil[9] = { - 'pi_l_00', 'pi_l_01', 'pi_l_02', 'pi_l_03', 'pi_l_04', - 'pi_l_05', 'pi_l_06', 'pi_l_07', 'pi_l_08', -}; - -/* 80396CC8-80396D10 023328 0048+00 0/1 0/0 0/0 .rodata tag_pii$4829 */ -static const u64 tag_pii[9] = { - 'pi_00', 'pi_01', 'pi_02', 'pi_03', 'pi_04', 'pi_05', 'pi_06', 'pi_07', 'pi_08', -}; - /* 801DFA58-801E0330 1DA398 08D8+00 1/1 0/0 0/0 .text screenSetBase__14dMenu_Letter_cFv */ void dMenu_Letter_c::screenSetBase() { + static const u64 tag_pip[9] = { + 'pi_00_n', 'pi_01_n', 'pi_02_n', 'pi_03_n', 'pi_04_n', + 'pi_05_n', 'pi_06_n', 'pi_07_n', 'pi_08_n', + }; + static const u64 tag_pil[9] = { + 'pi_l_00', 'pi_l_01', 'pi_l_02', 'pi_l_03', 'pi_l_04', + 'pi_l_05', 'pi_l_06', 'pi_l_07', 'pi_l_08', + }; + static const u64 tag_pii[9] = { + 'pi_00', 'pi_01', 'pi_02', 'pi_03', 'pi_04', 'pi_05', 'pi_06', 'pi_07', 'pi_08', + }; + mpBaseScreen = new J2DScreen(); JUT_ASSERT(1357, mpBaseScreen != 0); bool fg = mpBaseScreen->setPriority("zelda_letter_select_base.blo", 0x20000, mpArchive); @@ -921,12 +932,27 @@ void dMenu_Letter_c::screenSetBase() { mpParent[1] = new CPaneMgr(mpBaseScreen, 'n_all', 2, NULL); JUT_ASSERT(1372, mpParent[1] != 0); mpParent[1]->setAlphaRate(0.0f); +#if VERSION == VERSION_GCN_JPN + J2DTextBox* piVar9 = (J2DTextBox*)mpBaseScreen->search('t_t00'); + mpBaseScreen->search('f_t_00')->hide(); +#else J2DTextBox* piVar9 = (J2DTextBox*)mpBaseScreen->search('f_t_00'); - mpBaseScreen->search('t_t00')->hide(); + mpBaseScreen->search('t_t00')->hide(); +#endif piVar9->setString(0x40, ""); piVar9->setFont(mDoExt_getSubFont()); dComIfGp_setMessageCountNumber(field_0x374 + (field_0x36f + 1) * 100); mpString->getString(0x4d6, piVar9, NULL, NULL, NULL, 0); +#if VERSION == VERSION_GCN_JPN + J2DTextBox* text1 = (J2DTextBox*)mpBaseScreen->search('wps_text'); + J2DTextBox* text2 = (J2DTextBox*)mpBaseScreen->search('w_p_text'); + J2DTextBox* text3 = (J2DTextBox*)mpBaseScreen->search('g_ps_txt'); + J2DTextBox* text4 = (J2DTextBox*)mpBaseScreen->search('g_p_text'); + mpBaseScreen->search('fwpstex1')->hide(); + mpBaseScreen->search('fwp_tex1')->hide(); + mpBaseScreen->search('fgps_tx1')->hide(); + mpBaseScreen->search('fgp_tex1')->hide(); +#else J2DTextBox* text1 = (J2DTextBox*)mpBaseScreen->search('fwpstex1'); J2DTextBox* text2 = (J2DTextBox*)mpBaseScreen->search('fwp_tex1'); J2DTextBox* text3 = (J2DTextBox*)mpBaseScreen->search('fgps_tx1'); @@ -935,6 +961,7 @@ void dMenu_Letter_c::screenSetBase() { mpBaseScreen->search('w_p_text')->hide(); mpBaseScreen->search('g_ps_txt')->hide(); mpBaseScreen->search('g_p_text')->hide(); +#endif text1->setString(0x40, ""); text2->setString(0x40, ""); text3->setString(0x40, ""); @@ -997,15 +1024,77 @@ void dMenu_Letter_c::screenSetShadow() { /* 801E03D8-801E09A8 1DAD18 05D0+00 1/1 0/0 0/0 .text screenSetLetter__14dMenu_Letter_cFv */ void dMenu_Letter_c::screenSetLetter() { - static u64 const line_tag[12] = { - 'line09', 'line10', 'line11', 'line12', 'line13', 'line14', - 'line15', 'line16', 'line17', 'line18', 'line19', 'line20', - }; mpLetterScreen[0] = new J2DScreen(); JUT_ASSERT(1507, mpLetterScreen[0] != 0); bool fg = mpLetterScreen[0]->setPriority("zelda_letter_window_base.blo", 0x20000, mpArchive); JUT_ASSERT(1511, fg != false); dPaneClass_showNullPane(mpLetterScreen[0]); + +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + field_0x2ec[0] = new CPaneMgr(mpLetterScreen[0], 't3f_s', 0, NULL); + field_0x2ec[1] = new CPaneMgr(mpLetterScreen[0], 'mg_3flin', 0, NULL); + field_0x2f4[0] = new CPaneMgr(mpLetterScreen[0], 'mg_3f_s', 0, NULL); + field_0x2f4[1] = new CPaneMgr(mpLetterScreen[0], 'mg_3f', 0, NULL); + mpLetterScreen[0]->search('t4_s')->hide(); + mpLetterScreen[0]->search('mg_e4lin')->hide(); + mpLetterScreen[0]->search('t3_s')->hide(); + mpLetterScreen[0]->search('mg_3line')->hide(); + mpLineParent = new CPaneMgr(mpLetterScreen[0], 'jp_fri_n', 0, NULL); + JUT_ASSERT(1530, mpLineParent != 0); + for (int i = 0; i < 12; i++) { + static u64 const line_tag[12] = { + 'line00', 'line01', 'line02', 'line03', 'line04', 'line05', + 'line06', 'line07', 'line08', + }; + + if (line_tag[i] != 0) { + field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]); + } else { + field_0x25c[i] = NULL; + } + } + mpLetterScreen[0]->search('jp_n')->hide(); + mpLetterScreen[0]->search('us_n')->hide(); + + ((J2DTextBox*)field_0x2f4[0]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[0]->getPanePtr())->getLineSpace()); + ((J2DTextBox*)field_0x2f4[1]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[1]->getPanePtr())->getLineSpace()); + } else { + field_0x2ec[0] = new CPaneMgr(mpLetterScreen[0], 't3_s', 0, NULL); + field_0x2ec[1] = new CPaneMgr(mpLetterScreen[0], 'mg_3line', 0, NULL); + for (int i = 0; i < 2; i++) { + field_0x2f4[i] = NULL; + } + mpLetterScreen[0]->search('t4_s')->hide(); + mpLetterScreen[0]->search('mg_e4lin')->hide(); + mpLetterScreen[0]->search('t3f_s')->hide(); + mpLetterScreen[0]->search('mg_3flin')->hide(); + mpLetterScreen[0]->search('mg_3f_s')->hide(); + mpLetterScreen[0]->search('mg_3f')->hide(); + mpLineParent = new CPaneMgr(mpLetterScreen[0], 'jp_n', 0, NULL); + JUT_ASSERT(1530, mpLineParent != 0); + for (int i = 0; i < 12; i++) { + static u64 const line_tag[12] = { + 'line21', 'line22', 'line23', 'line24', 'line25', 'line26', + 'line27', 'line28', 'line29', + }; + + if (line_tag[i] != 0) { + field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]); + } else { + field_0x25c[i] = NULL; + } + } + + mpLetterScreen[0]->search('jp_fri_n')->hide(); + mpLetterScreen[0]->search('us_n')->hide(); + } +#else + static u64 const line_tag[12] = { + 'line09', 'line10', 'line11', 'line12', 'line13', 'line14', + 'line15', 'line16', 'line17', 'line18', 'line19', 'line20', + }; + field_0x2ec[0] = new CPaneMgr(mpLetterScreen[0], 't4_s', 0, NULL); field_0x2ec[1] = new CPaneMgr(mpLetterScreen[0], 'mg_e4lin', 0, NULL); for (int i = 0; i < 2; i++) { @@ -1028,12 +1117,22 @@ void dMenu_Letter_c::screenSetLetter() { } mpLetterScreen[0]->search('jp_fri_n')->hide(); mpLetterScreen[0]->search('jp_n')->hide(); +#endif + for (int i = 0; i < 2; i++) { ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x200, ""); +#endif if (field_0x2f4[i] != NULL) { ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x200, ""); +#endif } } field_0x1e4[0] = (J2DTextBox*)mpLetterScreen[0]->search('p_texts'); @@ -1060,19 +1159,16 @@ void dMenu_Letter_c::screenSetLetter() { mpBlackTex->setAlpha(0); } -/* 80396D70-80396D98 0233D0 0028+00 1/1 0/0 0/0 .rodata text_a_tag$5024 */ -static const u64 text_a_tag[5] = { - 'atext1_1', 'atext1_2', 'atext1_3', 'atext1_4', 'atext1_5', -}; - -/* 80396D98-80396DC0 0233F8 0028+00 1/1 0/0 0/0 .rodata text_b_tag$5025 */ -static const u64 text_b_tag[5] = { - 'btext1_1', 'btext1_2', 'btext1_3', 'btext1_4', 'btext1_5', -}; - /* 801E09A8-801E0B24 1DB2E8 017C+00 1/1 0/0 0/0 .text screenSetDoIcon__14dMenu_Letter_cFv */ void dMenu_Letter_c::screenSetDoIcon() { + static const u64 text_a_tag[5] = { + 'atext1_1', 'atext1_2', 'atext1_3', 'atext1_4', 'atext1_5', + }; + static const u64 text_b_tag[5] = { + 'btext1_1', 'btext1_2', 'btext1_3', 'btext1_4', 'btext1_5', + }; + mpIconScreen = new J2DScreen(); mpIconScreen->setPriority("zelda_collect_soubi_do_icon_parts.blo", 0x20000, mpArchive); for (int i = 0; i < 2; i++) { diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index 3796b2c17b6..bd7357eb00d 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -26,7 +26,11 @@ typedef void (dMenu_Option_c::*initFunc)(); static initFunc init[] = { - &dMenu_Option_c::atten_init, &dMenu_Option_c::vib_init, + &dMenu_Option_c::atten_init, +#if VERSION == VERSION_GCN_JPN + &dMenu_Option_c::ruby_init, +#endif + &dMenu_Option_c::vib_init, &dMenu_Option_c::sound_init, &dMenu_Option_c::change_init, &dMenu_Option_c::confirm_open_init, &dMenu_Option_c::confirm_move_init, &dMenu_Option_c::confirm_select_init, &dMenu_Option_c::confirm_close_init, @@ -34,7 +38,11 @@ static initFunc init[] = { typedef void (dMenu_Option_c::*processFunc)(); static processFunc process[] = { - &dMenu_Option_c::atten_move, &dMenu_Option_c::vib_move, + &dMenu_Option_c::atten_move, +#if VERSION == VERSION_GCN_JPN + &dMenu_Option_c::ruby_move, +#endif + &dMenu_Option_c::vib_move, &dMenu_Option_c::sound_move, &dMenu_Option_c::change_move, &dMenu_Option_c::confirm_open_move, &dMenu_Option_c::confirm_move_move, &dMenu_Option_c::confirm_select_move, &dMenu_Option_c::confirm_close_move, @@ -56,14 +64,38 @@ static calibrationFunc calibration_process[] = { // Unclear why this is created #pragma push #pragma force_active on -static u8 calibration_padding[36 /* padding */] = { +#if VERSION == VERSION_GCN_JPN +static u8 calibration_padding[0x24 /* padding */] = { /* padding */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#else +static u8 calibration_padding[0x24 /* padding */] = { + /* padding */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif #pragma pop +enum SelectType { +#if VERSION == VERSION_GCN_JPN + SelectType0_JPN, +#endif + SelectType0, + SelectType1, + SelectType2, + SelectType3, + SelectType4, + SelectType5, + SelectType6, + SelectType7, + SelectType8, +}; + /* 801E1F10-801E2014 1DC850 0104+00 0/0 2/2 0/0 .text * __ct__14dMenu_Option_cFP10JKRArchiveP9STControl */ dMenu_Option_c::dMenu_Option_c(JKRArchive* i_archive, STControl* i_stick) { @@ -424,9 +456,9 @@ void dMenu_Option_c::_move() { field_0x3ea = 0; } if (mDoGph_gInf_c::getFader()->getStatus() == 1) { - if (mDoCPd_c::getTrigA(PAD_1) != 0 && field_0x3ef != 3 && field_0x3f3 == 5) { - if (field_0x3f4 == 5 && field_0x3ef != 4 && field_0x3ef != 5 && field_0x3ef != 6 && - field_0x3ef != 7) + if (mDoCPd_c::getTrigA(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5) { + if (field_0x3f4 == 5 && field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && + field_0x3ef != SelectType7) { if (mDoCPd_c::getTrigStart(PAD_1) == 0 && mDoCPd_c::getTrigB(PAD_1) == 0) { if (mDoCPd_c::getTrigUp(PAD_1) == 0 && mDoCPd_c::getTrigDown(PAD_1) == 0 && @@ -434,7 +466,7 @@ void dMenu_Option_c::_move() { { field_0x3f7 = 1; field_0x3f5 = field_0x3ef; - field_0x3ef = 4; + field_0x3ef = SelectType4; dMeter2Info_set2DVibration(); (this->*init[field_0x3ef])(); goto skip; @@ -442,8 +474,8 @@ void dMenu_Option_c::_move() { } } } - if (mDoCPd_c::getTrigB(PAD_1) != 0 && field_0x3ef != 3 && field_0x3f3 == 5 && - field_0x3ef != 4 && field_0x3ef != 5 && field_0x3ef != 6 && field_0x3ef != 7) + if (mDoCPd_c::getTrigB(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5 && + field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && field_0x3ef != SelectType7) { if (field_0x3f4 == 5 && mDoCPd_c::getTrigStart(PAD_1) == 0 && mDoCPd_c::getTrigA(PAD_1) == 0 && mDoCPd_c::getTrigUp(PAD_1) == 0 && @@ -452,7 +484,7 @@ void dMenu_Option_c::_move() { { field_0x3f7 = 0; field_0x3f5 = field_0x3ef; - field_0x3ef = 4; + field_0x3ef = SelectType4; dMeter2Info_set2DVibration(); (this->*init[field_0x3ef])(); } @@ -460,7 +492,7 @@ void dMenu_Option_c::_move() { } skip: u8 oldValue = field_0x3ef; - if (field_0x3f3 == 5 && oldValue != 4 && oldValue != 5 && oldValue != 6 && oldValue != 7) { + if (field_0x3f3 == 5 && oldValue != SelectType4 && oldValue != SelectType5 && oldValue != SelectType6 && oldValue != SelectType7) { dpdMenuMove(); } field_0x3f2 = 0; @@ -515,8 +547,8 @@ void dMenu_Option_c::drawHaihai() { field_0x3f6 = 0; field_0x3f6 |= 1; field_0x3f6 |= 4; - if (selectType < 4 && field_0x3f6 != 0 && field_0x3f3 == 5 && field_0x3ef != 4 && - field_0x3ef != 5 && field_0x3ef != 6 && field_0x3ef != 7) + if (selectType < SelectType4 && field_0x3f6 != 0 && field_0x3f3 == 5 && field_0x3ef != SelectType4 && + field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && field_0x3ef != SelectType7) { mpMeterHaihai->_execute(0); Vec haihaiPosL = @@ -675,7 +707,7 @@ void dMenu_Option_c::atten_move() { field_0x3e4 = 0; field_0x3da = -5; } - field_0x3ef = 3; + field_0x3ef = SelectType3; field_0x3f5 = 0; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (rightTrigger) { @@ -686,7 +718,7 @@ void dMenu_Option_c::atten_move() { field_0x3e4 = 0; field_0x3da = 5; } - field_0x3ef = 3; + field_0x3ef = SelectType3; field_0x3f5 = 0; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { @@ -694,10 +726,61 @@ void dMenu_Option_c::atten_move() { } } +#if VERSION == VERSION_GCN_JPN +void dMenu_Option_c::ruby_init() { + mpDrawCursor->setAlphaRate(1.0f); + setCursorPos(1); + setAButtonString(0x40c); + setBButtonString(0x3f9); +} + +void dMenu_Option_c::ruby_move() { + + bool upTrigger = mpStick->checkUpTrigger(); + bool downTrigger= mpStick->checkDownTrigger(); + bool leftTrigger = checkLeftTrigger(); + bool rightTrigger = checkRightTrigger(); + + if (field_0x3f3 != 5) { + (this->*tv_process[field_0x3f3])(); + } else if (upTrigger) { + field_0x3ef = SelectType0_JPN; + Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } else if (downTrigger) { + field_0x3ef = SelectType1; + Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } else if (leftTrigger) { + if (field_0x3e5_JPN == 0) { + field_0x3e5_JPN = 1; + field_0x3da = -5; + } else if (field_0x3e5_JPN == 1) { + field_0x3e5_JPN = 0; + field_0x3da = -5; + } + field_0x3ef = SelectType3; + field_0x3f5 = SelectType0; + Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } else if (rightTrigger) { + if (field_0x3e5_JPN == 0) { + field_0x3e5_JPN = 1; + field_0x3da = 5; + } else if (field_0x3e5_JPN == 1) { + field_0x3e5_JPN = 0; + field_0x3da = 5; + } + field_0x3ef = SelectType3; + field_0x3f5 = SelectType0; + Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + } else { + changeTVCheck(); + } +} +#endif + /* 801E41A0-801E41F8 1DEAE0 0058+00 1/0 0/0 0/0 .text vib_init__14dMenu_Option_cFv */ void dMenu_Option_c::vib_init() { mpDrawCursor->setAlphaRate(1.0f); - setCursorPos(1); + setCursorPos(SelectType1); setAButtonString(0x40C); setBButtonString(0x3F9); } @@ -712,10 +795,10 @@ void dMenu_Option_c::vib_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (upTrigger) { - field_0x3ef = 0; + field_0x3ef = SelectType0; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (downTrigger) { - field_0x3ef = 2; + field_0x3ef = SelectType2; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (isRumbleSupported()) { @@ -727,8 +810,8 @@ void dMenu_Option_c::vib_move() { field_0x3ea = 0; field_0x3da = -5; } - field_0x3ef = 3; - field_0x3f5 = 1; + field_0x3ef = SelectType3; + field_0x3f5 = SelectType1; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -742,8 +825,8 @@ void dMenu_Option_c::vib_move() { field_0x3ea = 0; field_0x3da = 5; } - field_0x3ef = 3; - field_0x3f5 = 1; + field_0x3ef = SelectType3; + field_0x3f5 = SelectType1; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -755,7 +838,7 @@ void dMenu_Option_c::vib_move() { /* 801E4488-801E44E0 1DEDC8 0058+00 1/0 0/0 0/0 .text sound_init__14dMenu_Option_cFv */ void dMenu_Option_c::sound_init() { mpDrawCursor->setAlphaRate(1.0f); - setCursorPos(2); + setCursorPos(SelectType2); setAButtonString(0x40C); setBButtonString(0x3F9); } @@ -770,7 +853,7 @@ void dMenu_Option_c::sound_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (upTrigger) { - field_0x3ef = 1; + field_0x3ef = SelectType1; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (field_0x3e9 == 2) { @@ -795,8 +878,8 @@ void dMenu_Option_c::sound_move() { } Z2AudioMgr::mAudioMgrPtr->setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); - field_0x3ef = 3; - field_0x3f5 = 2; + field_0x3ef = SelectType3; + field_0x3f5 = SelectType2; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (rightTrigger) { if (field_0x3e9 == 0) { @@ -821,8 +904,8 @@ void dMenu_Option_c::sound_move() { } Z2AudioMgr::mAudioMgrPtr->setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); - field_0x3ef = 3; - field_0x3f5 = 2; + field_0x3ef = SelectType3; + field_0x3f5 = SelectType2; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { changeTVCheck(); @@ -846,20 +929,32 @@ void dMenu_Option_c::change_move() { } u8 index; switch (field_0x3f5) { - case 0: - index = 0; +#if VERSION == VERSION_GCN_JPN + case SelectType0_JPN: + index = SelectType0_JPN; if (field_0x3da == 0) { setAttenString(); } break; - case 1: - index = 1; +#endif + case SelectType0: + index = SelectType0; + if (field_0x3da == 0) { +#if VERSION == VERSION_GCN_JPN + setRubyString(); +#else + setAttenString(); +#endif + } + break; + case SelectType1: + index = SelectType1; if (field_0x3da == 0) { setVibString(); } break; - case 2: - index = 2; + case SelectType2: + index = SelectType2; if (field_0x3da == 0) { setSoundString(); } @@ -927,7 +1022,7 @@ void dMenu_Option_c::confirm_open_move() { } if (status == 1 && yesNoMenuMove == 1 && field_0x374 == 1.0f) { yesnoCursorShow(); - field_0x3ef = 5; + field_0x3ef = SelectType5; } mpWarning->_move(); setAnimation(); @@ -946,12 +1041,12 @@ void dMenu_Option_c::confirm_move_move() { if (mDoCPd_c::getTrigA(PAD_1) != 0) { yesNoSelectStart(); - field_0x3ef = 7; + field_0x3ef = SelectType7; dMeter2Info_set2DVibrationM(); } else if (mDoCPd_c::getTrigB(PAD_1) != 0) { field_0x3f9 = 0; yesnoCancelAnmSet(); - field_0x3ef = 7; + field_0x3ef = SelectType7; dMeter2Info_set2DVibrationM(); } else if (rightTrigger != 0) { if (field_0x3f9 != 0) { @@ -960,7 +1055,7 @@ void dMenu_Option_c::confirm_move_move() { field_0x3fa = field_0x3f9; field_0x3f9 = 0; yesnoSelectAnmSet(); - field_0x3ef = 6; + field_0x3ef = SelectType6; } } else if (leftTrigger != 0) { if (field_0x3f9 != 1) { @@ -969,7 +1064,7 @@ void dMenu_Option_c::confirm_move_move() { field_0x3fa = field_0x3f9; field_0x3f9 = 1; yesnoSelectAnmSet(); - field_0x3ef = 6; + field_0x3ef = SelectType6; } } mpWarning->_move(); @@ -987,7 +1082,7 @@ void dMenu_Option_c::confirm_select_move() { if (selectMoveAnm == 1 && wakuAlphaAnm == 1) { yesnoCursorShow(); - field_0x3ef = 5; + field_0x3ef = SelectType5; } mpWarning->_move(); setAnimation(); @@ -1018,6 +1113,13 @@ void dMenu_Option_c::confirm_close_move() { if (field_0x3f9 == 1) { mQuitStatus = 3; dComIfGs_setOptAttentionType(field_0x3e4); +#if VERSION == VERSION_GCN_JPN + if (field_0x3e5_JPN == 0) { + dComIfGs_setOptUnk0(1); + } else { + dComIfGs_setOptUnk0(0); + } +#endif if (isRumbleSupported()) { dComIfGs_setOptVibration(field_0x3ea); } @@ -1145,7 +1247,7 @@ void dMenu_Option_c::calibration_close2_move() { /* 801E5494-801E54F8 1DFDD4 0064+00 1/1 0/0 0/0 .text menuVisible__14dMenu_Option_cFv */ void dMenu_Option_c::menuVisible() { for (int i = 0; i < 6; i++) { - if (i < 3) { + if (i < SelectType3) { menuShow(i); } else { menuHide(i); @@ -1198,9 +1300,15 @@ void dMenu_Option_c::screenSet() { static const u64 tag_frame[6] = { 'flame_00', 'flame_01', 'flame_02', 'flame_03', 'flame_04', 'flame_05', }; +#if VERSION == VERSION_GCN_JPN + static const u64 tag_menu0[6] = { + 'menu_t0', 'menu_t1', 'menu_t2', 'menu_t3', 'menu_t4', 'menu_t5', + }; +#else static const u64 tag_menu0[6] = { 'fenu_t0', 'fenu_t1', 'fenu_t2', 'fenu_t3', 'fenu_t4', 'fenu_t5', }; +#endif static const u64 let_n[6] = { 'let_00_n', 'let_01_n', 'let_02_n', 'let_03_n', 'let_04_n', 'let_05_n', }; @@ -1240,6 +1348,20 @@ void dMenu_Option_c::screenSet() { static const u64 ftv_btnA[5] = { 'font_a1', 'font_at2', 'font_at3', 'font_at4', 'font_at', }; +#if VERSION == VERSION_GCN_JPN + static const u64 fenu_t0[2] = {'fenu_t0s', 'fenu_t0'}; + static const u64 menu_t0[2] = {'menu_t0s', 'menu_t0'}; + static const u64 fenu_t1[2] = {'fenu_t1s', 'fenu_t1'}; + static const u64 menu_t1[2] = {'menu_t1s', 'menu_t1'}; + static const u64 fenu_t2[2] = {'fenu_t2s', 'fenu_t2'}; + static const u64 menu_t2[2] = {'menu_t2s', 'menu_t2'}; + static const u64 fenu_t3[2] = {'fenu_t3s', 'fenu_t3'}; + static const u64 menu_t3[2] = {'menu_t3s', 'menu_t3'}; + static const u64 fenu_t4[2] = {'fenu_t4s', 'fenu_t4'}; + static const u64 menu_t4[2] = {'menu_t4s', 'menu_t4'}; + static const u64 fenu_t5[2] = {'fenu_t5s', 'fenu_t5'}; + static const u64 menu_t5[2] = {'menu_t5s', 'menu_t5'}; +#else static const u64 fenu_t0[2] = {'fenu_t0s', 'fenu_t0'}; static const u64 menu_t0[2] = {'menu_t0s', 'menu_t0'}; static const u64 fenu_t2[2] = {'fenu_t1s', 'fenu_t1'}; @@ -1252,6 +1374,7 @@ void dMenu_Option_c::screenSet() { static const u64 menu_t1[2] = {'menu_t4s', 'menu_t4'}; static const u64 fenu_t5[2] = {'fenu_t5s', 'fenu_t5'}; static const u64 menu_t5[2] = {'menu_t5s', 'menu_t5'}; +#endif static const u64 menut_0[6] = { 'menut0as', 'menut0a', 'menut0a2', 'menut0a1', 'menut0a4', 'menut0a3', }; @@ -1282,19 +1405,32 @@ void dMenu_Option_c::screenSet() { static const u64 fenut_4[6] = { 'menut321', 'menut320', 'menut319', 'menut318', 'menut317', 'menut316', }; +#if VERSION == VERSION_GCN_JPN + static const u64 tx[6] = { + 'wps_text', 'w_p_text', 'g_ps_tx3', 'g_p_tex3', 'wps_tex1', 'w_p_tex1', + }; +#else static const u64 tx[6] = { 'w_p_tex5', 'w_p_tex6', 'w_p_tex3', 'w_p_tex4', 'fps_tex1', 'f_p_tex1', }; +#endif static const u64 op_tx[4] = { 'w_text_n', 'w_btn_n', 'w_k_t_n', 'w_abtn_n', }; static const u64 z_tx[3] = { 'z_gc_n', 0, 0, }; +#if VERSION == VERSION_GCN_JPN + static const u64 txTV[10] = { + 'menu_t6s', 'menu_t6', 'menu_t9s', 'menu_t9', 'menut10s', + 'menu_t10', 'menu_t7s', 'menu_t7', 'menu_t8s', 'menu_t8', + }; +#else static const u64 txTV[10] = { 'menu_t61', 'menu_t2', 'menu_t91', 'menu_t1', 'menut101', 'menu_t01', 'menu_t71', 'menu_t3', 'menu_t81', 'menu_t4', }; +#endif mpTitle = new CPaneMgr(mpBackScreen, 'title_n', 0, NULL); Vec pos = mpTitle->getGlobalVtxCenter(mpTitle->mPane, false, 0); @@ -1368,12 +1504,21 @@ void dMenu_Option_c::screenSet() { mpMenuPane32[i] = NULL; } } +#if VERSION == VERSION_GCN_JPN + field_0x270[0] = (J2DTextBox*)mpBackScreen->search('t_t00'); + field_0x270[1] = (J2DTextBox*)mpBackScreen->search('t_t01'); + mpBackScreen->search('f_t00')->hide(); + mpBackScreen->search('t_t01')->hide(); + field_0x270[2] = (J2DTextBox*)mpTVScreen->search('t_t00'); + mpTVScreen->search('f_t00')->hide(); +#else field_0x270[0] = (J2DTextBox*)mpBackScreen->search('f_t00'); field_0x270[1] = (J2DTextBox*)mpBackScreen->search('t_t01'); mpBackScreen->search('t_t00')->hide(); mpBackScreen->search('t_t01')->hide(); field_0x270[2] = (J2DTextBox*)mpTVScreen->search('f_t00'); mpTVScreen->search('t_t00')->hide(); +#endif for (int i = 0; i < 3; i++) { field_0x270[i]->setFont(mDoExt_getRubyFont()); field_0x270[i]->setString(0x40, ""); @@ -1382,91 +1527,167 @@ void dMenu_Option_c::screenSet() { mpString->getString(0x547, field_0x270[1], NULL, NULL, NULL, 0); mpString->getString(0x55C, field_0x270[2], NULL, NULL, NULL, 0); for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(tv_btnA[i]); + mpTVScreen->search(ftv_btnA[i])->hide(); +#else field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(ftv_btnA[i]); mpTVScreen->search(tv_btnA[i])->hide(); +#endif field_0x25c[i]->setFont(mDoExt_getMesgFont()); field_0x25c[i]->setString(0x40, ""); mpString->getString(0x564, field_0x25c[i], NULL, NULL, NULL, 0); } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[0][i] = (J2DTextBox*)mpScreen->search(menu_t0[i]); + mpScreen->search(fenu_t0[i])->hide(); +#else field_0x21c[0][i] = (J2DTextBox*)mpScreen->search(fenu_t0[i]); mpScreen->search(menu_t0[i])->hide(); +#endif field_0x21c[0][i]->setFont(mpFont); field_0x21c[0][i]->setString(0x40, ""); mpString->getString(0x548, field_0x21c[0][i], NULL, NULL, NULL, 0); } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[1][i] = (J2DTextBox*)mpScreen->search(menu_t1[i]); + mpScreen->search(fenu_t1[i])->hide(); +#else field_0x21c[1][i] = (J2DTextBox*)mpScreen->search(fenu_t2[i]); mpScreen->search(menu_t2[i])->hide(); +#endif field_0x21c[1][i]->setFont(mpFont); field_0x21c[1][i]->setString(0x40, ""); +#if VERSION == VERSION_GCN_JPN + mpString->getString(0x54B, field_0x21c[1][i], NULL, NULL, NULL, 0); +#else mpString->getString(0x54E, field_0x21c[1][i], NULL, NULL, NULL, 0); +#endif } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[2][i] = (J2DTextBox*)mpScreen->search(menu_t2[i]); + mpScreen->search(fenu_t2[i])->hide(); +#else field_0x21c[2][i] = (J2DTextBox*)mpScreen->search(fenu_t3[i]); mpScreen->search(menu_t3[i])->hide(); +#endif field_0x21c[2][i]->setFont(mpFont); field_0x21c[2][i]->setString(0x40, ""); +#if VERSION == VERSION_GCN_JPN + mpString->getString(0x54E, field_0x21c[2][i], NULL, NULL, NULL, 0); +#else mpString->getString(0x54F, field_0x21c[2][i], NULL, NULL, NULL, 0); +#endif } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[3][i] = (J2DTextBox*)mpScreen->search(menu_t3[i]); + mpScreen->search(fenu_t3[i])->hide(); +#else field_0x21c[3][i] = (J2DTextBox*)mpScreen->search(fenu_t4[i]); mpScreen->search(menu_t4[i])->hide(); +#endif field_0x21c[3][i]->setFont(mpFont); field_0x21c[3][i]->setString(0x40, ""); +#if VERSION == VERSION_GCN_JPN + mpString->getString(0x54F, field_0x21c[3][i], NULL, NULL, NULL, 0); +#endif } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[4][i] = (J2DTextBox*)mpScreen->search(menu_t4[i]); + mpScreen->search(fenu_t4[i])->hide(); +#else field_0x21c[4][i] = (J2DTextBox*)mpScreen->search(fenu_t1[i]); mpScreen->search(menu_t1[i])->hide(); +#endif field_0x21c[4][i]->setFont(mpFont); field_0x21c[4][i]->setString(0x40, ""); } for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + field_0x21c[5][i] = (J2DTextBox*)mpScreen->search(menu_t5[i]); + mpScreen->search(fenu_t5[i])->hide(); +#else field_0x21c[5][i] = (J2DTextBox*)mpScreen->search(fenu_t5[i]); mpScreen->search(menu_t5[i])->hide(); +#endif field_0x21c[5][i]->setFont(mpFont); field_0x21c[5][i]->setString(0x40, ""); mpString->getString(0x554, field_0x21c[5][i], NULL, NULL, NULL, 0); } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + paneResize(menut_0[i]); + mpMenuText[0][i] = new CPaneMgr(mpClipScreen, menut_0[i], 0, NULL); + mpClipScreen->search(fenut_0[i])->hide(); +#else paneResize(fenut_0[i]); mpMenuText[0][i] = new CPaneMgr(mpClipScreen, fenut_0[i], 0, NULL); mpClipScreen->search(menut_0[i])->hide(); +#endif ((J2DTextBox*)(mpMenuText[0][i]->getPanePtr()))->setFont(mpFont); ((J2DTextBox*)(mpMenuText[0][i]->getPanePtr()))->setString(0x40, ""); mpMenuText[0][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + paneResize(menut_1[i]); + mpMenuText[1][i] = new CPaneMgr(mpClipScreen, menut_1[i], 0, NULL); + mpClipScreen->search(fenut_1[i])->hide(); +#else paneResize(fenut_1[i]); mpMenuText[1][i] = new CPaneMgr(mpClipScreen, fenut_1[i], 0, NULL); mpClipScreen->search(menut_1[i])->hide(); +#endif mpMenuText[1][i]->show(); ((J2DTextBox*)(mpMenuText[1][i]->getPanePtr()))->setFont(mpFont); ((J2DTextBox*)(mpMenuText[1][i]->getPanePtr()))->setString(0x40, ""); mpMenuText[1][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + paneResize(menut_2[i]); + mpMenuText[2][i] = new CPaneMgr(mpClipScreen, menut_2[i], 0, NULL); + mpClipScreen->search(fenut_2[i])->hide(); +#else paneResize(fenut_2[i]); mpMenuText[2][i] = new CPaneMgr(mpClipScreen, fenut_2[i], 0, NULL); mpClipScreen->search(menut_2[i])->hide(); +#endif mpMenuText[2][i]->show(); ((J2DTextBox*)(mpMenuText[2][i]->getPanePtr()))->setFont(mpFont); ((J2DTextBox*)(mpMenuText[2][i]->getPanePtr()))->setString(0x40, ""); mpMenuText[2][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + paneResize(menut_3[i]); + mpMenuText[3][i] = new CPaneMgr(mpClipScreen, menut_3[i], 0, NULL); + mpClipScreen->search(fenut_3[i])->hide(); +#else paneResize(fenut_3[i]); mpMenuText[3][i] = new CPaneMgr(mpClipScreen, fenut_3[i], 0, NULL); mpClipScreen->search(menut_3[i])->hide(); +#endif mpMenuText[3][i]->show(); ((J2DTextBox*)(mpMenuText[3][i]->getPanePtr()))->setFont(mpFont); ((J2DTextBox*)(mpMenuText[3][i]->getPanePtr()))->setString(0x40, ""); mpMenuText[3][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + paneResize(menut_4[i]); + mpMenuText[4][i] = new CPaneMgr(mpClipScreen, menut_4[i], 0, NULL); + mpClipScreen->search(fenut_4[i])->hide(); +#else paneResize(fenut_4[i]); mpMenuText[4][i] = new CPaneMgr(mpClipScreen, fenut_4[i], 0, NULL); mpClipScreen->search(menut_4[i])->hide(); +#endif mpMenuText[4][i]->show(); ((J2DTextBox*)(mpMenuText[4][i]->getPanePtr()))->setFont(mpFont); ((J2DTextBox*)(mpMenuText[4][i]->getPanePtr()))->setString(0x40, ""); @@ -1484,8 +1705,13 @@ void dMenu_Option_c::screenSet() { } field_0x3b4 = 0.0f; menuVisible(); +#if VERSION == VERSION_GCN_JPN + mpBackScreen->search('jpn_n')->show(); + mpBackScreen->search('foregn_n')->hide(); +#else mpBackScreen->search('jpn_n')->hide(); mpBackScreen->search('foregn_n')->show(); +#endif for (int i = 0; i < 6; i++) { J2DTextBox* backScreen = (J2DTextBox*)mpBackScreen->search(tx[i]); backScreen->setFont(mpFont); @@ -1512,7 +1738,9 @@ void dMenu_Option_c::screenSet() { for (int i = 0; i < 10; i++) { J2DTextBox* tvScreen = (J2DTextBox*)mpTVScreen->search(txTV[i]); tvScreen->setFont(mpFont); +#if VERSION != VERSION_GCN_JPN tvScreen->setCharSpace(0.0f); +#endif if (i < 2) { tvScreen->setString(0x100, ""); @@ -1574,6 +1802,30 @@ void dMenu_Option_c::setAttenString() { } } +#if VERSION == VERSION_GCN_JPN +void dMenu_Option_c::setRubyString() { + u16 stringId1; + u16 stringId2; + + if (field_0x3e5_JPN == 0) { + stringId1 = 0x54c; + stringId2 = 0x54d; + } else { + stringId1 = 0x54d; + stringId2 = 0x54c; + } + for (int i = 0; i < 6; i++) { + if (i < 2) { + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[1][i]->getPanePtr(); + mpString->getString(stringId1, textBox, NULL, NULL, NULL, 0); + } else { + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[1][i]->getPanePtr(); + mpString->getString(stringId2, textBox, NULL, NULL, NULL, 0); + } + } +} +#endif + /* 801E70E8-801E71CC 1E1A28 00E4+00 2/2 0/0 0/0 .text setVibString__14dMenu_Option_cFv */ void dMenu_Option_c::setVibString() { u16 stringId1; @@ -1587,11 +1839,16 @@ void dMenu_Option_c::setVibString() { stringId2 = 0x54C; } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + const int IDX = 2; +#else + const int IDX = 1; +#endif if (i < 2) { - J2DTextBox* textBox = (J2DTextBox*)mpMenuText[1][i]->getPanePtr(); + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[IDX][i]->getPanePtr(); mpString->getString(stringId1, textBox, NULL, NULL, NULL, 0); } else { - J2DTextBox* textBox = (J2DTextBox*)mpMenuText[1][i]->getPanePtr(); + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[IDX][i]->getPanePtr(); mpString->getString(stringId2, textBox, NULL, NULL, NULL, 0); } } @@ -1618,14 +1875,19 @@ void dMenu_Option_c::setSoundString() { stringId3 = 0x550; } for (int i = 0; i < 6; i++) { +#if VERSION == VERSION_GCN_JPN + const int IDX = 3; +#else + const int IDX = 2; +#endif if (i < 2) { - J2DTextBox* textBox = (J2DTextBox*)mpMenuText[2][i]->getPanePtr(); + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[IDX][i]->getPanePtr(); mpString->getString(stringId1, textBox, NULL, NULL, NULL, 0); } else if (i < 4) { - J2DTextBox* textBox = (J2DTextBox*)mpMenuText[2][i]->getPanePtr(); + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[IDX][i]->getPanePtr(); mpString->getString(stringId2, textBox, NULL, NULL, NULL, 0); } else { - J2DTextBox* textBox = (J2DTextBox*)mpMenuText[2][i]->getPanePtr(); + J2DTextBox* textBox = (J2DTextBox*)mpMenuText[IDX][i]->getPanePtr(); mpString->getString(stringId3, textBox, NULL, NULL, NULL, 0); } } @@ -1634,9 +1896,11 @@ void dMenu_Option_c::setSoundString() { /* 801E7314-801E73D8 1E1C54 00C4+00 8/8 0/0 0/0 .text setCursorPos__14dMenu_Option_cFUc */ void dMenu_Option_c::setCursorPos(u8 i_index) { +#if VERSION != VERSION_GCN_JPN if (i_index == 4) { i_index = 5; } +#endif Vec pos = mpMenuPane[i_index]->getGlobalVtxCenter(mpMenuPane[i_index]->mPane, false, 0); mpDrawCursor->setPos(pos.x + (field_0x330 - field_0x334), pos.y, @@ -1689,10 +1953,10 @@ void dMenu_Option_c::setSelectColor(u8 param_0, bool param_1) { /* 801E76EC-801E7718 1E202C 002C+00 8/8 0/0 0/0 .text getSelectType__14dMenu_Option_cFv */ u8 dMenu_Option_c::getSelectType() { - if (field_0x3ef < 3) { + if (field_0x3ef < SelectType3) { return field_0x3ef; } - if (field_0x3f5 < 3) { + if (field_0x3f5 < SelectType3) { return field_0x3f5; } return 0; @@ -1838,7 +2102,11 @@ void dMenu_Option_c::changeTVCheck() { } static void dummy() { +#if VERSION == VERSION_GCN_JPN + static const u64 txTVhide[5] = {'fmenu_6n', 'fmenu_9n', 'fmenu_10', 'fmenu_7n', 'fmenu_8n'}; +#else static const u64 txTVhide[5] = {'menu_6n', 'menu_9n', 'menu_10n', 'menu_7n', 'menu_8n'}; +#endif } /* 801E7E98-801E7F9C 1E27D8 0104+00 11/11 0/0 0/0 .text setAButtonString__14dMenu_Option_cFUs */ @@ -1909,6 +2177,13 @@ void dMenu_Option_c::paneResize(u64 i_tag) { /* 801E8210-801E82C4 1E2B50 00B4+00 1/1 1/1 0/0 .text initialize__14dMenu_Option_cFv */ void dMenu_Option_c::initialize() { field_0x3e4 = dComIfGs_getOptAttentionType(); +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + field_0x3e5_JPN = 1; + } else { + field_0x3e5_JPN = 0; + } +#endif field_0x3e5 = dComIfGs_getOptCameraControl(); field_0x3e8 = 0; field_0x3eb = 0; @@ -1921,6 +2196,9 @@ void dMenu_Option_c::initialize() { field_0x3ea = 0; } setAttenString(); +#if VERSION == VERSION_GCN_JPN + setRubyString(); +#endif setVibString(); setSoundString(); mFrame = 0; diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp index 94997bf7e6a..e5860cc7ef6 100644 --- a/src/d/d_menu_ring.cpp +++ b/src/d/d_menu_ring.cpp @@ -322,36 +322,61 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i } mpString = new dMsgString_c(); for (i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + J2DTextBox* fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]); + mpScreen->search(fxy_text[i])->hide(); +#else J2DTextBox* fxy_TextBox = (J2DTextBox*)mpScreen->search(fxy_text[i]); mpScreen->search(xy_text[i])->hide(); +#endif fxy_TextBox->setFont(mDoExt_getMesgFont()); fxy_TextBox->setString(0x40, ""); field_0x580[0] = mpString->getString(0x380, fxy_TextBox, NULL, NULL, NULL, 0); } for (i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); + mpScreen->search(fc_text[i])->hide(); +#else J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); mpScreen->search(c_text[i])->hide(); +#endif fc_TextBox->setFont(mDoExt_getMesgFont()); fc_TextBox->setString(0x40, ""); field_0x580[1] = mpString->getString(0x37F, fc_TextBox, NULL, NULL, NULL, 0); } for (i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); + mpScreen->search(fc_text1[i])->hide(); +#else J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); mpScreen->search(c_text1[i])->hide(); +#endif fc1_TextBox->setFont(mDoExt_getMesgFont()); fc1_TextBox->setString(0x40, ""); field_0x580[2] = mpString->getString(0x4CD, fc1_TextBox, NULL, NULL, NULL, 0); } for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]); + mpScreen->search(ft_on[i])->hide(); +#else mpComboOffString[i] = (J2DTextBox*)mpScreen->search(ft_on[i]); mpScreen->search(t_on[i])->hide(); +#endif mpComboOffString[i]->setString(0x40, ""); mpComboOffString[i]->setFont(mDoExt_getMesgFont()); mpString->getString(0x4D2, mpComboOffString[i], NULL, NULL, NULL, 0); } for (int i = 0; i < 5; i++) { +#if VERSION == VERSION_GCN_JPN + mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]); + mpScreen->search(ft_off[i])->hide(); +#else mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(ft_off[i]); mpScreen->search(t_off[i])->hide(); +#endif mpBowArrowComboString[i]->setString(0x40, ""); mpBowArrowComboString[i]->setFont(mDoExt_getMesgFont()); mpString->getString(0x4D3, mpBowArrowComboString[i], NULL, NULL, NULL, 0); @@ -376,6 +401,20 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mpNameParent = new CPaneMgr(mpCenterScreen, 'label_n', 1, NULL); mpCircle = new CPaneMgr(mpCenterScreen, 'circle_n', 2, NULL); J2DTextBox* textBox[4]; +#if VERSION == VERSION_GCN_JPN + textBox[0] = (J2DTextBox*)mpCenterScreen->search('item_n04'); + textBox[1] = (J2DTextBox*)mpCenterScreen->search('item_n05'); + textBox[2] = (J2DTextBox*)mpCenterScreen->search('item_n06'); + textBox[3] = (J2DTextBox*)mpCenterScreen->search('item_n07'); + J2DPane* pane = mpCenterScreen->search('fitem_n1'); + pane->mVisible = false; + pane = mpCenterScreen->search('fitem_n2'); + pane->mVisible = false; + pane = mpCenterScreen->search('fitem_n3'); + pane->mVisible = false; + pane = mpCenterScreen->search('fitem_n4'); + pane->mVisible = false; +#else textBox[0] = (J2DTextBox*)mpCenterScreen->search('fitem_n1'); textBox[1] = (J2DTextBox*)mpCenterScreen->search('fitem_n2'); textBox[2] = (J2DTextBox*)mpCenterScreen->search('fitem_n3'); @@ -384,6 +423,7 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mpCenterScreen->search('item_n05'); mpCenterScreen->search('item_n06'); mpCenterScreen->search('item_n07'); +#endif for (int i = 0; i < 4; i++) { textBox[i]->setFont(mDoExt_getMesgFont()); textBox[i]->setString(0x40, ""); @@ -1085,10 +1125,17 @@ void dMenu_Ring_c::setScale() { /* 801EC3B0-801EC504 1E6CF0 0154+00 1/1 0/0 0/0 .text setNameString__12dMenu_Ring_cFUl */ void dMenu_Ring_c::setNameString(u32 i_stringID) { J2DTextBox* textBox[4]; +#if VERSION == VERSION_GCN_JPN + textBox[0] = (J2DTextBox*)mpCenterScreen->search('item_n04'); + textBox[1] = (J2DTextBox*)mpCenterScreen->search('item_n05'); + textBox[2] = (J2DTextBox*)mpCenterScreen->search('item_n06'); + textBox[3] = (J2DTextBox*)mpCenterScreen->search('item_n07'); +#else textBox[0] = (J2DTextBox*)mpCenterScreen->search('fitem_n1'); textBox[1] = (J2DTextBox*)mpCenterScreen->search('fitem_n2'); textBox[2] = (J2DTextBox*)mpCenterScreen->search('fitem_n3'); textBox[3] = (J2DTextBox*)mpCenterScreen->search('fitem_n4'); +#endif if (mNameStringID != i_stringID) { for (int i = 0; i < 4; i++) { if (i_stringID == 0) { diff --git a/src/d/d_menu_save.cpp b/src/d/d_menu_save.cpp index cb9edffbcd0..2d6b5a62aa4 100644 --- a/src/d/d_menu_save.cpp +++ b/src/d/d_menu_save.cpp @@ -204,10 +204,15 @@ void dMenu_save_c::screenSet() { static u64 l_tagName10[2] = {'w_no_g', 'w_yes_g'}; static u64 l_tagName11[2] = {'w_no_gr', 'w_yes_gr'}; static u64 l_tagName12[3] = {'w_bk_l00', 'w_bk_l01', 'w_bk_l02'}; +#if VERSION == VERSION_GCN_JPN + static u64 l_tagName21[2] = {'w_tabi_s', 'w_tabi_x'}; + static u64 l_tagName20[2] = {'w_er_msg', 'w_er_msR'}; +#else static u64 l_tagName21[2] = {'t_for', 't_for1'}; static u64 l_tagName211[10] = {'tmoyou00', 'tmoyou01', 'tmoyou02', 'tmoyou03', 'tmoyou04', 'tmoyou05', 'tmoyou06', 'tmoyou07', 'tmoyou08', 'tmoyou09'}; static u64 l_tagName20[2] = {'er_for0', 'er_for1'}; +#endif static u64 l_tagName13[3] = {'w_dat_i0', 'w_dat_i1', 'w_dat_i2'}; static u8 l_msgNum0[2] = {0x08, 0x07}; static u8 l_msgNum[2] = {0x54, 0x55}; @@ -241,8 +246,13 @@ void dMenu_save_c::screenSet() { mpNoYes[1] = new CPaneMgr(mSaveSel.Scr, 'w_yes_n', 0, NULL); for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN + mpNoYesTxt[i] = new CPaneMgr(mSaveSel.Scr, l_tagName000[i], 0, NULL); + mSaveSel.Scr->search(l_tagName000U[i])->hide(); +#else mpNoYesTxt[i] = new CPaneMgr(mSaveSel.Scr, l_tagName000U[i], 0, NULL); mSaveSel.Scr->search(l_tagName000[i])->hide(); +#endif ((J2DTextBox*)mpNoYesTxt[i]->getPanePtr())->setFont(mSaveSel.font[0]); char message[32]; @@ -255,8 +265,13 @@ void dMenu_save_c::screenSet() { mpBBtnIcon = new CPaneMgrAlpha(mSaveSel.Scr, 'w_nbbtn', 2, NULL); mpABtnIcon = new CPaneMgrAlpha(mSaveSel.Scr, 'w_nabtn', 2, NULL); +#if VERSION == VERSION_GCN_JPN + mpBackTxt = new CPaneMgrAlpha(mSaveSel.Scr, 'w_modo', 2, NULL); + mpConfirmTxt = new CPaneMgrAlpha(mSaveSel.Scr, 'w_kete', 2, NULL); +#else mpBackTxt = new CPaneMgrAlpha(mSaveSel.Scr, 'f_modo', 2, NULL); mpConfirmTxt = new CPaneMgrAlpha(mSaveSel.Scr, 'f_kete', 2, NULL); +#endif mpBackTxt->setAlpha(0); mpConfirmTxt->setAlpha(0); @@ -265,8 +280,13 @@ void dMenu_save_c::screenSet() { for (int i = 0; i < 2; i++) { J2DTextBox* tbox[2]; +#if VERSION == VERSION_GCN_JPN + tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00[i]); + mSaveSel.Scr->search(l_tagName00U[i])->hide(); +#else tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00U[i]); mSaveSel.Scr->search(l_tagName00[i])->hide(); +#endif tbox[i]->setFont(mSaveSel.font[0]); char message[32]; @@ -335,21 +355,32 @@ void dMenu_save_c::screenSet() { mpBookWaku[i]->setAlpha(0); } +#if VERSION == VERSION_GCN_JPN + mSaveSel.Scr->search('t_for')->hide(); + mSaveSel.Scr->search('t_for1')->hide(); +#else mSaveSel.Scr->search('w_tabi_s')->hide(); mSaveSel.Scr->search('w_tabi_x')->hide(); for (int i = 0; i < 10; i++) { mSaveSel.Scr->search(l_tagName211[i])->hide(); } +#endif for (int i = 0; i < 2; i++) { mpHeaderTxtPane[i] = new CPaneMgrAlpha(mSaveSel.Scr, l_tagName21[i], 0, NULL); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setString(0x100, ""); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f); +#else ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(19.0f, 19.0f); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(20.0f); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(0.0f); +#endif mpHeaderTxt[i] = ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->getStringPtr(); } @@ -358,18 +389,33 @@ void dMenu_save_c::screenSet() { mHeaderTxtType = 0; field_0xb4 = mSaveSel.Scr->search('w_er_n'); +#if VERSION == VERSION_GCN_JPN + mSaveSel.Scr->search('er_for0')->hide(); + mSaveSel.Scr->search('er_for1')->hide(); +#else mSaveSel.Scr->search('w_er_msg')->hide(); mSaveSel.Scr->search('w_er_msR')->hide(); +#endif for (int i = 0; i < 2; i++) { +#if VERSION == VERSION_GCN_JPN mpErrTxtPane[i] = new CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL); +#else + mpErrTxtPane[i] = new CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL); +#endif ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setString(0x200, ""); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(2.0f); +#else ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->resize(440.0f, 198.0f); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(21.0f); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(1.0f); +#endif mpErrTxt[i] = ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->getStringPtr(); mpErrTxtPane[i]->show(); } @@ -2411,12 +2457,21 @@ bool dMenu_save_c::selectDataBaseMoveAnm() { mpSelectMoveBase->getPanePtr()->animationTransform(); return false; } else { +#if VERSION == VERSION_GCN_JPN + if (mDataBaseMoveAnmFrame == 33) { + field_0x64 = 1; + } else { + field_0x64 = 0; + } + field_0x65 = 0; +#else if (mDataBaseMoveAnmFrame == 33) { field_0x64 = 1; field_0x65 = 0; } else { field_0x64 = 0; } +#endif mpSelectMoveBase->getPanePtr()->setAnimation((J2DAnmTransformKey*)NULL); return true; diff --git a/src/d/d_menu_skill.cpp b/src/d/d_menu_skill.cpp index 074c46a764d..21431e909af 100644 --- a/src/d/d_menu_skill.cpp +++ b/src/d/d_menu_skill.cpp @@ -440,6 +440,16 @@ void dMenu_Skill_c::screenSetMenu() { mpParent = new CPaneMgr(mpMenuScreen, 'n_all', 2, NULL); mpParent->setAlphaRate(0.0f); for (int i = 0; i < 7; i++) { +#if VERSION == VERSION_GCN_JPN + mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); + mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); + mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); + mpFTagPicture[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]); + mpMenuScreen->search(ftag_sub0[i])->hide(); + mpMenuScreen->search(ftag_sub1[i])->hide(); + mpMenuScreen->search(ftag_name0[i])->hide(); + mpMenuScreen->search(ftag_name1[i])->hide(); +#else mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]); mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]); mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]); @@ -448,6 +458,7 @@ void dMenu_Skill_c::screenSetMenu() { mpMenuScreen->search(tag_sub1[i])->hide(); mpMenuScreen->search(tag_name0[i])->hide(); mpMenuScreen->search(tag_name1[i])->hide(); +#endif for (int j = 0; j < 4; j++) { mpFTagPicture[i][j]->setFont(mDoExt_getMesgFont()); mpFTagPicture[i][j]->setString(0x40, ""); @@ -484,8 +495,13 @@ void dMenu_Skill_c::screenSetMenu() { mSelectWhite[i] = mpFTagPicture[1][i]->getWhite(); } } +#if VERSION == VERSION_GCN_JPN + J2DTextBox* textBox = (J2DTextBox*)mpMenuScreen->search('t_t00'); + mpMenuScreen->search('f_t00')->hide(); +#else J2DTextBox* textBox = (J2DTextBox*)mpMenuScreen->search('f_t00'); mpMenuScreen->search('t_t00')->hide(); +#endif textBox->setFont(mDoExt_getSubFont()); textBox->setString(0x200, ""); mpString->getString(0x6a4, textBox, NULL, NULL, NULL, 0); @@ -510,16 +526,26 @@ void dMenu_Skill_c::screenSetLetter() { mpLetterScreen = new J2DScreen(); mpLetterScreen->setPriority("zelda_ougi_info.blo", 0x20000, mpArchive); dPaneClass_showNullPane(mpLetterScreen); +#if VERSION == VERSION_GCN_JPN + mpTextPane = new CPaneMgr(mpLetterScreen, 'mg_3line', 0, NULL); + mpLetterScreen->search('n_e4line')->hide(); +#else mpTextPane = new CPaneMgr(mpLetterScreen, 'mg_e4lin', 0, NULL); mpLetterScreen->search('n_3line')->hide(); +#endif mpExpName = new CPaneMgr(mpLetterScreen, 'label_n', 0, NULL); J2DTextBox* paneFont = (J2DTextBox*)mpTextPane->getPanePtr(); paneFont->setFont(mDoExt_getMesgFont()); J2DTextBox* paneString = (J2DTextBox*)mpTextPane->getPanePtr(); paneString->setString(0x200, ""); for (int i = 0; i < 4; i++) { +#if VERSION == VERSION_GCN_JPN + mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(name_tag[i]); + mpLetterScreen->search(fame_tag[i])->hide(); +#else mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(fame_tag[i]); mpLetterScreen->search(name_tag[i])->hide(); +#endif mpNameString[i]->setFont(mDoExt_getMesgFont()); mpNameString[i]->setString(0x40, ""); } diff --git a/src/d/d_menu_window.cpp b/src/d/d_menu_window.cpp index b014686247d..d78f0a20381 100644 --- a/src/d/d_menu_window.cpp +++ b/src/d/d_menu_window.cpp @@ -38,7 +38,7 @@ public: GXPixModeSync(); } else { GXTexObj tex; - GXInitTexObj(&tex, mDoGph_gInf_c::getFrameBufferTex(), 304, 224, + GXInitTexObj(&tex, mDoGph_gInf_c::getFrameBufferTex(), 304, 224, (GXTexFmt)mDoGph_gInf_c::getFrameBufferTimg()->format, GX_CLAMP, GX_CLAMP, GX_FALSE); GXInitTexObjLOD(&tex, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1); GXLoadTexObj(&tex, GX_TEXMAP0); diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp index 0ed7f510bd8..e78e0e73a94 100644 --- a/src/d/d_meter2_info.cpp +++ b/src/d/d_meter2_info.cpp @@ -543,6 +543,15 @@ f32 dMeter2Info_c::getStringLength(J2DTextBox* i_textbox, char* i_string) { str_width = 0.0f; } else { int c = (u8)*string; +#if VERSION == VERSION_GCN_JPN + bool unkFlag1 = false; + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { + unkFlag1 = true; + } + if (unkFlag1) { + c = (c << 8) | (u8)*++string; + } +#endif str_width += charSpace + (fontSize.mSizeX * ((f32)font->getWidth(c) / (f32)font->getCellWidth())); } } @@ -568,6 +577,15 @@ f32 dMeter2Info_c::getStringLength(JUTFont* i_font, f32 param_2, f32 param_3, ch str_width = 0.0f; } else { int c = (u8)*string; +#if VERSION == VERSION_GCN_JPN + bool unkFlag1 = false; + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { + unkFlag1 = true; + } + if (unkFlag1) { + c = (c << 8) | (u8)*++string; + } +#endif str_width += param_3 + param_2 * ((f32)i_font->getWidth(c) / (f32)i_font->getCellWidth()); } } diff --git a/src/d/d_meter_button.cpp b/src/d/d_meter_button.cpp index 01e19d03e39..a46bba31626 100644 --- a/src/d/d_meter_button.cpp +++ b/src/d/d_meter_button.cpp @@ -1474,6 +1474,33 @@ void dMeterButton_c::screenInitText() { mpTmRoot_c = new CPaneMgr(mpTextScreen, 'mg_null', 0, NULL); JUT_ASSERT(0, mpTmRoot_c != 0); +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_3flin', 0, NULL); + + mpTm_c[1] = new CPaneMgr(mpTextScreen, 't3f_s', 0, NULL); + + field_0x0ec[0] = new CPaneMgr(mpTextScreen, 'mg_3f', 0, NULL); + + field_0x0ec[1] = new CPaneMgr(mpTextScreen, 'mg_3f_s', 0, NULL); + + mpTextScreen->search('n_3line')->hide(); + mpTextScreen->search('n_3fline')->show(); + mpTextScreen->search('n_e4line')->hide(); + } else { + mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_3line', 0, NULL); + + mpTm_c[1] = new CPaneMgr(mpTextScreen, 't3_s', 0, NULL); + + field_0x0ec[0] = NULL; + field_0x0ec[1] = NULL; + OS_REPORT("[%s] %d\n", __FILE__, __LINE__); + + mpTextScreen->search('n_3line')->show(); + mpTextScreen->search('n_3fline')->hide(); + mpTextScreen->search('n_e4line')->hide(); + } +#else mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_e4lin', 0, NULL); JUT_ASSERT(0, mpTm_c[0] != 0); @@ -1484,25 +1511,29 @@ void dMeterButton_c::screenInitText() { field_0x0ec[1] = NULL; OS_REPORT("[%s] %d\n", __FILE__, __LINE__); -#if VERSION == VERSION_GCN_JPN - mpTextScreen->search('n_3line')->show(); - mpTextScreen->search('n_3fline')->hide(); - mpTextScreen->search('n_e4line')->hide(); -#else mpTextScreen->search('n_3line')->hide(); mpTextScreen->search('n_3fline')->hide(); mpTextScreen->search('n_e4line')->show(); #endif + OS_REPORT("[%s] %d\n", __FILE__, __LINE__); f32 line_space = static_cast(mpTm_c[0]->getPanePtr())->getLineSpace(); for (int i = 0; i < 2; i++) { static_cast(mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + static_cast(mpTm_c[i]->getPanePtr())->setString(0x210, ""); +#else static_cast(mpTm_c[i]->getPanePtr())->setString(0x200, ""); +#endif if (field_0x0ec[i] != NULL) { static_cast(field_0x0ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + static_cast(field_0x0ec[i]->getPanePtr())->setString(0x210, ""); +#else static_cast(field_0x0ec[i]->getPanePtr())->setString(0x200, ""); +#endif static_cast(field_0x0ec[i]->getPanePtr())->setLineSpace(line_space); } } diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index febc332da7f..c1534f217f6 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -39,10 +39,6 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { 'sel_po02', 'c_kahen', 'c_cursor' }; - // tag_n and following data are unused so unsure how this data is properly setup - static u64 tag_n[] = {'a_t', 'b_t', 'c_t'}; - static u32 unkdata[9] = {0}; - mpScreen = new J2DScreen(); JUT_ASSERT(0, mpScreen != 0); @@ -113,6 +109,67 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { mCursorPos[i] = mpCursor_c[i]->getGlobalVtxCenter(true, 0); } +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_tf', 0, NULL); + + mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_tf', 0, NULL); + + mpTmSel_c[2] = new CPaneMgr(mpScreen, 'c_tf', 0, NULL); + + mpTmrSel_c[0] = new CPaneMgr(mpScreen, 'a_tf_f', 0, NULL); + + mpTmrSel_c[1] = new CPaneMgr(mpScreen, 'b_tf_f', 0, NULL); + + mpTmrSel_c[2] = new CPaneMgr(mpScreen, 'c_tf_f', 0, NULL); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search('a_t_e')->hide(); + mpScreen->search('b_t_e')->hide(); + mpScreen->search('c_t_e')->hide(); + mpScreen->search('a_tf')->show(); + mpScreen->search('b_tf')->show(); + mpScreen->search('c_tf')->show(); + mpScreen->search('a_tf_f')->show(); + mpScreen->search('b_tf_f')->show(); + mpScreen->search('c_tf_f')->show(); + mpScreen->search('a_t')->hide(); + mpScreen->search('b_t')->hide(); + mpScreen->search('c_t')->hide(); + } else { + mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_t', 0, NULL); + + mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_t', 0, NULL); + + mpTmSel_c[2] = new CPaneMgr(mpScreen, 'c_t', 0, NULL); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + mpTmrSel_c[i] = NULL; + } + + mpScreen->search('a_t_e')->hide(); + mpScreen->search('b_t_e')->hide(); + mpScreen->search('c_t_e')->hide(); + mpScreen->search('a_tf')->hide(); + mpScreen->search('b_tf')->hide(); + mpScreen->search('c_tf')->hide(); + mpScreen->search('a_tf_f')->hide(); + mpScreen->search('b_tf_f')->hide(); + mpScreen->search('c_tf_f')->hide(); + mpScreen->search('a_t')->show(); + mpScreen->search('b_t')->show(); + mpScreen->search('c_t')->show(); + } +#else mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_t_e', 0, NULL); JUT_ASSERT(0, mpTmSel_c[0] != 0); @@ -140,6 +197,7 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { mpScreen->search('a_t')->hide(); mpScreen->search('b_t')->hide(); mpScreen->search('c_t')->hide(); +#endif mSelMsgCol = static_cast(mpTmSel_c[0]->getPanePtr())->getWhite(); @@ -881,13 +939,24 @@ void dMsgScrn3Select_c::selectScale() { /* 8023B4AC-8023B870 235DEC 03C4+00 3/3 0/0 0/0 .text selectTrans__17dMsgScrn3Select_cFv */ void dMsgScrn3Select_c::selectTrans() { + static u64 tag_n[] = {'a_t', 'b_t', 'c_t'}; + J2DTextBox::TFontSize font_size; ((J2DTextBox*)mpTmSel_c[0]->getPanePtr())->getFontSize(font_size); f32 var_f31 = (mpTmSel_c[0]->getSizeY() - font_size.mSizeY) * 0.5f; f32 sp68[3]; for (int i = 0; i < 3; i++) { +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0 && (field_0x112 & (u8)(1 << i)) != 0) { + sp68[i] = 0.0f; + } else { + f32 temp = mpTmSel_c[i]->getInitPosY(); + sp68[i] = mpScreen->search(tag_n[i])->getBounds().i.y - temp; + } +#else sp68[i] = 0.0f; +#endif } if (mWidth == 1.0f) { @@ -952,6 +1021,9 @@ void dMsgScrn3Select_c::selectTrans() { } } +// following data are unused so unsure how this data is properly setup +static u32 unkdata[9] = {0}; + /* 8023B870-8023B914 2361B0 00A4+00 7/7 0/0 0/0 .text selectAnimeTransform__17dMsgScrn3Select_cFi */ void dMsgScrn3Select_c::selectAnimeTransform(int i_sel) { diff --git a/src/d/d_msg_scrn_explain.cpp b/src/d/d_msg_scrn_explain.cpp index 47ada8a683d..4acacb5e882 100644 --- a/src/d/d_msg_scrn_explain.cpp +++ b/src/d/d_msg_scrn_explain.cpp @@ -78,7 +78,11 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ mpTxScreen->search('n_3fline')->hide(); mpTxScreen->search('n_e4line')->hide(); +#if VERSION == VERSION_GCN_JPN + field_0x50 = 0.0f; +#else field_0x50 = -10.0f; +#endif field_0x4c = 0.0f; } else { mpTxScreen->setPriority("zelda_message_window_text.blo", 0x20000, @@ -87,6 +91,31 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ mpScreen->search('n_all')->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY); +#if VERSION == VERSION_GCN_JPN + field_0x50 = 0.0f; + + if (dComIfGs_getOptUnk0() == 0) { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); + + field_0x10[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL); + field_0x10[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL); + + mpTxScreen->search('n_3line')->hide(); + mpTxScreen->search('n_3fline')->show(); + mpTxScreen->search('n_e4line')->hide(); + } else { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + + field_0x10[0] = NULL; + field_0x10[1] = NULL; + + mpTxScreen->search('n_3line')->show(); + mpTxScreen->search('n_3fline')->hide(); + mpTxScreen->search('n_e4line')->hide(); + } +#else field_0x50 = -10.0f; mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_e4lin', 0, NULL); @@ -98,6 +127,7 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ mpTxScreen->search('n_3line')->hide(); mpTxScreen->search('n_3fline')->hide(); mpTxScreen->search('n_e4line')->show(); +#endif if (param_1 == 2 || param_1 == 4) { field_0x4c = 0.0f; @@ -109,12 +139,20 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ f32 lineSpace = ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getLineSpace(); for (int i = 0; i < 2; i++) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); +#endif ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setLineSpace(lineSpace); if (field_0x10[i] != NULL) { ((J2DTextBox*)field_0x10[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x200, ""); +#endif ((J2DTextBox*)field_0x10[i]->getPanePtr())->setLineSpace(lineSpace); } } diff --git a/src/d/d_msg_scrn_item.cpp b/src/d/d_msg_scrn_item.cpp index 23bb6d20ae4..0b0577a4b19 100644 --- a/src/d/d_msg_scrn_item.cpp +++ b/src/d/d_msg_scrn_item.cpp @@ -195,7 +195,44 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { field_0x19d = false; mpPmP_c = new CPaneMgr(mpScreen, 'n_all', 3, NULL); JUT_ASSERT(389, mpPmP_c != 0); + mpPmP_c->scale(g_MsgObject_HIO_c.mBoxItemScaleX, g_MsgObject_HIO_c.mBoxItemScaleY); + +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); + JUT_ASSERT(407, mpTm_c[0] != 0); + + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); + JUT_ASSERT(410, mpTm_c[1] != 0); + + mpTm_c[2] = new CPaneMgr(mpTxScreen, 't3f_w', 0, NULL); + JUT_ASSERT(413, mpTm_c[2] != 0); + + mpTmr_c[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL); + JUT_ASSERT(416, mpTmr_c[0] != 0); + + mpTmr_c[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL); + JUT_ASSERT(419, mpTmr_c[1] != 0); + + mpTmr_c[2] = new CPaneMgr(mpTxScreen, 'mg_3f_w', 0, NULL); + JUT_ASSERT(422, mpTmr_c[2] != 0); + + mpTxScreen->search('n_3line')->hide(); + mpTxScreen->search('n_3fline')->show(); + mpTxScreen->search('n_e4line')->hide(); + } else { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL); + JUT_ASSERT(407, mpTm_c[0] != 0); + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + JUT_ASSERT(410, mpTm_c[1] != 0); + mpTm_c[2] = new CPaneMgr(mpTxScreen, 't3_w', 0, NULL); + JUT_ASSERT(413, mpTm_c[2] != 0); + mpTxScreen->search('n_3line')->show(); + mpTxScreen->search('n_3fline')->hide(); + mpTxScreen->search('n_e4line')->hide(); + } +#else mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_e4lin', 0, NULL); JUT_ASSERT(407, mpTm_c[0] != 0); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL); @@ -205,6 +242,8 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpTxScreen->search('n_3line')->hide(); mpTxScreen->search('n_3fline')->hide(); mpTxScreen->search('n_e4line')->show(); +#endif + for (int i = 0; i < 3; i++) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); if (mpTmr_c[i] != NULL) { diff --git a/src/d/d_msg_scrn_jimaku.cpp b/src/d/d_msg_scrn_jimaku.cpp index efe2e9362cc..19008daac4f 100644 --- a/src/d/d_msg_scrn_jimaku.cpp +++ b/src/d/d_msg_scrn_jimaku.cpp @@ -48,6 +48,26 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { field_0xcc = g_MsgObject_HIO_c.mBoxPos[0][5]; mpPmP_c->paneTrans(0.0f, field_0xcc); +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + mpTm_c[0] = new CPaneMgr(mpScreen, 'mg_3flin', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpScreen, 't3f_s', 0, NULL); + + mpTmr_c[0] = new CPaneMgr(mpScreen, 'mg_3f', 0, NULL); + mpTmr_c[1] = new CPaneMgr(mpScreen, 'mg_3f_s', 0, NULL); + + mpScreen->search('n_3line')->hide(); + mpScreen->search('n_3fline')->show(); + mpScreen->search('n_e4line')->hide(); + } else { + mpTm_c[0] = new CPaneMgr(mpScreen, 'mg_3line', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpScreen, 't3_s', 0, NULL); + + mpScreen->search('n_3line')->show(); + mpScreen->search('n_3fline')->hide(); + mpScreen->search('n_e4line')->hide(); + } +#else mpTm_c[0] = new CPaneMgr(mpScreen, 'mg_e4lin', 0, NULL); JUT_ASSERT(0, mpTm_c[0] != 0); @@ -57,16 +77,25 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { mpScreen->search('n_3line')->hide(); mpScreen->search('n_3fline')->hide(); mpScreen->search('n_e4line')->show(); +#endif for (int i = 0; i < 2; i++) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); +#endif mpTm_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4], g_MsgObject_HIO_c.mBoxStartWhite[i][4]); if (mpTmr_c[i] != NULL) { ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); +#endif mpTmr_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4], g_MsgObject_HIO_c.mBoxStartWhite[i][4]); } diff --git a/src/d/d_msg_scrn_kanban.cpp b/src/d/d_msg_scrn_kanban.cpp index e10b38ddd8e..a30d2f0b07b 100644 --- a/src/d/d_msg_scrn_kanban.cpp +++ b/src/d/d_msg_scrn_kanban.cpp @@ -17,8 +17,6 @@ extern dMsgObject_HIO_c g_MsgObject_HIO_c; /* 80244E38-8024534C 23F778 0514+00 0/0 1/1 0/0 .text __ct__16dMsgScrnKanban_cFP10JKRExpHeap */ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) { - static u64 const t_tag[3] = {'mg_e4lin', 'f4_w', 't4_s'}; - if (param_0 != NULL) { field_0xd4 = param_0; } else { @@ -60,6 +58,38 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) { JUT_ASSERT(72, mpSpot_c != 0); mpSpot_c->getPanePtr()->setAnimation(field_0xd0); + + +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() != 0) { + static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'}; + for (int i = 0; i < 3; i++) { + mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search('n_3line')->show(); + mpScreen->search('n_3fline')->hide(); + mpScreen->search('n_e4line')->hide(); + } else { + static u64 const t_tag_2[3] = {'t3fline', 't3f_w', 't3f_s'}; + static u64 const tr_tag[3] = {'mg_3f', 'mg_3f_w', 'mg_3f_s'}; + + for (int i = 0; i < 3; i++) { + mpTm_c[i] = new CPaneMgr(mpScreen, t_tag_2[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + + mpTmr_c[i] = new CPaneMgr(mpScreen, tr_tag[i], 0, NULL); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search('n_3line')->hide(); + mpScreen->search('n_3fline')->show(); + mpScreen->search('n_e4line')->hide(); + } +#else + static u64 const t_tag[3] = {'mg_e4lin', 'f4_w', 't4_s'}; + for (int i = 0; i < 3; i++) { mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); JUT_ASSERT(81, mpTm_c[i] != 0); @@ -69,6 +99,7 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) { mpScreen->search('n_3line')->hide(); mpScreen->search('n_3fline')->hide(); mpScreen->search('n_e4line')->show(); +#endif ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getFontSize(mFontSize); mTBoxWidth = mpTm_c[0]->getSizeX(); diff --git a/src/d/d_msg_scrn_talk.cpp b/src/d/d_msg_scrn_talk.cpp index 1e23d03fe94..3832bd1fa4f 100644 --- a/src/d/d_msg_scrn_talk.cpp +++ b/src/d/d_msg_scrn_talk.cpp @@ -95,15 +95,62 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpMg_c[1] = new CPaneMgr(mpTxScreen, 'mg_null', 0, NULL); JUT_ASSERT(153, mpMg_c[1] != 0); OSInitFastCast(); + +#if VERSION == VERSION_GCN_JPN + field_0xf4 = 0.0f; +#else field_0xf4 = -10.0f; +#endif fukiPosCalc(param_1); mpPmP_c = new CPaneMgr(mpScreen, 'n_all', 3, NULL); JUT_ASSERT(176, mpPmP_c != 0); mpPmP_c->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY); + +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() == 0) { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); + + mpTmr_c[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL); + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { + mpTm_c[2] = new CPaneMgr(mpTxScreen, 't3f_s1', 0, NULL); + mpTm_c[3] = new CPaneMgr(mpTxScreen, 't3f_s2', 0, NULL); + mpTm_c[4] = new CPaneMgr(mpTxScreen, 't3f_s3', 0, NULL); + mpTm_c[5] = new CPaneMgr(mpTxScreen, 't3f_s4', 0, NULL); + mpTmr_c[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s1', 0, NULL); + mpTmr_c[2] = new CPaneMgr(mpTxScreen, 'mg_3f_s2', 0, NULL); + } else { + mpTmr_c[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL); + } + + mpTxScreen->search('n_3line')->hide(); + mpTxScreen->search('n_3fline')->show(); + mpTxScreen->search('n_e4line')->hide(); + } else { + mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL); + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { + mpTm_c[2] = new CPaneMgr(mpTxScreen, 't3_s1', 0, NULL); + JUT_ASSERT(189, mpTm_c[2] != 0); + mpTm_c[3] = new CPaneMgr(mpTxScreen, 't3_s2', 0, NULL); + JUT_ASSERT(191, mpTm_c[3] != 0); + mpTm_c[4] = new CPaneMgr(mpTxScreen, 't3_s3', 0, NULL); + JUT_ASSERT(193, mpTm_c[4] != 0); + mpTm_c[5] = new CPaneMgr(mpTxScreen, 't3_s4', 0, NULL); + JUT_ASSERT(193, mpTm_c[5] != 0); + } + + mpTxScreen->search('n_3line')->show(); + mpTxScreen->search('n_3fline')->hide(); + mpTxScreen->search('n_e4line')->hide(); + } +#else mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_e4lin', 0, NULL); JUT_ASSERT(182, mpTm_c[0] != 0); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL); JUT_ASSERT(185, mpTm_c[1] != 0); + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { mpTm_c[2] = new CPaneMgr(mpTxScreen, 't4_s1', 0, NULL); JUT_ASSERT(189, mpTm_c[2] != 0); @@ -114,17 +161,27 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpTm_c[5] = new CPaneMgr(mpTxScreen, 't4_s4', 0, NULL); JUT_ASSERT(193, mpTm_c[5] != 0); } + mpTxScreen->search('n_3line')->hide(); mpTxScreen->search('n_3fline')->hide(); mpTxScreen->search('n_e4line')->show(); +#endif for (int i = 0; i < 6; i++) { if (mpTm_c[i] != NULL) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); +#endif } if (mpTmr_c[i] != NULL) { ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); +#if VERSION == VERSION_GCN_JPN + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); +#else ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); +#endif } } if (dMsgObject_getMsgObjectClass()->getFukiKind() != 8) { diff --git a/src/d/d_msg_scrn_tree.cpp b/src/d/d_msg_scrn_tree.cpp index 88674b87e6b..c23e503a81a 100644 --- a/src/d/d_msg_scrn_tree.cpp +++ b/src/d/d_msg_scrn_tree.cpp @@ -60,8 +60,42 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) { field_0xc8->getPanePtr()->setAnimation(field_0xd0); mpScreen->search('white_m')->setAnimation(field_0xd4); + +#if VERSION == VERSION_GCN_JPN + if (dComIfGs_getOptUnk0() != 0) { + for (int i = 0; i < 3; i++) { + static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'}; + + mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); + } + + mpScreen->search('n_3line')->show(); + mpScreen->search('n_3fline')->hide(); + mpScreen->search('n_e4line')->hide(); + } else { + for (int i = 0; i < 3; i++) { + static u64 const t_tag[3] = {'t3fline', 't3f_w', 't3f_s'}; + static u64 const tr_tag[3] = {'mg_3f', 'mg_3f_w', 'mg_3f_s'}; + + mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); + + mpTmr_c[i] = new CPaneMgr(mpScreen, tr_tag[i], 0, NULL); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); + } + + mpScreen->search('n_3line')->hide(); + mpScreen->search('n_3fline')->show(); + mpScreen->search('n_e4line')->hide(); + } +#else for (int i = 0; i < 3; i++) { static u64 const t_tag[3] = {'mg_e4lin', 'f4_w', 't4_s'}; + mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL); ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); @@ -70,6 +104,7 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) { mpScreen->search('n_3line')->hide(); mpScreen->search('n_3fline')->hide(); mpScreen->search('n_e4line')->show(); +#endif ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getFontSize(mFontSize); mTBoxWidth = mpTm_c[0]->getSizeX(); diff --git a/src/d/d_timer.cpp b/src/d/d_timer.cpp index 16a1e6e8679..aa2b5ab6b3c 100644 --- a/src/d/d_timer.cpp +++ b/src/d/d_timer.cpp @@ -1462,6 +1462,12 @@ void dDlst_TimerScrnDraw_c::playBckAnimation(f32 i_frame) { mpGetInParent->getPanePtr()->setAnimation((J2DAnmTransform*)NULL); } +#if VERSION == VERSION_GCN_JPN +bool dDlst_TimerScrnDraw_c::isLeadByte(int i_char) { + return (i_char >= 0x81 && i_char <= 0x9f) || (i_char >= 0xe0 && i_char <= 0xfc); +} +#endif + /* 80260B54-80260F04 25B494 03B0+00 1/1 0/0 0/0 .text drawPikari__21dDlst_TimerScrnDraw_cFi */ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) { f32 temp_f28; @@ -1486,12 +1492,23 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) { } for (; string[str_idx] != 0; str_idx++) { + int c = string[str_idx] & 0xFF; + if (str_idx > 0) { var_f29 += var_f25 * static_cast(mpGetInText->getPanePtr())->getCharSpace(); } - int c = string[str_idx] & 0xFF; +#if VERSION == VERSION_GCN_JPN + if (isLeadByte(c)) { + c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); + str_idx++; + } else { + c = string[str_idx] & 0xFF; + } +#else + c = string[str_idx] & 0xFF; +#endif var_f29 += var_f25 * (font_size.mSizeX * ((f32)font_p->getWidth(c) / (f32)font_p->getCellWidth())); @@ -1501,13 +1518,23 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) { f32 frame; for (str_idx = 0; string[str_idx] != 0; str_idx++) { + int c = string[str_idx] & 0xFF; + if (str_idx > 0) { var_f26 += var_f25 * static_cast(mpGetInText->getPanePtr())->getCharSpace(); } - int c = string[str_idx] & 0xFF; - +#if VERSION == VERSION_GCN_JPN + if (isLeadByte(c)) { + c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); + str_idx++; + } else { + c = string[str_idx] & 0xFF; + } +#else + c = string[str_idx] & 0xFF; +#endif f32 temp_f24 = var_f25 * (font_size.mSizeX * ((f32)font_p->getWidth(c) / (f32)font_p->getCellWidth())); if (c != 0x20 && c != 0x8140) {