Prev: ADF3 Up: Map Next: AE17
AE03: Find the room's first object with a graphic in a range
Used by the routine at LOOSE_VALVE.
Looks through the room's 52 records, OBJECTS's records 4 to 55, for a graphic from L to L+H-1. Used by LOOSE_VALVE to find the room's socket.
Input
L the first graphic
H how many
Output
IY the record found
F carry set if one was found
FIND_GRAPHIC_HERE AE03 LD IY,ROOM_OBJECTS records 4 to 55
AE07 LD DE,$0020
AE0A LD B,$34
FIND_GRAPHIC_HERE_0 AE0C LD A,(IY+$00) graphic - L < H: found
AE0F SUB L
AE10 CP H
AE11 RET C
AE12 ADD IY,DE the next; none found, no carry
AE14 DJNZ FIND_GRAPHIC_HERE_0
AE16 RET
Prev: ADF3 Up: Map Next: AE17