Skip to content

phys, map, agl, res: match minor functions and solve trivial virtual functions - #200

Closed
jesusosx3 wants to merge 11 commits into
zeldaret:masterfrom
jesusosx3:master
Closed

jesusosx3 wants to merge 11 commits into
zeldaret:masterfrom
jesusosx3:master

Conversation

@jesusosx3

@jesusosx3 jesusosx3 commented Sep 20, 2026 •

Copy link
Copy Markdown

Summary

This PR contributes matching implementations for multiple minor ('m') functions and trivial virtual functions:

Physics (ksys::phys)

  • Match RagdollController::setBoneWeight(int, float) (0x71012ab6e0)
  • Match RagdollController::recalculateEffectiveBoneWeight(int) (0x71012ab84c)
  • Match RagdollController::setFactor(float) (0x71012ab97c)
  • Match RagdollController::resetMultipliers() (0x71012abadc)

Graphics & Utils (agl / sead)

  • Match agl::utl::IParameterObj::copyLerp (0x710125c110)
  • Match 5 curve interpolation functions in sead::HostIOCurve (0x7101373510 - 0x7101373970)

Map (ksys::map)

  • Match 4 minor functions in ksys::map::AutoPlacement (0x7100d3d52c, 0x7100d3d63c, 0x7100d3d750, 0x7100d3df6c)
  • Match ksys::map::Rail and ksys::map::RailRoute functions (Rail, RailPoint, RailRoute, RailConnectablePoint)

Actor & Quest

  • Match 24 ActorParamMgr::handleAsyncFileLoad functions, qstManager::auto0, and others
  • Match 300 trivial virtual functions across AI, Action, and Resource classes

Tools & Formatting

  • Add tools/workbench_m.py for minor function triage and diagnostics
  • Add tools/solve_trivial.py for trivial virtual function matching
  • Format all modified files with clang-format 19 according to .clang-format
  • Update data/uking_functions.csv with all matched functions (verified with tools/check)

This change is Reviewable

…ver tool

- Add tools/solve_trivial.py for automated scanning and transactional injection of trivial functions
- Add 1.6.0 to 1.5.0 downgrade patch support in tools/setup.py
- Match 89 calc_() stubs in AI and Action classes
- Match 172 isChangeable() stubs
- Match 11 hasPreDeleteCb() stubs
- Match 10 hasUpdateForPreDeleteCb() stubs
- Match 9 handleMessage_() stubs
- Match 6 oneShot_() stubs
- Match 4 isFailed() / isFinished() stubs
- Match 1 updateForPreDelete() stub
- Match ksys::res::ResourceUnit::updateStatus() in resUnit.cpp
- Update data/uking_functions.csv (matching progress reaches 30.177%)
…functions

- Add tools/workbench_m.py workbench utility for analyzing and inspecting minor 'm' functions
- Match ksys::map::Rail::Rail() (0x7100d5b20c)
- Match ksys::map::Rail::~Rail() D1 (0x7100d5b240) and D0 (0x7100d5b2e0)
- Match ksys::map::Rail::allocPoint() (0x7100d5bba4)
- Match ksys::map::RailRoute::RailRoute() (0x7100d5c92c)
- Match ksys::map::RailRoute::parse() (0x7100d5cb4c)
- Match ksys::map::RailConnectablePoint::~RailConnectablePoint() D1 (0x7100d5c308) and D0 (0x7100d5c354)
- Match ksys::map::RailRoutePoint::~RailRoutePoint() D0 (0x7100d5c7dc)
- Match ksys::res::Counter::~Counter() D0 (0x710120cbfc)
- Match ksys::res::ResourceUnit::updateStatus() (0x710120dc70)
- Match sead::SZSDecompressor::DecompContext::DecompContext() (0x710136d6b8)
- Match sead::SZSDecompressor::DecompContext::initialize() (0x710136d6d8)
- Update data/uking_functions.csv with 13 functions marked OK
- Match ksys::phys::RagdollController::setBoneWeight(int, float) (0x71012ab6e0)
- Match ksys::phys::RagdollController::recalculateEffectiveBoneWeight(int) (0x71012ab84c)
- Match ksys::phys::RagdollController::setFactor(float) (0x71012ab97c)
- Match ksys::phys::RagdollController::resetMultipliers() (0x71012abadc)
- Update data/uking_functions.csv
- Match uking::ui::PauseMenuDataMgr::getEquippedItemName(uking::ui::PouchItemType) const (0x7100979224)
- Update data/uking_functions.csv
@Pistonight

Copy link
Copy Markdown
Collaborator

Hi, thanks for the PR. This is impossible to review. Please separate the minor matching fixes to a separate PR as those don't need much scrutiny. For the rest I would recommend doing them in batches. However be advised that they are not actively being reviewed at the moment.

@Pistonight

Copy link
Copy Markdown
Collaborator

We don't use gotos and definitely not inline asm for matching with the exception of asm("")

@Pistonight

Copy link
Copy Markdown
Collaborator

Please clean up the branches and open new PRs with all non trivial inline asm and inline asm labels removed. We do not reimplements functions in asm

@Pistonight Pistonight closed this Sep 20, 2026
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