From 0255c90ad6d06ee7f94983ea26e1ab77a11f722c Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 18 Oct 2024 15:24:01 -0400 Subject: [PATCH 1/2] Customize more vscode settings --- .vscode/settings.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index eca4e06f..40761255 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,11 @@ { "[c]": { "files.encoding": "utf8", - "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" + "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd", }, "[cpp]": { "files.encoding": "utf8", - "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" + "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd", }, "editor.tabSize": 4, // "files.autoSave": "onFocusChange", @@ -30,5 +30,10 @@ ".ninja_*": true, "objdiff.json": true, ".cache/**": true, + "ctx.c": true, }, + "clangd.arguments": [ + "--function-arg-placeholders=0", + "-header-insertion=never", + ], } From ce592831febcbc54593bacebeb494c763ac9fe63 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 18 Oct 2024 15:55:31 -0400 Subject: [PATCH 2/2] Warning/error cleanup --- .../JStudio/JStudio_JStage/object-light.h | 2 +- include/SSystem/SComponent/c_m3d_g_sph.h | 5 +- .../JStudio/JStudio_JStage/object-light.cpp | 5 +- src/d/actor/d_a_kaji.cpp | 8 +- src/d/actor/d_a_movie_player.cpp | 79 ++++++++++++++++++- src/d/actor/d_a_obj_eskban.cpp | 22 ++++-- src/d/actor/d_a_obj_xfuta.cpp | 1 - src/d/actor/d_a_obj_zouK.cpp | 1 - src/d/actor/d_a_swattack.cpp | 1 - src/d/actor/d_a_tag_event.cpp | 3 +- src/d/d_drawlist.cpp | 3 +- src/d/d_ovlp_fade4.cpp | 5 +- src/m_Do/m_Do_ext.cpp | 32 ++++---- 13 files changed, 125 insertions(+), 42 deletions(-) diff --git a/include/JSystem/JStudio/JStudio_JStage/object-light.h b/include/JSystem/JStudio/JStudio_JStage/object-light.h index dec73e88..7144fe31 100644 --- a/include/JSystem/JStudio/JStudio_JStage/object-light.h +++ b/include/JSystem/JStudio/JStudio_JStage/object-light.h @@ -1,6 +1,6 @@ #ifndef OBJECT_LIGHT_H #define OBJECT_LIGHT_H -#include "JSystem/JStudio/JStudio_JStage/control.h" +#include "JSystem/JStudio/JStudio_JStage/control.h" // IWYU pragma: export #endif /* OBJECT_LIGHT_H */ diff --git a/include/SSystem/SComponent/c_m3d_g_sph.h b/include/SSystem/SComponent/c_m3d_g_sph.h index ba466ebd..68cb6f8f 100644 --- a/include/SSystem/SComponent/c_m3d_g_sph.h +++ b/include/SSystem/SComponent/c_m3d_g_sph.h @@ -41,7 +41,10 @@ class cM3dGSph { bool cross(const cM3dGCyl*, cXyz*) const; bool cross(const cM3dGSph*, cXyz*) const; bool cross(const cM3dGSph*, f32*) const; - bool cross(const cM3dGCyl* cyl, f32* out) const { return cM3d_Cross_CylSph(cyl, this, &cXyz(), out); } + bool cross(const cM3dGCyl* cyl, f32* out) const { + cXyz temp; + return cM3d_Cross_CylSph(cyl, this, &temp, out); + } void cross(const cM3dGTri*) const {} const cXyz& GetC() const { return mCenter; } cXyz& GetC() { return mCenter; } diff --git a/src/JSystem/JStudio/JStudio_JStage/object-light.cpp b/src/JSystem/JStudio/JStudio_JStage/object-light.cpp index aed432d0..cf96b13d 100644 --- a/src/JSystem/JStudio/JStudio_JStage/object-light.cpp +++ b/src/JSystem/JStudio/JStudio_JStage/object-light.cpp @@ -85,7 +85,7 @@ void TAdaptor_light::adaptor_do_update(const JStudio::TObject* object, u32 p2) { adaptor_getVariableValue_Vec(&posDir1.mPosition, sauVariableValue_3_POSITION_XYZ); switch (_118) { - case 1: + case 1: { f32 val10 = adaptor_getVariableValue(10)->getValue(); f32 val11 = adaptor_getVariableValue(11)->getValue(); f32 cosX = std::cosf(DEG_TO_RAD(val11)); @@ -96,6 +96,7 @@ void TAdaptor_light::adaptor_do_update(const JStudio::TObject* object, u32 p2) { posDir1.mDirection.z = cosX * std::cosf(DEG_TO_RAD(val10)); break; + } case 2: Vec target; adaptor_getVariableValue_Vec(&target, sauVariableValue_3_TARGET_POSITION_XYZ); @@ -145,6 +146,8 @@ void TAdaptor_light::adaptor_do_FACULTY(JStudio::data::TEOperationData op, const mObject->JSGSetLightType(lightType); break_outer_switch: break; + default: + break; } } diff --git a/src/d/actor/d_a_kaji.cpp b/src/d/actor/d_a_kaji.cpp index 9ecee72f..2ad86c09 100644 --- a/src/d/actor/d_a_kaji.cpp +++ b/src/d/actor/d_a_kaji.cpp @@ -72,10 +72,10 @@ BOOL daKaji_c::_delete() { BOOL daKaji_c::_execute() { // Copy the ship's transform (plus an offset) to the helm. - cXyz* offset = &cXyz(0.0f, 740.0f, -858.0f); - offset->y += REG10_F(10); - offset->z += REG10_F(11); - cMtx_multVec(l_p_ship->mpModel->getBaseTRMtx(), offset, ¤t.pos); + cXyz offset(0.0f, 740.0f, -858.0f); + offset.y += REG10_F(10); + offset.z += REG10_F(11); + cMtx_multVec(l_p_ship->mpModel->getBaseTRMtx(), &offset, ¤t.pos); daObjPirateship::Act_c* ship = l_p_ship; shape_angle = ship->shape_angle; diff --git a/src/d/actor/d_a_movie_player.cpp b/src/d/actor/d_a_movie_player.cpp index ae1bc1de..3ef89ae5 100644 --- a/src/d/actor/d_a_movie_player.cpp +++ b/src/d/actor/d_a_movie_player.cpp @@ -761,10 +761,12 @@ static void __THPGQRRestore() { tmp2 = __THPOldGQR6; // clang-format off +#ifdef __MWERKS__ asm { mtspr GQR5, tmp1; mtspr GQR6, tmp2; } +#endif // clang-format on } @@ -773,16 +775,19 @@ static void __THPGQRSetup() { register u32 tmp1, tmp2; // clang-format off +#ifdef __MWERKS__ asm { mfspr tmp1, GQR5; mfspr tmp2, GQR6; } +#endif // clang-format on __THPOldGQR5 = tmp1; __THPOldGQR6 = tmp2; // clang-format off +#ifdef __MWERKS__ asm { li r3, 0x0007 oris r3, r3, 0x0007 @@ -791,6 +796,7 @@ static void __THPGQRSetup() { oris r3, r3, 0x3D04 mtspr GQR6, r3 } +#endif // clang-format on } @@ -875,6 +881,7 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) { register u32 itmp0, itmp1, itmp2, itmp3; // clang-format off +#ifdef __MWERKS__ asm { li itmp2, 8 mtctr itmp2 @@ -1033,6 +1040,7 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) { _loopEnd: } +#endif // clang-format on } @@ -1046,6 +1054,7 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) { register THPSample *out0, *out1; // clang-format off +#ifdef __MWERKS__ asm { psq_l tmp10, 8*0*sizeof(f32)(ws), 0, 0 slwi off0, wid, 3; @@ -1163,6 +1172,7 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) { psq_st tmp21, 8(out1), 0, 6 } +#endif // clang-format on } } @@ -1184,6 +1194,7 @@ static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) { { register u32 itmp0, itmp1, itmp2, itmp3; // clang-format off +#ifdef __MWERKS__ asm { li itmp2, 8 mtctr itmp2 @@ -1342,6 +1353,7 @@ static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) { _loopEnd: } +#endif // clang-format on } @@ -1355,6 +1367,7 @@ static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) { register THPSample *out0, *out1; // clang-format off +#ifdef __MWERKS__ asm { psq_l tmp10, 8*0*sizeof(f32)(ws), 0, 0 slwi xPos, xPos, 2 @@ -1469,6 +1482,7 @@ static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) { psq_st tmp20, 0(out1), 0, 6 psq_st tmp21, 8(out1), 0, 6 } +#endif // clang-format on } } @@ -1629,6 +1643,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) register u32 cnt1; register u32 tmp1; // clang-format off +#ifdef __MWERKS__ asm { lwz cnt,info->cnt; subfic code,cnt,33; @@ -1645,9 +1660,11 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) subfic v,t,32; srw diff,cnt,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _DoneDIFF; @@ -1665,6 +1682,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) srw diff, v, tmp; _DoneDIFF: } +#endif // clang-format on } @@ -1688,12 +1706,14 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) register THPHuffmanTab* h = Yachuff; // clang-format off +#ifdef __MWERKS__ asm { lwz cnt, info->cnt; addi increment, h, 32; lwz cb, info->currByte; } +#endif // clang-format on for (k = 1; k < 64; k++) @@ -1702,6 +1722,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) register s32 rrrr; // clang-format off +#ifdef __MWERKS__ asm { addi code, cnt, 4; cmpwi cnt, 28; @@ -1716,6 +1737,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) add cnt, cnt, code; b _DoneDecodeTab; } +#endif // clang-format on { @@ -1726,6 +1748,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) cnt += 5; maxcodebase = (u32) & (h->maxCode); // clang-format off +#ifdef __MWERKS__ asm { li tmp2, sizeof(s32)*(5); li code, 5; @@ -1771,6 +1794,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) addi code, code, 1 bgt __WHILE_START; } +#endif // clang-format on } _FCEB_Done: @@ -1779,6 +1803,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) _notEnoughBits: // clang-format off +#ifdef __MWERKS__ asm { cmpwi cnt, 33; @@ -1798,12 +1823,14 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) cmpwi code, 33; bgt _FailedCheckNoBits1; } +#endif // clang-format on cnt = (u32)code; goto _DoneDecodeTab; _getfullword : { // clang-format off +#ifdef __MWERKS__ asm { lwzu cb, 4(tmp); @@ -1815,6 +1842,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) addi cnt, tmp, 1 beq _FailedCheckEnoughbits_Updated; } +#endif // clang-format on } goto _DoneDecodeTab; @@ -1823,12 +1851,14 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) ssss = 5; do { // clang-format off +#ifdef __MWERKS__ asm { subfic tmp, ssss, 31; addi ssss, ssss, 1; srw code, cb, tmp; } +#endif // clang-format on } while (code > h->maxCode[ssss]); @@ -1839,6 +1869,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) _1bitleft: // clang-format off +#ifdef __MWERKS__ asm { lwzu cb, 4(tmp); @@ -1850,6 +1881,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) beq _Read4; } +#endif // clang-format on goto _DoneDecodeTab; @@ -1859,6 +1891,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) register u32 tmp2; // clang-format off +#ifdef __MWERKS__ asm { li cnt, sizeof(s32)*5; add maxcodebase, maxcodebase, cnt; @@ -1878,6 +1911,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) bgt __DR4_WHILE_START; } +#endif // clang-format on } ssss = (h->Vij[(s32)(code + h->valPtr[cnt])]); @@ -1893,6 +1927,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) mask = (u32) & (h->maxCode); // clang-format off +#ifdef __MWERKS__ asm { lwz tmp, info->c; subfic tmp2, cnt, 33; @@ -1921,6 +1956,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) bgt __FCNB1_WHILE_START; } +#endif // clang-format on ssss = (h->Vij[(s32)(code + h->valPtr[tmp3])]); } @@ -1929,11 +1965,13 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) _DoneDecodeTab: // clang-format off +#ifdef __MWERKS__ asm { andi. rrrr, ssss, 15; srawi ssss, ssss, 4; beq _RECV_SSSS_ZERO; } +#endif // clang-format on { @@ -1943,6 +1981,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) register u32 cnt1; register u32 tmp1; // clang-format off +#ifdef __MWERKS__ asm { subfic code,cnt,33; @@ -1954,8 +1993,10 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) subfic v,rrrr,32; srw ssss,tmp1,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _RECVDone; @@ -1972,6 +2013,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) srw ssss, v, tmp; _RECVDone: } +#endif // clang-format on } @@ -1993,10 +2035,12 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) }; // clang-format off +#ifdef __MWERKS__ asm { _RECV_END: } +#endif // clang-format on } info->cnt = cnt; @@ -2013,6 +2057,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab register s32 tmp; // clang-format off +#ifdef __MWERKS__ asm { lwz cnt, info->cnt; @@ -2029,6 +2074,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab add cnt, cnt, increment; stw cnt, info->cnt; } +#endif // clang-format on _done: return code; @@ -2042,6 +2088,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab cnt += 5; // clang-format off +#ifdef __MWERKS__ asm { li tmp2, sizeof(s32)*(5); li code, 5; @@ -2086,6 +2133,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab addi code, code, 1 bgt __WHILE_START; } +#endif // clang-format on } _FCEB_Done: @@ -2093,6 +2141,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab return (h->Vij[(s32)(tmp + h->valPtr[code])]); // clang-format off +#ifdef __MWERKS__ asm { _notEnoughBits: @@ -2114,12 +2163,13 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab stw code, info->cnt; bgt _FailedCheckNoBits1; } +#endif // clang-format on return tmp; // clang-format off - asm - { +#ifdef __MWERKS__ + asm { _1bitleft: lwzu cb, 4(tmp); @@ -2133,6 +2183,7 @@ static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab beq _Read4; } +#endif // clang-format on return tmp; @@ -2141,6 +2192,7 @@ _Read4 : { register u32 tmp2; // clang-format off +#ifdef __MWERKS__ asm { li cnt, sizeof(s32)*5; @@ -2161,6 +2213,7 @@ _Read4 : { bgt __DR4_WHILE_START; } +#endif // clang-format on } @@ -2170,6 +2223,7 @@ _Read4 : { _getfullword: // clang-format off +#ifdef __MWERKS__ asm { lwzu cb, 4(tmp); @@ -2185,6 +2239,7 @@ _Read4 : { stw increment, info->cnt; } +#endif // clang-format on return (s32)cnt; @@ -2193,12 +2248,14 @@ _Read4 : { cnt = 5; do { // clang-format off +#ifdef __MWERKS__ asm { subfic tmp, cnt, 31; addi cnt, cnt, 1; srw code, cb, tmp; } +#endif // clang-format on } while (code > h->maxCode[cnt]); @@ -2216,6 +2273,7 @@ _FailedCheckNoBits1 : mask = (u32) & (h->maxCode); // clang-format off +#ifdef __MWERKS__ asm { lwz tmp, info->c; @@ -2246,6 +2304,7 @@ _FailedCheckNoBits1 : bgt __FCNB1_WHILE_START; } +#endif // clang-format on } @@ -2277,6 +2336,7 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) if (t) { // clang-format off +#ifdef __MWERKS__ asm { lwz cnt,info->cnt; @@ -2291,9 +2351,11 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) subfic v,t,32; srw diff,cnt,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _DoneDIFF; @@ -2311,6 +2373,7 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) srw diff, v, tmp; _DoneDIFF: } +#endif // clang-format on if (__cntlzw((u32)diff) > 32 - t) { @@ -2330,6 +2393,7 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) if (ssss) { k += rrrr; // clang-format off +#ifdef __MWERKS__ asm { lwz cnt,info->cnt; @@ -2344,9 +2408,11 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) subfic v,ssss,32; srw rrrr,cnt,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _Done; @@ -2364,6 +2430,7 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) srw rrrr, v, tmp; _Done: } +#endif // clang-format on if (__cntlzw((u32)rrrr) > 32 - ssss) { @@ -2405,6 +2472,7 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) if (t) { // clang-format off +#ifdef __MWERKS__ asm { lwz cnt,info->cnt; @@ -2419,9 +2487,11 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) subfic v,t,32; srw diff,cnt,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _DoneDIFF; @@ -2439,6 +2509,7 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) srw diff, v, tmp; _DoneDIFF: } +#endif // clang-format on if (__cntlzw((u32)diff) > 32 - t) { @@ -2460,6 +2531,7 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) k += rrrr; // clang-format off +#ifdef __MWERKS__ asm { lwz cnt,info->cnt; @@ -2477,9 +2549,11 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) subfic v,ssss,32; srw rrrr,cnt,v; } +#endif // clang-format on // clang-format off +#ifdef __MWERKS__ asm { b _Done; @@ -2497,6 +2571,7 @@ static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) srw rrrr, v, tmp; _Done: } +#endif // clang-format on if (__cntlzw((u32)rrrr) > 32 - ssss) { diff --git a/src/d/actor/d_a_obj_eskban.cpp b/src/d/actor/d_a_obj_eskban.cpp index 94c22415..cb95f21b 100644 --- a/src/d/actor/d_a_obj_eskban.cpp +++ b/src/d/actor/d_a_obj_eskban.cpp @@ -215,9 +215,11 @@ void daObjEskban::Act_c::eff_m_break(u16 particleID, u16 prm_b) { J3DAnmTexPattern* txPattern = static_cast(dComIfG_getObjectRes("Always", ALWAYS_BTP_MPI_KOISHI)); - JPABaseEmitter* pBEmtr = - dComIfGp_particle_set(particleID, &this->current.pos, &this->shape_angle, NULL, 0xff, NULL, - -1, NULL, NULL, &cXyz(3, 3, 3)); + cXyz scale(3.0f, 3.0f, 3.0f); + JPABaseEmitter* pBEmtr = dComIfGp_particle_set( + particleID, &this->current.pos, &this->shape_angle, NULL, + 0xff, NULL, -1, NULL, NULL, &scale + ); if (!pBEmtr) { return; } @@ -237,9 +239,11 @@ void daObjEskban::Act_c::eff_b_break(u16 particleID) { c0.b = tevStr.mColorC0.b; c0.a = tevStr.mColorC0.a; - JPABaseEmitter* pBEmtr = - dComIfGp_particle_set(particleID, &this->current.pos, NULL, NULL, 0xff, NULL, -1, - &tevStr.mColorK0, &c0, &cXyz(1, 1, 1)); + cXyz scale(1.0f, 1.0f, 1.0f); + JPABaseEmitter* pBEmtr = dComIfGp_particle_set( + particleID, &this->current.pos, NULL, NULL, + 0xff, NULL, -1, &tevStr.mColorK0, &c0, &scale + ); if (!pBEmtr) { return; } @@ -293,7 +297,7 @@ int daObjEskban::Act_c::Execute(Mtx** pMtx) { } } switch (mActorState) { - case ST_WAIT: /* 0x148 */ + case ST_WAIT: /* 0x148 */ { if (!mCameraCyl.ChkCoHit()) { break; } @@ -309,6 +313,7 @@ int daObjEskban::Act_c::Execute(Mtx** pMtx) { mActorState = ST_DESTROYED; } break; + } case ST_DESTROYED: /* 0x1d8 */ if (eventInfo.checkCommandDemoAccrpt()) { mActorState = ST_CUTSCENING; @@ -316,7 +321,7 @@ int daObjEskban::Act_c::Execute(Mtx** pMtx) { } fopAcM_orderOtherEvent(this, "Eskban"); break; - case ST_CUTSCENING: /* 0x214 */ + case ST_CUTSCENING: /* 0x214 */ { if (fopAcM_SearchByID(mActorID) == NULL) { mActorState = ST_SMOKING; mRemainingSmokeAnm = DESTROY_SMOKE_ANM_LEN; @@ -335,6 +340,7 @@ int daObjEskban::Act_c::Execute(Mtx** pMtx) { mDoAud_seStart(JA_SE_READ_RIDDLE_1); daObjEskban_effect_set(); break; + } case ST_SMOKING: /* 0x350 */ if (mRemainingSmokeAnm > 0) { mRemainingSmokeAnm--; diff --git a/src/d/actor/d_a_obj_xfuta.cpp b/src/d/actor/d_a_obj_xfuta.cpp index 927346c7..ae488519 100644 --- a/src/d/actor/d_a_obj_xfuta.cpp +++ b/src/d/actor/d_a_obj_xfuta.cpp @@ -5,7 +5,6 @@ #include "d/actor/d_a_obj_xfuta.h" #include "d/d_com_inf_game.h" -#include "d/d_item.h" #include "d/d_procname.h" #include "dolphin/types.h" diff --git a/src/d/actor/d_a_obj_zouK.cpp b/src/d/actor/d_a_obj_zouK.cpp index 6beb6906..1ba835c7 100644 --- a/src/d/actor/d_a_obj_zouK.cpp +++ b/src/d/actor/d_a_obj_zouK.cpp @@ -8,7 +8,6 @@ #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_camera.h" #include "d/d_com_inf_game.h" -#include "d/d_item_data.h" #include "d/d_kankyo_rain.h" #include "d/d_procname.h" #include "m_Do/m_Do_mtx.h" diff --git a/src/d/actor/d_a_swattack.cpp b/src/d/actor/d_a_swattack.cpp index 697d0171..360aab7f 100644 --- a/src/d/actor/d_a_swattack.cpp +++ b/src/d/actor/d_a_swattack.cpp @@ -5,7 +5,6 @@ #include "d/actor/d_a_swattack.h" #include "f_op/f_op_actor_mng.h" -#include "JSystem/JUtility/JUTAssert.h" #include "d/d_cc_d.h" #include "d/d_com_inf_game.h" #include "d/d_procname.h" diff --git a/src/d/actor/d_a_tag_event.cpp b/src/d/actor/d_a_tag_event.cpp index d1fc3f3a..96e90629 100644 --- a/src/d/actor/d_a_tag_event.cpp +++ b/src/d/actor/d_a_tag_event.cpp @@ -100,11 +100,12 @@ void daTag_Event_c::demoInitProc() { case 0x5: mDoAud_bgmAllMute(0x1E); break; - case 0x6: + case 0x6: { fopAc_ac_c* mo2 = fopAcM_searchFromName("mo2", 0, 0); dComIfGp_event_setItemPartner(mo2); dComIfGp_event_setTalkPartner(mo2); break; + } case 0x9: u8 r30; if (!dComIfGs_isEventBit(0x3B20)) { diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index 3ce9ebb7..e0dfd259 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -11,11 +11,10 @@ #include "dolphin/gf/GFLight.h" #include "dolphin/gf/GFPixel.h" #include "dolphin/gf/GFTransform.h" -#include "f_op/f_op_camera_mng.h" +#include "f_op/f_op_camera.h" #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_lib.h" #include "m_Do/m_Do_mtx.h" -#include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/J2DGraph/J2DOrthoGraph.h" #include "SSystem/SComponent/c_rnd.h" diff --git a/src/d/d_ovlp_fade4.cpp b/src/d/d_ovlp_fade4.cpp index d23df776..29d6a738 100644 --- a/src/d/d_ovlp_fade4.cpp +++ b/src/d/d_ovlp_fade4.cpp @@ -8,7 +8,6 @@ #include "d/d_procname.h" #include "f_op/f_op_overlap.h" #include "m_Do/m_Do_graphic.h" -#include "new.h" /* 80224390-80224484 .text init__15dDlst_2DtEff1_cF8_GXColor */ void dDlst_2DtEff1_c::init(GXColor color) { @@ -285,8 +284,8 @@ void dOvlpFd4_c::execFadeOut() { /* 802253C4-80225528 .text execNextSnap__10dOvlpFd4_cFv */ void dOvlpFd4_c::execNextSnap() { - setExecute(execFadeIn); - setDraw(drawFadeIn); + setExecute(&dOvlpFd4_c::execFadeIn); + setDraw(&dOvlpFd4_c::drawFadeIn); fadeIn_dlst.first = true; dComIfGp_setWindowNum(1); diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index b819da02..b1f61bf9 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -1987,7 +1987,7 @@ void mDoExt_3DlineMat0_c::update(u16 segs, f32 size, GXColor& newColor, u16 spac f32 scale = delta.abs(); if (scale != 0.0f) { scale = size / scale; - VECScale(&delta, &delta, scale); + delta *= scale; } dstPos[0] = pos[0] + delta; @@ -2012,9 +2012,9 @@ void mDoExt_3DlineMat0_c::update(u16 segs, f32 size, GXColor& newColor, u16 spac if (scale != 0.0f) scale = r_size / scale; - VECScale(&delta, &delta, scale); - VECAdd(&nextP0, &(pos[0] + delta), &nextP0); - VECAdd(&nextP1, &(pos[0] - delta), &nextP1); + delta *= scale; + nextP0 += pos[0] + delta; + nextP1 += pos[0] - delta; r_dstPos[0] = nextP0 * 0.5f; r_dstPos[1] = nextP1 * 0.5f; @@ -2079,7 +2079,7 @@ void mDoExt_3DlineMat0_c::update(u16 segs, GXColor& newColor, dKy_tevstr_c* pTev f32 scale = delta.abs(); if (scale != 0.0f) { scale = *size_p / scale; - VECScale(&delta, &delta, scale); + delta *= scale; } dstPos[0] = pos[0] + delta; @@ -2102,9 +2102,9 @@ void mDoExt_3DlineMat0_c::update(u16 segs, GXColor& newColor, dKy_tevstr_c* pTev if (scale != 0.0f) scale = *size_p / scale; - VECScale(&delta, &delta, scale); - VECAdd(&nextP0, &(pos[0] + delta), &nextP0); - VECAdd(&nextP1, &(pos[0] - delta), &nextP1); + delta *= scale; + nextP0 += pos[0] + delta; + nextP1 += pos[0] - delta; r_dstPos[0] = nextP0 * 0.5f; r_dstPos[1] = nextP1 * 0.5f; @@ -2276,7 +2276,7 @@ void mDoExt_3DlineMat1_c::update(u16 segs, f32 size, GXColor& newColor, u16 spac f32 scale = delta.abs(); if (scale != 0.0f) { scale = size / scale; - VECScale(&delta, &delta, scale); + delta *= scale; } dstPos[0] = pos[0] + delta; @@ -2307,9 +2307,9 @@ void mDoExt_3DlineMat1_c::update(u16 segs, f32 size, GXColor& newColor, u16 spac if (scale != 0.0f) scale = r_size / scale; - VECScale(&delta, &delta, scale); - VECAdd(&nextP0, &(pos[0] + delta), &nextP0); - VECAdd(&nextP1, &(pos[0] - delta), &nextP1); + delta *= scale; + nextP0 += pos[0] + delta; + nextP1 += pos[0] - delta; r_dstPos[0] = nextP0 * 0.5f; r_dstPos[1] = nextP1 * 0.5f; @@ -2392,7 +2392,7 @@ void mDoExt_3DlineMat1_c::update(u16 segs, GXColor& newColor, dKy_tevstr_c* pTev f32 scale = delta.abs(); if (scale != 0.0f) { scale = *size_p / scale; - VECScale(&delta, &delta, scale); + delta *= scale; } dstPos[0] = pos[0] + delta; @@ -2421,9 +2421,9 @@ void mDoExt_3DlineMat1_c::update(u16 segs, GXColor& newColor, dKy_tevstr_c* pTev if (scale != 0.0f) scale = *size_p / scale; - VECScale(&delta, &delta, scale); - VECAdd(&nextP0, &(pos[0] + delta), &nextP0); - VECAdd(&nextP1, &(pos[0] - delta), &nextP1); + delta *= scale; + nextP0 += pos[0] + delta; + nextP1 += pos[0] - delta; r_dstPos[0] = nextP0 * 0.5f; r_dstPos[1] = nextP1 * 0.5f;