#ifndef STRUCTS_H #define STRUCTS_H #include "config.h" struct Cursor { short x; short y; Cursor() : x(0), y(0) {} }; struct Pixel { unsigned short x; unsigned short y; uint32_t color; }; struct TextNode { unsigned char global_id; char content[TEXT_MAX_LENGTH]; uint32_t color; struct CharacterSize { unsigned short height; unsigned short width; } characterSize; short pos_x; short pos_y; unsigned char character_count; unsigned char scroll_slowness; unsigned char scroll_progress; short disappear_time; bool is_scrolling; bool is_repeating; TextNode() : global_id(0), color(0), pos_x(0), pos_y(0), character_count(0), scroll_slowness(0), scroll_progress(0), characterSize({7,5}), disappear_time(0), is_scrolling(true), is_repeating(false) {} }; struct RGB { unsigned char r; unsigned char g; unsigned char b; RGB() : r(0), g(0), b(0) {} }; struct RGBWithIndex { unsigned char r; unsigned char g; unsigned char b; unsigned char start_index; RGBWithIndex() : r(0), g(0), b(0), start_index(0) {} RGBWithIndex(unsigned char r, unsigned char g, unsigned char b, unsigned char start_index) : r(r), g(g), b(b), start_index(start_index) {} }; struct MultiColorTextNode { unsigned char global_id; char content[TEXT_MAX_LENGTH]; RGBWithIndex colors[4]; struct CharacterSize { unsigned short height; unsigned short width; } characterSize; short pos_x; short pos_y; unsigned char color_count; unsigned char character_count; unsigned char scroll_slowness; unsigned char scroll_progress; short disappear_time; bool is_scrolling; bool is_repeating; MultiColorTextNode() : global_id(0), pos_x(0), pos_y(0), character_count(0), scroll_slowness(0), scroll_progress(0), characterSize({7,5}), disappear_time(0), is_scrolling(true), color_count(0), is_repeating(false) {} }; struct Image { RGB pixels[PANEL_PIXEL_COUNT][DISPLAY_MAX_X + 1]; unsigned short width; unsigned short height; }; #endif // STRUCTS_H