![]() |
Routines |
| Prev: 24966 | Up: Map | Next: 25245 |
|
Prints where the player is, what is here, and which ways lead out. Bank 6 supplies the long text for rooms below 102, and it opens "welcome to Blizzard Pass by Alan Cox. This program is dedicated to Hawkwind. Any resemblance between the characters in the game and your mother in law is total coincidence". A dark room says so and lists nothing. The text is underlined before the cursor is put back for the prompt.
|
||||
|
Remember the cursor, and choose a row. Pictures use row 13 so the text sits under the illustration.
|
||||
| DescribeLocation | 24967 | LD A,255 | The description pauses at the bottom of the picture. | |
| 24969 | LD (24966),A | |||
| 24972 | LD A,46 | A full stop makes the first letter a capital. | ||
| 24974 | LD (23451),A | |||
| 24977 | LD HL,(23433) | Save the cursor so it can be restored under the rule. | ||
| 24980 | PUSH HL | |||
| 24981 | LD HL,(23431) | |||
| 24984 | PUSH HL | |||
| 24985 | CALL ClearLowerRows | Call ClearLowerRows to clear the text rows. | ||
| 24988 | LD A,(26326) | Pictures off forces row 0. | ||
| 24991 | OR A | |||
| 24992 | LD A,13 | Pictures on use row 13. | ||
| 24994 | JR NZ,DescribeLocation_Row | |||
| 24996 | XOR A | |||
| DescribeLocation_Row | 24997 | LD (23433),A | Remember that row. | |
| 25000 | CALL HomeRow | Call HomeRow and home the cursor. | ||
| 25003 | XOR A | |||
| 25004 | LD (23434),A | |||
| 25007 | LD A,(23944) | Darkness skips the description. | ||
| 25010 | OR A | |||
| 25011 | JR Z,DescribeLocation_Text | |||
| 25013 | LD A,25 | Message 25: it is dark, you cannot see. | ||
| 25015 | CALL PrintSystemMessage | |||
| 25018 | JP DescribeLocation_Rule | Jump to DescribeLocation_Rule to underline the description. | ||
|
Rooms under 102 with pictures switched off are read from bank 6. Every other room uses the tokenised text at TokenisedLocations.
|
||||
| DescribeLocation_Text | 25021 | LD HL,30158 | The default text is the tokenised list at TokenisedLocations. | |
| 25024 | LD A,(23943) | Rooms at or above 102 have no long description. | ||
| 25027 | CP 102 | |||
| 25029 | JR NC,DescribeLocation_Print | |||
| 25031 | LD A,(26326) | Pictures on also keep the short text. | ||
| 25034 | OR A | |||
| 25035 | LD A,(23943) | |||
| 25038 | JR NZ,DescribeLocation_Print | |||
| DescribeLocation_Page | 25040 | PUSH AF | page RAM bank 6 in at 49152, keeping the 48K ROM. | |
| 25041 | LD A,6 | |||
| 25043 | CALL PageBank | |||
| 25046 | LD HL,49152 | The long description starts at 49152. | ||
| 25049 | POP AF | |||
| DescribeLocation_Print | 25050 | LD (23439),A | Store the room as the message number. | |
| 25053 | CALL PrintMessage | Call PrintMessage to print that description. | ||
| 25056 | XOR A | page RAM bank 0 in at 49152, keeping the 48K ROM. | ||
| 25057 | CALL PageBank | |||
| 25060 | XOR A | No object has been listed yet. Start the scan at ObjectLocations. | ||
| 25061 | LD (23418),A | |||
| 25064 | LD HL,24010 | |||
| 25067 | LD B,A | |||
|
List every object whose location byte is this room. The first one is introduced with a colon.
|
||||
| DescribeLocation_Objects | 25068 | LD A,(23943) | This object is in the current room. | |
| 25071 | CP (HL) | |||
| 25072 | JR NZ,DescribeLocation_Next | |||
| 25074 | LD A,(23418) | Another object in the same room skips the introduction. | ||
| 25077 | OR A | |||
| 25078 | JR NZ,DescribeLocation_Seen | |||
| 25080 | LD A,B | An index below 70 is named without the introduction. | ||
| 25081 | CP 70 | |||
| 25083 | JR C,DescribeLocation_Name | |||
| 25085 | XOR A | Message 0: ". You can see ". | ||
| 25086 | PUSH BC | |||
| 25087 | CALL PrintSystemMessage | |||
| 25090 | POP BC | |||
| 25091 | LD A,32 | Print a space and a colon. | ||
| 25093 | CALL PlotCharacter | |||
| 25096 | LD A,58 | |||
| 25098 | CALL PlotCharacter | |||
| 25101 | LD A,45 | Print a dash and a space. | ||
| 25103 | CALL PlotCharacter | |||
| 25106 | LD A,32 | |||
| 25108 | CALL PlotCharacter | |||
| DescribeLocation_Seen | 25111 | LD A,1 | Remember that an object was listed. | |
| 25113 | LD (23418),A | |||
| DescribeLocation_Name | 25116 | LD A,B | Call PrintObjectName to print this object's name. | |
| 25117 | CALL PrintObjectName | |||
| DescribeLocation_Next | 25120 | LD A,(23949) | Stop at the object total. | |
| 25123 | CP B | |||
| 25124 | JR Z,DescribeLocation_Exits | |||
| 25126 | INC B | The next location byte belongs to the next object. | ||
| 25127 | INC HL | |||
| 25128 | JR DescribeLocation_Objects | |||
|
After the objects, list the directions that leave this room.
|
||||
| DescribeLocation_Exits | 25130 | LD A,(23418) | An empty list needs no tidy-up. | |
| 25133 | OR A | |||
| 25134 | JR Z,DescribeLocation_Moves | |||
| 25136 | LD A,12 | Two backspaces remove the comma after the last object. | ||
| 25138 | CALL PlotCharacter | |||
| 25141 | LD A,12 | |||
| 25143 | CALL PlotCharacter | |||
| DescribeLocation_Moves | 25146 | CALL FindExits | Call FindExits to find this room's exits. | |
| 25149 | INC HL | No exits means no "you can go" line. | ||
| 25150 | BIT 7,(HL) | |||
| 25152 | JR NZ,DescribeLocation_Rule | |||
| 25154 | LD A,13 | Message 13: ". You can go". | ||
| 25156 | CALL PrintSystemMessage | |||
| DescribeLocation_Exit | 25159 | LD A,(HL) | Bit 7 ends the list of directions. | |
| 25160 | BIT 7,A | |||
| 25162 | JR NZ,DescribeLocation_Stop | |||
| 25164 | CALL PrintSystemMessage | Print the direction and step to the next exit. | ||
| 25167 | INC HL | |||
| 25168 | INC HL | |||
| 25169 | JR DescribeLocation_Exit | |||
| DescribeLocation_Stop | 25171 | LD A,12 | Rub out the last comma. | |
| 25173 | CALL PlotCharacter | |||
| 25176 | LD A,12 | |||
| 25178 | CALL PlotCharacter | |||
| 25181 | LD A,46 | Finish with a full stop. | ||
| 25183 | CALL PlotCharacter | |||
|
Underline the description and restore the cursor the caller had saved.
|
||||
| DescribeLocation_Rule | 25186 | XOR A | The description is finished, so scrolling may resume. | |
| 25187 | LD (24966),A | |||
| 25190 | LD A,13 | Start the rule on a new line. | ||
| 25192 | CALL PrintCharacter | |||
| 25195 | LD A,(26326) | Pictures on keep the row the text already reached. | ||
| 25198 | OR A | |||
| 25199 | LD A,(23433) | |||
| 25202 | JR NZ,DescribeLocation_Bottom | |||
| 25204 | LD A,15 | Pictures off force row 15. | ||
| 25206 | LD (23433),A | |||
| 25209 | XOR A | Home the cursor and keep that row. | ||
| 25210 | LD (23434),A | |||
| 25213 | CALL HomeRow | |||
| 25216 | LD A,15 | |||
| DescribeLocation_Bottom | 25218 | INC A | The rule sits on the row under the text. | |
| 25219 | LD (23447),A | |||
| 25222 | LD B,42 | Forty-two underscores fill the row. | ||
| DescribeLocation_Bar | 25224 | LD A,95 | Print one underscore. | |
| 25226 | CALL PlotCharacter | |||
| 25229 | DJNZ DescribeLocation_Bar | |||
| 25231 | LD A,13 | Close the rule with ENTER. | ||
| 25233 | CALL PrintCharacter | |||
| 25236 | POP HL | Restore the cursor saved before the description from the stack. | ||
| 25237 | LD (23431),HL | |||
| 25240 | POP HL | |||
| 25241 | LD (23433),HL | |||
| 25244 | RET | Return. | ||
| Prev: 24966 | Up: Map | Next: 25245 |