Prev: C7C0 Up: Map Next: C941
C7E5: Display title screen
Displays the title screen and on return, sets the control method and initiates variables for a new game.
Init_Title_Screen C7E5 LD HL,$CBB4 Calls TitleScreen with HL=Copied_5B80.
C7E8 CALL TitleScreen
C7EB LD B,$00 Unused.
C7ED LD A,($5CB0) Grab the value stored at Controller and if it is $01 then jump ahead to Set_Control_Alias which writes Controls_Keyboard to Control_Routine_Alias.
C7F0 LD HL,$D39B
C7F3 DEC A
C7F4 JR Z,Set_Control_Alias
C7F6 LD HL,$D392 Write Controls_Joystick to Control_Routine_Alias.
Set_Control_Alias C7F9 LD ($CE12),HL
Resets all game variables/ states ready for a new game.
C7FC LD HL,$CD86 Clears the score (writes 00 over seven bytes from Scoredigit06).
C7FF LD DE,$CD87
C802 LD (HL),$00
C804 LD BC,$0006
C807 LDIR
Starting_Lives C809 LD A,$03 Initialise Lives to 03.
C80B LD ($CC59),A
C80E LD HL,$0101 Initialise CashboxReference_Inactive to 0101.
C811 LD ($D45C),HL
C814 LD HL,$0000 Clears Door_Routine_01, Door_Routine_02 and Door_Routine_03 (sets them to 0000).
C817 LD ($CE14),HL
C81A LD ($CE16),HL
C81D LD ($CE18),HL
C820 LD HL,$2020 Clear Day_ASCII and Phase_ASCII to 2020 (ASCII space-space).
C823 LD ($CA58),HL
C826 LD ($CA5A),HL
C829 LD HL,$CC8D Clear down the deposit flags (copies 00 to each from DoorDeposited_01).
C82C LD DE,$CC8E
C82F LD BC,$000D
C832 LD (HL),$00
C834 LDIR
C836 XOR A Set the border to black.
C837 OUT ($FE),A
C839 INC A Write 01 to CBCF.
C83A LD ($CBCF),A
C83D CALL Init_Progress
C840 CALL Set_Day_Attributes
C843 CALL Prep_Display_Day
C846 LD A,$03 Writes 03 to CE1B.
C848 LD ($CE1B),A
C84B LD HL,$0500 Writes 0500 to CE1C.
C84E LD ($CE1C),HL
C851 LD A,$01 Writes 01 to D191.
C853 LD ($D191),A
C856 LD A,($5CB1) Grabs the Level, if it's level 1 then jump to Level_01 with HL=Phase.
C859 LD HL,$CA4A
C85C DEC A
C85D JR Z,Level_01
C85F CALL $C941
C862 INC (HL)
C863 CALL $C941
C866 INC (HL)
C867 DEC A
C868 JR Z,Init_Title_Screen_0
C86A CALL $C941
C86D INC (HL)
C86E CALL $C941
C871 INC (HL)
C872 CALL $C941
C875 INC (HL)
C876 JR Init_Title_Screen_1
Level_01 C878 LD HL,$CE42 Writes Choose_Default_Set to Chooser_Routine_Buffer.
C87B LD ($CE1F),HL
C87E CALL Cashboxes_Completed
C881 RET C
C882 LD HL,$CE6F Writes Choose_Bandit_03 to Chooser_Routine_Buffer.
C885 LD ($CE1F),HL
C888 CALL $C941
C88B CALL Cashboxes_Completed
C88E RET C
Init_Title_Screen_0 C88F LD HL,$CE5F Writes Choose_Bandit_02 to Chooser_Routine_Buffer.
C892 LD ($CE1F),HL
C895 CALL $C941
C898 CALL Cashboxes_Completed
C89B RET C
C89C LD HL,$CE55 Writes Choose_Julius to Chooser_Routine_Buffer.
C89F LD ($CE1F),HL
C8A2 CALL $C941
C8A5 CALL Cashboxes_Completed
C8A8 RET C
C8A9 LD HL,$CE7E Writes Choose_Bandit_04 to Chooser_Routine_Buffer.
C8AC LD ($CE1F),HL
C8AF CALL $C941
C8B2 CALL Cashboxes_Completed
C8B5 RET C
Init_Title_Screen_1 C8B6 LD HL,$CE8D Writes Choose_Bandit_05 to Chooser_Routine_Buffer.
C8B9 LD ($CE1F),HL
C8BC CALL $C941
C8BF CALL Cashboxes_Completed
C8C2 RET C
C8C3 LD HL,$CE9C Writes Choose_Bandit_06 to Chooser_Routine_Buffer.
C8C6 LD ($CE1F),HL
C8C9 CALL $C941
C8CC CALL Cashboxes_Completed
C8CF RET C
C8D0 LD HL,$CE9C Writes Choose_Bandit_06 to Chooser_Routine_Buffer.
C8D3 LD ($CE1F),HL
C8D6 CALL $C941
C8D9 CALL Set_Dusk_Attributes
C8DC CALL Cashboxes_Completed
C8DF RET C
C8E0 LD HL,$CE9C Writes Choose_Bandit_06 to Chooser_Routine_Buffer.
C8E3 LD ($CE1F),HL
C8E6 CALL $C941
C8E9 CALL Set_Night_Attributes
C8EC CALL Cashboxes_Completed
C8EF RET C
Init_Title_Screen_2 C8F0 CALL Set_Day_Attributes
C8F3 CALL Prep_Display_Day
C8F6 LD B,$07
Init_Title_Screen_3 C8F8 PUSH BC
C8F9 CALL Cashboxes_Completed
C8FC POP BC
C8FD RET C
C8FE PUSH BC
C8FF CALL $C941
C902 POP BC
C903 DJNZ Init_Title_Screen_3
C905 CALL Set_Dusk_Attributes
C908 CALL Cashboxes_Completed
C90B RET C
C90C CALL Set_Night_Attributes
C90F CALL Cashboxes_Completed
C912 RET C
C913 LD HL,$D191
C916 LD A,(HL)
C917 LD (HL),$00
C919 AND A
C91A JR Z,Init_Title_Screen_2
C91C LD HL,$CBB4
C91F LD DE,$5B80
C922 LD BC,$0040
C925 LDIR
C927 CALL Sheriff_Star Call Sheriff_Star.
C92A CALL Halt_Loop
C92D CALL Halt_Loop
C930 CALL Halt_Loop
C933 CALL Halt_Loop
Init_Title_Screen_4 C936 XOR A
C937 IN A,($FE)
C939 OR $E0
C93B INC A
C93C JR Z,Init_Title_Screen_4
C93E NOP
C93F JR Init_Title_Screen_2
Prev: C7C0 Up: Map Next: C941