Prev: 26986 Up: Map Next: 27441
27171: Routine at 6A23
Used by the routine at 30230.
27171 LD DE,16591 DE=16591 (screen buffer location).
27174 PUSH DE Stash DE on the stack.
27175 LD HL,25921 HL=25921.
27178 LD BC,562 BC=562.
27181 CALL CustomFont_PrintString Call CustomFont_PrintString.
27184 POP HL Restore HL from the stack.
27185 LD A,(26324) A=*26324.
27188 PUSH AF Stash AF on the stack.
27189 SRA A Shift A right (with carry).
27191 AND %00000111 Keep only bits 0-2.
27193 XOR %00000111 Flip bits 0-2.
27195 ADD A,H A+=H.
27196 LD H,A H=A.
27197 LD (HL),3 Write 3 to *HL.
27199 INC HL Increment HL by one.
27200 LD (HL),192 Write 192 to *HL.
27202 POP AF Restore AF from the stack.
27203 AND %00000011 Keep only bits 0-1.
27205 JR NZ,27241 Jump to 27241 if HL is not equal to 0.
27207 LD HL,18487 HL=18487 (screen buffer location).
27210 LD DE,18488 DE=18488 (screen buffer location).
27213 LD B,8 B=8.
27215 PUSH BC Stash BC on the stack.
27216 LD A,(DE) A=*DE.
27217 PUSH HL Stash HL and DE on the stack.
27218 PUSH DE
27219 LD BC,17 BC=0017.
27222 LDDR LDDR.
27224 LD (DE),A Write A to *DE.
27225 POP DE Restore DE and HL from the stack.
27226 POP HL
27227 INC H Increment H by one.
27228 INC D Increment D by one.
27229 POP BC Restore BC from the stack.
27230 DJNZ 27215 Decrease counter by one and loop back to 27215 until counter is zero.
27232 LD D,89 D=89.
27234 LD H,D H=D.
27235 LD C,17 C=17.
27237 LD A,(DE) A=*DE.
27238 LDDR LDDR.
27240 LD (DE),A Write A to *DE.
27241 LD HL,26324 HL=26324.
27244 LD A,(HL) A=*HL.
27245 INC (HL) Increment *HL by one.
27246 AND %00001111 Keep only bits 0-3.
27248 JR NZ,27289 Jump to 27289 if *HL is not equal to 17.
27250 BIT 4,(HL) Test bit 4 of *HL.
27252 LD HL,24532 HL=Graphics_MothershipAlien_01.
27255 JR Z,27260 Jump to 27260 if *HL is equal to 17.
27257 LD HL,24564 HL=Graphics_MothershipAlien_02.
27260 LD DE,16623 DE=16623 (screen buffer location).
27263 LD B,2 B=2.
27265 PUSH BC Stash BC on the stack.
27266 LD B,2 B=2.
27268 PUSH BC Stash BC and DE on the stack.
27269 PUSH DE
27270 LD B,8 Set a line counter in B (8 lines in a UDG).
27272 LD A,(HL) Copy the UDG data to the screen buffer.
27273 LD (DE),A
27274 INC D Move down one pixel line in the screen buffer.
27275 INC HL Move to the next UDG graphic data byte.
27276 DJNZ 27272 Decrease the line counter by one and loop back to 27272 until all 8 lines of the UDG character have been drawn.
27278 POP DE Restore DE from the stack.
27279 INC DE Increment DE by one.
27280 POP BC Restore BC from the stack.
27281 DJNZ 27268 Decrease counter by one and loop back to 27268 until counter is zero.
27283 LD DE,18447 DE=18447 (screen buffer location).
27286 POP BC Restore BC from the stack.
27287 DJNZ 27265 Decrease counter by one and loop back to 27265 until counter is zero.
27289 LD A,(26261) Return if *26261 is not zero.
27292 OR A
27293 RET NZ
27294 LD HL,3 HL=0003.
27297 PUSH HL Stash HL on the stack.
27298 PUSH HL IX=HL (using the stack).
27299 POP IX
27301 LD BC,26298 BC=26298.
27304 ADD HL,HL HL+=HL.
27305 ADD HL,BC HL+=BC.
27306 PUSH HL Stash HL on the stack.
27307 LD E,(HL) E=*HL.
27308 INC HL Increment HL by one.
27309 LD D,(HL) D=*HL.
27310 LD A,D A=D.
27311 EX DE,HL Exchange the DE and HL registers.
27312 OR A Jump to 27337 if A is not zero.
27313 JR NZ,27337
27315 CALL 26382 Call 26382.
27318 AND %00001111 Keep only bits 0-3.
27320 OR A Set the bits from A.
27321 JR NZ,27328 Jump to 27328 if HL is not equal to A.
27323 LD HL,22863 HL=22863 (attribute buffer location).
27326 JR 27378 Jump to 27378.
27328 CP 3 Jump to 27429 if A is not equal to 3.
27330 JR NZ,27429
27332 LD HL,22864 HL=22864 (attribute buffer location).
27335 JR 27378 Jump to 27378.
27337 LD A,(HL) A=*HL.
27338 AND %01000111 Keep only bits 0-2, 6.
27340 CP 6 Jump to 27360 if A is not equal to 6.
27342 JR NZ,27360
27344 LD A,(HL) A=*HL.
27345 AND %11111000 Keep only bits 3-7.
27347 LD (HL),A Write A to *HL.
27348 PUSH HL Stash HL on the stack.
27349 CALL ConvertAttributeToScreenBufferAddress Call ConvertAttributeToScreenBufferAddress.
27352 LD B,8 B=8.
27354 XOR A Write 0 to *HL.
27355 LD (HL),A
27356 INC H Increment H by one.
27357 DJNZ 27355 Decrease counter by one and loop back to 27355 until counter is zero.
27359 POP HL Restore HL from the stack.
27360 LD BC,32 HL+=0032.
27363 ADD HL,BC
27364 PUSH HL Stash HL on the stack.
27365 LD BC,23295 BC=23295 (attribute buffer location).
27368 AND A HL-=BC.
27369 SBC HL,BC
27371 POP HL Restore HL from the stack.
27372 JR C,27378 Jump to 27378 if H is less than A.
27374 LD H,0 H=0.
27376 JR 27429 Jump to 27429.
27378 LD A,(HL) Jump to 27429 if *HL is equal to 2.
27379 CP 2
27381 JR Z,27429
27383 CP 70 Jump to 27397 if *HL is not equal to 70.
27385 JR NZ,27397
27387 LD A,(26259) Jump to 27374 if *26259 is not zero.
27390 OR A
27391 JR NZ,27374
27393 LD (HL),6 Write 6 to *HL.
27395 JR 27405 Jump to 27405.
27397 AND %00000111 Keep only bits 0-2.
27399 JR NZ,27374 Jump to 27374 if A is not equal to A.
27401 LD A,(HL) A=*HL.
27402 ADD A,6 A+=6.
27404 LD (HL),A Write A to *HL.
27405 PUSH HL Stash HL on the stack.
27406 CALL ConvertAttributeToScreenBufferAddress Call ConvertAttributeToScreenBufferAddress.
27409 EX DE,HL Exchange the DE and HL registers.
27410 LD BC,24614 BC=Graphics_LivesIcon.
27413 PUSH IX HL=IX (using the stack).
27415 POP HL
27416 ADD HL,HL Multiply HL by 8.
27417 ADD HL,HL
27418 ADD HL,HL
27419 ADD HL,BC HL+=BC.
27420 LD B,8 Set a line counter in B (8 lines in a UDG).
27422 LD A,(HL) Copy the UDG data to the screen buffer.
27423 LD (DE),A
27424 INC D Move down one pixel line in the screen buffer.
27425 INC HL Move to the next UDG graphic data byte.
27426 DJNZ 27422 Decrease the line counter by one and loop back to 27422 until all 8 lines of the UDG character have been drawn.
27428 POP HL Restore HL from the stack.
27429 EX DE,HL Exchange the DE and HL registers.
27430 POP HL Restore HL from the stack.
27431 LD (HL),E Write E to *HL.
27432 INC HL Increment HL by one.
27433 LD (HL),D Write D to *HL.
27434 INC HL Increment HL by one.
27435 POP HL Restore HL from the stack.
27436 DEC L Decrease L by one.
27437 JP NZ,27297 Jump to 27297 if L is not equal to A.
27440 RET Return.
Prev: 26986 Up: Map Next: 27441