Browse Source

Remove unused LAST_SC* variables

master
Forest Belton 3 years ago
parent
commit
9a45e20e8a
2 changed files with 11 additions and 9 deletions
  1. +10
    -0
      inc/util.inc
  2. +1
    -9
      src/map.s

+ 10
- 0
inc/util.inc View File

@ -64,3 +64,13 @@ MACRO slan
sla \1
ENDR
ENDM
; Performs SRL on a register N times
; \1 8-bit register
; \2 N, a value 1-8
MACRO srln
ASSERT 1 <= \2 && \2 <= 8
REPT \2
srl \1
ENDR
ENDM

+ 1
- 9
src/map.s View File

@ -6,9 +6,6 @@ SECTION "Map Data", WRAM0
PAGEX:: DB ; X coordinate to enqueue map column at
PAGEY:: DB ; Y coordinate to enqueue map row at
LAST_SCX:: DB ; Value of SCX last frame
LAST_SCY:: DB ; Value of SCY last frame
PENDING_ROW_PTR:: DW ; Where to write pending row data (0 = no write)
PENDING_ROW_DATA:: DS SCRN_VX_B ; Row to be written
@ -39,11 +36,9 @@ Map_Load::
; Initialize scroll state
ld a, INIT_SCX
ld [rSCX], a
ld [LAST_SCX], a
ld a, INIT_SCY
ld [rSCY], a
ld [LAST_SCY], a
ld a, 8
ld [PAGEX], a
@ -245,10 +240,7 @@ Map_Scroll::
ld [PAGEX], a
.done:
ld hl, LAST_SCY
ld a, [rSCY]
ld [hl], a
; TODO: Turn jumps here into rets
ret
Map_Update::

Loading…
Cancel
Save