Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Alignment for Map Events #649

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

Kurausukun
Copy link
Contributor

As we discovered, map event scripts must be aligned to 4 bytes; this happens naturally in vanilla, so there were never any explicit alignment directives added, but when using the modern linkerscript, there is no such guarantee. The alignment is now guaranteed in two places: both at the start of the overall map event data blob and at the start of each map events.inc file. Theoretically, just aligning the data blob should be enough to ensure alignment for every map script, so this may be excessive, but it could be helpful if someone does some weird unlikely change down the line (though I fail to think of a use case that would necessitate such a change).

@jack-jjm
Copy link

confirmed to fix the problem on my machine (can interact with objects in pallet town house, etc)

data/map_events.s Outdated Show resolved Hide resolved
@GriffinRichards GriffinRichards merged commit 7df4038 into pret:master Nov 21, 2023
1 check passed
ShadowXeldron added a commit to ShadowXeldron/pokefirered-xeldromix that referenced this pull request Nov 30, 2023
Ensure Alignment for Map Events (pret#649)
lucasrsa pushed a commit to lucasrsa/pokefirered that referenced this pull request Dec 12, 2023
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.

3 participants