- Generate a map of rooms
- Maps are stored in sram
-- No backtracking
- Rooms are taken from a set of base rooms in rom
+- Each room has 4 possible exit pointers which are set to 0000 by default
+- When a room is made the next direction will be picked
+- The generator then sets the exit pointer accordingly
+- Low chance to backtrack in either direction.
+- If direction is already taken, try again
+- If it fails after 4 tries advance to a new room and try again
+- Do this until all rooms are filled
; map region
+#define NORTH 0
+#define EAST 1
+#define SOUTH 2
+#define WEST 3
+
#define MAP_W 10
#define MAP_H 10
#define MAP_TOTAL_ROOMS MAP_W * MAP_H
; rooms are 9x9 meta tiles
#define ROOM_W 10
#define ROOM_H 8
+#define ROOM_EXITS_MAX 4
; struct room
; FIXME: thse ptrs are currently in big endian...
.de room_tiles, 2 ; be ptr to tiles
.de room_flags, 2 ; be ptr to flags
.de room_actor_table, 2 ; be ptr of actor table to be used
+.de room_exit_table, 2 ; list of ptrs to new rooms
.de room_size, 0
; room flags
; bytes 1-n: n bytes of actor data to be copied to actor table
curr_room_init_act: .adv 2
+ ; ptr to exits
+curr_room_exits: .adv 2
+
; drawing related flags
; UI flags