integrate sound effects

This commit is contained in:
4am 2020-05-12 22:25:32 -04:00
parent 0cea9e5ca6
commit e5e146e682
13 changed files with 42 additions and 28 deletions

BIN
res/M.1

Binary file not shown.

BIN
res/M.2

Binary file not shown.

BIN
res/M.5

Binary file not shown.

BIN
res/M.6

Binary file not shown.

BIN
res/M.HUPFEN Normal file

Binary file not shown.

BIN
res/M.I Executable file

Binary file not shown.

BIN
res/M.I.LONG Executable file

Binary file not shown.

BIN
res/M.II Executable file

Binary file not shown.

BIN
res/M.V Executable file

Binary file not shown.

BIN
res/M.VI6 Executable file

Binary file not shown.

View File

@ -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
;

View File

@ -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

View File

@ -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