Prev: AAB2 Up: Map Next: AB09
AADD: Movement routine 1. Check a character can be moved right, and do so if possible
Used by the routine at A92C.
AADD LD A,(IY+$0A) Get the Y co-ordinate.
AAE0 CP $98 Is it the floor?
AAE2 JR Z,$AAF9 Jump forward if so.
AAE4 LD A,(IY+$0F) Get the room number.
AAE7 CP $1F Is it the sewer?
AAE9 JR NZ,$AAF9 Jump forward if not. The sewer requires additional logic with computer characters.
AAEB LD A,(IY+$05) Get the X co-ordinate.
AAEE CP $78 Is it greater than 78?
AAF0 JR C,$AAF9 Jump forward if so.
AAF2 LD (IY+$3C),$FF Set to move left.
AAF6 JP $B288 Move the character
AAF9 LD (IY+$3C),$01 Set to move right.
AAFD CALL $B288 Move the character
AB00 LD A,(IY+$05) Get the X co-ordinate.
AB03 CP $F0 Is it at the right edge?
AB05 JP Z,$AE5D If so, signal this is the end of the room.
AB08 RET Otherwise return.
Prev: AAB2 Up: Map Next: AB09