castleraider
changeset 283:144f5f3bbd16
Added a title screen to the main game.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Sat Mar 22 00:02:17 2014 +0100 |
| parents | a2e9b4a405cd |
| children | 7091d0eab594 |
| files | code.oph images/panel.png |
| diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/code.oph Fri Mar 21 22:51:54 2014 +0100 1.2 +++ b/code.oph Sat Mar 22 00:02:17 2014 +0100 1.3 @@ -21,6 +21,20 @@ 1.4 1.5 main: 1.6 1.7 + jsr clear_banks 1.8 + lda #2 1.9 + jsr change_palette 1.10 + 1.11 + jsr show_bank2 ; Show bank 2 since this is where the output of OS 1.12 + ; calls will appear. 1.13 + ldx #0 1.14 + title_text_loop: 1.15 + lda title_text,x 1.16 + jsr $ffee 1.17 + inx 1.18 + cpx #[title_text_end - title_text] 1.19 + bne title_text_loop 1.20 + 1.21 ; Wait for the SPACE key or fire button to be pressed. 1.22 main_start_wait_loop: 1.23 1.24 @@ -99,7 +113,6 @@ 1.25 1.26 jsr init_scrolling 1.27 1.28 - jsr show_bank2 ; Hide the bank being plotted. 1.29 jsr initial_plot_bank1 1.30 jsr plot_char_bank1 1.31 1.32 @@ -1055,6 +1068,10 @@ 1.33 ; clc 1.34 ; rts 1.35 1.36 +title_text: .byte 26, 31, 2, 20, 17, 2, "Press ", 17, 3, "SPACE/FIRE" 1.37 + .byte 31, 6, 21, 17, 2, "to play" 1.38 +title_text_end: 1.39 + 1.40 .include "screen.oph" 1.41 .include "plotting.oph" 1.42 .include "scrolling.oph"
2.1 Binary file images/panel.png has changed
