![]() |
Routines |
| Prev: C0C3 | Up: Map | Next: C0F9 |
|
Used by the routines at Handler_DisplayRoom and Action_Inventory.
Print every object in the given place.
|
||||
| PrintObjects | C0D2 | LD HL,$B9C8 | Look up the object locations. | |
| C0D5 | LD BC,($BAF8) | |||
| PrintObjects_Loop | C0D9 | CPIR | Return if the search did not find a match. | |
| C0DB | RET NZ | |||
| C0DC | PUSH AF | Keep the search and turn the match into an object index. | ||
| C0DD | PUSH HL | |||
| C0DE | PUSH BC | |||
| C0DF | LD A,($BAF8) | |||
| C0E2 | SUB C | |||
| C0E3 | DEC A | |||
| C0E4 | LD E,A | |||
| C0E5 | LD IX,($BAE2) | Call GetTableEntry to fetch this object's description. | ||
| C0E9 | CALL GetTableEntry | |||
| C0EC | CALL PrintStringAndANewline | Call PrintStringAndANewline to print the description and start a new line. | ||
| C0EF | POP BC | Restore the search from the stack. | ||
| C0F0 | POP HL | |||
| C0F1 | POP AF | |||
| C0F2 | LD E,A | Look for another object here. | ||
| C0F3 | LD A,B | |||
| C0F4 | OR C | |||
| C0F5 | LD A,E | |||
| C0F6 | JR NZ,PrintObjects_Loop | |||
| C0F8 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: C0C3 | Up: Map | Next: C0F9 |