.db 1 , 48 , 24 , 0
.db 1 , 48 , 136 , 0
.db 1 , 112 , 40 , 0
-.db 1 , 32 , 72 , 0
-.db 1 , 112 , 104 , 0
-.db 1 , 32 , 88 , 0
-.db 1 , 32 , 56 , 0
+.db 0 , 16 , 8 , 0
+.db 0 , 16 , 8 , 0
+.db 0 , 16 , 8 , 0
+.db 0 , 16 , 8 , 0
base_room4_bg:
.db 0x60, 0x62, 0x62, 0x64, 0x62, 0x62, 0x66, 0x62, 0x62, 0x68, 0x4c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x6a, 0x46, 0x40, 0x40, 0x82, 0x82, 0x82, 0x82, 0x40, 0x40, 0xe0, 0x4c, 0x40, 0x82, 0x40, 0x40, 0x40, 0x40, 0x82, 0x40, 0x6a, 0x4c, 0x40, 0x82, 0x40, 0x40, 0x40, 0x40, 0x82, 0x40, 0x6a, 0x48, 0x40, 0x40, 0x40, 0x82, 0x82, 0x40, 0x40, 0x40, 0xe2, 0x4c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x6a, 0x6c, 0x4a, 0x4a, 0x42, 0x4a, 0x4a, 0x44, 0x4a, 0x4a, 0x6e
base_room4_flags:
ld h, a
ld l, b ; hl = room table max length
ld a, [hl+] ; hl = first room entry
+ dec a ; -1 for mask
ld b, a ; b = max length of room table
; c = previous room selection
; store for next iteration
ld [mapgen_last_room], a
+ add a, a ; a * 2 for ptr offset
ld b, 0
ld c, a
add hl, bc ; base + random offset