diff options
Diffstat (limited to 'engine/overworld/update_map.asm')
-rw-r--r-- | engine/overworld/update_map.asm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm index 8577b9e7..92ae2b10 100644 --- a/engine/overworld/update_map.asm +++ b/engine/overworld/update_map.asm @@ -50,12 +50,12 @@ RedrawMapView: ld a, [wIsInBattle] inc a ret z - ld a, [H_AUTOBGTRANSFERENABLED] + ld a, [hAutoBGTransferEnabled] push af ld a, [hTilesetType] push af xor a - ld [H_AUTOBGTRANSFERENABLED], a + ld [hAutoBGTransferEnabled], a ld [hTilesetType], a ; no flower/water BG tile animations call LoadCurrentMapView call RunDefaultPaletteCommand @@ -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 @@ -114,7 +114,7 @@ RedrawMapView: pop af ld [hTilesetType], a pop af - ld [H_AUTOBGTRANSFERENABLED], a + ld [hAutoBGTransferEnabled], a ret CompareHLWithBC: |