aboutsummaryrefslogtreecommitdiff
path: root/src/prng.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/prng.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/prng.s')
-rw-r--r--src/prng.s2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/prng.s b/src/prng.s
index d62392e..41f5f5d 100644
--- a/src/prng.s
+++ b/src/prng.s
@@ -12,6 +12,8 @@
;; Updates the 'a' register with the next random number set after the
;; current value of `zp_rand`, while also making sure that it is a valid
;; screen Y coordinate.
+ ;;
+ ;; NOTE: the 'y' register is preserved.
.proc random_valid_y_coordinate
;; Get the new random number and store it right away.
ldx zp_rand