aboutsummaryrefslogtreecommitdiff
path: root/src/jetpac.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-19 17:28:36 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-19 17:28:36 +0100
commit4c8ed456d990ee99884e9dcd245f665ccb894b50 (patch)
tree7305788a45bffa1ed291c2f65af2dea1f7b8db29 /src/jetpac.s
parentd38a958f446aac1a6faa79277c140ab8a0ff03f4 (diff)
downloadjetpac.nes-4c8ed456d990ee99884e9dcd245f665ccb894b50.tar.gz
jetpac.nes-4c8ed456d990ee99884e9dcd245f665ccb894b50.zip
Disable the PPU between the title to main screens
During other transitions like game over and such it might also be needed to have something similar, but for now this should cut it. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'src/jetpac.s')
-rw-r--r--src/jetpac.s9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jetpac.s b/src/jetpac.s
index 66d5457..184374e 100644
--- a/src/jetpac.s
+++ b/src/jetpac.s
@@ -40,8 +40,8 @@
.include "assets.s"
.include "background.s"
.include "player.s"
-.include "driver.s"
.include "title.s"
+.include "driver.s"
.include "vectors.s"
.proc main
@@ -72,6 +72,7 @@
;; Enable back the PPU
lda #%00011110
+ sta PPU::zp_mask
sta PPU::MASK
@main_game_loop:
@@ -85,9 +86,15 @@
jmp @over
@title_screen:
+ ;; If we are in a transitioning state, avoid the update from the title.
+ lda Globals::zp_flags
+ and #%00000100
+ bne @do_switch
+
jsr Title::update
beq @set_flags
+@do_switch:
;; Start was pressed by the player, switch to the main game.
jsr Driver::switch
jmp @set_flags