![]() |
Routines |
| Prev: 44531 | Up: Map | Next: 44567 |
|
Used by the routine at HandleValve.
Searches the objects of the room for one whose sprite number is in a range.
|
||||||||||||||||
|
Test each room object.
|
||||||||||||||||
| FindObject | 44547 | LD IY,23560 | Point IY at RoomObjects. | |||||||||||||
| 44551 | LD DE,32 | Set DE to 0032. | ||||||||||||||
| 44554 | LD B,52 | Set a counter of 52. | ||||||||||||||
| FindObject_TestObject | 44556 | LD A,(IY+0) | Fetch the sprite number. | |||||||||||||
| 44559 | SUB L | Subtract the first sprite number in the range. | ||||||||||||||
| 44560 | CP H | Compare it with the number of sprite numbers. | ||||||||||||||
| 44561 | RET C | Return if the object is in the range. | ||||||||||||||
| 44562 | ADD IY,DE | Move on to the next object. | ||||||||||||||
| 44564 | DJNZ FindObject_TestObject | Jump to FindObject_TestObject until all of the objects have been tested. | ||||||||||||||
| 44566 | RET | Return. | ||||||||||||||
| Prev: 44531 | Up: Map | Next: 44567 |