Prev: 49683 Up: Map Next: 49775
49743: Is Object In The Current Room?
Input
A Object number
Output
F Zero flag set when the object is in the current room
IsObjectInCurrentRoom 49743 PUSH HL Jump to IsObjectInCurrentRoom_Next when this is a scenic entry rather than an object.
49744 PUSH DE
49745 LD E,A
49746 LD D,0
49748 BIT 7,E
49750 JR NZ,IsObjectInCurrentRoom_Next
49752 LD HL,47560 Use the object locations and join the room test.
49755 JR IsObjectInCurrentRoom_Compare
IsObjectInCurrentRoom_Next 49757 RES 7,E Clear the scenic marker and use the scenic list.
49759 LD HL,47688
IsObjectInCurrentRoom_Compare 49762 ADD HL,DE Jump to IsObjectInCurrentRoom_Found when the object is in the current room.
49763 LD A,(47771)
49766 CP (HL)
49767 JR Z,IsObjectInCurrentRoom_Found
49769 LD A,1 Treat a carried object as present.
49771 CP (HL)
IsObjectInCurrentRoom_Found 49772 POP DE Restore DE and HL from the stack.
49773 POP HL
49774 RET Return.
Prev: 49683 Up: Map Next: 49775