d_a_obj_tower_gearD101 with one regswap

This commit is contained in:
robojumper
2024-11-14 16:51:38 +01:00
parent cbb409cf6c
commit 53c9b7062e
7 changed files with 268 additions and 32 deletions
+4 -1
View File
@@ -3,7 +3,6 @@
#include "d/a/obj/d_a_obj_base.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
class dAcOTowerD101_c : public dAcObjBase_c {
public:
@@ -14,6 +13,10 @@ public:
private:
/* 0x??? */ STATE_MGR_DECLARE(dAcOTowerD101_c);
u8 field_0x___[0xC64 - 0x36C];
public:
/* 0xC64 */ f32 mGoalElevation;
/* 0xC68 */ f32 mCurrentElevation;
};
#endif
+50 -3
View File
@@ -1,19 +1,66 @@
#ifndef D_A_OBJ_TOWER_GEARD101_H
#define D_A_OBJ_TOWER_GEARD101_H
#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "m/m3d/m_mdl.h"
#include "m/m_angle.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "nw4r/g3d/g3d_resfile.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
#include "toBeSorted/effects_struct.h"
/**
* A callback implementation that controls the button node in the switch model.
*/
class dAcOTowerGearD101_callback_c : public m3d::callback_c {
public:
dAcOTowerGearD101_callback_c() {}
virtual ~dAcOTowerGearD101_callback_c() {}
virtual void timingB(u32, nw4r::g3d::WorldMtxManip *, nw4r::g3d::ResMdl) override;
/* 0x04 */ u32 mNodeId;
/* 0x08 */ mAng mGearRotation;
void init(u32 nodeId) {
mNodeId = nodeId;
}
};
class dAcOTowerGearD101_c : public dAcObjBase_c {
public:
dAcOTowerGearD101_c() : mStateMgr(*this, sStateID::null) {}
dAcOTowerGearD101_c()
: mStateMgr(*this, sStateID::null), field_0x3A0(mVec3_c::Zero.x, mVec3_c::Zero.y, mVec3_c::Zero.z),
field_0x3AC(mVec3_c::Zero.x, mVec3_c::Zero.y, mVec3_c::Zero.z), field_0x3B8(mAng3_c::Zero) {}
virtual ~dAcOTowerGearD101_c() {}
STATE_FUNC_DECLARE(dAcOTowerGearD101_c, Wait);
virtual bool createHeap() override;
virtual int actorCreate() override;
virtual int actorPostCreate() override;
virtual int doDelete() override;
virtual int actorExecute() override;
virtual int draw() override;
private:
/* 0x??? */ STATE_MGR_DECLARE(dAcOTowerGearD101_c);
void initTransform();
void playVisualEffect();
/* 0x330 */ nw4r::g3d::ResFile mRes;
/* 0x334 */ m3d::mdl_c mMdl;
/* 0x350 */ STATE_MGR_DECLARE(dAcOTowerGearD101_c);
/* 0x394 */ dAcOTowerGearD101_callback_c mMdlCallback;
/* 0x3A0 */ mVec3_c field_0x3A0;
/* 0x3AC */ mVec3_c field_0x3AC;
/* 0x3B8 */ mAng3_c field_0x3B8;
/* 0x3BE */ u8 field_0x3BE[2];
/* 0x3C0 */ mAng mCurrRotation;
/* 0x3C2 */ s16 mPreviousTurnSpeed;
/* 0x3C4 */ mMtx_c field_0x3C4;
/* 0x3F4 */ mVec3_c field_0x3F4;
/* 0x400 */ EffectsStruct mEffects;
};
#endif
+2
View File
@@ -3,6 +3,7 @@
#include "common.h"
#include "d/d_base.h"
#include "m/m_angle.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
@@ -23,6 +24,7 @@ public:
void remove(bool);
void fn_80029929(u16 effect, mVec3_c *pos, void *, void *, void *, void *);
void fn_80029A10(u16 effect, mVec3_c *pos, mAng3_c *rot, void *, void *, void *);
void setMtx(const mMtx_c &);
bool checkField0x00() const {