call room_load_actors
ret
+ ; define positions that the player must have
+ ; to be considered inside a tile
+#define EXPECTED_POS_NORTH_X 0
+#define EXPECTED_POS_NORTH_Y 0
+
; calls rom goto based on player position
+ ; defaults to exit special if no position is found for
+ ; a valid exit
; inputs:
; curr_room_exits: ptr to exits table
; player_x/y: player position
room_goto_player_pos:
+ ld a, [player_y]
+ ld d, a ; d = player y
+ div16 d ; d = player y tile
+
+ ld a, [player_x]
+ ld e, a ; d = player x
+ div16 e ; d = player x tile
+
+ ; compare to expected positions to decide what to do
+
+ ; default use special exit
ld a, EXIT_SPECIAL
; transitions to a new room