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

Improve EUR address handling #727

Merged
merged 5 commits into from
May 3, 2024
Merged

Improve EUR address handling #727

merged 5 commits into from
May 3, 2024

Conversation

Kewlan
Copy link
Collaborator

@Kewlan Kewlan commented Apr 27, 2024

  • Combine linker scripts

Pass _EUR_ to linker script when building EUR patch and use built-in function DEFINED to determine the address.

  • Use macro for game addresses in C code

Takes the USA address and when building for EUR, adds the necessary offset.
I decided to wrap all references to game addresses in it, and also remove the *_addr defines for consistency.

Copy link
Collaborator

@HylianFreddy HylianFreddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on this, I just have a couple of suggestions/changes which I put in the comments (and also on this branch if you prefer: https://github.com/HylianFreddy/OoT3D_Randomizer/commits/region-addr)

I also have a question, should all base game addresses be wrapped within the macro? Some still aren't, but it doesn't really change anything so it's fine either way.
I found 43 with this regex: \)0x[a-f,A-F,0-9]{6}

code/include/z3D/z3D.h Outdated Show resolved Hide resolved
code/Makefile Outdated Show resolved Hide resolved
code/oot.ld Outdated Show resolved Hide resolved
@Kewlan
Copy link
Collaborator Author

Kewlan commented Apr 28, 2024

@HylianFreddy Excellent suggestions! And thanks for the commits!

@Kewlan Kewlan merged commit 81ee937 into gamestabled:main May 3, 2024
2 checks passed
@Kewlan Kewlan deleted the region-addr branch May 3, 2024 18:44
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.

2 participants