From 4c1290dad7821fda93a215d20c79cdb0c11ad55a Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Mon, 24 Nov 2025 00:13:28 -0500 Subject: functions declared and empty definitions --- include/d/a/obj/d_a_obj_door.h | 237 +++++++++++++++++++++++++++++++++++- include/d/a/obj/d_a_obj_door_base.h | 19 ++- 2 files changed, 254 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index 6681801e..d3da304f 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -1,16 +1,251 @@ #ifndef D_A_OBJ_DOOR_H #define D_A_OBJ_DOOR_H +#include "common.h" #include "d/a/obj/d_a_obj_door_base.h" +#include "m/m3d/m_anmmdl.h" +#include "m/m3d/m_smdl.h" +#include "m/m_vec.h" +#include "toBeSorted/actor_event.h" +#include "toBeSorted/d_emitter.h" +#include "toBeSorted/d_flow_mgr.h" class dAcOdoor_c : public dAcObjDoor_c { public: - dAcOdoor_c() {} + enum Subtype_e { + SUBTYPE_0, + SUBTYPE_1, + SUBTYPE_2, + SUBTYPE_3, + SUBTYPE_4, + SUBTYPE_5, + SUBTYPE_6, + SUBTYPE_7, + SUBTYPE_8, + }; + +public: + dAcOdoor_c() : mEventRelated(*this, nullptr), mEmmiter0(this), mEmmiter1(this) {} virtual ~dAcOdoor_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; + virtual int actorExecuteInEvent() override; + virtual void registerInEvent() override; + virtual void unkVirtFunc_0x6C() override; + virtual void doInteraction(s32 /* InteractionType */) override; + virtual bool canOpen() override; + + /** */ bool isLocked(); + /** fn_572_33E0 - I Think this gets the Door open range*/ + static f32 fn_572_33E0(); // -80.f + + /** */ + void startPullEventWithoutCallback(void *zevData); + + /** */ + void startPullEventWithCallback(void *zevData); + + /** */ + void startPushEventWithoutCallback(void *zevData); + + /** */ + void startPushEventWithCallback(void *zevData); + + /** */ + void startPullEvent(void *zevData); + + /** */ + void startPushEvent(void *zevData); + + /** */ + void startOpenEvent(void *zevData); + + /** */ + static void doorPullEventCallback(dAcOdoor_c *); + + /** */ + static void doorPushEventCallback(dAcOdoor_c *); + + /** */ + void startDoorPullLockedEvent(void *zevData); + + /** */ + void startDoorPushLockedEvent(void *zevData); + + /** */ + void startLockedEvent(void *zevData); + + /** */ + static void pullLockedEventCallback(dAcOdoor_c *); + + /** */ + static void pushLockedEventCallback(dAcOdoor_c *); + + /** */ + void startUnlockEvent(); + + /** */ + static void unlockEventCallback(dAcOdoor_c *); + + /** */ + static void openCallbackCommon(dAcOdoor_c *); + + /** */ + bool isKeyLocked(); // getFromParams(6, 0x1) + + /** */ + u8 getSubtype2(); // (mRotation.x >> 0) & 0xFF + + /** */ + u8 getSceneflag(); // (mRotation.x >> 8) & 0xFF + + /** fn_572_3F60 */ + u8 fn_572_3F60(); // (mRotation.z >> 0) & 0xF + + /** fn_572_3F70 */ + u8 fn_572_3F70(); // (mRotation.z >> 4) & 0x3F + + /** fn_572_3F80 */ + u8 fn_572_3F80(); // (mRotation.z >> 10) & 0x3F + + /** fn_572_3F90 */ + u8 fn_572_3F90(); // (getParams2Lower() >> 0) & 0xFF + + /** fn_572_3FC0 */ + static f32 getInteractionMinX(); // -80.f + + /** fn_572_3FD0 */ + static f32 getInteractionMaxX(); // 80.f + + /** fn_572_3FE0 */ + static f32 getInteractionMinZ(); // -100.f + + /** fn_572_3FF0 */ + static f32 getInteractionMaxZ(); // 100.f + + /** fn_572_4000 */ + static f32 getInteractionLockMinX(); // -160.f + + /** fn_572_4010 */ + static f32 getInteractionLockMaxX(); // 160.f + + /** fn_572_4020 */ + static f32 getInteractionLockMinZ(); // -100.f + + /** fn_572_4030 */ + static f32 getInteractionLockMaxZ(); // 100.f + + /** */ + void setRoomId(s8 roomId); // mRoomId = roomId; + + /** fn_572_4050 */ + void fn_572_4050(u32 flags); // field_0x5A8 = flags + + /** fn_572_4060 */ + void fn_572_4060(u8); // field_0x5B3 = in + + /** fn_572_4070 */ + void fn_572_4070(s8); // field_0x5B4 = in + + /** fn_572_4080 */ + void fn_572_4080(s8); // field_0x5B5 = in + + /** fn_572_4090 */ + void fn_572_4090(); // field_0x5B7 = true + + /** fn_572_40A0 */ + void fn_572_40A0(); // field_0x5B7 = false + + /** fn_572_40B0 */ + void fn_572_40B0(); // field_0x5B8 = true + + /** fn_572_40C0 */ + void fn_572_40C0(); // field_0x5B8 = false + + /** fn_572_40D0 */ + void fn_572_40D0(); // field_0x5B9 = true + + /** fn_572_40E0 */ + bool fn_572_40E0() const; // field_0x5A8 & 1 + + /** fn_572_40F0 */ + void fn_572_40F0(); // field_0x5A8 |= 1 + + /** fn_572_4100 */ + void fn_572_4100(); // field_0x5A8 &= ~1 + + /** fn_572_4110 */ + void fn_572_4110(); // field_0x5A8 |= 2 + + /** fn_572_4120 */ + void fn_572_4120(); // field_0x5A8 &= ~2 + + /** fn_572_4130 */ + bool fn_572_4130(bool &b) const; // checkRoom(field_0x5B4,b) + + /** fn_572_4140 */ + bool fn_572_4140(bool &b) const; // checkRoom(field_0x5B5,b) + + /** fn_572_4150 */ + bool fn_572_4150(bool &b) const; // fn_572_4130(b0) && fn_572_4140(b1) -> b = b0 && b1 + + /** */ + void triggerExit(); + + /** */ + bool isLeavingSealedTempleSideDoorPostSkyKeep() const; + + /** fn_572_4310 */ + void transitionPushRoomFlags() const; + + /** fn_572_4320 */ + void fn_572_4320() const; // nop + + /** fn_572_4430 */ + bool transitionPullRoomFlags() const; + + /** fn_572_4340 */ + void fn_572_4340() const; // nop + + /** fn_572_4370 */ + bool fn_572_4370(const mVec3_c &point) const; // Is in front of door + + /** */ + bool isPlayerInFrontOfDoor() const; + + /** */ + bool hasFlowEntryPoint() const; // getFromParams(16, 0xFFFF) + + /** fn_572_4430 */ + bool fn_572_4430() const; // field_0x5A8 & 2 + + /** fn_572_4440 */ + void fn_572_4440(); // Sets the Postion Copies + + /** */ + bool isPlayerInteractable() const; + + /** fn_572_4600 */ + bool isPlayerInteractableLocked() const; + + /** */ + void playInteractionLocked() const; + private: + /* 0x33C */ m3d::smdl_c mMdl0; + /* 0x358 */ m3d::smdl_c mMdl1; + /* 0x374 */ m3d::mdlAnmChr mAnmChr; + /* 0x3DC */ ActorEventRelated mEventRelated; + /* 0x42C */ dFlowMgr_c mFlowMgr; + /* 0x4E8 */ dEmitter_c mEmmiter0; + /* 0x51C */ dEmitter_c mEmmiter1; }; #endif diff --git a/include/d/a/obj/d_a_obj_door_base.h b/include/d/a/obj/d_a_obj_door_base.h index 5cfc1110..854c1ba2 100644 --- a/include/d/a/obj/d_a_obj_door_base.h +++ b/include/d/a/obj/d_a_obj_door_base.h @@ -1,11 +1,28 @@ #ifndef D_A_OBJ_DOOR_BASE_H #define D_A_OBJ_DOOR_BASE_H +#include "d/a/d_a_base.h" #include "d/a/obj/d_a_obj_base.h" +#include "f/f_list_mg.h" // Ghidra: ActorDoorBase // size: // non-official name -class dAcObjDoor_c : public dAcObjBase_c {}; +class dAcObjDoor_c : public dAcObjBase_c { +public: + dAcObjDoor_c(); + ~dAcObjDoor_c() {} + + virtual bool canOpen() = 0; + virtual bool hasVisitedRoom(); + virtual void vt_0x88(); + virtual void vt_0x8C(); + +protected: + dAcRef_c mDoorRef; + +private: + static fLiMgBa_c sDoorList; +}; #endif -- cgit v1.2.3 From c59fe14362b65bf3df8b6bc7f41f73dc0719ee89 Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Mon, 24 Nov 2025 02:44:18 -0500 Subject: some Progress --- include/d/a/obj/d_a_obj_base.h | 5 +++++ include/d/a/obj/d_a_obj_door.h | 50 ++++++++++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index 3deba1ae..039def40 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -181,6 +181,11 @@ public: const char *name, u32 roomId, u32 params1, const mVec3_c *pos, const mAng3_c *rot, const mVec3_c *scale, u32 params2, u16 id, s8 viewclipId ); + static dAcObjBase_c *create( + dAcObjBase_c *, fProfile::PROFILE_NAME_e actorId, u32 params1, const mVec3_c *pos, const mAng3_c *rot, + const mVec3_c *scale, u32 params2, u32 roomId + ); + static dAcObjBase_c *findObject(fProfile::PROFILE_NAME_e actorId, fLiNdBa_c *refList, dAcObjBase_c *parent); static dAcObjBase_c *getNextObject(fLiMgBa_c *ref, dAcObjBase_c *parent); bool isPlayer(); diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index d3da304f..1c3eebca 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -2,26 +2,37 @@ #define D_A_OBJ_DOOR_H #include "common.h" +#include "d/a/d_a_base.h" +#include "d/a/obj/d_a_obj_base.h" #include "d/a/obj/d_a_obj_door_base.h" #include "m/m3d/m_anmmdl.h" #include "m/m3d/m_smdl.h" +#include "m/m_mtx.h" #include "m/m_vec.h" #include "toBeSorted/actor_event.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/d_flow_mgr.h" +struct dTimeBits { + dTimeBits() : field_0x00(false), field_0x01(false) {} + bool field_0x00; + bool field_0x01; +}; + +class dAcOLock_c; + class dAcOdoor_c : public dAcObjDoor_c { public: enum Subtype_e { - SUBTYPE_0, - SUBTYPE_1, - SUBTYPE_2, - SUBTYPE_3, - SUBTYPE_4, - SUBTYPE_5, - SUBTYPE_6, - SUBTYPE_7, - SUBTYPE_8, + SUBTYPE_0, ///< DoorA00 + SUBTYPE_1, ///< DoorA01 + SUBTYPE_2, ///< DoorC00 + SUBTYPE_3, ///< DoorC01 + SUBTYPE_4, ///< DoorB00 + SUBTYPE_5, ///< DoorE + SUBTYPE_6, ///< DoorA02 + SUBTYPE_7, ///< DoorF + SUBTYPE_8, ///< DoorH }; public: @@ -98,10 +109,10 @@ public: static void openCallbackCommon(dAcOdoor_c *); /** */ - bool isKeyLocked(); // getFromParams(6, 0x1) + s32 getKeyParameter(); // getFromParams(6, 0x1) /** */ - u8 getSubtype2(); // (mRotation.x >> 0) & 0xFF + s32 getSubtype2(); // (mRotation.x >> 0) & 0xFF /** */ u8 getSceneflag(); // (mRotation.x >> 8) & 0xFF @@ -238,6 +249,11 @@ public: /** */ void playInteractionLocked() const; +public: + // defined in main dol + bool isConnectedToOtherDoor() const; + dAcRef_c &getConnectedDoorRef(); // return mConnectedDoor; + private: /* 0x33C */ m3d::smdl_c mMdl0; /* 0x358 */ m3d::smdl_c mMdl1; @@ -246,6 +262,18 @@ private: /* 0x42C */ dFlowMgr_c mFlowMgr; /* 0x4E8 */ dEmitter_c mEmmiter0; /* 0x51C */ dEmitter_c mEmmiter1; + /* 0x550 */ dTimeBits mTimeBits; + /* 0x554 */ dAcRef_c mConnectedDoor; + /* 0x560 */ dAcRef_c mLock; + /* 0x56C */ dAcRef_c mObjRef; + /* 0x578 */ mMtx_c mMtx; + /* 0x5A8 */ u8 _0x584[0x5B1 - 0x5A8]; + /* 0x5B1 */ u8 field_0x5B1; ///< + /* 0x5B2 */ u8 mSceneflag; ///< Used for unlocking the door + /* 0x5B3 */ u8 _0x5B3[0x5B7 - 0x5B3]; + /* 0x5B7 */ bool field_0x5B7; + /* 0x5B8 */ u8 _0x5B8[0x5BB - 0x5B8]; + /* 0x5BB */ bool field_0x5BB; }; #endif -- cgit v1.2.3 From 43705afa26facc8a043cb09778c19b21c67b2630 Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Mon, 24 Nov 2025 02:49:23 -0500 Subject: fix compile due to new door empty virtual function --- include/d/a/obj/d_a_obj_door_boss.h | 2 ++ include/d/a/obj/d_a_obj_shutter.h | 2 ++ include/d/a/obj/d_a_obj_shutter_change_scene.h | 2 ++ include/d/a/obj/d_a_obj_tr_shutter_cs.h | 2 ++ include/d/a/obj/d_a_obj_trolley_shutter.h | 2 ++ 5 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_door_boss.h b/include/d/a/obj/d_a_obj_door_boss.h index 945238a2..b4ef8602 100644 --- a/include/d/a/obj/d_a_obj_door_boss.h +++ b/include/d/a/obj/d_a_obj_door_boss.h @@ -10,6 +10,8 @@ public: dAcOdoorBoss_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOdoorBoss_c() {} + virtual bool canOpen() override; + STATE_FUNC_DECLARE(dAcOdoorBoss_c, UnlockWait); STATE_FUNC_DECLARE(dAcOdoorBoss_c, CorrectKey); STATE_FUNC_DECLARE(dAcOdoorBoss_c, KeyInsertInitialInterval); diff --git a/include/d/a/obj/d_a_obj_shutter.h b/include/d/a/obj/d_a_obj_shutter.h index e2fa570a..d33554c8 100644 --- a/include/d/a/obj/d_a_obj_shutter.h +++ b/include/d/a/obj/d_a_obj_shutter.h @@ -10,6 +10,8 @@ public: dAcOShutter_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOShutter_c() {} + virtual bool canOpen() override; + STATE_FUNC_DECLARE(dAcOShutter_c, Wait); STATE_FUNC_DECLARE(dAcOShutter_c, Open); STATE_FUNC_DECLARE(dAcOShutter_c, Close); diff --git a/include/d/a/obj/d_a_obj_shutter_change_scene.h b/include/d/a/obj/d_a_obj_shutter_change_scene.h index 8479e760..71a8b17f 100644 --- a/include/d/a/obj/d_a_obj_shutter_change_scene.h +++ b/include/d/a/obj/d_a_obj_shutter_change_scene.h @@ -10,6 +10,8 @@ public: dAcOShutterChangeScene_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOShutterChangeScene_c() {} + virtual bool canOpen() override; + STATE_FUNC_DECLARE(dAcOShutterChangeScene_c, WaitOpenShutter); STATE_FUNC_DECLARE(dAcOShutterChangeScene_c, WaitOpenShutterForEvent); STATE_FUNC_DECLARE(dAcOShutterChangeScene_c, OpenShutter); diff --git a/include/d/a/obj/d_a_obj_tr_shutter_cs.h b/include/d/a/obj/d_a_obj_tr_shutter_cs.h index f8b074fe..7f2d150a 100644 --- a/include/d/a/obj/d_a_obj_tr_shutter_cs.h +++ b/include/d/a/obj/d_a_obj_tr_shutter_cs.h @@ -10,6 +10,8 @@ public: dAcOTrlyShtrChgScn_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOTrlyShtrChgScn_c() {} + virtual bool canOpen() override; + STATE_FUNC_DECLARE(dAcOTrlyShtrChgScn_c, Wait); STATE_FUNC_DECLARE(dAcOTrlyShtrChgScn_c, OpenEvent); diff --git a/include/d/a/obj/d_a_obj_trolley_shutter.h b/include/d/a/obj/d_a_obj_trolley_shutter.h index 86ea3dad..f7ed3c3c 100644 --- a/include/d/a/obj/d_a_obj_trolley_shutter.h +++ b/include/d/a/obj/d_a_obj_trolley_shutter.h @@ -10,6 +10,8 @@ public: dAcOTrolleyShutter_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOTrolleyShutter_c() {} + virtual bool canOpen() override; + STATE_FUNC_DECLARE(dAcOTrolleyShutter_c, Wait); STATE_FUNC_DECLARE(dAcOTrolleyShutter_c, OpenEvent); -- cgit v1.2.3 From 6052e667c632b4b22deffa42130a7022c35c9507 Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Tue, 25 Nov 2025 00:37:28 -0500 Subject: updateInEvent --- include/d/a/obj/d_a_obj_door.h | 32 +++++++++++++++++++++++++------- include/d/a/obj/d_a_obj_fence.h | 10 +++++++++- include/d/a/obj/d_a_obj_lock.h | 11 ++++++++++- include/d/col/bg/d_bg_s_gnd_chk.h | 3 +++ include/d/d_player_act.h | 3 +-- include/d/d_room.h | 3 +++ include/d/d_stage.h | 1 + include/f/f_base.h | 2 +- include/toBeSorted/actor_event.h | 1 + 9 files changed, 54 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index 1c3eebca..a76dc4dc 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -36,7 +36,7 @@ public: }; public: - dAcOdoor_c() : mEventRelated(*this, nullptr), mEmmiter0(this), mEmmiter1(this) {} + dAcOdoor_c() : mEventRelated(*this, nullptr), mEmmiterL(this), mEmmiterR(this) {} virtual ~dAcOdoor_c() {} virtual int doDelete() override; @@ -160,7 +160,7 @@ public: void fn_572_4050(u32 flags); // field_0x5A8 = flags /** fn_572_4060 */ - void fn_572_4060(u8); // field_0x5B3 = in + void fn_572_4060(s8); // field_0x5B3 = in /** fn_572_4070 */ void fn_572_4070(s8); // field_0x5B4 = in @@ -250,27 +250,45 @@ public: void playInteractionLocked() const; public: - // defined in main dol + s32 getType() const { + return getFromParams(0, 0x3F); + } + s32 getField_0x5B4() const { + return field_0x5B4; + } + s32 getField_0x5B5() const { + return field_0x5B5; + } + +public: // Functions in this section defined in main dol bool isConnectedToOtherDoor() const; dAcRef_c &getConnectedDoorRef(); // return mConnectedDoor; + /** fn_80194C70 : Rotates the input by this->mRotation.y and adds this->mPosition */ + void stepTowards(mVec3_c &newPosition) const; + private: /* 0x33C */ m3d::smdl_c mMdl0; /* 0x358 */ m3d::smdl_c mMdl1; /* 0x374 */ m3d::mdlAnmChr mAnmChr; /* 0x3DC */ ActorEventRelated mEventRelated; /* 0x42C */ dFlowMgr_c mFlowMgr; - /* 0x4E8 */ dEmitter_c mEmmiter0; - /* 0x51C */ dEmitter_c mEmmiter1; + /* 0x4E8 */ dEmitter_c mEmmiterL; + /* 0x51C */ dEmitter_c mEmmiterR; /* 0x550 */ dTimeBits mTimeBits; /* 0x554 */ dAcRef_c mConnectedDoor; /* 0x560 */ dAcRef_c mLock; /* 0x56C */ dAcRef_c mObjRef; /* 0x578 */ mMtx_c mMtx; - /* 0x5A8 */ u8 _0x584[0x5B1 - 0x5A8]; + /* 0x5A8 */ u8 _0x5A8[0x5AC - 0x5A8]; + /* 0x5AC */ u32 mRumbleIdx; ///< + /* 0x5B0 */ u8 field_0x5B0; ///< some timer to trigger exit /* 0x5B1 */ u8 field_0x5B1; ///< /* 0x5B2 */ u8 mSceneflag; ///< Used for unlocking the door - /* 0x5B3 */ u8 _0x5B3[0x5B7 - 0x5B3]; + /* 0x5B3 */ u8 field_0x5B3; ///< + /* 0x5B4 */ s8 field_0x5B4; + /* 0x5B5 */ s8 field_0x5B5; + /* 0x5B6 */ s8 field_0x5B6; /* 0x5B7 */ bool field_0x5B7; /* 0x5B8 */ u8 _0x5B8[0x5BB - 0x5B8]; /* 0x5BB */ bool field_0x5BB; diff --git a/include/d/a/obj/d_a_obj_fence.h b/include/d/a/obj/d_a_obj_fence.h index 720c41fa..f2127ee2 100644 --- a/include/d/a/obj/d_a_obj_fence.h +++ b/include/d/a/obj/d_a_obj_fence.h @@ -10,6 +10,13 @@ public: dAcOFence_c(); virtual ~dAcOFence_c(); + bool fn_550_11B0() const; + void fn_550_12C0(); + + void changeToRequestConfineEvent() { + mStateMgr.changeState(StateID_RequestConfineEvent); + } + STATE_FUNC_DECLARE(dAcOFence_c, WaitOpen); STATE_FUNC_DECLARE(dAcOFence_c, Open); STATE_FUNC_DECLARE(dAcOFence_c, OpenPocoAPoco); @@ -21,7 +28,8 @@ public: STATE_FUNC_DECLARE(dAcOFence_c, RequestConfineEvent); private: - /* 0x??? */ STATE_MGR_DECLARE(dAcOFence_c); + /* 0x330 */ u8 _0x330[0x368 - 0x330]; + /* 0x368 */ STATE_MGR_DECLARE(dAcOFence_c); }; #endif diff --git a/include/d/a/obj/d_a_obj_lock.h b/include/d/a/obj/d_a_obj_lock.h index 4da6ba02..e332902c 100644 --- a/include/d/a/obj/d_a_obj_lock.h +++ b/include/d/a/obj/d_a_obj_lock.h @@ -12,8 +12,17 @@ public: STATE_FUNC_DECLARE(dAcOLock_c, Wait); + bool checkField_0x2090() const { + return field_0x2090; + } + void setField_0x2090() { + field_0x2090 = true; + } + private: - /* 0x??? */ STATE_MGR_DECLARE(dAcOLock_c); + /* 0x???? */ STATE_MGR_DECLARE(dAcOLock_c); + /* 0x???? */ u8 _0x36C[0x2090 - 0x36C]; + /* 0x2090 */ bool field_0x2090; }; #endif diff --git a/include/d/col/bg/d_bg_s_gnd_chk.h b/include/d/col/bg/d_bg_s_gnd_chk.h index f304c2a3..6b3e2696 100644 --- a/include/d/col/bg/d_bg_s_gnd_chk.h +++ b/include/d/col/bg/d_bg_s_gnd_chk.h @@ -27,6 +27,9 @@ public: static dBgS_ObjGndChk &GetInstance() { return sInstance; } + static dBgS_ObjGndChk *GetPInstance() { + return &sInstance; + } static f32 GetGroundHeight() { return sGroundHeight; } diff --git a/include/d/d_player_act.h b/include/d/d_player_act.h index cf1c9236..f3eab389 100644 --- a/include/d/d_player_act.h +++ b/include/d/d_player_act.h @@ -630,7 +630,7 @@ public: bool isAttackingSpinHorizontal() const; bool isAttackingSpinVertical() const; void setBonkRelatedAnimFlag(bool b); - void setPosYRot(const mVec3_c &pos, mAng rot, bool force, UNKWORD, UNKWORD); + void setPosYRot(const mVec3_c &pos, mAng rot, bool force = false, UNKWORD = 0, UNKWORD = 0); void setTransform(const mMtx_c &mtx, bool force, UNKWORD, UNKWORD); bool someTargetedActorCheck() const; static mAng fn_8005BA90(); @@ -646,7 +646,6 @@ public: static const char *getSwordName(s32); static s32 getCurrentlyEquippedShieldType(); - static const mColor &getEarringsColor(); static mVec3_c sPos1; diff --git a/include/d/d_room.h b/include/d/d_room.h index 287ae7c1..225b0bf1 100644 --- a/include/d/d_room.h +++ b/include/d/d_room.h @@ -111,6 +111,9 @@ public: bool checkFlag(u32 flag) { return mFlags & flag; } + void setFlag(u8 flag) { + mFlags |= flag; + } void drawOnMapIfVisible(mMtx_c *mtx, int param); void getBounds(mVec3_c *min, mVec3_c *max) const; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index b0de4c98..2f5a4770 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -116,6 +116,7 @@ public: int draw() override; void deleteReady() override; + void fn_801B3C60(int roomId); void drawMap(mMtx_c *mtx, int); dRoom_c *getRoom(s32 idx); void setRoom(int roomid, dRoom_c *room); diff --git a/include/f/f_base.h b/include/f/f_base.h index 8ef5ac43..50a5e367 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -89,7 +89,7 @@ public: mGroupType = m_tmpCtData.group_type; } - u32 getFromParams(u8 shift, u32 mask) { + u32 getFromParams(u8 shift, u32 mask) const { return (mParams >> shift) & mask; } diff --git a/include/toBeSorted/actor_event.h b/include/toBeSorted/actor_event.h index 03fd30d6..cbd68422 100644 --- a/include/toBeSorted/actor_event.h +++ b/include/toBeSorted/actor_event.h @@ -18,6 +18,7 @@ public: bool isAdvance(); int getSomeEventRelatedNumber(); + int getSingleShortData(int *result, u32 code, u32); int getSingleIntData(int *result, u32 code, u32); int getSingleFloatData(f32 *result, u32 code, u32); int getSingleVecData(mVec3_c *result, u32 code, u32); -- cgit v1.2.3 From dc82ce38db03bc2496c3ed9755f7805be544e995 Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Tue, 25 Nov 2025 01:11:48 -0500 Subject: symbols --- include/d/a/obj/d_a_obj_door.h | 5 +---- include/f/f_base.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index a76dc4dc..332c03e7 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -216,9 +216,6 @@ public: /** fn_572_4310 */ void transitionPushRoomFlags() const; - /** fn_572_4320 */ - void fn_572_4320() const; // nop - /** fn_572_4430 */ bool transitionPullRoomFlags() const; @@ -250,7 +247,7 @@ public: void playInteractionLocked() const; public: - s32 getType() const { + s32 getType() { return getFromParams(0, 0x3F); } s32 getField_0x5B4() const { diff --git a/include/f/f_base.h b/include/f/f_base.h index 50a5e367..8ef5ac43 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -89,7 +89,7 @@ public: mGroupType = m_tmpCtData.group_type; } - u32 getFromParams(u8 shift, u32 mask) const { + u32 getFromParams(u8 shift, u32 mask) { return (mParams >> shift) & mask; } -- cgit v1.2.3 From d8ede28c570cab681d9cb1aad12e7624e025fae6 Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Wed, 26 Nov 2025 01:09:04 -0500 Subject: most OK --- include/d/a/obj/d_a_obj_door.h | 49 +++++++++++++++++++++++-------------- include/d/a/obj/d_a_obj_door_base.h | 2 +- include/d/a/obj/d_a_obj_fence.h | 2 ++ include/d/a/obj/d_a_obj_lock.h | 5 ++-- include/d/d_stage.h | 1 + include/d/d_stage_mgr.h | 3 +-- include/toBeSorted/event_manager.h | 1 + 7 files changed, 39 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index 332c03e7..fded4fa4 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -35,8 +35,20 @@ public: SUBTYPE_8, ///< DoorH }; + enum LockType_c { + LOCK_NONE = 0, ///< Door does not have a lock + LOCK_KEY = 1, ///< Door usually is locked + }; + public: - dAcOdoor_c() : mEventRelated(*this, nullptr), mEmmiterL(this), mEmmiterR(this) {} + dAcOdoor_c() + : mEventRelated(*this, nullptr), + mEmmiterL(this), + mEmmiterR(this), + mFlags(0), + field_0x5B0(0), + field_0x5B9(false), + field_0x5BA(false) {} virtual ~dAcOdoor_c() {} virtual int doDelete() override; @@ -79,10 +91,10 @@ public: void startOpenEvent(void *zevData); /** */ - static void doorPullEventCallback(dAcOdoor_c *); + static void doorPullEventCallback(void *); /** */ - static void doorPushEventCallback(dAcOdoor_c *); + static void doorPushEventCallback(void *); /** */ void startDoorPullLockedEvent(void *zevData); @@ -94,22 +106,22 @@ public: void startLockedEvent(void *zevData); /** */ - static void pullLockedEventCallback(dAcOdoor_c *); + static void pullLockedEventCallback(void *); /** */ - static void pushLockedEventCallback(dAcOdoor_c *); + static void pushLockedEventCallback(void *); /** */ void startUnlockEvent(); /** */ - static void unlockEventCallback(dAcOdoor_c *); + static void unlockEventCallback(void *); /** */ - static void openCallbackCommon(dAcOdoor_c *); + static void openCallbackCommon(void *); /** */ - s32 getKeyParameter(); // getFromParams(6, 0x1) + s32 getLockParameter(); // getFromParams(6, 0x1) /** */ s32 getSubtype2(); // (mRotation.x >> 0) & 0xFF @@ -126,8 +138,8 @@ public: /** fn_572_3F80 */ u8 fn_572_3F80(); // (mRotation.z >> 10) & 0x3F - /** fn_572_3F90 */ - u8 fn_572_3F90(); // (getParams2Lower() >> 0) & 0xFF + /** (getParams2Lower() >> 0) & 0xFF */ + u16 fn_572_3F90(); /** fn_572_3FC0 */ static f32 getInteractionMinX(); // -80.f @@ -160,7 +172,7 @@ public: void fn_572_4050(u32 flags); // field_0x5A8 = flags /** fn_572_4060 */ - void fn_572_4060(s8); // field_0x5B3 = in + void fn_572_4060(u8); // field_0x5B3 = in /** fn_572_4070 */ void fn_572_4070(s8); // field_0x5B4 = in @@ -217,10 +229,7 @@ public: void transitionPushRoomFlags() const; /** fn_572_4430 */ - bool transitionPullRoomFlags() const; - - /** fn_572_4340 */ - void fn_572_4340() const; // nop + void transitionPullRoomFlags() const; /** fn_572_4370 */ bool fn_572_4370(const mVec3_c &point) const; // Is in front of door @@ -229,7 +238,7 @@ public: bool isPlayerInFrontOfDoor() const; /** */ - bool hasFlowEntryPoint() const; // getFromParams(16, 0xFFFF) + bool hasFlowEntryPoint(); /** fn_572_4430 */ bool fn_572_4430() const; // field_0x5A8 & 2 @@ -244,7 +253,7 @@ public: bool isPlayerInteractableLocked() const; /** */ - void playInteractionLocked() const; + void playInteractionLocked(); public: s32 getType() { @@ -277,7 +286,7 @@ private: /* 0x560 */ dAcRef_c mLock; /* 0x56C */ dAcRef_c mObjRef; /* 0x578 */ mMtx_c mMtx; - /* 0x5A8 */ u8 _0x5A8[0x5AC - 0x5A8]; + /* 0x5A8 */ u32 mFlags; ///< /* 0x5AC */ u32 mRumbleIdx; ///< /* 0x5B0 */ u8 field_0x5B0; ///< some timer to trigger exit /* 0x5B1 */ u8 field_0x5B1; ///< @@ -287,7 +296,9 @@ private: /* 0x5B5 */ s8 field_0x5B5; /* 0x5B6 */ s8 field_0x5B6; /* 0x5B7 */ bool field_0x5B7; - /* 0x5B8 */ u8 _0x5B8[0x5BB - 0x5B8]; + /* 0x5B8 */ bool field_0x5B8; + /* 0x5B9 */ bool field_0x5B9; + /* 0x5BA */ bool field_0x5BA; /* 0x5BB */ bool field_0x5BB; }; diff --git a/include/d/a/obj/d_a_obj_door_base.h b/include/d/a/obj/d_a_obj_door_base.h index 854c1ba2..9a64bf34 100644 --- a/include/d/a/obj/d_a_obj_door_base.h +++ b/include/d/a/obj/d_a_obj_door_base.h @@ -11,7 +11,7 @@ class dAcObjDoor_c : public dAcObjBase_c { public: dAcObjDoor_c(); - ~dAcObjDoor_c() {} + ~dAcObjDoor_c(); virtual bool canOpen() = 0; virtual bool hasVisitedRoom(); diff --git a/include/d/a/obj/d_a_obj_fence.h b/include/d/a/obj/d_a_obj_fence.h index f2127ee2..8b7afd5d 100644 --- a/include/d/a/obj/d_a_obj_fence.h +++ b/include/d/a/obj/d_a_obj_fence.h @@ -11,6 +11,8 @@ public: virtual ~dAcOFence_c(); bool fn_550_11B0() const; + void fn_550_1250(); + void fn_550_12B0(); void fn_550_12C0(); void changeToRequestConfineEvent() { diff --git a/include/d/a/obj/d_a_obj_lock.h b/include/d/a/obj/d_a_obj_lock.h index e332902c..071bf5c5 100644 --- a/include/d/a/obj/d_a_obj_lock.h +++ b/include/d/a/obj/d_a_obj_lock.h @@ -12,8 +12,8 @@ public: STATE_FUNC_DECLARE(dAcOLock_c, Wait); - bool checkField_0x2090() const { - return field_0x2090; + bool checkField_0x2091() const { + return field_0x2091; } void setField_0x2090() { field_0x2090 = true; @@ -23,6 +23,7 @@ private: /* 0x???? */ STATE_MGR_DECLARE(dAcOLock_c); /* 0x???? */ u8 _0x36C[0x2090 - 0x36C]; /* 0x2090 */ bool field_0x2090; + /* 0x2091 */ bool field_0x2091; }; #endif diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 2f5a4770..3c3d2a93 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -119,6 +119,7 @@ public: void fn_801B3C60(int roomId); void drawMap(mMtx_c *mtx, int); dRoom_c *getRoom(s32 idx); + void updateRoomFlags(int, int); void setRoom(int roomid, dRoom_c *room); void handleRoomChange(int roomid); diff --git a/include/d/d_stage_mgr.h b/include/d/d_stage_mgr.h index 68d47f3f..f7a00405 100644 --- a/include/d/d_stage_mgr.h +++ b/include/d/d_stage_mgr.h @@ -106,7 +106,6 @@ public: static dStageMgr_c *GetInstance() { return sInstance; } - EGG::CpuTexture *getField_0x8898() { return field_0x8898; } @@ -225,7 +224,7 @@ private: // ... u8 ___[438]; /* 0x8898 */ EGG::CpuTexture *field_0x8898; - + u8 _0x889C[4]; /* 0x88A0 */ u32 field_0x88A0; diff --git a/include/toBeSorted/event_manager.h b/include/toBeSorted/event_manager.h index 1b89074f..3f3946ab 100644 --- a/include/toBeSorted/event_manager.h +++ b/include/toBeSorted/event_manager.h @@ -11,6 +11,7 @@ class dAcObjBase_c; class EventManager { public: + static bool setEvent(dAcBase_c *actor, Event *, dAcBase_c *); static bool isInEvent(dAcBase_c *actor, const char *eventName); static bool finishEvent(dAcBase_c *actor, const char *eventName); static void changeOwnEvent(dAcBase_c *actor1, dAcBase_c *actor2, Event *event, UNKWORD); -- cgit v1.2.3 From 8c660e86e8fbdc18c91be780b882e01c9646857a Mon Sep 17 00:00:00 2001 From: elijah-thomas774 Date: Wed, 26 Nov 2025 17:40:01 -0500 Subject: cleanups and docs --- include/d/a/d_a_base.h | 3 + include/d/a/obj/d_a_obj_door.h | 282 +++++++++++++++++++++-------------------- 2 files changed, 151 insertions(+), 134 deletions(-) (limited to 'include') diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index 97e33e47..45b2336f 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -125,6 +125,9 @@ public: public: dAcBase_c(); + void setSubtype(u8 sub) { + mSubtype = sub; + } void setPosition(const mVec3_c &r) { mPosition = r; } diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index fded4fa4..4992c954 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -24,30 +24,41 @@ class dAcOLock_c; class dAcOdoor_c : public dAcObjDoor_c { public: enum Subtype_e { - SUBTYPE_0, ///< DoorA00 - SUBTYPE_1, ///< DoorA01 - SUBTYPE_2, ///< DoorC00 - SUBTYPE_3, ///< DoorC01 - SUBTYPE_4, ///< DoorB00 - SUBTYPE_5, ///< DoorE - SUBTYPE_6, ///< DoorA02 - SUBTYPE_7, ///< DoorF - SUBTYPE_8, ///< DoorH + DOOR_NORMAL, ///< DoorA00 - Normal Wooden Door + DOOR_METAL, ///< DoorA01 - Metal Door - Academy(bathrooms) + DOOR_DOUBLE, ///< DoorC00 - Normal Double Doors + DOOR_DOUBLE_OUTSIDE, ///< DoorC01 - Outdoor Double Doors - Academy(to outside) + DOOR_TEMPLE_SIDE, ///< DoorB00 - Sealed Temple Side Doors + DOOR_SANDSEA_TIMESHIFT, ///< DoorE - Sandsea Timeshift Door + DOOR_BATREAUX, ///< DoorA02 - Batreaux's Door + DOOR_TEMPLE_MAIN, ///< DoorF - Sealed Temple Main Door + DOOR_SPARRING_HALL, ///< DoorH - Sparring Hall Outer Doors }; - enum LockType_c { + enum LockType_e { LOCK_NONE = 0, ///< Door does not have a lock LOCK_KEY = 1, ///< Door usually is locked }; + enum LockBehavior_e { + LOCK_NEVER = 0, ///< Door is always unlocked + LOCK_NOT_SET = 1, ///< Door is locked when mSceneflag is unset + LOCK_NEVER1 = 2, ///< Door is always unlocked (Kukiel's House) + LOCK_TIMESHIFT = 3, ///< Door is locked when mSceneflag is unset (Timeshift) + LOCK_SET = 4, ///< Door is locked when mSceneflag is set + LOCK_DAY = 5, ///< Door is locked during the day + LOCK_NIGHT = 6, ///< Door is locked during the night + LOCK_MAX, + }; + public: dAcOdoor_c() : mEventRelated(*this, nullptr), mEmmiterL(this), mEmmiterR(this), mFlags(0), - field_0x5B0(0), - field_0x5B9(false), + mExitTimer(0), + mbInSandshipBoss(false), field_0x5BA(false) {} virtual ~dAcOdoor_c() {} @@ -63,207 +74,207 @@ public: virtual void doInteraction(s32 /* InteractionType */) override; virtual bool canOpen() override; - /** */ + /** Gets whether the player can open the door */ bool isLocked(); /** fn_572_33E0 - I Think this gets the Door open range*/ - static f32 fn_572_33E0(); // -80.f + static f32 fn_572_33E0(); - /** */ + /** Self Explanatory */ void startPullEventWithoutCallback(void *zevData); - /** */ + /** Self Explanatory */ void startPullEventWithCallback(void *zevData); - /** */ + /** Self Explanatory */ void startPushEventWithoutCallback(void *zevData); - /** */ + /** Self Explanatory */ void startPushEventWithCallback(void *zevData); - /** */ + /** Self Explanatory */ void startPullEvent(void *zevData); - /** */ + /** Self Explanatory */ void startPushEvent(void *zevData); - /** */ + /** Self Explanatory */ void startOpenEvent(void *zevData); - /** */ + /** Self Explanatory */ static void doorPullEventCallback(void *); - /** */ + /** Self Explanatory */ static void doorPushEventCallback(void *); - /** */ + /** Self Explanatory */ void startDoorPullLockedEvent(void *zevData); - /** */ + /** Self Explanatory */ void startDoorPushLockedEvent(void *zevData); - /** */ + /** Self Explanatory */ void startLockedEvent(void *zevData); - /** */ + /** Self Explanatory */ static void pullLockedEventCallback(void *); - /** */ + /** Self Explanatory */ static void pushLockedEventCallback(void *); - /** */ + /** Self Explanatory */ void startUnlockEvent(); - /** */ + /** Self Explanatory */ static void unlockEventCallback(void *); - /** */ + /** Self Explanatory */ static void openCallbackCommon(void *); - /** */ - s32 getLockParameter(); // getFromParams(6, 0x1) + /** Returns if the door is physically locked with the dAcOLock_c Actor */ + s32 getLockParameter(); - /** */ - s32 getSubtype2(); // (mRotation.x >> 0) & 0xFF + /** Gets the behavior of being locked when not locked with the dAcOLock_c Actor */ + s32 getLockBehavior(); - /** */ - u8 getSceneflag(); // (mRotation.x >> 8) & 0xFF + /** Get Scenflag used for locking status */ + u8 getSceneflag(); - /** fn_572_3F60 */ - u8 fn_572_3F60(); // (mRotation.z >> 0) & 0xF + /** Gets whether the door has callbacks enabled */ + u8 getDoorCallbackType(); - /** fn_572_3F70 */ - u8 fn_572_3F70(); // (mRotation.z >> 4) & 0x3F + /** getFrontRoomParam */ + u8 getFrontRoomParam(); // (mRotation.z >> 4) & 0x3F - /** fn_572_3F80 */ - u8 fn_572_3F80(); // (mRotation.z >> 10) & 0x3F + /** getBackRoomParam */ + u8 getBackRoomParam(); // (mRotation.z >> 10) & 0x3F - /** (getParams2Lower() >> 0) & 0xFF */ - u16 fn_572_3F90(); + /** Gets the Flag set when failed to open - Called from Try Locked Callback */ + u16 getFailedToOpenFlag(); - /** fn_572_3FC0 */ - static f32 getInteractionMinX(); // -80.f + /** Interaction Radius -X */ + static f32 getInteractionMinX(); - /** fn_572_3FD0 */ - static f32 getInteractionMaxX(); // 80.f + /** Interaction Radius +X */ + static f32 getInteractionMaxX(); - /** fn_572_3FE0 */ - static f32 getInteractionMinZ(); // -100.f + /** Interaction Radius -Z */ + static f32 getInteractionMinZ(); - /** fn_572_3FF0 */ - static f32 getInteractionMaxZ(); // 100.f + /** Interaction Radius +Z */ + static f32 getInteractionMaxZ(); - /** fn_572_4000 */ - static f32 getInteractionLockMinX(); // -160.f + /** Interaction Radius -X - Door has Lock */ + static f32 getInteractionLockMinX(); - /** fn_572_4010 */ - static f32 getInteractionLockMaxX(); // 160.f + /** Interaction Radius +X - Door has Lock */ + static f32 getInteractionLockMaxX(); - /** fn_572_4020 */ - static f32 getInteractionLockMinZ(); // -100.f + /** Interaction Radius -Z - Door has Lock */ + static f32 getInteractionLockMinZ(); - /** fn_572_4030 */ - static f32 getInteractionLockMaxZ(); // 100.f + /** Interaction Radius +Z - Door has Lock */ + static f32 getInteractionLockMaxZ(); - /** */ - void setRoomId(s8 roomId); // mRoomId = roomId; + /** Sets the RoomID */ + void setRoomId(s8 roomId); - /** fn_572_4050 */ - void fn_572_4050(u32 flags); // field_0x5A8 = flags + /** Set Flag - Usually Time Door related */ + void setFlag(u32 flags); - /** fn_572_4060 */ - void fn_572_4060(u8); // field_0x5B3 = in + /** Sets the behavior on Event creation */ + void setEventCallbackType(u8); - /** fn_572_4070 */ - void fn_572_4070(s8); // field_0x5B4 = in + /** setFrontRoom */ + void setFrontRoom(s8); // mFrontRoomId = in - /** fn_572_4080 */ - void fn_572_4080(s8); // field_0x5B5 = in + /** setBackRoom */ + void setBackRoom(s8); // mBackRoomId = in - /** fn_572_4090 */ - void fn_572_4090(); // field_0x5B7 = true + /** Sets status indicating it can be a double door */ + void setDoubleDoor(); - /** fn_572_40A0 */ - void fn_572_40A0(); // field_0x5B7 = false + /** Sets status indicating it cant be a double door */ + void setNotDoubleDoor(); - /** fn_572_40B0 */ - void fn_572_40B0(); // field_0x5B8 = true + /** Sets status indicating its a single door / Main door */ + void setSingleDoor(); - /** fn_572_40C0 */ - void fn_572_40C0(); // field_0x5B8 = false + /** Sets status indicating its not a single door / not Main door */ + void setNotSingleDoor(); - /** fn_572_40D0 */ - void fn_572_40D0(); // field_0x5B9 = true + /** setInSandshipBoss */ + void setInSandshipBoss(); // mbInSandshipBoss = true - /** fn_572_40E0 */ - bool fn_572_40E0() const; // field_0x5A8 & 1 + /** isTimeDoorEventActive */ + bool isTimeDoorEventActive() const; - /** fn_572_40F0 */ - void fn_572_40F0(); // field_0x5A8 |= 1 + /** setTimeDoorEventActive */ + void setTimeDoorEventActive(); - /** fn_572_4100 */ - void fn_572_4100(); // field_0x5A8 &= ~1 + /** setTimeDoorEventInactive */ + void setTimeDoorEventInactive(); - /** fn_572_4110 */ - void fn_572_4110(); // field_0x5A8 |= 2 + /** Sets status indicating it is effected by Timeshift */ + void setTimeEffected(); - /** fn_572_4120 */ - void fn_572_4120(); // field_0x5A8 &= ~2 + /** Sets status indicating it is not effected by Timeshift */ + void setTimeStatic(); - /** fn_572_4130 */ - bool fn_572_4130(bool &b) const; // checkRoom(field_0x5B4,b) + /** Checks to see if the Front room exists(return) and has flags set(b) */ + bool checkFrontRoom(bool &b) const; - /** fn_572_4140 */ - bool fn_572_4140(bool &b) const; // checkRoom(field_0x5B5,b) + /** Checks to see if the Back room exists(return) and has flags set(b) */ + bool checkBackRoom(bool &b) const; - /** fn_572_4150 */ - bool fn_572_4150(bool &b) const; // fn_572_4130(b0) && fn_572_4140(b1) -> b = b0 && b1 + /** Checks to see if the Front and Back room exists(return) and has flags set(b) */ + bool checkRooms(bool &b) const; - /** */ + /** Transitions the game to the next room */ void triggerExit(); - /** */ + /** TODO(Zeldex) Whats special about this? */ bool isLeavingSealedTempleSideDoorPostSkyKeep() const; - /** fn_572_4310 */ + /** */ void transitionPushRoomFlags() const; - /** fn_572_4430 */ + /** */ void transitionPullRoomFlags() const; - /** fn_572_4370 */ - bool fn_572_4370(const mVec3_c &point) const; // Is in front of door + /** Checks a point to determine which side of the door it is on */ + bool isPositionInFrontOfDoor(const mVec3_c &point) const; - /** */ - bool isPlayerInFrontOfDoor() const; + /** Checks the players postion to see if it is front of the door. This means it will be pulled open */ + bool checkPullDoor() const; - /** */ + /** Checks to see if the door has a flow entry point */ bool hasFlowEntryPoint(); - /** fn_572_4430 */ - bool fn_572_4430() const; // field_0x5A8 & 2 + /** Checks to see if the Door is effected by Timeshift */ + bool isTimeEffected() const; - /** fn_572_4440 */ - void fn_572_4440(); // Sets the Postion Copies + /** Sets the Position of the Doorknob based on the Animation */ + void setDoorKnobPosition(); - /** */ + /** Checks to see if the Player is within an interactable range */ bool isPlayerInteractable() const; - /** fn_572_4600 */ + /** Checks to see if the Player is within an interactable range when door is locked */ bool isPlayerInteractableLocked() const; - /** */ + /** Plays the talk event for when the door is locked */ void playInteractionLocked(); public: - s32 getType() { - return getFromParams(0, 0x3F); + s32 getType() const { + return mParams & 0x3F; } s32 getField_0x5B4() const { - return field_0x5B4; + return mFrontRoomId; } s32 getField_0x5B5() const { - return field_0x5B5; + return mBackRoomId; } public: // Functions in this section defined in main dol @@ -282,24 +293,27 @@ private: /* 0x4E8 */ dEmitter_c mEmmiterL; /* 0x51C */ dEmitter_c mEmmiterR; /* 0x550 */ dTimeBits mTimeBits; - /* 0x554 */ dAcRef_c mConnectedDoor; + /* 0x554 */ dAcRef_c mConnectedDoor; ///< When the door is a double door, this is its pair /* 0x560 */ dAcRef_c mLock; - /* 0x56C */ dAcRef_c mObjRef; - /* 0x578 */ mMtx_c mMtx; - /* 0x5A8 */ u32 mFlags; ///< - /* 0x5AC */ u32 mRumbleIdx; ///< - /* 0x5B0 */ u8 field_0x5B0; ///< some timer to trigger exit - /* 0x5B1 */ u8 field_0x5B1; ///< - /* 0x5B2 */ u8 mSceneflag; ///< Used for unlocking the door - /* 0x5B3 */ u8 field_0x5B3; ///< - /* 0x5B4 */ s8 field_0x5B4; - /* 0x5B5 */ s8 field_0x5B5; - /* 0x5B6 */ s8 field_0x5B6; - /* 0x5B7 */ bool field_0x5B7; - /* 0x5B8 */ bool field_0x5B8; - /* 0x5B9 */ bool field_0x5B9; - /* 0x5BA */ bool field_0x5BA; - /* 0x5BB */ bool field_0x5BB; + /* 0x56C */ dAcRef_c mObjRef; ///< TODO(Zeldex) This is probably the Sandship stage for boss + + /* 0x578 */ mMtx_c mMtx; ///< Currently unknown. I am assuming this is used to move the door on the Sandship stage + ///< while the boat is rocking + + /* 0x5A8 */ u32 mFlags; ///< 0x2 - Time Effected + /* 0x5AC */ u32 mRumbleIdx; ///< Rumble used for when opening the main sealed temple door + /* 0x5B0 */ u8 mExitTimer; ///< Timer used to advance the Begin Pull/Push events + /* 0x5B1 */ u8 mLockBehavior; ///< see LockBehavior_e + /* 0x5B2 */ u8 mSceneflag; ///< Used for unlocking/locking the door. + /* 0x5B3 */ u8 mEventCallbackType; ///< 0 for events without callbacks, 1 for events with a callback + /* 0x5B4 */ s8 mFrontRoomId; ///< Room id of the front side of the door + /* 0x5B5 */ s8 mBackRoomId; ///< Room id of the back side of the door + /* 0x5B6 */ s8 mFramesInEvent; ///< The count of frames in one particular event + /* 0x5B7 */ bool mbDoubleDoor; ///< Set if the type was matched to be a double door variant + /* 0x5B8 */ bool mbSingleDoor; ///< UNUSHED - Set if the type was matched to be a single door + /* 0x5B9 */ bool mbInSandshipBoss; ///< Indicates if in the Tentalus fight + /* 0x5BA */ bool field_0x5BA; ///< ??? + /* 0x5BB */ bool mbKobunDoor; ///< Used to indicate its Cawlin and Strich's door }; #endif -- cgit v1.2.3