Skip to content

Move functions across and inside TUs to better match link order - #231

Merged
leoetlino merged 5 commits into
zeldaret:masterfrom
leoetlino:stack/03f-definition-moves
Oct 18, 2026
Merged

leoetlino merged 5 commits into
zeldaret:masterfrom
leoetlino:stack/03f-definition-moves

Conversation

@leoetlino

@leoetlino leoetlino commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

This change is Reviewable

calc_ goes before leave_ in ForceSetCameraPos and InWaterSelForkASPlay,
and RailRoute's dtor goes after getCheckPointName (an unnamed row
there is likely its D0).

BaseProcJobHandler's ctor is linked right before BaseProc's ctor, so it
moves into actBaseProc.cpp, and the class moves into actBaseProc.h so
that its declaration stays with its definition.

(AI assisted using Claude Opus 5.5)
calcHash is linked between AwarenessInstance's sinit and the next one,
together with two AwarenessSourcePool helpers and the job queue
functions of Awareness::Unk1, so it's a shared helper rather than an
Awareness member, declared in the new file's own header.
actAwareness.cpp calls this 4-byte function out of line, so it's likely
not defined there. The file name sorts between actAwarenessInstance and
the sensor files, which is where it is linked.

(AI assisted using Claude Opus 5.5)
They're linked before gameStageInfo.cpp's sinit with no other sinit
in between, so they belong to gameStageInfo, not gameScene, and become
StageInfo statics declared in gameStageInfo.h. Their GameScene owner
was a guess.

(AI assisted using Claude Opus 5.5)
Most of these helpers have nothing to do with StaticCompound: they look
up material masks and collision filter info from shapes and collidables.
physUtil also fits the link order, between physUserTag and physWorld,
and it's what the function groups already call this block.

(AI assisted using Claude Opus 5.5)
motionTypeFromText isn't part of physDefines: its "Keyframed" string
(only used there) sits between the StaticCompound and PlayReport strings
in .rodata, far from physDefines' enum text, and the function is linked
right after the contact listener's inline virtuals, so it most likely
starts a new TU at 0x7100fd069c.

Nothing separates it from getMaterialMaskFromShape and the other helpers
in physUtil, so it goes in the same file and its declaration moves to
physUtil.h. That part is a guess: neither function has data that would
show a boundary.

(AI assisted using Claude Opus 5.5)
@leoetlino
leoetlino marked this pull request as draft October 18, 2026 15:46
@leoetlino
leoetlino force-pushed the stack/03f-definition-moves branch 2 times, most recently from 1284683 to ef164cc Compare October 18, 2026 16:51
@leoetlino
leoetlino marked this pull request as ready for review October 18, 2026 16:54
@leoetlino
leoetlino merged commit d928a29 into zeldaret:master Oct 18, 2026
4 checks passed
snrubrm added a commit to snrubrm/botw that referenced this pull request Oct 20, 2026
Import the data changes from upstream e78c024..8f0334a (zeldaret#231-zeldaret#233) where they fit this fork's rows.
12,992 unimplemented or symbol-equivalent rows take upstream's names, from the IDB and other games' symbols.
Havok is marked as an excluded library (7,518 rows U to L; the 209 Havok rows already O, m or M here are kept),
libcurl comes back into scope (368 rows L to U) and the new decodeSZSNxAsm64_ row is added.
Rows upstream bound to functions the code already implements are taken where the symbol is defined here and
not bound elsewhere. With the names in line, 48 rows now match (3,776 bytes), including that new row.
Implemented rows keep their names when ours differ, since they must match our symbols; upstream's rebinding
swaps (such as sead::ControllerWrapper at 0x7100b1ac54) and its O to U fixes are left for review. The datarefs known entry for the FixedSafeString<63> vtable now covers only its deleting dtor.
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.

1 participant