HarbourMasters / HarbourMasters/Torch
OoT support follow-up work
- Dominant language
- C++
- Stars
- 36
- Forks
- 50
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 6
Description
Tracking issue for follow-up work deferred out of #219 (OoT support). Grouped here to start; can be split into sub-issues as any of these get picked up.
These were held back from #219 because landing OoT support first meant matching the existing Shipwright/OTRExporter reference O2R byte-for-byte, and some of these cleanups might involve changing the generated O2R. Now that OoT support has landed, we're no longer pinned to reproducing the old zapd output — so if a cleaner approach here does change the O2R, we're free to change it (and update the ports to match) rather than being constrained to match the reference.
### 1. DisplayListFactory::SearchVtx — reuse Torch's VTX factory
From https://github.com/HarbourMasters/Torch/pull/219#discussion_r3057050029
> would using Torch's own VTX factory remove the need for [`OoT::DListHelpers` in `DisplayListFactory::SearchVtx`]?
### 2. Move OoT VTX off the OOT ARRAY type onto the shared VTX format
From https://github.com/HarbourMasters/Torch/pull/219#discussion_r3167762149
Move from an OOT `ARRAY` of type `VTX` to the standard shared `VTX` format. Related to #1.
### 3. Reevaluate the alias system
From https://github.com/HarbourMasters/Torch/pull/219#discussion_r3057124529
See if we still need the alias system, or whether having different `bhash` values for the same data in different paths is something we can work with instead.
### 4. Drop the CRC-swap logic
From https://github.com/HarbourMasters/Torch/pull/219#discussion_r3057039609
See what it'd take to fully drop the "swap the CRC" logic — i.e. which ports currently rely on the swapping. Currently gated behind the `ROM_CRC_BSWAP` compile flag.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the deferred work in #219 and its linked discussions, then inspect DisplayListFactory::SearchVtx, OoT::DListHelpers, the shared VTX format, the alias system, and ROM_CRC_BSWAP usage across the ports. Split the investigation into focused sub-issues; done means each decision is documented, affected generated O2R output is updated where needed, and the ports match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100