Prev: 9AA0 Up: Map Next: 9B02
9ACD: Tell the player an object has just come into view
Used by the routine at ACTOR_TRIES.
Prints the message at DE with the object's name if the object is now where the player is and was not before -- HL points at where it was.
Input
A The object
HL Where it was
DE The message
ANNOUNCE_ARRIVAL 9ACD CP $FF
9ACF RET Z
9AD0 AND A
9AD1 RET Z
9AD2 LD B,A
9AD3 LD A,(PLAYER_IN_DARK)
9AD6 CP $02
9AD8 RET Z
9AD9 LD A,B
9ADA CALL LOCATION_OF
9ADD LD C,A
9ADE CP (HL)
9ADF RET Z
9AE0 LD A,(PLAYER_AT)
9AE3 CP C
9AE4 RET NZ
9AE5 LD A,(PLAYER_MOVED)
9AE8 AND A
9AE9 RET Z
9AEA LD A,$01
9AEC LD (PRINTING_ON),A
9AEF PUSH DE
9AF0 POP HL
9AF1 LD A,B
9AF2 CALL GET_OBJECT
9AF5 PUSH DE
9AF6 LD DE,$0008
9AF9 ADD IX,DE
9AFB POP DE
9AFC PUSH IX
9AFE CALL RUN_MESSAGE_HL
9B01 RET
Prev: 9AA0 Up: Map Next: 9B02