![]() |
Routines |
| Prev: 40903 | Up: Map | Next: 41117 |
|
Used by the routines at ActionOpenOrClose and Message_RememberTheSeparator.
Lists the objects in the current place.
|
||||
| TableListWhatIsHere | 41040 | PUSH IX | Keep the object id. | |
| 41042 | PUSH BC | |||
| 41043 | PUSH DE | |||
| 41044 | LD C,A | |||
|
Find the object's record.
|
||||
| 41045 | CALL LocateObject | Call LocateObject to locate object. | ||
| 41048 | LD A,(IX+7) | Read the attribute flags from the object record. | ||
| 41051 | AND 40 | Keep bits 3, 5. | ||
| 41053 | JR Z,TableListWhatIsHere_FinishTheList | Jump to TableListWhatIsHere_FinishTheList when the object is neither broken nor open. | ||
| 41055 | LD A,C | Use the result again. | ||
|
Count the visible objects.
|
||||
| 41056 | CALL ObjectCount | Call ObjectCount to count the visible objects. | ||
| 41059 | CP 0 | Compare it with zero. | ||
| 41061 | JR Z,TableListWhatIsHere_FinishTheList | Jump to TableListWhatIsHere_FinishTheList if ObjectCount counted nothing inside the current object. | ||
| 41063 | BIT 6,(IX+7) | Jump to TableListWhatIsHere_UseTheToken if the object is not an animal. | ||
| 41067 | JR Z,TableListWhatIsHere_UseTheToken | |||
| 41069 | LD A,C | Use the result again. | ||
| 41070 | PUSH AF | Point HL at "[0x13] carrying[0x14]". | ||
| 41071 | LD HL,44537 | |||
| 41074 | JR TableListWhatIsHere_PrintCarryingOrThere | Jump to TableListWhatIsHere_PrintCarryingOrThere to print "carrying". | ||
| TableListWhatIsHere_UseTheToken | 41076 | LD HL,923 | Use the token IS. | |
| 41079 | DEC A | Drop one from the hold count. | ||
| 41080 | JR Z,TableListWhatIsHere_ReadTheNameTokenFromTheObject | Jump to TableListWhatIsHere_ReadTheNameTokenFromTheObject if the count was 1. | ||
| 41082 | LD HL,101 | Use the token ARE. | ||
| TableListWhatIsHere_ReadTheNameTokenFromTheObject | 41085 | PUSH HL | Read the name token from the object record. | |
| 41086 | LD L,(IX+8) | |||
| 41089 | LD A,(IX+9) | Read the name token's high byte from the object record. | ||
| 41092 | AND 15 | Keep the low nibble of byte 9 of this object. | ||
| 41094 | LD H,A | |||
| 41095 | PUSH HL | Call Message_ExitsForThisLocation to list the exits for this location. | ||
| 41096 | CALL Message_ExitsForThisLocation | |||
| 41099 | LD HL,45024 | Point at the message "[0x01] there[0x01][0x14]" (45024). | ||
| TableListWhatIsHere_PrintCarryingOrThere | 41102 | CALL PrintMessage | Call PrintMessage to print message. | |
| 41105 | AND A | Clear carry and return through TableListWhatIsHere_RestoreAndReturn. | ||
| TableListWhatIsHere_RestoreAndReturn | 41106 | POP DE | Restore DE, BC and IX from the stack. | |
| 41107 | POP BC | |||
| 41108 | POP IX | |||
| 41110 | RET | Return. | ||
| TableListWhatIsHere_FinishTheList | 41111 | CALL Print_LineBreak | Call Print_LineBreak to print a newline. | |
| 41114 | SCF | Set carry and return: the list of what is here is finished. | ||
| 41115 | JR TableListWhatIsHere_RestoreAndReturn | Jump back to TableListWhatIsHere_RestoreAndReturn. | ||
| Prev: 40903 | Up: Map | Next: 41117 |