2020-10-26 17:00:17 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
#include "icon.h"
|
|
|
|
|
2020-10-26 17:00:17 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
struct IconData {
|
|
|
|
const uint8_t width;
|
|
|
|
const uint8_t height;
|
|
|
|
const uint8_t frame_count;
|
|
|
|
const uint8_t frame_rate;
|
|
|
|
const uint8_t** frames;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Icon {
|
|
|
|
const IconData* data;
|
|
|
|
uint8_t frame;
|
|
|
|
uint32_t tick;
|
|
|
|
};
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Get pointer to current frame data
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
const uint8_t* icon_get_data(Icon* icon);
|
|
|
|
|
2020-12-14 10:50:32 +00:00
|
|
|
/*
|
|
|
|
* Advance to next frame
|
|
|
|
*/
|
2020-10-26 17:00:17 +00:00
|
|
|
void icon_next_frame(Icon* icon);
|