Browse Source

Update VRAM pointer when copying row of zeros to map

master
Forest Belton 2 years ago
parent
commit
44b9b0fe99
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/map.s

+ 4
- 4
src/map.s View File

@ -113,9 +113,8 @@ Map_Load::
; @param c Map Y coordinate (signed)
; @param hl Start of the row to write
write_map_row:
push bc ; sp + 7
push de ; sp + 5
push hl ; sp + 3
push bc
push de
; If Y < 0, write a row of 0s
bit 7, c
@ -135,12 +134,13 @@ write_map_row:
dec d
jr nz, .zero_row_loop
.zero_row_done:
pop hl
pop de
pop bc
ret
.begin_writing:
push hl
; Allocate 2 bytes for map pointer
; Allocate 1 byte for number of tiles left
add sp, -3

Loading…
Cancel
Save