aboutsummaryrefslogtreecommitdiff
path: root/map/loading.gbasm
diff options
context:
space:
mode:
Diffstat (limited to 'map/loading.gbasm')
-rw-r--r--map/loading.gbasm17
1 files changed, 11 insertions, 6 deletions
diff --git a/map/loading.gbasm b/map/loading.gbasm
index 8b3f414..bb3410b 100644
--- a/map/loading.gbasm
+++ b/map/loading.gbasm
@@ -104,12 +104,7 @@ Load_Column: ; (+1/-1 direction in B)
POP AF
RET
-Load_Block: ; X in A, Y in B
- PUSH BC
- PUSH AF
- PUSH DE
-
- ; Construct Tile Map address from A and B in DE
+Construct_Tile_Address: ; Construct Tile Map address from A and B in DE
PUSH AF
PUSH BC
@@ -134,9 +129,19 @@ Load_Block: ; X in A, Y in B
LD A, D
OR $98
LD D, A
+
POP BC
POP AF
+ RET
+
+Load_Block: ; X in A, Y in B
+ PUSH BC
+ PUSH AF
+ PUSH DE
+
+ CALL =Construct_Tile_Address
+
PUSH AF
PUSH DE