Skip to content

Debug Actor Work: d_a_andsw - d_a_obj_ito#2761

Open
carter-ktb21 wants to merge 24 commits intozeldaret:mainfrom
carter-ktb21:debug_work
Open

Debug Actor Work: d_a_andsw - d_a_obj_ito#2761
carter-ktb21 wants to merge 24 commits intozeldaret:mainfrom
carter-ktb21:debug_work

Conversation

@carter-ktb21
Copy link
Contributor

No description provided.

@decomp-dev
Copy link

decomp-dev bot commented Oct 29, 2025

Report for Shield (2f2f37a - c48a4ad)

📈 Matched code: 6.50% (+0.00%, +396 bytes)

✅ 3 new matches
Unit Function Bytes Before After
d_a_door_dbdoor00/d/actor/d_a_door_dbdoor00 nodeCallBack(J3DJoint*, int) +3 99.08% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::Create() +1 99.29% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::ExecuteType1() +1 99.60% 100.00%
📈 14 improvements in unmatched functions
Unit Function Bytes Before After
d_a_door_shutter/d/actor/d_a_door_shutter daDoor20_c::makeEventId() +54 67.10% 72.10%
d_a_kytag00/d/actor/d_a_kytag00 wether_tag_efect_move(kytag00_class*) +14 81.49% 82.16%
d_a_door_shutter/d/actor/d_a_door_shutter daDoor20_c::openInit_0() +11 59.78% 60.98%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::CreateInit_bokkuri() +3 19.66% 19.98%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::obj_break(bool, bool, bool) +2 73.75% 74.30%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::CreateHeap() 0 99.74% 99.98%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::setParticle() 0 91.73% 91.77%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_tri() 0 45.81% 45.82%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_cyl() 0 45.20% 45.21%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_spec() 0 48.61% 48.62%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::Execute(float(**)[3][4]) 0 52.83% 52.98%
d_a_door_knob00/d/actor/d_a_door_knob00 daKnob20_c::CreateHeap() 0 62.28% 62.30%
d_a_ep/d/actor/d_a_ep daEp_Create(fopAc_ac_c*) 0 50.90% 50.91%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::mode_proc_wait() 0 30.13% 30.20%
📉 6 regressions in unmatched functions
Unit Function Bytes Before After
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::spec_data_c::Set(void*) -59 76.63% 67.32%
d_a_door_dbdoor00/d/actor/d_a_door_dbdoor00 daDbDoor00_c::CreateHeap() -58 74.95% 63.33%
d_a_obj_brakeeff/d/actor/d_a_obj_brakeeff obj_brakeeff_1(obj_brakeeff_class*) -51 92.12% 82.99%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::CreateInit_ironball() -50 43.17% 30.00%
d_a_obj_brakeeff/d/actor/d_a_obj_brakeeff daObj_Brakeeff_Execute(obj_brakeeff_class*) -8 84.96% 81.47%
framework/d/d_com_static daObjCarry_c::chkSttsFlag(int, unsigned char) -3 81.43% 68.57%

Report for GZ2J01 (2f2f37a - c48a4ad)

[!] Report not found. Did the build succeed?


Report for RZDE01_00 (2f2f37a - c48a4ad)

📈 Matched code: 34.25% (+0.03%, +3000 bytes)

✅ 14 new matches
Unit Function Bytes Before After
d_a_obj_burnbox/d/actor/d_a_obj_burnbox daObjBurnBox_c::create1st() +22 86.03% 100.00%
d_a_door_dbdoor00/d/actor/d_a_door_dbdoor00 J3DModelData::getJointNodePointer(unsigned short) const +16 0.00% 100.00%
d_a_kytag00/d/actor/d_a_kytag00 wether_tag_efect_move(kytag00_class*) +16 99.15% 100.00%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::initBaseMtx() +8 92.00% 100.00%
framework/d/d_com_static daObjCarry_c::chkSttsFlag(int, unsigned char) +5 82.50% 100.00%
d_a_door_shutter/d/actor/d_a_door_shutter dDoor_stop_c::create(daDoor20_c*) +4 95.00% 100.00%
d_a_door_dbdoor00/d/actor/d_a_door_dbdoor00 nodeCallBack(J3DJoint*, int) +3 99.08% 100.00%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::CreateInit_ironball() +3 98.89% 100.00%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::obj_break(bool, bool, bool) +3 99.20% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::Create() +1 99.29% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::CreateHeap() +1 99.76% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::setColCommon() +1 99.72% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::ExecuteType1() +1 99.60% 100.00%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::Execute(float(**)[3][4]) +1 99.79% 100.00%
💔 1 broken match
Unit Function Bytes Before After
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::spec_data_c::Set(void*) -34 100.00% 94.21%
📈 9 improvements in unmatched functions
Unit Function Bytes Before After
d_a_passer_mng/d/actor/d_a_passer_mng daPasserMng_c::getPasserParam() +2639 35.11% 99.60%
d_a_door_dbdoor00/d/actor/d_a_door_dbdoor00 daDbDoor00_c::CreateHeap() +59 84.97% 99.86%
d_a_ep/d/actor/d_a_ep daEp_Execute(ep_class*) +12 86.28% 86.51%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::setParticle() 0 89.81% 89.86%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_tri() 0 99.98% 99.99%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_cyl() 0 99.97% 99.99%
d_a_bg_obj/d/actor/d_a_bg_obj daBgObj_c::orderWait_spec() 0 99.96% 99.99%
d_a_door_knob00/d/actor/d_a_door_knob00 daKnob20_c::CreateHeap() 0 99.88% 99.92%
d_a_ep/d/actor/d_a_ep daEp_Create(fopAc_ac_c*) 0 95.36% 95.37%
📉 2 regressions in unmatched functions
Unit Function Bytes Before After
d_a_obj_brakeeff/d/actor/d_a_obj_brakeeff daObj_Brakeeff_Execute(obj_brakeeff_class*) -6 23.47% 22.67%
d_a_obj_carry/d/actor/d_a_obj_carry daObjCarry_c::mode_proc_wait() -1 90.75% 90.56%

Report for GZ2E01 (2f2f37a - c48a4ad)

No changes

Report for ShieldD (2f2f37a - c48a4ad)

[!] Report not found. Did the build succeed?


Report for GZ2P01 (2f2f37a - c48a4ad)

[!] Report not found. Did the build succeed?

Comment on lines 88 to 90
// static const char* dummy() {
// return "spec.dat";
// }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this isnt needed then it can be removed

Comment on lines 99 to 101
/* 0x5A8 */ J3DModel* mpModelMtx[2][2];
/* 0x5B8 */ mDoExt_btkAnm* mpBtkAnmMtx[2][2];
/* 0x5C8 */ mDoExt_brkAnm* mpBrkAnmMtx[2][2];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont really like the mtx naming here as it implies its a Mtx type when its not

u8 frontOption = door_param2_c::getFrontOption(this);
u8 backOption = door_param2_c::getBackOption(this);
if (frontOption != 0) {
OS_REPORT_ERROR("両開き押しドア:表のオプション指定があります!<%d>\n", frontOption); // Double-opening push door: There are options specified on the front! <%d>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general i prefer these translation comments on the line above so that we dont get these super long lines

Comment on lines 1058 to 1059
dComIfGs_onSwitch(swBit, 0xFFFFFFFF);
dComIfGp_setItemKeyNumCount(0xFFFFFFFF);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1

i_this->field_0x572--;
i_this->field_0x5b0.SetC(i_this->current.pos);
dComIfG_Ccsp()->Set(&i_this->field_0x5b0);
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general we're using actor instead of a_this nowadays as it seems to be closer to what they did originally

Comment on lines 44 to 48
daPasserMng_Attr_c& daPasserMng_Attr_c::operator=(const daPasserMng_Attr_c& attr) {
appearance_interval = attr.appearance_interval;
npc_type = attr.npc_type;
return *this;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to exist or can it be compiler generated?

#include "SSystem/SComponent/c_math.h"
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "dol2asm.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if macros from here are needed to match, i'd prefer writing the expanded form out and adding a fake match since ideally we want to remove all dol2asm or dtk specific references in source code

}

if (i >= 16) {
OS_REPORT_ERROR("汎用オブジェノードバッファがパンク(%s %d)\n", "d_a_obj.cpp", 872); // Generic object node buffer full (%s %d)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILE

@carter-ktb21 carter-ktb21 marked this pull request as draft November 10, 2025 15:03
@carter-ktb21 carter-ktb21 marked this pull request as ready for review November 19, 2025 20:13
@TakaRikka
Copy link
Contributor

in addition to the other cleanup comments that need to be addressed, it'd be good to try to fix that broken match on wii since it was 100% before the changes here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants