![]() |
Routines |
| Prev: B685 | Up: Map | Next: B6AC |
|
Used by the routines at Action_Throw and Action_Play.
Parser: Validate Two Direct Objects.
|
||||||||
| ParserValidateTwoDirectObjects | B694 | CALL ParserValidateDirectObject | Call ParserValidateDirectObject to check that the command names an object. | |||||
| B697 | RET C | Return if there is no direct object in the user input (so the command is malformed). | ||||||
|
A now contains the count of the number of valid direct objects.
|
||||||||
| B698 | CP $01 | Jump to ValidateTwoDirectObjects if the number of valid direct objects in the user input is not 01. | ||||||
| B69A | JR NZ,ValidateTwoDirectObjects | |||||||
|
There is only one valid direct object in the user input and the command needs two...
|
||||||||
| B69C | CALL Messaging_PleaseBeMoreSpecific_Newline | Call Messaging_PleaseBeMoreSpecific_Newline to ask for a more specific command. | ||||||
| B69F | SCF | Set the carry flag to report that the command is malformed. | ||||||
| B6A0 | RET | Return. | ||||||
|
There are two or more valid direct objects in the user input.
|
||||||||
| ValidateTwoDirectObjects | B6A1 | CP $03 | Jump to ValidateTwoDirectObjects_TooMany if the number of valid direct objects in the user input is greater than or equal to 03. | |||||
| B6A3 | JR NC,ValidateTwoDirectObjects_TooMany | |||||||
| B6A5 | AND A | Clear the carry flag: exactly two objects were named, so the command is valid. | ||||||
| B6A6 | RET | Return. | ||||||
|
There are more than two valid direct objects in the user input.
|
||||||||
| ValidateTwoDirectObjects_TooMany | B6A7 | CALL Messaging_PleaseRephraseThat_Newline | Call Messaging_PleaseRephraseThat_Newline to ask the player to rephrase. | |||||
| B6AA | SCF | Set the carry flag to report that the command is malformed. | ||||||
| B6AB | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: B685 | Up: Map | Next: B6AC |