From 0bdac90cfe96ea38e7fe018742362428dc745fab Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:45:13 -0500 Subject: [PATCH] Refactor mugshots (#4000) * 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 Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- .../{drake_bg.pal => blue_bg.pal} | 0 .../{phoebe_bg.pal => green_bg.pal} | 0 .../{glacia_bg.pal => pink_bg.pal} | 0 .../{sidney_bg.pal => purple_bg.pal} | 0 .../{wallace_bg.pal => yellow_bg.pal} | 0 include/battle_transition.h | 18 +- include/constants/trainers.h | 1 + include/data.h | 8 +- src/battle_setup.c | 20 +- src/battle_transition.c | 137 ++++--------- src/data.c | 1 + src/data/graphics/trainers.h | 190 +++++++++--------- src/data/trainers.h | 10 + 13 files changed, 165 insertions(+), 220 deletions(-) rename graphics/battle_transitions/{drake_bg.pal => blue_bg.pal} (100%) rename graphics/battle_transitions/{phoebe_bg.pal => green_bg.pal} (100%) rename graphics/battle_transitions/{glacia_bg.pal => pink_bg.pal} (100%) rename graphics/battle_transitions/{sidney_bg.pal => purple_bg.pal} (100%) rename graphics/battle_transitions/{wallace_bg.pal => yellow_bg.pal} (100%) diff --git a/graphics/battle_transitions/drake_bg.pal b/graphics/battle_transitions/blue_bg.pal similarity index 100% rename from graphics/battle_transitions/drake_bg.pal rename to graphics/battle_transitions/blue_bg.pal diff --git a/graphics/battle_transitions/phoebe_bg.pal b/graphics/battle_transitions/green_bg.pal similarity index 100% rename from graphics/battle_transitions/phoebe_bg.pal rename to graphics/battle_transitions/green_bg.pal diff --git a/graphics/battle_transitions/glacia_bg.pal b/graphics/battle_transitions/pink_bg.pal similarity index 100% rename from graphics/battle_transitions/glacia_bg.pal rename to graphics/battle_transitions/pink_bg.pal diff --git a/graphics/battle_transitions/sidney_bg.pal b/graphics/battle_transitions/purple_bg.pal similarity index 100% rename from graphics/battle_transitions/sidney_bg.pal rename to graphics/battle_transitions/purple_bg.pal diff --git a/graphics/battle_transitions/wallace_bg.pal b/graphics/battle_transitions/yellow_bg.pal similarity index 100% rename from graphics/battle_transitions/wallace_bg.pal rename to graphics/battle_transitions/yellow_bg.pal diff --git a/include/battle_transition.h b/include/battle_transition.h index 1e7339fa2f..eba514b09f 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -11,12 +11,12 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset); extern const struct SpritePalette gSpritePalette_Pokeball; enum { - MUGSHOT_SIDNEY, - MUGSHOT_PHOEBE, - MUGSHOT_GLACIA, - MUGSHOT_DRAKE, - MUGSHOT_CHAMPION, - MUGSHOTS_COUNT + MUGSHOT_COLOR_PURPLE, + MUGSHOT_COLOR_GREEN, + MUGSHOT_COLOR_PINK, + MUGSHOT_COLOR_BLUE, + MUGSHOT_COLOR_YELLOW, + MUGSHOT_COLOR_COUNT }; enum { @@ -32,11 +32,7 @@ enum { B_TRANSITION_WHITE_BARS_FADE, B_TRANSITION_GRID_SQUARES, B_TRANSITION_ANGLED_WIPES, - B_TRANSITION_SIDNEY, - B_TRANSITION_PHOEBE, - B_TRANSITION_GLACIA, - B_TRANSITION_DRAKE, - B_TRANSITION_CHAMPION, + B_TRANSITION_MUGSHOT, B_TRANSITION_AQUA, // Here below added in Emerald B_TRANSITION_MAGMA, B_TRANSITION_REGICE, diff --git a/include/constants/trainers.h b/include/constants/trainers.h index ff7d5b11f3..8ebfd49cab 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -108,6 +108,7 @@ #define TRAINER_PIC_LEAF 90 #define TRAINER_PIC_RS_BRENDAN 91 #define TRAINER_PIC_RS_MAY 92 +#define TRAINER_PIC_COUNT 93 // The player back pics are assumed to alternate according to the gender values (MALE/FEMALE) #define TRAINER_BACK_PIC_BRENDAN 0 diff --git a/include/data.h b/include/data.h index cce5f77503..48e0331d0d 100644 --- a/include/data.h +++ b/include/data.h @@ -35,6 +35,8 @@ struct TrainerSprite struct CompressedSpriteSheet frontPic; struct CompressedSpritePalette palette; const union AnimCmd *const *const animation; + const struct Coords16 mugshotCoords; + s16 mugshotRotation; }; struct TrainerBacksprite @@ -83,8 +85,10 @@ struct Trainer /*0x12*/ u8 trainerPic; /*0x13*/ u8 trainerName[TRAINER_NAME_LENGTH + 1]; /*0x1E*/ bool8 doubleBattle:1; - u8 padding:7; - /*0x1F*/ u8 partySize; + bool8 mugshotEnabled:1; + u8 padding:6; + /*0x1F*/ u8 mugshotColor; + /*0x20*/ u8 partySize; }; struct TrainerClass diff --git a/src/battle_setup.c b/src/battle_setup.c index 15a91112b9..1b836bc7ef 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -878,24 +878,8 @@ u8 GetTrainerBattleTransition(void) u8 enemyLevel; u8 playerLevel; - if (gTrainerBattleOpponent_A == TRAINER_SECRET_BASE) - return B_TRANSITION_CHAMPION; - - if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_ELITE_FOUR) - { - if (gTrainerBattleOpponent_A == TRAINER_SIDNEY) - return B_TRANSITION_SIDNEY; - if (gTrainerBattleOpponent_A == TRAINER_PHOEBE) - return B_TRANSITION_PHOEBE; - if (gTrainerBattleOpponent_A == TRAINER_GLACIA) - return B_TRANSITION_GLACIA; - if (gTrainerBattleOpponent_A == TRAINER_DRAKE) - return B_TRANSITION_DRAKE; - return B_TRANSITION_CHAMPION; - } - - if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_CHAMPION) - return B_TRANSITION_CHAMPION; + if (gTrainers[gTrainerBattleOpponent_A].mugshotEnabled) + return B_TRANSITION_MUGSHOT; if (gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_TEAM_MAGMA || gTrainers[gTrainerBattleOpponent_A].trainerClass == TRAINER_CLASS_MAGMA_LEADER diff --git a/src/battle_transition.c b/src/battle_transition.c index ae42db1fef..962e274ed1 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -20,6 +20,8 @@ #include "task.h" #include "trig.h" #include "util.h" +#include "battle_setup.h" +#include "data.h" #include "constants/field_effects.h" #include "constants/songs.h" #include "constants/trainers.h" @@ -107,11 +109,7 @@ static void Task_Slice(u8); static void Task_WhiteBarsFade(u8); static void Task_GridSquares(u8); static void Task_AngledWipes(u8); -static void Task_Sidney(u8); -static void Task_Phoebe(u8); -static void Task_Glacia(u8); -static void Task_Drake(u8); -static void Task_Champion(u8); +static void Task_Mugshot(u8); static void Task_Aqua(u8); static void Task_Magma(u8); static void Task_Regice(u8); @@ -259,7 +257,6 @@ static bool8 Mugshot_GradualWhiteFade(struct Task *); static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *); static bool8 Mugshot_FadeToBlack(struct Task *); static bool8 Mugshot_End(struct Task *); -static void DoMugshotTransition(u8); static void Mugshots_CreateTrainerPics(struct Task *); static void VBlankCB_Mugshots(void); static void VBlankCB_MugshotsFadeOut(void); @@ -358,11 +355,7 @@ static const TaskFunc sTasks_Main[B_TRANSITION_COUNT] = [B_TRANSITION_WHITE_BARS_FADE] = Task_WhiteBarsFade, [B_TRANSITION_GRID_SQUARES] = Task_GridSquares, [B_TRANSITION_ANGLED_WIPES] = Task_AngledWipes, - [B_TRANSITION_SIDNEY] = Task_Sidney, - [B_TRANSITION_PHOEBE] = Task_Phoebe, - [B_TRANSITION_GLACIA] = Task_Glacia, - [B_TRANSITION_DRAKE] = Task_Drake, - [B_TRANSITION_CHAMPION] = Task_Champion, + [B_TRANSITION_MUGSHOT] = Task_Mugshot, [B_TRANSITION_AQUA] = Task_Aqua, [B_TRANSITION_MAGMA] = Task_Magma, [B_TRANSITION_REGICE] = Task_Regice, @@ -541,31 +534,6 @@ static const TransitionStateFunc sMugshot_Funcs[] = Mugshot_End }; -static const u8 sMugshotsTrainerPicIDsTable[MUGSHOTS_COUNT] = -{ - [MUGSHOT_SIDNEY] = TRAINER_PIC_ELITE_FOUR_SIDNEY, - [MUGSHOT_PHOEBE] = TRAINER_PIC_ELITE_FOUR_PHOEBE, - [MUGSHOT_GLACIA] = TRAINER_PIC_ELITE_FOUR_GLACIA, - [MUGSHOT_DRAKE] = TRAINER_PIC_ELITE_FOUR_DRAKE, - [MUGSHOT_CHAMPION] = TRAINER_PIC_CHAMPION_WALLACE, -}; -static const s16 sMugshotsOpponentRotationScales[MUGSHOTS_COUNT][2] = -{ - [MUGSHOT_SIDNEY] = {0x200, 0x200}, - [MUGSHOT_PHOEBE] = {0x200, 0x200}, - [MUGSHOT_GLACIA] = {0x1B0, 0x1B0}, - [MUGSHOT_DRAKE] = {0x1A0, 0x1A0}, - [MUGSHOT_CHAMPION] = {0x188, 0x188}, -}; -static const s16 sMugshotsOpponentCoords[MUGSHOTS_COUNT][2] = -{ - [MUGSHOT_SIDNEY] = { 0, 0}, - [MUGSHOT_PHOEBE] = { 0, 0}, - [MUGSHOT_GLACIA] = {-4, 4}, - [MUGSHOT_DRAKE] = { 0, 5}, - [MUGSHOT_CHAMPION] = {-8, 7}, -}; - static const TransitionSpriteCallback sMugshotTrainerPicFuncs[] = { MugshotTrainerPic_Pause, @@ -886,21 +854,21 @@ static const u16 sFieldEffectPal_Pokeball[] = INCBIN_U16("graphics/field_effects const struct SpritePalette gSpritePalette_Pokeball = {sFieldEffectPal_Pokeball, FLDEFF_PAL_TAG_POKEBALL_TRAIL}; -static const u16 sMugshotPal_Sidney[] = INCBIN_U16("graphics/battle_transitions/sidney_bg.gbapal"); -static const u16 sMugshotPal_Phoebe[] = INCBIN_U16("graphics/battle_transitions/phoebe_bg.gbapal"); -static const u16 sMugshotPal_Glacia[] = INCBIN_U16("graphics/battle_transitions/glacia_bg.gbapal"); -static const u16 sMugshotPal_Drake[] = INCBIN_U16("graphics/battle_transitions/drake_bg.gbapal"); -static const u16 sMugshotPal_Champion[] = INCBIN_U16("graphics/battle_transitions/wallace_bg.gbapal"); +static const u16 sMugshotPal_Purple[] = INCBIN_U16("graphics/battle_transitions/purple_bg.gbapal"); +static const u16 sMugshotPal_Green[] = INCBIN_U16("graphics/battle_transitions/green_bg.gbapal"); +static const u16 sMugshotPal_Pink[] = INCBIN_U16("graphics/battle_transitions/pink_bg.gbapal"); +static const u16 sMugshotPal_Blue[] = INCBIN_U16("graphics/battle_transitions/blue_bg.gbapal"); +static const u16 sMugshotPal_Yellow[] = INCBIN_U16("graphics/battle_transitions/yellow_bg.gbapal"); static const u16 sMugshotPal_Brendan[] = INCBIN_U16("graphics/battle_transitions/brendan_bg.gbapal"); static const u16 sMugshotPal_May[] = INCBIN_U16("graphics/battle_transitions/may_bg.gbapal"); -static const u16 *const sOpponentMugshotsPals[MUGSHOTS_COUNT] = +static const u16 *const sOpponentMugshotsPals[MUGSHOT_COLOR_COUNT] = { - [MUGSHOT_SIDNEY] = sMugshotPal_Sidney, - [MUGSHOT_PHOEBE] = sMugshotPal_Phoebe, - [MUGSHOT_GLACIA] = sMugshotPal_Glacia, - [MUGSHOT_DRAKE] = sMugshotPal_Drake, - [MUGSHOT_CHAMPION] = sMugshotPal_Champion + [MUGSHOT_COLOR_PURPLE] = sMugshotPal_Purple, + [MUGSHOT_COLOR_GREEN] = sMugshotPal_Green, + [MUGSHOT_COLOR_PINK] = sMugshotPal_Pink, + [MUGSHOT_COLOR_BLUE] = sMugshotPal_Blue, + [MUGSHOT_COLOR_YELLOW] = sMugshotPal_Yellow }; static const u16 *const sPlayerMugshotsPals[GENDER_COUNT] = @@ -2235,13 +2203,11 @@ static void VBlankCB_Wave(void) #undef tX #undef tSinIndex -//---------------------------------------------------------------- -// B_TRANSITION_SIDNEY, B_TRANSITION_PHOEBE, B_TRANSITION_GLACIA, -// B_TRANSITION_DRAKE, and B_TRANSITION_CHAMPION -// -// These are all the "mugshot" transitions, where a banner shows -// the trainer pic of the player and their opponent. -//---------------------------------------------------------------- +//---------------------------------------------------- +// B_TRANSITION_MUGSHOT +// Where a banner shows the trainer pic of the player +// and their opponent. +//---------------------------------------------------- #define tSinIndex data[1] #define tTopBannerX data[2] @@ -2250,7 +2216,6 @@ static void VBlankCB_Wave(void) #define tFadeSpread data[4] #define tOpponentSpriteId data[13] #define tPlayerSpriteId data[14] -#define tMugshotId data[15] // Sprite data for trainer sprites in mugshots #define sState data[0] @@ -2259,37 +2224,7 @@ static void VBlankCB_Wave(void) #define sDone data[6] #define sSlideDir data[7] -static void Task_Sidney(u8 taskId) -{ - gTasks[taskId].tMugshotId = MUGSHOT_SIDNEY; - DoMugshotTransition(taskId); -} - -static void Task_Phoebe(u8 taskId) -{ - gTasks[taskId].tMugshotId = MUGSHOT_PHOEBE; - DoMugshotTransition(taskId); -} - -static void Task_Glacia(u8 taskId) -{ - gTasks[taskId].tMugshotId = MUGSHOT_GLACIA; - DoMugshotTransition(taskId); -} - -static void Task_Drake(u8 taskId) -{ - gTasks[taskId].tMugshotId = MUGSHOT_DRAKE; - DoMugshotTransition(taskId); -} - -static void Task_Champion(u8 taskId) -{ - gTasks[taskId].tMugshotId = MUGSHOT_CHAMPION; - DoMugshotTransition(taskId); -} - -static void DoMugshotTransition(u8 taskId) +static void Task_Mugshot(u8 taskId) { while (sMugshot_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } @@ -2322,12 +2257,17 @@ static bool8 Mugshot_SetGfx(struct Task *task) { s16 i, j; u16 *tilemap, *tileset; - const u16 *mugshotsMap; + const u16 *mugshotsMap = sMugshotsTilemap; + u8 mugshotColor = gTrainers[gTrainerBattleOpponent_A].mugshotColor; + - mugshotsMap = sMugshotsTilemap; GetBg0TilesDst(&tilemap, &tileset); CpuSet(sEliteFour_Tileset, tileset, 0xF0); - LoadPalette(sOpponentMugshotsPals[task->tMugshotId], BG_PLTT_ID(15), PLTT_SIZE_4BPP); + + if (mugshotColor >= ARRAY_COUNT(sOpponentMugshotsPals)) + mugshotColor = MUGSHOT_COLOR_PURPLE; + + LoadPalette(sOpponentMugshotsPals[mugshotColor], 0xF0, 0x20); LoadPalette(sPlayerMugshotsPals[gSaveBlock2Ptr->playerGender], BG_PLTT_ID(15) + 10, PLTT_SIZEOF(6)); for (i = 0; i < 20; i++) @@ -2578,11 +2518,16 @@ static void Mugshots_CreateTrainerPics(struct Task *task) { struct Sprite *opponentSprite, *playerSprite; - s16 mugshotId = task->tMugshotId; - task->tOpponentSpriteId = CreateTrainerSprite(sMugshotsTrainerPicIDsTable[mugshotId], - sMugshotsOpponentCoords[mugshotId][0] - 32, - sMugshotsOpponentCoords[mugshotId][1] + 42, + u8 trainerPicId = gTrainers[gTrainerBattleOpponent_A].trainerPic; + s16 opponentRotationScales = 0; + + gReservedSpritePaletteCount = 10; + task->tOpponentSpriteId = CreateTrainerSprite(trainerPicId, + gTrainerSprites[trainerPicId].mugshotCoords.x - 32, + gTrainerSprites[trainerPicId].mugshotCoords.y + 42, 0, gDecompressionBuffer); + gReservedSpritePaletteCount = 12; + task->tPlayerSpriteId = CreateTrainerSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), DISPLAY_WIDTH + 32, 106, @@ -2609,7 +2554,10 @@ static void Mugshots_CreateTrainerPics(struct Task *task) CalcCenterToCornerVec(opponentSprite, SPRITE_SHAPE(64x32), SPRITE_SIZE(64x32), ST_OAM_AFFINE_DOUBLE); CalcCenterToCornerVec(playerSprite, SPRITE_SHAPE(64x32), SPRITE_SIZE(64x32), ST_OAM_AFFINE_DOUBLE); - SetOamMatrixRotationScaling(opponentSprite->oam.matrixNum, sMugshotsOpponentRotationScales[mugshotId][0], sMugshotsOpponentRotationScales[mugshotId][1], 0); + opponentRotationScales = gTrainerSprites[trainerPicId].mugshotRotation; + + SetOamMatrixRotationScaling(opponentSprite->oam.matrixNum, opponentRotationScales, opponentRotationScales, 0); + SetOamMatrixRotationScaling(playerSprite->oam.matrixNum, -512, 512, 0); } @@ -2706,7 +2654,6 @@ static s16 IsTrainerPicSlideDone(s16 spriteId) #undef tFadeSpread #undef tOpponentSpriteId #undef tPlayerSpriteId -#undef tMugshotId //-------------------- // B_TRANSITION_SLICE diff --git a/src/data.c b/src/data.c index 5b8dc6148d..daf04cac8b 100644 --- a/src/data.c +++ b/src/data.c @@ -3,6 +3,7 @@ #include "battle.h" #include "data.h" #include "graphics.h" +#include "battle_transition.h" #include "constants/abilities.h" #include "constants/items.h" #include "constants/moves.h" diff --git a/src/data/graphics/trainers.h b/src/data/graphics/trainers.h index 57269f0723..e20d13ec16 100644 --- a/src/data/graphics/trainers.h +++ b/src/data/graphics/trainers.h @@ -296,110 +296,112 @@ static const union AnimCmd *const sAnims_Trainer[] ={ sAnim_GeneralFrame0, }; -#define TRAINER_SPRITE(trainerPic, file) \ +#define TRAINER_SPRITE(trainerPic, file, x, y, rotation) \ [TRAINER_PIC_##trainerPic] = \ { \ .y_offset = 8, \ .frontPic = {gTrainerFrontPic_##file, TRAINER_PIC_SIZE, TRAINER_PIC_##trainerPic},\ .palette = {gTrainerPalette_##file, TRAINER_PIC_##trainerPic}, \ .animation = sAnims_Trainer, \ + .mugshotCoords = {x, y}, \ + .mugshotRotation = rotation, \ } const struct TrainerSprite gTrainerSprites[] = { - TRAINER_SPRITE(HIKER, Hiker), - TRAINER_SPRITE(AQUA_GRUNT_M, AquaGruntM), - TRAINER_SPRITE(POKEMON_BREEDER_F, PokemonBreederF), - TRAINER_SPRITE(COOLTRAINER_M, CoolTrainerM), - TRAINER_SPRITE(BIRD_KEEPER, BirdKeeper), - TRAINER_SPRITE(COLLECTOR, Collector), - TRAINER_SPRITE(AQUA_GRUNT_F, AquaGruntF), - TRAINER_SPRITE(SWIMMER_M, SwimmerM), - TRAINER_SPRITE(MAGMA_GRUNT_M, MagmaGruntM), - TRAINER_SPRITE(EXPERT_M, ExpertM), - TRAINER_SPRITE(AQUA_ADMIN_M, AquaAdminM), - TRAINER_SPRITE(BLACK_BELT, BlackBelt), - TRAINER_SPRITE(AQUA_ADMIN_F, AquaAdminF), - TRAINER_SPRITE(AQUA_LEADER_ARCHIE, AquaLeaderArchie), - TRAINER_SPRITE(HEX_MANIAC, HexManiac), - TRAINER_SPRITE(AROMA_LADY, AromaLady), - TRAINER_SPRITE(RUIN_MANIAC, RuinManiac), - TRAINER_SPRITE(INTERVIEWER, Interviewer), - TRAINER_SPRITE(TUBER_F, TuberF), - TRAINER_SPRITE(TUBER_M, TuberM), - TRAINER_SPRITE(COOLTRAINER_F, CoolTrainerF), - TRAINER_SPRITE(LADY, Lady), - TRAINER_SPRITE(BEAUTY, Beauty), - TRAINER_SPRITE(RICH_BOY, RichBoy), - TRAINER_SPRITE(EXPERT_F, ExpertF), - TRAINER_SPRITE(POKEMANIAC, Pokemaniac), - TRAINER_SPRITE(MAGMA_GRUNT_F, MagmaGruntF), - TRAINER_SPRITE(GUITARIST, Guitarist), - TRAINER_SPRITE(KINDLER, Kindler), - TRAINER_SPRITE(CAMPER, Camper), - TRAINER_SPRITE(PICNICKER, Picnicker), - TRAINER_SPRITE(BUG_MANIAC, BugManiac), - TRAINER_SPRITE(POKEMON_BREEDER_M, PokemonBreederM), - TRAINER_SPRITE(PSYCHIC_M, PsychicM), - TRAINER_SPRITE(PSYCHIC_F, PsychicF), - TRAINER_SPRITE(GENTLEMAN, Gentleman), - TRAINER_SPRITE(ELITE_FOUR_SIDNEY, EliteFourSidney), - TRAINER_SPRITE(ELITE_FOUR_PHOEBE, EliteFourPhoebe), - TRAINER_SPRITE(ELITE_FOUR_GLACIA, EliteFourGlacia), - TRAINER_SPRITE(ELITE_FOUR_DRAKE, EliteFourDrake), - TRAINER_SPRITE(LEADER_ROXANNE, LeaderRoxanne), - TRAINER_SPRITE(LEADER_BRAWLY, LeaderBrawly), - TRAINER_SPRITE(LEADER_WATTSON, LeaderWattson), - TRAINER_SPRITE(LEADER_FLANNERY, LeaderFlannery), - TRAINER_SPRITE(LEADER_NORMAN, LeaderNorman), - TRAINER_SPRITE(LEADER_WINONA, LeaderWinona), - TRAINER_SPRITE(LEADER_TATE_AND_LIZA, LeaderTateAndLiza), - TRAINER_SPRITE(LEADER_JUAN, LeaderJuan), - TRAINER_SPRITE(SCHOOL_KID_M, SchoolKidM), - TRAINER_SPRITE(SCHOOL_KID_F, SchoolKidF), - TRAINER_SPRITE(SR_AND_JR, SrAndJr), - TRAINER_SPRITE(POKEFAN_M, PokefanM), - TRAINER_SPRITE(POKEFAN_F, PokefanF), - TRAINER_SPRITE(YOUNGSTER, Youngster), - TRAINER_SPRITE(CHAMPION_WALLACE, ChampionWallace), - TRAINER_SPRITE(FISHERMAN, Fisherman), - TRAINER_SPRITE(CYCLING_TRIATHLETE_M, CyclingTriathleteM), - TRAINER_SPRITE(CYCLING_TRIATHLETE_F, CyclingTriathleteF), - TRAINER_SPRITE(RUNNING_TRIATHLETE_M, RunningTriathleteM), - TRAINER_SPRITE(RUNNING_TRIATHLETE_F, RunningTriathleteF), - TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, SwimmingTriathleteM), - TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, SwimmingTriathleteF), - TRAINER_SPRITE(DRAGON_TAMER, DragonTamer), - TRAINER_SPRITE(NINJA_BOY, NinjaBoy), - TRAINER_SPRITE(BATTLE_GIRL, BattleGirl), - TRAINER_SPRITE(PARASOL_LADY, ParasolLady), - TRAINER_SPRITE(SWIMMER_F, SwimmerF), - TRAINER_SPRITE(TWINS, Twins), - TRAINER_SPRITE(SAILOR, Sailor), - TRAINER_SPRITE(MAGMA_ADMIN, MagmaAdmin), - TRAINER_SPRITE(WALLY, Wally), - TRAINER_SPRITE(BRENDAN, Brendan), - TRAINER_SPRITE(MAY, May), - TRAINER_SPRITE(BUG_CATCHER, BugCatcher), - TRAINER_SPRITE(POKEMON_RANGER_M, PokemonRangerM), - TRAINER_SPRITE(POKEMON_RANGER_F, PokemonRangerF), - TRAINER_SPRITE(MAGMA_LEADER_MAXIE, MagmaLeaderMaxie), - TRAINER_SPRITE(LASS, Lass), - TRAINER_SPRITE(YOUNG_COUPLE, YoungCouple), - TRAINER_SPRITE(OLD_COUPLE, OldCouple), - TRAINER_SPRITE(SIS_AND_BRO, SisAndBro), - TRAINER_SPRITE(STEVEN, Steven), - TRAINER_SPRITE(SALON_MAIDEN_ANABEL, SalonMaidenAnabel), - TRAINER_SPRITE(DOME_ACE_TUCKER, DomeAceTucker), - TRAINER_SPRITE(PALACE_MAVEN_SPENSER, PalaceMavenSpenser), - TRAINER_SPRITE(ARENA_TYCOON_GRETA, ArenaTycoonGreta), - TRAINER_SPRITE(FACTORY_HEAD_NOLAND, FactoryHeadNoland), - TRAINER_SPRITE(PIKE_QUEEN_LUCY, PikeQueenLucy), - TRAINER_SPRITE(PYRAMID_KING_BRANDON, PyramidKingBrandon), - TRAINER_SPRITE(RED, Red), - TRAINER_SPRITE(LEAF, Leaf), - TRAINER_SPRITE(RS_BRENDAN, RubySapphireBrendan), - TRAINER_SPRITE(RS_MAY, RubySapphireMay), + TRAINER_SPRITE(HIKER, Hiker, 0, 0, 0x200), + TRAINER_SPRITE(AQUA_GRUNT_M, AquaGruntM, 0, 0, 0x200), + TRAINER_SPRITE(POKEMON_BREEDER_F, PokemonBreederF, 0, 0, 0x200), + TRAINER_SPRITE(COOLTRAINER_M, CoolTrainerM, 0, 0, 0x200), + TRAINER_SPRITE(BIRD_KEEPER, BirdKeeper, 0, 0, 0x200), + TRAINER_SPRITE(COLLECTOR, Collector, 0, 0, 0x200), + TRAINER_SPRITE(AQUA_GRUNT_F, AquaGruntF, 0, 0, 0x200), + TRAINER_SPRITE(SWIMMER_M, SwimmerM, 0, 0, 0x200), + TRAINER_SPRITE(MAGMA_GRUNT_M, MagmaGruntM, 0, 0, 0x200), + TRAINER_SPRITE(EXPERT_M, ExpertM, 0, 0, 0x200), + TRAINER_SPRITE(AQUA_ADMIN_M, AquaAdminM, 0, 0, 0x200), + TRAINER_SPRITE(BLACK_BELT, BlackBelt, 0, 0, 0x200), + TRAINER_SPRITE(AQUA_ADMIN_F, AquaAdminF, 0, 0, 0x200), + TRAINER_SPRITE(AQUA_LEADER_ARCHIE, AquaLeaderArchie, 0, 0, 0x200), + TRAINER_SPRITE(HEX_MANIAC, HexManiac, 0, 0, 0x200), + TRAINER_SPRITE(AROMA_LADY, AromaLady, 0, 0, 0x200), + TRAINER_SPRITE(RUIN_MANIAC, RuinManiac, 0, 0, 0x200), + TRAINER_SPRITE(INTERVIEWER, Interviewer, 0, 0, 0x200), + TRAINER_SPRITE(TUBER_F, TuberF, 0, 0, 0x200), + TRAINER_SPRITE(TUBER_M, TuberM, 0, 0, 0x200), + TRAINER_SPRITE(COOLTRAINER_F, CoolTrainerF, 0, 0, 0x200), + TRAINER_SPRITE(LADY, Lady, 0, 0, 0x200), + TRAINER_SPRITE(BEAUTY, Beauty, 0, 0, 0x200), + TRAINER_SPRITE(RICH_BOY, RichBoy, 0, 0, 0x200), + TRAINER_SPRITE(EXPERT_F, ExpertF, 0, 0, 0x200), + TRAINER_SPRITE(POKEMANIAC, Pokemaniac, 0, 0, 0x200), + TRAINER_SPRITE(MAGMA_GRUNT_F, MagmaGruntF, 0, 0, 0x200), + TRAINER_SPRITE(GUITARIST, Guitarist, 0, 0, 0x200), + TRAINER_SPRITE(KINDLER, Kindler, 0, 0, 0x200), + TRAINER_SPRITE(CAMPER, Camper, 0, 0, 0x200), + TRAINER_SPRITE(PICNICKER, Picnicker, 0, 0, 0x200), + TRAINER_SPRITE(BUG_MANIAC, BugManiac, 0, 0, 0x200), + TRAINER_SPRITE(POKEMON_BREEDER_M, PokemonBreederM, 0, 0, 0x200), + TRAINER_SPRITE(PSYCHIC_M, PsychicM, 0, 0, 0x200), + TRAINER_SPRITE(PSYCHIC_F, PsychicF, 0, 0, 0x200), + TRAINER_SPRITE(GENTLEMAN, Gentleman, 0, 0, 0x200), + TRAINER_SPRITE(ELITE_FOUR_SIDNEY, EliteFourSidney, 0, 0, 0x200), + TRAINER_SPRITE(ELITE_FOUR_PHOEBE, EliteFourPhoebe, 0, 0, 0x200), + TRAINER_SPRITE(ELITE_FOUR_GLACIA, EliteFourGlacia, -4, 4, 0x1B0), + TRAINER_SPRITE(ELITE_FOUR_DRAKE, EliteFourDrake, 0, 5, 0x1A0), + TRAINER_SPRITE(LEADER_ROXANNE, LeaderRoxanne, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_BRAWLY, LeaderBrawly, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_WATTSON, LeaderWattson, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_FLANNERY, LeaderFlannery, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_NORMAN, LeaderNorman, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_WINONA, LeaderWinona, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_TATE_AND_LIZA, LeaderTateAndLiza, 0, 0, 0x200), + TRAINER_SPRITE(LEADER_JUAN, LeaderJuan, 0, 0, 0x200), + TRAINER_SPRITE(SCHOOL_KID_M, SchoolKidM, 0, 0, 0x200), + TRAINER_SPRITE(SCHOOL_KID_F, SchoolKidF, 0, 0, 0x200), + TRAINER_SPRITE(SR_AND_JR, SrAndJr, 0, 0, 0x200), + TRAINER_SPRITE(POKEFAN_M, PokefanM, 0, 0, 0x200), + TRAINER_SPRITE(POKEFAN_F, PokefanF, 0, 0, 0x200), + TRAINER_SPRITE(YOUNGSTER, Youngster, 0, 0, 0x200), + TRAINER_SPRITE(CHAMPION_WALLACE, ChampionWallace, -8, 7, 0x188), + TRAINER_SPRITE(FISHERMAN, Fisherman, 0, 0, 0x200), + TRAINER_SPRITE(CYCLING_TRIATHLETE_M, CyclingTriathleteM, 0, 0, 0x200), + TRAINER_SPRITE(CYCLING_TRIATHLETE_F, CyclingTriathleteF, 0, 0, 0x200), + TRAINER_SPRITE(RUNNING_TRIATHLETE_M, RunningTriathleteM, 0, 0, 0x200), + TRAINER_SPRITE(RUNNING_TRIATHLETE_F, RunningTriathleteF, 0, 0, 0x200), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, SwimmingTriathleteM, 0, 0, 0x200), + TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, SwimmingTriathleteF, 0, 0, 0x200), + TRAINER_SPRITE(DRAGON_TAMER, DragonTamer, 0, 0, 0x200), + TRAINER_SPRITE(NINJA_BOY, NinjaBoy, 0, 0, 0x200), + TRAINER_SPRITE(BATTLE_GIRL, BattleGirl, 0, 0, 0x200), + TRAINER_SPRITE(PARASOL_LADY, ParasolLady, 0, 0, 0x200), + TRAINER_SPRITE(SWIMMER_F, SwimmerF, 0, 0, 0x200), + TRAINER_SPRITE(TWINS, Twins, 0, 0, 0x200), + TRAINER_SPRITE(SAILOR, Sailor, 0, 0, 0x200), + TRAINER_SPRITE(MAGMA_ADMIN, MagmaAdmin, 0, 0, 0x200), + TRAINER_SPRITE(WALLY, Wally, 0, 0, 0x200), + TRAINER_SPRITE(BRENDAN, Brendan, 0, 0, 0x200), + TRAINER_SPRITE(MAY, May, 0, 0, 0x200), + TRAINER_SPRITE(BUG_CATCHER, BugCatcher, 0, 0, 0x200), + TRAINER_SPRITE(POKEMON_RANGER_M, PokemonRangerM, 0, 0, 0x200), + TRAINER_SPRITE(POKEMON_RANGER_F, PokemonRangerF, 0, 0, 0x200), + TRAINER_SPRITE(MAGMA_LEADER_MAXIE, MagmaLeaderMaxie, 0, 0, 0x200), + TRAINER_SPRITE(LASS, Lass, 0, 0, 0x200), + TRAINER_SPRITE(YOUNG_COUPLE, YoungCouple, 0, 0, 0x200), + TRAINER_SPRITE(OLD_COUPLE, OldCouple, 0, 0, 0x200), + TRAINER_SPRITE(SIS_AND_BRO, SisAndBro, 0, 0, 0x200), + TRAINER_SPRITE(STEVEN, Steven, 0, 7, 0x188), + TRAINER_SPRITE(SALON_MAIDEN_ANABEL, SalonMaidenAnabel, 0, 0, 0x200), + TRAINER_SPRITE(DOME_ACE_TUCKER, DomeAceTucker, 0, 0, 0x200), + TRAINER_SPRITE(PALACE_MAVEN_SPENSER, PalaceMavenSpenser, 0, 0, 0x200), + TRAINER_SPRITE(ARENA_TYCOON_GRETA, ArenaTycoonGreta, 0, 0, 0x200), + TRAINER_SPRITE(FACTORY_HEAD_NOLAND, FactoryHeadNoland, 0, 0, 0x200), + TRAINER_SPRITE(PIKE_QUEEN_LUCY, PikeQueenLucy, 0, 0, 0x200), + TRAINER_SPRITE(PYRAMID_KING_BRANDON, PyramidKingBrandon, 0, 0, 0x200), + TRAINER_SPRITE(RED, Red, 0, 0, 0x200), + TRAINER_SPRITE(LEAF, Leaf, 0, 0, 0x200), + TRAINER_SPRITE(RS_BRENDAN, RubySapphireBrendan, 0, 0, 0x200), + TRAINER_SPRITE(RS_MAY, RubySapphireMay, 0, 0, 0x200), }; static const union AnimCmd sAnimCmd_Hoenn[] = diff --git a/src/data/trainers.h b/src/data/trainers.h index 7a34223b85..433cac517e 100644 --- a/src/data/trainers.h +++ b/src/data/trainers.h @@ -3140,6 +3140,8 @@ const struct Trainer gTrainers[] = { .trainerName = _("SIDNEY"), .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, + .mugshotEnabled = TRUE, + .mugshotColor = MUGSHOT_COLOR_PURPLE, .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY | AI_FLAG_SETUP_FIRST_TURN, .party = TRAINER_PARTY(sParty_Sidney), }, @@ -3152,6 +3154,8 @@ const struct Trainer gTrainers[] = { .trainerName = _("PHOEBE"), .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, + .mugshotEnabled = TRUE, + .mugshotColor = MUGSHOT_COLOR_GREEN, .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY, .party = TRAINER_PARTY(sParty_Phoebe), }, @@ -3164,6 +3168,8 @@ const struct Trainer gTrainers[] = { .trainerName = _("GLACIA"), .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, + .mugshotEnabled = TRUE, + .mugshotColor = MUGSHOT_COLOR_PINK, .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY, .party = TRAINER_PARTY(sParty_Glacia), }, @@ -3176,6 +3182,8 @@ const struct Trainer gTrainers[] = { .trainerName = _("DRAKE"), .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_NONE, ITEM_NONE}, .doubleBattle = FALSE, + .mugshotEnabled = TRUE, + .mugshotColor = MUGSHOT_COLOR_BLUE, .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY, .party = TRAINER_PARTY(sParty_Drake), }, @@ -4028,6 +4036,8 @@ const struct Trainer gTrainers[] = { .trainerName = _("WALLACE"), .items = {ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE, ITEM_FULL_RESTORE}, .doubleBattle = FALSE, + .mugshotEnabled = TRUE, + .mugshotColor = MUGSHOT_COLOR_YELLOW, .aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY, .party = TRAINER_PARTY(sParty_Wallace), },