Skip to content

Match three PAL 2D point transforms - #60

Open
Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-point-transforms
Open

Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-point-transforms

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Adds matching C for the PAL routines that translate, scale and rotate arrays of 2D points. All three traverse the array backwards; the rotation routine retains the original order of its two angle-helper calls and floating-point operations.

PAL function Behavior Matched bytes
func_0044B7E0 Translate points 60
func_0044B820 Scale points 60
func_0044B860 Rotate points using the existing angle helpers 152

The shared PalPoint2D type contains two floats. The C was reconstructed from the retail executable, without SDK sources, headers, inline assembly or compiler-output patches.

Validation:

  • Compiled each final source through the repository's SN compiler and tools/cc.sh pipeline and compared it against the PAL catalogue address and retail bytes: 3 matches, 272 bytes. Translation and scaling match without relocation masking.
  • Independently resolved both rotation call relocations to retail targets 0x00454158 and 0x00454140, including object addends.
  • Added only the three verified PAL map rows and their US other rows, preserving every existing map row. Regenerated the progress reports and README; the US report is semantically unchanged.
  • Both tools/progress.py --check and tools/progress.py --version pal --check pass, as does git diff --check.

This is targeted PAL validation. A full repository rebuild and global relocation audit were not run; no US retail image is available locally. No retail data, disassembly or toolchain files are included.

Based directly on upstream main, independently of #57, #58 and #59. This PR adds three functions to the upstream PAL baseline of 5,138 matched functions / 396,888 bytes; its report therefore records 5,141 / 397,160. Source files do not overlap the currently open PAL contribution PRs.

Reconstruct translation, scaling and rotation loops from SCES_532.85.
Share the two-float point layout and record targeted PAL matches.

Co-Authored-By: Codex <noreply@openai.com>
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