![]() |
Routines |
| Prev: 46693 | Up: Map | Next: 46725 |
|
Used by the routines at ParserValidateTwoDirectObjects, Action_Examine, Action_Take, Action_Drop, Action_Give, Action_Kiss, Action_Open, Action_Close, Action_Read, Action_Wave, ActionCapture, Action_Oil, Action_Drink, Action_Empty, Action_Fill and Action_Use.
Parser: Validate Direct Object.
|
||||||||
|
The first token is the verb, so target the second token for the direct object.
|
||||||||
| ParserValidateDirectObject | 46704 | LD A,(44847) | Fetch the 44847(second token from the user input) and store it in A. | |||||
| 46707 | CP 255 | Jump forward to DirectObject_Process if the token is anything other than the terminator character (255). | ||||||
| 46709 | JR NZ,DirectObject_Process | |||||||
|
The token was the terminator character (255), so the sentence is malformed.
E.g. They tried "TAKE" but didn't write anything after it.
|
||||||||
| 46711 | CALL Messaging_PleaseBeMoreSpecific_Newline | Call Messaging_PleaseBeMoreSpecific_Newline. | ||||||
| 46714 | SCF | Set the carry flag to indicate this call was a failure. | ||||||
| 46715 | RET | Return. | ||||||
|
Process the direct object.
|
||||||||
| DirectObject_Process | 46716 | CALL ParserCountItemReferences | Call ParserCountItemReferences. | |||||
| 46719 | RET NZ | Return if A is not equal to 255. | ||||||
| 46720 | CALL Messaging_PleaseRephraseThat_Newline | Call Messaging_PleaseRephraseThat_Newline to ask the player to rephrase. | ||||||
| 46723 | SCF | Set the carry flag to indicate the command is malformed. | ||||||
| 46724 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 46693 | Up: Map | Next: 46725 |