![]() |
Routines |
| Prev: D102 | Up: Map | Next: D178 |
|
Used by the routine at ProcessLocationTokenDisplay.
Looks the current room up, prints its name and lists the objects that are here.
|
||||
| DescribeCurrentRoom | D113 | LD B,A | Use the room as the count, then call FetchLocationDataPointer to look up this room. | |
| D114 | CALL FetchLocationDataPointer | |||
| D117 | LD A,B | Call ProcessTextToken with the room in A. | ||
| D118 | CALL ProcessTextToken | |||
| D11B | PUSH IX | Keep the registers, read the current character and call GetObjectLocation to read that character's room. | ||
| D11D | PUSH BC | |||
| D11E | PUSH HL | |||
| D11F | LD A,($A036) | |||
| D122 | CALL GetObjectLocation | |||
| D125 | EX AF,AF' | Jump ahead to DescribeCurrentRoom_CharacterRecord if the room is the end marker. | ||
| D126 | CP $FF | |||
| D128 | JR Z,DescribeCurrentRoom_CharacterRecord | |||
| D12A | PUSH AF | Save the flags, read the text pointer at 68DE, save it and point HL at 8000. | ||
| D12B | LD HL,($68DE) | |||
| D12E | PUSH HL | |||
| D12F | LD HL,$8000 | |||
|
Write token to buffer.
|
||||
| D132 | CALL WriteTokenToBuffer | Call WriteTokenToBuffer to write the token into the buffer. | ||
| D135 | LD HL,$68DD | Take the message, then call PrintTextAndHandleControlCharacters to print the message. | ||
| D138 | CALL PrintTextAndHandleControlCharacters | |||
| D13B | POP HL | Record the text pointer. | ||
| D13C | LD ($68DE),HL | |||
| D13F | POP AF | Call FetchObjectDataPointer to look up that object. | ||
| D140 | PUSH AF | |||
| D141 | CALL FetchObjectDataPointer | |||
|
Print object attribute description.
|
||||
| D144 | CALL PrintObjectAttributeDescription | Call PrintObjectAttributeDescription to print the object's attribute text. | ||
| D147 | CALL TakeTheFoundObject | Call TakeTheFoundObject to run object entry alternate. | ||
| D14A | POP AF | |||
| D14B | PUSH AF | Call CountObjectsInLocation to count objects in location. | ||
| D14C | CALL CountObjectsInLocation | |||
| D14F | AND A | Jump ahead to DescribeCurrentRoom_ReadCharacter if no objects are in this room. | ||
| D150 | JR Z,DescribeCurrentRoom_ReadCharacter | |||
| D152 | LD C,A | Store the object count and call PrintTextToken to print token 09BF. | ||
| D153 | LD DE,$09BF | |||
| D156 | CALL PrintTextToken | |||
| D159 | LD A,($A00A) | Pass the character attribute in B. | ||
| D15C | LD B,A | |||
| D15D | POP AF | Restore the saved room from the stack. | ||
| D15E | CALL PrintObjectListWithFormatting | Call PrintObjectListWithFormatting. | ||
| D161 | JR DescribeCurrentRoom_CharacterRecord | The name was printed, so restore the registers from DescribeCurrentRoom_CharacterRecord. | ||
|
Read the character field, then read the count.
|
||||
| DescribeCurrentRoom_ReadCharacter | D163 | CALL PrintFullStop | Call PrintFullStop to print a full stop. | |
| D166 | POP AF | Restore the saved result from the stack. | ||
| DescribeCurrentRoom_CharacterRecord | D167 | POP DE | Restore DE, BC and IX from the stack. | |
| D168 | POP BC | |||
| D169 | POP IX | |||
| D16B | LD L,(IX+$07) | Read the character record. | ||
| D16E | LD H,(IX+$08) | Read the character record. | ||
| D171 | CALL PrintSetMessage | Call PrintSetMessage to print the message and take the count, then call PrintLocationExits to list the exits. | ||
| D174 | LD A,B | |||
| D175 | CALL PrintLocationExits | |||
| Prev: D102 | Up: Map | Next: D178 |