![]() |
Routines |
| Prev: D495 | Up: Map | Next: D4CC |
|
Used by the routine at D178.
Counts the objects in this room and prints them when the room is not empty.
|
||||
| PrintObjectList | D4A7 | PUSH IY | Save the schedule entry, the result and the count. | |
| D4A9 | PUSH AF | |||
| D4AA | PUSH BC | |||
| D4AB | LD A,$FF | Set the location ID to FF (current character location). | ||
|
Count objects in location.
|
||||
| D4AD | CALL CountObjectsInLocation | Call CountObjectsInLocation to count the objects in this location. | ||
|
Skip printing if no objects were found.
|
||||
| D4B0 | JR Z,PrintObjectList_End | Stop the list when there are no more objects in this room. | ||
| D4B2 | PUSH AF | Keep the object count and take the message at 68E4. | ||
|
Print the introductory text for the object list.
|
||||
| D4B3 | LD HL,$68E4 | |||
| D4B6 | CALL PrintTextAndHandleControlCharacters | Call PrintTextAndHandleControlCharacters to print the message. | ||
| D4B9 | POP BC | Restore the object count into C from the stack. | ||
| D4BA | LD C,B | |||
| D4BB | LD A,$FF | Set the location ID to FF (current character location) again. | ||
| D4BD | LD IY,($A017) | Read the current character's record, then call PrintObjectListWithFormatting to list the objects and describe them. | ||
| D4C1 | LD B,(IY+$0F) | |||
| D4C4 | CALL PrintObjectListWithFormatting | |||
| PrintObjectList_End | D4C7 | POP BC | Restore the saved count, the saved result and the saved schedule entry from the stack. | |
| D4C8 | POP AF | |||
| D4C9 | POP IY | |||
| D4CB | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: D495 | Up: Map | Next: D4CC |