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

Changes target TURN_DAMAGED and MAX_HP to inlines #5822

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

AlexOn1ine
Copy link
Collaborator

@AlexOn1ine AlexOn1ine commented Dec 17, 2024

Merges TARGET_TURN_DAMAGED and BATTLER_TURN_DAMAGED and converts them to a static inline.

Changes BATTLER_MAX_HP to a static inline

Things to note in the release changelog:

  • When converting TARGET_TURN_DAMAGED, gBattlerTarget needs to be used as the argument. BATTLER_TURN_DAMAGED gets the corresponding argument that is passed into the macro. Same with BATTLER_MAX_HP.

Copy link
Collaborator

@Pawkkie Pawkkie left a comment

Choose a reason for hiding this comment

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

I LOVE this change, anytime we can shift macros to functions it feels like I get a pair of glasses the legibility is so much better lol

src/battle_ai_util.c Outdated Show resolved Hide resolved
@Pawkkie
Copy link
Collaborator

Pawkkie commented Dec 17, 2024

I have one more comment actually, with your release note for users. For the automated system to pick that up for the changelog, it needs to be formatted differently, as per the new PR template.

<!-- We use an automated system to generate our changelogs, so if there's something of note that our end users should know in regards to this change besides the title of this PR, they should be added here. -->
<!-- *MUST* be structured as bullet points. -->
<!-- If it doesn't apply, feel free to remove this section. -->

so could you paste this into your PR description instead

## Things to note in the release changelog:
- When converting TARGET_TURN_DAMAGED, gBattlerTarget needs to be used as the argument. BATTLER_TURN_DAMAGED gets the corresponding argument that is passed into the macro. Same with BATTLER_MAX_HP.

@Pawkkie Pawkkie merged commit a2aba3f into rh-hideout:upcoming Dec 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants