diff options
Diffstat (limited to 'src/battle_controller_opponent.c')
-rw-r--r-- | src/battle_controller_opponent.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index b3685806d..6154655ad 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -39,7 +39,7 @@ extern u8 gBattleBufferA[][0x200]; extern u16 gBattlerPartyIndexes[]; extern u8 gBattlerSpriteIds[]; extern u8 gBattleMonForms[]; -extern struct SpriteTemplate gUnknown_02024E8C; +extern struct SpriteTemplate gCreatingSpriteTemplate; extern void (*gBattlerControllerFuncs[])(void); extern u8 gUnknown_0300434C[]; extern u8 gHealthboxSpriteIds[]; @@ -53,12 +53,12 @@ extern u32 gTransformedPersonalities[]; extern u8 gAnimMoveTurn; extern u8 gAnimScriptActive; extern void (*gAnimScriptCallback)(void); -extern struct Window gUnknown_03004210; +extern struct Window gWindowTemplate_Contest_MoveDescription; extern u8 gDisplayedStringBattle[]; extern u8 gBattlerTarget; extern u8 gAbsentBattlerFlags; extern bool8 gDoingBattleAnim; -extern u16 gUnknown_02024DE8; +extern u16 gIntroSlideFlags; extern u8 gUnknown_02024E68[]; extern MainCallback gPreBattleCallback1; extern struct MusicPlayerInfo gMPlayInfo_SE1; @@ -432,7 +432,7 @@ void sub_8033160(void) void sub_80331D0(void) { - if (gUnknown_03004210.state == 0) + if (gWindowTemplate_Contest_MoveDescription.state == 0) OpponentBufferExecCompleted(); } @@ -459,7 +459,7 @@ void sub_8033264(void) { if (gSprites[gHealthboxSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) { - if (ewram17800[gActiveBattler].substituteSprite) + if (gBattleSpriteInfo[gActiveBattler].substituteSprite) move_anim_start_t4(gActiveBattler, gActiveBattler, gActiveBattler, 6); gBattlerControllerFuncs[gActiveBattler] = sub_80332D0; } @@ -1119,7 +1119,7 @@ void OpponentHandleLoadPokeSprite(void) BattleLoadOpponentMonSprite(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); GetMonSpriteTemplate_803C56C(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite( - &gUnknown_02024E8C, + &gCreatingSpriteTemplate, GetBattlerSpriteCoord(gActiveBattler, 2), sub_8077F68(gActiveBattler), GetBattlerSubpriority(gActiveBattler)); @@ -1151,7 +1151,7 @@ void sub_803495C(u8 a, u8 b) BattleLoadOpponentMonSprite(&gEnemyParty[gBattlerPartyIndexes[a]], a); GetMonSpriteTemplate_803C56C(species, GetBattlerPosition(a)); gBattlerSpriteIds[a] = CreateSprite( - &gUnknown_02024E8C, + &gCreatingSpriteTemplate, GetBattlerSpriteCoord(a, 2), sub_8077F68(a), GetBattlerSubpriority(a)); @@ -1187,7 +1187,7 @@ void sub_8034B74(void) switch (ewram17810[gActiveBattler].unk4) { case 0: - if (ewram17800[gActiveBattler].substituteSprite) + if (gBattleSpriteInfo[gActiveBattler].substituteSprite) move_anim_start_t4(gActiveBattler, gActiveBattler, gActiveBattler, 5); ewram17810[gActiveBattler].unk4 = 1; break; @@ -1227,7 +1227,7 @@ void OpponentHandleTrainerThrow(void) sub_8031A6C(trainerPicIndex, gActiveBattler); GetMonSpriteTemplate_803C5A0(trainerPicIndex, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite( - &gUnknown_02024E8C, + &gCreatingSpriteTemplate, 0xB0, 40 + 4 * (8 - gTrainerFrontPicCoords[trainerPicIndex].coords), GetBattlerSubpriority(gActiveBattler)); @@ -1257,7 +1257,7 @@ void OpponentHandleTrainerSlide(void) sub_8031A6C(trainerPicIndex, gActiveBattler); GetMonSpriteTemplate_803C5A0(trainerPicIndex, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite( - &gUnknown_02024E8C, + &gCreatingSpriteTemplate, 0xB0, 40 + 4 * (8 - gTrainerFrontPicCoords[trainerPicIndex].coords), 0x1E); @@ -1287,7 +1287,7 @@ void OpponentHandlecmd10(void) { if (ewram17810[gActiveBattler].unk4 == 0) { - if (ewram17800[gActiveBattler].substituteSprite) + if (gBattleSpriteInfo[gActiveBattler].substituteSprite) move_anim_start_t4(gActiveBattler, gActiveBattler, gActiveBattler, 5); ewram17810[gActiveBattler].unk4++; } @@ -1362,9 +1362,9 @@ void sub_8035238(void) switch (ewram17810[gActiveBattler].unk4) { case 0: - if (ewram17800[gActiveBattler].substituteSprite && !ewram17800[gActiveBattler].unk0_3) + if (gBattleSpriteInfo[gActiveBattler].substituteSprite && !gBattleSpriteInfo[gActiveBattler].flag_x8) { - ewram17800[gActiveBattler].unk0_3 = 1; + gBattleSpriteInfo[gActiveBattler].flag_x8 = 1; move_anim_start_t4(gActiveBattler, gActiveBattler, gActiveBattler, 5); } ewram17810[gActiveBattler].unk4 = 1; @@ -1382,10 +1382,10 @@ void sub_8035238(void) if (!gAnimScriptActive) { sub_80326EC(1); - if ((ewram17800[gActiveBattler].substituteSprite) && r7 <= 1) + if ((gBattleSpriteInfo[gActiveBattler].substituteSprite) && r7 <= 1) { move_anim_start_t4(gActiveBattler, gActiveBattler, gActiveBattler, 6); - ewram17800[gActiveBattler].unk0_3 = 0; + gBattleSpriteInfo[gActiveBattler].flag_x8 = 0; } ewram17810[gActiveBattler].unk4 = 3; } @@ -1409,7 +1409,8 @@ void OpponentHandlePrintString(void) gBattle_BG0_X = 0; gBattle_BG0_Y = 0; BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBattler][2]); - Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15); + Contest_StartTextPrinter( + &gWindowTemplate_Contest_MoveDescription, gDisplayedStringBattle, 144, 2, 15); gBattlerControllerFuncs[gActiveBattler] = sub_80331D0; } @@ -2019,7 +2020,7 @@ void OpponentHandleFaintingCry(void) void OpponentHandleIntroSlide(void) { StartBattleIntroAnim(gBattleBufferA[gActiveBattler][1]); - gUnknown_02024DE8 |= 1; + gIntroSlideFlags |= 1; OpponentBufferExecCompleted(); } |