![]()  | 
Routines | 
| Prev: 50214 | Up: Map | Next: 50262 | 
| 
 
Used by the routine at Handler_RoomExits.
 
 
  | 
||||||||||||
| CheckRoomObjects | 50233 | LD HL,48112 | HL=Table_ItemLocations. | |||||||||
| 50236 | LD BC,(48424) | BC=*Count_Items. | ||||||||||
| CheckRoomObjects_Loop | 50240 | CPIR | Search for the room number in the table. | |||||||||
| 50242 | RET NZ | Return if no objects are found. | ||||||||||
| 50243 | PUSH HL | Stash the object location table pointer on the stack. | ||||||||||
| 50244 | CALL ValidateObject | Call ValidateObject. | ||||||||||
| 50247 | POP HL | Restore the object location table pointer from the stack. | ||||||||||
| 50248 | JR NZ,NoRoomObjectsFound | Jump to NoRoomObjectsFound if there are no objects found here. | ||||||||||
| 50250 | LD E,A | Temporarily store A in E. | ||||||||||
| 50251 | LD A,B | Are there more objects to check? | ||||||||||
| 50252 | OR C | |||||||||||
| 50253 | LD A,E | Restore the A register. | ||||||||||
| 50254 | JR NZ,CheckRoomObjects_Loop | Jump to CheckRoomObjects_Loop if there are more objects to check. | ||||||||||
| 
 
Set the "successful" output.
 
 | 
||||||||||||
| 50256 | LD A,1 | Set A to 1 to indicate that objects were found. | ||||||||||
| 50258 | AND A | Set flags. | ||||||||||
| 50259 | RET | Return. | ||||||||||
| 
 
Set the "failure" output.
 
 | 
||||||||||||
| NoRoomObjectsFound | 50260 | XOR A | Set A to 0 to indicate that no objects were found. | |||||||||
| 50261 | RET | Return. | ||||||||||
| Prev: 50214 | Up: Map | Next: 50262 |