aboutsummaryrefslogtreecommitdiff
path: root/src/driver.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-12 22:22:08 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-12 22:22:08 +0100
commitc1e02814a8f5dffc8da80c45b96ccbfe92bdfc49 (patch)
tree3975a42797cfc5c3f9b0e05219874e7236af2cab /src/driver.s
parent7ff3a8f6fb3bbf101e887f660aa89956d9e3147b (diff)
downloadjetpac.nes-c1e02814a8f5dffc8da80c45b96ccbfe92bdfc49.tar.gz
jetpac.nes-c1e02814a8f5dffc8da80c45b96ccbfe92bdfc49.zip
Initial iteration of enemy movement
For now only the basic algorithm has been written, but the framework for adding the rest has also been written down. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/driver.s')
-rw-r--r--src/driver.s8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/driver.s b/src/driver.s
index 7966d71..f5d20d5 100644
--- a/src/driver.s
+++ b/src/driver.s
@@ -243,9 +243,7 @@
;; Increase the index for the enemies cycling. If wrapping is detected,
;; then it resets this value back to zero.
ldx zp_first_enemy
- inx
- inx
- inx
+ NEXT_ENEMY_INDEX_X
cpx #Enemies::ENEMIES_POOL_CAPACITY_BYTES
bne @set_next_enemies_cycle
ldx #0
@@ -341,9 +339,7 @@
ldx Globals::zp_tmp3
@next_enemy:
- inx
- inx
- inx
+ NEXT_ENEMY_INDEX_X
jmp @rest_o_enemies_loop
@rest_o_items: