From 4a4ff1db8fe026ced0530f8c2531033da43164e6 Mon Sep 17 00:00:00 2001 From: Astatin Date: Tue, 27 Aug 2024 18:33:46 +0900 Subject: Add objects and spawn bunny & goal in a random room --- map/loading.gbasm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'map/loading.gbasm') 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 -- cgit v1.2.3-70-g09d2