summaryrefslogtreecommitdiff
path: root/engine/battle/battle_transitions.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-07 19:48:22 -0400
committerGitHub <noreply@github.com>2020-07-07 19:48:22 -0400
commit9571c550b6a0dcb3a4f54513c881661a87271024 (patch)
treed73507228a57e4f3cece2fb93fe7df3a9439553f /engine/battle/battle_transitions.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
parentbbf2f51a02b2544f1bef32a5868503b474ae2fef (diff)
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'engine/battle/battle_transitions.asm')
-rw-r--r--engine/battle/battle_transitions.asm122
1 files changed, 60 insertions, 62 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 548e85fb..34b3fbdb 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -1,9 +1,9 @@
BattleTransition:
ld a, 1
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
- ld [hWY], a
+ ldh [hWY], a
dec a
ld [wUpdateSpritesEnabled], a
call DelayFrame
@@ -11,7 +11,7 @@ BattleTransition:
; Determine which OAM block is being used by the enemy trainer sprite (if there
; is one).
ld hl, wSpritePlayerStateData1ImageIndex
- ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
+ ldh a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle)
ld c, a
ld b, 0
ld de, $10
@@ -154,20 +154,18 @@ GetBattleTransitionID_IsDungeonMap:
INCLUDE "data/maps/dungeon_maps.asm"
LoadBattleTransitionTile:
- ld hl, vChars1 + $7f0
+ ld hl, vChars1 tile $7f
ld de, BattleTransitionTile
- lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
+ lb bc, BANK(BattleTransitionTile), 1
jp CopyVideoData
-BattleTransitionTile:
- INCBIN "gfx/overworld/battle_transition.2bpp"
-BattleTransitionTileEnd:
+BattleTransitionTile: INCBIN "gfx/overworld/battle_transition.2bpp"
BattleTransition_BlackScreen:
ld a, $ff
- ld [rBGP], a
- ld [rOBP0], a
- ld [rOBP1], a
+ ldh [rBGP], a
+ ldh [rOBP0], a
+ ldh [rOBP1], a
ret
; for non-dungeon trainer battles
@@ -181,7 +179,7 @@ BattleTransition_Spiral:
call BattleTransition_InwardSpiral
jr .done
.outwardSpiral
- coord hl, 10, 10
+ hlcoord 10, 10
ld a, $3
ld [wOutwardSpiralCurrentDirection], a
ld a, l
@@ -210,7 +208,7 @@ BattleTransition_Spiral:
BattleTransition_InwardSpiral:
ld a, 7
ld [wInwardSpiralUpdateScreenCounter], a
- coord hl, 0, 0
+ hlcoord 0, 0
ld c, SCREEN_HEIGHT - 1
ld de, SCREEN_WIDTH
call BattleTransition_InwardSpiral_
@@ -330,7 +328,7 @@ BattleTransition_FlashScreen_:
ld a, [hli]
cp $1
jr z, .done
- ld [rBGP], a
+ ldh [rBGP], a
ld c, 2
call DelayFrames
jr .loop
@@ -349,25 +347,25 @@ BattleTransition_Shrink:
.loop
push bc
xor a
- ld [hAutoBGTransferEnabled], a
- coord hl, 0, 7
- coord de, 0, 8
+ ldh [hAutoBGTransferEnabled], a
+ hlcoord 0, 7
+ decoord 0, 8
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 0, 10
- coord de, 0, 9
+ hlcoord 0, 10
+ decoord 0, 9
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 8, 0
- coord de, 9, 0
+ hlcoord 8, 0
+ decoord 9, 0
ld bc, -2
call BattleTransition_CopyTiles2
- coord hl, 11, 0
- coord de, 10, 0
+ hlcoord 11, 0
+ decoord 10, 0
ld bc, 2
call BattleTransition_CopyTiles2
ld a, $1
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
ld c, 6
call DelayFrames
pop bc
@@ -381,23 +379,23 @@ BattleTransition_Shrink:
BattleTransition_Split:
ld c, SCREEN_HEIGHT / 2
xor a
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
- coord hl, 0, 16
- coord de, 0, 17
+ hlcoord 0, 16
+ decoord 0, 17
ld bc, -SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 0, 1
- coord de, 0, 0
+ hlcoord 0, 1
+ decoord 0, 0
ld bc, SCREEN_WIDTH * 2
call BattleTransition_CopyTiles1
- coord hl, 18, 0
- coord de, 19, 0
+ hlcoord 18, 0
+ decoord 19, 0
ld bc, -2
call BattleTransition_CopyTiles2
- coord hl, 1, 0
- coord de, 0, 0
+ hlcoord 1, 0
+ decoord 0, 0
ld bc, 2
call BattleTransition_CopyTiles2
call BattleTransition_TransferDelay3
@@ -493,10 +491,10 @@ BattleTransition_CopyTiles2:
; used for high level wild dungeon battles
BattleTransition_VerticalStripes:
ld c, SCREEN_HEIGHT
- coord hl, 0, 0
- coord de, 1, 17
+ hlcoord 0, 0
+ decoord 1, 17
xor a
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
push hl
@@ -532,10 +530,10 @@ BattleTransition_VerticalStripes_:
; used for low level wild dungeon battles
BattleTransition_HorizontalStripes:
ld c, SCREEN_WIDTH
- coord hl, 0, 0
- coord de, 19, 1
+ hlcoord 0, 0
+ decoord 19, 1
xor a
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
.loop
push bc
push hl
@@ -582,7 +580,7 @@ BattleTransition_FlashScreen:
ld b, $3
call BattleTransition_FlashScreen_
xor a
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
ret
BattleTransition_Circle_Sub1:
@@ -601,10 +599,10 @@ BattleTransition_Circle_Sub1:
BattleTransition_TransferDelay3:
ld a, 1
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
- ld [hAutoBGTransferEnabled], a
+ ldh [hAutoBGTransferEnabled], a
ret
; used for low level wild non-dungeon battles
@@ -654,84 +652,84 @@ BattleTransition_Circle_Sub2:
BattleTransition_HalfCircle1:
db $01
dw BattleTransition_CircleData1
- dwCoord 18, 6
+ dwcoord 18, 6
db $01
dw BattleTransition_CircleData2
- dwCoord 19, 3
+ dwcoord 19, 3
db $01
dw BattleTransition_CircleData3
- dwCoord 18, 0
+ dwcoord 18, 0
db $01
dw BattleTransition_CircleData4
- dwCoord 14, 0
+ dwcoord 14, 0
db $01
dw BattleTransition_CircleData5
- dwCoord 10, 0
+ dwcoord 10, 0
db $00
dw BattleTransition_CircleData5
- dwCoord 9, 0
+ dwcoord 9, 0
db $00
dw BattleTransition_CircleData4
- dwCoord 5, 0
+ dwcoord 5, 0
db $00
dw BattleTransition_CircleData3
- dwCoord 1, 0
+ dwcoord 1, 0
db $00
dw BattleTransition_CircleData2
- dwCoord 0, 3
+ dwcoord 0, 3
db $00
dw BattleTransition_CircleData1
- dwCoord 1, 6
+ dwcoord 1, 6
BattleTransition_HalfCircle2:
db $00
dw BattleTransition_CircleData1
- dwCoord 1, 11
+ dwcoord 1, 11
db $00
dw BattleTransition_CircleData2
- dwCoord 0, 14
+ dwcoord 0, 14
db $00
dw BattleTransition_CircleData3
- dwCoord 1, 17
+ dwcoord 1, 17
db $00
dw BattleTransition_CircleData4
- dwCoord 5, 17
+ dwcoord 5, 17
db $00
dw BattleTransition_CircleData5
- dwCoord 9, 17
+ dwcoord 9, 17
db $01
dw BattleTransition_CircleData5
- dwCoord 10, 17
+ dwcoord 10, 17
db $01
dw BattleTransition_CircleData4
- dwCoord 14, 17
+ dwcoord 14, 17
db $01
dw BattleTransition_CircleData3
- dwCoord 18, 17
+ dwcoord 18, 17
db $01
dw BattleTransition_CircleData2
- dwCoord 19, 14
+ dwcoord 19, 14
db $01
dw BattleTransition_CircleData1
- dwCoord 18, 11
+ dwcoord 18, 11
BattleTransition_Circle_Sub3:
push hl