Skip to content

d_a_obj_dmelevator fully matching#2404

Merged
hatal175 merged 5 commits intozeldaret:mainfrom
TheHood-AI:main
Apr 22, 2025
Merged

d_a_obj_dmelevator fully matching#2404
hatal175 merged 5 commits intozeldaret:mainfrom
TheHood-AI:main

Conversation

@TheHood-AI
Copy link
Copy Markdown
Contributor

@TheHood-AI TheHood-AI commented Apr 21, 2025

Logic in functions should all be matching, data is not matching
Edit: The file should now be fully matching, thanks to the help of @ItsNiklas

Logic in functions should all be matching, data is not matching
@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented Apr 21, 2025

Report for GZ2E01 (9194774 - 2b81705)

📈 Matched code: 57.20% (+0.36%, +41600 bytes)
📈 Linked code: 25.63% (+0.12%, +13408 bytes)

framework/d/d_msg_class | jmessage_tMeasureProcessor::do_rubyset(const void*, unsigned long) +20 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::jmessage_tSequenceProcessor(const jmessage_tReference*, jmessage_tControl*) +31 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_begin(const void*, const char*) +993 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_end() +316 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_isReady() +1121 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_character(int) +444 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_space(unsigned long) +280 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::do_rubyset(const void*, unsigned long) +24 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::messageSePlay(unsigned char, unsigned char, cXyz*) +209 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tSequenceProcessor::calcStringLength() +196 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::jmessage_tRenderingProcessor(const jmessage_tReference*) +220 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_begin(const void*, const char*) +521 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_end() +196 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_character(int) +1705 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_tag(unsigned long, const void*, unsigned long) +2525 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_widthcenter() +225 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_selwidthcenter(int) +181 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_heightcenter() +1200 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_scale(float) +252 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_transY(short, bool) +288 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_outfont(unsigned char, unsigned long) +552 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_arrow2() +441 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_strcat(char*, bool, bool, bool) +580 bytes -> 100.00%
framework/d/d_msg_class | jmessage_tRenderingProcessor::do_rubyset(const void*, unsigned long) +28 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tReference::~jmessage_string_tReference() +92 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tMeasureProcessor::do_tag(unsigned long, const void*, unsigned long) +2969 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tMeasureProcessor::do_rubyset(const void*, unsigned long) +121 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tSequenceProcessor::jmessage_string_tSequenceProcessor(const jmessage_string_tReference*, jmessage_string_tControl*) +30 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tRenderingProcessor::do_character(int) +965 bytes -> 100.00%
framework/d/d_msg_class | jmessage_string_tRenderingProcessor::do_tag(unsigned long, const void*, unsigned long) +3165 bytes -> 100.00%
...and 69 more items

@TheHood-AI TheHood-AI changed the title d_a_obj_dmelevator partially matching d_a_obj_dmelevator fully matching Apr 21, 2025
Copy link
Copy Markdown
Contributor

@hatal175 hatal175 left a comment

Choose a reason for hiding this comment

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

Overall pretty good. Mostly just cosmetics and calls to various wrapper functions that should be the same as debug rom (unless they make you not match)

/* 80BDDD38 */ void initBaseMtx();
/* 80BDDD90 */ void setBaseMtx();
/* 80BDDEFC */ int Create();
/* 80BDDEFC */ virtual int Create() /*override*/;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I am a fan of the override keyword in c++11, I don't think we need the comment here (just not in our code standards).

UNK_BSS(1014);
UNK_BSS(1012);
UNK_BSS(1010);
UNK_BSS(1009);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use UNK_REL_BSS instead of this block


cXyz local_2c = param_2->current.pos - pthis->mXyz;
mDoMtx_YrotS(mDoMtx_stack_c::now, -param_1->current.angle.y);
PSMTXMultVec(mDoMtx_stack_c::now, &local_2c, &local_2c);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is
mDoMtx_stack_c::YrotS
mDoMtx_stack_c::multVec
(See debug rom)

if (l_push_check_pos0[2].x >= local_2c.x) {
if (l_push_check_pos0[0].z <= local_2c.z) {
if (l_push_check_pos0[2].z >= local_2c.z) {
if ((pdVar1->checkEquipHeavyBoots()) != 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unless needed for match, we usually leave functions like check* and is* without the != 0 or with ! instead of ==0

J3DModel* pmodel = j3dSys.getModel();
daObjDmElevator_c* puser_area = (daObjDmElevator_c*)pmodel->mUserArea;

PSMTXCopy(pmodel->mMtxBuffer->getAnmMtx(jnt_no), mDoMtx_stack_c::now);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cMtx_copy, mDoMtx_stack_c::get()

// NONMATCHING
if (eventInfo.mCommand == 2) {
mAction = 2;
field_0x5dc = dComIfGp_getEventManager().getMyStaffId(l_staffName, NULL, 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dComIfGp_evmng_getMyStaffId

void daObjDmElevator_c::actionEvent() {
// NONMATCHING
dEvent_manager_c& evt_manager = dComIfGp_getEventManager();
if (evt_manager.endCheck(mEventIndex) != 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dComIfGp_evmng_endCheck

/* 80BDF068-80BDF0A0 0017E8 0038+00 1/0 0/0 0/0 .text actionStartEvent__17daObjDmElevator_cFv */
void daObjDmElevator_c::actionStartEvent() {
// NONMATCHING
if ((actor_status & 0x1000) != 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fopAcM_checkStatus


/* 80BDF818-80BDF844 001F98 002C+00 1/0 0/0 0/0 .text
* daObjDmElevator_MoveBGDraw__FP17daObjDmElevator_c */
static void daObjDmElevator_MoveBGDraw(daObjDmElevator_c* i_this) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

return type should be int and should return the inside call


/* 80BDF7F8-80BDF818 001F78 0020+00 1/0 0/0 0/0 .text
* daObjDmElevator_MoveBGExecute__FP17daObjDmElevator_c */
static void daObjDmElevator_MoveBGExecute(daObjDmElevator_c* i_this) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

return type should be int and should return the inside call

This should address the feedback from the pull request review
@TheHood-AI
Copy link
Copy Markdown
Contributor Author

Thanks @hatal175 for the feedback! Should have addressed it now. I'm not too familliar with the github workflow, so I don't know if I'm the one that resolved the conversations, or you do it?

@YunataSavior
Copy link
Copy Markdown
Contributor

When you submit changes that address PR comments, those comments will be marked as automatically resolved.

@hatal175 hatal175 merged commit 1b88eae into zeldaret:main Apr 22, 2025
1 check passed
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.

4 participants