![]() |
Routines |
| Prev: 54421 | Up: Map | Next: 54476 |
|
Used by the routine at 53624.
Counts the objects in this room and prints them when the room is not empty.
|
||||
| PrintObjectList | 54439 | PUSH IY | Save the schedule entry, the result and the count. | |
| 54441 | PUSH AF | |||
| 54442 | PUSH BC | |||
| 54443 | LD A,255 | Set the location ID to 255 (current character location). | ||
|
Count objects in location.
|
||||
| 54445 | CALL CountObjectsInLocation | Call CountObjectsInLocation to count the objects in this location. | ||
|
Skip printing if no objects were found.
|
||||
| 54448 | JR Z,PrintObjectList_End | Stop the list when there are no more objects in this room. | ||
| 54450 | PUSH AF | Keep the object count and take the message at 26852. | ||
|
Print the introductory text for the object list.
|
||||
| 54451 | LD HL,26852 | |||
| 54454 | CALL PrintTextAndHandleControlCharacters | Call PrintTextAndHandleControlCharacters to print the message. | ||
| 54457 | POP BC | Restore the object count into C from the stack. | ||
| 54458 | LD C,B | |||
| 54459 | LD A,255 | Set the location ID to 255 (current character location) again. | ||
| 54461 | LD IY,(40983) | Read the current character's record, then call PrintObjectListWithFormatting to list the objects and describe them. | ||
| 54465 | LD B,(IY+15) | |||
| 54468 | CALL PrintObjectListWithFormatting | |||
| PrintObjectList_End | 54471 | POP BC | Restore the saved count, the saved result and the saved schedule entry from the stack. | |
| 54472 | POP AF | |||
| 54473 | POP IY | |||
| 54475 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 54421 | Up: Map | Next: 54476 |