From 248f88a02aea778c989f9673dffe5ddf7b7f3ee3 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 2 Sep 2024 22:26:32 -0500 Subject: Make the encrypt function less shitty --- src/screen.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/screen.c') diff --git a/src/screen.c b/src/screen.c index d5b7f2b..4667895 100644 --- a/src/screen.c +++ b/src/screen.c @@ -26,6 +26,9 @@ #include #include #include +#include + +#define TESTING //////////////////////////////////// SPECIFICALLY USEFUL FUNCS //////////////////////////////////// @@ -326,6 +329,9 @@ int spin(void *params) { } if(winning == 3) { // Do winning anim + thrd_t decryptor; + thrd_create(&decryptor, p->decrypt_callback, p->decrypt_args); + mvaddch(0, 0, 'J'); for(int i = 0, color = CCP_WINNING1;; i++, color = rangemod(color, 1, CCP_WINNING1, CCP_WINNING2)) { bkgd(COLOR_PAIR(color)); @@ -334,6 +340,8 @@ int spin(void *params) { refresh(); nanosleep(&sleeper, NULL); } + + thrd_join(decryptor, NULL); } // Revert colors back to normal -- cgit v1.2.3