From 44b9b0fe994231024a3f643db0449d09f0aea528 Mon Sep 17 00:00:00 2001 From: Forest Belton <65484+forestbelton@users.noreply.github.com> Date: Fri, 9 Jul 2021 05:49:55 -0400 Subject: [PATCH] Update VRAM pointer when copying row of zeros to map --- src/map.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map.s b/src/map.s index 341a0f8..1e45abd 100644 --- a/src/map.s +++ b/src/map.s @@ -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