![]()  | 
Routines | 
| Prev: C439 | Up: Map | Next: C470 | 
| 
 
Used by the routines at PrintObjects and CheckRoomObjects.
 
 
  | 
||||||||||||
| ValidateObject | C456 | PUSH AF | Stash AF and BC on the stack. | |||||||||
| C457 | PUSH BC | |||||||||||
| C458 | INC BC | Adjust the object counter. | ||||||||||
| C459 | LD A,($BD28) | A=*Count_Items. | ||||||||||
| C45C | SUB C | Calculate the index and store the result in E. | ||||||||||
| C45D | LD E,A | |||||||||||
| C45E | LD IX,($BD12) | IX=*Pointer_ItemDescriptions. | ||||||||||
| C462 | CALL GetTableEntry | Call GetTableEntry. | ||||||||||
| C465 | POP BC | Restore the object counter from the stack. | ||||||||||
| C466 | LD A,H | Jump to InvalidObject if the object is invalid. | ||||||||||
| C467 | OR L | |||||||||||
| C468 | JR Z,InvalidObject | |||||||||||
| C46A | POP AF | Restore the object type from the stack. | ||||||||||
| C46B | AND A | Clear the Z flag. | ||||||||||
| C46C | RET | Return. | ||||||||||
| InvalidObject | C46D | POP AF | Restore AF from the stack. | |||||||||
| C46E | CP A | Set the Z flag. | ||||||||||
| C46F | RET | Return. | ||||||||||
| Prev: C439 | Up: Map | Next: C470 |