summaryrefslogtreecommitdiff
path: root/include/d/a/obj
diff options
context:
space:
mode:
authorElijah Thomas <42302100+elijah-thomas774@users.noreply.github.com>2026-05-03 15:29:45 -0400
committerGitHub <noreply@github.com>2026-05-03 15:29:45 -0400
commit434b1bef7f5583ccdb8ff1af6b9e7a711317ec94 (patch)
tree1022eba8ff5a19b790b86c627e4b4132f457192b /include/d/a/obj
parentd3ce7281c6e9ae6644e3670992d417c99043a119 (diff)
parent53eea0cc9f4da7925ab2d4c2131ab182e0d18b39 (diff)
Merge pull request #309 from elijah-thomas774/Various-Actors
Various actors
Diffstat (limited to 'include/d/a/obj')
-rw-r--r--include/d/a/obj/d_a_obj_base.h9
-rw-r--r--include/d/a/obj/d_a_obj_bell.h24
-rw-r--r--include/d/a/obj/d_a_obj_dormitory_gate.h44
-rw-r--r--include/d/a/obj/d_a_obj_flag.h54
4 files changed, 122 insertions, 9 deletions
diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h
index ff29770a..b2ae203d 100644
--- a/include/d/a/obj/d_a_obj_base.h
+++ b/include/d/a/obj/d_a_obj_base.h
@@ -267,14 +267,17 @@ public:
return result; \
} while (0)
-// Use this in actors' create functions
-#define CREATE_ALLOCATOR(className) \
+#define CREATE_ALLOCATOR_SIZE(className, size) \
do { \
- if (!initAllocatorWork1Heap(-1, #className "::m_allocator", 0x20)) { \
+ if (!initAllocatorWork1Heap(size, #className "::m_allocator", 0x20)) { \
return FAILED; \
} \
} while (0)
+// Use this in actors' create functions
+#define CREATE_ALLOCATOR(className) CREATE_ALLOCATOR_SIZE(className, -1)
+#define CREATE_ALLOCATOR_UNCHECKED(className) initAllocatorWork1Heap(-1, #className "::m_allocator", 0x20)
+
class dAcObjRef_unk {
public:
dAcObjRef_unk(dAcObjBase_c *ref) : mObj(nullptr), refOwner(ref) {}
diff --git a/include/d/a/obj/d_a_obj_bell.h b/include/d/a/obj/d_a_obj_bell.h
index 45cdbae5..79b5a4bf 100644
--- a/include/d/a/obj/d_a_obj_bell.h
+++ b/include/d/a/obj/d_a_obj_bell.h
@@ -2,19 +2,39 @@
#define D_A_OBJ_BELL_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_smdl.h"
+#include "m/m_vec.h"
+#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
+#include "toBeSorted/dowsing_target.h"
class dAcObell_c : public dAcObjBase_c {
public:
- dAcObell_c() : mStateMgr(*this) {}
+ dAcObell_c() : mStateMgr(*this), mDowsingTarget(this, DowsingTarget::SLOT_NONE) {}
virtual ~dAcObell_c() {}
+ virtual int create() override;
+ virtual int doDelete() override;
+ virtual int draw() override;
+ virtual bool createHeap() override;
+ virtual int actorExecute() override;
+
STATE_FUNC_DECLARE(dAcObell_c, Wait);
STATE_FUNC_DECLARE(dAcObell_c, WaitRupee);
STATE_FUNC_DECLARE(dAcObell_c, After);
private:
- /* 0x??? */ STATE_MGR_DECLARE(dAcObell_c);
+ /* 0x330 */ nw4r::g3d::ResFile mResFile;
+ /* 0x334 */ m3d::smdl_c mMdl;
+ /* 0x350 */ dBgW mBgW;
+ /* 0x560 */ dCcD_Sph mSph;
+ /* 0x6B0 */ STATE_MGR_DECLARE(dAcObell_c);
+ /* 0x6EC */ DowsingTarget mDowsingTarget;
+ /* 0x70C */ mVec3_c mRupeeDir;
+ /* 0x718 */ mVec3_c field_0x718;
+ /* 0x### */ // More
};
#endif
diff --git a/include/d/a/obj/d_a_obj_dormitory_gate.h b/include/d/a/obj/d_a_obj_dormitory_gate.h
index 3e0ab410..9f1e81c1 100644
--- a/include/d/a/obj/d_a_obj_dormitory_gate.h
+++ b/include/d/a/obj/d_a_obj_dormitory_gate.h
@@ -2,18 +2,58 @@
#define D_A_OBJ_DORMITORY_GATE_H
#include "d/a/obj/d_a_obj_base.h"
+#include "d/col/bg/d_bg_w.h"
+#include "m/m3d/m_anmmatclr.h"
+#include "m/m3d/m_smdl.h"
+#include "m/m_mtx.h"
+#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
+#include "toBeSorted/stage_render_stuff.h"
class dAcODormitoryGate_c : public dAcObjBase_c {
public:
- dAcODormitoryGate_c() : mStateMgr(*this) {}
+ enum Type_e {
+ TYPE_GATE = 0,
+ TYPE_GODDOOR = 1,
+ TYPE_SHUTTER = 2,
+ TYPE_GATE_F400 = 3,
+ };
+ dAcODormitoryGate_c() : mStateMgr(*this), mScnCallback(this) {}
virtual ~dAcODormitoryGate_c() {}
+ virtual int create() override;
+ virtual int doDelete() override;
+ virtual int draw() override;
+ virtual bool createHeap() override;
+ virtual int actorExecute() override;
+
STATE_FUNC_DECLARE(dAcODormitoryGate_c, Wait);
STATE_FUNC_DECLARE(dAcODormitoryGate_c, End);
private:
- /* 0x??? */ STATE_MGR_DECLARE(dAcODormitoryGate_c);
+ /** Sets the parameter for Door to be open/closed physically */
+ void fn_534_C80();
+
+ /** Sets the Door open/closed physically */
+ void fn_534_D40();
+
+ bool checkOpenFlag();
+
+ /* 0x330 */ nw4r::g3d::ResFile mResFile;
+ /* 0x334 */ m3d::smdl_c mMdls[2];
+ /* 0x36C */ m3d::anmMatClr_c mAnmMatClr;
+ /* 0x398 */ dBgW mCollision[2];
+ /* 0x7B8 */ STATE_MGR_DECLARE(dAcODormitoryGate_c);
+ /* 0x7F4 */ mMtx_c mDoorMtx[2];
+ /* 0x854 */ Type_e mSubtype;
+ /* 0x858 */ u8 mNumDoors;
+ /* 0x85C */ f32 mShutterHeight;
+ /* 0x860 */ mAng mGateAngle;
+ /* 0x862 */ bool mIsOpen;
+ /* 0x863 */ u8 _0x863[0x865 - 0x863];
+ /* 0x865 */ u8 mGodDoorSomething;
+ /* 0x868 */ dScnCallback_c mScnCallback;
+ /* 0x874 */ u16 mStoryflag;
};
#endif
diff --git a/include/d/a/obj/d_a_obj_flag.h b/include/d/a/obj/d_a_obj_flag.h
index a021f691..06debca0 100644
--- a/include/d/a/obj/d_a_obj_flag.h
+++ b/include/d/a/obj/d_a_obj_flag.h
@@ -1,18 +1,68 @@
#ifndef D_A_OBJ_FLAG_H
#define D_A_OBJ_FLAG_H
+#include "common.h"
+#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_base.h"
+#include "d/col/cc/d_cc_d.h"
+#include "m/m3d/m_anmtexsrt.h"
+#include "m/m3d/m_smdl.h"
+#include "m/m_vec.h"
+#include "nw4r/g3d/g3d_scnobj.h"
+#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
+class dAcODesertAgo_c;
class dAcOFlag_c : public dAcObjBase_c {
public:
- dAcOFlag_c() : mStateMgr(*this) {}
+ class callback_c : public nw4r::g3d::IScnObjCallback {
+ public:
+ callback_c(dAcObjBase_c *arg) : mpActor(arg) {}
+ /* 0x04 */ dAcObjBase_c *mpActor;
+ };
+ dAcOFlag_c() : mResFile(nullptr), mStateMgr(*this), mCallback(this) {}
virtual ~dAcOFlag_c() {}
+ virtual int doDelete() override;
+ virtual int draw() override;
+ virtual bool createHeap() override;
+ virtual int actorCreate() override;
+ virtual int actorPostCreate() override;
+ virtual int actorExecute() override;
+
STATE_FUNC_DECLARE(dAcOFlag_c, Wait);
+ void setCollider();
+ void createPlacement();
+
+ bool isSail();
+ bool isPurpleFlag();
+ const char *getArcName();
+ const char *getMdlName();
+ const char *getAnmTexSrtName();
+
private:
- /* 0x??? */ STATE_MGR_DECLARE(dAcOFlag_c);
+ /* 0x330 */ nw4r::g3d::ResFile mResFile;
+ /* 0x334 */ m3d::smdl_c mMdl;
+ /* 0x350 */ m3d::anmTexSrt_c mAnmTexSrt;
+ /* 0x37C */ dCcD_Cps mCps;
+ /* 0x4EC */ STATE_MGR_DECLARE(dAcOFlag_c);
+ /* 0x528 */ callback_c mCallback;
+ /* 0x530 */ s32 field_0x530;
+ /* 0x534 */ s32 mNumJoints;
+ /* 0x538 */ mVec3_c *mpJoints;
+ /* 0x53C */ mVec3_c field_0x53C;
+ /* 0x548 */ s32 field_0x548;
+ /* 0x54C */ dAcRef_c<dAcODesertAgo_c> mDesertAgoRef;
+ /* 0x558 */ s32 field_0x558;
+ /* 0x55C */ s32 field_0x55C;
+ /* 0x560 */ u8 field_0x560;
+ /* 0x561 */ u8 field_0x561;
+ /* 0x564 */ s32 field_0x564;
+ /* 0x568 */ f32 field_0x568;
+ /* 0x56C */ mVec3_c *mpJoints1; // Size 15
+ /* 0x570 */ mVec3_c *mpJoints2; // Size 15
+ /* 0x574 */ mVec3_c *mpJoints3; // Size 15
};
#endif