Prev: C213 Up: Map Next: C26F
C24F: Is Object In The Current Room?
Input
A Object number
Output
F Zero flag set when the object is in the current room
IsObjectInCurrentRoom C24F PUSH HL Jump to IsObjectInCurrentRoom_Next when this is a scenic entry rather than an object.
C250 PUSH DE
C251 LD E,A
C252 LD D,$00
C254 BIT 7,E
C256 JR NZ,IsObjectInCurrentRoom_Next
C258 LD HL,$B9C8 Use the object locations and join the room test.
C25B JR IsObjectInCurrentRoom_Compare
IsObjectInCurrentRoom_Next C25D RES 7,E Clear the scenic marker and use the scenic list.
C25F LD HL,$BA48
IsObjectInCurrentRoom_Compare C262 ADD HL,DE Jump to IsObjectInCurrentRoom_Found when the object is in the current room.
C263 LD A,($BA9B)
C266 CP (HL)
C267 JR Z,IsObjectInCurrentRoom_Found
C269 LD A,$01 Treat a carried object as present.
C26B CP (HL)
IsObjectInCurrentRoom_Found C26C POP DE Restore DE and HL from the stack.
C26D POP HL
C26E RET Return.
Prev: C213 Up: Map Next: C26F