diff options
author | Astatin <[email protected]> | 2025-06-17 17:42:44 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-06-17 17:42:44 +0200 |
commit | b84a1c2c0ebb484e23753c2f9db8742389fcc99a (patch) | |
tree | 0036439ad1a5cc4c08c4bef79c0255b851a894f2 /map/dungeons.gbasm | |
parent | a9142d0163f41c89196ea201ce8245899c701b82 (diff) |
loading ldtk tilemaps + adding dungeon structure that can be loaded at runtime
Diffstat (limited to 'map/dungeons.gbasm')
-rw-r--r-- | map/dungeons.gbasm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/map/dungeons.gbasm b/map/dungeons.gbasm index 4a37830..6c642ce 100644 --- a/map/dungeons.gbasm +++ b/map/dungeons.gbasm @@ -1 +1,41 @@ +; struct dungeon +; { +; name: *char (u24=bank+ptr), +; flags: 0b000mTSFM, +; M = whether or not this dungeon has a pregenerated tilemap (0 means that it's randomly generated) +; F = whether or not the floors are counted +; S = whether or not enemies can spawn +; T = whether or not there is a top bar shown +; m = whether or not you can open the attack menu +; tilemap: ptr (u24=bank+ptr) +; generation_event_size: u8 (size of the generation_eents_structure +; generation_events: [x]struct (8 bytes) { +; ...see definitions +; } +; max_floor: u8 +; inverted_max_floor: u8 (1/max_floor) +; spawning_pattern: [8]struct (5 bytes){ +; entities_idx: [4]u8 +; spawn_frequencies: u8 +; } + +.MACRODEF GEN_EVENT_DIALOGUE floor =dialogue + $start: + .DB low($floor), $01 + .DB bank(=dialogue), high(ptr(=dialogue)), low(ptr(=dialogue)) + .PADTO =$start+8 +.END + +.MACRODEF GEN_EVENT_SPECIAL_ENTITY floor entity_idx + $start: + .DB low($floor), $02, low($entity_idx) + .PADTO =$start+8 +.END + +.MACRODEF GEN_EVENT_REMOVE_STAIRS floor + $start: + .DB low($floor), $03 + .PADTO =$start+8 +.END + .INCLUDE "map/dungeons/morningforest.gbasm" |