summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-10-12 17:41:16 +0200
committerGitHub <noreply@github.com>2025-10-12 17:41:16 +0200
commit9711767bf78c050cef43a053a685538b26a4f2ea (patch)
treebe085899f3de37c30cbde1bacc37c50e8fd885c8 /include
parent2524d3f53441a99629e867e358ec41e9bf2ece85 (diff)
parent795d581820af560756f40fbf700e2fc9f8ec9303 (diff)
Merge pull request #260 from swekka/d_a_obj_windmill
d_a_obj_windmill almost OK
Diffstat (limited to 'include')
-rw-r--r--include/d/a/obj/d_a_obj_pinwheel.h4
-rw-r--r--include/d/a/obj/d_a_obj_windmill.h57
-rw-r--r--include/d/d_player_act.h5
3 files changed, 61 insertions, 5 deletions
diff --git a/include/d/a/obj/d_a_obj_pinwheel.h b/include/d/a/obj/d_a_obj_pinwheel.h
index 635db7ef..3086cdba 100644
--- a/include/d/a/obj/d_a_obj_pinwheel.h
+++ b/include/d/a/obj/d_a_obj_pinwheel.h
@@ -35,11 +35,13 @@ private:
/* 0x6B0 */ STATE_MGR_DECLARE(dAcOpinwheel_c);
/* 0x6EC */ s16 mStateTimer;
/* 0x6EE */ s16 mRotationSpeed;
- /* 0x6F0 */ bool mBeingBlown;
static dCcD_SrcSph sSphSrc;
static const u32 unused;
+
+public:
+ /* 0x6F0 */ bool mBeingBlown;
};
#endif
diff --git a/include/d/a/obj/d_a_obj_windmill.h b/include/d/a/obj/d_a_obj_windmill.h
index d9bc18d6..dca36070 100644
--- a/include/d/a/obj/d_a_obj_windmill.h
+++ b/include/d/a/obj/d_a_obj_windmill.h
@@ -1,15 +1,31 @@
#ifndef D_A_OBJ_WINDMILL_H
#define D_A_OBJ_WINDMILL_H
+#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_base.h"
+#include "d/a/obj/d_a_obj_pinwheel.h"
+#include "d/col/bg/d_bg_w.h"
+#include "m/m3d/m_anmchr.h"
+#include "m/m3d/m_anmmatclr.h"
+#include "m/m3d/m_smdl.h"
+#include "m/m_angle.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/stage_render_stuff.h"
class dAcOwindmill_c : public dAcObjBase_c {
public:
- dAcOwindmill_c() : mStateMgr(*this, sStateID::null) {}
+ dAcOwindmill_c() : mStateMgr(*this, sStateID::null), mCallback(this) {}
virtual ~dAcOwindmill_c() {}
+ virtual bool createHeap() override;
+ virtual int create() override;
+ virtual int doDelete() override;
+ virtual int actorExecute() override;
+ virtual int draw() override;
+
STATE_FUNC_DECLARE(dAcOwindmill_c, Wait);
STATE_FUNC_DECLARE(dAcOwindmill_c, CameraMove);
STATE_FUNC_DECLARE(dAcOwindmill_c, Move);
@@ -17,7 +33,44 @@ public:
STATE_FUNC_DECLARE(dAcOwindmill_c, CollectStick);
private:
- /* 0x??? */ STATE_MGR_DECLARE(dAcOwindmill_c);
+ bool isWindmillRepaired();
+ bool isLightTowerRaised2();
+ void attachPinwheel();
+
+ /* 0x330 */ nw4r::g3d::ResFile mResFile;
+ /* 0x334 */ m3d::smdl_c mMdl;
+ /* 0x330 */ m3d::anmChr_c mAnmChr;
+ /* 0x350 */ m3d::anmMatClr_c mAnmClr;
+ /* 0x388 */ dBgW mBgW;
+ /* 0x5C4 */ STATE_MGR_DECLARE(dAcOwindmill_c);
+ /* 0x600 */ dScnCallback_c mCallback;
+ /* 0x60C */ dAcRef_c<dAcOpinwheel_c> mPinwheel;
+ /* 0x618 */ mVec3_c mWindmillPosition;
+ /* 0x624 */ mAng mWindmillRotation;
+ /* 0x626 */ s16 mTimer1;
+ /* 0x628 */ s16 mTimer2;
+ /* 0x62A */ s16 mTimer3;
+ /* 0x62C */ u8 mSceneFlagInPlace;
+ /* 0x62D */ u8 mSceneFlagBeingBlown;
+ /* 0x62E */ u8 mCurrentStuckPos;
+ /* 0x62F */ u8 mSetRotation;
+ /* 0x630 */ f32 field_0x630;
+ /* 0x634 */ f32 field_0x634;
+ /* 0x638 */ bool mHasPropellor;
+ /* 0x639 */ bool mHasPinwheel;
+ /* 0x63A */ bool field_0x63A;
+
+ static const s16 sStateTimer1_0x50;
+ static const f32 sTargetHalf;
+ static const f32 sTargetOne;
+ static const s16 sStateTimer1_0xC;
+ static const s16 sStateTimer1_0x32;
+ static const s16 sStateTimer2_0xF;
+ static const s16 s0xF_unused;
+
+ static s32 sRotationIncrement1;
+ static s32 sRotationIncrement2;
+ static s32 sRotationIncrement3;
};
#endif
diff --git a/include/d/d_player_act.h b/include/d/d_player_act.h
index c5096561..3da4e570 100644
--- a/include/d/d_player_act.h
+++ b/include/d/d_player_act.h
@@ -2,6 +2,7 @@
#define D_A_PLAYER_ACT_H
#include "d/d_player_base.h"
+#include "m/m_vec.h"
class dAcEnBase_c;
class dAcOFairy_c;
@@ -201,7 +202,7 @@ public:
/* vt 0x17C */ virtual const mVec3_c &getBellowsPosOrOtherVec3F() const {
return mPosition;
}
- /* vt 0x180 */ virtual void setWindMillPos() {}
+ /* vt 0x180 */ virtual void setWindMillPos(mVec3_c *position) const {}
/* vt 0x184 */ virtual bool isOffeset0x435eEqual0x20() {
return 0;
}
@@ -412,7 +413,7 @@ public:
/* vt 0x2A8 */ virtual void lookTowardItem() {}
/* vt 0x2AC */ virtual void vt_0x2AC() {}
/* vt 0x2B0 */ virtual void vt_0x2B0() {}
- /* vt 0x2B4 */ virtual void triggerMoveEventMaybe(u32, u32, u32, mVec3_c &, const mAng&, u32, u32) {}
+ /* vt 0x2B4 */ virtual void triggerMoveEventMaybe(u32, u32, u32, mVec3_c &, const mAng &, u32, u32) {}
/* vt 0x2B8 */ virtual void setActorRef9() {}
/* vt 0x2BC */ virtual void unlinkActorRef9() {}
/* vt 0x2C0 */ virtual bool vt_0x2C0() {