Prev: AED5 Up: Map Next: AEEA
AED7: Get the next room that a computer controlled character should swap items
Used by the routine at A92C.
Input
A On return, holds the room number
AED7 PUSH HL Remember HL.
AED8 LD HL,($AED5) Get the current pointer to the swap list. (AED5)
AEDB LD A,(HL) Get the next room.
AEDC CP $FF Is it an end marker?
AEDE JR NZ,$AEE4 Jump forward if it isn't.
AEE0 LD HL,$AEEA Otherwise move back to the start of the list. and get that item.
AEE3 LD A,(HL)
AEE4 INC HL Move to the next position in the table and store it.
AEE5 LD ($AED5),HL
AEE8 POP HL Restore HL and return.
AEE9 RET
Prev: AED5 Up: Map Next: AEEA