summaryrefslogtreecommitdiff
path: root/engine/battle/battle_transitions.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/battle_transitions.asm')
-rw-r--r--engine/battle/battle_transitions.asm367
1 files changed, 187 insertions, 180 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index f1aa4161..9e02c56f 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -1,5 +1,5 @@
-BattleTransition: ; 7096d (1c:496d)
- ld a, $1
+BattleTransition:
+ ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
@@ -7,10 +7,13 @@ BattleTransition: ; 7096d (1c:496d)
dec a
ld [wUpdateSpritesEnabled], a
call DelayFrame
+
+; Determine which OAM block is being used by the enemy trainer sprite (if there
+; is one).
ld hl, wSpriteStateData1 + 2
- ld a, [H_DOWNARROWBLINKCNT2]
+ ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
ld c, a
- ld b, $0
+ ld b, 0
ld de, $10
.loop1
ld a, [hl]
@@ -21,13 +24,15 @@ BattleTransition: ; 7096d (1c:496d)
add hl, de
dec c
jr nz, .loop1
+
+; Clear OAM except for the blocks used by the player and enemy trainer sprites.
ld hl, wOAMBuffer + $10
- ld c, $9
+ ld c, 9
.loop2
ld a, b
swap a
cp l
- jr z, .skip2
+ jr z, .skip2 ; skip clearing the block if the enemy trainer is using it
push hl
push bc
ld bc, $10
@@ -40,9 +45,10 @@ BattleTransition: ; 7096d (1c:496d)
add hl, de
dec c
jr nz, .loop2
+
call Delay3
call LoadBattleTransitionTile
- ld bc, $0
+ ld bc, 0
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr z, .linkBattle
@@ -64,7 +70,7 @@ BattleTransition: ; 7096d (1c:496d)
; bit 0: set if trainer battle
; bit 1: set if enemy is at least 3 levels higher than player
; bit 2: set if dungeon map
-BattleTransitions: ; 709d2 (1c:49d2)
+BattleTransitions:
dw BattleTransition_DoubleCircle ; %000
dw BattleTransition_Spiral ; %001
dw BattleTransition_Circle ; %010
@@ -74,9 +80,9 @@ BattleTransitions: ; 709d2 (1c:49d2)
dw BattleTransition_VerticalStripes ; %110
dw BattleTransition_Split ; %111
-GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
- ld a, [W_CUROPPONENT]
- cp $c8
+GetBattleTransitionID_WildOrTrainer:
+ ld a, [wCurOpponent]
+ cp 200
jr nc, .trainer
res 0, c
ret
@@ -84,7 +90,7 @@ GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
set 0, c
ret
-GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
+GetBattleTransitionID_CompareLevels:
ld hl, wPartyMon1HP
.faintedLoop
ld a, [hli]
@@ -99,24 +105,24 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
ld a, [hl]
add $3
ld e, a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
sub e
jr nc, .highLevelEnemy
res 1, c
- ld a, $1
- ld [wcd47], a
+ ld a, 1
+ ld [wBattleTransitionSpiralDirection], a
ret
.highLevelEnemy
set 1, c
xor a
- ld [wcd47], a
+ ld [wBattleTransitionSpiralDirection], a
ret
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
-GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
- ld a, [W_CURMAP]
+GetBattleTransitionID_IsDungeonMap:
+ ld a, [wCurMap]
ld e, a
ld hl, DungeonMaps1
.loop1
@@ -145,18 +151,18 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
res 2, c
ret
-; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is equal to one of these maps
-DungeonMaps1: ; 70a3f (1c:4a3f)
+DungeonMaps1:
db VIRIDIAN_FOREST
db ROCK_TUNNEL_1
db SEAFOAM_ISLANDS_1
db ROCK_TUNNEL_2
db $FF
-; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is in between or equal to each pair of maps
-DungeonMaps2: ; 70a44 (1c:4a44)
+DungeonMaps2:
; all MT_MOON maps
db MT_MOON_1
db MT_MOON_3
@@ -175,16 +181,17 @@ DungeonMaps2: ; 70a44 (1c:4a44)
db UNKNOWN_DUNGEON_1
db $FF
-LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
+LoadBattleTransitionTile:
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
- ld bc, (BANK(BattleTransitionTile) << 8) + $01
+ lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
jp CopyVideoData
-BattleTransitionTile: ; 70a59 (1c:4a59)
+BattleTransitionTile:
INCBIN "gfx/battle_transition.2bpp"
+BattleTransitionTileEnd:
-BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
+BattleTransition_BlackScreen:
ld a, $ff
ld [rBGP], a
ld [rOBP0], a
@@ -195,61 +202,61 @@ BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
; called regardless of mon levels, but does an
; outward spiral if enemy is at least 3 levels
; higher than player and does an inward spiral otherwise
-BattleTransition_Spiral: ; 70a72 (1c:4a72)
- ld a, [wcd47]
+BattleTransition_Spiral:
+ ld a, [wBattleTransitionSpiralDirection]
and a
jr z, .outwardSpiral
call BattleTransition_InwardSpiral
jr .done
.outwardSpiral
- hlCoord 10, 10
+ coord hl, 10, 10
ld a, $3
- ld [wd09f], a
+ ld [wOutwardSpiralCurrentDirection], a
ld a, l
- ld [wd09b], a
+ ld [wOutwardSpiralTileMapPointer + 1], a
ld a, h
- ld [wd09a], a
- ld b, $78
-.loop1
- ld c, $3
-.loop2
+ ld [wOutwardSpiralTileMapPointer], a
+ ld b, 120
+.loop
+ ld c, 3
+.innerLoop
push bc
call BattleTransition_OutwardSpiral_
pop bc
dec c
- jr nz, .loop2
+ jr nz, .innerLoop
call DelayFrame
dec b
- jr nz, .loop1
+ jr nz, .loop
.done
call BattleTransition_BlackScreen
xor a
- ld [wd09b], a
- ld [wd09a], a
+ ld [wOutwardSpiralTileMapPointer + 1], a
+ ld [wOutwardSpiralTileMapPointer], a
ret
-BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
- ld a, $7
- ld [wWhichTrade], a
- ld hl, wTileMap
- ld c, $11
- ld de, $14
+BattleTransition_InwardSpiral:
+ ld a, 7
+ ld [wInwardSpiralUpdateScreenCounter], a
+ coord hl, 0, 0
+ ld c, SCREEN_HEIGHT - 1
+ ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_
inc c
jr .skip
.loop
- ld de, $14
+ ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_
.skip
inc c
- ld de, $1
+ ld de, 1
call BattleTransition_InwardSpiral_
dec c
dec c
- ld de, $ffec
+ ld de, -SCREEN_WIDTH
call BattleTransition_InwardSpiral_
inc c
- ld de, rIE
+ ld de, -1
call BattleTransition_InwardSpiral_
dec c
dec c
@@ -258,101 +265,101 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
jr nz, .loop
ret
-BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
+BattleTransition_InwardSpiral_:
push bc
.loop
ld [hl], $ff
add hl, de
push bc
- ld a, [wWhichTrade]
+ ld a, [wInwardSpiralUpdateScreenCounter]
dec a
jr nz, .skip
call BattleTransition_TransferDelay3
- ld a, $7
+ ld a, 7
.skip
- ld [wWhichTrade], a
+ ld [wInwardSpiralUpdateScreenCounter], a
pop bc
dec c
jr nz, .loop
pop bc
ret
-BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
- ld bc, $ffec
- ld de, $14
- ld a, [wd09b]
+BattleTransition_OutwardSpiral_:
+ ld bc, -SCREEN_WIDTH
+ ld de, SCREEN_WIDTH
+ ld a, [wOutwardSpiralTileMapPointer + 1]
ld l, a
- ld a, [wd09a]
+ ld a, [wOutwardSpiralTileMapPointer]
ld h, a
- ld a, [wd09f]
+ ld a, [wOutwardSpiralCurrentDirection]
cp $0
- jr z, .zero
+ jr z, .up
cp $1
- jr z, .one
+ jr z, .left
cp $2
- jr z, .two
+ jr z, .down
cp $3
- jr z, .three
-.done1
+ jr z, .right
+.keepSameDirection
ld [hl], $ff
-.done2_
+.done
ld a, l
- ld [wd09b], a
+ ld [wOutwardSpiralTileMapPointer + 1], a
ld a, h
- ld [wd09a], a
+ ld [wOutwardSpiralTileMapPointer], a
ret
-.zero
+.up
dec hl
ld a, [hl]
cp $ff
- jr nz, .done2
+ jr nz, .changeDirection
inc hl
add hl, bc
- jr .done1
-.one
+ jr .keepSameDirection
+.left
add hl, de
ld a, [hl]
cp $ff
- jr nz, .done2
+ jr nz, .changeDirection
add hl, bc
dec hl
- jr .done1
-.two
+ jr .keepSameDirection
+.down
inc hl
ld a, [hl]
cp $ff
- jr nz, .done2
+ jr nz, .changeDirection
dec hl
add hl, de
- jr .done1
-.three
+ jr .keepSameDirection
+.right
add hl, bc
ld a, [hl]
cp $ff
- jr nz, .done2
+ jr nz, .changeDirection
add hl, de
inc hl
- jr .done1
-.done2
+ jr .keepSameDirection
+.changeDirection
ld [hl], $ff
- ld a, [wd09f]
+ ld a, [wOutwardSpiralCurrentDirection]
inc a
cp $4
jr nz, .skip
xor a
.skip
- ld [wd09f], a
- jr .done2_
+ ld [wOutwardSpiralCurrentDirection], a
+ jr .done
FlashScreen:
-BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
+BattleTransition_FlashScreen_:
ld hl, BattleTransition_FlashScreenPalettes
.loop
ld a, [hli]
cp $1
jr z, .done
ld [rBGP], a
- ld c, $2
+ ld c, 2
call DelayFrames
jr .loop
.done
@@ -360,66 +367,66 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
jr nz, BattleTransition_FlashScreen_
ret
-BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72)
+BattleTransition_FlashScreenPalettes:
db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
db $01 ; terminator
; used for low level trainer dungeon battles
-BattleTransition_Shrink: ; 70b7f (1c:4b7f)
- ld c, $9
+BattleTransition_Shrink:
+ ld c, SCREEN_HEIGHT / 2
.loop
push bc
xor a
ld [H_AUTOBGTRANSFERENABLED], a
- hlCoord 0, 7
- deCoord 0, 8
- ld bc, $ffd8
+ coord hl, 0, 7
+ coord de, 0, 8
+ ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- hlCoord 0, 10
- deCoord 0, 9
- ld bc, $28
+ coord hl, 0, 10
+ coord de, 0, 9
+ ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- hlCoord 8, 0
- deCoord 9, 0
- ld bc, $fffe
+ coord hl, 8, 0
+ coord de, 9, 0
+ ld bc, -2
call BattleTransition_CopyTiles2
- hlCoord 11, 0
- deCoord 10, 0
- ld bc, $2
+ coord hl, 11, 0
+ coord de, 10, 0
+ ld bc, 2
call BattleTransition_CopyTiles2
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
- ld c, $6
+ ld c, 6
call DelayFrames
pop bc
dec c
jr nz, .loop
call BattleTransition_BlackScreen
- ld c, $a
+ ld c, 10
jp DelayFrames
; used for high level trainer dungeon battles
-BattleTransition_Split: ; 70bca (1c:4bca)
- ld c, $9
+BattleTransition_Split:
+ ld c, SCREEN_HEIGHT / 2
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
push bc
- hlCoord 0, 16
- deCoord 0, 17
- ld bc, $ffd8
+ coord hl, 0, 16
+ coord de, 0, 17
+ ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- hlCoord 0, 1
- ld de, wTileMap
- ld bc, $28
+ coord hl, 0, 1
+ coord de, 0, 0
+ ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- hlCoord 18, 0
- deCoord 19, 0
- ld bc, $fffe
+ coord hl, 18, 0
+ coord de, 19, 0
+ ld bc, -2
call BattleTransition_CopyTiles2
- hlCoord 1, 0
- ld de, wTileMap
- ld bc, $2
+ coord hl, 1, 0
+ coord de, 0, 0
+ ld bc, 2
call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3
call Delay3
@@ -427,26 +434,26 @@ BattleTransition_Split: ; 70bca (1c:4bca)
dec c
jr nz, .loop
call BattleTransition_BlackScreen
- ld c, $a
+ ld c, 10
jp DelayFrames
-BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
+BattleTransition_CopyTiles1:
ld a, c
- ld [wWhichTrade], a
+ ld [wBattleTransitionCopyTilesOffset], a
ld a, b
- ld [wTrainerEngageDistance], a
- ld c, $8
+ ld [wBattleTransitionCopyTilesOffset + 1], a
+ ld c, 8
.loop1
push bc
push hl
push de
- ld bc, $14
+ ld bc, SCREEN_WIDTH
call CopyData
pop hl
pop de
- ld a, [wWhichTrade]
+ ld a, [wBattleTransitionCopyTilesOffset]
ld c, a
- ld a, [wTrainerEngageDistance]
+ ld a, [wBattleTransitionCopyTilesOffset + 1]
ld b, a
add hl, bc
pop bc
@@ -455,35 +462,35 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
ld l, e
ld h, d
ld a, $ff
- ld c, $14
+ ld c, SCREEN_WIDTH
.loop2
ld [hli], a
dec c
jr nz, .loop2
ret
-BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
+BattleTransition_CopyTiles2:
ld a, c
- ld [wWhichTrade], a
+ ld [wBattleTransitionCopyTilesOffset], a
ld a, b
- ld [wTrainerEngageDistance], a
- ld c, $9
+ ld [wBattleTransitionCopyTilesOffset + 1], a
+ ld c, SCREEN_HEIGHT / 2
.loop1
push bc
push hl
push de
- ld c, $12
+ ld c, SCREEN_HEIGHT
.loop2
ld a, [hl]
ld [de], a
ld a, e
- add $14
+ add SCREEN_WIDTH
jr nc, .noCarry1
inc d
.noCarry1
ld e, a
ld a, l
- add $14
+ add SCREEN_WIDTH
jr nc, .noCarry2
inc h
.noCarry2
@@ -492,9 +499,9 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
jr nz, .loop2
pop hl
pop de
- ld a, [wWhichTrade]
+ ld a, [wBattleTransitionCopyTilesOffset]
ld c, a
- ld a, [wTrainerEngageDistance]
+ ld a, [wBattleTransitionCopyTilesOffset + 1]
ld b, a
add hl, bc
pop bc
@@ -502,8 +509,8 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
jr nz, .loop1
ld l, e
ld h, d
- ld de, $14
- ld c, $12
+ ld de, SCREEN_WIDTH
+ ld c, SCREEN_HEIGHT
.loop3
ld [hl], $ff
add hl, de
@@ -512,10 +519,10 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
ret
; used for high level wild dungeon battles
-BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
- ld c, $12
- ld hl, wTileMap
- deCoord 1, 17
+BattleTransition_VerticalStripes:
+ ld c, SCREEN_HEIGHT
+ coord hl, 0, 0
+ coord de, 1, 17
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -528,20 +535,20 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
call BattleTransition_VerticalStripes_
call BattleTransition_TransferDelay3
pop hl
- ld bc, $ffec
+ ld bc, -SCREEN_WIDTH
add hl, bc
ld e, l
ld d, h
pop hl
- ld bc, $14
+ ld bc, SCREEN_WIDTH
add hl, bc
pop bc
dec c
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
- ld c, $a
+BattleTransition_VerticalStripes_:
+ ld c, SCREEN_WIDTH / 2
.loop
ld [hl], $ff
inc hl
@@ -551,10 +558,10 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
ret
; used for low level wild dungeon battles
-BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
- ld c, $14
- ld hl, wTileMap
- deCoord 19, 1
+BattleTransition_HorizontalStripes:
+ ld c, SCREEN_WIDTH
+ coord hl, 0, 0
+ coord de, 19, 1
xor a
ld [H_AUTOBGTRANSFERENABLED], a
.loop
@@ -575,9 +582,9 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
- ld c, $9
- ld de, $28
+BattleTransition_HorizontalStripes_:
+ ld c, SCREEN_HEIGHT / 2
+ ld de, SCREEN_WIDTH * 2
.loop
ld [hl], $ff
add hl, de
@@ -588,31 +595,31 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
; used for high level wild non-dungeon battles
; makes one full circle around the screen
; by animating each half circle one at a time
-BattleTransition_Circle: ; 70ce4 (1c:4ce4)
+BattleTransition_Circle:
call BattleTransition_FlashScreen
- ld bc, $000a
+ lb bc, 0, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
call BattleTransition_Circle_Sub1
- ld c, $a
- ld b, $1
+ ld c, SCREEN_WIDTH / 2
+ ld b, 1
ld hl, BattleTransition_HalfCircle2
call BattleTransition_Circle_Sub1
jp BattleTransition_BlackScreen
-BattleTransition_FlashScreen: ; 70cfd (1c:4cfd)
+BattleTransition_FlashScreen:
ld b, $3
call BattleTransition_FlashScreen_
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ret
-BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
+BattleTransition_Circle_Sub1:
push bc
push hl
ld a, b
call BattleTransition_Circle_Sub2
pop hl
- ld bc, $0005
+ ld bc, 5
add hl, bc
call BattleTransition_TransferDelay3
pop bc
@@ -620,8 +627,8 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
jr nz, BattleTransition_Circle_Sub1
ret
-BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
- ld a, $1
+BattleTransition_TransferDelay3:
+ ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
@@ -631,9 +638,9 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
; used for low level wild non-dungeon battles
; makes two half circles around the screen
; by animating both half circles at the same time
-BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
+BattleTransition_DoubleCircle:
call BattleTransition_FlashScreen
- ld c, $a
+ ld c, SCREEN_WIDTH / 2
ld hl, BattleTransition_HalfCircle1
ld de, BattleTransition_HalfCircle2
.loop
@@ -647,7 +654,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
ld a, $1
call BattleTransition_Circle_Sub2
pop hl
- ld bc, $5
+ ld bc, 5
add hl, bc
ld e, l
ld d, h
@@ -659,10 +666,10 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
jr nz, .loop
jp BattleTransition_BlackScreen
-BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
- ld [wWhichTrade], a
+BattleTransition_Circle_Sub2:
+ ld [wBattleTransitionCircleScreenQuadrantY], a
ld a, [hli]
- ld [wTrainerEngageDistance], a
+ ld [wBattleTransitionCircleScreenQuadrantX], a
ld a, [hli]
ld e, a
ld a, [hli]
@@ -672,7 +679,7 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
ld l, a
jp BattleTransition_Circle_Sub3
-BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
+BattleTransition_HalfCircle1:
db $01
dw BattleTransition_CircleData1
dwCoord 18, 6
@@ -713,7 +720,7 @@ BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
dw BattleTransition_CircleData1
dwCoord 1, 6
-BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
+BattleTransition_HalfCircle2:
db $00
dw BattleTransition_CircleData1
dwCoord 1, 11
@@ -754,14 +761,14 @@ BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
dw BattleTransition_CircleData1
dwCoord 18, 11
-BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
+BattleTransition_Circle_Sub3:
push hl
ld a, [de]
ld c, a
inc de
.loop1
ld [hl], $ff
- ld a, [wTrainerEngageDistance]
+ ld a, [wBattleTransitionCircleScreenQuadrantX]
and a
jr z, .skip1
inc hl
@@ -772,11 +779,11 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
dec c
jr nz, .loop1
pop hl
- ld a, [wWhichTrade]
+ ld a, [wBattleTransitionCircleScreenQuadrantY]
and a
- ld bc, $14
+ ld bc, SCREEN_WIDTH
jr z, .skip3
- ld bc, $ffec
+ ld bc, -SCREEN_WIDTH
.skip3
add hl, bc
ld a, [de]
@@ -787,7 +794,7 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
jr z, BattleTransition_Circle_Sub3
ld c, a
.loop2
- ld a, [wTrainerEngageDistance]
+ ld a, [wBattleTransitionCircleScreenQuadrantX]
and a
jr z, .skip4
dec hl
@@ -799,17 +806,17 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
jr nz, .loop2
jr BattleTransition_Circle_Sub3
-BattleTransition_CircleData1: ; 70dfe (1c:4dfe)
+BattleTransition_CircleData1:
db $02,$03,$05,$04,$09,$FF
-BattleTransition_CircleData2: ; 70e04 (1c:4e04)
+BattleTransition_CircleData2:
db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF
-BattleTransition_CircleData3: ; 70e0e (1c:4e0e)
+BattleTransition_CircleData3:
db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF
-BattleTransition_CircleData4: ; 70e20 (1c:4e20)
+BattleTransition_CircleData4:
db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF
-BattleTransition_CircleData5: ; 70e2e (1c:4e2e)
+BattleTransition_CircleData5:
db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF