This commit is contained in:
2026-02-11 14:40:28 +01:00
parent c958040254
commit a96f0b5aa5
3 changed files with 78 additions and 8 deletions
+2 -2
View File
@@ -895,9 +895,9 @@ constexpr bool font7x5[96][7][5] =
{false, false, false, false, false}, {false, false, false, false, false},
{true, false, false, false, true}, {true, false, false, false, true},
{true, false, false, false, true}, {true, false, false, false, true},
{true, true, true, true, true}, {false, true, true, true, false},
{false, false, false, false, true}, {false, false, false, false, true},
{true, true, true, true, true} {false, true, true, true, false}
}, },
// z (ASCII 122) // z (ASCII 122)
{ {
+75 -5
View File
@@ -21,8 +21,8 @@ Cursor cursor;
unsigned char global_node_id = 0; unsigned char global_node_id = 0;
bool main_animation_started = false; bool main_animation_started = false;
unsigned char bottom_text_state = 0; // 0 = "Technik informatyk", 1 = "technik programista" unsigned char bottom_text_state = 0;
unsigned char scroll_node_global_id = 0; // tracks current bottom-row node unsigned char scroll_node_global_id = 0;
bool scroll_node_active = false; bool scroll_node_active = false;
Image saved_images[MAX_IMAGES_SAVED] = { Image saved_images[MAX_IMAGES_SAVED] = {
@@ -32,6 +32,70 @@ Image saved_images[MAX_IMAGES_SAVED] = {
const RGB animation_data[MAX_ANIMATIONS_COUNT][MAX_ANIMATION_FRAME_COUNT][PANEL_PIXEL_COUNT][DISPLAY_MAX_X + 1] = {}; const RGB animation_data[MAX_ANIMATIONS_COUNT][MAX_ANIMATION_FRAME_COUNT][PANEL_PIXEL_COUNT][DISPLAY_MAX_X + 1] = {};
Animation animations[MAX_ANIMATIONS_COUNT]; Animation animations[MAX_ANIMATIONS_COUNT];
bool vehichles[][][] =
{
{
{0},
{0,0,1,1,1,1,1,0},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0}
},
{
{0,0,1,1,0,0,0,0},
{0,1,1,1,0,0,0,0},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0}
},
{
{0,0,1,1,0,1,1,1},
{0,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0}
},
{
{0,0,0,0,1,1,0,0},
{0,0,1,1,1,1,1,0},
{0,1,1,1,1,1,1,1},
{0,0,1,0,0,0,1,0}
},
{
{0},
{0,0,0,1,1,1,1,1},
{0,0,1,1,1,1,1,1},
{0,0,0,1,0,0,1,0}
},
{
{1,1,1,1,1,1,1,1},
{0,1,0,1,0,1,0,1},
{0,1,1,1,1,1,1,1},
{0,0,1,0,0,0,1,0}
},
{
{0},
{0,0,1,1,0,0,0,0},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0},
},
{
{1,1,0,1,1,1,1,1},
{1,1,0,1,1,1,1,1},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0}
},
{
{0,0,0,1,1,1,1,1},
{0,0,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1},
{0,1,0,0,0,0,1,0}
},
{
{0},
{0,1,1,1,0,0,0,1},
{1,1,1,1,1,1,1,0},
{0,1,0,0,0,1,0,0}
}
}
short getTextNodeY2(TextNode *node) short getTextNodeY2(TextNode *node)
{ {
@@ -141,7 +205,7 @@ void scrollAllScrollableTexts(bool split_scroll_mode = false)
short x1 = text_nodes[i].pos_x; short x1 = text_nodes[i].pos_x;
short x2 = getTextNodeX2(&text_nodes[i]); short x2 = getTextNodeX2(&text_nodes[i]);
if (split_scroll_mode || text_nodes[i].pos_y < 7) if (split_scroll_mode || text_nodes[i].pos_y >= 7)
{ {
if (x2 < 0) if (x2 < 0)
{ {
@@ -265,7 +329,7 @@ void scrollAllMultiColorTexts(bool split_scroll_mode = false)
short x1 = multi_color_text_node[i].pos_x; short x1 = multi_color_text_node[i].pos_x;
short x2 = getMultiColorTextNodeX2(&multi_color_text_node[i]); short x2 = getMultiColorTextNodeX2(&multi_color_text_node[i]);
if (split_scroll_mode || multi_color_text_node[i].pos_y < 7) if (split_scroll_mode || multi_color_text_node[i].pos_y >= 7)
{ {
if (x2 < 0) if (x2 < 0)
{ {
@@ -464,7 +528,7 @@ void setup()
start_server(); start_server();
} }
void loop() void handleProgram1()
{ {
if (!main_animation_started) if (!main_animation_started)
{ {
@@ -517,9 +581,15 @@ void loop()
bottom_text_state = (bottom_text_state + 1) % 4; bottom_text_state = (bottom_text_state + 1) % 4;
} }
} }
}
void loop()
{
pixels.clear(); pixels.clear();
handle_server(); handle_server();
handleProgram1();
handleDisappearTimers(); handleDisappearTimers();
handleMultiColorDisappearTimers(); handleMultiColorDisappearTimers();
scrollAllScrollableTexts(true); scrollAllScrollableTexts(true);
+1 -1
View File
@@ -34,7 +34,7 @@ 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 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); 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); bool isNodeExistingByGlobal(unsigned char global_id);
void handleProgram1();
#endif // PROTOTYPES_H #endif // PROTOTYPES_H