diff options
author | Astatin <[email protected]> | 2025-07-01 15:20:38 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-07-01 15:20:38 +0200 |
commit | bcc4605c06e2b36698ae05eeda1f9078bfbcd2c7 (patch) | |
tree | 5c312652e6659ed8c5cc292590f4d4a0e3937133 /map/loading/romtiles.gbasm | |
parent | fe3bd75e5844c90a0d82c32d7c08782d5bf32f52 (diff) |
Load tilemap or generation depending on dungeon flags
Diffstat (limited to 'map/loading/romtiles.gbasm')
-rw-r--r-- | map/loading/romtiles.gbasm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/map/loading/romtiles.gbasm b/map/loading/romtiles.gbasm index 989a201..e35a1e5 100644 --- a/map/loading/romtiles.gbasm +++ b/map/loading/romtiles.gbasm @@ -1,9 +1,17 @@ -Load_ROM_Block: ; X in A, Y in B +Load_Block: PUSH BC PUSH AF + PUSH AF + LD A, $mem_dungeon_flags + AND $01 + JP Z, =Load_Block_From_Solid.AF_AF_BC_Push + POP AF + + .After_AF_BC_Push: + CP $20 - JP NC, =Load_Block_From_Solid.After_AF_BC_Push + JP NC, =Load_Block_From_Solid.AF_BC_Push PUSH BC LD C, A @@ -11,14 +19,14 @@ Load_ROM_Block: ; X in A, Y in B CP $20 LD A, C POP BC - JP NC, =Load_Block_From_Solid.After_AF_BC_Push + JP NC, =Load_Block_From_Solid.AF_BC_Push +Load_ROM_Block: ; X in A, Y in B PUSH DE PUSH HL LD C, A - CALL =Construct_Tile_Address LD A, $mem_map_loading_flags @@ -42,8 +50,6 @@ Load_ROM_Block: ; X in A, Y in B OR C LD C, A - DBG - LD A, L ADD C LD L, A |