Update main.c
This commit is contained in:
+2
-1
@@ -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
|
//! 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
|
//! Should be called in some UpdateActor(&actor) Function
|
||||||
//! Hier kann ich stattdessen ein metasprite array übergeben
|
//! 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)
|
void animate_actor(Actor *actor, int8_t two_frame_counter)
|
||||||
{
|
{
|
||||||
if (actor->is_moving)
|
if (actor->is_moving)
|
||||||
@@ -121,7 +122,7 @@ void setup(void)
|
|||||||
uint8_t initialX;
|
uint8_t initialX;
|
||||||
uint8_t initialY;
|
uint8_t initialY;
|
||||||
const unsigned char *tilemap;
|
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
|
// make array of actor entities
|
||||||
|
|||||||
Reference in New Issue
Block a user