From 47ac1d4a4cbc5a6835c80d80e7756d6b4a6cd0a6 Mon Sep 17 00:00:00 2001 From: kipcode66 Date: Mon, 22 Dec 2025 05:20:08 -0500 Subject: [PATCH] 4th round of standard compiler fixes (#2984) * 4th round of standard compiler fixes * use of fpcM_ERROR_PROCESS_ID_e in gWolfBustersID --- include/JSystem/JHostIO/JOREntry.h | 1 + include/d/actor/d_a_npc_kn.h | 2 +- include/revolution/os.h | 20 ++++---- src/d/actor/d_a_b_ds.cpp | 4 +- src/d/actor/d_a_b_yo.cpp | 2 +- src/d/actor/d_a_bd.cpp | 2 +- src/d/actor/d_a_cow.cpp | 2 +- src/d/actor/d_a_demo00.cpp | 4 +- src/d/actor/d_a_e_dd.cpp | 4 +- src/d/actor/d_a_e_gb.cpp | 10 ++-- src/d/actor/d_a_e_gm.cpp | 4 +- src/d/actor/d_a_e_kr.cpp | 2 +- src/d/actor/d_a_e_mk.cpp | 2 +- src/d/actor/d_a_e_pm.cpp | 6 ++- src/d/actor/d_a_e_po.cpp | 6 +-- src/d/actor/d_a_e_pz.cpp | 4 +- src/d/actor/d_a_e_s1.cpp | 6 +-- src/d/actor/d_a_e_sm2.cpp | 4 +- src/d/actor/d_a_e_st.cpp | 4 +- src/d/actor/d_a_e_wb.cpp | 2 +- src/d/actor/d_a_e_yk.cpp | 3 +- src/d/actor/d_a_e_yr.cpp | 2 +- src/d/actor/d_a_movie_player.cpp | 2 +- src/d/actor/d_a_npc_ashB.cpp | 3 +- src/d/actor/d_a_npc_bans.cpp | 18 ++++---- src/d/actor/d_a_npc_bouS.cpp | 4 +- src/d/actor/d_a_npc_chat.cpp | 68 ++++++++++++++-------------- src/d/actor/d_a_npc_coach.cpp | 2 +- src/d/actor/d_a_npc_grz.cpp | 6 +-- src/d/actor/d_a_npc_gwolf.cpp | 2 +- src/d/actor/d_a_npc_jagar.cpp | 2 +- src/d/actor/d_a_npc_kasi_kyu.cpp | 3 +- src/d/actor/d_a_npc_kn.cpp | 4 +- src/d/actor/d_a_npc_kn_base.inc | 2 +- src/d/actor/d_a_npc_seib.cpp | 2 +- src/d/actor/d_a_npc_taro.cpp | 2 +- src/d/actor/d_a_npc_wrestler.cpp | 2 +- src/d/actor/d_a_npc_ykm.cpp | 6 +-- src/d/actor/d_a_npc_zelR.cpp | 2 +- src/d/actor/d_a_obj_TvCdlst.cpp | 2 +- src/d/actor/d_a_obj_bemos.cpp | 4 +- src/d/actor/d_a_obj_bk_leaf.cpp | 2 +- src/d/actor/d_a_obj_brg.cpp | 2 +- src/d/actor/d_a_obj_drop.cpp | 2 +- src/d/actor/d_a_obj_gra2.cpp | 4 +- src/d/actor/d_a_obj_iceblock.cpp | 6 +-- src/d/actor/d_a_obj_kanban2.cpp | 14 +++--- src/d/actor/d_a_obj_kznkarm.cpp | 2 +- src/d/actor/d_a_obj_lp.cpp | 4 +- src/d/actor/d_a_obj_maki.cpp | 2 +- src/d/actor/d_a_obj_nameplate.cpp | 2 +- src/d/actor/d_a_obj_prop.cpp | 2 +- src/d/actor/d_a_obj_sakuita_rope.cpp | 2 +- src/d/actor/d_a_obj_sekizoa.cpp | 12 ++--- src/d/actor/d_a_obj_smtile.cpp | 8 ++-- src/d/actor/d_a_obj_ss_item.cpp | 2 +- src/d/actor/d_a_obj_twGate.cpp | 8 ++-- src/d/actor/d_a_obj_zdoor.cpp | 4 +- src/d/actor/d_a_tag_Lv6Gate.cpp | 6 ++- src/d/actor/d_a_tag_evt.cpp | 2 +- src/d/actor/d_a_tag_myna_light.cpp | 2 +- src/d/actor/d_a_tag_pachi.cpp | 2 +- src/d/actor/d_a_tag_push.cpp | 2 +- src/d/actor/d_a_tag_ss_drink.cpp | 2 +- tools/converters/matDL_dis.py | 6 +-- 65 files changed, 170 insertions(+), 162 deletions(-) diff --git a/include/JSystem/JHostIO/JOREntry.h b/include/JSystem/JHostIO/JOREntry.h index 829c78a3ec..76780640e7 100644 --- a/include/JSystem/JHostIO/JOREntry.h +++ b/include/JSystem/JHostIO/JOREntry.h @@ -2,6 +2,7 @@ #define JORENTRY_H #include "JSystem/JHostIO/JHIComm.h" +#include "dolphin/os.h" template class JHIpvector { diff --git a/include/d/actor/d_a_npc_kn.h b/include/d/actor/d_a_npc_kn.h index ba2ca57241..38061ff17c 100644 --- a/include/d/actor/d_a_npc_kn.h +++ b/include/d/actor/d_a_npc_kn.h @@ -179,7 +179,7 @@ public: public: void initialize() { - memset(&mFootLPos, 0, (int)&field_0xe3c - (int)&mFootLPos); + memset(&mFootLPos, 0, (intptr_t)&field_0xe3c - (intptr_t)&mFootLPos); mFaceMotionSeqMngr.initialize(); mMotionSeqMngr.initialize(); diff --git a/include/revolution/os.h b/include/revolution/os.h index c2b6248f20..7ab36c7361 100644 --- a/include/revolution/os.h +++ b/include/revolution/os.h @@ -320,9 +320,9 @@ extern BOOL __OSInReboot; #define ASSERT(cond) ASSERTLINE(__LINE__, cond) -static inline u8 __OSf32tou8(register f32 in) { +static inline u8 __OSf32tou8(__REGISTER f32 in) { f32 a; - register f32* ptr = &a; + __REGISTER f32* ptr = &a; u8 r; #if defined(__MWERKS__) @@ -336,9 +336,9 @@ static inline u8 __OSf32tou8(register f32 in) { return r; } -static inline u16 __OSf32tou16(register f32 in) { +static inline u16 __OSf32tou16(__REGISTER f32 in) { f32 a; - register f32* ptr = &a; + __REGISTER f32* ptr = &a; u16 r; #if defined(__MWERKS__) @@ -352,9 +352,9 @@ static inline u16 __OSf32tou16(register f32 in) { return r; } -static inline s16 __OSf32tos16(register f32 in) { +static inline s16 __OSf32tos16(__REGISTER f32 in) { f32 a; - register f32* ptr = &a; + __REGISTER f32* ptr = &a; s16 r; #if defined(__MWERKS__) @@ -368,8 +368,8 @@ static inline s16 __OSf32tos16(register f32 in) { return r; } -static inline f32 __OSu16tof32(register u16 const* arg) { - register f32 ret; +static inline f32 __OSu16tof32(__REGISTER u16 const* arg) { + __REGISTER f32 ret; #if defined(__MWERKS__) asm { psq_l ret, 0(arg), 1, 3 }; @@ -381,8 +381,8 @@ static inline f32 __OSu16tof32(register u16 const* arg) { return ret; } -static inline f32 __OSs16tof32(register s16 const* arg) { - register f32 ret; +static inline f32 __OSs16tof32(__REGISTER s16 const* arg) { + __REGISTER f32 ret; #if defined(__MWERKS__) asm { psq_l ret, 0(arg), 1, 5 }; diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index c559e6d25f..2a24597c0c 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -790,8 +790,8 @@ void daB_DS_c::mCreateTrap(bool param_0) { angle.x = 0; pos.y = 1708.0f; - static s16 mBirthAngle01_dt[4] = {0x0000, 0x4000, 0x8000, 0xc000}; - static s16 mBirthAngle02_dt[3] = {0x0000, 0x5555, 0xaaaa}; + static s16 mBirthAngle01_dt[4] = {0x0000, 0x4000, -0x8000, -0x4000}; + static s16 mBirthAngle02_dt[3] = {0x0000, 0x5555, -0x5556}; static f32 mBirthYpos02_dt[3] = {1150.0f, 350.0f, -450.0f}; if (mBossPhase == 0) { diff --git a/src/d/actor/d_a_b_yo.cpp b/src/d/actor/d_a_b_yo.cpp index ce7a543f18..1129892346 100644 --- a/src/d/actor/d_a_b_yo.cpp +++ b/src/d/actor/d_a_b_yo.cpp @@ -569,7 +569,7 @@ void daB_YO_c::setIcicleSubNumber() { } void daB_YO_c::setWindowBreakEffect(int param_0) { - static s16 yo_window_angle[6] = {0xC000, 0xE000, 0x6000, 0x2000, 0x4000, 0x0000}; + static s16 yo_window_angle[6] = {-0x4000, -0x2000, 0x6000, 0x2000, 0x4000, 0x0000}; static u16 madoware_effect_id[4] = {0x87C1, 0x87C2, 0x87C3, 0x87C4}; csXyz angle(0, yo_window_angle[param_0], 0); cXyz pos(0.0f, 0.0f, 0.0f); diff --git a/src/d/actor/d_a_bd.cpp b/src/d/actor/d_a_bd.cpp index 9c71ef8564..786ff431cb 100644 --- a/src/d/actor/d_a_bd.cpp +++ b/src/d/actor/d_a_bd.cpp @@ -281,7 +281,7 @@ static void drop_check(bd_class* i_this) { static void turn_set(bd_class* i_this) { - s16 angle_table[3] = {0x8000, 0x4000, -0x4000}; + s16 angle_table[3] = {-0x8000, 0x4000, -0x4000}; s16 angle = angle_table[(int)cM_rndF(2.99f)]; i_this->mTargetAngleY = i_this->enemy.current.angle.y + angle; } diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp index 8807f4443b..0dc61d0bb8 100644 --- a/src/d/actor/d_a_cow.cpp +++ b/src/d/actor/d_a_cow.cpp @@ -59,7 +59,7 @@ static f32 l_CowRoomPosX[20] = {-10600.0f, -10600.0f, -10800.0f, -10800.0f, -110 static f32 l_CowRoomPosZ[2] = {-19646.0f, -20926.0f}; #define N_WOLF_BUSTERS 3 -extern fpc_ProcID gWolfBustersID[N_WOLF_BUSTERS] = {-1, -1, -1}; +extern fpc_ProcID gWolfBustersID[N_WOLF_BUSTERS] = {fpcM_ERROR_PROCESS_ID_e, fpcM_ERROR_PROCESS_ID_e, fpcM_ERROR_PROCESS_ID_e}; } // namespace diff --git a/src/d/actor/d_a_demo00.cpp b/src/d/actor/d_a_demo00.cpp index 6459c6e67f..ba2020af60 100644 --- a/src/d/actor/d_a_demo00.cpp +++ b/src/d/actor/d_a_demo00.cpp @@ -1465,8 +1465,8 @@ static void ke_move(daDemo00_c* i_this, mDoExt_3DlineMat0_c* param_2, demo_s1_ke static void ke_set(daDemo00_c* i_this) { static s16 ke_za[22] = { - 0xFCE0, 0xFE70, 0, 0x0190, 0x0320, 0xFCE0, 0xFE70, 0, 0x0190, 0x0320, - 0xFCE0, 0xFE70, 0, 0x0190, 0x0320, 0x04B0, 0xFCE0, 0xFE70, 0, + -0x0320, -0x0190, 0, 0x0190, 0x0320, -0x0320, -0x0190, 0, 0x0190, 0x0320, + -0x0320, -0x0190, 0, 0x0190, 0x0320, 0x04B0, -0x0320, -0x0190, 0, 0x0190, 0x0320, 0x04B0, }; diff --git a/src/d/actor/d_a_e_dd.cpp b/src/d/actor/d_a_e_dd.cpp index 692d48d7d1..3cbb299229 100644 --- a/src/d/actor/d_a_e_dd.cpp +++ b/src/d/actor/d_a_e_dd.cpp @@ -1622,11 +1622,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { static int kabe_initial_pos_set(e_dd_class* i_this) { static s16 ya[5] = { - -0x4000, 0x4000, 0x0000, 0x8000, 0x0000, + -0x4000, 0x4000, 0x0000, -0x8000, 0x0000, }; static s16 xa[5] = { - 0xC000, 0xC000, 0xC000, 0xC000, 0x8000, + -0x4000, -0x4000, -0x4000, -0x4000, -0x8000, }; fopAc_ac_c* a_this = &i_this->actor; diff --git a/src/d/actor/d_a_e_gb.cpp b/src/d/actor/d_a_e_gb.cpp index 46593a7671..c343855360 100644 --- a/src/d/actor/d_a_e_gb.cpp +++ b/src/d/actor/d_a_e_gb.cpp @@ -522,8 +522,8 @@ static void e_gb_start(e_gb_class* i_this) { static void kuki_control1(e_gb_class* i_this) { static s16 pow_xa[17] = { - 0xD000, 0xD800, 0xE000, - 0xE800, 0xF000, 0x0000, + -0x3000, -0x2800, -0x2000, + -0x1800, -0x1000, 0x0000, 0x1000, 0x1800, 0x2000, 0x2800, 0x3000, 0x3800, 0x3000, 0x2000, 0x1000, @@ -531,9 +531,9 @@ static void kuki_control1(e_gb_class* i_this) { }; static s16 pow_xa_chance[17] = { - 0xC800, 0xD000, 0xD800, - 0xE000, 0xE800, 0xF000, - 0xF800, 0x0000, 0x0000, + -0x3800, -0x3000, -0x2800, + -0x2000, -0x1800, -0x1000, + -0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0000, 0x0800, 0x0000, 0x0800, diff --git a/src/d/actor/d_a_e_gm.cpp b/src/d/actor/d_a_e_gm.cpp index 2662d37ea4..a8ac1c38fb 100644 --- a/src/d/actor/d_a_e_gm.cpp +++ b/src/d/actor/d_a_e_gm.cpp @@ -332,11 +332,11 @@ void daE_GM_c::appear() { } static s16 const l_rand[4] = { - 0xF800, 0x0400, 0xFC00, 0x0800, + -0x0800, 0x0400, -0x0400, 0x0800, }; static s16 const l_rand2[4] = { - 0xD000, 0x3800, 0xB800, 0x5000, + -0x3000, 0x3800, -0x4800, 0x5000, }; static f32 const l_rand_base_spd[4] = { diff --git a/src/d/actor/d_a_e_kr.cpp b/src/d/actor/d_a_e_kr.cpp index 1b5d7983bf..dcf169de9e 100644 --- a/src/d/actor/d_a_e_kr.cpp +++ b/src/d/actor/d_a_e_kr.cpp @@ -2233,7 +2233,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } J3DModel* model = kr->mpMorf->getModel(); - model->setUserArea((int)kr); + model->setUserArea((intptr_t)kr); for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) { if (i != 0) { diff --git a/src/d/actor/d_a_e_mk.cpp b/src/d/actor/d_a_e_mk.cpp index 359ad64c22..342145b851 100644 --- a/src/d/actor/d_a_e_mk.cpp +++ b/src/d/actor/d_a_e_mk.cpp @@ -6,7 +6,7 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_e_mk.h" -#include "..\assets\GZ2E01\res\Object\E_mk.h" +#include "res/Object/E_mk.h" #include "d/d_cc_d.h" #include "d/d_com_inf_game.h" #include "d/actor/d_a_obj_pillar.h" diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index ce1057b26d..44012d42c8 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -2056,7 +2056,8 @@ void daE_PM_c::BossAction() { } int daE_PM_c::Execute() { - s_LinkPos = &fopAcM_GetPosition(daPy_getPlayerActorClass()); + daPy_py_c* actor = daPy_getPlayerActorClass(); + s_LinkPos = &fopAcM_GetPosition(actor); s_TargetAngle = cLib_targetAngleY(¤t.pos, s_LinkPos); s_dis = current.pos.abs(*s_LinkPos); @@ -2078,7 +2079,8 @@ int daE_PM_c::Execute() { } LampAction(); - setMidnaBindEffect(this, &mCreatureSound, ¤t.pos, &cXyz(1.5f, 1.5f, 1.5f)); + cXyz i_effSize(1.5f, 1.5f, 1.5f); + setMidnaBindEffect(this, &mCreatureSound, ¤t.pos, &i_effSize); EyeMove(); mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); setCcCylinder(); diff --git a/src/d/actor/d_a_e_po.cpp b/src/d/actor/d_a_e_po.cpp index 7e0e1c5b77..d8fa2eb877 100644 --- a/src/d/actor/d_a_e_po.cpp +++ b/src/d/actor/d_a_e_po.cpp @@ -1,5 +1,5 @@ /** -* @file d_a_e_po.cpp + * @file d_a_e_po.cpp * */ @@ -1706,8 +1706,8 @@ static void e_po_holl_demo(e_po_class* i_this) { }; static s16 mKAngInit_dt[4] = { 0x0000, - 0x8000, - 0x8000, + -0x8000, + -0x8000, 0x0000, }; diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp index 379a10a442..aced6e3cab 100644 --- a/src/d/actor/d_a_e_pz.cpp +++ b/src/d/actor/d_a_e_pz.cpp @@ -1766,8 +1766,8 @@ static const struct { }; static const s16 mDBaBa_birthAngle_dt[] = { - 0x0000, 0x2AAA, 0x5554, 0x7FFE, 0xAAA8, 0xD552, - 0x1000, 0x3AAA, 0x6554, 0x8FFE, 0xBAA8, 0xE552, + 0x0000, 0x2AAA, 0x5554, 0x7FFE, -0x5558, -0x2AAE, + 0x1000, 0x3AAA, 0x6554, -0x7002, -0x4558, -0x1AAE, }; static const f32 mDBaBa_birthHani_dt[] = { diff --git a/src/d/actor/d_a_e_s1.cpp b/src/d/actor/d_a_e_s1.cpp index 2732be24aa..b7280cec47 100644 --- a/src/d/actor/d_a_e_s1.cpp +++ b/src/d/actor/d_a_e_s1.cpp @@ -1554,9 +1554,9 @@ static void ke_set(e_s1_class* i_this) { cMtx_XrotM(*calc_mtx, (ZREG_S(1) + (int)cM_rndF2(2000.0f) + 3000)); static s16 ke_za[] = { - 0xFCE0, 0xFE70, 0x0000, 0x0190, 0x0320, 0xFCE0, 0xFE70, - 0x0000, 0x0190, 0x0320, 0xFCE0, 0xFE70, 0x0000, 0x0190, - 0x0320, 0x04B0, 0xFCE0, 0xFE70, 0x0000, 0x0190, 0x0320, + -0x0320, -0x0190, 0x0000, 0x0190, 0x0320, -0x0320, -0x0190, + 0x0000, 0x0190, 0x0320, -0x0320, -0x0190, 0x0000, 0x0190, + 0x0320, 0x04B0, -0x0320, -0x0190, 0x0000, 0x0190, 0x0320, 0x04B0, }; diff --git a/src/d/actor/d_a_e_sm2.cpp b/src/d/actor/d_a_e_sm2.cpp index 6d88146a7f..09b2dcf99c 100644 --- a/src/d/actor/d_a_e_sm2.cpp +++ b/src/d/actor/d_a_e_sm2.cpp @@ -898,8 +898,8 @@ static void damage_check(e_sm2_class* i_this) { for (int j = 0; j < bun_d[i_this->sizetype]; j++) { static int j_d[] = {0, 6, 1, 5, 2, 4, 0, 6, 1, 5, 2, 4}; static s16 ya_d[] = { - 0x0000, 0x8000, 0x0000, 0x8000, 0x0000, 0x8000, - 0x0000, 0x8000, 0x0000, 0x8000, 0x0000, 0x8000, + 0x0000, -0x8000, 0x0000, -0x8000, 0x0000, -0x8000, + 0x0000, -0x8000, 0x0000, -0x8000, 0x0000, -0x8000, }; static f32 y_ad[] = {20.0f, 30.0f, 40.0f, 50.0f, 60.0f,}; diff --git a/src/d/actor/d_a_e_st.cpp b/src/d/actor/d_a_e_st.cpp index c86cf0fb42..f9e054df78 100644 --- a/src/d/actor/d_a_e_st.cpp +++ b/src/d/actor/d_a_e_st.cpp @@ -2909,11 +2909,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { } static s16 ya[6] = { - -0x4000, 0x4000, 0x0000, 0x8000, 0x0000, 0x0000, + -0x4000, 0x4000, 0x0000, -0x8000, 0x0000, 0x0000, }; static s16 xa[6] = { - -0x4000, -0x4000, -0x4000, -0x4000, 0x0000, 0x8000, + -0x4000, -0x4000, -0x4000, -0x4000, 0x0000, -0x8000, }; static int kabe_initial_pos_set(e_st_class* i_this) { diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index e3c58328db..f6b24f569c 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -1991,7 +1991,7 @@ static void e_wb_b_ikki(e_wb_class* i_this) { csXyz cStack_a8; for (int i = 0; i < 2; i++) { static s16 f_ya[2] = { - 0x8000, + -0x8000, 0x0000, }; diff --git a/src/d/actor/d_a_e_yk.cpp b/src/d/actor/d_a_e_yk.cpp index 11e9670cdf..77cd789eb5 100644 --- a/src/d/actor/d_a_e_yk.cpp +++ b/src/d/actor/d_a_e_yk.cpp @@ -1356,7 +1356,8 @@ static int daE_YK_Execute(e_yk_class* i_this) { i_this->mCollisionSphere.SetR(30.0f * l_HIO.mModelScale); dComIfG_Ccsp()->Set(&i_this->mCollisionSphere); - setMidnaBindEffect(_this,&i_this->mCreature,&_this->eyePos,&cXyz(0.5f,0.5f,0.5f)); + cXyz i_effSize(0.5f,0.5f,0.5f); + setMidnaBindEffect(_this,&i_this->mCreature,&_this->eyePos,&i_effSize); } return 1; diff --git a/src/d/actor/d_a_e_yr.cpp b/src/d/actor/d_a_e_yr.cpp index 54c33fcded..a2af66423f 100644 --- a/src/d/actor/d_a_e_yr.cpp +++ b/src/d/actor/d_a_e_yr.cpp @@ -2407,7 +2407,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } J3DModel* model = yr->mpMorfSO->getModel(); - model->setUserArea((int)yr); + model->setUserArea((intptr_t)yr); for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) { if (i != 0) { diff --git a/src/d/actor/d_a_movie_player.cpp b/src/d/actor/d_a_movie_player.cpp index 3656cd0a0a..0356df3dae 100644 --- a/src/d/actor/d_a_movie_player.cpp +++ b/src/d/actor/d_a_movie_player.cpp @@ -3710,7 +3710,7 @@ BOOL daMP_WaitUntilPrepare() { OSMessage msg; OSReceiveMessage(&daMP_PrepareReadyQueue, &msg, 1); - if ((BOOL)msg) { + if ((intptr_t)msg) { return TRUE; } else { return FALSE; diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 173543ff2f..6658577cb0 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -929,6 +929,7 @@ bool daNpcAshB_c::talk(void* param_0) { bool daNpcAshB_c::demo(void* param_0) { dEvent_manager_c& evtmgr = dComIfGp_getEventManager(); BOOL r26 = FALSE; + dComIfG_play_c* play; switch (mMode) { case 0: @@ -940,7 +941,7 @@ bool daNpcAshB_c::demo(void* param_0) { case 2: #if VERSION != VERSION_SHIELD_DEBUG // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; + play = &g_dComIfG_gameInfo.play; if (play->getEvent().runCheck() && !eventInfo.checkCommandTalk()) #else if (dComIfGp_event_runCheck() && !eventInfo.checkCommandTalk()) diff --git a/src/d/actor/d_a_npc_bans.cpp b/src/d/actor/d_a_npc_bans.cpp index 59e55c1cf9..4f6ea12fc8 100644 --- a/src/d/actor/d_a_npc_bans.cpp +++ b/src/d/actor/d_a_npc_bans.cpp @@ -266,23 +266,23 @@ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[20] = }; static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[84] = { - {0, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {1, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, 0, 1}, {1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, 0, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, 0, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xA, 0, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xB, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {2, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {3, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xC, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xD, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {0x10, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {0x12, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {0x13, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0x10, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0x12, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0x13, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xD, -1, 1}, {0xC, 0, 1}, {3, 0, 0}, {-1, 0, 0}, - {0x11, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {4, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0x11, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xE, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xF, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, diff --git a/src/d/actor/d_a_npc_bouS.cpp b/src/d/actor/d_a_npc_bouS.cpp index 75dd6c94ab..4300c85670 100644 --- a/src/d/actor/d_a_npc_bouS.cpp +++ b/src/d/actor/d_a_npc_bouS.cpp @@ -325,8 +325,8 @@ daNpcBouS_HIOParam const daNpcBouS_Param_c::m = { 100.0f, 80.0f, 654.78497f, - 0xEB51, - 0xA3C6, + -0x14AF, + -0x5C3A, 0, }; diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index e5514c21e9..94295c8996 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -1377,7 +1377,7 @@ static jntTblMPrm a_jntTbl_M[16] = { 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0x14, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, - 0.0f, 0.0f, 0.0f, 0xB, 0, 0xFFEE, 0, 0, + 0.0f, 0.0f, 0.0f, 0xB, 0, -0x0012, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, @@ -1411,23 +1411,23 @@ static jntTblMPrm a_jntTbl_M[16] = { { 0.0f, -0.3f, 0.0f, 0, 0, 0, 0, 0, - 0.0f, 0.0f, 0.0f, 0, 0, 0xFFEC, 0, 0, - 0.0f, 0.0f, 0.0f, 0, 0, 0xFFCE, 0, 0, - 0.0f, 0.0f, 0.0f, 0, 0, 0xFFBF, 0, 0, - 0.0f, 0.0f, 0.0f, 0, 0xFFF6, 5, 0, 0, + 0.0f, 0.0f, 0.0f, 0, 0, -0x0014, 0, 0, + 0.0f, 0.0f, 0.0f, 0, 0, -0x0032, 0, 0, + 0.0f, 0.0f, 0.0f, 0, 0, -0x0041, 0, 0, + 0.0f, 0.0f, 0.0f, 0, -0x000A, 5, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0x14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, 0.0f, 0.0f, 0, -0x000A, 0xB, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 1, 0, 0, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, }, diff --git a/src/d/actor/d_a_npc_coach.cpp b/src/d/actor/d_a_npc_coach.cpp index f246849bc8..6958626c34 100644 --- a/src/d/actor/d_a_npc_coach.cpp +++ b/src/d/actor/d_a_npc_coach.cpp @@ -241,7 +241,7 @@ daNpcCoach_Attr_c const daNpcCoach_c::M_attr = { 0, 0, 1000.0f, - 0xE000, + -0x2000, 0x4000, 0, 0xFF, diff --git a/src/d/actor/d_a_npc_grz.cpp b/src/d/actor/d_a_npc_grz.cpp index 345d8e6237..1fb7bf9135 100644 --- a/src/d/actor/d_a_npc_grz.cpp +++ b/src/d/actor/d_a_npc_grz.cpp @@ -420,9 +420,9 @@ daNpc_Grz_HIOParam const daNpc_Grz_Param_c::m = { false, false, 60, - 0xFFD8, - 0xFFD8, - 0xFFD8, + -40, + -40, + -40, 11.0f, 35.0f, 500.0f, diff --git a/src/d/actor/d_a_npc_gwolf.cpp b/src/d/actor/d_a_npc_gwolf.cpp index 6013dcf907..9ac8c14951 100644 --- a/src/d/actor/d_a_npc_gwolf.cpp +++ b/src/d/actor/d_a_npc_gwolf.cpp @@ -852,7 +852,7 @@ BOOL daNpc_GWolf_c::isDelete() { 0x0153, 0x01EC, 0x01ED, 0x01EE, 0x01EF, 0x01F0, 0x01F1, }; static s16 l_playerNoList[7] = { - 0xFFFF, 2, 3, 4, 5, 6, 7, + -1, 2, 3, 4, 5, 6, 7, }; if (mType == 3 || mType == 2) { diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 41c4b032a7..1c780a12ff 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -142,7 +142,7 @@ daNpc_Jagar_HIOParam const daNpc_Jagar_Param_c::m = { 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 500.0f, 300.0f, -300.0f, - 60, 8, 0, 0, 0, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, + 60, 8, 0, 0, 0, 0, 0, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, // Jagar-specific: 1400.0f, 200.0f, -800.0f, 16.0f, 1800.0f, diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 60c4d24a07..77bf43fa33 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -726,6 +726,7 @@ BOOL daNpcKasiKyu_c::chkFindPlayer() { } int daNpcKasiKyu_c::wait(int param_1) { + dComIfG_play_c* play; switch (mMode) { case -1: break; @@ -774,7 +775,7 @@ int daNpcKasiKyu_c::wait(int param_1) { #if VERSION != VERSION_SHIELD_DEBUG // TODO: gameInfo fake match to force reuse of pointer - dComIfG_play_c* play = &g_dComIfG_gameInfo.play; + play = &g_dComIfG_gameInfo.play; if (play->getEvent().runCheck()) #else if (dComIfGp_event_runCheck()) diff --git a/src/d/actor/d_a_npc_kn.cpp b/src/d/actor/d_a_npc_kn.cpp index 50c404e922..e39128192c 100644 --- a/src/d/actor/d_a_npc_kn.cpp +++ b/src/d/actor/d_a_npc_kn.cpp @@ -787,7 +787,7 @@ u8 daNpc_Kn_c::getPath() { BOOL daNpc_Kn_c::isDelete() { static s16 l_appearFlag[7] = { - 0xFFFF, 0x0153, 0x0152, 0x0154, 0x0155, 0x0156, 0x0157, + -1, 0x0153, 0x0152, 0x0154, 0x0155, 0x0156, 0x0157, }; static s16 l_delFlag[7] = { 0x0153, 0x0152, 0x0154, 0x0155, 0x0156, 0x0157, 0x0158, @@ -832,7 +832,7 @@ void daNpc_Kn_c::resetCol() { void daNpc_Kn_c::reset() { initialize(); - memset(&mpTeachAction, 0, (int)&field_0x1754 - (int)&mpTeachAction); + memset(&mpTeachAction, 0, (intptr_t)&field_0x1754 - (intptr_t)&mpTeachAction); if (mpMatAnm != NULL) { mpMatAnm->initialize(); diff --git a/src/d/actor/d_a_npc_kn_base.inc b/src/d/actor/d_a_npc_kn_base.inc index ed489e16c1..e8ff2bb1c0 100644 --- a/src/d/actor/d_a_npc_kn_base.inc +++ b/src/d/actor/d_a_npc_kn_base.inc @@ -797,7 +797,7 @@ void daNpc_Kn_c::evtChange() { void daNpc_Kn_c::clrParam() { field_0xDB2 = mCurAngle; mCutType = 0; - memset((void*)&mEvtNo, 0, (int)(void*)&field_0xe3c - (int)(void*)&mEvtNo); // fake match? + memset((void*)&mEvtNo, 0, (intptr_t)(void*)&field_0xe3c - (intptr_t)(void*)&mEvtNo); // fake match? mJntAnm.clrDirectFlag(); } diff --git a/src/d/actor/d_a_npc_seib.cpp b/src/d/actor/d_a_npc_seib.cpp index 4de76d8f4f..6544919b9a 100644 --- a/src/d/actor/d_a_npc_seib.cpp +++ b/src/d/actor/d_a_npc_seib.cpp @@ -17,7 +17,7 @@ static daNpcT_evtData_c l_evtList[3] = { static char* l_resNameList[2] = {"", "seiB"}; -static s8 l_loadResPtrn0[2] = {1, 0xFF}; +static s8 l_loadResPtrn0[2] = {1, -1}; static s8* l_loadResPtrnList[2] = { l_loadResPtrn0, diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index 6d4f42c386..1a8072004e 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -18,7 +18,7 @@ #include "d/d_msg_object.h" #include "f_op/f_op_actor.h" #include "f_op/f_op_camera_mng.h" -#include "types.h" +#include "dolphin/types.h" daNpc_Maro_c::actionFunc dummy_lit_3931() { return &daNpc_Maro_c::choccai; diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index d8371e656a..10d86a5df1 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -439,7 +439,7 @@ const daNpcWrestler_HIOParam daNpcWrestler_Param_c::m = { 10.0f, 400, 400, - 0xFF00, + -0x0100, 400.0f, 14, 11, diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index 390c94e71e..543e3f5559 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -461,7 +461,7 @@ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[64] = }; static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[188] = { - {0, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, -1, 1}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, -1, 1}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, @@ -470,7 +470,7 @@ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[188] = { {0xC, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xD, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xD, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {2, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0xF, -1, 1}, {6, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0x10, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, @@ -485,7 +485,7 @@ static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[188] = { {0x2C, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0x2D, -1, 1}, {0x2E, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0x29, -1, 1}, {0x2E, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, - {0x2E, 0xF7, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0x2E, -9, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0x2F, -1, 1}, {0x30, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {0x30, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, diff --git a/src/d/actor/d_a_npc_zelR.cpp b/src/d/actor/d_a_npc_zelR.cpp index f409f4774a..8d1362e9d5 100644 --- a/src/d/actor/d_a_npc_zelR.cpp +++ b/src/d/actor/d_a_npc_zelR.cpp @@ -27,7 +27,7 @@ static char* l_resNameList[2] = { }; static s8 l_loadResPtrn0[2] = { - 1, 0xFF + 1, -1 }; static s8* l_loadResPtrnList[2] = { diff --git a/src/d/actor/d_a_obj_TvCdlst.cpp b/src/d/actor/d_a_obj_TvCdlst.cpp index 751b7126f0..7c44b64ff7 100644 --- a/src/d/actor/d_a_obj_TvCdlst.cpp +++ b/src/d/actor/d_a_obj_TvCdlst.cpp @@ -6,7 +6,7 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_obj_TvCdlst.h" -#include "include/d/d_com_inf_game.h" +#include "d/d_com_inf_game.h" static daTvCdlst_HIO_c l_HIO; diff --git a/src/d/actor/d_a_obj_bemos.cpp b/src/d/actor/d_a_obj_bemos.cpp index c93c0904d8..8e3ef9a5a8 100644 --- a/src/d/actor/d_a_obj_bemos.cpp +++ b/src/d/actor/d_a_obj_bemos.cpp @@ -54,8 +54,8 @@ static Vec const l_craw_offset[4] = { s16 const daObjBm_c::M_dir_base[4] = { 0x0000, 0x4000, - 0x8000, - 0xC000, + -0x8000, + -0x4000, }; static const char* l_arcName = "Obj_bm"; diff --git a/src/d/actor/d_a_obj_bk_leaf.cpp b/src/d/actor/d_a_obj_bk_leaf.cpp index f864ff5874..fddca4fb8e 100644 --- a/src/d/actor/d_a_obj_bk_leaf.cpp +++ b/src/d/actor/d_a_obj_bk_leaf.cpp @@ -161,7 +161,7 @@ static actor_method_class l_daBkLeaf_Method = { extern actor_process_profile_definition g_profile_Obj_BkLeaf = {fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_Obj_BkLeaf, &g_fpcLf_Method.base, sizeof(daBkLeaf_c), diff --git a/src/d/actor/d_a_obj_brg.cpp b/src/d/actor/d_a_obj_brg.cpp index c9ddbbf5a0..24e6142181 100644 --- a/src/d/actor/d_a_obj_brg.cpp +++ b/src/d/actor/d_a_obj_brg.cpp @@ -601,7 +601,7 @@ static void himo_cut_control1(obj_brg_class* i_this, cXyz* param_1, f32 param_2) sp74.y = 0.0f; sp74.z = param_2; - int i, temp_r27 = (int) ++param_1; + int i, temp_r27 = (intptr_t) ++param_1; f32 var_f31, var_f30, var_f29, var_f28, var_f27; for (i = 1; i < 5; i++, param_1++) { var_f28 = i_this->field_0xaf30 * cM_ssin( (i_this->field_0xaf20 * 6000) + (NREG_S(3) - 10000) * (temp_r27 + i) ) diff --git a/src/d/actor/d_a_obj_drop.cpp b/src/d/actor/d_a_obj_drop.cpp index cac20e8ce2..e317b9cdfc 100644 --- a/src/d/actor/d_a_obj_drop.cpp +++ b/src/d/actor/d_a_obj_drop.cpp @@ -327,7 +327,7 @@ int daObjDrop_c::modeWait() { case 3: removeBodyEffect(); - static const s16 target_rel_angle[] = {0xC000, 0x0000, 0x4000}; + static const s16 target_rel_angle[] = {-0x4000, 0x0000, 0x4000}; static const s16 target_angle_x[] = {0x0000, 0x2000, 0x0000}; for (int i = 0; i < 3; i++) { diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index e4265578d5..b849f33d21 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -203,7 +203,7 @@ static char* l_evtNameList[2] = { }; static u16 l_entryJntNoList[4] = { - 5, 6, 7, -1, + 5, 6, 7, 0xFFFF, }; static int jointCtrlCallBack(J3DJoint* i_joint, int param_2) { @@ -368,7 +368,7 @@ static const f32 l_bgcParam[20] = { -0.5f, 1.0f, 0.5f, -1.0f, }; -const s16 l_dirToAngleTBL[4] = {0, 0x4000, 0x8000, 0xC000}; +const s16 l_dirToAngleTBL[4] = {0, 0x4000, -0x8000, -0x4000}; int daObj_GrA_c::CreateHeap() { J3DModelData* aMdlData_p = NULL; diff --git a/src/d/actor/d_a_obj_iceblock.cpp b/src/d/actor/d_a_obj_iceblock.cpp index 40b675c690..93c7062220 100644 --- a/src/d/actor/d_a_obj_iceblock.cpp +++ b/src/d/actor/d_a_obj_iceblock.cpp @@ -114,7 +114,7 @@ static const Vec l_dir_vec[4] = { {-1.0f, 0.0f, 0.0f}, }; -static const s16 l_dir_angle[4] = {0x0000, 0x4000, 0x8000, 0xC000}; +static const s16 l_dir_angle[4] = {0x0000, 0x4000, -0x8000, -0x4000}; const static dCcD_SrcCyl l_cyl_src = { { @@ -424,7 +424,7 @@ void daObjIceBlk_c::clrCounter() { void daObjIceBlk_c::mode_proc_call() { typedef void (daObjIceBlk_c::*modeProc)(void); - static modeProc l_func[] = {&mode_proc_wait, &mode_proc_walk}; + static modeProc l_func[] = {&daObjIceBlk_c::mode_proc_wait, &daObjIceBlk_c::mode_proc_walk}; if (getSwbit2() != 0xFF && !fopAcM_isSwitch(this, getSwbit2())) { mCcCyl.OnAtSPrmBit(1); @@ -730,7 +730,7 @@ BOOL daObjIceBlk_c::checkFall() { void daObjIceBlk_c::event_proc_call() { typedef void (daObjIceBlk_c::*actionFunc)(void); - static actionFunc l_func[] = {&actionWait, &actionOrderEvent, &actionEvent, &actionDead}; + static actionFunc l_func[] = {&daObjIceBlk_c::actionWait, &daObjIceBlk_c::actionOrderEvent, &daObjIceBlk_c::actionEvent, &daObjIceBlk_c::actionDead}; (this->*l_func[mAction])(); } diff --git a/src/d/actor/d_a_obj_kanban2.cpp b/src/d/actor/d_a_obj_kanban2.cpp index a0f1bb939e..e4ab3ac050 100644 --- a/src/d/actor/d_a_obj_kanban2.cpp +++ b/src/d/actor/d_a_obj_kanban2.cpp @@ -112,14 +112,14 @@ static char* l_kn2_bmdidx[] = { }; static s16 dKn2_CarryOffset[] = { - 0xD07D, - 0xBA21, - 0xBA21, - 0xE37E, + -0x2f83, + -0x45df, + -0x45df, + -0x1c82, 0x1D9F, - 0xB36C, - 0xC9C8, - 0xC66D, + -0x4c94, + -0x3638, + -0x3993, }; static struct { diff --git a/src/d/actor/d_a_obj_kznkarm.cpp b/src/d/actor/d_a_obj_kznkarm.cpp index 3907766d16..7ea35c1e2e 100644 --- a/src/d/actor/d_a_obj_kznkarm.cpp +++ b/src/d/actor/d_a_obj_kznkarm.cpp @@ -84,7 +84,7 @@ void daObjKznkarm_Hio_c::genMessage(JORMContext* ctx) { -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, + 12.0f, 0, 0x1000, 0, -0x2000, }; static char* l_arcName = "J_Kazami"; diff --git a/src/d/actor/d_a_obj_lp.cpp b/src/d/actor/d_a_obj_lp.cpp index 374a9215e7..aff7b4de82 100644 --- a/src/d/actor/d_a_obj_lp.cpp +++ b/src/d/actor/d_a_obj_lp.cpp @@ -59,7 +59,7 @@ static int target_info_count; static void* s_ks_sub(void* param_1, void* param_2) { if (fopAcM_IsActor(param_1) && fopAcM_GetName(param_1) == 0x60) { if (target_info_count < 10) { - target_info[target_info_count] = (int)param_1; + target_info[target_info_count] = (intptr_t)param_1; target_info_count++; } return param_1; @@ -220,7 +220,7 @@ static int daObj_Lp_Execute(obj_lp_class* i_this) { target_info[i] = 0; } - target_info[0] = (int)dComIfGp_getPlayer(0); + target_info[0] = (intptr_t)dComIfGp_getPlayer(0); target_info_count = 1; if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0) { diff --git a/src/d/actor/d_a_obj_maki.cpp b/src/d/actor/d_a_obj_maki.cpp index 8ab96846e8..dba1c62a8b 100644 --- a/src/d/actor/d_a_obj_maki.cpp +++ b/src/d/actor/d_a_obj_maki.cpp @@ -19,7 +19,7 @@ #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_mtx.h" -#include "types.h" +#include "dolphin/types.h" daObj_Maki_HIO_c::daObj_Maki_HIO_c() { field_0x4 = -1; diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index 3bc335f88f..13980a228b 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -10,7 +10,7 @@ #include "d/d_a_obj.h" #include "dolphin/mtx.h" #include "f_op/f_op_actor.h" -#include "include/SSystem/SComponent/c_math.h" +#include "SSystem/SComponent/c_math.h" // clang-format off daObjNameplate_c::M_attrs const daObjNameplate_c::M_attr = { diff --git a/src/d/actor/d_a_obj_prop.cpp b/src/d/actor/d_a_obj_prop.cpp index a037e42944..709d8837dc 100644 --- a/src/d/actor/d_a_obj_prop.cpp +++ b/src/d/actor/d_a_obj_prop.cpp @@ -60,7 +60,7 @@ int daObjProp_c::draw() { return 1; } -static const s16 ADD_ANGLE[] = {0x1800, 0xE800}; +static const s16 ADD_ANGLE[] = {0x1800, -0x1800}; int daObjProp_c::execute() { shape_angle.y += ADD_ANGLE[mArg]; diff --git a/src/d/actor/d_a_obj_sakuita_rope.cpp b/src/d/actor/d_a_obj_sakuita_rope.cpp index 66585092e2..60b096d963 100644 --- a/src/d/actor/d_a_obj_sakuita_rope.cpp +++ b/src/d/actor/d_a_obj_sakuita_rope.cpp @@ -65,7 +65,7 @@ int Sakuita_c::setModelData(J3DModelData* i_modelData) { } daObjItaRope_Attr_c const daObjItaRope_c::M_attr = { - -5.0f, 0.2f, 0.5f, 0.8f, 0.0f, + -5.0f, 0.2f, 0.5f, 0.8f, 0, }; void Sakuita_c::create(cXyz* param_1, s16 param_2, s8 param_3) { diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index d1ed19203c..20c8bfb288 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -27,14 +27,14 @@ static char* l_resNameList[3] = { }; static s8 l_loadResPtrn0[2] = { - 0x01, - 0xFF, + 1, + -1, }; static s8 l_loadResPtrn1[3] = { - 0x01, - 0x02, - 0xFF, + 1, + 2, + -1, }; static s8* l_loadResPtrnList[8] = { @@ -836,7 +836,7 @@ int daObj_Sekizoa_c::setYariAnm(int i_frame, int i_mode, f32 i_morf) { u32 param_0; u32 param_1; } yariAnmData[24] = { - {-1, 0}, + {0xFFFFFFFF, 0}, {ANM_YARIA_STILL_L, 1}, {ANM_YARIA_STILL_L, 1}, {ANM_YARIA_STILL_L, 1}, diff --git a/src/d/actor/d_a_obj_smtile.cpp b/src/d/actor/d_a_obj_smtile.cpp index ccb0f7eaad..a3d3963b8d 100644 --- a/src/d/actor/d_a_obj_smtile.cpp +++ b/src/d/actor/d_a_obj_smtile.cpp @@ -21,10 +21,10 @@ static char* l_resNameList[2] = { static s8 l_tileMoveData[21][4] = { 0x01, 0x03, 0x05, 0x01, 0x01, 0x02, 0x04, 0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x02, 0x04, 0x00, 0x00, 0x02, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, - 0x00, 0xFF, 0x02, 0x01, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x01, 0x03, 0x00, 0xFF, 0x02, 0x03, 0xFF, 0x02, 0x04, 0x00, - 0x00, 0x02, 0x03, 0x02, 0xFF, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0xFF, - 0x02, 0x02, 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x02, 0x04, 0x02, 0xFF, 0x01, 0x03, 0x02, + 0x00, -0x1, 0x02, 0x01, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x03, 0x00, -0x1, 0x02, 0x03, -0x1, 0x02, 0x04, 0x00, + 0x00, 0x02, 0x03, 0x02, -0x1, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, -0x1, + 0x02, 0x02, -0x1, 0x03, 0x05, 0x02, -0x1, 0x02, 0x04, 0x02, -0x1, 0x01, 0x03, 0x02, }; daObj_SMTile_c::~daObj_SMTile_c() { diff --git a/src/d/actor/d_a_obj_ss_item.cpp b/src/d/actor/d_a_obj_ss_item.cpp index 59fbb9f9da..ceb32622f6 100644 --- a/src/d/actor/d_a_obj_ss_item.cpp +++ b/src/d/actor/d_a_obj_ss_item.cpp @@ -374,7 +374,7 @@ static actor_method_class daObj_SSItem_MethodTable = { extern actor_process_profile_definition g_profile_OBJ_SSITEM = { fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_OBJ_SSITEM, &g_fpcLf_Method.base, sizeof(daObj_SSItem_c), diff --git a/src/d/actor/d_a_obj_twGate.cpp b/src/d/actor/d_a_obj_twGate.cpp index 4df7a162a7..50d769f82c 100644 --- a/src/d/actor/d_a_obj_twGate.cpp +++ b/src/d/actor/d_a_obj_twGate.cpp @@ -46,19 +46,19 @@ static int const l_bmdIdx[13] = { 6, 6, 6, -1, -1, -1, 6, 6, 6, 6, 6, 6, -1, }; -static u32 const l_dzbIdx[13] = { +static int const l_dzbIdx[13] = { 15, 15, 15, -1, -1, -1, 15, 15, 15, 15, 15, 15, -1, }; -static u32 const l_btkIdx[13] = { +static int const l_btkIdx[13] = { 12, 12, 12, -1, -1, -1, 12, 12, 12, 12, 12, 12, -1, }; -static u32 const l_brkIdx[13] = { +static int const l_brkIdx[13] = { 9, 9, 9, -1, -1, -1, 9, 9, 9, 9, 9, 9, -1, }; -static u32 const l_twFlagIdx[13] = { +static int const l_twFlagIdx[13] = { 0, 1, 2, 4, -1, -1, 0, 1, 1, 2, 2, 4, 4, }; diff --git a/src/d/actor/d_a_obj_zdoor.cpp b/src/d/actor/d_a_obj_zdoor.cpp index e23cff73c1..b5f4f4ecb4 100644 --- a/src/d/actor/d_a_obj_zdoor.cpp +++ b/src/d/actor/d_a_obj_zdoor.cpp @@ -64,8 +64,8 @@ static const s16 l_open_limit_max[3] = { static const s16 l_open_limit_min[3] = { 0x1388, - 0xAAAB, - 0xAE39, + -0x5555, + -0x51C7, }; static const s16 l_open_speed[3] = { diff --git a/src/d/actor/d_a_tag_Lv6Gate.cpp b/src/d/actor/d_a_tag_Lv6Gate.cpp index 76034636c2..66332e1789 100644 --- a/src/d/actor/d_a_tag_Lv6Gate.cpp +++ b/src/d/actor/d_a_tag_Lv6Gate.cpp @@ -288,8 +288,10 @@ void daTagLv6Gate_c::create_init() { initBaseMtx(); if (!fopAcM_isSwitch(this, getSwitchNo1())) { - parentActorID = fopAcM_create(PROC_NPC_TKS, 2, &cXyz(-13.272481f, 2887.0f, -10373.718f), - fopAcM_GetRoomNo(this), &csXyz(0, 0x7FFF, 0), NULL, -1); + cXyz i_pos(-13.272481f, 2887.0f, -10373.718f); + csXyz i_angle(0, 0x7FFF, 0); + parentActorID = fopAcM_create(PROC_NPC_TKS, 2, &i_pos, + fopAcM_GetRoomNo(this), &i_angle, NULL, -1); } } diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index a4b48deadc..414a68a3d8 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -235,7 +235,7 @@ static actor_method_class daTag_Evt_MethodTable = { extern actor_process_profile_definition g_profile_TAG_EVT = { fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_TAG_EVT, &g_fpcLf_Method.base, sizeof(daTag_Evt_c), diff --git a/src/d/actor/d_a_tag_myna_light.cpp b/src/d/actor/d_a_tag_myna_light.cpp index a7fb443563..c62fcd84e7 100644 --- a/src/d/actor/d_a_tag_myna_light.cpp +++ b/src/d/actor/d_a_tag_myna_light.cpp @@ -162,7 +162,7 @@ static actor_method_class daTag_MynaLight_MethodTable = { extern actor_process_profile_definition g_profile_TAG_MNLIGHT = { fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_TAG_MNLIGHT, &g_fpcLf_Method.base, sizeof(daTag_MynaLight_c), diff --git a/src/d/actor/d_a_tag_pachi.cpp b/src/d/actor/d_a_tag_pachi.cpp index fd12d75a47..63a1c8d297 100644 --- a/src/d/actor/d_a_tag_pachi.cpp +++ b/src/d/actor/d_a_tag_pachi.cpp @@ -69,7 +69,7 @@ static actor_method_class l_daTagPati_Method = { extern actor_process_profile_definition g_profile_TAG_PATI = { fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_TAG_PATI, &g_fpcLf_Method.base, sizeof(daTagPati_c), diff --git a/src/d/actor/d_a_tag_push.cpp b/src/d/actor/d_a_tag_push.cpp index f18a56ab83..49dc2230e5 100644 --- a/src/d/actor/d_a_tag_push.cpp +++ b/src/d/actor/d_a_tag_push.cpp @@ -159,7 +159,7 @@ static actor_method_class daTag_Push_MethodTable = { extern actor_process_profile_definition g_profile_TAG_PUSH = { fpcLy_CURRENT_e, 8, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_TAG_PUSH, &g_fpcLf_Method.base, sizeof(daTag_Push_c), diff --git a/src/d/actor/d_a_tag_ss_drink.cpp b/src/d/actor/d_a_tag_ss_drink.cpp index 1f09b87d0b..0c6ab21804 100644 --- a/src/d/actor/d_a_tag_ss_drink.cpp +++ b/src/d/actor/d_a_tag_ss_drink.cpp @@ -267,7 +267,7 @@ static actor_method_class daTag_SSDrink_MethodTable = { extern actor_process_profile_definition g_profile_TAG_SSDRINK = { fpcLy_CURRENT_e, 7, - fpcLy_CURRENT_e, + fpcPi_CURRENT_e, PROC_TAG_SSDRINK, &g_fpcLf_Method.base, sizeof(daTag_SSDrink_c), diff --git a/tools/converters/matDL_dis.py b/tools/converters/matDL_dis.py index e712018e12..d104e8e637 100755 --- a/tools/converters/matDL_dis.py +++ b/tools/converters/matDL_dis.py @@ -317,9 +317,9 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name, scope): macro_name = os.path.splitext(os.path.basename(src_path))[0] with open(src_path, "rb") as binary_file, open(dest_path, "w") as c_file: c_file.write("#ifndef LOAD_BP_REG\n") - c_file.write("#define U32_AS_U8(v) (((v) >> 24) & 0xFF), (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n") - c_file.write("#define U24_AS_U8(v) (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n") - c_file.write("#define U16_AS_U8(v) (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n") + c_file.write("#define U32_AS_U8(v) (u8)(((v) >> 24) & 0xFF), (u8)(((v) >> 16) & 0xFF), (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n") + c_file.write("#define U24_AS_U8(v) (u8)(((v) >> 16) & 0xFF), (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n") + c_file.write("#define U16_AS_U8(v) (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n") c_file.write("#define IMAGE_ADDR(addr) (u32)(addr) >> 5\n") c_file.write("#define LOAD_BP_REG(reg, value) GX_CMD_LOAD_BP_REG, reg, U24_AS_U8(value)\n") c_file.write("#define LOAD_XF_REG(reg, num_args, ...) GX_CMD_LOAD_XF_REG, U16_AS_U8(num_args-1), U16_AS_U8(reg), __VA_ARGS__\n")