diff options
author | golem galvanize <golemgalvanize@github.com> | 2018-02-09 17:47:01 -0500 |
---|---|---|
committer | golem galvanize <golemgalvanize@github.com> | 2018-02-09 17:47:01 -0500 |
commit | 99d0b4bbfd3fd05ba67aed1e7cf1b500b3ab594f (patch) | |
tree | 958dc97128c47cc0fce7f0a37fff5c1cac098802 /src/battle_controller_link_opponent.c | |
parent | 368a63d5a74dee114797218d443b2cb0db68b9ea (diff) | |
parent | 387dbf48d0bbb22dc16158a1ee0d373c166c8438 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_main_menu
Diffstat (limited to 'src/battle_controller_link_opponent.c')
-rw-r--r-- | src/battle_controller_link_opponent.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 3775cf1fb..1b12a7a80 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -12,6 +12,7 @@ #include "util.h" #include "main.h" #include "constants/songs.h" +#include "constants/trainers.h" #include "sound.h" #include "window.h" #include "m4a.h" @@ -58,7 +59,7 @@ extern u16 gTrainerBattleOpponent_B; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct BattleMove gBattleMoves[]; -extern const u8 gUnknown_0831F578[]; +extern const u8 gFacilityClassToPicIndex[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); @@ -1280,17 +1281,17 @@ static void LinkOpponentHandleDrawTrainerPic(void) || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_LEAF_GREEN) { if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gUnknown_0831F578[0x4F]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; else - trainerPicId = gUnknown_0831F578[0x4E]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; } else if ((gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_RUBY || (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].version & 0xFF) == VERSION_SAPPHIRE) { if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != 0) - trainerPicId = gUnknown_0831F578[0x51]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; else - trainerPicId = gUnknown_0831F578[0x50]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; } else { @@ -1309,17 +1310,17 @@ static void LinkOpponentHandleDrawTrainerPic(void) || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_LEAF_GREEN) { if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) - trainerPicId = gUnknown_0831F578[0x4F]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_10]; else - trainerPicId = gUnknown_0831F578[0x4E]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_9]; } 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 = gUnknown_0831F578[0x51]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_12]; else - trainerPicId = gUnknown_0831F578[0x50]; + trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PKMN_TRAINER_11]; } else { |