diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-02-12 00:11:10 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-02-12 00:11:10 +0100 |
commit | 5e781f5b3fa6e62abd6830f6a4f5dda7064597c9 (patch) | |
tree | f308481cfe296d409b832a59bf06a5d68587e5cc /src | |
parent | 2736c0fd4a52785aac63b259a71e8c64d92bef93 (diff) |
change some constants to male and female
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_controller_link_opponent.c | 23 | ||||
-rw-r--r-- | src/pokemon.c | 14 |
2 files changed, 18 insertions, 19 deletions
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) |