summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorU-Daniel-Laptop\Daniel <corrnondacqb@yahoo.com>2014-04-17 17:15:43 -0400
committerU-Daniel-Laptop\Daniel <corrnondacqb@yahoo.com>2014-04-17 17:15:43 -0400
commitb6fd865414d57c68cd668600eba43d2ee3e47065 (patch)
tree0c7fd5b8c54056892dc4118d0d462d4830402251 /engine
parentec6ae2536fae1008458d0ebee6b8c73a0e055065 (diff)
wram.asm and some comments
Diffstat (limited to 'engine')
-rwxr-xr-xengine/bank7.asm8
-rwxr-xr-xengine/home.asm3
-rwxr-xr-xengine/overworldmap.asm5
3 files changed, 12 insertions, 4 deletions
diff --git a/engine/bank7.asm b/engine/bank7.asm
index 2885df8..e25220d 100755
--- a/engine/bank7.asm
+++ b/engine/bank7.asm
@@ -4,7 +4,7 @@ Func_1c056: ; 1c056 (7:4056)
push hl
push bc
push de
- ld a, [$d32f]
+ ld a, [wCurMap]
add a
ld c, a
ld b, $0
@@ -14,9 +14,9 @@ Func_1c056: ; 1c056 (7:4056)
ld h, [hl]
ld l, a
ld bc, $0005
- ld a, [$d330]
+ ld a, [wPlayerXCoord]
ld d, a
- ld a, [$d331]
+ ld a, [wPlayerYCoord]
ld e, a
.asm_1c072
ld a, [hli]
@@ -303,7 +303,7 @@ Func_1c33b: ; 1c33b (7:433b)
push hl
push bc
push de
- ld a, [$d32f]
+ ld a, [wCurMap]
add a
ld c, a
add a
diff --git a/engine/home.asm b/engine/home.asm
index f90dd3b..1bdad46 100755
--- a/engine/home.asm
+++ b/engine/home.asm
@@ -716,6 +716,8 @@ Func_0863: ; 0863 (0:0863)
INCBIN "baserom.gbc",$0879,$09ae - $0879
+; this function affects the stack so that it returns to the pointer following the rst call
+; similar to rst 28, except this always loads bank 1
RST18: ; 09ae (0:09ae)
push hl
push hl
@@ -760,6 +762,7 @@ Func_09ce: ; 09ce (0:09ce)
INCBIN "baserom.gbc",$09dc,$09e9 - $09dc
+; this function affects the stack so that it returns to the three byte pointer following the rst call
RST28: ; 09e9 (0:09e9)
push hl
push hl
diff --git a/engine/overworldmap.asm b/engine/overworldmap.asm
index 31f762c..1ed17ff 100755
--- a/engine/overworldmap.asm
+++ b/engine/overworldmap.asm
@@ -151,6 +151,11 @@ LoadOverworldMapSelection: ; 10f61 (4:4f61)
pop hl
ret
+; each entry in the overworld map is four bytes
+; 1: map id
+; 2: player's x coordinate when entering the map
+; 2: player's y coordinate when entering the map
+; 4: 00
OverworldMapIndexes: ; 10f88 (4:4f88)
db $00,$00,$00,$00
db MASON_LABORATORY, $0E,$1A,$00