From 1d46925315b40b1bdbc44d1714c366589d153948 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Sat, 27 Jul 2024 00:59:30 -0500 Subject: Lord forgive me for this terrible code --- src/screen.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src/screen.h') diff --git a/src/screen.h b/src/screen.h index 5d0837e..9419d5c 100644 --- a/src/screen.h +++ b/src/screen.h @@ -53,7 +53,31 @@ enum customcolor_pairs { }; struct funcholder { - int (*callback)(void); + int (*callback)(void*); + enum type { + FH_UNSPEC, + + FH_SPIN, + FH_BUY, + FH_QUIT, + + FH_TOOBIG + } type; + + union param { + struct spinp { + WINDOW *bannerwin; + int phrasenum; + } spinp; + + struct buyp { + + } buyp; + + struct quitp { + + } quitp; + } params; }; @@ -63,9 +87,8 @@ static float normalize(float value, float oldmin, float oldmax, float newmin, fl // Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range static int init_rgb_color(int colornum, int red, int green, int blue); -int spin(void); -int buy(void); -int quit(void); -#define USERFUNCS (int (* [])(void)){spin, buy, quit} +int spin(void *spinp); +int buy(void *buyp); +int quit(void *quitp); #endif \ No newline at end of file -- cgit v1.2.3