| Alien (BUGFIX 1.7) | Routines |
| Prev: 31964 | Up: Map | Next: 32385 |
| 32143 | LD A,(31242) | room-name string = room number, | ||
| 32146 | BIT 6,A | or 93 "In Duct" inside the ducts | ||
| 32148 | JR Z,32152 | |||
| 32150 | LD A,93 | |||
| 32152 | LD HL,20576 | draw pointer -> title row | ||
| 32155 | LD (31257),HL | (row 19, col 0) | ||
| 32158 | CALL 31634 | DrawSprite: the 10-char name entry | ||
| 32161 | LD HL,31242 | in the ducts: no damage meter | ||
| 32164 | BIT 6,(HL) | |||
| 32166 | RET NZ | |||
| 32167 | LD HL,20587 | "Damage " (89) | ||
| 32170 | LD (31257),HL | (row 19, col 11) | ||
| 32173 | LD A,89 | |||
| 32175 | CALL 31634 | DrawSprite | ||
| 32178 | LD A,(31242) | DE -> RoomDamageDigits[room] | ||
| 32181 | ADD A,A | |||
| 32182 | LD L,A | |||
| 32183 | LD H,0 | |||
| 32185 | LD DE,30006 | |||
| 32188 | ADD HL,DE | |||
| 32189 | EX DE,HL | |||
| 32190 | LD HL,20594 | draw the two ASCII digits | ||
| 32193 | LD (31257),HL | (row 19, col 18) | ||
| 32196 | PUSH DE | |||
| 32197 | CALL 31369 | DrawSpriteRow: the tens digit | ||
| 32200 | POP DE | |||
| 32201 | LD HL,31257 | advance one cell | ||
| 32204 | INC (HL) | |||
| 32205 | INC DE | |||
| 32206 | CALL 31369 | the units digit | ||
| 32209 | LD HL,31257 | |||
| 32212 | INC (HL) | |||
| 32213 | LD A,135 | damage-meter icon glyph | ||
| 32215 | CALL 31370 | DrawTileA | ||
| 32218 | RET | |||
|
Room-info panel text fragments (was mis-disassembled as code): ASCII strings drawn one glyph at a time by the panel routines below. Byte 136 is the grille-icon UDG.
|
||||
| 32219 | DEFM "Items Present" | |||
| 32232 | DEFM "Grille" | |||
| 32238 | DEFM " is ",136," " | |||
| 32244 | DEFM "Also here " | |||
| 32254 | DEFM "and " | |||
| 32258 | DEFM "but " | |||
| 32262 | DEFM "Also " | |||
| 32267 | DEFM "Bodies of " | |||
| 32277 | DEFM " ",136," " | |||
|
DrawItemsAndGrille: room-info panel section under the room name. Draws the "Items Present" header when the viewed room's item list ($750A) is non-empty, then (except aboard the Narcissus, room 34) prints "Grille" plus its state (" in place "/" removed ") from RoomGrilleState and plants the matching action-menu entry: string 49 "RmveGrille" in the Special slot (strip cell 13) while in place, or string 50 "Grille" as a move-to target (strip cell 1) once removed. Used by the routine at 32719.
|
||||
| 32280 | LD HL,29962 | HL -> viewed room's item list | ||
| 32283 | LD A,(HL) | first entry: 255 = no items here | ||
| 32284 | CP 255 | |||
| 32286 | JR Z,32313 | no items: skip the header | ||
| 32288 | LD HL,20608 | draw pointer -> items header row | ||
| 32291 | LD (31257),HL | |||
| 32294 | LD DE,32219 | "Items Present" | ||
| 32297 | LD B,13 | 13 characters | ||
| 32299 | PUSH BC | |||
| 32300 | PUSH DE | |||
| 32301 | CALL 31369 | DrawSpriteRow: one glyph | ||
| 32304 | POP DE | |||
| 32305 | POP BC | |||
| 32306 | INC DE | next character | ||
| 32307 | LD HL,31257 | |||
| 32310 | INC (HL) | draw pointer right one column | ||
| 32311 | DJNZ 32299 | |||
| 32313 | LD A,(31242) | A = viewed room | ||
| 32316 | CP 34 | Narcissus: no grille aboard the shuttle | ||
| 32318 | RET Z | |||
| 32319 | LD DE,32232 | "Grille" | ||
| 32322 | LD HL,20624 | draw pointer -> grille status row | ||
| 32325 | LD (31257),HL | |||
| 32328 | LD B,6 | 6 characters | ||
| 32330 | PUSH BC | |||
| 32331 | PUSH DE | |||
| 32332 | CALL 31369 | DrawSpriteRow: one glyph | ||
| 32335 | POP DE | |||
| 32336 | POP BC | |||
| 32337 | INC DE | |||
| 32338 | LD HL,31257 | |||
| 32341 | INC (HL) | |||
| 32342 | DJNZ 32330 | |||
| 32344 | LD A,(31242) | index RoomGrilleState by room number | ||
| 32347 | AND 63 | (mask off the in-ducts flag, bit 6) | ||
| 32349 | LD L,A | |||
| 32350 | LD H,0 | |||
| 32352 | LD DE,30076 | |||
| 32355 | ADD HL,DE | |||
| 32356 | LD A,(HL) | |||
| 32357 | CP 255 | 255 = grille still in place | ||
| 32359 | JR Z,32373 | |||
| 32361 | LD A,91 | removed: print strip 91 " removed " | ||
| 32363 | CALL 31634 | |||
| 32366 | LD DE,29631 | menu strip cell 1 (a move-to target): | ||
| 32369 | LD A,50 | string 50 "Grille" = enter the open duct | ||
| 32371 | LD (DE),A | |||
| 32372 | RET | |||
| 32373 | LD A,90 | in place: print strip 90 " in place " | ||
| 32375 | CALL 31634 | |||
| 32378 | LD DE,29643 | menu strip cell 13 (the Special slot): | ||
| 32381 | LD A,49 | string 49 "RmveGrille" | ||
| 32383 | LD (DE),A | |||
| 32384 | RET | |||
| Prev: 31964 | Up: Map | Next: 32385 |