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_recorded_opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 4d1ccbaca..b4bdfaa4e 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1404,7 +1404,7 @@ static void RecordedOpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattleHandleAddTextPrinter(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, 0); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } -- 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_recorded_opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index b4bdfaa4e..69f93d7e2 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -377,7 +377,7 @@ static void sub_8186C48(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_recorded_opponent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 69f93d7e2..9d213fc6b 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -91,7 +91,7 @@ static void RecordedOpponentHandleIntroSlide(void); static void RecordedOpponentHandleIntroTrainerBallThrow(void); static void RecordedOpponentHandleDrawPartyStatusSummary(void); static void RecordedOpponentHandleCmd49(void); -static void RecordedOpponentHandleCmd50(void); +static void RecordedOpponentHandleEndBounceEffect(void); static void RecordedOpponentHandleSpriteInvisibility(void); static void RecordedOpponentHandleBattleAnimation(void); static void RecordedOpponentHandleLinkStandbyMsg(void); @@ -163,7 +163,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void RecordedOpponentHandleIntroTrainerBallThrow, RecordedOpponentHandleDrawPartyStatusSummary, RecordedOpponentHandleCmd49, - RecordedOpponentHandleCmd50, + RecordedOpponentHandleEndBounceEffect, RecordedOpponentHandleSpriteInvisibility, RecordedOpponentHandleBattleAnimation, RecordedOpponentHandleLinkStandbyMsg, @@ -1296,7 +1296,7 @@ static void RecordedOpponentHandleFaintAnimation(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_8186D58; } } @@ -1745,7 +1745,7 @@ static void RecordedOpponentHandleCmd49(void) RecordedOpponentBufferExecCompleted(); } -static void RecordedOpponentHandleCmd50(void) +static void RecordedOpponentHandleEndBounceEffect(void) { RecordedOpponentBufferExecCompleted(); } -- 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_recorded_opponent.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 9d213fc6b..4b44116dd 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -90,7 +90,7 @@ static void RecordedOpponentHandleFaintingCry(void); static void RecordedOpponentHandleIntroSlide(void); static void RecordedOpponentHandleIntroTrainerBallThrow(void); static void RecordedOpponentHandleDrawPartyStatusSummary(void); -static void RecordedOpponentHandleCmd49(void); +static void RecordedOpponentHandleHidePartyStatusSummary(void); static void RecordedOpponentHandleEndBounceEffect(void); static void RecordedOpponentHandleSpriteInvisibility(void); static void RecordedOpponentHandleBattleAnimation(void); @@ -162,7 +162,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void RecordedOpponentHandleIntroSlide, RecordedOpponentHandleIntroTrainerBallThrow, RecordedOpponentHandleDrawPartyStatusSummary, - RecordedOpponentHandleCmd49, + RecordedOpponentHandleHidePartyStatusSummary, RecordedOpponentHandleEndBounceEffect, RecordedOpponentHandleSpriteInvisibility, RecordedOpponentHandleBattleAnimation, @@ -1658,8 +1658,8 @@ static void RecordedOpponentHandleIntroTrainerBallThrow(void) taskId = CreateTask(sub_8189548, 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_70; @@ -1704,7 +1704,7 @@ static void RecordedOpponentHandleDrawPartyStatusSummary(void) } else { - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x1 = 1; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown = 1; if (gBattleBufferA[gActiveBattler][2] != 0) { @@ -1738,10 +1738,10 @@ static void sub_818975C(void) } } -static void RecordedOpponentHandleCmd49(void) +static void RecordedOpponentHandleHidePartyStatusSummary(void) { - if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x1) - gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = sub_8073C30; + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) + gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; RecordedOpponentBufferExecCompleted(); } -- cgit v1.2.3 From d2e47323fe988e430af782c2c10b8e41e7a131b3 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 1 Jul 2018 11:15:42 +0200 Subject: document frontier related --- src/battle_controller_recorded_opponent.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 4b44116dd..1fd1deebf 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -13,6 +13,7 @@ #include "util.h" #include "main.h" #include "constants/songs.h" +#include "constants/trainers.h" #include "sound.h" #include "window.h" #include "m4a.h" -- 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_recorded_opponent.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/battle_controller_recorded_opponent.c') diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 1fd1deebf..affcb09ab 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -37,7 +37,6 @@ extern u8 gUnknown_0203C7B4; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_806A068(u16, u8); extern u16 sub_8068B48(void); extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); @@ -193,7 +192,7 @@ static void RecordedOpponentBufferRunCommand(void) } } -static void CompleteOnBankSpriteCallbackDummy(void) +static void CompleteOnBattlerSpriteCallbackDummy(void) { if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) RecordedOpponentBufferExecCompleted(); @@ -1119,9 +1118,9 @@ static void RecordedOpponentHandleLoadMonSprite(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)); @@ -1154,9 +1153,9 @@ static void sub_81885D8(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, + gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battlerId, 2), GetBattlerSpriteDefault_Y(battlerId), sub_80A82E4(battlerId)); @@ -1252,8 +1251,8 @@ static void RecordedOpponentHandleDrawTrainerPic(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)); @@ -1264,7 +1263,7 @@ static void RecordedOpponentHandleDrawTrainerPic(void) gSprites[gBattlerSpriteIds[gActiveBattler]].oam.affineParam = trainerPicId; gSprites[gBattlerSpriteIds[gActiveBattler]].callback = sub_805D7AC; - gBattlerControllerFuncs[gActiveBattler] = CompleteOnBankSpriteCallbackDummy; + gBattlerControllerFuncs[gActiveBattler] = CompleteOnBattlerSpriteCallbackDummy; } static void RecordedOpponentHandleTrainerSlide(void) -- cgit v1.2.3