Prev: EAA1 Up: Map Next: EAE3
EABF: Process logic for the current room
Used by the routine at 8184.
EABF LD A,(IY+$0F) Get the current character's room.
EAC2 LD ($B951),A Set this as the current room number. (B951)
EAC5 LD HL,$E80F Point HL at the first action table. (E80F)
EAC8 CALL $AC6C Get the pointer to the action table.
This entry point is used by the routines at EAE3, EAEB, EB95, EBC4, EBE2, EBED, EBFE, EC2B, EC34 and EDB3. At this point, HL points to the logic table of the current room.
EACB LD A,(HL) Put the next pattern in A.
EACC INC HL Move to the next position in the table.
EACD CP $FF Is this the end of the logic?
EACF RET Z Return if so.
EAD0 CP $F7 Is this an action?
EAD2 JR Z,$EAEB Process it if it is.
If this isn't an action, it's a pattern, so look it up.
EAD4 ADD A,A Double the pattern ID to get a word offset.
EAD5 LD E,A Put this in DE.
EAD6 LD D,$00
EAD8 PUSH HL Remember HL.
EAD9 LD HL,$E7E9 Add the base pointer for the match table. (E7E9)
EADC ADD HL,DE
EADD LD E,(HL) Put the address found in DE.
EADE INC HL
EADF LD D,(HL)
EAE0 POP HL Restore HL.
EAE1 PUSH DE Jump to the address pointed to by DE.
EAE2 RET
Prev: EAA1 Up: Map Next: EAE3