diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-10-15 14:29:12 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2026-10-15 14:32:29 -0400 |
| commit | 8be39579f62ece80fd77dba4cf9714bea1f1d2b4 (patch) | |
| tree | 011fa175c687df99297dc743f9934bf1dac08033 /include | |
| parent | 7c9b59ffedcad3655f98b55898d5f980c86792d9 (diff) | |
dArea_c + various cleanups in passing
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/d_area.h | 18 | ||||
| -rw-r--r-- | include/d/t/d_t_action.h | 6 | ||||
| -rw-r--r-- | include/d/t/d_t_alldie.h | 3 | ||||
| -rw-r--r-- | include/d/t/d_t_beetle.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_event.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_event_f.h | 17 | ||||
| -rw-r--r-- | include/d/t/d_t_gate_to_ground.h | 16 | ||||
| -rw-r--r-- | include/d/t/d_t_heat_resist.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_restart_time_stone.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_scene_change.h | 6 | ||||
| -rw-r--r-- | include/d/t/d_t_stream.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_sw_area.h | 36 | ||||
| -rw-r--r-- | include/d/t/d_t_time_door_beam.h | 7 | ||||
| -rw-r--r-- | include/d/t/d_t_touch.h | 4 | ||||
| -rw-r--r-- | include/d/t/d_t_view_clip.h | 4 | ||||
| -rw-r--r-- | include/toBeSorted/area_math.h | 12 |
16 files changed, 68 insertions, 81 deletions
diff --git a/include/d/d_area.h b/include/d/d_area.h new file mode 100644 index 00000000..2c91d1a1 --- /dev/null +++ b/include/d/d_area.h @@ -0,0 +1,18 @@ +#ifndef D_AREA_H +#define D_AREA_H + +#include "m/m_angle.h" +#include "m/m_mtx.h" +#include "m/m_vec.h" + +class dArea_c { +public: + void set(const mVec3_c &, const mAng, const mVec3_c &, mMtx_c *, f32); + bool checkAreaBox(const mVec3_c &); + bool checkAreaCyl(const mVec3_c &); + +private: + mMtx_c mArea; +}; + +#endif diff --git a/include/d/t/d_t_action.h b/include/d/t/d_t_action.h index bf0cbe63..893b8601 100644 --- a/include/d/t/d_t_action.h +++ b/include/d/t/d_t_action.h @@ -1,10 +1,10 @@ #ifndef D_T_ACTION_H #define D_T_ACTION_H +#include "d/d_area.h" #include "d/flag/sceneflag_manager.h" #include "d/t/d_tg.h" #include "m/m_angle.h" -#include "m/m_mtx.h" class dTgAction_c : public dTg_c { public: @@ -32,11 +32,11 @@ public: return SceneflagManager::sInstance->checkBoolFlag(mRoomID, mEnableFlag1); } bool checkActive2() const { - return (!(mEnableFlag2 < 0xFF) || SceneflagManager::sInstance->checkBoolFlag(mRoomID, mEnableFlag2)); + return !(mEnableFlag2 < 0xFF) || SceneflagManager::sInstance->checkBoolFlag(mRoomID, mEnableFlag2); } private: - /* 0x0FC */ mMtx_c mActiveMtx; + /* 0x0FC */ dArea_c mArea; /* 0x12C */ f32 mScaleIncrease; /* 0x130 */ u8 mEnableFlag1; /* 0x131 */ u8 mEnableFlag2; diff --git a/include/d/t/d_t_alldie.h b/include/d/t/d_t_alldie.h index 3fe18e82..8f4a596c 100644 --- a/include/d/t/d_t_alldie.h +++ b/include/d/t/d_t_alldie.h @@ -1,6 +1,7 @@ #ifndef D_T_ALL_DIE_H #define D_T_ALL_DIE_H +#include "d/d_area.h" #include "d/t/d_tg.h" #include "m/m_mtx.h" #include "toBeSorted/time_area_mgr.h" @@ -18,7 +19,7 @@ public: static dTgAllDie_c *getNearestToPlayer(s32 roomId); private: - /* 0x0FC */ mMtx_c mArea; + /* 0x0FC */ dArea_c mArea; /* 0x12C */ TimeAreaStruct mTimeArea; /* 0x138 */ s32 mNumEnemiesInArea; /* 0x13C */ u16 mTimer0x13C; diff --git a/include/d/t/d_t_beetle.h b/include/d/t/d_t_beetle.h index 554288c8..a093f912 100644 --- a/include/d/t/d_t_beetle.h +++ b/include/d/t/d_t_beetle.h @@ -2,8 +2,8 @@ #define D_T_BEETLE_H #include "d/a/obj/d_a_obj_boomerang.h" +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" // This is a tag actor for controlling where the beetle can fly // BtlTgC is leaves (beetle plays leaf animation as it passes through) @@ -40,7 +40,7 @@ public: }; private: - /* 0xFC */ mMtx_c mMatrix1; + /* 0xFC */ dArea_c mArea; /* 0x12C*/ u8 mZoneType; // defines what this object does /* 0x12D*/ u8 mZoneShape; // the shape created inside the object that it checks /* 0x12E*/ u8 mUnknown; // unused diff --git a/include/d/t/d_t_event.h b/include/d/t/d_t_event.h index 1fcf9ae4..6818a401 100644 --- a/include/d/t/d_t_event.h +++ b/include/d/t/d_t_event.h @@ -1,8 +1,8 @@ #ifndef D_T_EVENT_H #define D_T_EVENT_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "toBeSorted/actor_event.h" class dTgEvent_c : public dTg_c { @@ -21,7 +21,7 @@ public: private: /* 0x0FC */ ActorEventRelated mActorEvent; - /* 0x14C */ mMtx_c mMatrix; + /* 0x14C */ dArea_c mArea; /* 0x17C */ u32 mEventId; /* 0x180 */ u32 mSetSceneflag; /* 0x184 */ u32 mTrigSceneflag; diff --git a/include/d/t/d_t_event_f.h b/include/d/t/d_t_event_f.h index 024b29be..7ba7b069 100644 --- a/include/d/t/d_t_event_f.h +++ b/include/d/t/d_t_event_f.h @@ -2,9 +2,8 @@ #define D_T_EVENT_F_H #include "common.h" -#include "d/flag/storyflag_manager.h" +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "toBeSorted/actor_event.h" class dTgEventF_c : public dTg_c { @@ -14,20 +13,20 @@ public: virtual int create() override; virtual int doDelete() override; - static int checkStoryflagValid(u32); - static bool checkUncommitedStoryFlagValue(u32); - static void setStoryFlag(StoryFlags_e); - static void unsetStoryFlag(StoryFlags_e); + static int checkStoryflagValid(s32); + static bool checkUncommitedStoryFlagValue(s32); + static void setStoryFlag(s32); + static void unsetStoryFlag(s32); virtual int actorExecute() override; virtual int actorExecuteInEvent() override; virtual int draw() override; private: /* 0x0FC */ ActorEventRelated mActorEvent; - /* 0x14C */ mMtx_c mMatrix; + /* 0x14C */ dArea_c mArea; /* 0x17C */ u32 mEventId; - /* 0x180 */ u32 mSetStoryflag; - /* 0x184 */ u32 mTrigStoryflag; + /* 0x180 */ s32 mSetStoryflag; + /* 0x184 */ s32 mTrigStoryflag; /* 0x188 */ u32 mSubtype; }; #endif diff --git a/include/d/t/d_t_gate_to_ground.h b/include/d/t/d_t_gate_to_ground.h index 880417ea..5c13bccf 100644 --- a/include/d/t/d_t_gate_to_ground.h +++ b/include/d/t/d_t_gate_to_ground.h @@ -2,8 +2,8 @@ #define D_T_GATE_TO_GROUND_H #include "common.h" +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "toBeSorted/actor_event.h" class dTgGateToGround_c : public dTg_c { @@ -12,18 +12,18 @@ public: virtual ~dTgGateToGround_c() {} virtual int create() override; - virtual int doDelete() override; // fn_205_150 + virtual int doDelete() override; virtual int actorExecute() override; virtual int actorExecuteInEvent() override; - virtual int draw() override; // fn_205_2F0 + virtual int draw() override; private: /* 0xfc */ ActorEventRelated mEventRelated; - /* 0x14c */ mMtx_c matrix; - /* 0x17c */ s32 delayFrames; - /* 0x180 */ s16 params_FF_FF_00_00; - /* 0x182 */ s8 params_00_00_FF_00; - /* 0x183 */ s8 params_00_00_00_FF; + /* 0x14c */ dArea_c mArea; + /* 0x17c */ s32 mDelayFrameCount; + /* 0x180 */ s16 mStoryflag; + /* 0x182 */ s8 field_0x182; + /* 0x183 */ s8 mCameraID; }; #endif diff --git a/include/d/t/d_t_heat_resist.h b/include/d/t/d_t_heat_resist.h index e350f0ac..d1becbdd 100644 --- a/include/d/t/d_t_heat_resist.h +++ b/include/d/t/d_t_heat_resist.h @@ -2,8 +2,8 @@ #define D_T_HEAT_RESIST_H #include "common.h" +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" class dTgHeatResist_c : public dTg_c { public: @@ -16,7 +16,7 @@ public: virtual int actorExecute() override; private: - /* 0x0FC */ mMtx_c matrix; + /* 0x0FC */ dArea_c mArea; /* 0x12C */ u8 mInverted; }; diff --git a/include/d/t/d_t_restart_time_stone.h b/include/d/t/d_t_restart_time_stone.h index 33b2c9eb..a5383f9f 100644 --- a/include/d/t/d_t_restart_time_stone.h +++ b/include/d/t/d_t_restart_time_stone.h @@ -1,8 +1,8 @@ #ifndef D_T_RESTART_TIME_STONE_H #define D_T_RESTART_TIME_STONE_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "m/m_vec.h" class dTgRestartTimeStone_c : public dTg_c { @@ -16,7 +16,7 @@ public: virtual int actorExecute() override; private: - /* 0x0FC */ mMtx_c mMtx; + /* 0x0FC */ dArea_c mArea; /* 0x12C */ mVec3_c mPathStartPos; }; diff --git a/include/d/t/d_t_scene_change.h b/include/d/t/d_t_scene_change.h index 017c8d58..4224cbac 100644 --- a/include/d/t/d_t_scene_change.h +++ b/include/d/t/d_t_scene_change.h @@ -1,8 +1,8 @@ #ifndef D_T_SCENE_CHANGE_H #define D_T_SCENE_CHANGE_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "m/m_vec.h" class dTgSceneChange_c : public dTg_c { @@ -38,14 +38,14 @@ private: void savePlayerPosition(); private: - /* 0x0FC */ mMtx_c mArea; + /* 0x0FC */ dArea_c mArea; /* 0x12C */ u8 mSceneLink; /* 0x12D */ u8 mSceneType; /* 0x12E */ u8 mPathId; /* 0x12F */ u8 mEnableSceneflag; /* 0x130 */ u16 mEnableStoryflag; /* 0x132 */ u16 mDisableStoryflag; - /* 0x134 */ bool field_0x134; + /* 0x134 */ bool mbAreaCyl; /* 0x135 */ bool field_0x135; /* 0x136 */ bool field_0x136; /* 0x138 */ mVec3_c field_0x138; // Player position on Scrapper Stop diff --git a/include/d/t/d_t_stream.h b/include/d/t/d_t_stream.h index 9a52f1d9..a850bf82 100644 --- a/include/d/t/d_t_stream.h +++ b/include/d/t/d_t_stream.h @@ -1,10 +1,10 @@ #ifndef D_T_STREAM_H #define D_T_STREAM_H +#include "d/d_area.h" #include "d/t/d_tg.h" #include "f/f_list_mg.h" #include "f/f_list_nd.h" -#include "m/m_mtx.h" #include "m/m_vec.h" class dTgStream_c : public dTg_c { @@ -31,7 +31,7 @@ private: /* 0x0FF */ u8 mOrder; /* 0x100 */ u8 mIsSand; /* 0x101 */ u8 field_0x101; - /* 0x104 */ mMtx_c mArea; + /* 0x104 */ dArea_c mArea; /* 0x134 */ fLiNdBa_c mStreamNode; }; diff --git a/include/d/t/d_t_sw_area.h b/include/d/t/d_t_sw_area.h index 196f02c1..063ee60a 100644 --- a/include/d/t/d_t_sw_area.h +++ b/include/d/t/d_t_sw_area.h @@ -1,8 +1,8 @@ #ifndef D_T_SW_AREA_H #define D_T_SW_AREA_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" class dTgSwArea_c : public dTg_c { public: @@ -13,33 +13,13 @@ public: virtual int actorExecute() override; private: - u8 getSetSceneflag() { - return mParams; - } - - u8 getUnsetSceneflag() { - return mParams >> 0x8; - } - - u8 getIsPersistent() { - return mParams >> 0x10 & 1; - } - - mAng getSetStoryflag() { - return mRotation.x & 0x7FF; - } - - mAng getUnsetStoryflag() { - return mRotation.z & 0x7FF; - } - - mMtx_c area; - u8 setSceneflag; - u8 unsetSceneflag; - bool isTemporary; - f32 scale; - u16 setStoryflag; - u16 unsetStoryflag; + dArea_c mArea; + u8 mSetSceneflag; + u8 mUnsetSceneflag; + bool mbTemporary; + f32 mScaleModify; + u16 mSetStoryflag; + u16 mUnsetStoryflag; }; #endif diff --git a/include/d/t/d_t_time_door_beam.h b/include/d/t/d_t_time_door_beam.h index d03600e4..5b134375 100644 --- a/include/d/t/d_t_time_door_beam.h +++ b/include/d/t/d_t_time_door_beam.h @@ -1,8 +1,8 @@ #ifndef D_T_TIME_DOOR_BEAM_H #define D_T_TIME_DOOR_BEAM_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" class dTgTimeDoorBeam_c : public dTg_c { public: @@ -14,9 +14,10 @@ public: virtual int actorExecute() override; virtual int draw() override; + bool isPlayerInArea(); + private: - bool checkPlayerPosInMtx(); - mMtx_c matrix; + dArea_c mArea; }; #endif diff --git a/include/d/t/d_t_touch.h b/include/d/t/d_t_touch.h index bf0413bc..2a38b3d9 100644 --- a/include/d/t/d_t_touch.h +++ b/include/d/t/d_t_touch.h @@ -1,8 +1,8 @@ #ifndef D_T_TOUCH_H #define D_T_TOUCH_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" #include "s/s_State.hpp" class dTgTouchTag : public dTg_c { @@ -30,7 +30,7 @@ private: } STATE_MGR_DECLARE(dTgTouchTag); - mMtx_c mAreaOfEffect; + dArea_c mAreaOfEffect; u16 mFlagTimer; u8 mActivatorIndex; u8 mZoneFlag; diff --git a/include/d/t/d_t_view_clip.h b/include/d/t/d_t_view_clip.h index 0b81b35c..e3c2024a 100644 --- a/include/d/t/d_t_view_clip.h +++ b/include/d/t/d_t_view_clip.h @@ -1,8 +1,8 @@ #ifndef D_T_VIEW_CLIP_H #define D_T_VIEW_CLIP_H +#include "d/d_area.h" #include "d/t/d_tg.h" -#include "m/m_mtx.h" class dTgViewClip_c : public dTg_c { public: @@ -38,7 +38,7 @@ public: static void setViewClip(s32 idx, u8 value); private: - /* 0x0DC */ mMtx_c mArea; + /* 0x0DC */ dArea_c mArea; /* 0x12C */ u8 mIndex; /* 0x12D */ u8 mType; /* 0x12E */ u8 mAreaIndex; diff --git a/include/toBeSorted/area_math.h b/include/toBeSorted/area_math.h deleted file mode 100644 index f4f52600..00000000 --- a/include/toBeSorted/area_math.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef D_AREA_MATH_H -#define D_AREA_MATH_H - -#include "m/m_angle.h" -#include "m/m_mtx.h" -#include "m/m_vec.h" - -void matrixCreateFromPosRotYScale(mMtx_c &, const mVec3_c &, const mAng, const mVec3_c &, mMtx_c *, f32); -bool checkAreaBox(const mMtx_c &, const mVec3_c &); -bool checkAreaCyl(const mMtx_c &, const mVec3_c &); - -#endif |
