![]() |
Routines |
| Prev: 6892 | Up: Map | Next: 68E0 |
|
Used by the routine at GameLoop.
Walk this noun's object list from Pointer_ObjectNounPhrases and call IsObjectInCurrentRoom for each object. Return if one is in the current room or the inventory. Otherwise print "I can't see ", the noun name from Pointer_ObjectList and " here.", then set the carry flag.
|
||||||||||||
| Parser_ResolvePhrase | 68A4 | INC BC | Adjust the search count for the index sum. | |||||||||
| 68A5 | LD A,($62C8) | Fetch how many nouns the game knows. | ||||||||||
| 68A8 | SUB C | Turn that count into this noun's index and end marker (FE). | ||||||||||
| 68A9 | LD B,A | |||||||||||
| 68AA | LD E,A | |||||||||||
| 68AB | LD A,$FE | |||||||||||
| 68AD | LD HL,($62D2) | Point at the noun-phrase table (*Pointer_ObjectNounPhrases). | ||||||||||
| 68B0 | INC B | Count the phrase terminator as one more step. | ||||||||||
| 68B1 | JR Parser_ResolvePhrase_Step1 | Jump to Parser_ResolvePhrase_Step1 to skip phrases before this noun. | ||||||||||
| Parser_ResolvePhrase_Loop1 | 68B3 | INC HL | Skip a byte inside the phrase just passed. | |||||||||
| Parser_ResolvePhrase_Loop2 | 68B4 | INC HL | Keep skipping while this byte is the marker being sought. | |||||||||
| 68B5 | CP (HL) | |||||||||||
| 68B6 | JR Z,Parser_ResolvePhrase_Loop1 | |||||||||||
| Parser_ResolvePhrase_Step1 | 68B8 | DJNZ Parser_ResolvePhrase_Loop2 | Repeat for each phrase before this noun. | |||||||||
| 68BA | JR Parser_ResolvePhrase_Step2 | Jump to Parser_ResolvePhrase_Step2 to test the first object. | ||||||||||
| Parser_ResolvePhrase_Loop3 | 68BC | INC HL | Step to the next object in the phrase. | |||||||||
| Parser_ResolvePhrase_Step2 | 68BD | LD A,(HL) | Read the object this phrase refers to. | |||||||||
| 68BE | CALL IsObjectInCurrentRoom | Call IsObjectInCurrentRoom. | ||||||||||
| 68C1 | RET Z | Return when that object is here or being carried. | ||||||||||
| 68C2 | INC HL | Step to the next byte of the phrase. | ||||||||||
| 68C3 | LD A,(HL) | Read the marker that follows the object. | ||||||||||
| 68C4 | CP $FE | Jump back to Parser_ResolvePhrase_Loop3 when another object follows (FE). | ||||||||||
| 68C6 | JR Z,Parser_ResolvePhrase_Loop3 | |||||||||||
|
None of this noun's objects is in the room or the inventory.
Print "I can't see ".
|
||||||||||||
| 68C8 | LD HL,$6378 | Print "I can't see ". | ||||||||||
| 68CB | CALL PrintString | |||||||||||
|
Print the noun name.
|
||||||||||||
| 68CE | LD IX,($62D4) | Point IX at the noun table (*Pointer_ObjectList). | ||||||||||
| 68D2 | CALL GetTableEntry | Call GetTableEntry. | ||||||||||
| 68D5 | CALL PrintString | Call PrintString to print the name. | ||||||||||
|
Print " here.".
|
||||||||||||
| 68D8 | LD HL,$6385 | Print " here.". | ||||||||||
| 68DB | CALL PrintStringAndANewline | |||||||||||
| 68DE | SCF | Set the carry flag to reject the command. | ||||||||||
| 68DF | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 6892 | Up: Map | Next: 68E0 |