![]() |
Routines |
| Prev: 711A | Up: Map | Next: 71D5 |
|
Used by the routines at Inglish_ArmTheMessageGate, InglishApplyAMatch, Turn_ApplyTheSavedMatch and ResponseThatWillNotWork.
Prints the sentence for the current action: who, the verb, and the objects. Bit 4 of the packed token classes (B71D) suppresses the whole sentence. What the other bits select is only partly confirmed.
|
||||
|
Decide whether a sentence is due, and which noun it names.
|
||||
| Inglish_DescribeTheAction | 712B | LD A,$01 | Mark a class token as due. | |
| 712D | LD ($70DF),A | |||
| 7130 | XOR A | Clear which noun is being named. | ||
| 7131 | LD ($B703),A | |||
| 7134 | PUSH IY | The action countdown is 01 when the message-suppressed flag is clear, and 00 when a message was held back. | ||
| 7136 | PUSH BC | |||
| 7137 | LD A,($B6FB) | |||
| 713A | LD B,A | |||
| 713B | AND A | |||
| 713C | LD A,$01 | |||
| 713E | JR Z,Inglish_DescribeTheAction_Store | |||
| 7140 | XOR A | Clear the countdown when the message-suppressed flag was set. | ||
| Inglish_DescribeTheAction_Store | 7141 | LD ($B701),A | Store the action countdown. | |
| 7144 | PUSH IX | Look up the record for the current action. | ||
| 7146 | PUSH HL | |||
| 7147 | PUSH DE | |||
| 7148 | LD A,($B6E7) | |||
| 714B | CALL IndexAction | |||
| 714E | PUSH HL | Use that action record from here on. | ||
| 714F | POP IX | |||
| 7151 | XOR A | Jump to Inglish_DescribeTheAction_Pack to skip the newline if the message-suppressed flag was zero. | ||
| 7152 | CP B | |||
| 7153 | JR Z,Inglish_DescribeTheAction_Pack | |||
| 7155 | LD A,($B6EA) | Print a newline if it is the player's turn. | ||
| 7158 | AND A | |||
| 7159 | CALL Z,Print_LineBreak | |||
| Inglish_DescribeTheAction_Pack | 715C | CALL ClausePackTheActionScores | Call ClausePackTheActionScores to pack this action entry's token classes into the clause. | |
| 715F | BIT 4,A | Jump to Inglish_DescribeTheAction_Done if bit 4 of the packed token classes (B71D) is set. That bit suppresses the sentence. | ||
| 7161 | LD C,A | |||
| 7162 | JP NZ,Inglish_DescribeTheAction_Done | |||
| Inglish_DescribeTheAction_Who | 7165 | CALL Message_PrintWhoseTurn_0 | Print the current character. | |
| 7168 | LD DE,$00EE | Print the token CANNOT when the message-suppressed flag is zero. | ||
| 716B | XOR A | |||
| 716C | CP B | |||
| 716D | CALL Z,PrintToken | |||
| 7170 | PUSH HL | Keep the pointer those prints returned, and step 06 bytes, the length of an object name. | ||
| 7171 | LD DE,$0006 | |||
| 7174 | ADD HL,DE | |||
| 7175 | CALL PrintAction | Print the action's name. | ||
| 7178 | CALL LocationLit | Test whether the location is lit. | ||
| 717B | POP HL | Jump to Inglish_DescribeTheAction_Verb if the location is lit. | ||
| 717C | JR NC,Inglish_DescribeTheAction_Verb | |||
| 717E | LD A,($B6E7) | Jump to Inglish_DescribeTheAction_Verb if the action is strike (0B) or later. | ||
| 7181 | CP $0B | |||
| 7183 | JR NC,Inglish_DescribeTheAction_Verb | |||
| 7185 | LD DE,$0AEA | Take the token SOMEWHERE. | ||
| 7188 | INC HL | Step two bytes to the next word token. | ||
| 7189 | INC HL | |||
| 718A | CALL PrintToken | Print that token. | ||
| 718D | JR Inglish_DescribeTheAction_Object | Jump to Inglish_DescribeTheAction_Object, skipping a second copy of the action name. | ||
| Inglish_DescribeTheAction_Verb | 718F | CALL PrintAction | Print the action's name. | |
| Inglish_DescribeTheAction_Object | 7192 | BIT 3,C | Jump to Inglish_DescribeTheAction_Second if bit 3 of the scores ClausePackTheActionScores left in C is clear. | |
| 7194 | JR Z,Inglish_DescribeTheAction_Second | |||
| 7196 | BIT 5,C | Print the action's name again if bit 5 of the packed scores is set. | ||
| 7198 | CALL NZ,PrintAction | |||
| 719B | LD A,($B71E) | Print the action's name again if bit 7 of the clause byte is set. | ||
| 719E | BIT 7,A | |||
| 71A0 | CALL NZ,PrintAction | |||
| 71A3 | CALL Message_PrintTheObject_0 | Print the current object. | ||
| Inglish_DescribeTheAction_Second | 71A6 | LD A,($B6E9) | Jump to Inglish_DescribeTheAction_Stop if there is no second object. | |
| 71A9 | CP $FF | |||
| 71AB | JR Z,Inglish_DescribeTheAction_Stop | |||
| 71AD | BIT 2,C | Jump to Inglish_DescribeTheAction_Stop if bit 2 of the packed token classes (B71D) is clear. | ||
| 71AF | JR Z,Inglish_DescribeTheAction_Stop | |||
| 71B1 | BIT 5,C | Print the action's name if bit 5 of the packed scores is clear. | ||
| 71B3 | CALL Z,PrintAction | |||
| 71B6 | LD A,($B71E) | Print the action's name if bit 7 of the clause byte is clear. | ||
| 71B9 | BIT 7,A | |||
| 71BB | CALL Z,PrintAction | |||
| 71BE | CALL Message_PrintTheSecondNoun_0 | Print the second noun. | ||
| Inglish_DescribeTheAction_Stop | 71C1 | LD A,$2E | Print a full stop. | |
| 71C3 | CALL Print_Character | |||
| 71C6 | CALL Print_LineBreak | Print a newline. | ||
| Inglish_DescribeTheAction_Done | 71C9 | XOR A | Clear the class-token flag. | |
| 71CA | LD ($70DF),A | |||
| 71CD | POP DE | Restore DE, HL, IX, BC and IY from the stack. | ||
| 71CE | POP HL | |||
| 71CF | POP IX | |||
| 71D1 | POP BC | |||
| 71D2 | POP IY | |||
| 71D4 | RET | Return. | ||
| Prev: 711A | Up: Map | Next: 71D5 |