diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2025-09-21 22:26:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-21 13:26:34 -0600 |
| commit | e82806047b81a74abda21f2dd917eb4fd64199d2 (patch) | |
| tree | f9c8d9e552e37dd4bdc134b50935413e59fb39ad /src | |
| parent | e17e537ea0a5aa1822bb939e999a6614e86303a5 (diff) | |
d_a_obj_kznkarm OK (#2678)
* d_a_obj_kznkarm OK
* d_a_title GZ2P01 Matching
* More GZ2P01 Matches
* d_s_name matching for PAL
* d_msg_scrn_light Matching for PAL
* d_menu_fishing Matches on PAL
* d_file_sel_info Matches on PAL
* d_a_npc_cd Matching on PAL
* d_error_msg Matches on PAL
* d_cam_param matches as is on PAL
* Fix PAL JSystem and Z2AudioLib splits/symbols
* Aligning the rest of TUs to compile on all GC versions
Diffstat (limited to 'src')
| -rw-r--r-- | src/JSystem/JAudio2/JASReport.cpp | 14 | ||||
| -rw-r--r-- | src/d/actor/d_a_mg_fish.cpp | 12 | ||||
| -rw-r--r-- | src/d/actor/d_a_obj_kznkarm.cpp | 855 | ||||
| -rw-r--r-- | src/d/actor/d_a_title.cpp | 24 | ||||
| -rw-r--r-- | src/d/d_error_msg.cpp | 38 | ||||
| -rw-r--r-- | src/d/d_file_sel_info.cpp | 10 | ||||
| -rw-r--r-- | src/d/d_menu_fishing.cpp | 15 | ||||
| -rw-r--r-- | src/d/d_s_name.cpp | 42 |
8 files changed, 539 insertions, 471 deletions
diff --git a/src/JSystem/JAudio2/JASReport.cpp b/src/JSystem/JAudio2/JASReport.cpp index 5879906f8c..e38f887d25 100644 --- a/src/JSystem/JAudio2/JASReport.cpp +++ b/src/JSystem/JAudio2/JASReport.cpp @@ -1,5 +1,4 @@ // -// Generated By: dol2asm // Translation Unit: JASReport // @@ -9,19 +8,6 @@ #include "JSystem/JAudio2/JASMutex.h" #include "stdio.h" -// -// Forward References: -// - -// -// External References: -// - -// -// Declarations: -// - -/* ############################################################################################## */ /* 80431660-80431678 05E380 0018+00 1/1 0/0 0/0 .bss sMutex */ static OSMutex sMutex; diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index 064ce29be6..ec8df22075 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -3294,6 +3294,12 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { #if VERSION == VERSION_GCN_JPN lit_1008 = 0; +#elif VERSION == VERSION_GCN_PAL + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) { + lit_1008 = 2; + } else { + lit_1008 = 0; + } #endif if (i_this->mSurfaceY != 0.0f) { @@ -3906,6 +3912,12 @@ static int daMg_Fish_Create(fopAc_ac_c* i_this) { #if VERSION == VERSION_GCN_JPN lit_1008 = 0; +#elif VERSION == VERSION_GCN_PAL + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) { + lit_1008 = 2; + } else { + lit_1008 = 0; + } #else lit_1008 = 1; #endif diff --git a/src/d/actor/d_a_obj_kznkarm.cpp b/src/d/actor/d_a_obj_kznkarm.cpp index f6998dd081..61469eacec 100644 --- a/src/d/actor/d_a_obj_kznkarm.cpp +++ b/src/d/actor/d_a_obj_kznkarm.cpp @@ -5,548 +5,497 @@ #include "d/dolzel_rel.h" +#include "d/actor/d_a_player.h" #include "d/actor/d_a_obj_kznkarm.h" -#include "dol2asm.h" - - -// -// Forward References: -// - -extern "C" void setAction__14daObjKznkarm_cFQ214daObjKznkarm_c6Mode_e(); -extern "C" void callInit__14daObjKznkarm_cFv(); -extern "C" void callExecute__14daObjKznkarm_cFv(); -extern "C" void initBroken__14daObjKznkarm_cFv(); -extern "C" void executeBroken__14daObjKznkarm_cFv(); -extern "C" void initCarry__14daObjKznkarm_cFv(); -extern "C" void executeCarry__14daObjKznkarm_cFv(); -extern "C" void initThrow__14daObjKznkarm_cFv(); -extern "C" void executeThrow__14daObjKznkarm_cFv(); -extern "C" void __dt__8cM3dGPlaFv(); -extern "C" void initStay__14daObjKznkarm_cFv(); -extern "C" void executeStay__14daObjKznkarm_cFv(); -extern "C" void create_init__14daObjKznkarm_cFv(); -extern "C" void initBaseMtx__14daObjKznkarm_cFv(); -extern "C" void setBaseMtx__14daObjKznkarm_cFv(); -extern "C" void getGroundSlope__14daObjKznkarm_cFs(); -extern "C" static void createSolidHeap__FP10fopAc_ac_c(); -extern "C" static void daObjKznkarm_Draw__FP14daObjKznkarm_c(); -extern "C" static void daObjKznkarm_Execute__FP14daObjKznkarm_c(); -extern "C" static bool daObjKznkarm_IsDelete__FP14daObjKznkarm_c(); -extern "C" static void daObjKznkarm_Delete__FP14daObjKznkarm_c(); -extern "C" static void daObjKznkarm_Create__FP10fopAc_ac_c(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __sinit_d_a_obj_kznkarm_cpp(); -extern "C" static void func_80C50CEC(); -extern "C" static void func_80C50CF4(); -extern "C" u8 const M_attr__14daObjKznkarm_c[56]; -extern "C" extern char const* const d_a_obj_kznkarm__stringBase0; -extern "C" u8 ActionTable__14daObjKznkarm_c[96]; - -// -// External References: -// - -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void transS__14mDoMtx_stack_cFRC4cXyz(); -extern "C" void transM__14mDoMtx_stack_cFfff(); -extern "C" void ZXYrotM__14mDoMtx_stack_cFRC5csXyz(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_posMove__FP10fopAc_ac_cPC4cXyz(); -extern "C" void fopAcM_carryOffRevise__FP10fopAc_ac_c(); -extern "C" void fopAcM_getPolygonAngle__FPC8cM3dGPlas(); -extern "C" void fpcEx_SearchByID__FUi(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void getRes__14dRes_control_cFPCcPCcP11dRes_info_ci(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void GetTriPla__4cBgSCFRC13cBgS_PolyInfoP8cM3dGPla(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void cLib_chaseAngleS__FPsss(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void __dl__FPv(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_29(); -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void getFirstVec__15daObjKazeNeko_cFP4cXyzi(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80C50D90-80C50D90 000088 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80C50D90 = "J_Kazami"; -#pragma pop +#include "d/actor/d_a_obj_kazeneko.h" +#include "d/d_a_obj.h" -/* 80C50DC4-80C50DC8 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */ -SECTION_DATA static void* l_arcName = (void*)&d_a_obj_kznkarm__stringBase0; - -/* 80C50DC8-80C50DD4 -00001 000C+00 0/1 0/0 0/0 .data @3641 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3641[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)initBroken__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50DD4-80C50DE0 -00001 000C+00 0/1 0/0 0/0 .data @3642 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3642[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)executeBroken__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50DE0-80C50DEC -00001 000C+00 0/1 0/0 0/0 .data @3643 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3643[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)initCarry__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50DEC-80C50DF8 -00001 000C+00 0/1 0/0 0/0 .data @3644 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3644[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)executeCarry__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50DF8-80C50E04 -00001 000C+00 0/1 0/0 0/0 .data @3645 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3645[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)initThrow__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50E04-80C50E10 -00001 000C+00 0/1 0/0 0/0 .data @3646 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3646[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)executeThrow__14daObjKznkarm_cFv, -}; -#pragma pop - -/* 80C50E10-80C50E1C -00001 000C+00 0/1 0/0 0/0 .data @3647 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3647[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)initStay__14daObjKznkarm_cFv, +#if DEBUG + +class daObjKznkarm_Hio_c : public JORReflexible { +public: + daObjKznkarm_Hio_c(); + void genMessage(JORMContext* ctx); + void default_set(); + void ct(); + void dt(); + + /* 0x04 */ int mCount; + /* 0x04 */ daObjKznkarm_Attr_c mAttr; }; -#pragma pop - -/* 80C50E1C-80C50E28 -00001 000C+00 0/1 0/0 0/0 .data @3648 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3648[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)executeStay__14daObjKznkarm_cFv, + +static daObjKznkarm_Hio_c M_hio; + +daObjKznkarm_Hio_c::daObjKznkarm_Hio_c() { + mCount = 0; + default_set(); +} + +void daObjKznkarm_Hio_c::default_set() { + mAttr = daObjKznkarm_c::M_attr; +} + +void daObjKznkarm_Hio_c::ct() { + if (mCount++ == 0) { + daObj::HioVarious_c::init(this, "風見ネコの風受け"); + } +} + +void daObjKznkarm_Hio_c::dt() { + if (--mCount == 0) { + daObj::HioVarious_c::clean(this); + } +} + +void daObjKznkarm_Hio_c::genMessage(JORMContext* ctx) { + ctx->genLabel("§ 風見ネコの風受けパラメータ設定 §\n", 0, 0, NULL, 0xffff, 0xffff, 0x200, + 0x18); + ctx->genSlider("重力", &mAttr.gravity, -50.0f, 0.0f, 0, + NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("最高落下速度", &mAttr.maximum_falling_speed, -200.0f, 0.0f, 0, + NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("水抵抗", &mAttr.water_drag, 0.0f, 1.0f, 0, + NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("跳ね返り係数", &mAttr.bounce_coeff, 0.0f, 1.0f, 0, + NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("回転角速度X", &mAttr.angular_speed.x, -0x4000, + 0x3fff, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("回転角速度Y", &mAttr.angular_speed.y, -0x4000, + 0x3fff, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("回転角速度Z", &mAttr.angular_speed.z, -0x4000, + 0x3fff, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("置き位置X", &mAttr.position.x, -200.0f, + 200.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("置き位置Y", &mAttr.position.y, -200.0f, + 200.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("置き位置Z", &mAttr.position.z, -200.0f, + 200.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("初期投げ力", &mAttr.initial_throwing_force, 0.0f, 300.0f, + 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("初期投げ上げ力", &mAttr.initial_throwing_upward_force, 0.0f, 300.0f, + 0, NULL, 0xffff, 0xffff, 0x200, 0x18); + ctx->genSlider("投げ回転角速度", &mAttr.throw_angular_speed, -0x8000, + 0x7fff, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); +} + +#endif + +/* 80C50D08-80C50D40 000000 0038+00 8/8 0/0 0/0 .rodata M_attr__14daObjKznkarm_c */ + daObjKznkarm_Attr_c const daObjKznkarm_c::M_attr = { + -5.0f, -30.0f, 0.6f, 0.94f, + 40.0f, 40.0f, -60.0f, + -6.0f, -6.0f, -60.0f, 0.0f, + 12.0f, 0, 0x1000, 0, 0xE000, }; -#pragma pop + +/* 80C50DC4-80C50DC8 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */ +static char* l_arcName = "J_Kazami"; /* 80C50E28-80C50E88 000084 0060+00 1/2 0/0 0/0 .data ActionTable__14daObjKznkarm_c */ -SECTION_DATA u8 daObjKznkarm_c::ActionTable[96] = { - 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +daObjKznkarm_c::actionFunc daObjKznkarm_c::ActionTable[4][2] = { + &daObjKznkarm_c::initBroken, + &daObjKznkarm_c::executeBroken, + &daObjKznkarm_c::initCarry, + &daObjKznkarm_c::executeCarry, + &daObjKznkarm_c::initThrow, + &daObjKznkarm_c::executeThrow, + &daObjKznkarm_c::initStay, + &daObjKznkarm_c::executeStay, }; /* 80C4F858-80C4F88C 000078 0034+00 5/5 0/0 0/0 .text * setAction__14daObjKznkarm_cFQ214daObjKznkarm_c6Mode_e */ -void daObjKznkarm_c::setAction(daObjKznkarm_c::Mode_e param_0) { - // NONMATCHING +void daObjKznkarm_c::setAction(daObjKznkarm_c::Mode_e i_action) { + JUT_ASSERT(209, i_action < MODE_MAX_e); + mAction = ActionTable[i_action]; + callInit(); } /* 80C4F88C-80C4F8B4 0000AC 0028+00 1/1 0/0 0/0 .text callInit__14daObjKznkarm_cFv */ void daObjKznkarm_c::callInit() { - // NONMATCHING + JUT_ASSERT(225, mAction != 0); + (this->*mAction[0])(); } /* 80C4F8B4-80C4F8E0 0000D4 002C+00 1/1 0/0 0/0 .text callExecute__14daObjKznkarm_cFv */ void daObjKznkarm_c::callExecute() { - // NONMATCHING + JUT_ASSERT(238, mAction != 0); + (this->*mAction[1])(); } -/* ############################################################################################## */ -/* 80C50D08-80C50D40 000000 0038+00 8/8 0/0 0/0 .rodata M_attr__14daObjKznkarm_c */ -SECTION_RODATA u8 const daObjKznkarm_c::M_attr[56] = { - 0xC0, 0xA0, 0x00, 0x00, 0xC1, 0xF0, 0x00, 0x00, 0x3F, 0x19, 0x99, 0x9A, 0x3F, 0x70, - 0xA3, 0xD7, 0x42, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, 0xC2, 0x70, 0x00, 0x00, - 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC2, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xE0, 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D08, &daObjKznkarm_c::M_attr); +inline daObjKznkarm_Attr_c* daObjKznkarm_c::attr() const { + #if DEBUG + return &M_hio.mAttr; + #else + return (daObjKznkarm_Attr_c*)&M_attr; + #endif +} /* 80C4F8E0-80C4F960 000100 0080+00 1/0 0/0 0/0 .text initBroken__14daObjKznkarm_cFv */ void daObjKznkarm_c::initBroken() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C50D40-80C50D44 000038 0004+00 0/2 0/0 0/0 .rodata @3720 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3720 = -1.0f; -COMPILER_STRIP_GATE(0x80C50D40, &lit_3720); -#pragma pop - -/* 80C50D44-80C50D48 00003C 0004+00 2/7 0/0 0/0 .rodata @3721 */ -SECTION_RODATA static u8 const lit_3721[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D44, &lit_3721); - -/* 80C50D48-80C50D50 000040 0008+00 0/2 0/0 0/0 .rodata @3722 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3722[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D48, &lit_3722); -#pragma pop - -/* 80C50D50-80C50D58 000048 0008+00 0/2 0/0 0/0 .rodata @3723 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3723[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D50, &lit_3723); -#pragma pop - -/* 80C50D58-80C50D60 000050 0008+00 0/2 0/0 0/0 .rodata @3724 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3724[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D58, &lit_3724); -#pragma pop + mMode = MODE_BROKEN_e; + fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x80); + daObjKazeNeko_c* kazeNeko = (daObjKazeNeko_c*)fpcM_SearchByID(parentActorID); + if (kazeNeko != NULL) { + kazeNeko->getFirstVec(&speed, fopAcM_GetParam(this)); + } + field_0x7a8 = attr()->angular_speed.x; + field_0x7aa = attr()->angular_speed.y; + field_0x7ac = attr()->angular_speed.z; + field_0x7b0 = 10; +} /* 80C4F960-80C4FBBC 000180 025C+00 1/0 0/0 0/0 .text executeBroken__14daObjKznkarm_cFv */ void daObjKznkarm_c::executeBroken() { - // NONMATCHING + speed.y += gravity; + if (speed.y < maxFallSpeed) { + speed.y = maxFallSpeed; + } + + current.pos += speed; + if (field_0x7b0 != 0) { + field_0x7b0--; + } + + if (field_0x7b0 == 0) { + f32 gndH = mAcch.GetGroundH(); + if (current.pos.y < gndH) { + speed.y *= -1.0f; + speed *= attr()->bounce_coeff; + current.pos.y = gndH; + } + + if (speed.abs() < fabsf(gravity)) { + speed.zero(); + field_0x7a8 = 0; + field_0x7aa = 0; + field_0x7ac = 0; + shape_angle.x = 0x4000; + shape_angle.z = 0; + current.pos.y = gndH; + setAction(MODE_STAY_e); + } + } + + shape_angle.x = shape_angle.x + field_0x7a8; + shape_angle.y = shape_angle.y + field_0x7aa; + shape_angle.z = shape_angle.z + field_0x7ac; + setBaseMtx(); + mAcch.CrrPos(dComIfG_Bgsp()); } /* 80C4FBBC-80C4FBEC 0003DC 0030+00 1/0 0/0 0/0 .text initCarry__14daObjKznkarm_cFv */ void daObjKznkarm_c::initCarry() { - // NONMATCHING + mMode = MODE_CARRY_e; + fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x80); + cLib_offBit<u32>(attention_info.flags, fopAc_AttnFlag_CARRY_e); + field_0x7ae = 0; + field_0x7af = 0; } /* 80C4FBEC-80C4FD18 00040C 012C+00 1/0 0/0 0/0 .text executeCarry__14daObjKznkarm_cFv */ void daObjKznkarm_c::executeCarry() { - // NONMATCHING + eyePos = attention_info.position = current.pos; + daPy_py_c* player = daPy_getPlayerActorClass(); + if (player->getGrabUpStart()) { + field_0x7af = 1; + } + + if (!fopAcM_checkCarryNow(this)) { + fopAcM_carryOffRevise(this); + setAction(MODE_THROW_e); + } + + mDoMtx_stack_c::transS(current.pos); + if (field_0x7af != 0) { + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::transM(attr()->field_0x18.x, attr()->field_0x18.y, attr()->field_0x18.z); + } else { + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::ZrotM(shape_angle.z); + mDoMtx_stack_c::XrotM(shape_angle.x); + mDoMtx_stack_c::transM(attr()->position.x, attr()->position.y, attr()->position.z); + } + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); } -/* ############################################################################################## */ -/* 80C50D60-80C50D64 000058 0004+00 0/3 0/0 0/0 .rodata @3786 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3786 = 1.0f; -COMPILER_STRIP_GATE(0x80C50D60, &lit_3786); -#pragma pop - /* 80C4FD18-80C4FDB4 000538 009C+00 1/0 0/0 0/0 .text initThrow__14daObjKznkarm_cFv */ void daObjKznkarm_c::initThrow() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C50D64-80C50D68 00005C 0004+00 0/1 0/0 0/0 .rodata @3944 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3944 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x80C50D64, &lit_3944); -#pragma pop - -/* 80C50D68-80C50D70 000060 0008+00 0/1 0/0 0/0 .rodata @3946 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3946[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C50D68, &lit_3946); -#pragma pop - -/* 80C50E88-80C50E90 0000E4 0008+00 1/1 0/0 0/0 .data w_eff_id$3813 */ -SECTION_DATA static u8 w_eff_id[8] = { - 0x01, 0xB8, 0x01, 0xB9, 0x01, 0xBA, 0x01, 0xBB, -}; - -/* 80C50E90-80C50EB0 -00001 0020+00 1/0 0/0 0/0 .data l_daObjKznkarm_Method */ -static actor_method_class l_daObjKznkarm_Method = { - (process_method_func)daObjKznkarm_Create__FP10fopAc_ac_c, - (process_method_func)daObjKznkarm_Delete__FP14daObjKznkarm_c, - (process_method_func)daObjKznkarm_Execute__FP14daObjKznkarm_c, - (process_method_func)daObjKznkarm_IsDelete__FP14daObjKznkarm_c, - (process_method_func)daObjKznkarm_Draw__FP14daObjKznkarm_c, -}; - -/* 80C50EB0-80C50EE0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_KznkArm */ -extern actor_process_profile_definition g_profile_Obj_KznkArm = { - fpcLy_CURRENT_e, // mLayerID - 7, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_Obj_KznkArm, // mProcName - &g_fpcLf_Method.base, // sub_method - sizeof(daObjKznkarm_c), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 31, // mPriority - &l_daObjKznkarm_Method, // sub_method - 0x00044100, // mStatus - fopAc_ACTOR_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType -}; - -/* 80C50EE0-80C50EEC 00013C 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80C50EEC-80C50F10 000148 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80C50CF4, - (void*)NULL, - (void*)NULL, - (void*)func_80C50CEC, -}; - -/* 80C50F10-80C50F1C 00016C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGPla */ -SECTION_DATA extern void* __vt__8cM3dGPla[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGPlaFv, -}; + mMode = MODE_THROW_e; + fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x80); + speed.zero(); + if (speedF > 1.0f) { + daPy_py_c* player = daPy_getPlayerActorClass(); + f32 dVar9 = player->speedF + attr()->initial_throwing_force; + speed.set((dVar9 * cM_ssin(player->shape_angle.y)), attr()->initial_throwing_upward_force, + dVar9 * cM_scos(player->shape_angle.y)); + } + + field_0x7ac = attr()->throw_angular_speed; +} /* 80C4FDB4-80C50440 0005D4 068C+00 1/0 0/0 0/0 .text executeThrow__14daObjKznkarm_cFv */ void daObjKznkarm_c::executeThrow() { - // NONMATCHING -} - -/* 80C50440-80C50488 000C60 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGPlaFv */ -// cM3dGPla::~cM3dGPla() { -extern "C" void __dt__8cM3dGPlaFv() { - // NONMATCHING + if (field_0x7ae != 0) { + speed.y += gravity * 0.2f; + if (speed.y < maxFallSpeed * 0.2f) { + speed.y = maxFallSpeed * 0.2f; + } + } else { + speed.y += gravity; + if (speed.y < maxFallSpeed) { + speed.y = maxFallSpeed; + } + } + + f32 savedSpeedY = speed.y; + fopAcM_posMove(this, 0); + mAcch.CrrPos(dComIfG_Bgsp()); + speed.y = savedSpeedY; + + if (mAcch.ChkGroundLanding()) { + f32 speedAbs = speed.abs(); + cM3dGPla groundPla; + bool hit = dComIfG_Bgsp().GetTriPla(mAcch.m_gnd, &groundPla); + cXyz* normal = groundPla.GetNP(); + if (normal != NULL) { + VECReflect(&speed, normal, &speed); + speed *= speedAbs * attr()->bounce_coeff; + } else { + speed.y *= -attr()->bounce_coeff; + } + current.pos.y = mAcch.GetGroundH(); + } else if (mAcch.ChkGroundHit()) { + speed.zero(); + setAction(MODE_STAY_e); + } + + if (mAcch.ChkWallHit()) { + f32 speedAbs = speed.abs(); + cM3dGPla wallPla; + bool hit = dComIfG_Bgsp().GetTriPla(mAcchCir, &wallPla); + cXyz* normal = wallPla.GetNP(); + if (normal != NULL) { + VECReflect(&speed, normal, &speed); + speed *= speedAbs * attr()->bounce_coeff; + } else { + speed.x *= -attr()->bounce_coeff; + speed.z *= -attr()->bounce_coeff; + } + field_0x7ac *= -1; + } + + if (field_0x7ae == 0) { + if (mAcch.ChkWaterIn()) { + cXyz effectPos = current.pos; + effectPos.y = mAcch.m_wtr.GetHeight(); + for (int i = 0; i < 4; i++) { + static u16 w_eff_id[4] = { + ID_ZI_J_DOWNWTRA_A, ID_ZI_J_DOWNWTRA_B, ID_ZI_J_DOWNWTRA_C, ID_ZI_J_DOWNWTRA_D, + }; + + field_0x798[i] = dComIfGp_particle_set(field_0x798[i], w_eff_id[i], &effectPos, &tevStr); + } + Z2GetAudioMgr()->seStart(Z2SE_CM_BODYFALL_WATER_S, &effectPos, 0, false, 1.0f, 1.0f, -1.0f, -1.0f, false); + field_0x7ae = 1; + } + } + + if (field_0x7ae != 0) { + speed.x *= attr()->water_drag; + speed.z *= attr()->water_drag; + } + + f32 fVar1 = (speed.absXZ() / attr()->initial_throwing_force); + int angleOffset = (f32)field_0x7ac * fVar1; + shape_angle.z += angleOffset; + setBaseMtx(); } /* 80C50488-80C50504 000CA8 007C+00 1/0 0/0 0/0 .text initStay__14daObjKznkarm_cFv */ void daObjKznkarm_c::initStay() { - // NONMATCHING + mMode = MODE_STAY_e; + fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x80); + cLib_onBit<u32>(attention_info.flags, fopAc_AttnFlag_CARRY_e); + speedF = 0.0f; + field_0x7a8 = getGroundSlope(shape_angle.y) - 0x4000; + shape_angle.z = (s16)getGroundSlope(shape_angle.y - 0x4000); } /* 80C50504-80C505F8 000D24 00F4+00 1/0 0/0 0/0 .text executeStay__14daObjKznkarm_cFv */ void daObjKznkarm_c::executeStay() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C50D70-80C50D74 000068 0004+00 0/1 0/0 0/0 .rodata @3998 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3998 = -10.0f; -COMPILER_STRIP_GATE(0x80C50D70, &lit_3998); -#pragma pop - -/* 80C50D74-80C50D78 00006C 0004+00 0/1 0/0 0/0 .rodata @3999 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3999 = -15.0f; -COMPILER_STRIP_GATE(0x80C50D74, &lit_3999); -#pragma pop - -/* 80C50D78-80C50D7C 000070 0004+00 0/1 0/0 0/0 .rodata @4000 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4000 = 120.0f; -COMPILER_STRIP_GATE(0x80C50D78, &lit_4000); -#pragma pop - -/* 80C50D7C-80C50D80 000074 0004+00 0/1 0/0 0/0 .rodata @4001 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4001 = 40.0f; -COMPILER_STRIP_GATE(0x80C50D7C, &lit_4001); -#pragma pop - -/* 80C50D80-80C50D84 000078 0004+00 0/1 0/0 0/0 .rodata @4002 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4002 = 15.0f; -COMPILER_STRIP_GATE(0x80C50D80, &lit_4002); -#pragma pop - -/* 80C50D84-80C50D88 00007C 0004+00 0/2 0/0 0/0 .rodata @4003 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4003 = 50.0f; -COMPILER_STRIP_GATE(0x80C50D84, &lit_4003); -#pragma pop + if (shape_angle.x != field_0x7a8) { + eyePos = attention_info.position = current.pos; + cLib_chaseAngleS(&shape_angle.x, field_0x7a8, 0xc00); + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::ZrotM(shape_angle.z); + mDoMtx_stack_c::XrotM(shape_angle.x); + mDoMtx_stack_c::transM(attr()->position.x, attr()->position.y, attr()->position.z); + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); + } + if (fopAcM_checkCarryNow(this)) { + setAction(MODE_CARRY_e); + } +} /* 80C505F8-80C506DC 000E18 00E4+00 1/1 0/0 0/0 .text create_init__14daObjKznkarm_cFv */ void daObjKznkarm_c::create_init() { - // NONMATCHING + fopAcM_setCullSizeBox(this, -10.0f, -15.0f, -15.0f, 120.0f, 40.0f, 15.0f); + fopAcM_OnCarryType(this, fopAcM_CARRY_UNK_30); + attention_info.distances[fopAc_attn_CARRY_e] = 0xd; + gravity = attr()->gravity; + maxFallSpeed = attr()->maximum_falling_speed; + setAction(MODE_BROKEN_e); + initBaseMtx(); + mAcchCir.SetWall(0.0f, 50.0f); + mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); + mAcch.SetRoofNone(); + mAcch.OffClrSpeedY(); + + #if DEBUG + M_hio.ct(); + #endif } /* 80C506DC-80C50708 000EFC 002C+00 1/1 0/0 0/0 .text initBaseMtx__14daObjKznkarm_cFv */ void daObjKznkarm_c::initBaseMtx() { - // NONMATCHING + fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); + setBaseMtx(); } -/* ############################################################################################## */ -/* 80C50D88-80C50D8C 000080 0004+00 1/1 0/0 0/0 .rodata @4020 */ -SECTION_RODATA static f32 const lit_4020 = -60.0f; -COMPILER_STRIP_GATE(0x80C50D88, &lit_4020); - /* 80C50708-80C5076C 000F28 0064+00 3/3 0/0 0/0 .text setBaseMtx__14daObjKznkarm_cFv */ void daObjKznkarm_c::setBaseMtx() { - // NONMATCHING + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::transM(-60.0f, 0.0f, 0.0f); + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); } /* 80C5076C-80C507F8 000F8C 008C+00 1/1 0/0 0/0 .text getGroundSlope__14daObjKznkarm_cFs */ -void daObjKznkarm_c::getGroundSlope(s16 param_0) { - // NONMATCHING +s16 daObjKznkarm_c::getGroundSlope(s16 param_0) { + cM3dGPla groundPla; + bool hit = dComIfG_Bgsp().GetTriPla(mAcch.m_gnd, &groundPla); + if (hit) { + return fopAcM_getPolygonAngle(&groundPla, param_0); + } + return shape_angle.z; } -/* ############################################################################################## */ -/* 80C50D90-80C50D90 000088 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80C50D99 = "arm.bmd"; -#pragma pop +inline int daObjKznkarm_c::createHeap() { + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "arm.bmd"); + JUT_ASSERT(593, modelData != 0); + mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (mpModel == NULL) { + return FALSE; + } + return TRUE; +} /* 80C507F8-80C50870 001018 0078+00 1/1 0/0 0/0 .text createSolidHeap__FP10fopAc_ac_c */ -static void createSolidHeap(fopAc_ac_c* param_0) { - // NONMATCHING +static int createSolidHeap(fopAc_ac_c* a_this) { + daObjKznkarm_c* i_this = ((daObjKznkarm_c*)a_this); + return i_this->createHeap(); } -/* ############################################################################################## */ -/* 80C50D8C-80C50D90 000084 0004+00 0/1 0/0 0/0 .rodata @4114 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4114 = 600.0f; -COMPILER_STRIP_GATE(0x80C50D8C, &lit_4114); -#pragma pop +inline int daObjKznkarm_c::draw() { + g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); + dComIfGd_setListBG(); + mDoExt_modelUpdateDL(mpModel); + dComIfGd_setList(); + + cXyz shadowPos = cXyz(current.pos.x, current.pos.y + 50.0f, current.pos.z); + mShadowId = dComIfGd_setShadow(mShadowId, 1, mpModel, &shadowPos, 600.0f, 0.0f, + current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + return 1; +} /* 80C50870-80C50984 001090 0114+00 1/0 0/0 0/0 .text daObjKznkarm_Draw__FP14daObjKznkarm_c */ -static void daObjKznkarm_Draw(daObjKznkarm_c* param_0) { - // NONMATCHING +static int daObjKznkarm_Draw(daObjKznkarm_c* i_this) { + return i_this->draw(); } -/* 80C50984-80C509A8 0011A4 0024+00 1/0 0/0 0/0 .text daObjKznkarm_Execute__FP14daObjKznkarm_c */ -static void daObjKznkarm_Execute(daObjKznkarm_c* param_0) { - // NONMATCHING -} +inline int daObjKznkarm_c::execute() { + #if DEBUG + gravity = attr()->gravity; + maxFallSpeed = attr()->maximum_falling_speed; + #endif -/* 80C509A8-80C509B0 0011C8 0008+00 1/0 0/0 0/0 .text daObjKznkarm_IsDelete__FP14daObjKznkarm_c */ -static bool daObjKznkarm_IsDelete(daObjKznkarm_c* param_0) { - return true; + callExecute(); + return 1; } -/* 80C509B0-80C50A5C 0011D0 00AC+00 1/0 0/0 0/0 .text daObjKznkarm_Delete__FP14daObjKznkarm_c */ -static void daObjKznkarm_Delete(daObjKznkarm_c* param_0) { - // NONMATCHING +/* 80C50984-80C509A8 0011A4 0024+00 1/0 0/0 0/0 .text daObjKznkarm_Execute__FP14daObjKznkarm_c */ +static int daObjKznkarm_Execute(daObjKznkarm_c* i_this) { + return i_this->execute(); } -/* 80C50A5C-80C50B3C 00127C 00E0+00 1/0 0/0 0/0 .text daObjKznkarm_Create__FP10fopAc_ac_c - */ -static void daObjKznkarm_Create(fopAc_ac_c* param_0) { - // NONMATCHING +/* 80C509A8-80C509B0 0011C8 0008+00 1/0 0/0 0/0 .text daObjKznkarm_IsDelete__FP14daObjKznkarm_c */ +static int daObjKznkarm_IsDelete(daObjKznkarm_c* i_this) { + return 1; } -/* 80C50B3C-80C50BAC 00135C 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING +inline daObjKznkarm_c::~daObjKznkarm_c() { + #if DEBUG + M_hio.dt(); + #endif + dComIfG_resDelete(&mPhase, l_arcName); } -/* 80C50BAC-80C50C1C 0013CC 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING +/* 80C509B0-80C50A5C 0011D0 00AC+00 1/0 0/0 0/0 .text daObjKznkarm_Delete__FP14daObjKznkarm_c */ +static int daObjKznkarm_Delete(daObjKznkarm_c* i_this) { + fopAcM_RegisterDeleteID(i_this, "KznkArm"); + i_this->~daObjKznkarm_c(); + return 1; } -/* 80C50C1C-80C50CEC 00143C 00D0+00 0/0 1/0 0/0 .text __sinit_d_a_obj_kznkarm_cpp */ -void __sinit_d_a_obj_kznkarm_cpp() { - // NONMATCHING +inline int daObjKznkarm_c::create() { + fopAcM_SetupActor(this, daObjKznkarm_c); + int rv = dComIfG_resLoad(&mPhase, l_arcName); + if (rv == cPhs_COMPLEATE_e) { + if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x4000)) { + return cPhs_ERROR_e; + } + create_init(); + } + return rv; } -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80C50C1C, __sinit_d_a_obj_kznkarm_cpp); -#pragma pop - -/* 80C50CEC-80C50CF4 00150C 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80C50CEC() { - // NONMATCHING +/* 80C50A5C-80C50B3C 00127C 00E0+00 1/0 0/0 0/0 .text daObjKznkarm_Create__FP10fopAc_ac_c + */ +static int daObjKznkarm_Create(fopAc_ac_c* i_this) { + fopAcM_RegisterCreateID(daObjKznkarm_c, i_this, "KznkArm"); + return a_this->create(); } -/* 80C50CF4-80C50CFC 001514 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80C50CF4() { - // NONMATCHING -} +/* 80C50E90-80C50EB0 -00001 0020+00 1/0 0/0 0/0 .data l_daObjKznkarm_Method */ +static actor_method_class l_daObjKznkarm_Method = { + (process_method_func)daObjKznkarm_Create, + (process_method_func)daObjKznkarm_Delete, + (process_method_func)daObjKznkarm_Execute, + (process_method_func)daObjKznkarm_IsDelete, + (process_method_func)daObjKznkarm_Draw, +}; + +/* 80C50EB0-80C50EE0 -00001 0030+00 0/0 0/0 1/0 .data g_profile_Obj_KznkArm */ +extern actor_process_profile_definition g_profile_Obj_KznkArm = { + fpcLy_CURRENT_e, // mLayerID + 7, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_Obj_KznkArm, // mProcName + &g_fpcLf_Method.base, // sub_method + sizeof(daObjKznkarm_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 31, // mPriority + &l_daObjKznkarm_Method, // sub_method + 0x00044100, // mStatus + fopAc_ACTOR_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType +}; /* 80C50D90-80C50D90 000088 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_title.cpp b/src/d/actor/d_a_title.cpp index 960a32a02e..df42d70e34 100644 --- a/src/d/actor/d_a_title.cpp +++ b/src/d/actor/d_a_title.cpp @@ -41,7 +41,11 @@ static u8 const lit_3772[12] = { }; /* 80D67BE0-80D67BE8 00000C 0006+02 3/3 0/0 0/0 .rodata l_arcName */ -static char const l_arcName[6] = "Title"; +#if VERSION == VERSION_GCN_PAL +static char const l_arcName[] = "TitlePal"; +#else +static char const l_arcName[] = "Title"; +#endif static procFunc daTitleProc[6] = { &daTitle_c::loadWait_proc, &daTitle_c::logoDispWait, &daTitle_c::logoDispAnm, @@ -52,7 +56,25 @@ static procFunc daTitleProc[6] = { daTit_HIO_c::daTit_HIO_c() { mPSScaleX = 1.0f; mPSScaleY = 1.0f; + + #if VERSION == VERSION_GCN_PAL + + switch (OSGetLanguage()) { + case OS_LANGUAGE_ENGLISH: + case OS_LANGUAGE_GERMAN: + case OS_LANGUAGE_SPANISH: + case OS_LANGUAGE_ITALIAN: + case OS_LANGUAGE_DUTCH: + mPSPosX = 303.0f; + break; + case OS_LANGUAGE_FRENCH: + mPSPosX = 304.0f; + break; + } + #else mPSPosX = 303.0f; + #endif + mPSPosY = 347.0f; mAppear = 15; mArrow = 60; diff --git a/src/d/d_error_msg.cpp b/src/d/d_error_msg.cpp index 3507fd4a4b..6416755509 100644 --- a/src/d/d_error_msg.cpp +++ b/src/d/d_error_msg.cpp @@ -17,6 +17,12 @@ #include "assets/black_tex.h" #include "assets/msg_data.h" +#if VERSION == VERSION_GCN_PAL +#include "assets/msg_data_ge.h" +#include "assets/msg_data_fr.h" +#include "assets/msg_data_sp.h" +#include "assets/msg_data_it.h" +#endif #include "assets/font_data.h" #define MSG_READING_DISC 0 @@ -44,8 +50,26 @@ struct BMG_INF1 : JUTDataBlockHeader { /* 8009CB88-8009D194 0974C8 060C+00 1/1 0/0 0/0 .text messageSet__FUlb */ static void messageSet(u32 status, bool i_drawBg) { - BMG_INF1* inf1 = (BMG_INF1*)&msg_data[0x20]; - const char* msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]); + BMG_INF1* inf1; + const char* msg_p; + + #if VERSION == VERSION_GCN_PAL + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_GERMAN) { + inf1 = (BMG_INF1*)&msg_data_ge[0x20]; + } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_FRENCH) { + inf1 = (BMG_INF1*)&msg_data_fr[0x20]; + } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_SPANISH) { + inf1 = (BMG_INF1*)&msg_data_sp[0x20]; + } else if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ITALIAN) { + inf1 = (BMG_INF1*)&msg_data_it[0x20]; + } else { + inf1 = (BMG_INF1*)&msg_data[0x20]; + } + #else + inf1 = (BMG_INF1*)&msg_data[0x20]; + #endif + + msg_p = (const char*)((u8*)inf1->getNext() + sizeof(JUTDataBlockHeader) + inf1->entries[status]); JUT_ASSERT(102, strlen(msg_p)-1 < 512); @@ -141,9 +165,19 @@ static void messageSet(u32 status, bool i_drawBg) { ppane.draw(0.0f, 0.0f, 608.0f, 448.0f, false, false, false); } + #if VERSION == VERSION_GCN_PAL + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) { + spane.draw(x + 2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_LEFT); + tpane.draw(x, y + 10.0f, 608.0f, HBIND_LEFT); + } else { + spane.draw(2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_CENTER); + tpane.draw(0.0f, y + 10.0f, 608.0f, HBIND_CENTER); + } + #else spane.draw(x + 2.0f, y + 10.0f + 2.0f, 608.0f, HBIND_LEFT); tpane.draw(x, y + 10.0f, 608.0f, HBIND_LEFT); #endif + #endif } /* 8009D194-8009D354 097AD4 01C0+00 1/1 0/0 0/0 .text draw__14dDvdErrorMsg_cFl */ diff --git a/src/d/d_file_sel_info.cpp b/src/d/d_file_sel_info.cpp index 5c5dbf57f8..f217de49e4 100644 --- a/src/d/d_file_sel_info.cpp +++ b/src/d/d_file_sel_info.cpp @@ -177,7 +177,15 @@ void dFile_info_c::setSaveDate(dSv_save_c* i_savedata) { #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) sprintf(mSaveDate, "%d.%02d.%02d %02d:%02d", time.year, time.mon + 1, time.mday, time.hour, time.min); - #else + #elif VERSION == VERSION_GCN_PAL + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) { + sprintf(mSaveDate, "%02d/%02d/%d %02d:%02d", time.mon + 1, time.mday, time.year, time.hour, + time.min); + } else { + sprintf(mSaveDate, "%02d/%02d/%d %02d:%02d", time.mday, time.mon + 1, time.year, time.hour, + time.min); + } +#else sprintf(mSaveDate, "%02d/%02d/%d %02d:%02d", time.mon + 1, time.mday, time.year, time.hour, time.min); #endif diff --git a/src/d/d_menu_fishing.cpp b/src/d/d_menu_fishing.cpp index a5460cb8ec..37d1c5be50 100644 --- a/src/d/d_menu_fishing.cpp +++ b/src/d/d_menu_fishing.cpp @@ -137,10 +137,25 @@ bool dMenu_Fishing_c::isSync() { /* 801C522C-801C52E4 1BFB6C 00B8+00 1/1 0/0 0/0 .text init__15dMenu_Fishing_cFv */ void dMenu_Fishing_c::init() { + #if VERSION == VERSION_GCN_PAL + BOOL isEnglish = FALSE; + if (dComIfGs_getPalLanguage() == dSv_player_config_c::LANGAUGE_ENGLISH) { + isEnglish = TRUE; + } + #endif + for (int i = 0; i < MAX_FINDABLE_FISHES; i++) { if (dComIfGs_getFishNum(i) != 0) { // Fish has been caught once, display it along with it's params + #if VERSION == VERSION_GCN_PAL + if (isEnglish) { + setFishParam(i, dComIfGs_getFishNum(i), dComIfGs_getFishSize(i) / 2.54f); + } else { + setFishParam(i, dComIfGs_getFishNum(i), dComIfGs_getFishSize(i)); + } + #else setFishParam(i, dComIfGs_getFishNum(i), dComIfGs_getFishSize(i)); + #endif mpFishParent[i]->show(); } else { // Fish hasn't been caught yet, don't display it and also hide params diff --git a/src/d/d_s_name.cpp b/src/d/d_s_name.cpp index a955e5b2db..6d3984383f 100644 --- a/src/d/d_s_name.cpp +++ b/src/d/d_s_name.cpp @@ -19,6 +19,10 @@ /* 804510F0-804510F8 0005F0 0008+00 2/2 0/0 0/0 .sbss g_snHIO */ static dSn_HIO_c g_snHIO; +#if VERSION == VERSION_GCN_PAL +static int mBmgStatus; +#endif + /* 803C3094-803C30DC 0201B4 0048+00 1/2 0/0 0/0 .data MainProc */ typedef void (dScnName_c::*mainProcFunc)(void); static mainProcFunc MainProc[6] = { @@ -75,6 +79,11 @@ s32 dScnName_c::create() { dRes_info_c* res = dComIfG_getObjectResInfo("fileSel"); dFs_c = new dFile_select_c(res->getArchive()); + + #if VERSION == VERSION_GCN_PAL + for (int i = 0; i < 5; i++); + #endif + dFs_c->_create(); if (fpcM_GetName(this) == PROC_NAME_SCENE) { @@ -114,11 +123,28 @@ s32 dScnName_c::create() { field_0x41c = 0; field_0x41d = 0; mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30); + + #if VERSION == VERSION_GCN_PAL + mBmgStatus = 0; + #endif + dComIfGp_getVibration().Init(); } return phase_state; } +#if VERSION == VERSION_GCN_PAL +static const char* dummyString(int i) { + switch (i) { + case 0: return "/res/Msguk/bmgres.arc"; + case 1: return "/res/Msgde/bmgres.arc"; + case 2: return "/res/Msgfr/bmgres.arc"; + case 3: return "/res/Msgsp/bmgres.arc"; + case 4: return "/res/Msgit/bmgres.arc"; + } +} +#endif + /* 80258B2C-80258BC8 25346C 009C+00 1/1 0/0 0/0 .text setView__10dScnName_cFv */ void dScnName_c::setView() { C_MTXPerspective(mCamera.projMtx, mCamera.fovy, mCamera.aspect, mCamera.near, @@ -134,6 +160,16 @@ void dScnName_c::setView() { mDoMtx_concatProjView(mCamera.projMtx, mCamera.viewMtx, mCamera.projViewMtx); } +#if VERSION == VERSION_GCN_PAL +void dScnName_c::bmg_data_set(){ + if (fopAcM_GetName(this) == PROC_NAMEEX_SCENE) { + mBmgStatus = 10; + } +} + +void dScnName_c::tex_data_set() {} +#endif + /* 80258BC8-80258C5C 253508 0094+00 1/1 0/0 0/0 .text execute__10dScnName_cFv */ s32 dScnName_c::execute() { if (fopOvlpM_IsPeek() == 0) { @@ -294,6 +330,12 @@ static int dScnName_IsDelete(dScnName_c*) { /* 80259230-80259258 253B70 0028+00 1/0 0/0 0/0 .text dScnName_Delete__FP10dScnName_c */ static int dScnName_Delete(dScnName_c* i_this) { + #if VERSION == VERSION_GCN_PAL + i_this->bmg_data_set(); + i_this->tex_data_set(); + mBmgStatus = 0; + #endif + i_this->~dScnName_c(); return 1; } |
