mapgen: added stub for room generator
authorLukas Krickl <lukas@krickl.dev>
Sat, 19 Jul 2025 13:54:07 +0000 (15:54 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 19 Jul 2025 13:54:07 +0000 (15:54 +0200)
src/main.s
src/mapgen.s [new file with mode: 0644]

index 825064a6d36984458233dd10ea008cc956e676c8..ad78fb55ac455c76e5319f157a2a553d6f566041 100644 (file)
@@ -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 (file)
index 0000000..42eca12
--- /dev/null
@@ -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