From e5e146e6825564f5da2137bfa38020025612a8a1 Mon Sep 17 00:00:00 2001 From: 4am Date: Tue, 12 May 2020 22:25:32 -0400 Subject: [PATCH] integrate sound effects --- res/M.1 | Bin 18 -> 0 bytes res/M.2 | Bin 15 -> 0 bytes res/M.5 | Bin 18 -> 0 bytes res/M.6 | Bin 15 -> 0 bytes res/M.HUPFEN | Bin 0 -> 145 bytes res/M.I | Bin 0 -> 21 bytes res/M.I.LONG | Bin 0 -> 21 bytes res/M.II | Bin 0 -> 18 bytes res/M.V | Bin 0 -> 21 bytes res/M.VI6 | Bin 0 -> 18 bytes src/glue.sound.a | 49 +++++++++++++++++++++++++++++++---------------- src/million.a | 14 +++++--------- src/ui.play.a | 7 ++++--- 13 files changed, 42 insertions(+), 28 deletions(-) delete mode 100755 res/M.1 delete mode 100755 res/M.2 delete mode 100755 res/M.5 delete mode 100755 res/M.6 create mode 100644 res/M.HUPFEN create mode 100755 res/M.I create mode 100755 res/M.I.LONG create mode 100755 res/M.II create mode 100755 res/M.V create mode 100755 res/M.VI6 diff --git a/res/M.1 b/res/M.1 deleted file mode 100755 index 0a9e7acb3ec109180a25f3692115f814a0196674..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18 ZcmZQ%Vq(b-Wef3O^Dq@M&1PU=000<^0-*o^ diff --git a/res/M.2 b/res/M.2 deleted file mode 100755 index 43818697bf5fcf6bcb16b6c20fede733a85d2c64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15 WcmZQ%Vq!@MU<+{Ia7bWaU;qFQDgpQa diff --git a/res/M.5 b/res/M.5 deleted file mode 100755 index 69f21dab419ff159a2f2165282170bb2c61336c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18 ZcmZQ%Vq%$)z?Kle5n#z-Ie~$J0RSA%0}=oL diff --git a/res/M.6 b/res/M.6 deleted file mode 100755 index a7992fe669c04950feb3d441d7b1702797a58590..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15 WcmZQ%Vq(b-WeauSaL8t0U;qFRDFPS( diff --git a/res/M.HUPFEN b/res/M.HUPFEN new file mode 100644 index 0000000000000000000000000000000000000000..3aff607bcfe81ac0f287aed061469f95c42f7a6c GIT binary patch literal 145 zcmZQ%X68sSVq;)nXHa7AP-72OVvjNcksU_t4QlK&l-Orzv9DHQ-)aORXSe{xIZ_-D z>RpuBeT>*$blIb{*nMmJq-eV98-Qfq{Vm037lI5&!@I literal 0 HcmV?d00001 diff --git a/res/M.VI6 b/res/M.VI6 new file mode 100755 index 0000000000000000000000000000000000000000..6a3ade234c9c695e56943c6ef5ecb4a2b3018bbe GIT binary patch literal 18 ZcmZQ%Vq#)oV95?;3w7Xd$Yx+*000nK0vZ4S literal 0 HcmV?d00001 diff --git a/src/glue.sound.a b/src/glue.sound.a index 21b0c8b..1601ffc 100644 --- a/src/glue.sound.a +++ b/src/glue.sound.a @@ -27,21 +27,27 @@ kProgressionsByWorld ; chord progression to use on each world (i !word k6251Progression !word k6251Progression !word k6251Progression - !word 0 - !word 0 - !word 0 - !word 0 + !word k16251Progression + !word k16251Progression + !word k16251Progression + !word k16251Progression k251Progression - !byte 3 - !word M2 - !word M5 - !word M1 + !byte 2 + !word M_ii + !word M_V k6251Progression + !byte 3 + !word M_vi6 + !word M_ii + !word M_V +k16251Progression !byte 4 - !word M6 - !word M2 - !word M5 - !word M1 + !word M_I + !word M_vi6 + !word M_ii + !word M_V +kFinalChord + !word M_I_LONG ReinitSoundAfterPrefChange ldx gMockingboardSlot @@ -87,9 +93,6 @@ InitPuzzleSound rts PlayNextChord - ; TODO - rts - inc progressionIndex lda gWorldID asl tax @@ -98,7 +101,13 @@ PlayNextChord inx lda kProgressionsByWorld, x sta $FF - lda progressionIndex + inc progressionIndex + ldy #0 + lda ($FE), y + cmp progressionIndex + bne + + dec progressionIndex ++ lda progressionIndex asl tay iny @@ -110,6 +119,14 @@ PlayNextChord pla jmp PlaySound +PlayFinalChord +; out: preserves A + pha + +LD16 kFinalChord + jsr PlaySound + pla + rts + ;------------------------------------------------------------------------------ ; SoftBell ; diff --git a/src/million.a b/src/million.a index 6bed7c3..2933807 100644 --- a/src/million.a +++ b/src/million.a @@ -87,14 +87,10 @@ Start !source "src/mockingduet.a" MainMenuMusic !bin "res/M.SICILIENNE" -; !bin "res/M.CEMBALO" -M2 - !bin "res/M.2" -M5 - !bin "res/M.5" -M1 - !bin "res/M.1" -M6 - !bin "res/M.6" +M_ii !bin "res/M.II" +M_V !bin "res/M.V" +M_I !bin "res/M.I" +M_I_LONG !bin "res/M.I.LONG" +M_vi6 !bin "res/M.VI6" } LastMover diff --git a/src/ui.play.a b/src/ui.play.a index 63db708..eaee6b1 100644 --- a/src/ui.play.a +++ b/src/ui.play.a @@ -176,6 +176,7 @@ MoveToFirstColumn lda #kKeepPlaying rts +- jsr PlayNextChord PlayEventLetter lda gLastKeyPressed ldy gSelectedLogicalColumn @@ -195,8 +196,8 @@ PlayEventLetter bcs PlayEventLetter ; no word, check if more scrolling is required jsr MarkTargetWord ; show that we've finished a word jsr CheckForPuzzleComplete - beq PlayEventLetter ; if puzzle isn't complete, check if more scrolling is required - rts ; puzzle is complete, return to caller with A = kCompletedPuzzle + beq - ; if puzzle isn't complete, check if more scrolling is required + jmp PlayFinalChord ; puzzle is complete, play final sound and return to caller with A = kCompletedPuzzle MarkTargetWord ; in: none @@ -220,7 +221,7 @@ MarkTargetWord iny cpy puzzle_logical_width bne - - jmp PlayNextChord + rts CheckForPuzzleComplete ; in: none