fixed bonus life sound corruption

This commit is contained in:
alpine9000 2016-06-01 15:39:57 +10:00
parent 5ccac6e48a
commit 0bf45f2ea9
4 changed files with 50 additions and 2 deletions

View File

@ -126,6 +126,7 @@ Reset:
jsr PreRenderColumnsRemaining
jsr RenderPlayerScore
jsr ResetPickups
jsr ResetSound
move.l startForegroundMapPtr,foregroundMapPtr
move.l startPathwayMapPtr,pathwayMapPtr
@ -264,6 +265,7 @@ PostCheckPlayerMiss:
bra GameLoop
if TRACKLOADER=0
QuitGame:
jsr WaitVerticalBlank
jsr PlayNextSound
@ -273,6 +275,7 @@ QuitGame:
jsr P61_End
movem.l (sp)+,d0-a6
jmp LongJump
endif
Update:
jsr UpdatePlayer

View File

@ -19,7 +19,7 @@ KillSound: macro
move.w #1,AUD3PER(a6)
move.w #2,AUD3LEN(a6) ; set the empty sound for the next sample to be played
move.l #emptySound,AUD3LCH(a6)
WaitScanLines 1
WaitScanLines 3
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
.\@skip:
endif
@ -198,7 +198,7 @@ AddToScore: macro
cmp.l __nextPlayerBonus,d0
blt .\@skip
movem.l d0-a6,-(sp)
PlaySound Yay
PlaySound Bonus
lea livesCounterText,a0
jsr IncrementCounter
lea livesCounterShortText,a1

View File

@ -20,6 +20,7 @@ ShowMenu:
lea CUSTOM,a6
jsr ReloadSplashScreen
jsr RestoreSplashMenuSection
jsr ResetSound
ReShowMenu:
jsr WaitVerticalBlank
@ -201,8 +202,10 @@ ButtonPressed:
beq .quitButton
endif
bra .done
if TRACKLOADER=0
.quitButton:
jmp QuitGame
endif
.difficultyButton:
bsr ToggleDifficulty
bra .done

View File

@ -1,8 +1,13 @@
include "includes.i"
xdef PlayNextSound
xdef ResetSound
xdef fadeMusic
ResetSound:
move.l #0,blackoutFrame
rts
PlayNextSound:
cmp.w #0,fadeMusic
beq .dontFadeOutMusic
@ -30,8 +35,13 @@ PlayNextSound:
xdef PlayChachingSound
xdef PlayWhooshSound
xdef PlayYaySound
xdef PlayBonusSound
PlayJumpSound:
move.l d0,-(sp)
move.l blackoutFrame,d0
cmp.l frameCount,d0
bgt .skip
move.w #0,dontKillSound
lea jump(pc),a1
move.l a1,AUD3LCH(a6)
@ -39,9 +49,15 @@ PlayJumpSound:
move.w #64,AUD3VOL(a6)
move.w #(endJump-jump)/2,AUD3LEN(a6) ;Set length in words
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
.skip:
move.l (sp)+,d0
rts
PlayWhooshSound:
move.l d0,-(sp)
move.l blackoutFrame,d0
cmp.l frameCount,d0
bgt .skip
KillSound
move.w #0,dontKillSound
lea whoosh,a1
@ -50,6 +66,8 @@ PlayWhooshSound:
move.w #64,AUD3VOL(a6)
move.w #(endWhoosh-whoosh)/2,AUD3LEN(a6) ;Set length in words
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
.skip:
move.l (sp)+,d0
rts
@ -65,6 +83,10 @@ PlayFallingSound:
rts
PlayChachingSound:
move.l d0,-(sp)
move.l blackoutFrame,d0
cmp.l frameCount,d0
bgt .skip
KillSound
move.w #0,dontKillSound
lea chaching,a1
@ -73,6 +95,8 @@ PlayChachingSound:
move.w #64,AUD3VOL(a6)
move.w #(endChaching-chaching)/2,AUD3LEN(a6) ;Set length in words
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
.skip:
move.l (sp)+,d0
rts
PlayYaySound:
@ -86,6 +110,22 @@ PlayYaySound:
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
rts
PlayBonusSound:
KillSound
move.l d0,-(sp)
move.l frameCount,d0
add.l #41,d0
move.l d0,blackoutFrame
move.l (sp)+,d0
move.w #0,dontKillSound
lea yay,a1
move.l a1,AUD3LCH(a6)
move.w #423,AUD3PER(a6)
move.w #64,AUD3VOL(a6)
move.w #(endYay-yay)/2,AUD3LEN(a6) ;Set length in words
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
rts
align 4
jump:
incbin "out/jump.raw"
@ -108,6 +148,8 @@ yay:
endYay:
align 2
blackoutFrame:
dc.l 0
emptySound:
dc.l 0
dontKillSound: