![]() |
Routines |
| Prev: 44849 | Up: Map | Next: 44886 |
|
Used by the routine at Handler_RoomExits.
|
||||||||||||||
| CheckRoomObjects | 44857 | LD HL,42604 | HL=Table_ItemEventLocations. | |||||||||||
| 44860 | LD BC,(42982) | BC=*Count_Objects. | ||||||||||||
| CheckRoomObjects_Loop | 44864 | CPIR | Search for the room number in the table. | |||||||||||
| 44866 | RET NZ | Return if the room number is not in the table. | ||||||||||||
| 44867 | PUSH HL | Stash the object location table pointer on the stack. | ||||||||||||
| 44868 | CALL ValidateObject | Call ValidateObject. | ||||||||||||
| 44871 | POP HL | Restore the object location table pointer from the stack. | ||||||||||||
| 44872 | JR NZ,CheckRoomObjects_Found | Jump to CheckRoomObjects_Found if a visible object is here. | ||||||||||||
| 44874 | LD E,A | Temporarily store A in E. | ||||||||||||
| 44875 | LD A,B | Are there more objects to check? | ||||||||||||
| 44876 | OR C | |||||||||||||
| 44877 | LD A,E | Restore the A register. | ||||||||||||
| 44878 | JR NZ,CheckRoomObjects_Loop | Jump to CheckRoomObjects_Loop if there are more objects to check. | ||||||||||||
|
No visible object was found.
|
||||||||||||||
| 44880 | LD A,1 | Set A to 1 (NZ): no visible objects. | ||||||||||||
| 44882 | AND A | Set the flags from A. | ||||||||||||
| 44883 | RET | Return. | ||||||||||||
|
A visible object was found.
|
||||||||||||||
| CheckRoomObjects_Found | 44884 | XOR A | Set A to 0 (Z): a visible object was found. | |||||||||||
| 44885 | RET | Return. | ||||||||||||
|
View the equivalent code in The Jewels Of Babylon.
|
||||||||||||||
| Prev: 44849 | Up: Map | Next: 44886 |