![]() |
Routines |
| Prev: 54005 | Up: Map | Next: 54076 |
|
Used by the routine at CountMatchingAttributes.
Walks the object list at Table_Objects until the id matches.
|
||||
| ScanObjectsId | 54021 | PUSH IX | Use the objects at Table_Objects. | |
| 54023 | LD IX,35695 | |||
| ScanObjectsId_UseCharacter | 54027 | CALL FetchNextObjectWithID | Go to ScanObjectsId_Save if there is no further object. | |
| 54030 | JR Z,ScanObjectsId_Save | |||
| 54032 | CP (IY+1) | Jump back to ScanObjectsId_UseCharacter while this id does not match the schedule entry. | ||
| 54035 | JR NZ,ScanObjectsId_UseCharacter | |||
| 54037 | PUSH AF | Keep the low byte and go to ScanObjectsId_Next if the count is zero. | ||
| 54038 | SUB A | |||
| 54039 | CP B | |||
| 54040 | LD A,C | |||
| 54041 | JR Z,ScanObjectsId_Next | |||
| 54043 | ADD A,(IY+2) | Add the attribute at offset 2 and go to ScanObjectsId_BringObjectCarry when the sum overflows. | ||
| 54046 | JP PE,ScanObjectsId_BringObjectCarry | |||
| 54049 | LD C,A | Jump ahead to ScanObjectsId_FetchObject to fetch the next object. | ||
| 54050 | JR ScanObjectsId_FetchObject | |||
|
Add the schedule field onto the result, then store the result in the low byte of the count, then read the record flag.
|
||||
| ScanObjectsId_Next | 54052 | ADD A,(IY+3) | Add the attribute at offset 3 and go to ScanObjectsId_BringObjectCarry when the sum overflows. | |
| 54055 | JP PE,ScanObjectsId_BringObjectCarry | |||
| 54058 | LD C,A | Store the sum as the count, read the record's flag byte and call ScanObjectsId. | ||
| 54059 | LD A,(IX+0) | |||
| 54062 | CALL ScanObjectsId | |||
| ScanObjectsId_FetchObject | 54065 | POP AF | Fetch the next object from ScanObjectsId_UseCharacter. | |
| 54066 | JR ScanObjectsId_UseCharacter | |||
|
Return.
|
||||
| ScanObjectsId_Save | 54068 | POP IX | Restore the saved character record from the stack. | |
| 54070 | RET | Return. | ||
|
Bring back the object id and carry on with the scan.
|
||||
| ScanObjectsId_BringObjectCarry | 54071 | POP AF | Jump back to ScanObjectsId_Save to count 255. | |
| 54072 | LD C,255 | |||
| 54074 | JR ScanObjectsId_Save | |||
|
View the equivalent code in;
|
||||
| Prev: 54005 | Up: Map | Next: 54076 |