![]() |
Routines |
| Prev: D471 | Up: Map | Next: D495 |
|
Used by the routine at FindObjectByFieldOne.
Writes the field number into the search instruction, then walks the object records for a match.
|
||||
| FindObjectByField | D474 | LD ($D48D),A | Write the field number into the displacement of the instruction at D48B. | |
| D477 | POP AF | |||
| D478 | PUSH BC | |||
| D479 | PUSH IY | Call FetchCurrentCharacterLocation to fetch current character location. | ||
| D47B | LD B,A | |||
| D47C | PUSH DE | |||
| D47D | CALL FetchCurrentCharacterLocation | |||
| D480 | LD DE,$0006 | Step to the next record. | ||
| D483 | ADD IX,DE | |||
| D485 | POP DE | |||
| FindObjectByField_Loop | D486 | CALL FetchNextObject | Go to FindObjectByField_Next if the next object id is FF. | |
| D489 | JR Z,FindObjectByField_Next | |||
|
FindObjectByField writes 01 or 02 into the displacement of this instruction.
|
||||
| D48B | LD A,(IX+$02) | Compare field 02 (modified by FindObjectByField) of this object with the value wanted, and keep searching if it differs. | ||
| D48E | CP B | |||
| D48F | JR NZ,FindObjectByField_Loop | |||
| FindObjectByField_Next | D491 | POP IY | Restore the saved schedule entry and the saved count from the stack. | |
| D493 | POP BC | |||
| D494 | RET | Return. | ||
| Prev: D471 | Up: Map | Next: D495 |