Skip to content

Commit

Permalink
d_t_col_bomb_shield OK
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper committed Nov 14, 2024
1 parent cbb409c commit ea06aec
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 22 deletions.
3 changes: 3 additions & 0 deletions config/SOUE01/rels/d_t_col_bomb_shieldNP/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/t/d_t_col_bomb_shield.cpp:
.text start:0x000000F0 end:0x00000AA8
.ctors start:0x00000000 end:0x00000004
.rodata start:0x00000000 end:0x00000014
.data start:0x00000000 end:0x00000224
.bss start:0x00000008 end:0x00000048
34 changes: 17 additions & 17 deletions config/SOUE01/rels/d_t_col_bomb_shieldNP/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ _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
dTgColBombShield_classInit__Fv = .text:0x000000F0; // type:function size:0xAC
__dt__16dTgColBombShieldFv = .text:0x000001A0; // type:function size:0x58
__dt__5dTg_cFv = .text:0x000001A0; // type:function size:0x58
__dt__29sFState_c<16dTgColBombShield>Fv = .text:0x00000200; // type:function size:0x58
__dt__32sFStateFct_c<16dTgColBombShield>Fv = .text:0x00000260; // type:function size:0x6C
__dt__85sStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000002D0; // type:function size:0xA0
__dt__55sFStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c>Fv = .text:0x00000370; // type:function size:0xA4
fn_495_420 = .text:0x00000420; // type:function size:0x8
TgColBombShield__init = .text:0x00000430; // type:function size:0x104
createHeap__16dTgColBombShieldFv = .text:0x00000420; // type:function size:0x8
create__16dTgColBombShieldFv = .text:0x00000430; // type:function size:0x104
changeState__85sStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000540; // type:function size:0x10
fn_495_550 = .text:0x00000550; // type:function size:0x8
TgColBombShield__update = .text:0x00000560; // type:function size:0x60
fn_495_5C0 = .text:0x000005C0; // type:function size:0x8
doDelete__16dTgColBombShieldFv = .text:0x00000550; // type:function size:0x8
actorExecute__16dTgColBombShieldFv = .text:0x00000560; // type:function size:0x60
draw__16dTgColBombShieldFv = .text:0x000005C0; // type:function size:0x8
initializeState_Wait__16dTgColBombShieldFv = .text:0x000005D0; // type:function size:0x4
executeState_Wait__16dTgColBombShieldFv = .text:0x000005E0; // type:function size:0x4
finalizeState_Wait__16dTgColBombShieldFv = .text:0x000005F0; // type:function size:0x4
fn_495_600 = .text:0x00000600; // type:function size:0xC8
__dt__16dTgColBombShieldFv = .text:0x00000600; // type:function size:0xC8
executeState__85sStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000006D0; // type:function size:0x10
getStateID__85sStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x000006E0; // type:function size:0x10
build__32sFStateFct_c<16dTgColBombShield>FRC12sStateIDIf_c = .text:0x000006F0; // type:function size:0x60
Expand All @@ -41,15 +41,15 @@ isSameName__31sFStateID_c<16dTgColBombShield>CFPCc = .text:0x00000A20; // type:f
_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_495_rodata_0 = .rodata:0x00000000; // type:object size:0x14 data:float
lbl_495_rodata_0 = .rodata:0x00000000; // type:object size:0x14 scope:local data:float
g_profile_COL_BOMSLD = .data:0x00000000; // type:object size:0x10 data:4byte
lbl_495_data_10 = .data:0x00000010; // type:object size:0x20
lbl_495_data_30 = .data:0x00000030; // type:object size:0x78
lbl_495_data_A8 = .data:0x000000A8; // type:object size:0x30
lbl_495_data_D8 = .data:0x000000D8; // type:object size:0x30
lbl_495_data_108 = .data:0x00000108; // type:object size:0x18
lbl_495_data_120 = .data:0x00000120; // type:object size:0xD0
lbl_495_data_1F0 = .data:0x000001F0; // type:object size:0x34
lbl_495_data_10 = .data:0x00000010; // type:object size:0x20 scope:local
__vt__16dTgColBombShield = .data:0x00000030; // type:object size:0x74
__vt__55sFStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c> = .data:0x000000A8; // type:object size:0x30
__vt__85sStateMgr_c<16dTgColBombShield,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x000000D8; // type:object size:0x30
__vt__32sFStateFct_c<16dTgColBombShield> = .data:0x00000108; // type:object size:0x14
__vt__29sFState_c<16dTgColBombShield> = .data:0x00000120; // type:object size:0x18
__vt__31sFStateID_c<16dTgColBombShield> = .data:0x000001F0; // type:object size:0x34
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_495_bss_8 = .bss:0x00000008; // type:object size:0x10
lbl_495_bss_18 = .bss:0x00000018; // type:object size:0x30 data:4byte
lbl_495_bss_8 = .bss:0x00000008; // type:object size:0x10 scope:local
StateID_Wait__16dTgColBombShield = .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 @@ -1794,7 +1794,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
Rel(NonMatching, "d_t_belt_obstacle", "REL/d/t/d_t_belt_obstacle.cpp"),
Rel(NonMatching, "d_t_clef_game", "REL/d/t/d_t_clef_game.cpp"),
Rel(NonMatching, "d_t_clef_manager", "REL/d/t/d_t_clef_manager.cpp"),
Rel(NonMatching, "d_t_col_bomb_shield", "REL/d/t/d_t_col_bomb_shield.cpp"),
Rel(Matching, "d_t_col_bomb_shield", "REL/d/t/d_t_col_bomb_shield.cpp"),
Rel(NonMatching, "d_t_D3_scene_change", "REL/d/t/d_t_D3_scene_change.cpp"),
Rel(NonMatching, "d_t_defeat_boss", "REL/d/t/d_t_defeat_boss.cpp"),
Rel(Matching, "d_t_dowsing", "REL/d/t/d_t_dowsing.cpp"),
Expand Down
19 changes: 15 additions & 4 deletions include/d/t/d_t_col_bomb_shield.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
#ifndef D_T_COL_BOMB_SHIELD_H
#define D_T_COL_BOMB_SHIELD_H

