summaryrefslogtreecommitdiff
path: root/include/d/a
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2024-09-28 02:32:48 +0200
committerGitHub <noreply@github.com>2024-09-27 20:32:48 -0400
commit392145bf3d3f6f2b60fc1856735e5081b7e86cc8 (patch)
tree48923e51dc6d789a80eb77d8638b8339d3580d69 /include/d/a
parent1039b3b2392e9b43f992f812c10e1cd8913739af (diff)
d_a_obj_appear_bridge mostly matching (#36)
* d_a_obj_appear_bridge - weak function order issue * Mark as nonmatching for now * Name unk IScnObjCallback funcs --------- Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
Diffstat (limited to 'include/d/a')
-rw-r--r--include/d/a/d_a_base.h6
-rw-r--r--include/d/a/obj/d_a_obj_appear_bridge.h50
2 files changed, 53 insertions, 3 deletions
diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h
index 3ba983e5..179e8f7f 100644
--- a/include/d/a/d_a_base.h
+++ b/include/d/a/d_a_base.h
@@ -70,9 +70,9 @@ public:
/* 0x84 */ ObjInfo *obj_info;
/* 0x88 */ TList<SoundInfo, 0xC> sound_list;
/* 0x94 */ SoundSource *sound_source;
- /* 0x9C */ mVec3_c *obj_pos;
- /* 0x9c */ mVec3_c pos_copy;
- /* 0xa8 */ u32 params2;
+ /* 0x98 */ mVec3_c *obj_pos;
+ /* 0x9C */ mVec3_c pos_copy;
+ /* 0xA8 */ u32 params2;
/* 0xAC */ mAng3_c rot_copy;
/* 0xB2 */ u16 obj_id; // enemydefeat flag / id on obj-map
/* 0xB4 */ s8 room_id_copy;
diff --git a/include/d/a/obj/d_a_obj_appear_bridge.h b/include/d/a/obj/d_a_obj_appear_bridge.h
new file mode 100644
index 00000000..388929d6
--- /dev/null
+++ b/include/d/a/obj/d_a_obj_appear_bridge.h
@@ -0,0 +1,50 @@
+#ifndef D_A_OBJ_APPEAR_BRIDGE_H
+#define D_A_OBJ_APPEAR_BRIDGE_H
+
+#include <d/a/obj/d_a_obj_base.h>
+#include <m/m3d/m_anmmatclr.h>
+#include <m/m3d/m_anmtexsrt.h>
+#include <m/m3d/m_smdl.h>
+#include <s/s_State.hpp>
+#include <s/s_StateMgr.hpp>
+#include <toBeSorted/actor_collision.h>
+#include <toBeSorted/actor_event.h>
+#include <toBeSorted/stage_render_stuff.h>
+
+class dAcOappearBridge_c : public dAcObjBase_c {
+public:
+ dAcOappearBridge_c() : mStateMgr(*this, sStateID::null), mActorEvent(*this, nullptr), mSceneCallback(this) {}
+ virtual ~dAcOappearBridge_c() {}
+ virtual bool createHeap() override;
+ virtual int create() override;
+ virtual int actorExecute() override;
+ virtual int draw() override;
+ virtual int doDelete() override;
+
+ STATE_FUNC_DECLARE(dAcOappearBridge_c, Wait);
+ STATE_FUNC_DECLARE(dAcOappearBridge_c, Appear);
+ STATE_FUNC_DECLARE(dAcOappearBridge_c, Disappear);
+
+private:
+ static const f32 sMovementRate;
+
+ nw4r::g3d::ResFile mResFile;
+ m3d::smdl_c mModel;
+ m3d::anmTexSrt_c mSrtAnm;
+ m3d::anmMatClr_c mClrAnm;
+ ActorCollision mCollision;
+ STATE_MGR_DECLARE(dAcOappearBridge_c);
+ ActorEventRelated mActorEvent;
+
+ // TODO the weak IScnObjCallback functions are in the wrong order.
+ // The vtable order is dtor, World, Mat, View, Opa, Xlu
+ // and the emitted order is dtor, Xlu, Opa, View, Mat, World
+ // but the order in the binary is dtor, Xlu, Opa, Mat, World, View
+ dScnCallback_c mSceneCallback;
+ /* 0x650 */ mVec3_c mSoundPosition;
+ /* 0x65C */ f32 field_0x65C;
+ /* 0x660 */ u8 mAreaIdx;
+ /* 0x661 */ u8 mEventId;
+};
+
+#endif