Prev: 9198 Up: Map Next: 93A1
937B: Handler: Resolve Synonym
Replace a synonym with the verb it stands for and run that verb.
HandlerResolveSynonym 937B LD HL,$89A7 Jump to HandlerResolveSynonym_Step1 unless the command matches the phrase at 89A7.
937E CALL Parser_AdvanceToSeparator
9381 JR NZ,HandlerResolveSynonym_Step1
9383 LD A,($6292) Fetch the second word of the command.
9386 LD ($6291),A The second word takes the place of the verb.
9389 LD A,$FF The second word becomes the verb, and nothing follows it.
938B LD ($6292),A
938E POP HL The synonym has replaced the typed verb.
938F JP HandlerMatchVerb Jump to HandlerMatchVerb to match verb.
HandlerResolveSynonym_Step1 9392 LD A,($6292) Fetch the second word of the command.
9395 CP $FF Jump to HandlerResolveSynonym_Step2 when the command has no second word (FF).
9397 JR Z,HandlerResolveSynonym_Step2
9399 CALL ResponsePleaseRephraseThat Call ResponsePleaseRephraseThat to ask the player to rephrase the command.
939C RET Return.
HandlerResolveSynonym_Step2 939D CALL ResponsePleaseBeMoreSpecific Call ResponsePleaseBeMoreSpecific to say there is nothing there.
93A0 RET Return.
Prev: 9198 Up: Map Next: 93A1