diff options
| author | lepelog <25211966+lepelog@users.noreply.github.com> | 2026-02-01 17:36:32 +0100 |
|---|---|---|
| committer | lepelog <25211966+lepelog@users.noreply.github.com> | 2026-02-01 18:14:41 +0100 |
| commit | 066967c146c2ae3b4ec5cfa871748bb50e826aaa (patch) | |
| tree | bae4b10d3d8b0e50fdb3d8b2955bafa9a471618a /include | |
| parent | ab4b5ef9156320a2d58cacf9e6b0ac2c431070b3 (diff) | |
format
Diffstat (limited to 'include')
| -rw-r--r-- | include/c/c_counter.h | 1 | ||||
| -rw-r--r-- | include/d/a/d_a_base.h | 2 | ||||
| -rw-r--r-- | include/d/d_light_env.h | 4 | ||||
| -rw-r--r-- | include/d/d_player_act.h | 2 | ||||
| -rw-r--r-- | include/d/t/d_t_mass_obj.h | 135 | ||||
| -rw-r--r-- | include/egg/math/eggQuat.h | 8 | ||||
| -rw-r--r-- | include/egg/math/eggVector.h | 1 | ||||
| -rw-r--r-- | include/nw4r/ut/ut_Color.h | 1 |
8 files changed, 82 insertions, 72 deletions
diff --git a/include/c/c_counter.h b/include/c/c_counter.h index 5f3590e4..8efe5f26 100644 --- a/include/c/c_counter.h +++ b/include/c/c_counter.h @@ -8,6 +8,7 @@ public: static s32 GetGameFrame() { return m_gameFrame; } + private: static s32 m_gameFrame; }; diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index f6823dae..360397b2 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -169,7 +169,7 @@ public: return mPosition - other.mPosition; } - void getPostionDifferenceOut(const mVec3_c &other, mVec3_c& result) const { + void getPostionDifferenceOut(const mVec3_c &other, mVec3_c &result) const { mVec3_c diff = (other - mPosition); result = diff; } diff --git a/include/d/d_light_env.h b/include/d/d_light_env.h index a2267a02..350a7d9f 100644 --- a/include/d/d_light_env.h +++ b/include/d/d_light_env.h @@ -446,11 +446,11 @@ public: return field_0x38C0; } - const mVec3_c& getfield_0x38B4() const { + const mVec3_c &getfield_0x38B4() const { return field_0x38B4; } - mVec3_c& getfield_0x38C8() { + mVec3_c &getfield_0x38C8() { return field_0x38C8; } diff --git a/include/d/d_player_act.h b/include/d/d_player_act.h index b8c465dd..4dadb99f 100644 --- a/include/d/d_player_act.h +++ b/include/d/d_player_act.h @@ -61,7 +61,7 @@ public: /* vt 0x0C0 */ virtual bool isUsingWhip() const { return false; } - /* vt 0x0C4 */ virtual const mVec3_c* anotherThingWithWhip() { + /* vt 0x0C4 */ virtual const mVec3_c *anotherThingWithWhip() { return nullptr; } /* vt 0x0C8 */ virtual bool somethingWithWHip() { diff --git a/include/d/t/d_t_mass_obj.h b/include/d/t/d_t_mass_obj.h index 308ac075..db751857 100644 --- a/include/d/t/d_t_mass_obj.h +++ b/include/d/t/d_t_mass_obj.h @@ -36,17 +36,18 @@ public: TG_MASS_UNK2_IS_CUT = 2, TG_MASS_UNK2_TIMESHIFT_RELATED = 4, }; - dTgMassObjInstance(){ + dTgMassObjInstance() { reset(); } ~dTgMassObjInstance() {} void reset(); void releaseDynamicTransform(GrassModel *param_2); - bool checkForHit(GrassModel *param2,GrassModelData *param3,u16 roomid); - bool checkForHit(u32 param_2,dCcMassS_HitInf& param_3,dAcObjBase_c* param_4, - GrassModel *param_5,GrassModelData* param_6,undefined4 roomid); - bool FUN_80278c70(u32 param_2,dCcMassS_HitInf & param_3,dAcBase_c *param_4, - GrassModel *param_5); + bool checkForHit(GrassModel *param2, GrassModelData *param3, u16 roomid); + bool checkForHit( + u32 param_2, dCcMassS_HitInf ¶m_3, dAcObjBase_c *param_4, GrassModel *param_5, GrassModelData *param_6, + undefined4 roomid + ); + bool FUN_80278c70(u32 param_2, dCcMassS_HitInf ¶m_3, dAcBase_c *param_4, GrassModel *param_5); bool handleLinkSpinAttack(GrassModel *param_2); bool handleTimeshiftZone(); void getDrawMatrix(mMtx_c *pOut); @@ -55,7 +56,7 @@ public: return mSpecialItemDropId == 10; } -// private: + // private: /* 0x00 */ TListNode<dTgMassObjInstance> mLink; /* 0x08 */ GXColorS10 mTevColor; /* 0x10 */ mVec3_c mGroundHeight; @@ -75,19 +76,18 @@ public: // size: 0x50 class dTgMassObjTransform { public: - dTgMassObjTransform(); ~dTgMassObjTransform() {} void update(); - const mMtx_c& getMtx() const { + const mMtx_c &getMtx() const { return mMtx; } - void setQuat(const mQuat_c& quat) { + void setQuat(const mQuat_c &quat) { mQuat.set(quat); } - - void setMtxFromQuat(const mQuat_c& quat) { + + void setMtxFromQuat(const mQuat_c &quat) { mMtx.fromQuat(quat); } @@ -107,25 +107,25 @@ public: destroyLinkedLists(); } void initRes(nw4r::g3d::ResMat pResMat, nw4r::g3d::ResShp pResShp); - void addToRoom(s32 room, dTgMassObjInstance* p3); - void removeFromRoom(s32 room, dTgMassObjInstance* p3); - void update(GrassModel*); - bool tryCreateLinkedLists(s32 entrycount, EGG::Heap* heap); + void addToRoom(s32 room, dTgMassObjInstance *p3); + void removeFromRoom(s32 room, dTgMassObjInstance *p3); + void update(GrassModel *); + bool tryCreateLinkedLists(s32 entrycount, EGG::Heap *heap); void destroyLinkedLists(); - void unloadRoom(GrassModel *param_2,int roomid); - void draw(f32 param_1,f32 param_2, - nw4r::math::MTX34 *param_4); + void unloadRoom(GrassModel *param_2, int roomid); + void draw(f32 param_1, f32 param_2, nw4r::math::MTX34 *param_4); + private: /* 0x04 */ nw4r::g3d::ResMat mResMat; /* 0x08 */ nw4r::g3d::ResShp mResShp; - /* 0x0C */ dTgMassObjInstanceList* mLinkedLists; + /* 0x0C */ dTgMassObjInstanceList *mLinkedLists; /* 0x10 */ u16 mLinkedListsCount; }; struct GrassModelInfo { - /* 0x00 */ char* mArcName; - /* 0x04 */ char* mModelName; - /* 0x08 */ char* mCutModelName; + /* 0x00 */ char *mArcName; + /* 0x04 */ char *mModelName; + /* 0x08 */ char *mCutModelName; /* 0x0C */ u32 field_0x0C; /* 0x10 */ u16 mRadius; /* 0x12 */ u16 field_0x12; @@ -136,42 +136,45 @@ struct GrassModelInfo { /* 0x1B */ u8 field_0x1B; // might be padding }; - struct GrassModelNames { - /* 0x00 */ char* mArcName; - /* 0x04 */ char* mModelName; - /* 0x08 */ char* mCutModelName; + /* 0x00 */ char *mArcName; + /* 0x04 */ char *mModelName; + /* 0x08 */ char *mCutModelName; }; class GrassModel : public m3d::proc_c { public: - GrassModel() : mpModelData(nullptr), mInstanceList(nullptr), mStaticTransformationList(nullptr), mDynamicTransformationList(nullptr), mCutCounter(0) {} + GrassModel() + : mpModelData(nullptr), + mInstanceList(nullptr), + mStaticTransformationList(nullptr), + mDynamicTransformationList(nullptr), + mCutCounter(0) {} /* vt 0x08 */ virtual ~GrassModel() { remove(); } - bool - setModelInfo(f32 radius,f32 param_2,int param_4, - s32 roomCount,u16 instanceListLength,u16 staticTransformationListLength,int dynamicTransformationListLength, - undefined1 param_9,s32 opaDrawPrio,u32 xluDrawPrio,mHeapAllocator_c *allocator); - bool - spawnSingleGrass(int modelSubtype,u16 roomid,mVec3_c *groundHeight, - u16 yRotation,s32 specialItemDropId,int affectedByTimeshift,int activeInPresent, - s32 massObjSubtype,u8 lightingCode); + bool setModelInfo( + f32 radius, f32 param_2, int param_4, s32 roomCount, u16 instanceListLength, u16 staticTransformationListLength, + int dynamicTransformationListLength, undefined1 param_9, s32 opaDrawPrio, u32 xluDrawPrio, + mHeapAllocator_c *allocator + ); + bool spawnSingleGrass( + int modelSubtype, u16 roomid, mVec3_c *groundHeight, u16 yRotation, s32 specialItemDropId, + int affectedByTimeshift, int activeInPresent, s32 massObjSubtype, u8 lightingCode + ); void addToFreeInstances(dTgMassObjInstance *param_2); - bool addToRoom(u32 param2, s32 roomid, dTgMassObjInstance* param4); + bool addToRoom(u32 param2, s32 roomid, dTgMassObjInstance *param4); void unloadRoom(u16 roomid); - void initResForModel(s32 param_2,nw4r::g3d::ResMat pResMat,nw4r::g3d::ResShp pResShp); - dTgMassObjTransform* aquireTransform(); + void initResForModel(s32 param_2, nw4r::g3d::ResMat pResMat, nw4r::g3d::ResShp pResShp); + dTgMassObjTransform *aquireTransform(); void update(); - void releaseTransform(dTgMassObjTransform*); - void setModelInfo(const GrassModelInfo* modelInfo, mHeapAllocator_c * heap) { + void releaseTransform(dTgMassObjTransform *); + void setModelInfo(const GrassModelInfo *modelInfo, mHeapAllocator_c *heap) { setModelInfo( - modelInfo->mRadius, modelInfo->field_0x0C, - modelInfo->field_0x12, 0x3F, - modelInfo->mInstanceCount, modelInfo->mStaticTransformCount, - modelInfo->mDynamicTransformCount, (f32)modelInfo->field_0x1A, - 0x7F, 0xFFFFFFFF, heap - ); + modelInfo->mRadius, modelInfo->field_0x0C, modelInfo->field_0x12, 0x3F, modelInfo->mInstanceCount, + modelInfo->mStaticTransformCount, modelInfo->mDynamicTransformCount, (f32)modelInfo->field_0x1A, 0x7F, + 0xFFFFFFFF, heap + ); } void setRadius(f32 r) { @@ -191,14 +194,14 @@ public: return mDynamicTransformationListLength; } - dTgMassObjInstanceList& getFree() { + dTgMassObjInstanceList &getFree() { return mFreeInstances; } bool testSpecialItemtype(s32 itemtype) { return itemtype == 10; } - + /* vt 0x10 */ virtual void remove() override; // /* vt 0x14 */ virtual int entry(); /* vt 0x18 */ virtual void drawOpa() override { @@ -210,22 +213,22 @@ public: void draw(); void calcCutCounter() { - mCutCounter = (mCutCounter != 0) ? mCutCounter-1 : mCutCounter; + mCutCounter = (mCutCounter != 0) ? mCutCounter - 1 : mCutCounter; } - dTgMassObjTransformList& GetUnk3Too() { + dTgMassObjTransformList &GetUnk3Too() { return mAquiredTransforms; } - dTgMassObjTransformList& GetUnk3() { + dTgMassObjTransformList &GetUnk3() { return mAvailableTransforms; } -// private: - /* 0x18 */ GrassModelData* mpModelData; - /* 0x1C */ dTgMassObjInstance* mInstanceList; - /* 0x20 */ dTgMassObjTransform* mStaticTransformationList; - /* 0x24 */ dTgMassObjTransform* mDynamicTransformationList; + // private: + /* 0x18 */ GrassModelData *mpModelData; + /* 0x1C */ dTgMassObjInstance *mInstanceList; + /* 0x20 */ dTgMassObjTransform *mStaticTransformationList; + /* 0x24 */ dTgMassObjTransform *mDynamicTransformationList; /* 0x28 */ dTgMassObjInstanceList mFreeInstances; /* 0x34 */ dTgMassObjTransformList mAquiredTransforms; /* 0x40 */ dTgMassObjTransformList mAvailableTransforms; @@ -257,13 +260,17 @@ public: void unloadRoom(u16 roomid); - int initializeCircle(GrassModel *grassModel, mVec3_c *bbStart, mVec3_c *bbEnd,s32 xzDisplacement,mMtx_c *param_7,s32 specialItemDropId, - undefined4 affectedByTimeshift,u8 activeInPresent,int randInt,s32 massObjSubtype, - u8 lightingCode, f32 fParam); + int initializeCircle( + GrassModel *grassModel, mVec3_c *bbStart, mVec3_c *bbEnd, s32 xzDisplacement, mMtx_c *param_7, + s32 specialItemDropId, undefined4 affectedByTimeshift, u8 activeInPresent, int randInt, s32 massObjSubtype, + u8 lightingCode, f32 fParam + ); - int initializeBox(GrassModel *grassModel,mVec3_c *minVec, - mVec3_c *maxVec,int xzDisplacement,mMtx_c *boundsMtx,int specialItemDropId,undefined4 affectedByTimeshift, - u8 activeInPresent,int randInt,s32 massObjSubtype,u8 lightingCode, f32 fParam); + int initializeBox( + GrassModel *grassModel, mVec3_c *minVec, mVec3_c *maxVec, int xzDisplacement, mMtx_c *boundsMtx, + int specialItemDropId, undefined4 affectedByTimeshift, u8 activeInPresent, int randInt, s32 massObjSubtype, + u8 lightingCode, f32 fParam + ); virtual int actorExecute() override; virtual int actorCreate() override; @@ -281,7 +288,7 @@ public: return mtx2; } - GrassModel* getGrassModel(s32 i) { + GrassModel *getGrassModel(s32 i) { return sGrassModels[i]; } diff --git a/include/egg/math/eggQuat.h b/include/egg/math/eggQuat.h index 96808c56..aa33b73b 100644 --- a/include/egg/math/eggQuat.h +++ b/include/egg/math/eggQuat.h @@ -44,8 +44,8 @@ struct Quatf { Vector3f rotateVector(const Vector3f &); Vector3f rotateVectorInv(const Vector3f &); // not in SS void slerpTo(const Quatf &, f32, Quatf &out) const; - void slerpTo2(f32 fparam,const Quatf & param1, Quatf &out ) const { - const Quatf & tmp = param1; + void slerpTo2(f32 fparam, const Quatf ¶m1, Quatf &out) const { + const Quatf &tmp = param1; slerpTo(tmp, fparam, out); } void limitSlerpTo(const Quatf &, f32, f32, Quatf &out) const; @@ -53,13 +53,13 @@ struct Quatf { void makeVectorRotation(const Vector3f &, const Vector3f &); // not sure about the name - f32 dot(const Quatf& other) const { + f32 dot(const Quatf &other) const { f32 ret = v.dot(other.v); ret += w * other.w; return ret; } - void set(const Quatf& other) { + void set(const Quatf &other) { v.set(other.v); w = other.w; } diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index 515b3e5a..e69f0649 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -8,6 +8,7 @@ #include "nw4r/math/math_triangular.h" #include "nw4r/math.h" + #include <cmath> namespace EGG { diff --git a/include/nw4r/ut/ut_Color.h b/include/nw4r/ut/ut_Color.h index 95ecc926..494d0b89 100644 --- a/include/nw4r/ut/ut_Color.h +++ b/include/nw4r/ut/ut_Color.h @@ -3,6 +3,7 @@ #include "nw4r/types_nw4r.h" #include "rvl/GX/GXTypes.h" + #include "rvl/GX.h" // IWYU pragma: export namespace nw4r { |
