animation: Added basic docs for animations
authorLukas Krickl <lukas@krickl.dev>
Sun, 26 Jan 2025 05:17:07 +0000 (06:17 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 26 Jan 2025 05:17:07 +0000 (06:17 +0100)
src/animation.s
src/update.s

index 1195698f09f81ac31d4d2bf69740c3b51a8c9e5a..af39d6326ba3f9dc8b4ce5c7d3c2bbfbdff39d16 100644 (file)
@@ -2,6 +2,19 @@
 ; each frame the latest animation is 
 ; updated
 
-  ; updates the current animation 
+  ; updates the current animation
+  ; an animation is a simple pointer
+  ; to an update function
+  ; and a range of parameters (4 freely usable bytes)
+  ; the animation updte function is expected
+  ; to set itself to 0000 when the animation is finisehd 
+  ; this is how anim_finished performs its check
 anim_update:
   ret
+
+  ; checks if the current animation is finished
+  ; returns:
+  ;   a: 0 -> animation playing
+  ;   a: 1 -> animation finished 
+anim_finished:
+  ret
index ad4314978bf18e3bf0c4c67b50b5f81a3b0443f8..b4d7d19a4934e08062675212e2315ae01e0230de 100644 (file)
@@ -10,6 +10,8 @@ update_game_over:
 update_game:
   ; tick rng every frame
   call rand 
+  
+  call anim_update 
 
   ; update player
   ld hl, player