40 lines
2.1 KiB
C
40 lines
2.1 KiB
C
#ifndef PROTOTYPES_H
|
|
#define PROTOTYPES_H
|
|
|
|
#include "structs.h"
|
|
#include <Adafruit_NeoPixel.h>
|
|
|
|
extern Adafruit_NeoPixel pixels;
|
|
extern Image saved_images[MAX_IMAGES_SAVED];
|
|
extern TextNode text_nodes[MAX_TEXT_NODES_COUNT];
|
|
extern MultiColorTextNode multi_color_text_node[MAX_TEXT_NODES_COUNT];
|
|
extern Cursor cursor;
|
|
extern unsigned char brightness;
|
|
extern Animation animations[MAX_ANIMATIONS_COUNT];
|
|
|
|
void displayAnimationFrame(unsigned char animation_index);
|
|
void tickAnimations();
|
|
void playAnimation(unsigned char index, unsigned char frame_delay, bool loop);
|
|
void stopAnimation(unsigned char index);
|
|
|
|
void drawImageFromMemoryByIndex(unsigned char image_index, short pos_x, short pos_y, unsigned char brightness = 100);
|
|
void setPixel(short x, short y, uint32_t color);
|
|
void start_server();
|
|
void handle_server();
|
|
TextNode* addNewTextNode(char text[TEXT_MAX_LENGTH + 1], uint32_t color, bool handle_pos_via_cursor, short pos_x, short pos_y, unsigned char scroll_slowness, bool is_scrolling, bool is_small, short disappear_time = -1, bool is_repeating = false);
|
|
void scrollAllScrollableTexts(bool split_scroll_mode);
|
|
MultiColorTextNode* addNewMultiColor(char text[TEXT_MAX_LENGTH + 1], RGBWithIndex colors[4], unsigned char color_count, bool handle_pos_via_cursor, short pos_x, short pos_y, unsigned char scroll_slowness, bool is_scrolling, bool is_small, short disappear_time = -1, bool is_repeating = false);
|
|
void scrollAllMultiColorTexts(bool split_scroll_mode);
|
|
void drawCharacter(const bool (*character)[5], unsigned char height, unsigned char width, uint32_t color, Cursor (*used_cursor));
|
|
void handleDisappearTimers();
|
|
void handleMultiColorDisappearTimers();
|
|
short getTextNodeY2(TextNode *node);
|
|
short getTextNodeX2(TextNode *node);
|
|
short getMultiColorTextNodeX2(MultiColorTextNode *node);
|
|
void modifyTextNodeByGlobalId(unsigned char global_id, uint32_t new_color, char new_text[TEXT_MAX_LENGTH + 1], unsigned char new_slowness);
|
|
void modifyMultiColorTextNodeByGlobalId(unsigned char global_id, char new_text[TEXT_MAX_LENGTH + 1], RGBWithIndex new_colors[4], unsigned char new_color_count);
|
|
bool isNodeExistingByGlobal(unsigned char global_id);
|
|
|
|
|
|
|
|
#endif // PROTOTYPES_H
|