Skip to content

CARD: fill in stat offsets after CARDSetStatus - #308

Open
StilesCrisis wants to merge 1 commit into
encounter:mainfrom
StilesCrisis:card-setstatus-offsets
Open

StilesCrisis wants to merge 1 commit into
encounter:mainfrom
StilesCrisis:card-setstatus-offsets

Conversation

@StilesCrisis

Copy link
Copy Markdown

The SDK's CARDSetStatus is supposed to update CARDStat fields for the written data (offsetBanner, offsetBannerTlut, offsetIcon, offsetIconTlut, offsetData). Aurora wasn't writing these fields, so a game that read it back would get garbage bits.

It looks like a clang-tidy pass accidentally marked the field as const, which mismatches the SDK, so I've taken the const back off. Then I added a call to CARDGetStatus on success, which will populate those fields like the SDK does.

The SDK's CARDSetStatus updates the caller's CARDStat with the icon,
banner and comment offsets it computes (offsetBanner, offsetIcon,
offsetData, etc.). Games that rely on those fields after saving, for
example to copy icon data into the file, previously read stale values.
Read the committed status back into stat so it matches the SDK, and
make the stat parameter non-const again as in the SDK, since it is
written to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjpWoYqNDKkH5Zpdbz3WaW
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