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