diff options
| author | robojumper <robojumper@gmail.com> | 2025-05-25 21:53:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-25 21:53:39 +0200 |
| commit | ae4573a236e59f966ea1197bebd8976ccb09e596 (patch) | |
| tree | 4dcb8e55213ac7c1755a4bbcadf517ccf2d480c6 /include/d | |
| parent | fd7d30d32283d03a412e8c401d04418351cf686a (diff) | |
| parent | 133ac12fcf28a8b475796169e7e7beb0de99bda5 (diff) | |
Merge pull request #175 from robojumper/d_path
d_path 33%
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/a/obj/d_a_obj_dungeon_ship.h | 2 | ||||
| -rw-r--r-- | include/d/a/obj/d_a_obj_ivy_rope.h | 2 | ||||
| -rw-r--r-- | include/d/d_bzs_types.h | 33 | ||||
| -rw-r--r-- | include/d/d_room.h | 36 | ||||
| -rw-r--r-- | include/d/t/d_t_sound_area.h | 4 |
5 files changed, 58 insertions, 19 deletions
diff --git a/include/d/a/obj/d_a_obj_dungeon_ship.h b/include/d/a/obj/d_a_obj_dungeon_ship.h index d8106eb8..259b33d1 100644 --- a/include/d/a/obj/d_a_obj_dungeon_ship.h +++ b/include/d/a/obj/d_a_obj_dungeon_ship.h @@ -11,7 +11,7 @@ #include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_State.hpp" #include "toBeSorted/actor_event.h" -#include "toBeSorted/actor_on_rail.h" +#include "toBeSorted/d_path.h" #include "toBeSorted/dowsing_target.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/time_proc.h" diff --git a/include/d/a/obj/d_a_obj_ivy_rope.h b/include/d/a/obj/d_a_obj_ivy_rope.h index 1f342416..c85d3ff4 100644 --- a/include/d/a/obj/d_a_obj_ivy_rope.h +++ b/include/d/a/obj/d_a_obj_ivy_rope.h @@ -12,7 +12,7 @@ #include "m/m_vec.h" #include "s/s_State.hpp" #include "toBeSorted/actor_event.h" -#include "toBeSorted/actor_on_rail.h" +#include "toBeSorted/d_path.h" #include "toBeSorted/attention.h" class dAcOivyRope_c : public dAcObjBase_c { diff --git a/include/d/d_bzs_types.h b/include/d/d_bzs_types.h index cf5264b4..638d98e0 100644 --- a/include/d/d_bzs_types.h +++ b/include/d/d_bzs_types.h @@ -24,10 +24,10 @@ struct AREA { // TODO: double check, copied from ss-tools // Size 0x28 struct BPNT { - /* 0x00 */ mVec3_c position1; - /* 0x0C */ mVec3_c position2; - /* 0x18 */ mVec3_c position3; - /* 0x24 */ u8 _0x24[4]; + /* 0x00 */ Vec position; + /* 0x0C */ Vec control1; + /* 0x18 */ Vec control2; + /* 0x24 */ u8 params[4]; }; // TODO: double check, copied from ss-tools @@ -99,15 +99,24 @@ struct OBJN { /* 0x00 */ u16 offset; }; +#define PATH_FLAG_WRAP_AROUND 1 +// 0 = spnt, pnt. 1 = bpnt, sbpt +#define PATH_FLAG_SPLINE 2 + // Size 0xC struct PATH { /* 0x00 */ u8 field_0x00; - /* 0x01 */ u8 field_0x01; + /* 0x01 */ u8 pathId; /* 0x02 */ u16 pointStartIndex; /* 0x04 */ u16 pointCount; - /* 0x06 */ u8 _0x06[4]; - /* 0x0A */ u8 firstBitIsWrapAround; + /* 0x06 */ u16 nextPath; + /* 0x08 */ u8 _0x08[2]; + /* 0x0A */ u8 flags; /* 0x0B */ u8 _0x0B[1]; + + u8 getNextId() const { + return nextPath; + } }; // Size 0x24 @@ -135,8 +144,8 @@ struct PLY { // Size 0x10 struct PNT { - /* 0x00 */ mVec3_c position; - /* 0x0C */ u8 _0x0C[4]; + /* 0x00 */ Vec position; + /* 0x0C */ u8 params[4]; }; // Size 0x4 @@ -170,14 +179,12 @@ struct SOBJ { /* 0x28 */ char name[8]; }; -// Size 0x??? -struct SBPT { - // ??? -}; // Parsed the same way in ss-tools typedef PNT SPNT; typedef PATH SPTH; +// Similarly accessed +typedef BPNT SBPT; // Size 0x14 struct STIF { diff --git a/include/d/d_room.h b/include/d/d_room.h index 30696fc2..287ae7c1 100644 --- a/include/d/d_room.h +++ b/include/d/d_room.h @@ -149,16 +149,40 @@ public: mpPath = path; } + const PATH *getPath(s32 off) const { + return mpPath + off; + } + + const u16 getPathCount() const { + return mPathCount; + } + + const SPTH *getSpth(s32 off) const { + return mpSpth + off; + } + + const u16 getSpthCount() const { + return mSpthCount; + } + void setPnt(const PNT *pnt, u16 count) { mPntCount = count; mpPnt = pnt; } + const PNT *getPnt(s32 off) const { + return mpPnt + off; + } + void setBpnt(const BPNT *bpnt, u16 count) { mBpntCount = count; mpBpnt = bpnt; } + const BPNT *getBpnt(s32 off) const { + return mpBpnt + off; + } + void setSpth(const SPTH *spth, u16 count) { mSpthCount = count; mpSpth = spth; @@ -169,14 +193,22 @@ public: mpSpnt = spnt; } + const SPNT *getSpnt(s32 off) const { + return mpSpnt + off; + } + void setSbpt(const SBPT *sbpt, u16 count) { mSbptCount = count; mpSbpt = sbpt; } - void setArea(const AREA *path, u16 count) { + const SBPT *getSbpt(s32 off) const { + return mpSbpt + off; + } + + void setArea(const AREA *area, u16 count) { mAreaCount = count; - mpArea = path; + mpArea = area; } void setPly(const PLY *ply, u16 count) { diff --git a/include/d/t/d_t_sound_area.h b/include/d/t/d_t_sound_area.h index 377adee4..0258f846 100644 --- a/include/d/t/d_t_sound_area.h +++ b/include/d/t/d_t_sound_area.h @@ -4,7 +4,7 @@ #include "d/t/d_tg.h" #include "m/m_mtx.h" #include "m/m_vec.h" -#include "toBeSorted/actor_on_rail.h" +#include "toBeSorted/d_path.h" class dTgSndAr_c : public dTg_c { public: @@ -27,7 +27,7 @@ private: bool checkAlg3(const mVec3_c &pos); mMtx_c mtx; - ActorOnRail mRail; + dPath_c mRail; }; #endif |
