Prev: 58476 Up: Map Next: 58938
58653: Animate Introduction
Used by the routine at Initialise_Game.
Animates the bats and moon on the introduction screen until a key is pressed or *PauseTimer reaches zero.
Animate_Introduction 58653 LD BC,2580 Call Play_Tune with note length 2580.
58656 CALL Play_Tune
58659 LD BC,(25712) Decrease *PauseTimer and jump to Start_DemoGame when it is zero.
58663 DEC BC
58664 LD A,B
58665 OR C
58666 JP Z,Start_DemoGame
58669 LD (25712),BC Call JumpTable_Delay when *SkipDelayFlag is set.
58673 LD A,(25724)
58676 OR A
58677 LD B,25
58679 CALL NZ,JumpTable_Delay
Advance the four frame pointers and draw them across the moon.
58682 LD HL,(58930) HL=*Pointer_IntroFrame1.
58685 LD DE,4 Add 0004.
58688 ADD HL,DE
58689 LD DE,54465 Jump to Animate_Introduction_Frame1 unless the pointer has reached SourceCodeRemnants.
58692 PUSH HL
58693 XOR A
58694 SBC HL,DE
58696 POP HL
58697 JR NZ,Animate_Introduction_Frame1
58699 LD HL,54145 Reset the pointer to Graphics_IntroductionFrames.
Animate_Introduction_Frame1 58702 LD (58930),HL Write HL to *Pointer_IntroFrame1.
58705 LD DE,16486 Draw that frame at 16486.
58708 CALL Draw_IntroUDG
58711 LD HL,(58932) HL=*Pointer_IntroFrame2.
58714 LD DE,2 Subtract 0002.
58717 XOR A
58718 SBC HL,DE
58720 PUSH HL Jump to Animate_Introduction_Frame2 unless the pointer has reached 54143.
58721 LD DE,54143
58724 SBC HL,DE
58726 POP HL
58727 JR NZ,Animate_Introduction_Frame2
58729 LD HL,54465 Reset the pointer to SourceCodeRemnants.
Animate_Introduction_Frame2 58732 LD (58932),HL Write HL to *Pointer_IntroFrame2.
58735 LD DE,16488 Draw that frame at 16488.
58738 CALL Draw_IntroUDG
58741 LD HL,(58934) HL=*Pointer_IntroFrame3.
58744 INC HL Advance the pointer by two.
58745 INC HL
58746 PUSH HL Jump to Animate_Introduction_Frame3 unless the pointer has reached SourceCodeRemnants.
58747 LD DE,54465
58750 XOR A
58751 SBC HL,DE
58753 POP HL
58754 JR NZ,Animate_Introduction_Frame3
58756 LD HL,54145 Reset the pointer to Graphics_IntroductionFrames.
Animate_Introduction_Frame3 58759 LD (58934),HL Write HL to *Pointer_IntroFrame3.
58762 LD DE,16490 Draw that frame at 16490.
58765 CALL Draw_IntroUDG
58768 LD HL,(58936) HL=*Pointer_IntroFrame4.
58771 LD DE,4 Subtract 0004.
58774 XOR A
58775 SBC HL,DE
58777 PUSH HL Jump to Animate_Introduction_Frame4 unless the pointer has reached Graphics_IntroductionFrames.
58778 LD DE,54145
58781 SBC HL,DE
58783 POP HL
58784 JR NZ,Animate_Introduction_Frame4
58786 LD HL,54465 Reset the pointer to SourceCodeRemnants.
Animate_Introduction_Frame4 58789 LD (58936),HL Write HL to *Pointer_IntroFrame4.
58792 LD DE,16492 Draw that frame at 16492.
58795 CALL Draw_IntroUDG
Occasionally stamp a spark on the moon.
58798 CALL JumpTable_GetRandomNumber Call JumpTable_GetRandomNumber.
58801 CP 64 Jump to Animate_Introduction_Bat if the value is 64 or higher.
58803 JR NC,Animate_Introduction_Bat
58805 CP 32 Point HL at Graphics_IntroSpark when the value is 32 or higher.
58807 LD HL,58858
58810 JR NC,Animate_Introduction_Spark Otherwise use the second spark at 58862.
58812 LD HL,58862
Animate_Introduction_Spark 58815 LD DE,16599 Point at 16599 and copy 4 pixel rows.
58818 LD B,4
Animate_Introduction_SparkLoop 58820 LD A,(HL) Copy one pixel row and loop back to Animate_Introduction_SparkLoop until all four rows are written.
58821 LD (DE),A
58822 INC HL
58823 INC D
58824 DJNZ Animate_Introduction_SparkLoop
Occasionally stamp a bat lower down the screen.
Animate_Introduction_Bat 58826 CALL JumpTable_GetRandomNumber Call JumpTable_GetRandomNumber.
58829 CP 64 Jump to Animate_Introduction_Key if the value is 64 or higher.
58831 JR NC,Animate_Introduction_Key
58833 LD HL,58866 Point HL at Graphics_IntroBatA when the value is 32 or higher.
58836 CP 32
58838 JR NC,Animate_Introduction_BatDraw
58840 LD HL,58898 Otherwise use Graphics_IntroBatB.
Animate_Introduction_BatDraw 58843 LD DE,18461 Draw that bat at 18461.
58846 CALL Draw_IntroUDG
Animate_Introduction_Key 58849 CALL 654 Jump to Animate_Introduction if no key is pressed.
58852 LD A,E
58853 INC A
58854 JP Z,Animate_Introduction
58857 RET Return.
Graphics_IntroSpark 58858 DEFB 251,249,248,248,248,248,248,251
intro-spark
Graphics_IntroBatA 58866 DEFB 0,0,0,0,0,8,0,28
intro-bat-1
58874 DEFB 0,28,0,62,0,62,0,3
58882 DEFB 63,251,127,243,124,7,127,158
58890 DEFB 31,190,0,28,6,28,0,8
Graphics_IntroBatB 58898 DEFB 0,0,0,0,0,16,0,56
intro-bat-2
58906 DEFB 0,56,0,124,0,124,0,6
58914 DEFB 127,246,255,230,248,14,255,60
58922 DEFB 63,124,0,56,12,56,0,16
Pointer_IntroFrame1 58930 DEFW Graphics_IntroductionFrames
Pointer_IntroFrame2 58932 DEFW Graphics_IntroductionFrame2
Pointer_IntroFrame3 58934 DEFW Graphics_IntroductionFrame3
Pointer_IntroFrame4 58936 DEFW Graphics_IntroductionFrame4
View the equivalent code in Booty.
Prev: 58476 Up: Map Next: 58938