diff options
author | Marcus Huderle <huderlem@gmail.com> | 2019-03-23 09:39:46 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2019-03-23 09:39:46 -0500 |
commit | 65391a1eb2979dc050dd4a98afea02bb0ef310ea (patch) | |
tree | e31a90d0966cec7e8713ead9ca8083d439c8d9b5 /src/battle_controller_link_opponent.c | |
parent | eb48cc2f7eefc1e56c2dcec21c38381b4534b897 (diff) | |
parent | abe56579c107af58e6f3a43968ba2257ff358189 (diff) |
Merge remote-tracking branch 'upstream/master' into use_pokeblock
# Conflicts:
# src/use_pokeblock.c
Diffstat (limited to 'src/battle_controller_link_opponent.c')
-rw-r--r-- | src/battle_controller_link_opponent.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index a7b08a974..23d469c27 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -16,6 +16,7 @@ #include "palette.h" #include "pokeball.h" #include "pokemon.h" +#include "recorded_battle.h" #include "reshow_battle_screen.h" #include "sound.h" #include "string_util.h" @@ -26,15 +27,12 @@ #include "constants/battle_anim.h" #include "constants/songs.h" #include "constants/trainers.h" +#include "recorded_battle.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_81851A8(u8 *); -extern u16 sub_8068B48(void); - // this file's functions static void LinkOpponentHandleGetMonData(void); static void LinkOpponentHandleGetRawMonData(void); @@ -92,7 +90,7 @@ static void LinkOpponentHandleBattleAnimation(void); static void LinkOpponentHandleLinkStandbyMsg(void); static void LinkOpponentHandleResetActionMoveSelection(void); static void LinkOpponentHandleCmd55(void); -static void nullsub_92(void); +static void LinkOpponentCmdEnd(void); static void LinkOpponentBufferRunCommand(void); static void LinkOpponentBufferExecCompleted(void); @@ -164,7 +162,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) = LinkOpponentHandleLinkStandbyMsg, LinkOpponentHandleResetActionMoveSelection, LinkOpponentHandleCmd55, - nullsub_92 + LinkOpponentCmdEnd }; static void nullsub_28(void) @@ -1278,7 +1276,7 @@ static void LinkOpponentHandleDrawTrainerPic(void) else if ((gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_FIRE_RED || (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].version & 0xFF) == VERSION_LEAF_GREEN) { - if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != 0) + if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != MALE) trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_LEAF]; else trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_RED]; @@ -1286,7 +1284,7 @@ static void LinkOpponentHandleDrawTrainerPic(void) 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) + if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != MALE) trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_RS_MAY]; else trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_RS_BRENDAN]; @@ -1339,7 +1337,7 @@ static void LinkOpponentHandleTrainerSlide(void) static void LinkOpponentHandleTrainerSlideBack(void) { - oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35; gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280; gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y; @@ -1700,7 +1698,7 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void) u8 paletteNum; u8 taskId; - oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]); + SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35; gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280; @@ -1857,6 +1855,6 @@ static void LinkOpponentHandleCmd55(void) gBattlerControllerFuncs[gActiveBattler] = sub_80587B0; } -static void nullsub_92(void) +static void LinkOpponentCmdEnd(void) { } |