Skip to content

Decompiling MapObjectUnkLTRW - #142

Merged
Yanis002 merged 20 commits into
zeldaret:mainfrom
Mityno:MapObjectUnkLTRW
Aug 25, 2026
Merged

Decompiling MapObjectUnkLTRW#142
Yanis002 merged 20 commits into
zeldaret:mainfrom
Mityno:MapObjectUnkLTRW

Conversation

@Mityno

@Mityno Mityno commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Also cleanup on some ov063 actors :<)

@decomp-dev

decomp-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

Report for eur1 (db8e927 - 1053725)

No changes

Report for jp (db8e927 - 1053725)

📈 Matched code: 8.51% (+0.02%, +1064 bytes)
📈 Matched data: 32.46% (+0.04%, +472 bytes)

✅ 16 new matches
Unit Item Bytes Before After
src/063_Shrine/MapObject/MapObjectUnkLTRW .data +208 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_28(int, int, int) +196 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectProfileUnkLTRW::MapObjectProfileUnkLTRW() +169 18.98% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::MapObjectUnkLTRW() +125 20.31% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW .bss +114 57.14% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_00() +92 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_1C(ActorRef, int, VecFx32*) +52 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW .init +51 60.34% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW __sinit_MapObjectUnkLTRW.cpp +51 60.34% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW UnkStruct_ov063_021639e4::vfunc2_04() +36 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_14() +32 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_08() +28 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d18(int) +28 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::~MapObjectUnkLTRW() +12 62.50% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::~MapObjectUnkLTRW() +12 70.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectProfileUnkLTRW::Create() +1 99.78% 100.00%
📉 7 regressions in unmatched items
Unit Item Bytes Before After
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160cc8() -3 14.29% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160ce4() -3 7.69% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d18() -3 14.29% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160e18() -3 10.56% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160c6c() -1 1.74% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d34() -1 0.82% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160df8() -1 5.00% 0.00%

Report for eur (db8e927 - 1053725)

📈 Matched code: 8.56% (+0.02%, +1064 bytes)
📈 Matched data: 32.48% (+0.04%, +472 bytes)

✅ 16 new matches
Unit Item Bytes Before After
src/063_Shrine/MapObject/MapObjectUnkLTRW .data +208 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_28(int, int, int) +196 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectProfileUnkLTRW::MapObjectProfileUnkLTRW() +169 18.98% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::MapObjectUnkLTRW() +125 20.31% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW .bss +114 57.14% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_00() +92 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_1C(ActorRef, int, VecFx32*) +52 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW .init +51 60.34% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW __sinit_MapObjectUnkLTRW.cpp +51 60.34% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW UnkStruct_ov063_021639e4::vfunc2_04() +36 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_14() +32 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::vfunc_08() +28 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d18(int) +28 0.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::~MapObjectUnkLTRW() +12 62.50% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::~MapObjectUnkLTRW() +12 70.00% 100.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectProfileUnkLTRW::Create() +1 99.78% 100.00%
📉 7 regressions in unmatched items
Unit Item Bytes Before After
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160cc8() -3 14.29% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160ce4() -3 7.69% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d18() -3 14.29% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160e18() -3 10.56% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160c6c() -1 1.74% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160d34() -1 0.82% 0.00%
src/063_Shrine/MapObject/MapObjectUnkLTRW MapObjectUnkLTRW::func_ov063_02160df8() -1 5.00% 0.00%

Report for usa (db8e927 - 1053725)

No changes

@Mityno

Mityno commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

For some damn reason, I cannot complete this because of some vtable order...
image
Welp, anyway

@Mityno
Mityno marked this pull request as ready for review August 22, 2026 21:48
Comment thread src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp Outdated
@Yanis002

Copy link
Copy Markdown
Collaborator

For some damn reason, I cannot complete this because of some vtable order... image Welp, anyway

are you sure the base vtable has the exact same number of vfuncs? I think it might work if you remove at least one

@Mityno

Mityno commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

For some damn reason, I cannot complete this because of some vtable order... image Welp, anyway

are you sure the base vtable has the exact same number of vfuncs? I think it might work if you remove at least one

Well I overrode none, so I don't see a way to put any less. The Base does inherit 4 vfuncs from MapObjectProfile_Derived2, and the actual profile then only defines Create.
Also in ghidra it looks very much right: 8 first empty bytes, and then 4 bytes for the Create=0 from the initial definition, then the other inherited vfuncs. Say I'd remove the 4 blank bytes for Create, then there would be a hole in the data (and the Profile Create would end up at the end of the vfuncs I believe)
The one thing I wasn't sure about is the placement of mUnk_D4 so I tried to move it (I believe there was a reason for putting it in the base), but the Profile ctor broke so I reverted.

Also I checked, the symbol delink looks right to me (the Base vtable is above the Profile's one, so anyway my compiled ordering is wrong).

Co-authored-by: Yanis <35189056+Yanis002@users.noreply.github.com>
@Yanis002

Copy link
Copy Markdown
Collaborator

this has merge conflicts now

@Mityno
Mityno marked this pull request as draft August 24, 2026 13:17
@Mityno
Mityno marked this pull request as ready for review August 24, 2026 13:32
@Yanis002

Copy link
Copy Markdown
Collaborator

I'm sorry about the conflicts, it shouldn't be too long though I think

@Yanis002
Yanis002 merged commit 939c492 into zeldaret:main Aug 25, 2026
5 checks 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.

2 participants