Prev: 58819 Up: Map Next: 59014
58905: Scan Objects
Walks the objects and stops on the entry the caller wants.
ScanObjects 58905 LD C,A Keep the wanted id in C and start the object counter at 255 (it is incremented first).
58906 LD B,255
ScanObjects_Loop 58908 INC B Return when the object id reaches 110 past the last object.
58909 LD A,B
58910 CP 110
58912 RET Z
58913 CALL FetchObjectDataPointer Call FetchObjectDataPointer to look that object up.
58916 LD A,(IX+1) Go back to ScanObjects_Loop unless byte 1 of this object matches the id in C.
58919 CP C
58920 JR NZ,ScanObjects_Loop
58922 LD HL,1397 Go back to ScanObjects_Loop unless byte 7 of this object is 117.
58925 LD A,(IX+7)
58928 CP L
58929 JR NZ,ScanObjects_Loop
58931 LD A,(IX+8) Go to ScanObjects_Loop if the low nibble of object byte 8 is not 5.
58934 AND 15
58936 CP H
58937 JR NZ,ScanObjects_Loop
58939 OR %00000001 Reset the zero flag.
58941 RET Return.
Named from the script command at 62168.
Scans objects Patched.
ScanObjects_PatchedRecord 58942 DEFB 64,0,66,230 Display record read by ProcessDisplayRecord: flags 64 value 0 handler 58946.
Run by 51812 after the display record at ScanObjects_PatchedRecord.
58946 LD A,(41014) Read the character being processed.
58949 CALL ScanObjects Call ScanObjects to scan the objects for that id.
58952 JP Z,ParseInputNumber_ReturnZero Return zero through ParseInputNumber_ReturnZero if the object scan found nothing.
58955 CALL ReadTextPointerLowByte Go to ParseInputNumber_ReturnZero if bit 7 of H is clear.
58958 BIT 7,H
58960 JP Z,ParseInputNumber_ReturnZero
58963 RET Return.
Named from the script commands at 62212, 62236, 62265 and 62386.
58964 DEFB 64,0,88,230 Display record read by ProcessDisplayRecord: flags 64 value 0 handler 58968.
Run by 51812 after the display record at 58964.
58968 LD A,(41014) Read the character being processed.
58971 CALL ScanObjects Call ScanObjects to scan the objects for that id.
58974 JP Z,ParseInputNumber_ReturnZero Return zero through ParseInputNumber_ReturnZero if the object scan found nothing.
58977 CALL ReadTextPointerLowByte Return zero through ParseInputNumber_ReturnZero if bit 7 of H is set.
58980 BIT 7,H
58982 JP NZ,ParseInputNumber_ReturnZero
58985 LD A,H Go to ParseInputNumber_ReturnZero if the saved pointer is zero.
58986 OR L
58987 JP Z,ParseInputNumber_ReturnZero
58990 RET Return.
Named from the script commands at 62217, 62241, 62270 and 62391.
58991 DEFB 64,0,115,230 Display record read by ProcessDisplayRecord: flags 64 value 0 handler 58995.
Run by 51812 after the display record at 58991.
58995 LD A,(41014) Read the character being processed.
58998 CALL ScanObjects Call ScanObjects to scan the objects for that id.
59001 JR Z,ScanObjects_Next Go to ScanObjects_Next if the object scan found nothing.
59003 CALL ReadTextPointerLowByte Return zero through ParseInputNumber_ReturnZero if the pointer is not zero.
59006 LD A,H
59007 OR L
59008 JP NZ,ParseInputNumber_ReturnZero
ScanObjects_Next 59011 OR %00000001 Reset the zero flag.
59013 RET Return.
Prev: 58819 Up: Map Next: 59014