Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions home/copy2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -161,39 +161,39 @@ CopyVideoDataDouble::

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
Expand All @@ -215,7 +215,7 @@ 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, " "
Expand Down