- 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
+
+## Room transition
+
+When a player hits the edge of the map a room transition should start.
+A player can either go north, west, east or south.
+The target room of a transition should be stored in a room exit table.
+When a transition happens the state of the previous room should be written back to sram (e.g. actor table).
+If possible make the animation smooth instead of simply blanking the screen.
call room_load_actors
ret
+ ; calls rom goto based on player position
+ ; inputs:
+ ; curr_room_exits: ptr to exits table
+ ; player_x/y: player position
+room_goto_player_pos:
+ ld a, NORTH
+
; transitions to a new room
; that is part of the map:
; inputs:
; exit table for empty exits
room_empty_exits:
-.db 0x00, 0x00
-.db 0x00, 0x00
-.db 0x00, 0x00
-.db 0x00, 0x00
+dw base_room_struct
+dw base_room_struct
+dw base_room_struct
+dw base_room_struct