aboutsummaryrefslogtreecommitdiff
path: root/src/enemies.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-10 16:11:08 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-10 16:11:08 +0100
commit29c2f3b8b4eb1bd8190d8ed302d172c54efc1450 (patch)
tree7763eea97756efcd6563ea93870dca1d05ced138 /src/enemies.s
parenta6bd59a138673b78bc3da39096546b6725590a29 (diff)
downloadjetpac.nes-29c2f3b8b4eb1bd8190d8ed302d172c54efc1450.tar.gz
jetpac.nes-29c2f3b8b4eb1bd8190d8ed302d172c54efc1450.zip
Allocate all enemies on sprite cycling
The previous commit only tackled the first enemy, this one handles the "rest_o_enemies" code flow, which was entirely missing. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/enemies.s')
-rw-r--r--src/enemies.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/enemies.s b/src/enemies.s
index aa2e0aa..0c0873f 100644
--- a/src/enemies.s
+++ b/src/enemies.s
@@ -147,6 +147,12 @@
;; The 'y' register will be updated by increasing its value by 16,
;; indicating the amount of bytes allocated in OAM space.
;;
+ ;; The 'x' register will be changed, so make sure to back it up if you care
+ ;; about its value before calling this function.
+ ;;
+ ;; The 'Globals::zp_tmp0', 'Globals::zp_tmp1' and 'Globals::zp_tmp2' memory
+ ;; regions are also tampered by this function.
+ ;;
;; NOTE: this function assumes that the enemy is in a valid state. That's up
;; to the caller to check on this before calling this function.
.proc allocate_x_y