mirror of
https://github.com/zeldaret/ss
synced 2026-05-23 23:05:20 -04:00
@@ -8,13 +8,13 @@ __dt__24sFState_c<11dAcODecoB_c>Fv = .text:0x000001B0; // type:function size:0x5
|
||||
__dt__27sFStateFct_c<11dAcODecoB_c>Fv = .text:0x00000210; // type:function size:0x6C
|
||||
__dt__80sStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000280; // type:function size:0xA0
|
||||
__dt__50sFStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000320; // type:function size:0xA4
|
||||
fn_611_3D0 = .text:0x000003D0; // type:function size:0x6C
|
||||
fn_611_440 = .text:0x00000440; // type:function size:0xCC
|
||||
createHeap__11dAcODecoB_cFv = .text:0x000003D0; // type:function size:0x6C
|
||||
create__11dAcODecoB_cFv = .text:0x00000440; // type:function size:0xCC
|
||||
changeState__80sStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000510; // type:function size:0x10
|
||||
fn_611_520 = .text:0x00000520; // type:function size:0x8
|
||||
fn_611_530 = .text:0x00000530; // type:function size:0x74
|
||||
doDelete__11dAcODecoB_cFv = .text:0x00000520; // type:function size:0x8
|
||||
actorExecute__11dAcODecoB_cFv = .text:0x00000530; // type:function size:0x74
|
||||
executeState__80sStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000005B0; // type:function size:0x10
|
||||
fn_611_5C0 = .text:0x000005C0; // type:function size:0x28
|
||||
draw__11dAcODecoB_cFv = .text:0x000005C0; // type:function size:0x28
|
||||
initializeState_Wait__11dAcODecoB_cFv = .text:0x000005F0; // type:function size:0x4
|
||||
executeState_Wait__11dAcODecoB_cFv = .text:0x00000600; // type:function size:0x14C
|
||||
finalizeState_Wait__11dAcODecoB_cFv = .text:0x00000750; // type:function size:0x4
|
||||
@@ -40,17 +40,17 @@ isSameName__26sFStateID_c<11dAcODecoB_c>CFPCc = .text:0x00000B70; // type:functi
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
__destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_611_rodata_0 = .rodata:0x00000000; // type:object size:0x34 data:float
|
||||
lbl_611_rodata_0 = .rodata:0x00000000; // type:object size:0x34 scope:local data:float
|
||||
g_profile_OBJ_DECOB = .data:0x00000000; // type:object size:0x10 data:4byte
|
||||
lbl_611_data_10 = .data:0x00000010; // type:object size:0x8
|
||||
lbl_611_data_18 = .data:0x00000018; // type:object size:0x1C
|
||||
lbl_611_data_34 = .data:0x00000034; // type:object size:0x4 align:4 data:float
|
||||
lbl_611_data_38 = .data:0x00000038; // type:object size:0x80
|
||||
lbl_611_data_B8 = .data:0x000000B8; // type:object size:0x30
|
||||
lbl_611_data_E8 = .data:0x000000E8; // type:object size:0x30
|
||||
lbl_611_data_118 = .data:0x00000118; // type:object size:0x18
|
||||
lbl_611_data_130 = .data:0x00000130; // type:object size:0x58
|
||||
lbl_611_data_188 = .data:0x00000188; // type:object size:0x34
|
||||
lbl_611_data_10 = .data:0x00000010; // type:object size:0x8 scope:local
|
||||
lbl_611_data_18 = .data:0x00000018; // type:object size:0x1C scope:local
|
||||
lbl_611_data_34 = .data:0x00000034; // type:object size:0x4 scope:local align:4 data:float
|
||||
__vt__11dAcODecoB_c = .data:0x00000038; // type:object size:0x80
|
||||
__vt__50sFStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c> = .data:0x000000B8; // type:object size:0x30
|
||||
__vt__80sStateMgr_c<11dAcODecoB_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x000000E8; // type:object size:0x30
|
||||
lbl_611_data_118 = .data:0x00000118; // type:object size:0x18 scope:local
|
||||
lbl_611_data_130 = .data:0x00000130; // type:object size:0x58 scope:local
|
||||
__vt__26sFStateID_c<11dAcODecoB_c> = .data:0x00000188; // type:object size:0x34
|
||||
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_611_bss_8 = .bss:0x00000008; // type:object size:0x10
|
||||
lbl_611_bss_18 = .bss:0x00000018; // type:object size:0x30 data:4byte
|
||||
lbl_611_bss_8 = .bss:0x00000008; // type:object size:0x10 scope:local
|
||||
lbl_611_bss_18 = .bss:0x00000018; // type:object size:0x30 scope:local data:4byte
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#define D_A_OBJ_DECOB_H
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "m/m3d/m_smdl.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
|
||||
@@ -10,10 +13,23 @@ public:
|
||||
dAcODecoB_c() : mStateMgr(*this, sStateID::null) {}
|
||||
virtual ~dAcODecoB_c() {}
|
||||
|
||||
virtual bool createHeap() override;
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int draw() override;
|
||||
|
||||
STATE_FUNC_DECLARE(dAcODecoB_c, Wait);
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcODecoB_c);
|
||||
/* 0x330 */ nw4r::g3d::ResFile mResFile;
|
||||
/* 0x334 */ m3d::smdl_c mMdl;
|
||||
/* 0x350 */ STATE_MGR_DECLARE(dAcODecoB_c);
|
||||
/* 0x38C */ u16 padding_0x38C;
|
||||
/* 0x38E */ mAng field_0x38E;
|
||||
|
||||
static f32 lbl_611_data_34;
|
||||
static const f32 lbl_611_rodata_30;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,71 @@
|
||||
#include "d/a/obj/d_a_obj_decoB.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "f/f_base.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
#include "rvl/MTX/mtx.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_DECOB, dAcODecoB_c, fProfile::OBJ_DECOB, 0x161, 0, 3);
|
||||
|
||||
STATE_DEFINE(dAcODecoB_c, Wait);
|
||||
|
||||
bool dAcODecoB_c::createHeap() {
|
||||
void *data = getOarcResFile("DecoB");
|
||||
mResFile = nw4r::g3d::ResFile(data);
|
||||
nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("DecoB");
|
||||
return mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr);
|
||||
}
|
||||
|
||||
int dAcODecoB_c::create() {
|
||||
if (!initAllocatorWork1Heap(0x1000, "dAcODecoB_c::m_allocator", 0x20)) {
|
||||
return FAILED;
|
||||
}
|
||||
forwardAccel = 0.0f;
|
||||
forwardMaxSpeed = 0.0f;
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
boundingBox.Set(mVec3_c(-350.0f, 100.0f, -100.0f), mVec3_c(350.0f, -300.0f, 100.0f));
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcODecoB_c::doDelete() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcODecoB_c::actorExecute() {
|
||||
mStateMgr.executeState();
|
||||
PSMTXTrans(mWorldMtx, position.x, position.y, position.z);
|
||||
mWorldMtx.ZXYrotM(rotation);
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcODecoB_c::draw() {
|
||||
drawModelType1(&mMdl);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
void dAcODecoB_c::initializeState_Wait() {}
|
||||
void dAcODecoB_c::executeState_Wait() {}
|
||||
|
||||
f32 dAcODecoB_c::lbl_611_data_34 = 0.95f;
|
||||
|
||||
void dAcODecoB_c::executeState_Wait() {
|
||||
if (dAcPy_c::GetLink() != nullptr && dAcPy_c::GetLink()->checkFlags0x350(0x2000)) {
|
||||
mVec3_c deltaPosition = dAcPy_c::GetLink()->position - position;
|
||||
f32 distance = EGG::Math<f32>::sqrt(deltaPosition.squareMagXZ());
|
||||
distance = (2000.0f - distance) / 2000.0f;
|
||||
if (distance < 0.0f) {
|
||||
distance = 0.0f;
|
||||
}
|
||||
field_0x38E = distance * 2048.0f;
|
||||
}
|
||||
field_0x38E -= rotation.x * 0.05f;
|
||||
field_0x38E = field_0x38E * lbl_611_data_34;
|
||||
rotation.x += field_0x38E;
|
||||
}
|
||||
|
||||
const f32 dAcODecoB_c::lbl_611_rodata_30 = 2000.0f;
|
||||
|
||||
void dAcODecoB_c::finalizeState_Wait() {}
|
||||
|
||||
Reference in New Issue
Block a user