Skip to content

Commit

Permalink
Play sound effect when combo ends
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Mar 30, 2017
1 parent b77e584 commit fb42260
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions swatter.asm
Expand Up @@ -10,11 +10,13 @@
.include "score_combo.h.asm"
.include "shared_object_values.asm"
.include ".b/pictures.h.asm"
.include "sound.h.asm"

.importzp player_owns_swatter, player_collision_idx
.importzp player_v, player_h, player_screen, player_iframe
.importzp draw_screen, draw_frame
.importzp camera_h, camera_screen
.importzp combo_low

.import object_data_extend
swatter_speed = object_data_extend + $00
Expand Down Expand Up @@ -66,6 +68,15 @@ DidCollide:
lda player_iframe
bne Next
mov player_owns_swatter, #$ff
; Play the sound effect to signify the combo ending.
.scope MoreThanTwo
lda combo_low
cmp #2
blt Next
lda #SFX_MAKE_STARS
jsr SoundPlay
Next:
.endscope
jsr ComboSetToZero
jsr ObjectFree
jmp Return
Expand Down

0 comments on commit fb42260

Please sign in to comment.