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