![]() |
Routines |
| Prev: 53506 | Up: Map | Next: 53624 |
|
Used by the routine at ProcessLocationTokenDisplay.
Looks the current room up, prints its name and lists the objects that are here.
|
||||
| DescribeCurrentRoom | 53523 | LD B,A | Use the room as the count, then call FetchLocationDataPointer to look up this room. | |
| 53524 | CALL FetchLocationDataPointer | |||
| 53527 | LD A,B | Call ProcessTextToken with the room in A. | ||
| 53528 | CALL ProcessTextToken | |||
| 53531 | PUSH IX | Keep the registers, read the current character and call GetObjectLocation to read that character's room. | ||
| 53533 | PUSH BC | |||
| 53534 | PUSH HL | |||
| 53535 | LD A,(41014) | |||
| 53538 | CALL GetObjectLocation | |||
| 53541 | EX AF,AF' | Jump ahead to DescribeCurrentRoom_CharacterRecord if the room is the end marker. | ||
| 53542 | CP 255 | |||
| 53544 | JR Z,DescribeCurrentRoom_CharacterRecord | |||
| 53546 | PUSH AF | Save the flags, read the text pointer at 26846, save it and point HL at 32768. | ||
| 53547 | LD HL,(26846) | |||
| 53550 | PUSH HL | |||
| 53551 | LD HL,32768 | |||
|
Write token to buffer.
|
||||
| 53554 | CALL WriteTokenToBuffer | Call WriteTokenToBuffer to write the token into the buffer. | ||
| 53557 | LD HL,26845 | Take the message, then call PrintTextAndHandleControlCharacters to print the message. | ||
| 53560 | CALL PrintTextAndHandleControlCharacters | |||
| 53563 | POP HL | Record the text pointer. | ||
| 53564 | LD (26846),HL | |||
| 53567 | POP AF | Call FetchObjectDataPointer to look up that object. | ||
| 53568 | PUSH AF | |||
| 53569 | CALL FetchObjectDataPointer | |||
|
Print object attribute description.
|
||||
| 53572 | CALL PrintObjectAttributeDescription | Call PrintObjectAttributeDescription to print the object's attribute text. | ||
| 53575 | CALL TakeTheFoundObject | Call TakeTheFoundObject to run object entry alternate. | ||
| 53578 | POP AF | |||
| 53579 | PUSH AF | Call CountObjectsInLocation to count objects in location. | ||
| 53580 | CALL CountObjectsInLocation | |||
| 53583 | AND A | Jump ahead to DescribeCurrentRoom_ReadCharacter if no objects are in this room. | ||
| 53584 | JR Z,DescribeCurrentRoom_ReadCharacter | |||
| 53586 | LD C,A | Store the object count and call PrintTextToken to print token 2495. | ||
| 53587 | LD DE,2495 | |||
| 53590 | CALL PrintTextToken | |||
| 53593 | LD A,(40970) | Pass the character attribute in B. | ||
| 53596 | LD B,A | |||
| 53597 | POP AF | Restore the saved room from the stack. | ||
| 53598 | CALL PrintObjectListWithFormatting | Call PrintObjectListWithFormatting. | ||
| 53601 | JR DescribeCurrentRoom_CharacterRecord | The name was printed, so restore the registers from DescribeCurrentRoom_CharacterRecord. | ||
|
Read the character field, then read the count.
|
||||
| DescribeCurrentRoom_ReadCharacter | 53603 | CALL PrintFullStop | Call PrintFullStop to print a full stop. | |
| 53606 | POP AF | Restore the saved result from the stack. | ||
| DescribeCurrentRoom_CharacterRecord | 53607 | POP DE | Restore DE, BC and IX from the stack. | |
| 53608 | POP BC | |||
| 53609 | POP IX | |||
| 53611 | LD L,(IX+7) | Read the character record. | ||
| 53614 | LD H,(IX+8) | Read the character record. | ||
| 53617 | CALL PrintSetMessage | Call PrintSetMessage to print the message and take the count, then call PrintLocationExits to list the exits. | ||
| 53620 | LD A,B | |||
| 53621 | CALL PrintLocationExits | |||
| Prev: 53506 | Up: Map | Next: 53624 |