Prev: 7A14 Up: Map Next: 7AA1
7A73: Inglish: Search The Previous Slot
Used by the routine at Inglish_ScoreTheCurrentAction.
Searches the previous parser slot for an object in the same place as the player whose id matches the current object, and sets that object when bit 6 of the clause byte is set.
Inglish_SearchThePreviousSlot 7A73 PUSH IY Step back one 18-byte parser record.
7A75 PUSH DE
7A76 PUSH HL
Inglish_SearchThePreviousSlot_StepBackOneRecord 7A77 LD DE,$FFE8
7A7A ADD IY,DE Jump to Inglish_SearchThePreviousSlot_RestoreAndReturn if bit 6 of the clause byte at offset 1 is clear.
7A7C BIT 6,(IY+$01)
7A80 JR Z,Inglish_SearchThePreviousSlot_RestoreAndReturn
7A82 LD IX,$C060 Start the object search one slot before ObjectTable.
Inglish_SearchThePreviousSlot_TestTheNextObject 7A86 PUSH IY Use the parser workspace from here on.
7A88 POP HL
7A89 LD DE,$0008 Step the pointer on by 08 bytes.
7A8C ADD HL,DE
7A8D CALL ConditionSamePlaceAsThePlayer Call ConditionSamePlaceAsThePlayer to test whether the object is in the same place as the player.
7A90 CP $FF Jump back to Inglish_SearchThePreviousSlot_StepBackOneRecord if ConditionSamePlaceAsThePlayer returned FF.
7A92 JR Z,Inglish_SearchThePreviousSlot_StepBackOneRecord
7A94 LD HL,$B6E8 Jump back to Inglish_SearchThePreviousSlot_TestTheNextObject unless the object ConditionSamePlaceAsThePlayer found is the current object.
7A97 CP (HL)
7A98 JR NZ,Inglish_SearchThePreviousSlot_TestTheNextObject
7A9A OR $01 Clear the zero flag.
Inglish_SearchThePreviousSlot_RestoreAndReturn 7A9C POP HL Restore HL, DE and IY from the stack.
7A9D POP DE
7A9E POP IY
7AA0 RET Return.
View the equivalent code in;
Prev: 7A14 Up: Map Next: 7AA1