junglejourney
changeset 133:a2720f7301c0
More work on sounds.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Sat Sep 10 20:25:59 2011 +0200 |
| parents | a25ead484b18 |
| children | 58e9d873395b |
| files | mapcode.oph |
| diffstat | 1 files changed, 27 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- a/mapcode.oph Sat Sep 10 15:27:58 2011 +0200 1.2 +++ b/mapcode.oph Sat Sep 10 20:25:59 2011 +0200 1.3 @@ -2288,6 +2288,9 @@ 1.4 1.5 jsr plot_character 1.6 1.7 + ldx #5 1.8 + jsr play_sound 1.9 + 1.10 emerge_character_exit: 1.11 clc 1.12 rts 1.13 @@ -4106,13 +4109,24 @@ 1.14 jsr $fff1 1.15 rts 1.16 1.17 -sounds_low: .byte <explosion_sound, <damage_sound, <item_sound, <key_sound 1.18 -sounds_high: .byte >explosion_sound, >damage_sound, >item_sound, >key_sound 1.19 +sounds_low: .byte <explosion_sound, <damage_sound, <item_sound, <key_sound, <note_sound, <emerge_sound 1.20 +sounds_high: .byte >explosion_sound, >damage_sound, >item_sound, >key_sound, >note_sound, >emerge_sound 1.21 1.22 explosion_sound: .byte 1,0, 1,0, 60,0, 2,0 1.23 damage_sound: .byte 1,0, 2,0, 40,0, 4,0 1.24 -item_sound: .byte 1,0, 3,0, 32,0, 3,0 1.25 -key_sound: .byte 1,0, 4,0, 50,0, 5,0 1.26 +item_sound: .byte $13,0, 3,0, 32,0, 3,0 1.27 +key_sound: .byte $13,0, 4,0, 50,0, 5,0 1.28 +note_sound: .byte $13,0, 241,255 1.29 +note_pitch: .byte 0,0 1.30 +note_duration: .byte 4,0 1.31 +emerge_sound: .byte 2,0, 3,0, 0,0, 2,0 1.32 + 1.33 +play_note: ; A=pitch, Y=duration 1.34 + 1.35 + sta note_pitch 1.36 + sty note_duration 1.37 + ldx #4 1.38 + ; Run on into the next routine. 1.39 1.40 play_sound: ; X=sound number 1.41 1.42 @@ -4458,7 +4472,7 @@ 1.43 cmp #$e0 1.44 bne show_title_high_scores_loop 1.45 1.46 - lda #0 1.47 + lda #0 ; message counter 1.48 sta $72 1.49 1.50 show_title_wait_loop: 1.51 @@ -4528,7 +4542,7 @@ 1.52 1.53 rts 1.54 1.55 -end_of_level_bytes1: .byte 31,1,3, 17,3, "Exploration bonus", 31,11,5, "x 5" 1.56 +end_of_level_bytes1: .byte 31,1,3, 17,3, "Exploration bonus", 31,11,5, "x 9" 1.57 end_of_level_bytes2: .byte 31,0,28, 17,2, "My journey continues" 1.58 1.59 show_end_of_level_screen: 1.60 @@ -4655,10 +4669,16 @@ 1.61 1.62 jsr write_bonus 1.63 1.64 - lda #5 1.65 + lda #9 1.66 sta $70 1.67 jsr add_score 1.68 1.69 + lda $8d 1.70 + and #$3f 1.71 + asl 1.72 + ldy #1 1.73 + jsr play_note 1.74 + 1.75 end_of_level_no_countdown: 1.76 inc $578e ; update motion counter 1.77 clc