#include "d/a/d_a_base.h"
#include "d/t/d_tg.h"
#include "m/m_mtx.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"

class dTgColBombShield : public dAcBase_c {
class dTgColBombShield : public dTg_c {
public:
dTgColBombShield() : mStateMgr(*this, sStateID::null) {}
virtual ~dTgColBombShield() {}

bool createHeap() override;
int create() override;
int doDelete() override;
int actorExecute() override;
int draw() override;

STATE_FUNC_DECLARE(dTgColBombShield, Wait);

private:
/* 0x??? */ STATE_MGR_DECLARE(dTgColBombShield);
/* 0x0FC */ STATE_MGR_DECLARE(dTgColBombShield);
void dummy_executeState() {
// Not called from the class but needed for weak function ordering
mStateMgr.executeState();
}
/* 0x138 */ mMtx_c mColMtx;
};

#endif
41 changes: 41 additions & 0 deletions src/REL/d/t/d_t_col_bomb_shield.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
#include "d/t/d_t_col_bomb_shield.h"
#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/a/d_a_player.h"
#include "d/col/cc/d_cc_s.h"
#include "m/m_mtx.h"
#include "rvl/MTX/mtx.h"

SPECIAL_ACTOR_PROFILE(COL_BOMSLD, dTgColBombShield, fProfile::COL_BOMSLD, 0x12, 0, 0);

STATE_DEFINE(dTgColBombShield, Wait);

bool dTgColBombShield::createHeap() {
return true;
}

int dTgColBombShield::create() {
0.0f; // cool
CREATE_ALLOCATOR(dTgColBombShield);
static const f32 offset = 0.1f;
mScale.x += offset;
mScale.y += offset;
mScale.z += offset;
mColMtx.transS(position.x, position.y + mScale.y * 0.5f - 0.05f, position.z);
mColMtx.ZXYrotM(rotation.x, rotation.y, rotation.z);
mMtx_c tmp;
PSMTXScale(tmp, mScale.x, mScale.y, mScale.z);
mColMtx += tmp;
mStateMgr.changeState(StateID_Wait);
return SUCCEEDED;
}

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

int dTgColBombShield::actorExecute() {
if (dAcPy_c::LINK != nullptr && roomid == dAcPy_c::LINK->roomid) {
dCcS::GetInstance()->SetArea(&mColMtx);
}
return SUCCEEDED;
}

int dTgColBombShield::draw() {
return SUCCEEDED;
}

void dTgColBombShield::initializeState_Wait() {}
void dTgColBombShield::executeState_Wait() {}
void dTgColBombShield::finalizeState_Wait() {}

0 comments on commit ea06aec

Please sign in to comment.