Prev: A202 Up: Map Next: A24A
A222: People : Determine persons next action.
Used by the routine at Person_MoveForward.
Input
IX Ptr to current person.
Output
People_DecideAction A222 LD A,(IX+$0D) See if person is still waiting.
A225 AND A
A226 JR Z,People_DecideAction_0 Waiting over, do next action.
A228 DEC (IX+$0D) Wait.
A22B RET
Get next action.
People_DecideAction_0 A22C LD L,(IX+$14)
A22F LD H,(IX+$15)
A232 LD A,L
A233 OR H
A234 JP NZ,_a4ff_People
A237 XOR A
A238 LD (_a19e),A
A23B LD L,(IX+$16) Get index of current action.
A23E LD H,$00 Work out address of function.
A240 ADD HL,HL
A241 LD DE,People_ActionTable
A244 ADD HL,DE
A245 LD E,(HL) Get address and jump to it.
A246 INC HL
A247 LD D,(HL)
A248 EX DE,HL
A249 JP (HL)
Prev: A202 Up: Map Next: A24A