From 7b46f279211d74a740c178f58d99275199c46712 Mon Sep 17 00:00:00 2001 From: StrangeD0s <47105931+StrangeD0s@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:55:15 +0200 Subject: [PATCH] Update main.c --- src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index c15f38c..0a1e993 100644 --- a/src/main.c +++ b/src/main.c @@ -62,6 +62,7 @@ void update_two_frame_counter(void) //! Switch metasprite on certain frames. Could be heavily improved to take props for actor->spriteFrames and more //! Should be called in some UpdateActor(&actor) Function //! Hier kann ich stattdessen ein metasprite array übergeben +//! Außerdem kann ich zusätzlich zu actor->is_moving noch andere Zustände wie is_standing, is_exploding etc. definieren. void animate_actor(Actor *actor, int8_t two_frame_counter) { if (actor->is_moving) @@ -121,7 +122,7 @@ void setup(void) uint8_t initialX; uint8_t initialY; const unsigned char *tilemap; - const metasprite_t *metasprite; + const metasprite_t *metasprite; //! Hier müsste ich eigentlich ein Array aus metasprites mitgeben, um es dann in der animation_actor() auswählen zu können. Vielleicht sogar ein Struct of metasprite arrays. }; // make array of actor entities @@ -256,4 +257,4 @@ void main(void) animcounter(96); // I picked 96 because of how many factors it has. Easy to have different spaced timings that don't stutter when the counter loops. } -} \ No newline at end of file +}