From caa36b530a93dc51727822abf6c4c31fa8cbaf63 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 17 Jun 2018 16:48:58 +0200 Subject: label and document battle windows --- src/battle_controller_link_opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_controller_link_opponent.c') diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index a4aac55e2..905e957ea 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1475,7 +1475,7 @@ static void LinkOpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattleHandleAddTextPrinter(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, 0); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; BattleTv_SetDataBasedOnString(*stringId); } -- cgit v1.2.3 From 94752d420769dfc205b3f717c660f33a6eb2b6fb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 19 Jun 2018 00:43:15 +0200 Subject: document battle bars --- src/battle_controller_link_opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_controller_link_opponent.c') diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 905e957ea..b2c05664b 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -395,7 +395,7 @@ static void sub_8064B04(void) static void CompleteOnHealthbarDone(void) { - s16 hpValue = sub_8074AA0(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], HEALTH_BAR, 0); + s16 hpValue = MoveBattleBar(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], HEALTH_BAR, 0); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); -- cgit v1.2.3 From ab36efdaf4a7f64df9bbfae153eb88cd9c5b29b0 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 20 Jun 2018 23:07:51 +0200 Subject: document bounce effect --- src/battle_controller_link_opponent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/battle_controller_link_opponent.c') diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index b2c05664b..0a53c2893 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -90,7 +90,7 @@ static void LinkOpponentHandleIntroSlide(void); static void LinkOpponentHandleIntroTrainerBallThrow(void); static void LinkOpponentHandleDrawPartyStatusSummary(void); static void LinkOpponentHandleCmd49(void); -static void LinkOpponentHandleCmd50(void); +static void LinkOpponentHandleEndBounceEffect(void); static void LinkOpponentHandleSpriteInvisibility(void); static void LinkOpponentHandleBattleAnimation(void); static void LinkOpponentHandleLinkStandbyMsg(void); @@ -162,7 +162,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) = LinkOpponentHandleIntroTrainerBallThrow, LinkOpponentHandleDrawPartyStatusSummary, LinkOpponentHandleCmd49, - LinkOpponentHandleCmd50, + LinkOpponentHandleEndBounceEffect, LinkOpponentHandleSpriteInvisibility, LinkOpponentHandleBattleAnimation, LinkOpponentHandleLinkStandbyMsg, @@ -1366,7 +1366,7 @@ static void LinkOpponentHandleFaintAnimation(void) { gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; PlaySE12WithPanning(SE_POKE_DEAD, PAN_SIDE_OPPONENT); - gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_8039934; + gSprites[gBattlerSpriteIds[gActiveBattler]].callback = SpriteCB_FaintOpponentMon; gBattlerControllerFuncs[gActiveBattler] = sub_8064C14; } } @@ -1803,7 +1803,7 @@ static void LinkOpponentHandleCmd49(void) LinkOpponentBufferExecCompleted(); } -static void LinkOpponentHandleCmd50(void) +static void LinkOpponentHandleEndBounceEffect(void) { LinkOpponentBufferExecCompleted(); } -- cgit v1.2.3 From 272b98da6c5174db3f7f2d05ed765fc4cdefc2c6 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Jun 2018 21:06:32 +0200 Subject: document party status summary --- src/battle_controller_link_opponent.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/battle_controller_link_opponent.c') diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 0a53c2893..aa98b179d 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -89,7 +89,7 @@ static void LinkOpponentHandleFaintingCry(void); static void LinkOpponentHandleIntroSlide(void); static void LinkOpponentHandleIntroTrainerBallThrow(void); static void LinkOpponentHandleDrawPartyStatusSummary(void); -static void LinkOpponentHandleCmd49(void); +static void LinkOpponentHandleHidePartyStatusSummary(void); static void LinkOpponentHandleEndBounceEffect(void); static void LinkOpponentHandleSpriteInvisibility(void); static void LinkOpponentHandleBattleAnimation(void); @@ -161,7 +161,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) = LinkOpponentHandleIntroSlide, LinkOpponentHandleIntroTrainerBallThrow, LinkOpponentHandleDrawPartyStatusSummary, - LinkOpponentHandleCmd49, + LinkOpponentHandleHidePartyStatusSummary, LinkOpponentHandleEndBounceEffect, LinkOpponentHandleSpriteInvisibility, LinkOpponentHandleBattleAnimation, @@ -1716,8 +1716,8 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void) taskId = CreateTask(sub_8067618, 5); gTasks[taskId].data[0] = gActiveBattler; - if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x1) - gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = sub_8073C30; + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) + gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; gBattleSpritesDataPtr->animationData->field_9_x1 = 1; gBattlerControllerFuncs[gActiveBattler] = nullsub_28; @@ -1762,7 +1762,7 @@ static void LinkOpponentHandleDrawPartyStatusSummary(void) } else { - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x1 = 1; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown = 1; if (gBattleBufferA[gActiveBattler][2] != 0) { @@ -1796,10 +1796,10 @@ static void sub_806782C(void) } } -static void LinkOpponentHandleCmd49(void) +static void LinkOpponentHandleHidePartyStatusSummary(void) { - if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x1) - gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = sub_8073C30; + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) + gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; LinkOpponentBufferExecCompleted(); } -- cgit v1.2.3 From c556358e47f7af50ba9b04fc1d7b359512c25b03 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 1 Jul 2018 15:28:57 +0200 Subject: label multiuse sprite template functions --- src/battle_controller_link_opponent.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/battle_controller_link_opponent.c') diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 18963f955..d786dacd1 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -34,7 +34,6 @@ extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_806A068(u16, u8); extern void sub_81851A8(u8 *); extern u16 sub_8068B48(void); extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); @@ -191,7 +190,7 @@ static void LinkOpponentBufferRunCommand(void) } } -static void CompleteOnBankSpriteCallbackDummy(void) +static void CompleteOnBattlerSpriteCallbackDummy(void) { if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) LinkOpponentBufferExecCompleted(); @@ -1135,9 +1134,9 @@ static void LinkOpponentHandleLoadMonSprite(void) u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); - sub_806A068(species, GetBattlerPosition(gActiveBattler)); + SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); - gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gUnknown_0202499C, + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(gActiveBattler, 2), GetBattlerSpriteDefault_Y(gActiveBattler), sub_80A82E4(gActiveBattler)); @@ -1168,10 +1167,10 @@ static void sub_8066494(u8 battlerId, bool8 dontClearSubstituteBit) species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); gUnknown_03005D7C[battlerId] = CreateInvisibleSpriteWithCallback(sub_805D714); BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId); - sub_806A068(species, GetBattlerPosition(battlerId)); + SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); gBattlerSpriteIds[battlerId] = CreateSprite( - &gUnknown_0202499C, + &gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battlerId, 2), GetBattlerSpriteDefault_Y(battlerId), sub_80A82E4(battlerId)); @@ -1302,8 +1301,8 @@ static void LinkOpponentHandleDrawTrainerPic(void) } DecompressTrainerFrontPic(trainerPicId, gActiveBattler); - sub_806A12C(trainerPicId, GetBattlerPosition(gActiveBattler)); - gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gUnknown_0202499C, + SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, (8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40, sub_80A82E4(gActiveBattler)); @@ -1314,7 +1313,7 @@ static void LinkOpponentHandleDrawTrainerPic(void) gSprites[gBattlerSpriteIds[gActiveBattler]].oam.affineParam = trainerPicId; gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_805D7AC; - gBattlerControllerFuncs[gActiveBattler] = CompleteOnBankSpriteCallbackDummy; + gBattlerControllerFuncs[gActiveBattler] = CompleteOnBattlerSpriteCallbackDummy; } static void LinkOpponentHandleTrainerSlide(void) @@ -1327,8 +1326,8 @@ static void LinkOpponentHandleTrainerSlide(void) trainerPicId = GetFrontierTrainerFrontSpriteId(gTrainerBattleOpponent_B); DecompressTrainerFrontPic(trainerPicId, gActiveBattler); - sub_806A12C(trainerPicId, GetBattlerPosition(gActiveBattler)); - gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gUnknown_0202499C, 176, (8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40, 0x1E); + SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler)); + gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, 176, (8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40, 0x1E); gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 96; gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.x += 32; -- cgit v1.2.3