Prev: A164 Up: Map Next: A18C
A16C: "the ... is ...": an object and its state
The state word is picked by A from STATE_WORDS: bits 0-6 the pair, bit 7 which of the two. A kill says "the ... is dead.", CLIMB OUT OF something shut "the ... is closed.". SAY_STATE_NAMED is the way in with the name already in HL.
Input
A The state
IX The object's record
SAY_STATE A16C LD L,(IX+$08)
A16F LD H,(IX+$09)
This entry point is used by the routine at SAY_STATE_OF.
SAY_STATE_NAMED A172 PUSH DE
A173 PUSH HL
A174 LD HL,STATE_WORDS
A177 BIT 7,A
A179 JR Z,SAY_STATE_0
A17B LD HL,STATE_WORDS_SET
SAY_STATE_0 A17E CALL WORD_FROM_TABLE
A181 POP HL
A182 PUSH DE
A183 PUSH HL
A184 LD HL,MSG_IS
A187 CALL RUN_MESSAGE_HL
A18A POP DE
A18B RET
Prev: A164 Up: Map Next: A18C