--- /dev/null
+ ; struct for base_room2
+base_room2_struct:
+dw base_room2_bg
+dw base_room2_flags
+dw base_room2_actors
+dw room_empty_exits
+base_room2_actors:
+.db 8
+.db 1 , 64 , 72 , 0
+.db 1 , 48 , 56 , 0
+base_room2_bg:
+.db 0x60, 0x62, 0x62, 0x64, 0x40, 0x40, 0x66, 0x62, 0x62, 0x68, 0x4c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x6a, 0x46, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x60, 0x68, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x6c, 0x6e, 0x40, 0x40, 0x40, 0x40, 0x48, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xe2, 0x4c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x6a, 0x6c, 0x4a, 0x4a, 0x42, 0x40, 0x40, 0x44, 0x4a, 0x4a, 0x6e
+base_room2_flags:
+.db 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1
; curr_room_exits: ptr to exits table
; a: direction EAST, WEST, NORTH, SOUTH, EXIT_SPECIAL
room_goto:
+ ; save a for later
+ push af
; TODO: save current tables back
call disableinterrutpts
call vblank_wait
;call lcd_off
+
ld hl, curr_room_exits ; ptr to exit table
ld a, [hl+]
ld c, a
ld a, [hl]
ld b, a ; bc = exit table
+ pop af ; get back a
+ ; a * 2
+ add a, a
+
ld h, 0
ld l, a
add hl, bc ; hl = exit table + exit direction
; this can be copied and modified
; by the map gen
#include "./maps/base_room.s"
+#include "./maps/base_room2.s"
; exit table for empty exits
room_empty_exits:
+dw base_room2_struct
dw base_room_struct
-dw base_room_struct
-dw base_room_struct
+dw base_room2_struct
dw base_room_struct
dw base_room_struct