better, needs optimizations tho

This commit is contained in:
Priec
2025-11-13 23:57:42 +01:00
parent bb1a24e7b3
commit 79db5bb8a0
3 changed files with 24 additions and 536 deletions

View File

@@ -26,8 +26,8 @@ static char rx_buffer[BUFFER_SIZE];
// ASCII fart background
void draw_mask(const char *unused_filename, int shift, const char *text = nullptr) {
const int view_width = 50; // visible width
const int view_height = 24;
const int view_width = 55; // visible width
const int view_height = 19;
// Terminal clear + home
printf("\033[2J\033[H");
@@ -98,7 +98,7 @@ int main(void) {
// shift = (shift + 1) % 8;
// }
if (anim_timer.elapsed_time() >= 900ms) {
if (anim_timer.elapsed_time() >= 40ms) {
shift++;
anim_timer.reset();
@@ -107,7 +107,7 @@ int main(void) {
if (need_redraw) {
draw_mask(bg_file, shift, message_active ? message : nullptr);
need_redraw = false;
ThisThread::sleep_for(150ms);
ThisThread::sleep_for(40ms);
}
ThisThread::sleep_for(20ms);
}