From c33743ee4366fa104e8464c963b47badc0e5c878 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 16 Dec 2020 13:47:58 -0500 Subject: [PATCH] duke: make buzzer noise if not have key --- duke/TODO | 28 +++++++++------------------- duke/actions.s | 8 ++++++-- duke/sound_effects.s | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/duke/TODO b/duke/TODO index 08f13c39..f2e75bb5 100644 --- a/duke/TODO +++ b/duke/TODO @@ -1,26 +1,21 @@ -door -~~~~ -door animation -sad noise when not have key -key in inventory -key pickup noise -* NO BONUS message -* back to title screen -* are you sure message on quit -* scroll bonus message +before release: +~~~~~~~~~~~~~~~ ++ laser collision detection ++ enemies can be killed ++ pick up red key ++ fix collision when walking into things sound: ~~~~~~ click on jump click on bump head fancier PC-style sounds +sad noise when not have key + movement: ~~~~~~~~~ -* collision detection up (hit head on jump) -* when land from jump, stop walking walking right into objects, stand back one more (maybe and to mask?) -* can keep walking in collision, just don't move level1: ~~~~~~~ @@ -39,18 +34,13 @@ levels: ~~~~~~~ mystery level 2 -status: -~~~~~~~ -keep score, inventory - sprites: ~~~~~~~~ When land, kicks up dust enemies: ~~~~~~~~ -Little robot -green crawly +have them move ability to die items: diff --git a/duke/actions.s b/duke/actions.s index 90b02099..70134391 100644 --- a/duke/actions.s +++ b/duke/actions.s @@ -48,11 +48,15 @@ redkey_x: ; check that we have the key lda INVENTORY and #INV_RED_KEY - beq done_up_action + bne open_the_wall + +no_red_key: + jsr buzzer_noise + jmp done_up_action ; open the red wall ; there has to be a more efficient way of doing this - +open_the_wall: ; reset smc lda #>BIG_TILEMAP sta rwr_smc1+2 diff --git a/duke/sound_effects.s b/duke/sound_effects.s index e592089f..3154f467 100644 --- a/duke/sound_effects.s +++ b/duke/sound_effects.s @@ -81,4 +81,23 @@ done_pickup_noise: rts + ;====================== + ; buzzer noise + ; C, two octaves+C? +buzzer_noise: + + lda SOUND_STATUS + bmi done_buzzer_noise + + lda #NOTE_C3 + sta speaker_frequency + lda #10 + sta speaker_duration + jsr speaker_tone + +done_buzzer_noise: + rts + + +