better, needs optimizations tho
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user