From 63939a5c86c5678347f41f877e562b58236782df Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 25 Mar 2026 23:44:29 +0100 Subject: Save the high score after game over MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/jetpac.s | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/jetpac.s') diff --git a/src/jetpac.s b/src/jetpac.s index a50ba6a..7734491 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -124,11 +124,9 @@ @init: ;; Force the scores to appear. - lda #$80 + lda #$C0 sta Globals::zp_extra_flags - ;; TODO: update high score (see zp_extra_flags) - ;; Disable the PPU and zero out variables which shadow PPU registers. lda #0 sta PPU::m_mask @@ -264,6 +262,10 @@ pla beq @main_game_loop + ;; If we have a new high score, save it now before initializing scores + ;; again. + jsr Score::save_hi_score + ;; We will skip the initialization of the assets so to avoid writing into ;; the first nametable when it's just fine. That being said, we still need ;; to prepare palettes for the title screen. Do it now before starting over. -- cgit v1.2.3