Prev: CA5E Up: Map Next: CA89
CA70: Has the player walked out of the room?
Used by the routine at move_player_apply.
A room can be left only through an archway, and only walking the way the player faces. An archway sets bit 0 of +$07 on the player while he is close to it (chk_plyr_spec_near_arch); this clears it and dispatches through screen_move_tbl on the facing. Each of the four routines there decides whether this frame's move carries the player wholly past the line of the wall.
The room's half-sizes from $5BAB are pushed for them, because the dispatch uses HL.
Input
IX the player's bottom record
handle_exit_screen CA70 LD A,(IX+$0C) not during the room-entry walk
CA73 AND $F0
CA75 RET NZ
CA76 BIT 0,(IX+$07) not near an archway; the flag is used once
CA7A RET Z
CA7B RES 0,(IX+$07)
CA7F LD BC,screen_move_tbl the room's X and Y half-sizes, for the exit routines
CA82 LD HL,($5BAB)
CA85 PUSH HL
CA86 JP dispatch_on_facing
Prev: CA5E Up: Map Next: CA89