aboutsummaryrefslogtreecommitdiff
path: root/src/player.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-05-13 14:57:15 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-05-14 16:25:52 +0200
commitae857d302cd6f81c130b216f5dcc16655a09b4ac (patch)
treeba377720e962501e052fe622e933dfc5516081e5 /src/player.s
parentad830a7f81871e15f43d7255f7af5463d9dd0bc5 (diff)
downloadjetpac.nes-ae857d302cd6f81c130b216f5dcc16655a09b4ac.tar.gz
jetpac.nes-ae857d302cd6f81c130b216f5dcc16655a09b4ac.zip
Implement the base for moving bullets
This establishes a way for bullets to move, be displayed as independent sprites, cycle these sprites, and check for the collision on the background. This is still lacking the collision check with enemies and has some obvious bugs that will be fixed on the next commits. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'src/player.s')
-rw-r--r--src/player.s3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/player.s b/src/player.s
index aac5dd0..c7b65af 100644
--- a/src/player.s
+++ b/src/player.s
@@ -110,6 +110,9 @@
;; How many frames are we allowing for each walk animation state?
WALK_COUNTER_MAX = (HZ / 10)
+ ;; Number of sprites from which the player is made of.
+ PLAYER_SPRITES_COUNT = 6
+
;; Initialize the player's sprite. Note that for the sprite to look
;; correctly on screen you still need to call `Player::update` afterwards.
.proc init