Skip to content

Commit

Permalink
twoplayer: Avoid starting music when players die together
Browse files Browse the repository at this point in the history
  • Loading branch information
ejona86 committed Nov 10, 2020
1 parent 4df9e8a commit 7de7fbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions twoplayer.s
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ playState_updateGameOverCurtain_curtainFinished_mod:
beq @bothPlayersDead
lda player2_playState
beq @bothPlayersDead
jmp updateMusicSpeed_playerDied
jmp @updateMusicSpeed_playerDied

@bothPlayersDead:
; Wait for a player to press start
Expand All @@ -968,7 +968,10 @@ playState_updateGameOverCurtain_curtainFinished_mod:
sta newlyPressedButtons_player2
rts

updateMusicSpeed_playerDied:
@updateMusicSpeed_playerDied:
lda player1_playState
cmp player2_playState
beq @curtainStillFalling
lda allegro
and activePlayer
eor allegro
Expand All @@ -978,6 +981,7 @@ updateMusicSpeed_playerDied:
ldx musicType
lda musicSelectionTable,x
jsr setMusicTrack
@curtainStillFalling:
rts

@fast:
Expand Down

0 comments on commit 7de7fbe

Please sign in to comment.