forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor mugshots #4000
Merged
Merged
Refactor mugshots #4000
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The battle mugshot transitions have been merged into the one transition id and are now loaded depending on the trainer data. Two new fields have been added to struct Trainer; mugshotEnabled and mugshotColor. mugshotEnabled is the toggle for loading the mugshot transition when set to TRUE and mugshotColor is the color of the mugshot for that particular trainer. The Elite Four and Champion have been updated so their mugshots are correctly loaded when you battle them. A bug has also been fixed where if the player starts on a tile that has an active field effect, the player's sprite will use the palette of the opponent's sprite.
The two look ups for the opponent rotation scaling and coords have been put into their own files and added into this new folder. The coords look up has also been changed to use the struct.
include/data.h
Outdated
Comment on lines
88
to
91
/*0x19*/ bool8 mugshotEnabled; | ||
/*0x1A*/ u8 mugshotColor; | ||
u8 padding:7; | ||
/*0x1F*/ u8 partySize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
/*0x19*/ bool8 mugshotEnabled; | |
/*0x1A*/ u8 mugshotColor; | |
u8 padding:7; | |
/*0x1F*/ u8 partySize; | |
bool8 mugshotEnabled:1; | |
u8 padding:6; | |
/*0x1F*/ u8 partySize; | |
/*0x20*/ u8 mugshotColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
AlexOn1ine
reviewed
Jan 15, 2024
AlexOn1ine
approved these changes
Jan 15, 2024
Pawkkie
pushed a commit
to Pawkkie/pokeemerald-expansion
that referenced
this pull request
May 16, 2024
* Refactor battle mugshots The battle mugshot transitions have been merged into the one transition id and are now loaded depending on the trainer data. Two new fields have been added to struct Trainer; mugshotEnabled and mugshotColor. mugshotEnabled is the toggle for loading the mugshot transition when set to TRUE and mugshotColor is the color of the mugshot for that particular trainer. The Elite Four and Champion have been updated so their mugshots are correctly loaded when you battle them. A bug has also been fixed where if the player starts on a tile that has an active field effect, the player's sprite will use the palette of the opponent's sprite. * Added a new folder in src/data named battle_transitions. The two look ups for the opponent rotation scaling and coords have been put into their own files and added into this new folder. The coords look up has also been changed to use the struct. * Fixed errors with modern that were preventing compile * Added mugshot coords to gTrainerSprites * Added rotation scales to gTrainerSprites * Replaced tabs with spaces * Incorporated comments * Added battle_transition include back to data.c * Fixed alignment issues in Mugshots_CreateTrainerPics --------- Co-authored-by: pkmnsnfrn <[email protected]> Co-authored-by: Alex <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR applies ShinyDragonHunter's changes for allowing any trainer to have an Elite Four/Wallace-style pre-battle mugshot
Discord contact info
Frankfurter0