diff options
| author | @syxhe <https://t.me/syxhe> | 2024-08-28 18:17:36 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2024-08-28 18:17:36 -0500 |
| commit | d0862dd9d5f1170f4e25cc6e3a1da70d567038c2 (patch) | |
| tree | 80c69a954a060dc249260a727d0aec5f0eb46214 /src/screen.h | |
| parent | e02eea72455ffbd3647898b2c65dc5b6626d33b8 (diff) | |
Count spins
Diffstat (limited to 'src/screen.h')
| -rw-r--r-- | src/screen.h | 39 |
1 files changed, 15 insertions, 24 deletions
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 { | |||
| 88 | 88 | ||
| 89 | FH_TOOBIG | 89 | FH_TOOBIG |
| 90 | } type; | 90 | } type; |
| 91 | }; | ||
| 91 | 92 | ||
| 92 | union param { | 93 | struct params { |
| 93 | struct spinp { | 94 | // Previously spinp |
| 94 | WINDOW *bannerwin; | 95 | WINDOW *bannerwin; |
| 95 | struct slotholder *slots; | 96 | struct slotholder *slots; |
| 96 | |||
| 97 | WINDOW *menuholder; | ||
| 98 | MENU *menu; | ||
| 99 | } spinp; | ||
| 100 | |||
| 101 | struct buyp { | ||
| 102 | unsigned long int price; | ||
| 103 | int numspins; | ||
| 104 | |||
| 105 | } buyp; | ||
| 106 | |||
| 107 | struct quitp { | ||
| 108 | char *REPLACEME; | ||
| 109 | 97 | ||
| 110 | } quitp; | 98 | WINDOW *menuholder; |
| 111 | } params; | 99 | MENU *menu; |
| 112 | 100 | ||
| 113 | }; | 101 | // Previously buyp |
| 102 | unsigned int price; | ||
| 103 | int numspins; | ||
| 104 | } params; | ||
| 114 | 105 | ||
| 115 | // Converts value from within the range of [oldmin, oldmax] to a value within the range [newmin, newmax] | 106 | // Converts value from within the range of [oldmin, oldmax] to a value within the range [newmin, newmax] |
| 116 | float normalize(float value, float oldmin, float oldmax, float newmin, float newmax); | 107 | 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); | |||
| 121 | // Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range | 112 | // Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range |
| 122 | static int init_rgb_color(int colornum, int red, int green, int blue); | 113 | static int init_rgb_color(int colornum, int red, int green, int blue); |
| 123 | 114 | ||
| 124 | int spin(void *spinp); | 115 | int spin(void *params); |
| 125 | int buy(void *buyp); | 116 | int buy(void *params); |
| 126 | int quit(void *quitp); | 117 | int quit(void *params); |
| 127 | 118 | ||
| 128 | #endif \ No newline at end of file | 119 | #endif \ No newline at end of file |
