From 11847f52aed5bda1966b7d28e009430dc58d2561 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 5 Mar 2026 18:47:08 +0100 Subject: Add the Game Over screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is still missing the support for player 2, but I've left traces about it. Signed-off-by: Miquel Sabaté Solà --- src/player.s | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/player.s') diff --git a/src/player.s b/src/player.s index 73ff20e..7e215a5 100644 --- a/src/player.s +++ b/src/player.s @@ -834,14 +834,19 @@ ;; That's just german for "the Bart, the". .proc die_bart_die - ;; Decrement the life. + ;; Decrement the life. If we reach zero, then there's no point on + ;; signaling the NMI code to render this change. + ;; ;; TODO: this is just considering the first player only!. dec Player::zp_lifes - beq @over + beq @skip_life_update + + ;; Notify NMI code to render lifes again, as they have changed. lda Player::zp_state ora #%00001000 sta Player::zp_state + @skip_life_update: ;; Move the player's sprites out of the screen. ldx #0 lda #$FF @@ -863,14 +868,5 @@ lda Player::zp_screen_x sta Globals::zp_arg3 JAL Explosions::create - - @over: - ;; Set the proper flag for game over. - ;; TODO: game over (coin) - lda Globals::zp_flags - ora #%00000010 - sta Globals::zp_flags - - rts .endproc .endscope -- cgit v1.2.3