diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-06-30 16:56:55 -0700 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2017-06-30 16:56:55 -0700 |
commit | c1ac42bef721d196679abd041fe8f55b3d7d4dc7 (patch) | |
tree | 410749f1eee3d60dbab48c89c22dadbe7cdba148 /engine | |
parent | ad13bd10866520c0cfe2b057755e4b7ab710e8c8 (diff) |
Move ball gfx loading routines into their own file
Diffstat (limited to 'engine')
-rwxr-xr-x | engine/ball_gfx.asm | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/engine/ball_gfx.asm b/engine/ball_gfx.asm new file mode 100755 index 0000000..2aff0d3 --- /dev/null +++ b/engine/ball_gfx.asm @@ -0,0 +1,91 @@ +LoadBallGfx: ; 0xdcc3
+ xor a
+ ld [wd4c8], a
+ ld a, [wBallType]
+ cp GREAT_BALL
+ jr nc, .notPokeBall
+ ld a, Bank(PinballPokeballGfx)
+ ld hl, PinballPokeballGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notPokeBall
+ cp ULTRA_BALL
+ jr nc, .notGreatBall
+ ld a, Bank(PinballGreatballGfx)
+ ld hl, PinballGreatballGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notGreatBall
+ cp MASTER_BALL
+ jr nc, .notUltraBall
+ ld a, Bank(PinballUltraballGfx)
+ ld hl, PinballUltraballGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notUltraBall
+ ld a, Bank(PinballMasterballGfx)
+ ld hl, PinballMasterballGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+LoadMiniBallGfx: ; 0xdd12
+ ld a, $1
+ ld [wd4c8], a
+ ld a, [wBallType]
+ cp GREAT_BALL
+ jr nc, .notPokeBall
+ ld a, Bank(PinballPokeballMiniGfx)
+ ld hl, PinballPokeballMiniGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notPokeBall
+ cp ULTRA_BALL
+ jr nc, .notGreatBall
+ ld a, Bank(PinballGreatballMiniGfx)
+ ld hl, PinballGreatballMiniGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notGreatBall
+ cp MASTER_BALL
+ jr nc, .notUltraBall
+ ld a, Bank(PinballUltraballMiniGfx)
+ ld hl, PinballUltraballMiniGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+.notUltraBall
+ ld a, Bank(PinballMasterballMiniGfx)
+ ld hl, PinballMasterballMiniGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
+
+Func_dd62: ; 0xdd62
+ ld a, $2
+ ld [wd4c8], a
+ ld a, $2a
+ ld hl, PinballBallMiniGfx
+ ld de, vTilesOB tile $40
+ ld bc, $0200
+ call LoadOrCopyVRAMData
+ ret
|