Prev: 42528 Up: Map Next: 42821
42581: DrawIntroScreen
Draws and animates the Alien title screen. Clears the display, sets border to black, fills attributes (0 = black on black = hidden). Renders a 15×11 tile grid: each byte of the tile map at 40504 is a tile index; multiplied by 8 gives an offset into the 8-byte-per-tile bitmap array at 62000 (actually at 62000 = 62000 decimal, in the extra-data area loaded at 60000). Tile rows are blitted column by column down into the display file. After drawing, loops animating colours until any key on row $F7FE is pressed.
Input
Used by the routine at 36457.
42581 CALL 42501 ClearDisplay: blank all pixel data
42584 XOR A A = 0 (black border, black attributes)
42585 OUT (254),A set border colour = black
42587 CALL 42515 FillAttributes(0): all black-on-black (invisible)
42590 LD DE,40504 DE = 40504 (intro tile-map data)
42593 LD HL,16522 HL = $408A (screen address: top-left of tile area)
42596 LD (31257),HL store as current draw pointer (31241)
42599 LD B,15 15 tile columns
42601 PUSH BC
42602 LD B,11
42604 PUSH BC
42605 PUSH DE
42606 LD A,(DE)
42607 LD L,A
42608 LD H,0
42610 ADD HL,HL
42611 ADD HL,HL
42612 ADD HL,HL
42613 LD DE,62000
42616 ADD HL,DE
42617 LD DE,(31257)
42621 LD B,8
42623 LD A,(HL)
42624 LD (DE),A
42625 INC D
42626 INC HL
This entry point is used by the routine at 42515.
42627 DJNZ 42623
42629 LD HL,31257
42632 INC (HL)
This entry point is used by the routine at 42515.
42633 POP DE
42634 INC DE
42635 POP BC
42636 DJNZ 42604
42638 LD BC,21
42641 LD HL,(31257)
42644 LD A,L
42645 CP 224
42647 JR C,42652
42649 LD BC,1813
42652 ADD HL,BC
42653 LD (31257),HL
42656 POP BC
42657 DJNZ 42601
42659 LD A,7
42661 CALL 42515
42664 LD HL,22890
42667 LD DE,40669
42670 LD B,8
42672 PUSH BC
42673 LD B,11
42675 LD A,(DE)
42676 LD (HL),A
42677 INC DE
42678 INC HL
42679 DJNZ 42675
42681 LD BC,21
42684 ADD HL,BC
42685 POP BC
42686 DJNZ 42672
42688 LD HL,16425
42691 LD (31257),HL
42694 LD DE,42528
42697 LD B,5
42699 PUSH BC
42700 PUSH DE
42701 CALL 31369
42704 LD HL,31257
42707 INC (HL)
42708 INC (HL)
42709 INC (HL)
42710 CALL 40439
42713 POP DE
42714 INC DE
42715 POP BC
42716 DJNZ 42699
42718 LD HL,20612
42721 LD (31257),HL
42724 LD B,4
42726 LD DE,42541
42729 CALL 44509
42732 LD HL,20644
42735 LD (31257),HL
42738 LD B,4
42740 LD DE,42545
42743 CALL 44509
42746 LD HL,20630
42749 LD (31257),HL
42752 LD B,5
42754 LD DE,42549
42757 CALL 44509
42760 LD HL,20662
42763 LD (31257),HL
42766 LD B,5
42768 LD DE,42554
42771 CALL 44509
42774 LD HL,20694
42777 LD (31257),HL
42780 LD B,8
42782 LD DE,42559
42785 CALL 44509
42788 LD HL,20712
42791 LD (31257),HL
42794 LD B,14
42796 LD DE,42567
42799 CALL 44509
42802 CALL 40439
42805 LD BC,65278
42808 IN A,(C)
42810 AND 31
42812 XOR 31
42814 RET NZ
42815 RLC B
42817 JR C,42808
42819 JR 42802
Prev: 42528 Up: Map Next: 42821