From c1c632118f6c40bcd99437aead88d32e9879d30f Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 19 Jul 2025 15:54:07 +0200 Subject: [PATCH] mapgen: added stub for room generator --- src/main.s | 1 + src/mapgen.s | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/mapgen.s diff --git a/src/main.s b/src/main.s index 825064a..ad78fb5 100644 --- a/src/main.s +++ b/src/main.s @@ -60,6 +60,7 @@ main: #include "ui.s" #include "audio.s" #include "map.s" +#include "mapgen.s" #include "state.s" #include "tiles.inc" #include "unit.s" diff --git a/src/mapgen.s b/src/mapgen.s new file mode 100644 index 0000000..42eca12 --- /dev/null +++ b/src/mapgen.s @@ -0,0 +1,15 @@ + + ; places a rectangular room + ; into the currently loaded map + ; 1) searches the map for a suitable location + ; 2) draws the room + ; 3) places doors + ; 4) places between 1-3 actors from a valid actor list + ; actor placement may fail if the actor table is full + ; inputs: + ; a map must be loaded + ; returns: + ; a == 0: room was unable to be placed + ; a == 1: room was placed +mapgen_make_room: + ret -- 2.30.2