Prev: 37272 Up: Map Next: 37793
37755: Handler: Resolve Synonym
Replace a synonym with the verb it stands for and run that verb.
HandlerResolveSynonym 37755 LD HL,35239 Jump to HandlerResolveSynonym_Step1 unless the command matches the phrase at 35239.
37758 CALL Parser_AdvanceToSeparator
37761 JR NZ,HandlerResolveSynonym_Step1
37763 LD A,(25234) Fetch the second word of the command.
37766 LD (25233),A The second word takes the place of the verb.
37769 LD A,255 The second word becomes the verb, and nothing follows it.
37771 LD (25234),A
37774 POP HL The synonym has replaced the typed verb.
37775 JP HandlerMatchVerb Jump to HandlerMatchVerb to match verb.
HandlerResolveSynonym_Step1 37778 LD A,(25234) Fetch the second word of the command.
37781 CP 255 Jump to HandlerResolveSynonym_Step2 when the command has no second word (255).
37783 JR Z,HandlerResolveSynonym_Step2
37785 CALL ResponsePleaseRephraseThat Call ResponsePleaseRephraseThat to ask the player to rephrase the command.
37788 RET Return.
HandlerResolveSynonym_Step2 37789 CALL ResponsePleaseBeMoreSpecific Call ResponsePleaseBeMoreSpecific to say there is nothing there.
37792 RET Return.
Prev: 37272 Up: Map Next: 37793