Clean up redundancy for mugshots (#5906)
This commit is contained in:
parent
af19b13195
commit
3db351359a
@ -11,6 +11,7 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset);
|
||||
extern const struct SpritePalette gSpritePalette_Pokeball;
|
||||
|
||||
enum {
|
||||
MUGSHOT_COLOR_NONE,
|
||||
MUGSHOT_COLOR_PURPLE,
|
||||
MUGSHOT_COLOR_GREEN,
|
||||
MUGSHOT_COLOR_PINK,
|
||||
|
||||
@ -88,7 +88,7 @@ struct Trainer
|
||||
/*0x12*/ u8 trainerPic;
|
||||
/*0x13*/ u8 trainerName[TRAINER_NAME_LENGTH + 1];
|
||||
/*0x1E*/ bool8 doubleBattle:1;
|
||||
bool8 mugshotEnabled:1;
|
||||
bool8 padding:1;
|
||||
u8 startingStatus:6; // this trainer starts a battle with a given status. see include/constants/battle.h for values
|
||||
/*0x1F*/ u8 mugshotColor;
|
||||
/*0x20*/ u8 partySize;
|
||||
@ -235,7 +235,7 @@ static inline const u8 GetTrainerPartySizeFromId(u16 trainerId)
|
||||
|
||||
static inline const bool32 DoesTrainerHaveMugshot(u16 trainerId)
|
||||
{
|
||||
return gTrainers[SanitizeTrainerId(trainerId)].mugshotEnabled;
|
||||
return gTrainers[SanitizeTrainerId(trainerId)].mugshotColor;
|
||||
}
|
||||
|
||||
static inline const u8 GetTrainerMugshotColorFromId(u16 trainerId)
|
||||
|
||||
2329
src/data/trainers.h
2329
src/data/trainers.h
File diff suppressed because it is too large
Load Diff
@ -1705,7 +1705,6 @@ static void fprint_trainers(const char *output_path, FILE *f, struct Parsed *par
|
||||
if (!is_empty_string(trainer->mugshot))
|
||||
{
|
||||
fprintf(f, "#line %d\n", trainer->mugshot_line);
|
||||
fprintf(f, " .mugshotEnabled = TRUE,\n");
|
||||
fprintf(f, " .mugshotColor = ");
|
||||
fprint_constant(f, "MUGSHOT_COLOR", trainer->mugshot);
|
||||
fprintf(f, ",\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user