summaryrefslogtreecommitdiff
path: root/engine/predefs12.asm
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-11-28 17:55:14 -0500
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-11-28 17:55:14 -0500
commit2e3b58e6207997315cd69bf50968494b3b2b982b (patch)
tree104e499b82988166a41f778ac9f6e5132f307022 /engine/predefs12.asm
parent0f624fa59a3574fc401bcc52cdda4eccb315ff8f (diff)
BankA misc functions
predefsA.asm (replaces predefs12.asm), and LeechSeedEffect_
Diffstat (limited to 'engine/predefs12.asm')
-rwxr-xr-xengine/predefs12.asm71
1 files changed, 0 insertions, 71 deletions
diff --git a/engine/predefs12.asm b/engine/predefs12.asm
deleted file mode 100755
index 269a681e..00000000
--- a/engine/predefs12.asm
+++ /dev/null
@@ -1,71 +0,0 @@
-; b = new colour for BG colour 0 (usually white) for 4 frames
-ChangeBGPalColor0_4Frames: ; 480eb (12:40eb)
- call GetPredefRegisters
- ld a, [rBGP]
- or b
- ld [rBGP], a
- ld c, 4
- call DelayFrames
- ld a, [rBGP]
- and %11111100
- ld [rBGP], a
- ret
-
-PredefShakeScreenVertically: ; 480ff (12:40ff)
-; Moves the window down and then back in a sequence of progressively smaller
-; numbers of pixels, starting at b.
- call GetPredefRegisters
- ld a, 1
- ld [wDisableVBlankWYUpdate], a
- xor a
-.loop
- ld [$ff96], a
- call .MutateWY
- call .MutateWY
- dec b
- ld a, b
- jr nz, .loop
- xor a
- ld [wDisableVBlankWYUpdate], a
- ret
-
-.MutateWY ; 48119 (12:4119)
- ld a, [$ff96]
- xor b
- ld [$ff96], a
- ld [rWY], a
- ld c, 3
- jp DelayFrames
-
-PredefShakeScreenHorizontally: ; 48125 (12:4125)
-; Moves the window right and then back in a sequence of progressively smaller
-; numbers of pixels, starting at b.
- call GetPredefRegisters
- xor a
-.loop
- ld [$ff97], a
- call .MutateWX
- ld c, 1
- call DelayFrames
- call .MutateWX
- dec b
- ld a, b
- jr nz, .loop
-
-; restore normal WX
- ld a, 7
- ld [rWX], a
- ret
-
-.MutateWX ; 4813f (12:413f)
- ld a, [$ff97]
- xor b
- ld [$ff97], a
- bit 7, a
- jr z, .skipZeroing
- xor a ; zero a if it's negative
-.skipZeroing
- add 7
- ld [rWX], a
- ld c, 4
- jp DelayFrames