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
+75 -5
View File
@@ -21,8 +21,8 @@ Cursor cursor;
unsigned char global_node_id = 0;
bool main_animation_started = false;
unsigned char bottom_text_state = 0; // 0 = "Technik informatyk", 1 = "technik programista"
unsigned char scroll_node_global_id = 0; // tracks current bottom-row node
unsigned char bottom_text_state = 0;
unsigned char scroll_node_global_id = 0;
bool scroll_node_active = false;
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] = {};
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)
{
@@ -141,7 +205,7 @@ void scrollAllScrollableTexts(bool split_scroll_mode = false)
short x1 = text_nodes[i].pos_x;
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)
{
@@ -265,7 +329,7 @@ void scrollAllMultiColorTexts(bool split_scroll_mode = false)
short x1 = multi_color_text_node[i].pos_x;
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)
{
@@ -464,7 +528,7 @@ void setup()
start_server();
}
void loop()
void handleProgram1()
{
if (!main_animation_started)
{
@@ -517,9 +581,15 @@ void loop()
bottom_text_state = (bottom_text_state + 1) % 4;
}
}
}
void loop()
{
pixels.clear();
handle_server();
handleProgram1();
handleDisappearTimers();
handleMultiColorDisappearTimers();
scrollAllScrollableTexts(true);