summaryrefslogtreecommitdiff
path: root/include/toBeSorted
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-03-02 18:10:50 +0100
committerGitHub <noreply@github.com>2025-03-02 18:10:50 +0100
commitcfe7e5cf3b87ea32cfdf2ea874118a9c8d676b47 (patch)
tree3b5ab9c1c01ba0f43b5cdef6ac1cfe0e570db633 /include/toBeSorted
parentc242ff4cbb353d7eb50054044495d2a50f51bc72 (diff)
parent9b6e3e860d297a62581eaa330b2bc901b55c7436 (diff)
Merge pull request #118 from robojumper/d_a_obj_dungeon_ship
An attempt at d_a_obj_dungeon_ship
Diffstat (limited to 'include/toBeSorted')
-rw-r--r--include/toBeSorted/actor_event.h4
-rw-r--r--include/toBeSorted/actor_on_rail.h52
-rw-r--r--include/toBeSorted/time_proc.h45
3 files changed, 101 insertions, 0 deletions
diff --git a/include/toBeSorted/actor_event.h b/include/toBeSorted/actor_event.h
index b9844625..5a691f53 100644
--- a/include/toBeSorted/actor_event.h
+++ b/include/toBeSorted/actor_event.h
@@ -3,6 +3,7 @@
#include "common.h"
#include "d/a/d_a_base.h"
+#include "m/m_vec.h"
#include "toBeSorted/event.h"
class ActorEventRelated {
@@ -16,6 +17,9 @@ public:
void advanceNext();
bool isAdvance();
+ int getSingleFloatData(f32 *result, u32 code, u32);
+ int getSingleVecData(mVec3_c *result, u32 code, u32);
+
private:
u8 field_0x00[0x50 - 0x00];
};
diff --git a/include/toBeSorted/actor_on_rail.h b/include/toBeSorted/actor_on_rail.h
index 91a78daa..11a4fd16 100644
--- a/include/toBeSorted/actor_on_rail.h
+++ b/include/toBeSorted/actor_on_rail.h
@@ -2,6 +2,7 @@
#define ACTOR_ON_RAIL_H
#include "common.h"
+#include "m/m_vec.h"
class ActorOnRail {
private:
@@ -19,6 +20,57 @@ public:
bool init(int pathIndex, int roomId, int pathSubtype);
/* 800A68B0 */
mVec3_c *getPntPosForIndex(int index);
+
+ void fn_800A7C80(int segmentIndex, mVec3_c &vec, f32 segmentFraction);
+};
+
+class ActorOnRail_Ext : public ActorOnRail {
+public:
+ ActorOnRail_Ext();
+ virtual ~ActorOnRail_Ext();
+
+ void setSegment(u16 segmentIndex, f32 segmentFraction);
+ bool initExt(int pathIndex, int roomId, int, int pathSegment, int pathSubtype, f32, f32, f32);
+ void fn_800A9650();
+
+ s32 getSegmentIndex() const {
+ return mSegmentIndex;
+ }
+
+ f32 getSegmentFraction() const {
+ return mSegmentFraction;
+ }
+
+ bool CheckFlag(u32 flag) const {
+ return (field_0x1C & flag) != 0;
+ }
+
+ void ClearFlag(u32 flag) {
+ field_0x1C &= ~flag;
+ }
+
+ void SetFlag(u32 flag) {
+ field_0x1C |= flag;
+ }
+
+ const mVec3_c &getPosition() const {
+ return mPosition;
+ }
+
+ void setSpeed(f32 speed) {
+ mSpeed = speed;
+ }
+
+
+
+private:
+ s32 mSegmentIndex;
+ f32 mSegmentFraction;
+ f32 mSpeed;
+ u32 field_0x1C;
+ f32 field_0x20;
+ UNKWORD field_0x24;
+ mVec3_c mPosition;
};
#endif
diff --git a/include/toBeSorted/time_proc.h b/include/toBeSorted/time_proc.h
new file mode 100644
index 00000000..cab1a7cd
--- /dev/null
+++ b/include/toBeSorted/time_proc.h
@@ -0,0 +1,45 @@
+#ifndef TIME_PROC_H
+#define TIME_PROC_H
+
+/**
+ * A callback implementation that controls ???
+ */
+
+#include "m/m3d/m_proc.h"
+#include "m/m3d/m_smdl.h"
+#include "nw4r/g3d/g3d_scnobj.h"
+
+class TimeCallback_c : public nw4r::g3d::IScnObjCallback {
+public:
+ TimeCallback_c() : field_0x04(0), field_0x08(0), field_0x09(0) {}
+ virtual ~TimeCallback_c() {}
+ virtual void ExecCallback_CALC_VIEW(
+ nw4r::g3d::ScnObj::Timing /* timing */, nw4r::g3d::ScnObj * /* pObj */, u32 /* param */, void * /* pInfo */
+ ) override;
+
+ /* 0x04 */ u32 field_0x04;
+ /* 0x08 */ u8 field_0x08;
+ /* 0x09 */ u8 field_0x09;
+};
+
+class TimeProcBase : public m3d::proc_c {
+public:
+ virtual ~TimeProcBase() {}
+};
+
+class TimeProc : public TimeProcBase {
+public:
+ TimeProc() {}
+ virtual ~TimeProc() {}
+
+ TimeCallback_c mCallback;
+};
+
+class MdlWithTimeProc : public m3d::smdl_c {
+public:
+ int fn_8001F3B0(nw4r::g3d::ResMdl mdl, mAllocator_c *alloc, u32 bufferOption);
+
+ TimeProc mProc;
+};
+
+#endif // TIME_PROC_H