From cede55ba30101ba7cadba9766adbd41eb76b6f36 Mon Sep 17 00:00:00 2001 From: Pheenoh Date: Sat, 4 Feb 2023 17:45:01 -0700 Subject: [PATCH] pr fixes --- .github/workflows/ok-check.yml | 2 +- include/JSystem/J3DGraphAnimator/J3DModel.h | 15 +-------------- include/rel/d/a/d_a_do/d_a_do.h | 10 +++------- rel/d/a/d_a_do/d_a_do.cpp | 16 ++++++++-------- 4 files changed, 13 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ok-check.yml b/.github/workflows/ok-check.yml index f703ef02f79..f2c34464762 100644 --- a/.github/workflows/ok-check.yml +++ b/.github/workflows/ok-check.yml @@ -17,4 +17,4 @@ jobs: - name: Copy in dol and compilers run: cp /tmp/baserom.dol ./baserom.dol && cp -r /tmp/mwcc_compiler/ tools/mwcc_compiler && cp tools/mwcc_compiler/2.7/mwcceppc.exe tools/mwcc_compiler/2.7/mwcceppc_modded.exe && chown root /github/home/ - name: Run Make (OK) - run: make all rels + run: make all rels && ./tp check --rels diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 73b892ef3c1..3c20380ef51 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -24,19 +24,6 @@ struct J3DUnkCalc2 { virtual void calc(J3DModelData* mpModelData); }; -struct UserArea { - u8 field_0x00[0x60e]; - s16 field_0x60e; - s16 field_0x610; - s16 field_0x612; - u8 field_0x614[0x14]; - s16 field_0x628; - s16 field_0x62a; - u8 field_0x62c[0x12]; - s16 field_0x63e; - s16 field_0x640; -}; - typedef void (*J3DCalcCallBack)(J3DModel*, u32 timing); class J3DModel { @@ -97,7 +84,7 @@ public: // is there a better way to handle inlines with same name as non-inlines? MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); } - void i_setAnmMtx(int p1, Mtx mtx) { return mMtxBuffer->setAnmMtx(p1, mtx); } + void i_setAnmMtx(int p1, Mtx mtx) { mMtxBuffer->setAnmMtx(p1, mtx); } /* 0x04 */ J3DModelData* mModelData; /* 0x08 */ u32 mFlags; diff --git a/include/rel/d/a/d_a_do/d_a_do.h b/include/rel/d/a/d_a_do/d_a_do.h index 79e3bee5894..aa58cbabffb 100644 --- a/include/rel/d/a/d_a_do/d_a_do.h +++ b/include/rel/d/a/d_a_do/d_a_do.h @@ -69,11 +69,7 @@ struct daDo_HIO_tmp { /* 0x1E */ u16 mWaterHuntAnimType; }; -struct some_class { - -}; - -class daDo_HIO_c : public some_class { +class daDo_HIO_c { public: /* 80667D4C */ daDo_HIO_c(); /* 8066ED40 */ virtual ~daDo_HIO_c(); @@ -131,10 +127,10 @@ public: /* 0x617 */ u8 field_0x617; /* 0x618 */ cXyz mUnkPos; // something to do with the dog's eye position /* 0x624 */ s16 field_0x624; - /* 0x63C */ s16 field_0x63c; + /* 0x626 */ csXyz field_0x626; + /* 0x62C */ u8 field_0x62c[18]; /* 0x63E */ csXyz field_0x63e; /* 0x644 */ f32 field_0x644; - /* 0x000 */ u8 field_0x000[20]; // some alignment issue here /* 0x648 */ f32 field_0x648; /* 0x64C */ f32 field_0x64c; /* 0x650 */ f32 field_0x650; diff --git a/rel/d/a/d_a_do/d_a_do.cpp b/rel/d/a/d_a_do/d_a_do.cpp index 377d8177761..87105c9ce1a 100644 --- a/rel/d/a/d_a_do/d_a_do.cpp +++ b/rel/d/a/d_a_do/d_a_do.cpp @@ -438,21 +438,21 @@ static int nodeCallBack(J3DJoint* i_jntP, int param_1) { if (param_1 == 0) { int joint_num = i_jntP->getJntNo(); J3DModel* model = j3dSys.getModel(); - UserArea* user_area = (UserArea*)model->getUserArea(); + do_class* user_area = (do_class*)model->getUserArea(); if (user_area) { PSMTXCopy(model->i_getAnmMtx(joint_num), *calc_mtx); if (joint_num == 9 || joint_num == 10) { - cMtx_YrotM(*calc_mtx, user_area->field_0x610 + user_area->field_0x628); - cMtx_XrotM(*calc_mtx, user_area->field_0x612 + user_area->field_0x62a); - cMtx_ZrotM(*calc_mtx, user_area->field_0x60e); + cMtx_YrotM(*calc_mtx, user_area->field_0x60e.y + user_area->field_0x626.y); + cMtx_XrotM(*calc_mtx, user_area->field_0x60e.z + user_area->field_0x626.z); + cMtx_ZrotM(*calc_mtx, user_area->field_0x60e.x); } else if (joint_num == 22) { - cMtx_YrotM(*calc_mtx, user_area->field_0x640 << 1); - cMtx_ZrotM(*calc_mtx, user_area->field_0x63e << 1); + cMtx_YrotM(*calc_mtx, user_area->field_0x63e.y << 1); + cMtx_ZrotM(*calc_mtx, user_area->field_0x63e.x << 1); } else { - cMtx_YrotM(*calc_mtx, user_area->field_0x640); - cMtx_ZrotM(*calc_mtx, user_area->field_0x63e); + cMtx_YrotM(*calc_mtx, user_area->field_0x63e.y); + cMtx_ZrotM(*calc_mtx, user_area->field_0x63e.x); } model->setAnmMtx(joint_num, *calc_mtx);