Prev: E5C3 Up: Map Next: E686
E619: Scan Objects
Walks the objects and stops on the entry the caller wants.
ScanObjects E619 LD C,A Keep the wanted id in C and start the object counter at FF (it is incremented first).
E61A LD B,$FF
ScanObjects_Loop E61C INC B Return when the object id reaches 6E past the last object.
E61D LD A,B
E61E CP $6E
E620 RET Z
E621 CALL FetchObjectDataPointer Call FetchObjectDataPointer to look that object up.
E624 LD A,(IX+$01) Go back to ScanObjects_Loop unless byte 01 of this object matches the id in C.
E627 CP C
E628 JR NZ,ScanObjects_Loop
E62A LD HL,$0575 Go back to ScanObjects_Loop unless byte 07 of this object is 75.
E62D LD A,(IX+$07)
E630 CP L
E631 JR NZ,ScanObjects_Loop
E633 LD A,(IX+$08) Go to ScanObjects_Loop if the low nibble of object byte 08 is not 05.
E636 AND $0F
E638 CP H
E639 JR NZ,ScanObjects_Loop
E63B OR %00000001 Reset the zero flag.
E63D RET Return.
Named from the script command at F2D8.
Scans objects Patched.
ScanObjects_PatchedRecord E63E DEFB $40,$00,$42,$E6 Display record read by ProcessDisplayRecord: flags 40 value 00 handler E642.
Run by CA64 after the display record at ScanObjects_PatchedRecord.
E642 LD A,($A036) Read the character being processed.
E645 CALL ScanObjects Call ScanObjects to scan the objects for that id.
E648 JP Z,ParseInputNumber_ReturnZero Return zero through ParseInputNumber_ReturnZero if the object scan found nothing.
E64B CALL ReadTextPointerLowByte Go to ParseInputNumber_ReturnZero if bit 7 of H is clear.
E64E BIT 7,H
E650 JP Z,ParseInputNumber_ReturnZero
E653 RET Return.
Named from the script commands at F304, F31C, F339 and F3B2.
E654 DEFB $40,$00,$58,$E6 Display record read by ProcessDisplayRecord: flags 40 value 00 handler E658.
Run by CA64 after the display record at E654.
E658 LD A,($A036) Read the character being processed.
E65B CALL ScanObjects Call ScanObjects to scan the objects for that id.
E65E JP Z,ParseInputNumber_ReturnZero Return zero through ParseInputNumber_ReturnZero if the object scan found nothing.
E661 CALL ReadTextPointerLowByte Return zero through ParseInputNumber_ReturnZero if bit 7 of H is set.
E664 BIT 7,H
E666 JP NZ,ParseInputNumber_ReturnZero
E669 LD A,H Go to ParseInputNumber_ReturnZero if the saved pointer is zero.
E66A OR L
E66B JP Z,ParseInputNumber_ReturnZero
E66E RET Return.
Named from the script commands at F309, F321, F33E and F3B7.
E66F DEFB $40,$00,$73,$E6 Display record read by ProcessDisplayRecord: flags 40 value 00 handler E673.
Run by CA64 after the display record at E66F.
E673 LD A,($A036) Read the character being processed.
E676 CALL ScanObjects Call ScanObjects to scan the objects for that id.
E679 JR Z,ScanObjects_Next Go to ScanObjects_Next if the object scan found nothing.
E67B CALL ReadTextPointerLowByte Return zero through ParseInputNumber_ReturnZero if the pointer is not zero.
E67E LD A,H
E67F OR L
E680 JP NZ,ParseInputNumber_ReturnZero
ScanObjects_Next E683 OR %00000001 Reset the zero flag.
E685 RET Return.
Prev: E5C3 Up: Map Next: E686