![]() |
Routines |
| Prev: B3F1 | Up: Map | Next: B41F |
|
Used by the routines at HandlerDisplayRoomExits and Action_Inventory.
List the objects the player can see in this room.
|
||||||||
| PrintObjects | B400 | LD HL,$AD76 | Point HL at Table_ItemLocations. | |||||
| B403 | LD BC,($AEF0) | Load the number of items into BC. | ||||||
| PrintObjects_Loop | B407 | CPIR | Search Table_ItemLocations for the next item in this room. | |||||
| B409 | RET NZ | Return if no matching items remain. | ||||||
| B40A | PUSH HL | Stash the current place in Table_ItemLocations on the stack. | ||||||
| B40B | CALL ValidateObject | Call ValidateObject to see whether this item has a description. | ||||||
| B40E | JR Z,PrintObjects_Next | Skip an item that has no description. | ||||||
| B410 | PUSH AF | Remember the room ID and the remaining count while the name is printed. | ||||||
| B411 | PUSH BC | |||||||
| B412 | CALL PrintStringAndANewline | Call PrintStringAndANewline to print the string and start a new line. | ||||||
| B415 | POP BC | Restore the remaining count and the room ID from the stack. | ||||||
| B416 | POP AF | |||||||
| PrintObjects_Next | B417 | LD E,A | Hold the room ID in E. | |||||
| B418 | POP HL | Restore the current place in Table_ItemLocations from the stack. | ||||||
| B419 | LD A,B | See whether any items remain. | ||||||
| B41A | OR C | |||||||
| B41B | LD A,E | Restore the room ID to A. | ||||||
| B41C | JR NZ,PrintObjects_Loop | Jump to PrintObjects_Loop while items remain. | ||||||
| B41E | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: B3F1 | Up: Map | Next: B41F |