Prev: CABA Up: Map Next: CB0E
CAF3: Leave by the east wall?
As screen_west the other way: out if the west edge after the move is at or past the east wall at $80 plus the X half-size. X is set to the marker $FF (arrive at the west wall) and the room number goes up one within the row.
Input
HL the room's half-sizes (pushed by handle_exit_screen)
screen_east CAF3 POP HL L = the east wall
CAF4 LD A,L
CAF5 ADD A,$80
CAF7 LD L,A
CAF8 LD A,(IX+$01) X + dX - half-width short of it: stay
CAFB ADD A,(IX+$09)
CAFE SUB (IX+$04)
CB01 CP L
CB02 RET C
CB03 LD (IX+$01),$FF arrive at the west wall
CB07 LD A,(IX+$08) room + 1
CB0A LD L,A
CB0B INC A
CB0C JR screen_e_w
Prev: CABA Up: Map Next: CB0E