diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-25 23:44:29 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-03-27 10:48:53 +0100 |
| commit | 63939a5c86c5678347f41f877e562b58236782df (patch) | |
| tree | c8330923330524c02083f1465db9a04e24d60ac4 /src/jetpac.s | |
| parent | 63ef73de3bdd698ab250407354e24a6de7c9ef20 (diff) | |
| download | jetpac.nes-63939a5c86c5678347f41f877e562b58236782df.tar.gz jetpac.nes-63939a5c86c5678347f41f877e562b58236782df.zip | |
Save the high score after game over
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/jetpac.s')
| -rw-r--r-- | src/jetpac.s | 8 |
1 files changed, 5 insertions, 3 deletions
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. |
