![]() |
Routines |
| Prev: 711A | Up: Map | Next: 71D5 |
|
Built from the action's pattern: who did it, "cannot" if it was refused, the verb -- or GO and the direction, for a move, or GO SOMEWHERE in the dark, when the player cannot see which way -- then the first object after its particle, and the second after its preposition, and a full stop. So what the other characters are seen to do is told by the same code, from the same patterns, as the player's own actions.
A pattern with bit 4 of FLAGS_FIRST_WORDS set is not narrated at all: that is LOOK and INVENTORY, the only two, which change nothing anyone could see.
|
||||
| NARRATE_ACTION | 712B | LD A,$01 | Narrating | |
| 712D | LD (NARRATING),A | |||
| 7130 | XOR A | Names in full, not the noun alone | ||
| 7131 | LD (NOUN_ONLY),A | |||
| 7134 | PUSH IY | |||
| 7136 | PUSH BC | |||
| 7137 | LD A,(SUCCEEDED) | INPUT_STYLE = 1 if the action was refused | ||
| 713A | LD B,A | |||
| 713B | AND A | |||
| 713C | LD A,$01 | |||
| 713E | JR Z,NARRATE_ACTION_0 | |||
| 7140 | XOR A | |||
| NARRATE_ACTION_0 | 7141 | LD (INPUT_STYLE),A | ||
| 7144 | PUSH IX | |||
| 7146 | PUSH HL | |||
| 7147 | PUSH DE | |||
| 7148 | LD A,(ACTION) | IX = the action's pattern | ||
| 714B | CALL PATTERN_OF | |||
| 714E | PUSH HL | |||
| 714F | POP IX | |||
| 7151 | XOR A | Done, and by the player: a new line first | ||
| 7152 | CP B | |||
| 7153 | JR Z,NARRATE_ACTION_1 | |||
| 7155 | LD A,(ACTING) | |||
| 7158 | AND A | |||
| 7159 | CALL Z,NEW_LINE | |||
| NARRATE_ACTION_1 | 715C | CALL PATTERN_FLAGS | A pattern that is not narrated: nothing | |
| 715F | BIT 4,A | |||
| 7161 | LD C,A | |||
| 7162 | JP NZ,NARRATE_ACTION_6 | |||
| 7165 | CALL PRINT_ACTOR | Who did it | ||
| 7168 | LD DE,$00EE | Refused: "cannot" | ||
| 716B | XOR A | |||
| 716C | CP B | |||
| 716D | CALL Z,PRINT_WORD_DE | |||
| 7170 | PUSH HL | The pattern's last word -- GO, for a move | ||
| 7171 | LD DE,$0006 | |||
| 7174 | ADD HL,DE | |||
| 7175 | CALL PRINT_WORD | |||
| 7178 | CALL TOO_DARK | In the dark, a move goes "somewhere" | ||
| 717B | POP HL | |||
| 717C | JR NC,NARRATE_ACTION_2 | |||
| 717E | LD A,(ACTION) | |||
| 7181 | CP $0B | |||
| 7183 | JR NC,NARRATE_ACTION_2 | |||
| 7185 | LD DE,$0AEA | |||
| 7188 | INC HL | |||
| 7189 | INC HL | |||
| 718A | CALL PRINT_WORD_DE | |||
| 718D | JR NARRATE_ACTION_3 | |||
| NARRATE_ACTION_2 | 718F | CALL PRINT_WORD | Otherwise the verb, or the direction | |
| NARRATE_ACTION_3 | 7192 | BIT 3,C | The first object, after its particle, if the pattern has one (bit 3) | |
| 7194 | JR Z,NARRATE_ACTION_4 | |||
| 7196 | BIT 5,C | |||
| 7198 | CALL NZ,PRINT_WORD | |||
| 719B | LD A,(FLAGS_LAST_WORDS) | |||
| 719E | BIT 7,A | |||
| 71A0 | CALL NZ,PRINT_WORD | |||
| 71A3 | CALL PRINT_TARGET | |||
| NARRATE_ACTION_4 | 71A6 | LD A,(INSTRUMENT) | The second object, after its preposition, if it has one (bit 2) | |
| 71A9 | CP $FF | |||
| 71AB | JR Z,NARRATE_ACTION_5 | |||
| 71AD | BIT 2,C | |||
| 71AF | JR Z,NARRATE_ACTION_5 | |||
| 71B1 | BIT 5,C | |||
| 71B3 | CALL Z,PRINT_WORD | |||
| 71B6 | LD A,(FLAGS_LAST_WORDS) | |||
| 71B9 | BIT 7,A | |||
| 71BB | CALL Z,PRINT_WORD | |||
| 71BE | CALL PRINT_INSTRUMENT | |||
| NARRATE_ACTION_5 | 71C1 | LD A,$2E | A full stop, and a new line | |
| 71C3 | CALL PRINT_CHAR | |||
| 71C6 | CALL NEW_LINE | |||
| NARRATE_ACTION_6 | 71C9 | XOR A | No longer narrating | |
| 71CA | LD (NARRATING),A | |||
| 71CD | POP DE | |||
| 71CE | POP HL | |||
| 71CF | POP IX | |||
| 71D1 | POP BC | |||
| 71D2 | POP IY | |||
| 71D4 | RET | |||
| Prev: 711A | Up: Map | Next: 71D5 |