d_a_obj_water_shield almost OK, weak function order

This commit is contained in:
robojumper
2024-11-14 13:41:53 +01:00
parent cbb409cf6c
commit d3fc2b009a
4 changed files with 87 additions and 16 deletions
@@ -11,3 +11,5 @@ REL/executor.c:
REL/d/a/obj/d_a_obj_water_shield.cpp:
.text start:0x00000070 end:0x00000574
.rodata start:0x00000000 end:0x00000014
.data start:0x00000000 end:0x00000110
@@ -2,21 +2,22 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
dAcOwaterShield_c_classInit__Fv = .text:0x00000070; // type:function size:0xD4
fn_433_150 = .text:0x00000150; // type:function size:0x40
AcOwaterShield__initModels = .text:0x00000190; // type:function size:0x16C
AcOwaterShield__init = .text:0x00000300; // type:function size:0x100
fn_433_400 = .text:0x00000400; // type:function size:0x8
AcOwaterShield__updae = .text:0x00000410; // type:function size:0x54
AcOwaterShield__draw = .text:0x00000470; // type:function size:0x28
__dt__Q34nw4r3g3d15IScnObjCallbackFv = .text:0x00000150; // type:function size:0x40
createHeap__17dAcOwaterShield_cFv = .text:0x00000190; // type:function size:0x16C
create__17dAcOwaterShield_cFv = .text:0x00000300; // type:function size:0x100
doDelete__17dAcOwaterShield_cFv = .text:0x00000400; // type:function size:0x8
actorExecute__17dAcOwaterShield_cFv = .text:0x00000410; // type:function size:0x54
draw__17dAcOwaterShield_cFv = .text:0x00000470; // type:function size:0x28
__dt__17dAcOwaterShield_cFv = .text:0x000004A0; // type:function size:0x8C
fn_433_530 = .text:0x00000530; // type:function size:0x4
fn_433_540 = .text:0x00000540; // type:function size:0x4
fn_433_550 = .text:0x00000550; // type:function size:0x4
fn_433_560 = .text:0x00000560; // type:function size:0x4
fn_433_570 = .text:0x00000570; // type:function size:0x4
ExecCallback_DRAW_XLU__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000530; // type:function size:0x4
ExecCallback_DRAW_OPA__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000540; // type:function size:0x4
ExecCallback_CALC_MAT__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000550; // type:function size:0x4
ExecCallback_CALC_WORLD__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000560; // type:function size:0x4
ExecCallback_CALC_VIEW__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000570; // type:function size:0x4
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
lbl_433_rodata_0 = .rodata:0x00000000; // type:object size:0x14 data:float
g_profile_OBJ_WATER_SHIELD = .data:0x00000000; // type:object size:0x50
lbl_433_data_50 = .data:0x00000050; // type:object size:0x20
lbl_433_data_70 = .data:0x00000070; // type:object size:0xA0
lbl_433_rodata_0 = .rodata:0x00000000; // type:object size:0x14 scope:local data:float
g_profile_OBJ_WATER_SHIELD = .data:0x00000000; // type:object size:0x10
lbl_433_data_50 = .data:0x00000050; // type:object size:0x20 scope:local
__vt__17dAcOwaterShield_c = .data:0x00000070; // type:object size:0x80
__vt__Q34nw4r3g3d15IScnObjCallback = .data:0x000000F0; // type:object size:0x20
+19 -1
View File
@@ -2,13 +2,31 @@
#define D_A_OBJ_WATER_SHIELD_H
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/bg/d_bg_w.h"
#include "m/m3d/m_anmmatclr.h"
#include "m/m3d/m_anmtexsrt.h"
#include "m/m3d/m_smdl.h"
#include "nw4r/g3d/g3d_resfile.h"
#include "toBeSorted/stage_render_stuff.h"
class dAcOwaterShield_c : public dAcObjBase_c {
public:
dAcOwaterShield_c() {}
dAcOwaterShield_c() : mScnCallback(this) {}
virtual ~dAcOwaterShield_c() {}
virtual bool createHeap() override;
virtual int create() override;
virtual int doDelete() override;
virtual int actorExecute() override;
virtual int draw() override;
private:
/* 0x330 */ nw4r::g3d::ResFile mRes;
/* 0x334 */ m3d::smdl_c mMdl;
/* 0x350 */ dBgW mBgW;
/* 0x560 */ m3d::anmTexSrt_c mAnmSrt;
/* 0x58C */ m3d::anmMatClr_c mAnmClr;
/* 0x5B8 */ dScnCallback_c mScnCallback;
};
#endif
+50
View File
@@ -1,3 +1,53 @@
#include "d/a/obj/d_a_obj_water_shield.h"
#include "d/col/bg/d_bg_s.h"
SPECIAL_ACTOR_PROFILE(OBJ_WATER_SHIELD, dAcOwaterShield_c, fProfile::OBJ_WATER_SHIELD, 0x218, 0, 0);
bool dAcOwaterShield_c::createHeap() {
mRes = getOarcResFile("WaterWallF103");
nw4r::g3d::ResMdl mdl = mRes.GetResMdl("WaterWallF103");
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x32C));
nw4r::g3d::ResAnmClr clr = mRes.GetResAnmClr("WaterWallF103");
TRY_CREATE(mAnmClr.create(mdl, clr, &heap_allocator, nullptr, 1));
nw4r::g3d::ResAnmTexSrt srt = mRes.GetResAnmTexSrt("WaterWallF103");
TRY_CREATE(mAnmSrt.create(mdl, srt, &heap_allocator, nullptr, 1));
cBgD_t *dzb = (cBgD_t *)getOarcFile("WaterWallF103", "dzb/WaterWallF103.dzb");
PLC *plc = (PLC *)getOarcFile("WaterWallF103", "dat/WaterWallF103.plc");
updateMatrix();
mMdl.setLocalMtx(mWorldMtx);
TRY_CREATE(!mBgW.Set(dzb, plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale));
mBgW.Lock();
return true;
}
int dAcOwaterShield_c::create() {
CREATE_ALLOCATOR(dAcOwaterShield_c);
dBgS::GetInstance()->Regist(&mBgW, this);
mScnCallback.attach(mMdl);
mMdl.setAnm(mAnmSrt);
mMdl.setAnm(mAnmClr);
mMdl.setPriorityDraw(0x1C, 0x9);
boundingBox.Set(mVec3_c(-12000.0f, -2000.0f, -14000.0f), mVec3_c(12000.0f, 11000.0f, 12000.0f));
return SUCCEEDED;
}
int dAcOwaterShield_c::doDelete() {
return SUCCEEDED;
}
int dAcOwaterShield_c::actorExecute() {
mAnmSrt.play();
mAnmClr.play();
return SUCCEEDED;
}
int dAcOwaterShield_c::draw() {
drawModelType1(&mMdl);
return SUCCEEDED;
}
// Weak function order issue IScnObjCallback