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

Refactor mugshots #4000

Merged
merged 10 commits into from
Jan 15, 2024
Merged

Refactor mugshots #4000

merged 10 commits into from
Jan 15, 2024

Conversation

fdeblasio
Copy link

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

pkmnsnfrn and others added 6 commits January 14, 2024 21:02
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;

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;

Copy link
Author

Choose a reason for hiding this comment

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

Done!

src/data.c Show resolved Hide resolved
@AlexOn1ine AlexOn1ine merged commit 0bdac90 into rh-hideout:upcoming Jan 15, 2024
1 check passed
@fdeblasio fdeblasio deleted the refactorMugshots branch January 16, 2024 02:45
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants