summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-02-27 11:38:11 +0100
committerrobojumper <robojumper@gmail.com>2025-02-27 11:38:11 +0100
commitb1f2d817a4c54c99dc5a4ec7600486f2475fa969 (patch)
tree91552416d225a56c74a1567e3e6c356330513ebb /include
parent6269e826598371fd7683dca5089df17536161f14 (diff)
Halfway there
Diffstat (limited to 'include')
-rw-r--r--include/d/a/obj/d_a_obj_dungeon_ship.h76
-rw-r--r--include/d/col/cc/d_cc_d.h1
-rw-r--r--include/m/m3d/m_anmmatclr.h5
-rw-r--r--include/toBeSorted/actor_event.h4
-rw-r--r--include/toBeSorted/actor_on_rail.h40
-rw-r--r--include/toBeSorted/time_proc.h45
6 files changed, 168 insertions, 3 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 edf93860..4ef14bd3 100644
--- a/include/d/a/obj/d_a_obj_dungeon_ship.h
+++ b/include/d/a/obj/d_a_obj_dungeon_ship.h
@@ -1,15 +1,33 @@
#ifndef D_A_OBJ_DUNGEON_SHIP_H
#define D_A_OBJ_DUNGEON_SHIP_H
+#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
+#include "d/col/bg/d_bg_w.h"
+#include "d/col/cc/d_cc_d.h"
+#include "m/m3d/m_anmchr.h"
+#include "m/m3d/m_anmmatclr.h"
+#include "m/m_vec.h"
+#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
-#include "s/s_StateMgr.hpp"
+#include "toBeSorted/actor_event.h"
+#include "toBeSorted/actor_on_rail.h"
+#include "toBeSorted/dowsing_target.h"
+#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/time_proc.h"
class dAcODungeonShip_c : public dAcObjBase_c {
public:
- dAcODungeonShip_c() : mStateMgr(*this, sStateID::null) {}
+ dAcODungeonShip_c()
+ : mStateMgr(*this, sStateID::null), mDowsingTarget(this, DowsingTarget::SLOT_NONE), mEvent(*this, nullptr) {}
virtual ~dAcODungeonShip_c() {}
+ virtual bool createHeap() override;
+ virtual int create() override;
+ virtual int draw() override;
+ virtual int doDelete() override;
+ virtual int actorExecute() override;
+
STATE_FUNC_DECLARE(dAcODungeonShip_c, Wait);
STATE_FUNC_DECLARE(dAcODungeonShip_c, Transparency);
STATE_FUNC_DECLARE(dAcODungeonShip_c, AppearEvent);
@@ -17,7 +35,59 @@ public:
STATE_FUNC_DECLARE(dAcODungeonShip_c, End);
private:
- /* 0x??? */ STATE_MGR_DECLARE(dAcODungeonShip_c);
+ static const f32 someFloats[18];
+
+ void updateMatrixAndScale();
+
+ void fn_485_1660();
+ void fn_485_1720();
+ u32 fn_485_1900();
+ u32 fn_485_1960();
+ void fn_485_1A90();
+ void fn_485_1BF0();
+ void fn_485_1DF0();
+ void fn_485_1EE0();
+
+ static void eventIn_Wrapper(void *arg);
+ void eventIn();
+ static void eventEnd_Wrapper(void *arg);
+ void eventEnd();
+
+ static dCcD_SrcCps sCcSrc;
+
+ /* 0x300 */ nw4r::g3d::ResFile mRes;
+ /* 0x334 */ MdlWithTimeProc mMdl;
+
+ /* 0x374 */ m3d::anmChr_c mAnmChr;
+ /* 0x3AC */ m3d::anmMatClr_c mAnmMatClr;
+ /* 0x3D8 */ dBgW mBg;
+ /* 0x5E8 */ dCcD_Cps mCc;
+ /* 0x758 */ STATE_MGR_DECLARE(dAcODungeonShip_c);
+ /* 0x794 */ DowsingTarget mDowsingTarget;
+ /* 0x7B4 */ mVec3_c mDowsingOffset;
+ /* 0x7C0 */ u8 mIsRoaming;
+ /* 0x7C4 */ ActorOnRail_Ext mPath;
+ /* 0x7F8 */ ActorEventRelated mEvent;
+ /* 0x848 */ u8 mAppearEventFromParam;
+ /* 0x849 */ u8 field_0x849;
+ /* 0x84A */ u8 mAppearEvent;
+ /* 0x84B */ u8 mPathIdx;
+ /* 0x84C */ u8 field_0x84C[0x850 - 0x84C];
+ /* 0x850 */ u32 field_0x850;
+ /* 0x854 */ u8 mNumTimesHit;
+ /* 0x855 */ u8 field_0x855;
+ /* 0x856 */ s8 field_0x856;
+ /* 0x858 */ f32 field_0x858;
+ /* 0x862 */ u8 field_0x862;
+ /* 0x863 */ u8 field_0x863;
+ /* 0x864 */ u8 field_0x864;
+ /* 0x865 */ u8 mIsDocked;
+ /* 0x868 */ s32 field_0x868;
+ /* 0x86C */ u32 field_0x86C;
+ /* 0x870 */ EffectsStruct mEffects[2];
+ /* 0x8D8 */ u8 field_0x8D8;
+ /* 0x8D9 */ u8 field_0x8D9;
+ /* 0x8DA */ u8 field_0x8DA;
};
#endif
diff --git a/include/d/col/cc/d_cc_d.h b/include/d/col/cc/d_cc_d.h
index 3c5bc793..a99588f9 100644
--- a/include/d/col/cc/d_cc_d.h
+++ b/include/d/col/cc/d_cc_d.h
@@ -18,6 +18,7 @@ public:
virtual cCcD_ShapeAttr *GetShapeAttr() override;
+ using cM3dGCps::Set;
void Set(const dCcD_SrcCps &src);
void unknownCalc();
};
diff --git a/include/m/m3d/m_anmmatclr.h b/include/m/m3d/m_anmmatclr.h
index 819e3ba2..071d983c 100644
--- a/include/m/m3d/m_anmmatclr.h
+++ b/include/m/m3d/m_anmmatclr.h
@@ -4,6 +4,7 @@
#include "m/m3d/m_bmdl.h"
#include "m/m3d/m_fanm.h"
#include "nw4r/g3d/g3d_anmclr.h"
+#include "nw4r/g3d/g3d_scnobj.h"
namespace m3d {
@@ -48,6 +49,10 @@ public:
void setFrameStart(f32, s32);
f32 getFrameStart(s32) const;
+ nw4r::g3d::AnmObjMatClrRes *getChild(s32 idx) {
+ return nw4r::g3d::ScnObj::DynamicCast<nw4r::g3d::AnmObjMatClrRes>(mpChildren[idx].getAnimObj());
+ }
+
private:
child_c *mpChildren;
};
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..5243be9b 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:
@@ -21,4 +22,43 @@ public:
mVec3_c *getPntPosForIndex(int index);
};
+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);
+
+ 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;
+ }
+
+
+private:
+ s32 mSegmentIndex;
+ f32 mSegmentFraction;
+ UNKWORD field_0x18;
+ 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