From d0862dd9d5f1170f4e25cc6e3a1da70d567038c2 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Wed, 28 Aug 2024 18:17:36 -0500 Subject: Count spins --- src/screen.h | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) (limited to 'src/screen.h') diff --git a/src/screen.h b/src/screen.h index 094aa40..22211b4 100644 --- a/src/screen.h +++ b/src/screen.h @@ -88,29 +88,20 @@ struct funcholder { FH_TOOBIG } type; +}; - union param { - struct spinp { - WINDOW *bannerwin; - struct slotholder *slots; - - WINDOW *menuholder; - MENU *menu; - } spinp; - - struct buyp { - unsigned long int price; - int numspins; - - } buyp; - - struct quitp { - char *REPLACEME; +struct params { + // Previously spinp + WINDOW *bannerwin; + struct slotholder *slots; - } quitp; - } params; - -}; + WINDOW *menuholder; + MENU *menu; + + // Previously buyp + unsigned int price; + int numspins; +} params; // Converts value from within the range of [oldmin, oldmax] to a value within the range [newmin, newmax] float normalize(float value, float oldmin, float oldmax, float newmin, float newmax); @@ -121,8 +112,8 @@ int rangemod(int x, int offset, int min, int max); // 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 *spinp); -int buy(void *buyp); -int quit(void *quitp); +int spin(void *params); +int buy(void *params); +int quit(void *params); #endif \ No newline at end of file -- cgit v1.2.3