ref: c7fdf5f9ec4eb6597278fc234dbd2349b893f528
parent: 7b47aeaf79946ca3edecff16aafc2c5fd5c7af73
author: mid-kid <esteve.varela@gmail.com>
date: Thu Jun 6 19:59:13 EDT 2019
Fix overworld scrolling function names
--- a/engine/overworld/player_step.asm
+++ b/engine/overworld/player_step.asm
@@ -126,25 +126,25 @@
.step_down
call .ScrollOverworldMapDown
call LoadMapPart
- call ScrollMapUp
+ call ScrollMapDown
ret
.step_up
call .ScrollOverworldMapUp
call LoadMapPart
- call ScrollMapDown
+ call ScrollMapUp
ret
.step_left
call .ScrollOverworldMapLeft
call LoadMapPart
- call ScrollMapRight
+ call ScrollMapLeft
ret
.step_right
call .ScrollOverworldMapRight
call LoadMapPart
- call ScrollMapLeft
+ call ScrollMapRight
ret
.ScrollOverworldMapDown:
@@ -164,14 +164,14 @@
cp 2 ; was 1
jr nz, .done_down
ld [hl], 0
- call .Add6ToOverworldMapAnchor
+ call .ScrollMapDataDown
.done_down
ret
-.Add6ToOverworldMapAnchor:
+.ScrollMapDataDown:
ld hl, wOverworldMapAnchor
ld a, [wMapWidth]
- add 6
+ add 3 * 2 ; surrounding tiles
add [hl]
ld [hli], a
ret nc
@@ -195,14 +195,14 @@
cp -1 ; was 0
jr nz, .done_up
ld [hl], $1
- call .Sub6FromOverworldMapAnchor
+ call .ScrollMapDataUp
.done_up
ret
-.Sub6FromOverworldMapAnchor:
+.ScrollMapDataUp:
ld hl, wOverworldMapAnchor
ld a, [wMapWidth]
- add 6
+ add 3 * 2 ; surrounding tiles
ld b, a
ld a, [hl]
sub b
@@ -227,11 +227,11 @@
cp -1
jr nz, .done_left
ld [hl], 1
- call .DecrementwOverworldMapAnchor
+ call .ScrollMapDataLeft
.done_left
ret
-.DecrementwOverworldMapAnchor:
+.ScrollMapDataLeft:
ld hl, wOverworldMapAnchor
ld a, [hl]
sub 1
@@ -256,11 +256,11 @@
cp 2
jr nz, .done_right
ld [hl], 0
- call .IncrementwOverworldMapAnchor
+ call .ScrollMapDataRight
.done_right
ret
-.IncrementwOverworldMapAnchor:
+.ScrollMapDataRight:
ld hl, wOverworldMapAnchor
ld a, [hl]
add 1
--- a/home/map.asm
+++ b/home/map.asm
@@ -1151,7 +1151,7 @@
ld [hl], 0 ; unmasked
ret
-ScrollMapDown::
+ScrollMapUp::
hlcoord 0, 0
ld de, wBGMapBuffer
call BackupBGMapRow
@@ -1166,7 +1166,7 @@
ldh [hBGMapUpdate], a
ret
-ScrollMapUp::
+ScrollMapDown::
hlcoord 0, SCREEN_HEIGHT - 2
ld de, wBGMapBuffer
call BackupBGMapRow
@@ -1189,7 +1189,7 @@
ldh [hBGMapUpdate], a
ret
-ScrollMapRight::
+ScrollMapLeft::
hlcoord 0, 0
ld de, wBGMapBuffer
call BackupBGMapColumn
@@ -1204,7 +1204,7 @@
ldh [hBGMapUpdate], a
ret
-ScrollMapLeft::
+ScrollMapRight::
hlcoord SCREEN_WIDTH - 2, 0
ld de, wBGMapBuffer
call BackupBGMapColumn