Skip to content

Match two PAL timed object-parameter accessors - #65

Open
Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-object-parameters
Open

Sumaiter wants to merge 1 commit into
OpenRAC:mainfrom
Sumaiter:decomp/pal-object-parameters

Conversation

@Sumaiter

@Sumaiter Sumaiter commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Adds matching C for the PAL object-parameter setter func_00489498 (120 bytes) and getter func_00489510 (64 bytes), sharing a partial state layout. The setter uses the supplied value/duration and sets the dirty flag only when flag 0x20 is enabled and the duration is positive; otherwise it resets the value to 1.0 and the duration to zero. The getter returns 1.0 when the state is absent or the flag is disabled. Both retain the original null-state behavior.

Validation:

  • Compiled both final sources through the repository's SN compiler and tools/cc.sh: 184 bytes match PAL retail at their catalogue addresses.
  • Independently resolved both call relocations to retail address 0x00476ED0, including object addends. The partial structure retains offsets 0x00, 0x0C, 0x104 and 0x108.
  • Added only the two verified PAL map rows and corresponding US other rows, preserving every previous row. Regenerated reports/README; the US report is semantically unchanged.
  • Both versions of tools/progress.py --check, both versions of tools/match_map.py --check, and git diff --check pass.

The existing repository sources were compiled in an earlier contribution's full compilation run; these two final sources were compiled and verified separately. No US retail image is available locally, so global US match/relocation audits were not run. No retail data, disassembly, toolchain files or SDK sources are included.

Based directly on upstream main, independently of the other open contributions. This PR adds two functions / 184 bytes to the PAL baseline of 5,138 / 396,888; its report records 5,140 / 397,072.

Reconstruct the flag-gated setter and getter, including the original
duration reset, default value and dirty-flag behavior.

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