aboutsummaryrefslogtreecommitdiffstats
path: root/home/copy2.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2025-11-12 17:56:10 -0600
committerdannye <33dannye@gmail.com>2025-11-12 17:56:10 -0600
commit324ae167d15ae4eef3cda411e10201661e57d88d (patch)
tree86c2b73ce1262f12c1b3eb82874e8572e80e583f /home/copy2.asm
parentSeparate surfing Pikachu graphics from audio engine code (diff)
parentUse features of RGBDS 1.0.0 (#537) (diff)
downloadpokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.tar.gz
pokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.tar.xz
pokeyellow-324ae167d15ae4eef3cda411e10201661e57d88d.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'home/copy2.asm')
-rw-r--r--home/copy2.asm24
1 files changed, 12 insertions, 12 deletions
diff --git a/home/copy2.asm b/home/copy2.asm
index 4acedf82..a9232034 100644
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -172,39 +172,39 @@ GetFarByte::
ClearScreenArea::
; Clear tilemap area cxb at hl.
- ld a, " " ; blank tile
- ld de, 20 ; screen width
-.y
+ ld a, ' '
+ ld de, SCREEN_WIDTH
+.loopRows
push hl
push bc
-.x
+.loopTiles
ld [hli], a
dec c
- jr nz, .x
+ jr nz, .loopTiles
pop bc
pop hl
add hl, de
dec b
- jr nz, .y
+ jr nz, .loopRows
ret
CopyScreenTileBufferToVRAM::
; Copy wTileMap to the BG Map starting at b * $100.
; This is done in thirds of 6 rows, so it takes 3 frames.
- ld c, 6
+ ld c, SCREEN_HEIGHT / 3
- ld hl, $600 * 0
+ lb hl, 0, 0
decoord 0, 6 * 0
call .setup
call DelayFrame
- ld hl, $600 * 1
+ lb hl, SCREEN_HEIGHT / 3, 0
decoord 0, 6 * 1
call .setup
call DelayFrame
- ld hl, $600 * 2
+ lb hl, 2 * SCREEN_HEIGHT / 3, 0
decoord 0, 6 * 2
call .setup
jp DelayFrame
@@ -226,10 +226,10 @@ CopyScreenTileBufferToVRAM::
ClearScreen::
; Clear wTileMap, then wait
; for the bg map to update.
- ld bc, 20 * 18
+ ld bc, SCREEN_AREA
inc b
hlcoord 0, 0
- ld a, " "
+ ld a, ' '
.loop
ld [hli], a
dec c