aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/pikachu_entrance_anim.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-11-04 15:16:20 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-11-04 19:44:31 -0500
commitaae999f72bd81a3156c7e00da4ebf499f52da5a6 (patch)
tree32fef70a31af3a0b5ad2b0d34042c312574fb42d /engine/battle/pikachu_entrance_anim.asm
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
downloadpokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.tar.gz
pokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.tar.xz
pokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.zip
Start reorganizing pokeyellow
Diffstat (limited to 'engine/battle/pikachu_entrance_anim.asm')
-rw-r--r--engine/battle/pikachu_entrance_anim.asm47
1 files changed, 47 insertions, 0 deletions
diff --git a/engine/battle/pikachu_entrance_anim.asm b/engine/battle/pikachu_entrance_anim.asm
new file mode 100644
index 00000000..8af65cee
--- /dev/null
+++ b/engine/battle/pikachu_entrance_anim.asm
@@ -0,0 +1,47 @@
+StarterPikachuBattleEntranceAnimation:
+ hlcoord 0, 5
+ ld c, 0
+.loop1
+ inc c
+ ld a, c
+ cp 9
+ ret z
+ ld d, 7 * 13
+ push bc
+ push hl
+.loop2
+ call .PlaceColumn
+ dec hl
+ ld a, d
+ sub 7
+ ld d, a
+ dec c
+ jr nz, .loop2
+ ld c, 2
+ call DelayFrames
+ pop hl
+ pop bc
+ inc hl
+ jr .loop1
+
+.PlaceColumn:
+ push hl
+ push de
+ push bc
+ ld e, 7
+.loop3
+ ld a, d
+ cp 7 * 7
+ jr nc, .okay
+ ld a, $7f
+.okay
+ ld [hl], a
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ inc d
+ dec e
+ jr nz, .loop3
+ pop bc
+ pop de
+ pop hl
+ ret