From: Lukas Krickl Date: Mon, 21 Jul 2025 16:42:49 +0000 (+0200) Subject: mapgen: Added notes about seed input X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=29e42e50cb86e9655fd0133bd772679160ab54c0;p=gbrg%2F.git mapgen: Added notes about seed input --- diff --git a/TODO.md b/TODO.md index 14e55ae..4e498e5 100644 --- a/TODO.md +++ b/TODO.md @@ -95,6 +95,8 @@ [ ] Each level has its onw post generation step that can be run [ ] Each level has a hard-cided post step that places the exit to the next level [ ] Each level has a shortcut to town (previous entrance) +[ ] Save map state (e.g. actor flags, chest flags, door flags, loot flags with seed and map ptr used) in sram + Do not save the actual generated map -> instead generate it again on demand ## Classes [ ] Warrior -> can wear heavy armor, long sowrds, axes, hammers, shields, bucklers, short sowrds, learn magic of circle 1 diff --git a/src/mapgen.s b/src/mapgen.s index 8feb43f..1223e52 100644 --- a/src/mapgen.s +++ b/src/mapgen.s @@ -1,4 +1,5 @@ + ; places a rectangular room ; into the currently loaded map ; 1) searches the map for a suitable location @@ -11,9 +12,13 @@ ; inputs: ; hl: writable decompressed tile array (e.g [map]) ; of size MAP_H * MAP_W + ; de: the seed used ; returns: ; a == 0: room was unable to be placed ; a == 1: room was placed + ; de: seed after generation has finished + ; preserves: + ; srand mapgen_make_room: ; roll a room size