aboutsummaryrefslogtreecommitdiff
path: root/src/driver.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-03-04 23:44:47 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-03-04 23:44:47 +0100
commitdbcbd43287a28bf087e20e660edd5ba40b5c27ec (patch)
treeae69b710c3b06bae58c18273af105855b3071ded /src/driver.s
parent0c5af85cc0cb9bb39a3a72548e735b92daf0a28f (diff)
downloadjetpac.nes-dbcbd43287a28bf087e20e660edd5ba40b5c27ec.tar.gz
jetpac.nes-dbcbd43287a28bf087e20e660edd5ba40b5c27ec.zip
Update lifes left for player 1
The whole handling of player 2 will come whenever I set to implement multi-player for this game. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/driver.s')
-rw-r--r--src/driver.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/driver.s b/src/driver.s
index 8a0d452..b90cabe 100644
--- a/src/driver.s
+++ b/src/driver.s
@@ -80,6 +80,14 @@
lda #PLAYER_TIMER_VALUE
sta zp_player_timer
+ ;; Initialize lifes for both players.
+ lda #4
+ sta Player::zp_lifes
+ sta Player::zp_lifes + 1
+ lda Player::zp_state
+ ora #%00001000
+ sta Player::zp_state
+
;; Mark the state of the game as "game". That is, the player has
;; started. Also set the `ppu` flag and unset the `title over` one.
lda #%01000001