summaryrefslogtreecommitdiff
path: root/engine/overworld/update_map.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/update_map.asm')
-rw-r--r--engine/overworld/update_map.asm14
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm
index c494065c..92ae2b10 100644
--- a/engine/overworld/update_map.asm
+++ b/engine/overworld/update_map.asm
@@ -63,7 +63,7 @@ RedrawMapView:
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, -2 * 32
+ ld de, -2 * BG_MAP_WIDTH
add hl, de
ld a, h
and $3
@@ -73,23 +73,23 @@ RedrawMapView:
ld a, h
ld [wBuffer + 1], a ; this copy of the address is not used
ld a, 2
- ld [$ffbe], a
- ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen)
+ ld [hRedrawMapViewRowOffset], a
+ ld c, SCREEN_HEIGHT / 2 ; number of rows of 2x2 tiles (this covers the whole screen)
.redrawRowLoop
push bc
push hl
push hl
ld hl, wTileMap - 2 * SCREEN_WIDTH
ld de, SCREEN_WIDTH
- ld a, [$ffbe]
+ ld a, [hRedrawMapViewRowOffset]
.calcWRAMAddrLoop
add hl, de
dec a
jr nz, .calcWRAMAddrLoop
call CopyToRedrawRowOrColumnSrcTiles
pop hl
- ld de, $20
- ld a, [$ffbe]
+ ld de, BG_MAP_WIDTH
+ ld a, [hRedrawMapViewRowOffset]
ld c, a
.calcVRAMAddrLoop
add hl, de
@@ -104,7 +104,7 @@ RedrawMapView:
ld a, REDRAW_ROW
ld [hRedrawRowOrColumnMode], a
call DelayFrame
- ld hl, $ffbe
+ ld hl, hRedrawMapViewRowOffset
inc [hl]
inc [hl]
pop hl