scroll: scroll updates are now correctly performed right after moving
authorLukas Krickl <lukas@krickl.dev>
Fri, 21 Mar 2025 17:19:19 +0000 (18:19 +0100)
committerLukas Krickl <lukas@krickl.dev>
Fri, 21 Mar 2025 17:19:19 +0000 (18:19 +0100)
This prevents the cursor from being displayed incorrectly for a single
frame causing a flash.

src/player.s
src/update.s

index 1dd2db90fd01e2276e81687a95c49950c6dfc0a8..bdb5f2a43ff66df29e6a6150a6705a485cd7c1b2 100644 (file)
@@ -135,7 +135,8 @@ cursor_move:
     ld a, [cursor_move_x]
     add a, b
     ld [cursor_x], a
-
+  
+    call scroll_update
 @done:
   pop af
   ret
index fc5831d522c0be8881ed0ac756d44131bb41913c..06751b8b7fe0676fea49aa8e6b7090b19c4e1ee3 100644 (file)
@@ -13,8 +13,6 @@ update_game:
 
   call player_update
   call sim_update 
-  
-  call scroll_update
 
   ret