Merge pull request #175 from robojumper/d_path

d_path 33%
This commit is contained in:
robojumper
2025-05-25 21:53:39 +02:00
committed by GitHub
16 changed files with 909 additions and 150 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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 {
+20 -13
View File
@@ -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 {
+34 -2
View File
@@ -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) {
+2 -2
View File
@@ -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