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

Use BANK("Trainer Sight") to apply to all four possible functions in the "Trainer Sight" section #444

Merged
merged 3 commits into from
Dec 24, 2023

Conversation

Vortyne
Copy link
Contributor

@Vortyne Vortyne commented Dec 23, 2023

Four functions reach this bank switch but the bank references only one of the labels, so use an assertion to prevent messing up by splitting the functions

Copy link
Member

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

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

It's not unusual to switch to a bank and rely on multiple functions to be in it; these generally don't have asserts. Instead, since they're all in engine/overworld/trainer_sight.asm, you could use the section name of that file: ld b, BANK("Trainer Sight").

Copy link
Member

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

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

ld b, BANK("Trainer Sight")

home/trainers.asm Outdated Show resolved Hide resolved
@Rangi42 Rangi42 changed the title New assertion since the bank is assumed to be the same Use BANK("Trainer Sight") to apply to all four possible functions in the "Trainer Sight" section Dec 24, 2023
@Rangi42 Rangi42 merged commit 0b20304 into pret:master Dec 24, 2023
1 check passed
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.

None yet

2 participants