Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order compilation units according to retail, match and align Score class #1271

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

foxtacles
Copy link
Member

@foxtacles foxtacles commented Dec 24, 2024

This PR introduces an initial order that is based on roadmap. It's not necessarily the final order and we probably need to refactor several units, but it's a good start.

I've also taken on the very first class found in the binary, Score, matched the remaining functions (mostly Score::Paint) and verified that our recompiled Score class now aligns exactly with the original, using roadmap:

0001:00000000   0001:00000000          0  fun  110     Score::Score
0001:00000070   0001:00000070          0  fun  25      MxEntity::Create
0001:00000090   0001:00000090          0  fun  10      LegoEntity::SetWorldSpeed
0001:000000a0   0001:000000a0          0  fun  1       LegoWorld::VTable0x60
0001:000000b0   0001:000000b0          0  fun  3       Score::VTable0x5c
0001:000000c0   0001:000000c0          0  fun  6       Score::ClassName
0001:000000d0   0001:000000d0          0  fun  266     Score::IsA
0001:000001e0   0001:000001e0          0  fun  30      Score::`scalar deleting destructor'
0001:00000200   0001:00000200          0  fun  159     Score::~Score
0001:000002a0   0001:000002a0          0  fun  148     Score::Create
0001:00000340   0001:00000340          0  fun  202     Score::DeleteScript
0001:00000410   0001:00000410          0  fun  244     Score::Notify
0001:00000510   0001:00000510          0  fun  110     Score::FUN_10001510
0001:00000580   0001:00000580          0  fun  326     Score::ReadyWorld
0001:000006d0   0001:000006d0          0  fun  688     Score::FUN_100016d0
0001:00000980   0001:00000980          0  fun  73      Score::Enable
0001:000009d0   0001:000009d0          0  fun  744     Score::Paint
0001:00000cc0   0001:00000cc0          0  fun  90      _Tree<char const *,pair<char const * const,LegoTextureInfo *>,map<char const *,LegoTextureInfo *,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Kfn,LegoContainerInfoComparator,allocator<LegoTextureInfo *> >::_Lbound
0001:00000d20   0001:00000d20          0  fun  275     Score::FillArea
0001:00000e40   0001:00000e40          0  fun  22      Score::Escape

The following unit, Helicopter, will be trickier since it contains swathes of inline functions, including Vector/Matrix

@foxtacles foxtacles changed the title Initially order compilation units according to retail, match and align Score class Order compilation units according to retail, match and align Score class Dec 24, 2024
Copy link
Member

@Ramen2X Ramen2X left a comment

Choose a reason for hiding this comment

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

Awesome work! It'll be interesting to see how this affects entropy going forward.

@foxtacles foxtacles merged commit 7c41ff4 into isledecomp:master Dec 24, 2024
12 checks passed
@foxtacles foxtacles deleted the score-order branch December 24, 2024 18:38
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