2020-10-26 20:00:17 +03:00
|
|
|
#pragma once
|
|
|
|
|
2020-12-14 13:50:32 +03:00
|
|
|
#include "icon.h"
|
|
|
|
|
2020-10-26 20:00:17 +03: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 13:50:32 +03:00
|
|
|
/*
|
|
|
|
* Get pointer to current frame data
|
|
|
|
*/
|
2020-10-26 20:00:17 +03:00
|
|
|
const uint8_t* icon_get_data(Icon* icon);
|
|
|
|
|
2020-12-14 13:50:32 +03:00
|
|
|
/*
|
|
|
|
* Advance to next frame
|
|
|
|
*/
|
2020-10-26 20:00:17 +03:00
|
|
|
void icon_next_frame(Icon* icon);
|