; hl: writable decompressed tile array (e.g [map])
; of size MAP_H * MAP_W
; de: the seed used
+ ; map_header: the current map header
; returns:
; a == 0: room was unable to be placed
; a == 1: room was placed
call mapgen_place_special_room
+ call mapgen_place_actors
+
; restore seed
pop bc
mapgen_fix_door_fixup c_size, RPRW
ret
+
+ ; places actors from a valid actor table
+ ; in the current map's header. This will overwrite the
+ ; header loaded by map_load. Preserves player entry.
+ ; inputs:
+ ; a loaded map
+ ; [map_header] ptr
+mapgen_place_actors:
+ ; load map ptr
+ ld a, [map_header]
+ ld l, a
+ ld a, [map_header+1]
+ ld h, a
+
+ ret