Platz Type Animation
Jump to navigation
Jump to search
The animation type is used by Platz for background animations, but it can also be used effectively for player sprite animations; the Platz demo does just this.
typedef struct animation { u8 size; // wid*hgt u8 wid; // Width of each frame (in tiles) u8 hgt; // Height of each frame (in tiles) u8 frameCount; // # of frames in an animation cycle u8 currFrame; // The frame that is currently displayed u8 disp; // Displacement counter u8 dpf; // Displacement per frame (scales frame rate to movement speed) const char *frames; // Stored in flash } animation;