diff --git a/include/constants/trainers.h b/include/constants/trainers.h index 48d4f081e..a017b6975 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -956,13 +956,13 @@ #define FACILITY_CLASS_HIKER 0x0 #define FACILITY_CLASS_TEAM_AQUA_1 0x1 #define FACILITY_CLASS_PKMN_BREEDER_1 0x2 -#define FACILITY_CLASS_COOLTRAINER_1 0x3 +#define FACILITY_CLASS_COOLTRAINER_M 0x3 #define FACILITY_CLASS_BIRD_KEEPER 0x4 #define FACILITY_CLASS_COLLECTOR 0x5 #define FACILITY_CLASS_TEAM_AQUA_2 0x6 #define FACILITY_CLASS_SWIMMER_M 0x7 #define FACILITY_CLASS_TEAM_MAGMA_1 0x8 -#define FACILITY_CLASS_EXPERT_1 0x9 +#define FACILITY_CLASS_EXPERT_M 0x9 #define FACILITY_CLASS_BLACK_BELT 0xa #define FACILITY_CLASS_AQUA_LEADER 0xb #define FACILITY_CLASS_HEX_MANIAC 0xc @@ -971,7 +971,7 @@ #define FACILITY_CLASS_INTERVIEWER 0xf #define FACILITY_CLASS_TUBER_1 0x10 #define FACILITY_CLASS_TUBER_2 0x11 -#define FACILITY_CLASS_COOLTRAINER_2 0x12 +#define FACILITY_CLASS_COOLTRAINER_F 0x12 #define FACILITY_CLASS_LADY 0x13 #define FACILITY_CLASS_BEAUTY 0x14 #define FACILITY_CLASS_RICH_BOY 0x15 @@ -983,16 +983,16 @@ #define FACILITY_CLASS_CAMPER 0x1b #define FACILITY_CLASS_PICNICKER 0x1c #define FACILITY_CLASS_BUG_MANIAC 0x1d -#define FACILITY_CLASS_PSYCHIC_1 0x1e -#define FACILITY_CLASS_PSYCHIC_2 0x1f +#define FACILITY_CLASS_PSYCHIC_M 0x1e +#define FACILITY_CLASS_PSYCHIC_F 0x1f #define FACILITY_CLASS_GENTLEMAN 0x20 #define FACILITY_CLASS_ELITE_FOUR_1 0x21 #define FACILITY_CLASS_ELITE_FOUR_2 0x22 #define FACILITY_CLASS_LEADER_1 0x23 #define FACILITY_CLASS_LEADER_2 0x24 #define FACILITY_CLASS_LEADER_3 0x25 -#define FACILITY_CLASS_SCHOOL_KID_1 0x26 -#define FACILITY_CLASS_SCHOOL_KID_2 0x27 +#define FACILITY_CLASS_SCHOOL_KID_M 0x26 +#define FACILITY_CLASS_SCHOOL_KID_F 0x27 #define FACILITY_CLASS_SR_AND_JR 0x28 #define FACILITY_CLASS_POKEFAN_1 0x29 #define FACILITY_CLASS_POKEFAN_2 0x2a @@ -1013,28 +1013,28 @@ #define FACILITY_CLASS_TWINS 0x39 #define FACILITY_CLASS_SAILOR 0x3a #define FACILITY_CLASS_PKMN_TRAINER_1 0x3b -#define FACILITY_CLASS_PKMN_TRAINER_2 0x3c +#define FACILITY_CLASS_PKMN_TRAINER_MAY 0x3c #define FACILITY_CLASS_PKMN_TRAINER_3 0x3d #define FACILITY_CLASS_PKMN_TRAINER_4 0x3e -#define FACILITY_CLASS_PKMN_TRAINER_5 0x3f +#define FACILITY_CLASS_PKMN_TRAINER_BRENDAN 0x3f #define FACILITY_CLASS_PKMN_TRAINER_6 0x40 #define FACILITY_CLASS_PKMN_TRAINER_7 0x41 #define FACILITY_CLASS_PKMN_BREEDER_2 0x42 #define FACILITY_CLASS_BUG_CATCHER 0x43 -#define FACILITY_CLASS_PKMN_RANGER_1 0x44 -#define FACILITY_CLASS_PKMN_RANGER_2 0x45 +#define FACILITY_CLASS_PKMN_RANGER_M 0x44 +#define FACILITY_CLASS_PKMN_RANGER_F 0x45 #define FACILITY_CLASS_MAGMA_LEADER 0x46 #define FACILITY_CLASS_LASS 0x47 #define FACILITY_CLASS_YOUNG_COUPLE 0x48 #define FACILITY_CLASS_OLD_COUPLE 0x49 #define FACILITY_CLASS_SIS_AND_BRO 0x4a -#define FACILITY_CLASS_PKMN_TRAINER_8 0x4b +#define FACILITY_CLASS_PKMN_TRAINER_STEVEN 0x4b #define FACILITY_CLASS_SALON_MAIDEN 0x4c #define FACILITY_CLASS_DOME_ACE 0x4d -#define FACILITY_CLASS_PKMN_TRAINER_9 0x4e -#define FACILITY_CLASS_PKMN_TRAINER_10 0x4f -#define FACILITY_CLASS_PKMN_TRAINER_11 0x50 -#define FACILITY_CLASS_PKMN_TRAINER_12 0x51 +#define FACILITY_CLASS_PKMN_TRAINER_RED 0x4e +#define FACILITY_CLASS_PKMN_TRAINER_LEAF 0x4f +#define FACILITY_CLASS_PKMN_TRAINER_RS_BRENDAN 0x50 +#define FACILITY_CLASS_PKMN_TRAINER_RS_MAY 0x51 #define TRAINER_CLASS_PKMN_TRAINER_1 0x0 #define TRAINER_CLASS_PKMN_TRAINER_2 0x1 diff --git a/include/data/pokemon/trainer_class_lookups.h b/include/data/pokemon/trainer_class_lookups.h index 2ffe9cd85..ec4dbf0fb 100644 --- a/include/data/pokemon/trainer_class_lookups.h +++ b/include/data/pokemon/trainer_class_lookups.h @@ -6,13 +6,13 @@ const u8 gFacilityClassToPicIndex[] = TRAINER_PIC_HIKER, // FACILITY_CLASS_HIKER TRAINER_PIC_AQUA_GRUNT_M, // FACILITY_CLASS_TEAM_AQUA_1 TRAINER_PIC_POKEMON_BREEDER_F, // FACILITY_CLASS_PKMN_BREEDER_1 - TRAINER_PIC_COOL_TRAINER_M, // FACILITY_CLASS_COOLTRAINER_1 + TRAINER_PIC_COOL_TRAINER_M, // FACILITY_CLASS_COOLTRAINER_M TRAINER_PIC_BIRD_KEEPER, // FACILITY_CLASS_BIRD_KEEPER TRAINER_PIC_COLLECTOR, // FACILITY_CLASS_COLLECTOR TRAINER_PIC_AQUA_GRUNT_F, // FACILITY_CLASS_TEAM_AQUA_2 TRAINER_PIC_SWIMMER_M, // FACILITY_CLASS_SWIMMER_M TRAINER_PIC_MAGMA_GRUNT_M, // FACILITY_CLASS_TEAM_MAGMA_1 - TRAINER_PIC_EXPERT_M, // FACILITY_CLASS_EXPERT_1 + TRAINER_PIC_EXPERT_M, // FACILITY_CLASS_EXPERT_M TRAINER_PIC_BLACK_BELT, // FACILITY_CLASS_BLACK_BELT TRAINER_PIC_AQUA_LEADER_ARCHIE, // FACILITY_CLASS_AQUA_LEADER TRAINER_PIC_HEX_MANIAC, // FACILITY_CLASS_HEX_MANIAC @@ -21,7 +21,7 @@ const u8 gFacilityClassToPicIndex[] = TRAINER_PIC_INTERVIEWER, // FACILITY_CLASS_INTERVIEWER TRAINER_PIC_TUBER_F, // FACILITY_CLASS_TUBER_1 TRAINER_PIC_TUBER_M, // FACILITY_CLASS_TUBER_2 - TRAINER_PIC_COOL_TRAINER_F, // FACILITY_CLASS_COOLTRAINER_2 + TRAINER_PIC_COOL_TRAINER_F, // FACILITY_CLASS_COOLTRAINER_F TRAINER_PIC_LADY, // FACILITY_CLASS_LADY TRAINER_PIC_BEAUTY, // FACILITY_CLASS_BEAUTY TRAINER_PIC_RICH_BOY, // FACILITY_CLASS_RICH_BOY @@ -33,16 +33,16 @@ const u8 gFacilityClassToPicIndex[] = TRAINER_PIC_CAMPER, // FACILITY_CLASS_CAMPER TRAINER_PIC_PICNICKER, // FACILITY_CLASS_PICNICKER TRAINER_PIC_BUG_MANIAC, // FACILITY_CLASS_BUG_MANIAC - TRAINER_PIC_PSYCHIC_M, // FACILITY_CLASS_PSYCHIC_1 - TRAINER_PIC_PSYCHIC_F, // FACILITY_CLASS_PSYCHIC_2 + TRAINER_PIC_PSYCHIC_M, // FACILITY_CLASS_PSYCHIC_M + TRAINER_PIC_PSYCHIC_F, // FACILITY_CLASS_PSYCHIC_F TRAINER_PIC_GENTLEMAN, // FACILITY_CLASS_GENTLEMAN TRAINER_PIC_ELITE_FOUR_SIDNEY, // FACILITY_CLASS_ELITE_FOUR_1 TRAINER_PIC_ELITE_FOUR_PHOEBE, // FACILITY_CLASS_ELITE_FOUR_2 TRAINER_PIC_LEADER_ROXANNE, // FACILITY_CLASS_LEADER_1 TRAINER_PIC_LEADER_BRAWLY, // FACILITY_CLASS_LEADER_2 TRAINER_PIC_LEADER_TATE_AND_LIZA, // FACILITY_CLASS_LEADER_3 - TRAINER_PIC_SCHOOL_KID_M, // FACILITY_CLASS_SCHOOL_KID_1 - TRAINER_PIC_SCHOOL_KID_F, // FACILITY_CLASS_SCHOOL_KID_2 + TRAINER_PIC_SCHOOL_KID_M, // FACILITY_CLASS_SCHOOL_KID_M + TRAINER_PIC_SCHOOL_KID_F, // FACILITY_CLASS_SCHOOL_KID_F TRAINER_PIC_SR_AND_JR, // FACILITY_CLASS_SR_AND_JR TRAINER_PIC_WINSTRATE_M, // FACILITY_CLASS_POKEFAN_1 TRAINER_PIC_WINSTRATE_F, // FACILITY_CLASS_POKEFAN_2 @@ -63,28 +63,28 @@ const u8 gFacilityClassToPicIndex[] = TRAINER_PIC_TWINS, // FACILITY_CLASS_TWINS TRAINER_PIC_SAILOR, // FACILITY_CLASS_SAILOR TRAINER_PIC_WALLY, // FACILITY_CLASS_PKMN_TRAINER_1 - TRAINER_PIC_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_2 + TRAINER_PIC_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_MAY TRAINER_PIC_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_3 TRAINER_PIC_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_4 - TRAINER_PIC_MAY, // FACILITY_CLASS_PKMN_TRAINER_5 + TRAINER_PIC_MAY, // FACILITY_CLASS_PKMN_TRAINER_BRENDAN TRAINER_PIC_MAY, // FACILITY_CLASS_PKMN_TRAINER_6 TRAINER_PIC_MAY, // FACILITY_CLASS_PKMN_TRAINER_7 TRAINER_PIC_POKEMON_BREEDER_M, // FACILITY_CLASS_PKMN_BREEDER_2 TRAINER_PIC_BUG_CATCHER, // FACILITY_CLASS_BUG_CATCHER - TRAINER_PIC_POKEMON_RANGER_M, // FACILITY_CLASS_PKMN_RANGER_1 - TRAINER_PIC_POKEMON_RANGER_F, // FACILITY_CLASS_PKMN_RANGER_2 + TRAINER_PIC_POKEMON_RANGER_M, // FACILITY_CLASS_PKMN_RANGER_M + TRAINER_PIC_POKEMON_RANGER_F, // FACILITY_CLASS_PKMN_RANGER_F TRAINER_PIC_MAGMA_LEADER_MAXIE, // FACILITY_CLASS_MAGMA_LEADER TRAINER_PIC_LASS, // FACILITY_CLASS_LASS TRAINER_PIC_YOUNG_COUPLE, // FACILITY_CLASS_YOUNG_COUPLE TRAINER_PIC_OLD_COUPLE, // FACILITY_CLASS_OLD_COUPLE TRAINER_PIC_SIS_AND_BRO, // FACILITY_CLASS_SIS_AND_BRO - TRAINER_PIC_STEVEN, // FACILITY_CLASS_PKMN_TRAINER_8 + TRAINER_PIC_STEVEN, // FACILITY_CLASS_PKMN_TRAINER_STEVEN TRAINER_PIC_SALON_MAIDEN_ANABEL, // FACILITY_CLASS_SALON_MAIDEN TRAINER_PIC_DOME_ACE_TUCKER, // FACILITY_CLASS_DOME_ACE - TRAINER_PIC_RED, // FACILITY_CLASS_PKMN_TRAINER_9 - TRAINER_PIC_LEAF, // FACILITY_CLASS_PKMN_TRAINER_10 - TRAINER_PIC_RUBY_SAPPHIRE_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_11 - TRAINER_PIC_RUBY_SAPPHIRE_MAY, // FACILITY_CLASS_PKMN_TRAINER_12 + TRAINER_PIC_RED, // FACILITY_CLASS_PKMN_TRAINER_RED + TRAINER_PIC_LEAF, // FACILITY_CLASS_PKMN_TRAINER_LEAF + TRAINER_PIC_RUBY_SAPPHIRE_BRENDAN, // FACILITY_CLASS_PKMN_TRAINER_RS_BRENDAN + TRAINER_PIC_RUBY_SAPPHIRE_MAY, // FACILITY_CLASS_PKMN_TRAINER_RS_MAY }; const u8 gFacilityClassToTrainerClass[] = @@ -92,13 +92,13 @@ const u8 gFacilityClassToTrainerClass[] = TRAINER_CLASS_HIKER, // FACILITY_CLASS_HIKER TRAINER_CLASS_TEAM_AQUA, // FACILITY_CLASS_TEAM_AQUA_1 TRAINER_CLASS_PKMN_BREEDER, // FACILITY_CLASS_PKMN_BREEDER_1 - TRAINER_CLASS_COOLTRAINER_1, // FACILITY_CLASS_COOLTRAINER_1 + TRAINER_CLASS_COOLTRAINER_1, // FACILITY_CLASS_COOLTRAINER_M TRAINER_CLASS_BIRD_KEEPER, // FACILITY_CLASS_BIRD_KEEPER TRAINER_CLASS_COLLECTOR, // FACILITY_CLASS_COLLECTOR TRAINER_CLASS_TEAM_AQUA, // FACILITY_CLASS_TEAM_AQUA_2 TRAINER_CLASS_SWIMMER_M, // FACILITY_CLASS_SWIMMER_M TRAINER_CLASS_TEAM_MAGMA, // FACILITY_CLASS_TEAM_MAGMA_1 - TRAINER_CLASS_EXPERT, // FACILITY_CLASS_EXPERT_1 + TRAINER_CLASS_EXPERT, // FACILITY_CLASS_EXPERT_M TRAINER_CLASS_BLACK_BELT, // FACILITY_CLASS_BLACK_BELT TRAINER_CLASS_AQUA_LEADER, // FACILITY_CLASS_AQUA_LEADER TRAINER_CLASS_HEX_MANIAC, // FACILITY_CLASS_HEX_MANIAC @@ -107,7 +107,7 @@ const u8 gFacilityClassToTrainerClass[] = TRAINER_CLASS_INTERVIEWER, // FACILITY_CLASS_INTERVIEWER TRAINER_CLASS_TUBER_1, // FACILITY_CLASS_TUBER_1 TRAINER_CLASS_TUBER_2, // FACILITY_CLASS_TUBER_2 - TRAINER_CLASS_COOLTRAINER_1, // FACILITY_CLASS_COOLTRAINER_2 + TRAINER_CLASS_COOLTRAINER_1, // FACILITY_CLASS_COOLTRAINER_F TRAINER_CLASS_LADY, // FACILITY_CLASS_LADY TRAINER_CLASS_BEAUTY, // FACILITY_CLASS_BEAUTY TRAINER_CLASS_RICH_BOY, // FACILITY_CLASS_RICH_BOY @@ -119,16 +119,16 @@ const u8 gFacilityClassToTrainerClass[] = TRAINER_CLASS_CAMPER, // FACILITY_CLASS_CAMPER TRAINER_CLASS_PICNICKER, // FACILITY_CLASS_PICNICKER TRAINER_CLASS_BUG_MANIAC, // FACILITY_CLASS_BUG_MANIAC - TRAINER_CLASS_PSYCHIC, // FACILITY_CLASS_PSYCHIC_1 - TRAINER_CLASS_PSYCHIC, // FACILITY_CLASS_PSYCHIC_2 + TRAINER_CLASS_PSYCHIC, // FACILITY_CLASS_PSYCHIC_M + TRAINER_CLASS_PSYCHIC, // FACILITY_CLASS_PSYCHIC_F TRAINER_CLASS_GENTLEMAN, // FACILITY_CLASS_GENTLEMAN TRAINER_CLASS_ELITE_FOUR, // FACILITY_CLASS_ELITE_FOUR_1 TRAINER_CLASS_ELITE_FOUR, // FACILITY_CLASS_ELITE_FOUR_2 TRAINER_CLASS_LEADER, // FACILITY_CLASS_LEADER_1 TRAINER_CLASS_LEADER, // FACILITY_CLASS_LEADER_2 TRAINER_CLASS_LEADER, // FACILITY_CLASS_LEADER_3 - TRAINER_CLASS_SCHOOL_KID, // FACILITY_CLASS_SCHOOL_KID_1 - TRAINER_CLASS_SCHOOL_KID, // FACILITY_CLASS_SCHOOL_KID_2 + TRAINER_CLASS_SCHOOL_KID, // FACILITY_CLASS_SCHOOL_KID_M + TRAINER_CLASS_SCHOOL_KID, // FACILITY_CLASS_SCHOOL_KID_F TRAINER_CLASS_SR_AND_JR, // FACILITY_CLASS_SR_AND_JR TRAINER_CLASS_POKEFAN, // FACILITY_CLASS_POKEFAN_1 TRAINER_CLASS_POKEFAN, // FACILITY_CLASS_POKEFAN_2 @@ -149,28 +149,28 @@ const u8 gFacilityClassToTrainerClass[] = TRAINER_CLASS_TWINS, // FACILITY_CLASS_TWINS TRAINER_CLASS_SAILOR, // FACILITY_CLASS_SAILOR TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_1 - TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_2 + TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_MAY TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_3 TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_4 - TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_5 + TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_BRENDAN TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_6 TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_7 TRAINER_CLASS_PKMN_BREEDER, // FACILITY_CLASS_PKMN_BREEDER_2 TRAINER_CLASS_BUG_CATCHER, // FACILITY_CLASS_BUG_CATCHER - TRAINER_CLASS_PKMN_RANGER, // FACILITY_CLASS_PKMN_RANGER_1 - TRAINER_CLASS_PKMN_RANGER, // FACILITY_CLASS_PKMN_RANGER_2 + TRAINER_CLASS_PKMN_RANGER, // FACILITY_CLASS_PKMN_RANGER_M + TRAINER_CLASS_PKMN_RANGER, // FACILITY_CLASS_PKMN_RANGER_F TRAINER_CLASS_MAGMA_LEADER, // FACILITY_CLASS_MAGMA_LEADER TRAINER_CLASS_LASS, // FACILITY_CLASS_LASS TRAINER_CLASS_YOUNG_COUPLE, // FACILITY_CLASS_YOUNG_COUPLE TRAINER_CLASS_OLD_COUPLE, // FACILITY_CLASS_OLD_COUPLE TRAINER_CLASS_SIS_AND_BRO, // FACILITY_CLASS_SIS_AND_BRO - TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_8 + TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_STEVEN TRAINER_CLASS_SALON_MAIDEN, // FACILITY_CLASS_SALON_MAIDEN TRAINER_CLASS_DOME_ACE, // FACILITY_CLASS_DOME_ACE - TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_9 - TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_10 - TRAINER_CLASS_PKMN_TRAINER_4, // FACILITY_CLASS_PKMN_TRAINER_11 - TRAINER_CLASS_PKMN_TRAINER_4, // FACILITY_CLASS_PKMN_TRAINER_12 + TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_RED + TRAINER_CLASS_PKMN_TRAINER_3, // FACILITY_CLASS_PKMN_TRAINER_LEAF + TRAINER_CLASS_PKMN_TRAINER_4, // FACILITY_CLASS_PKMN_TRAINER_RS_BRENDAN + TRAINER_CLASS_PKMN_TRAINER_4, // FACILITY_CLASS_PKMN_TRAINER_RS_MAY }; #endif //POKEEMERALD_TRAINER_CLASS_LOOKUPS_H diff --git a/include/pokemon.h b/include/pokemon.h index 3d7917b92..6df9ce313 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -468,6 +468,8 @@ extern struct Pokemon gEnemyParty[PARTY_SIZE]; extern struct SpriteTemplate gUnknown_0202499C; extern struct PokemonStorage* gPokemonStoragePtr; +extern const u8 gFacilityClassToPicIndex[]; +extern const u8 gFacilityClassToTrainerClass[]; extern const struct BaseStats gBaseStats[]; extern const u8 *const gItemEffectTable[]; extern const struct Evolution gEvolutionTable[][EVOS_PER_MON]; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index aac277d9e..a399adf25 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -33,7 +33,6 @@ extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct BattleMove gBattleMoves[]; -extern const u8 gFacilityClassToPicIndex[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); @@ -1245,7 +1244,7 @@ static void LinkOpponentHandleDrawTrainerPic(void) if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) { - if (gActiveBattler == 1) + if (gActiveBattler == B_POSITION_OPPONENT_LEFT) trainerPicId = GetFrontierTrainerFrontSpriteId(gTrainerBattleOpponent_A); else trainerPicId = GetFrontierTrainerFrontSpriteId(gTrainerBattleOpponent_B); @@ -1255,18 +1254,18 @@ static void LinkOpponentHandleDrawTrainerPic(void) if ((gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_FIRE_RED || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_LEAF_GREEN) { - if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; + if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != MALE) + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_LEAF]; else - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RED]; } else if ((gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_RUBY || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_SAPPHIRE) { - if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; + if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != MALE) + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RS_MAY]; else - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RS_BRENDAN]; } else { @@ -1285,17 +1284,17 @@ static void LinkOpponentHandleDrawTrainerPic(void) || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_LEAF_GREEN) { if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_LEAF]; else - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RED]; } else if ((gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_RUBY || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_SAPPHIRE) { if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RS_MAY]; else - trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_RS_BRENDAN]; } else { diff --git a/src/pokemon.c b/src/pokemon.c index 8ffa3468b..506dc245d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1026,9 +1026,9 @@ static const u16 sDeoxysBaseStats[] = const u16 gUnknown_08329D54[] = { - FACILITY_CLASS_COOLTRAINER_1, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER, + FACILITY_CLASS_COOLTRAINER_M, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER, FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_PSYCHIC_1, FACILITY_CLASS_BUG_CATCHER, - FACILITY_CLASS_PKMN_BREEDER_2, FACILITY_CLASS_GUITARIST, FACILITY_CLASS_COOLTRAINER_2, + FACILITY_CLASS_PKMN_BREEDER_2, FACILITY_CLASS_GUITARIST, FACILITY_CLASS_COOLTRAINER_F, FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_LASS, FACILITY_CLASS_PSYCHIC_2, FACILITY_CLASS_BATTLE_GIRL, FACILITY_CLASS_PKMN_BREEDER_1, FACILITY_CLASS_BEAUTY @@ -1173,8 +1173,8 @@ static const struct SpriteTemplate gUnknown_08329DF8[] = static const u8 sSecretBaseFacilityClasses[2][5] = { - {FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_BUG_CATCHER, FACILITY_CLASS_RICH_BOY, FACILITY_CLASS_CAMPER, FACILITY_CLASS_COOLTRAINER_1}, - {FACILITY_CLASS_LASS, FACILITY_CLASS_SCHOOL_KID_2, FACILITY_CLASS_LADY, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_COOLTRAINER_2} + {FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_BUG_CATCHER, FACILITY_CLASS_RICH_BOY, FACILITY_CLASS_CAMPER, FACILITY_CLASS_COOLTRAINER_M}, + {FACILITY_CLASS_LASS, FACILITY_CLASS_SCHOOL_KID_F, FACILITY_CLASS_LADY, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_COOLTRAINER_F} }; static const u8 sGetMonDataEVConstants[] = @@ -5868,10 +5868,10 @@ u16 FacilityClassToPicIndex(u16 facilityClass) u16 PlayerGenderToFrontTrainerPicId(u8 playerGender) { - if (playerGender) - return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_5); + if (playerGender != MALE) + return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_BRENDAN); else - return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_2); + return FacilityClassToPicIndex(FACILITY_CLASS_PKMN_TRAINER_MAY); } void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)