Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d_a_obj_stage_cover OK #59

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/SOUE01/rels/d_a_obj_stage_coverNP/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ REL/global_destructor_chain.c:
REL/d/a/obj/d_a_obj_stage_cover.cpp:
.text start:0x000000F0 end:0x00000AB8
.ctors start:0x00000000 end:0x00000004
.rodata start:0x00000000 end:0x00000008
.data start:0x00000000 end:0x000001D8
.bss start:0x00000008 end:0x00000048
97 changes: 48 additions & 49 deletions config/SOUE01/rels/d_a_obj_stage_coverNP/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,55 @@ _epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
__register_global_object = .text:0x00000070; // type:function size:0x1C scope:global
__destroy_global_chain = .text:0x00000090; // type:function size:0x54 scope:global
AcOstageCover__ctor = .text:0x000000F0; // type:function size:0xC0
fn_379_1B0 = .text:0x000001B0; // type:function size:0x58
fn_379_210 = .text:0x00000210; // type:function size:0x6C
fn_379_280 = .text:0x00000280; // type:function size:0xA0
fn_379_320 = .text:0x00000320; // type:function size:0xA4
AcOstageCover__initModels = .text:0x000003D0; // type:function size:0x84
AcOstageCover__init = .text:0x00000460; // type:function size:0xBC
fn_379_520 = .text:0x00000520; // type:function size:0x10
fn_379_530 = .text:0x00000530; // type:function size:0x8
AcOstageCover__update = .text:0x00000540; // type:function size:0x54
fn_379_5A0 = .text:0x000005A0; // type:function size:0x10
AcOstageCover__draw = .text:0x000005B0; // type:function size:0x28
fn_379_5E0 = .text:0x000005E0; // type:function size:0x4
AcOstageCover__stateWaitUpdate = .text:0x000005F0; // type:function size:0x10
fn_379_600 = .text:0x00000600; // type:function size:0x4
fn_379_610 = .text:0x00000610; // type:function size:0x4
AcOstageCover__dtor = .text:0x00000620; // type:function size:0xCC
fn_379_6F0 = .text:0x000006F0; // type:function size:0x10
fn_379_700 = .text:0x00000700; // type:function size:0x60
fn_379_760 = .text:0x00000760; // type:function size:0xC
fn_379_770 = .text:0x00000770; // type:function size:0x1C
fn_379_790 = .text:0x00000790; // type:function size:0x1C
fn_379_7B0 = .text:0x000007B0; // type:function size:0x1C
fn_379_7D0 = .text:0x000007D0; // type:function size:0x10
fn_379_7E0 = .text:0x000007E0; // type:function size:0x10
fn_379_7F0 = .text:0x000007F0; // type:function size:0x10
fn_379_800 = .text:0x00000800; // type:function size:0x10
fn_379_810 = .text:0x00000810; // type:function size:0x10
fn_379_820 = .text:0x00000820; // type:function size:0x10
fn_379_830 = .text:0x00000830; // type:function size:0x30
fn_379_860 = .text:0x00000860; // type:function size:0x30
fn_379_890 = .text:0x00000890; // type:function size:0x30
fn_379_8C0 = .text:0x000008C0; // type:function size:0x10C
fn_379_9D0 = .text:0x000009D0; // type:function size:0x58
fn_379_A30 = .text:0x00000A30; // type:function size:0x88
dAcOstageCover_c_classInit__Fv = .text:0x000000F0; // type:function size:0xC0
__dt__29sFState_c<16dAcOstageCover_c>Fv = .text:0x000001B0; // type:function size:0x58
__dt__32sFStateFct_c<16dAcOstageCover_c>Fv = .text:0x00000210; // type:function size:0x6C
__dt__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000280; // type:function size:0xA0
__dt__55sFStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000320; // type:function size:0xA4
createHeap__16dAcOstageCover_cFv = .text:0x000003D0; // type:function size:0x84
create__16dAcOstageCover_cFv = .text:0x00000460; // type:function size:0xBC
changeState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000520; // type:function size:0x10
doDelete__16dAcOstageCover_cFv = .text:0x00000530; // type:function size:0x8
actorExecute__16dAcOstageCover_cFv = .text:0x00000540; // type:function size:0x54
executeState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000005A0; // type:function size:0x10
draw__16dAcOstageCover_cFv = .text:0x000005B0; // type:function size:0x28
initializeState_Wait__16dAcOstageCover_cFv = .text:0x000005E0; // type:function size:0x4
executeState_Wait__16dAcOstageCover_cFv = .text:0x000005F0; // type:function size:0x14
finalizeState_Wait__16dAcOstageCover_cFv = .text:0x00000610; // type:function size:0x4
__dt__16dAcOstageCover_cFv = .text:0x00000620; // type:function size:0xCC
getStateID__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x000006F0; // type:function size:0x10
build__32sFStateFct_c<16dAcOstageCover_c>FRC12sStateIDIf_c = .text:0x00000700; // type:function size:0x60
dispose__32sFStateFct_c<16dAcOstageCover_c>FRP10sStateIf_c = .text:0x00000760; // type:function size:0xC
initialize__29sFState_c<16dAcOstageCover_c>Fv = .text:0x00000770; // type:function size:0x1C
execute__29sFState_c<16dAcOstageCover_c>Fv = .text:0x00000790; // type:function size:0x1C
finalize__29sFState_c<16dAcOstageCover_c>Fv = .text:0x000007B0; // type:function size:0x1C
initializeState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000007D0; // type:function size:0x10
finalizeState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000007E0; // type:function size:0x10
refreshState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000007F0; // type:function size:0x10
getState__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000800; // type:function size:0x10
getNewStateID__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000810; // type:function size:0x10
getOldStateID__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000820; // type:function size:0x10
finalizeState__31sFStateID_c<16dAcOstageCover_c>CFR16dAcOstageCover_c = .text:0x00000830; // type:function size:0x30
executeState__31sFStateID_c<16dAcOstageCover_c>CFR16dAcOstageCover_c = .text:0x00000860; // type:function size:0x30
initializeState__31sFStateID_c<16dAcOstageCover_c>CFR16dAcOstageCover_c = .text:0x00000890; // type:function size:0x30
__sinit_\d_a_obj_stage_cover_cpp = .text:0x000008C0; // type:function size:0x10C scope:local
__dt__31sFStateID_c<16dAcOstageCover_c>Fv = .text:0x000009D0; // type:function size:0x58
isSameName__31sFStateID_c<16dAcOstageCover_c>CFPCc = .text:0x00000A30; // type:function size:0x88
_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_379_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
lbl_379_rodata_4 = .rodata:0x00000004; // type:object size:0x4 data:float
lbl_379_data_0 = .data:0x00000000; // type:object size:0x10 data:4byte
lbl_379_data_10 = .data:0x00000010; // type:object size:0x10 data:string
lbl_379_data_20 = .data:0x00000020; // type:object size:0xC
lbl_379_data_2C = .data:0x0000002C; // type:object size:0x24
lbl_379_data_50 = .data:0x00000050; // type:object size:0x80
lbl_379_data_D0 = .data:0x000000D0; // type:object size:0x30
lbl_379_data_100 = .data:0x00000100; // type:object size:0x30
lbl_379_data_130 = .data:0x00000130; // type:object size:0x18
lbl_379_data_148 = .data:0x00000148; // type:object size:0x5C
lbl_379_data_1A4 = .data:0x000001A4; // type:object size:0x34
lbl_379_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float
lbl_379_rodata_4 = .rodata:0x00000004; // type:object size:0x4 scope:local data:float
g_profile_OBJ_STAGE_COVER = .data:0x00000000; // type:object size:0x10 data:4byte
lbl_379_data_10 = .data:0x00000010; // type:object size:0x10 scope:local data:string
lbl_379_data_20 = .data:0x00000020; // type:object size:0xC scope:local
lbl_379_data_2C = .data:0x0000002C; // type:object size:0x24 scope:local
__vt__16dAcOstageCover_c = .data:0x00000050; // type:object size:0x80
__vt__55sFStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c> = .data:0x000000D0; // type:object size:0x30
__vt__85sStateMgr_c<16dAcOstageCover_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x00000100; // type:object size:0x30
__vt__32sFStateFct_c<16dAcOstageCover_c> = .data:0x00000130; // type:object size:0x14
__vt__29sFState_c<16dAcOstageCover_c> = .data:0x00000148; // type:object size:0x18
__vt__31sFStateID_c<16dAcOstageCover_c> = .data:0x000001A4; // type:object size:0x34
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_379_bss_8 = .bss:0x00000008; // type:object size:0x10
lbl_379_bss_18 = .bss:0x00000018; // type:object size:0x30 data:4byte
lbl_379_bss_8 = .bss:0x00000008; // type:object size:0x10 scope:local
StateID_Wait__16dAcOstageCover_c = .bss:0x00000018; // type:object size:0x30 data:4byte
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
Rel(NonMatching, "d_a_obj_soil", "REL/d/a/obj/d_a_obj_soil.cpp"),
Rel(NonMatching, "d_a_obj_spider_line", "REL/d/a/obj/d_a_obj_spider_line.cpp"),
Rel(Matching, "d_a_obj_spike", "REL/d/a/obj/d_a_obj_spike.cpp"),
Rel(NonMatching, "d_a_obj_stage_cover", "REL/d/a/obj/d_a_obj_stage_cover.cpp"),
Rel(Matching, "d_a_obj_stage_cover", "REL/d/a/obj/d_a_obj_stage_cover.cpp"),
Rel(NonMatching, "d_a_obj_stage_crack", "REL/d/a/obj/d_a_obj_stage_crack.cpp"),
Rel(NonMatching, "d_a_obj_stage_debris", "REL/d/a/obj/d_a_obj_stage_debris.cpp"),
Rel(NonMatching, "d_a_obj_stage_kraken", "REL/d/a/obj/d_a_obj_stage_kraken.cpp"),
Expand Down
28 changes: 28 additions & 0 deletions include/d/a/obj/d_a_obj_stage_cover.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef D_A_OBJ_STAGE_COVER_H
#define D_A_OBJ_STAGE_COVER_H

