anim: Added struct for animations
authorLukas Krickl <lukas@krickl.dev>
Sun, 26 Jan 2025 06:35:57 +0000 (07:35 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 26 Jan 2025 06:35:57 +0000 (07:35 +0100)
src/animation.s
src/defs.s
src/wram.s

index 48b8368656aab490ad7ed1eaa900343dba332994..704ba67c850bd2d339dbf28f8dc2390c524b88b5 100644 (file)
@@ -17,12 +17,12 @@ anim_nop:
   ; to set itself to 0000 when the animation is finisehd 
   ; this is how anim_finished performs its check
 anim_update:
-  ld a, [anim_flags]
+  ld a, [curr_anim_flags]
   and a, ANIM_FREADY
   ret z
 
   ld hl, animation_table
-  ld a, [anim_update_entry]
+  ld a, [curr_anim_type]
   call call_tbl
 
   ret
index 23d1672edfa1278a18b0cd2ffe9cab1266f2965a..4dfaf442185ab131cfc59c4662e0a8444afccb5d 100644 (file)
 ; animation table entries 
 .se 0
 .de ANIM_TNOP, 1
+
+  ; anim entry struct 
+.se 0
+.de anim_flags, 1
+.de anim_type, 1
index 88558c000fea8a80235cd4b6bae1636fbada46af..2264b6a91cb47a9a38c7486d3a2b3092997d2cc5 100644 (file)
@@ -99,9 +99,9 @@ anim_target_x: .adv 1
 
   ; animation flags
   ; ANIM_READY is set if the animation can play
-anim_flags: .adv 1
+curr_anim_flags: .adv 1
   ; animation table index 
-anim_update_entry: .adv 2
+curr_anim_type: .adv 2
 
 
   ; collision tile tmp values