From c9a37d15e270ef28b0048eba7cdab15b73b20331 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 14 May 2025 16:04:47 +0200 Subject: Don't touch zp_arg2 on background checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a leftover from a previous implementation and is no longer needed. Moreover, I have also added a comment clarifying that the 'y' register is preserved. Signed-off-by: Miquel Sabaté Solà --- src/background.s | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/background.s') diff --git a/src/background.s b/src/background.s index 28cb6df..add7059 100644 --- a/src/background.s +++ b/src/background.s @@ -11,6 +11,8 @@ ;; The boolean value is directly set into the `a` register; but the memory ;; will not be written in any way. Hence, you can still rely on the old ;; `zp_arg0` and `zp_arg1` values even after calling this function. + ;; + ;; The 'y' register is preserved. .proc collides ;; We iterate first on the rows, as that's how the data on ;; `Background::platforms` is actually sorted by. @@ -40,10 +42,7 @@ jmp @row_check @column_check: - ;; Save the first return argument, which is the Y tile coordinate. - sta Globals::zp_arg2 - - ;; Check the left edge + ;; Check the left edge. ;; ;; NOTE: small optimization on sky and ground which have $00 for the ;; left edge. -- cgit v1.2.3