| Alien (BUGFIX 1.7) | Routines |
| Prev: 40040 | Up: Map | Next: 40212 |
|
Clears the 19×20-character area of the display used by the alien encounter picture: stamps the blank tile into each cell via DrawTileA (with A=0), then paints the same area's attributes green-ink- on-black (4).
|
||||
| 40149 | LD HL,16384 | HL = DisplayFile: start of display file | ||
| 40152 | LD (31257),HL | store current screen cell address | ||
| 40155 | LD C,19 | 19 character rows | ||
| 40157 | LD B,20 | 20 columns per row | ||
| 40159 | PUSH BC | |||
| 40160 | XOR A | A = 0: the blank tile | ||
| 40161 | CALL 31370 | DrawTileA(0): stamp 8 blank pixel rows into the cell | ||
| 40164 | LD HL,31257 | bump the draw pointer | ||
| 40167 | INC (HL) | one cell to the right | ||
| 40168 | POP BC | |||
| 40169 | DJNZ 40159 | |||
| 40171 | LD DE,12 | row advance: 20 cells + 12 = 32, next char row | ||
| 40174 | LD HL,(31257) | |||
| 40177 | LD A,L | unless we just finished the last char row | ||
| 40178 | CP 224 | of a screen third... | ||
| 40180 | JR C,40185 | |||
| 40182 | LD DE,1804 | ...then +1804 ($070C) hops into the next third | ||
| 40185 | ADD HL,DE | |||
| 40186 | LD (31257),HL | |||
| 40189 | DEC C | |||
| 40190 | JR NZ,40157 | next of the 19 rows | ||
| 40192 | LD DE,12 | attr sweep: same 19 rows x 20 cols | ||
| 40195 | LD HL,22528 | from the top of the attribute file | ||
| 40198 | LD C,19 | |||
| 40200 | LD B,20 | |||
| 40202 | LD (HL),4 | attr 4: green ink on black paper | ||
| 40204 | INC HL | |||
| 40205 | DJNZ 40202 | |||
| 40207 | ADD HL,DE | +12: next attribute row | ||
| 40208 | DEC C | |||
| 40209 | JR NZ,40200 | |||
| 40211 | RET | |||
| Prev: 40040 | Up: Map | Next: 40212 |