diff options
| author | Max Roncace <me@caseif.net> | 2025-08-25 18:33:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-25 15:33:44 -0700 |
| commit | b309e0cf57ba36f0c3e01a205f7e097ae46f389b (patch) | |
| tree | 9737d7a7210b909edf0875d262b5e75399c1ede4 /include | |
| parent | 19c8b6995ee3d774f78c4421cba833ec2cea77b4 (diff) | |
Miscellaneous improvements (#2603)
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JParticle/JPAEmitter.h | 6 | ||||
| -rw-r--r-- | include/d/actor/d_a_alink.h | 30 | ||||
| -rw-r--r-- | include/d/actor/d_a_e_mk.h | 18 | ||||
| -rw-r--r-- | include/d/actor/d_a_fr.h | 20 | ||||
| -rw-r--r-- | include/d/actor/d_a_midna.h | 2 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_cd2.h | 34 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_cdn3.h | 14 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_zra.h | 3 |
8 files changed, 42 insertions, 85 deletions
diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h index b1fae07113..30a7016503 100644 --- a/include/JSystem/JParticle/JPAEmitter.h +++ b/include/JSystem/JParticle/JPAEmitter.h @@ -138,7 +138,7 @@ public: void getGlobalTranslation(JGeometry::TVec3<f32>* out) const { out->set(mGlobalTrs); } void setGlobalDynamicsScale(const JGeometry::TVec3<f32>& i_scale) { mGlobalScl.set(i_scale); } void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; } - u8 getGlobalAlpha() { return mGlobalPrmClr.a; } + u8 getGlobalAlpha() const { return mGlobalPrmClr.a; } void getGlobalPrmColor(GXColor& color) { color = mGlobalPrmClr; } void setGlobalPrmColor(u8 r, u8 g, u8 b) { mGlobalPrmClr.r = r; mGlobalPrmClr.g = g; mGlobalPrmClr.b = b; } void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; } @@ -198,10 +198,10 @@ public: u32 getUserWork() { return mpUserWork; } void setUserWork(u32 userWork) { mpUserWork = userWork; } - u32 getParticleNumber() { + u32 getParticleNumber() const { return mAlivePtclBase.getNum() + mAlivePtclChld.getNum(); } - bool isEnableDeleteEmitter() { + bool isEnableDeleteEmitter() const { return checkStatus(JPAEmtrStts_EnableDeleteEmitter) && getParticleNumber() == 0; } void setDrawTimes(u8 drawTimes) { mDrawTimes = drawTimes; } diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index 1a84f4e036..1b868992ae 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -221,9 +221,9 @@ public: /* 0x0 */ u8 unk_0x0; }; -class daAlinkHIO_c +class daAlinkHIO_c #ifdef DEBUG -: public mDoHIO_entry_c +: public mDoHIO_entry_c #endif { public: @@ -3475,19 +3475,19 @@ public: u32 getStartEvent() { return fopAcM_GetParam(this) >> 0x18; } BOOL checkClimbFall() { return checkLadderFall(); } - bool checkMidnaWolfDashAnime() { return checkNoResetFlg1(FLG1_DASH_MODE); } - bool checkMidnaClingAnime() { return mMidnaAnm == 1; } - bool checkMidnaLowClingAnime() { return mMidnaAnm == 2; } - bool checkMidnaLookAroundAnime() { return mMidnaAnm == 3; } - bool checkMidnaPanicAnime() { return mMidnaAnm == 5; } - bool checkMidnaWolfDeadAnime() { return mMidnaAnm == 6; } - bool checkMidnaWolfSwimDeadAnime() { return mMidnaAnm == 7; } - bool checkMidnaRopeWaitStaggerAnime() { return mMidnaAnm == 8; } - bool checkMidnaRopeMoveStaggerAnime() { return mMidnaAnm == 9; } - bool checkMidnaGanonCatchAnm() { return mMidnaAnm == 10; } - bool checkMidnaGanonThrowLeftAnm() { return mMidnaAnm == 11; } - bool checkMidnaGanonThrowRightAnm() { return mMidnaAnm == 12; } - bool checkMidnaDigInAnime() { return mMidnaAnm == 13; } + bool checkMidnaWolfDashAnime() const { return checkNoResetFlg1(FLG1_DASH_MODE); } + bool checkMidnaClingAnime() const { return mMidnaAnm == 1; } + bool checkMidnaLowClingAnime() const { return mMidnaAnm == 2; } + bool checkMidnaLookAroundAnime() const { return mMidnaAnm == 3; } + bool checkMidnaPanicAnime() const { return mMidnaAnm == 5; } + bool checkMidnaWolfDeadAnime() const { return mMidnaAnm == 6; } + bool checkMidnaWolfSwimDeadAnime() const { return mMidnaAnm == 7; } + bool checkMidnaRopeWaitStaggerAnime() const { return mMidnaAnm == 8; } + bool checkMidnaRopeMoveStaggerAnime() const { return mMidnaAnm == 9; } + bool checkMidnaGanonCatchAnm() const { return mMidnaAnm == 10; } + bool checkMidnaGanonThrowLeftAnm() const { return mMidnaAnm == 11; } + bool checkMidnaGanonThrowRightAnm() const { return mMidnaAnm == 12; } + bool checkMidnaDigInAnime() const { return mMidnaAnm == 13; } void clearMidnaMsgNum() { mMidnaMsgNum = 0xffff; diff --git a/include/d/actor/d_a_e_mk.h b/include/d/actor/d_a_e_mk.h index a708961be9..9bdb6a0b68 100644 --- a/include/d/actor/d_a_e_mk.h +++ b/include/d/actor/d_a_e_mk.h @@ -18,8 +18,6 @@ */ class e_mk_class { public: - /* 8071C190 */ e_mk_class() {} - enum e_mk_ACTION { ACT_WAIT, ACT_MOVE, @@ -128,20 +126,4 @@ public: STATIC_ASSERT(sizeof(e_mk_class) == 0xcf8); -class daE_MK_HIO_c : public JORReflexible { -public: - /* 8071412C */ daE_MK_HIO_c(); - /* 8071C3EC */ virtual ~daE_MK_HIO_c() {}; - - void genMessage(JORMContext*); - - /* 0x04 */ s8 field_0x4; - /* 0x08 */ f32 mSize; - /* 0x0C */ f32 mBoomerangRatio; - /* 0x10 */ f32 mPlayerThrowDistMax; - /* 0x14 */ u8 mHaltAction; - /* 0x18 */ cXyz mCrownPosAdjust; -}; - - #endif /* D_A_E_MK_H */ diff --git a/include/d/actor/d_a_fr.h b/include/d/actor/d_a_fr.h index 4cddd88479..67f87f137b 100644 --- a/include/d/actor/d_a_fr.h +++ b/include/d/actor/d_a_fr.h @@ -59,25 +59,5 @@ public: STATIC_ASSERT(sizeof(fr_class) == 0x9e8); -class daFr_HIO_c : public JORReflexible { -public: - /* 805198EC */ daFr_HIO_c(); - /* 8051B920 */ virtual ~daFr_HIO_c() {}; - - void genMessage(JORMContext*); - - /* 0x04 */ s8 field_0x4; - /* 0x08 */ f32 field_0x8; - /* 0x0C */ f32 field_0xc; - /* 0x10 */ f32 field_0x10; - /* 0x14 */ f32 field_0x14; - /* 0x18 */ f32 field_0x18; - /* 0x1C */ f32 field_0x1c; - /* 0x20 */ f32 field_0x20; - /* 0x24 */ f32 field_0x24; - /* 0x28 */ f32 field_0x28; - /* 0x2C */ f32 field_0x2c; -}; - #endif /* D_A_FR_H */ diff --git a/include/d/actor/d_a_midna.h b/include/d/actor/d_a_midna.h index 7934b71e88..d71b2ab98e 100644 --- a/include/d/actor/d_a_midna.h +++ b/include/d/actor/d_a_midna.h @@ -319,7 +319,7 @@ public: MtxP getMtxHairTop() { return mpShadowModel->getAnmMtx(10); } - bool checkSetAnime(int param_0, daMidna_ANM i_anm) { + bool checkSetAnime(int param_0, daMidna_ANM i_anm) const { return mBckHeap[param_0].getIdx() == m_anmDataTable[i_anm].mResID; } diff --git a/include/d/actor/d_a_npc_cd2.h b/include/d/actor/d_a_npc_cd2.h index 200c8fc918..eb6217d0c4 100644 --- a/include/d/actor/d_a_npc_cd2.h +++ b/include/d/actor/d_a_npc_cd2.h @@ -165,7 +165,7 @@ inline f32 Cd2_HIO_cylH(int param_1) { return param_1 < 16 ? l_Cd2_HIO.field_0x0004[param_1].mCylH : l_Cd2_HIO.field_0x20c4[param_1 - 16].mCylH; } -inline int Cd2_HIO_maxLmtX_BACKBONE(int param_1) { +inline s16 Cd2_HIO_maxLmtX_BACKBONE(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_BACKBONE; @@ -175,7 +175,7 @@ inline int Cd2_HIO_maxLmtX_BACKBONE(int param_1) { return rv; } -inline int Cd2_HIO_maxLmtY_BACKBONE(int param_1) { +inline s16 Cd2_HIO_maxLmtY_BACKBONE(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_BACKBONE; @@ -185,7 +185,7 @@ inline int Cd2_HIO_maxLmtY_BACKBONE(int param_1) { return rv; } -inline int Cd2_HIO_maxLmtX_NECK(int param_1) { +inline s16 Cd2_HIO_maxLmtX_NECK(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_NECK; @@ -195,7 +195,7 @@ inline int Cd2_HIO_maxLmtX_NECK(int param_1) { return rv; } -inline int Cd2_HIO_maxLmtY_NECK(int param_1) { +inline s16 Cd2_HIO_maxLmtY_NECK(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_NECK; @@ -205,7 +205,7 @@ inline int Cd2_HIO_maxLmtY_NECK(int param_1) { return rv; } -inline int Cd2_HIO_maxLmtX_HEAD(int param_1) { +inline s16 Cd2_HIO_maxLmtX_HEAD(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_HEAD; @@ -215,7 +215,7 @@ inline int Cd2_HIO_maxLmtX_HEAD(int param_1) { return rv; } -inline int Cd2_HIO_maxLmtY_HEAD(int param_1) { +inline s16 Cd2_HIO_maxLmtY_HEAD(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_HEAD; @@ -225,7 +225,7 @@ inline int Cd2_HIO_maxLmtY_HEAD(int param_1) { return rv; } -inline int Cd2_HIO_minLmtX_BACKBONE(int param_1) { +inline s16 Cd2_HIO_minLmtX_BACKBONE(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_BACKBONE; @@ -235,7 +235,7 @@ inline int Cd2_HIO_minLmtX_BACKBONE(int param_1) { return rv; } -inline int Cd2_HIO_minLmtY_BACKBONE(int param_1) { +inline s16 Cd2_HIO_minLmtY_BACKBONE(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_BACKBONE; @@ -245,7 +245,7 @@ inline int Cd2_HIO_minLmtY_BACKBONE(int param_1) { return rv; } -inline int Cd2_HIO_minLmtX_NECK(int param_1) { +inline s16 Cd2_HIO_minLmtX_NECK(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_NECK; @@ -255,7 +255,7 @@ inline int Cd2_HIO_minLmtX_NECK(int param_1) { return rv; } -inline int Cd2_HIO_minLmtY_NECK(int param_1) { +inline s16 Cd2_HIO_minLmtY_NECK(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_NECK; @@ -265,7 +265,7 @@ inline int Cd2_HIO_minLmtY_NECK(int param_1) { return rv; } -inline int Cd2_HIO_minLmtX_HEAD(int param_1) { +inline s16 Cd2_HIO_minLmtX_HEAD(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_HEAD; @@ -275,7 +275,7 @@ inline int Cd2_HIO_minLmtX_HEAD(int param_1) { return rv; } -inline int Cd2_HIO_minLmtY_HEAD(int param_1) { +inline s16 Cd2_HIO_minLmtY_HEAD(int param_1) { s16 rv; if (param_1 < 16) { rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_HEAD; @@ -304,16 +304,10 @@ public: bool isPath() { return mPath != NULL; } s8 getArg0() { return mPath->m_points[field_0x20].mArg0; } s8 getArg1() { return mPath->m_points[field_0x20].mArg1; } - Vec getPoint(int index) { return mPath->m_points[index].m_position; } + Vec getPoint(u16 index) { return mPath->m_points[(u16)index].m_position; } void setLastPointNum() { field_0x20 = mPath->m_num - 1; } u16 getLastPointNum() { - u32 rv; - if (field_0x24 == 1) { - rv = mPath->m_num - 1; - } else { - return 0; - } - return rv; + return field_0x24 == 1 ? mPath->m_num - 1 : 0; } /* 0x00 */ fopAc_ac_c* mMyself; diff --git a/include/d/actor/d_a_npc_cdn3.h b/include/d/actor/d_a_npc_cdn3.h index 8edf9b3686..9cb42f6134 100644 --- a/include/d/actor/d_a_npc_cdn3.h +++ b/include/d/actor/d_a_npc_cdn3.h @@ -149,12 +149,12 @@ public: u16 startTime = getStartTime(); u16 endTime = getEndTime(); if (startTime != 0xff && endTime != 0xff) { - u32 x = (u16)(startTime / 10); - u32 y = startTime % 10; - field_0xb8e = ((u16)(y * 10) + (x * 60)); - u32 x2 = (u16)(endTime / 10); - u32 y2 = endTime % 10; - field_0xb8e = ((u16)(y2 * 10) + (x2 * 60)); + u16 x = startTime / 10; + u16 y = (startTime % 10) * 10; + field_0xb8c = y + x * 60; + x = endTime / 10; + y = (endTime % 10) * 10; + field_0xb8e = y + x * 60; field_0xb96 = 0; } else { field_0xb96 = 1; @@ -320,7 +320,7 @@ public: return 1; } - inline bool searchFirstScheduleTag(fopAc_ac_c* param_1); + inline bool searchFirstScheduleTag(); inline bool searchNextScheduleTag(); static actionFunc ActionTable[8][2]; diff --git a/include/d/actor/d_a_npc_zra.h b/include/d/actor/d_a_npc_zra.h index bec18cced8..e27177f632 100644 --- a/include/d/actor/d_a_npc_zra.h +++ b/include/d/actor/d_a_npc_zra.h @@ -3,6 +3,7 @@ #include "d/actor/d_a_npc.h" +class daNpc_zrA_HIO_c; /** * @ingroup actors-npcs * @class daNpc_zrA_Path_c @@ -332,7 +333,7 @@ public: /* 0x1248 */ daNpcF_Lookat_c mLookat; /* 0x12E4 */ dPaPo_c mPaPo; /* 0x131C */ daNpcF_ActorMngr_c mActorMngr[3]; - /* 0x1334 */ u8 field_0x1334[4]; + /* 0x1334 */ daNpc_zrA_HIO_c* mpHIO; /* 0x1338 */ dCcD_Cyl mCcCyl; /* 0x1474 */ ActionFn mpNextActionFn; /* 0x1480 */ ActionFn mpActionFn; |
