From 4e77023d7bba2fb0a1eebd7d5131c89800f0ccee Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 9 Jun 2024 00:07:28 +0200 Subject: Basically give up on d_t_sound_area --- include/d/a/obj/d_a_obj_base.h | 4 ++-- include/d/tg/d_t_sound_area.h | 33 +++++++++++++++++++++++++++++++++ include/m/m_mtx.h | 15 ++++++++------- include/m/m_vec.h | 2 +- include/toBeSorted/actor_on_rail.h | 22 ++++++++++++++++++++++ 5 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 include/d/tg/d_t_sound_area.h create mode 100644 include/toBeSorted/actor_on_rail.h (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index ed6d5abd..1f074499 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -81,9 +81,9 @@ public: /* 8002f190 */ void createChildAttached2(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, u32 roomId); // These may not belong here - /* 8002f1c0 */ static dAcBase_c createActorUnkGroup3(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, + /* 8002f1c0 */ static dAcBase_c *createActorUnkGroup3(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2); - /* 8002f260 */ static dAcBase_c createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos, + /* 8002f260 */ static dAcBase_c *createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, u16 id, u8 viewclipId); }; diff --git a/include/d/tg/d_t_sound_area.h b/include/d/tg/d_t_sound_area.h new file mode 100644 index 00000000..949249c7 --- /dev/null +++ b/include/d/tg/d_t_sound_area.h @@ -0,0 +1,33 @@ +#ifndef D_T_SOUND_AREA_H +#define D_T_SOUND_AREA_H + +#include +#include +#include +#include + +class dTgSndAr_c : public dTg_c { +public: + dTgSndAr_c() {} + virtual ~dTgSndAr_c() {} + virtual int draw() override; + virtual int actorExecute() override; + virtual int doDelete() override; + virtual int create() override; + +private: + int getTypeFromParams() { + return params >> 0x1C; + } + bool checkPosInArea(mVec3_c &pos); + + bool checkAlg0(mVec3_c &pos); + bool checkAlg1(mVec3_c &pos); + bool checkAlg2(mVec3_c &pos); + bool checkAlg3(mVec3_c &pos); + + mMtx_c mtx; + ActorOnRail mRail; +}; + +#endif diff --git a/include/m/m_mtx.h b/include/m/m_mtx.h index 512ede2d..f7095930 100644 --- a/include/m/m_mtx.h +++ b/include/m/m_mtx.h @@ -9,16 +9,17 @@ #include class mMtx_c { - mMtx_c(){}; +public: + mMtx_c() {}; /* 802f1660 */ mMtx_c(f32 xx, f32 xy, f32 xz, f32 xw, f32 yx, f32 yy, f32 yz, f32 yw, f32 zx, f32 zy, f32 zz, f32 zw); - /* 802f16b0 */ void XrotS(mAng angle); ///< Generates a rotation matrix for the X axis with the given angle. - /* 802f1770 */ void XrotM(mAng angle); ///< Rotates the matrix on the X axis by the given angle. - /* 802f17c0 */ void YrotS(mAng angle); ///< Generates a rotation matrix for the Y axis with the given angle. - /* 802f1880 */ void YrotM(mAng angle); ///< Rotates the matrix on the Y axis by the given angle. - /* 802f18d0 */ void ZrotS(mAng angle); ///< Generates a rotation matrix for the Z axis with the given angle. - /* 802f1990 */ void ZrotM(mAng angle); ///< Rotates the matrix on the Z axis by the given angle. + /* 802f16b0 */ void XrotS(mAng angle); ///< Generates a rotation matrix for the X axis with the given angle. + /* 802f1770 */ void XrotM(mAng angle); ///< Rotates the matrix on the X axis by the given angle. + /* 802f17c0 */ void YrotS(mAng angle); ///< Generates a rotation matrix for the Y axis with the given angle. + /* 802f1880 */ void YrotM(s16 &angle); ///< Rotates the matrix on the Y axis by the given angle. + /* 802f18d0 */ void ZrotS(mAng angle); ///< Generates a rotation matrix for the Z axis with the given angle. + /* 802f1990 */ void ZrotM(mAng angle); ///< Rotates the matrix on the Z axis by the given angle. /* 802f19e0 */ void ZXYrotS(mAng xRot, mAng yRot, mAng zRot); ///< Generates the matrix on the Y, X and Z axes by the given angles. diff --git a/include/m/m_vec.h b/include/m/m_vec.h index 1ea23afb..2f0e6c78 100644 --- a/include/m/m_vec.h +++ b/include/m/m_vec.h @@ -9,7 +9,7 @@ class mVec3_c : public EGG::Vector3f { public: /// @brief Constructs an empty vector. /* 80009ee0 */ mVec3_c() {} - // /* 80007460 */ ~mVec3_c() {} + /* 80007460 */ ~mVec3_c() {} /// @brief Constructs a vector from a float array. mVec3_c(const f32 *p) { diff --git a/include/toBeSorted/actor_on_rail.h b/include/toBeSorted/actor_on_rail.h new file mode 100644 index 00000000..47f8460d --- /dev/null +++ b/include/toBeSorted/actor_on_rail.h @@ -0,0 +1,22 @@ +#ifndef ACTOR_ON_RAIL_H +#define ACTOR_ON_RAIL_H + +#include + +class ActorOnRail { +private: + void *mpPathPtr; + int mRoomIndex; + u8 mPathSubtype; + +public: + /* 800A6690 */ + ActorOnRail(); + /* 800A66D0 */ + virtual ~ActorOnRail(); + + /* 800A6D90 */ + bool init(int pathIndex, int roomId, int pathSubtype); +}; + +#endif -- cgit v1.2.3