#include <d/a/obj/d_a_obj_base.h>
#include <m/m3d/m_smdl.h>
#include <s/s_State.hpp>
#include <s/s_StateMgr.hpp>

class dAcOstageCover_c : public dAcObjBase_c {
public:
dAcOstageCover_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dAcOstageCover_c() {}
virtual bool createHeap() override;
virtual int create() override;
virtual int actorExecute() override;
virtual int draw() override;
virtual int doDelete() override;

STATE_FUNC_DECLARE(dAcOstageCover_c, Wait);

private:
nw4r::g3d::ResFile mBrres;
m3d::smdl_c mModel;
STATE_MGR_DECLARE(dAcOstageCover_c);
bool mDeletionRequested;
};

#endif
46 changes: 46 additions & 0 deletions src/REL/d/a/obj/d_a_obj_stage_cover.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <d/a/obj/d_a_obj_stage_cover.h>
#include <toBeSorted/arc_managers/current_stage_arc_manager.h>

SPECIAL_ACTOR_PROFILE(OBJ_STAGE_COVER, dAcOstageCover_c, fProfile::OBJ_STAGE_COVER, 0x01E1, 0, 0);

STATE_DEFINE(dAcOstageCover_c, Wait);

bool dAcOstageCover_c::createHeap() {
mBrres = CurrentStageArcManager::sInstance->getData("g3d/stage.brres");
nw4r::g3d::ResMdl mdl = mBrres.GetResMdl("StageCover");
TRY_CREATE(mModel.create(mdl, &heap_allocator, 0x120));
return true;
}

int dAcOstageCover_c::create() {
CREATE_ALLOCATOR(dAcOstageCover_c);

mStateMgr.changeState(StateID_Wait);
mModel.setPriorityDraw(0x1C, 9);
setBoundingBox(mVec3_c(-0.0f, -0.0f, -0.0f), mVec3_c(0.0f, 0.0f, 0.0f));
return SUCCEEDED;
}

int dAcOstageCover_c::doDelete() {
return SUCCEEDED;
}

int dAcOstageCover_c::actorExecute() {
mStateMgr.executeState();
updateMatrix();
mModel.setLocalMtx(worldMatrix);
return SUCCEEDED;
}

int dAcOstageCover_c::draw() {
drawModelType1(&mModel);
return SUCCEEDED;
}

void dAcOstageCover_c::initializeState_Wait() {}
void dAcOstageCover_c::executeState_Wait() {
if (mDeletionRequested) {
deleteRequest();
}
}
void dAcOstageCover_c::finalizeState_Wait() {}