![]() |
Routines |
| Prev: B665 | Up: Map | Next: B685 |
|
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 | B670 | LD A,($AF2F) | Fetch the AF2F(second token from the user input) and store it in A. | |||||
| B673 | CP $FF | Jump forward to DirectObject_Process if the token is anything other than the terminator character (FF). | ||||||
| B675 | JR NZ,DirectObject_Process | |||||||
|
The token was the terminator character (FF), so the sentence is malformed.
E.g. They tried "TAKE" but didn't write anything after it.
|
||||||||
| B677 | CALL Messaging_PleaseBeMoreSpecific_Newline | Call Messaging_PleaseBeMoreSpecific_Newline. | ||||||
| B67A | SCF | Set the carry flag to indicate this call was a failure. | ||||||
| B67B | RET | Return. | ||||||
|
Process the direct object.
|
||||||||
| DirectObject_Process | B67C | CALL ParserCountItemReferences | Call ParserCountItemReferences. | |||||
| B67F | RET NZ | Return if A is not equal to FF. | ||||||
| B680 | CALL Messaging_PleaseRephraseThat_Newline | Call Messaging_PleaseRephraseThat_Newline to ask the player to rephrase. | ||||||
| B683 | SCF | Set the carry flag to indicate the command is malformed. | ||||||
| B684 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: B665 | Up: Map | Next: B685 |