#ifndef __SLOTS__SCREEN_H__184802466018249 #define __SLOTS__SCREEN_H__184802466018249 #include #include #include #define phrases (const char *[]){\ "WE CLOWN IN THIS MF, TAKE YO SENSITIVE ASS BACK TO @GENTOOMEMES",\ "R.I.P VxHeaven",\ "tmp(2) nuked by Smelly",\ "99% of Ransomware Operators quit before compromising a bank",\ "Equation Group wuz here",\ "Lazarus wuz here",\ "LockBit wuz here",\ "Sponsored by Equation Group",\ "Sponsored by Lazarus",\ "Sponsored by LockBit",\ "Free my boy Ross Ulbricht he did nothing wrong",\ "Stay off the dark web, kids",\ "FREE BITCOIN JUST 3 SPINS AWAY",\ "We all glow in the dark",\ "Shoutouts to Simpleflips",\ "Shoutouts to BugHunter",\ "Shoutouts to EyeDeeKay",\ ":beecat:",\ ":3",\ "You think Jack Rhysider will interview me now?",\ "Check out \"Darknet Diaries\"",\ "Chill and losing it since 2016",\ "POOL'S CLOSED",\ "I've been diagnosed with snaids (snail aids)",\ "My balls itch",\ "We killin filez and shiit",\ "lonix users BTFO once again",\ "This space left intentionally blank",\ "Thinking of a way out is self-centered at best",\ "Searching for the punchline to an infinite jest?",\ "Still learning what it means to feel",\ "Killroy was NOT here",\ "Go fuck yourself lmao",\ "It's so over",\ "We're so back",\ "It never even began",\ "Pepito they shot Trump",\ "This shit ain't nothing to me man",\ "I'm him, I will continue to be him",\ "THERE ARE MOSQUITOS IN YOUR URETHRA, GET THEM OUT!!!",\ "Something wicked this way comes",\ "Schizo hour",\ "Man I could really use some Chicken Bouillon rn",\ "Fuck my digital footprint, I need a digital footjob",\ "Having my weekly \"Ted was right\" moment",\ "Why aren't you in the gym?",\ "Proof?",\ "I've gone completely mental",\ "The rage consumes me",\ "Go outside. Now.",\ "Beautiful Day Sunny Morning",\ "Fuck crypto all my homies hate crypto",\ "stfu fedsmoker is my dad he'll eat you alive",\ "Almost dog in hot car'd myself",\ \ /* by @danielsprofile on telegram */ \ "Daniel Spears loves femboys",\ "LizardSquad > Razer",\ "Sponsored by Major League Gaming",\ "Sponsored by LemonParty.org",\ "Sponsored by FTX",\ "RIP Harambe",\ "Shoutout Elliot Alderson",\ "Ted Kaczynski was right",\ "The FBI watches me jerk off to MILFs lol",\ "robux generator free online 2024 100%% working undetected",\ "Doge wuz here",\ "We like Fortnite we like Fortnite",\ "We live in a society",\ "Hab you seen a alien pls?",\ "using a flipperzero makes me an APT, right?",\ "Subscribe to PewDiePie"\ } #define menu_choices (const char *[]){\ "Spin",\ "Buy spins",\ "Quit"\ } #define STATIC_ARRSIZE(arr) (sizeof((arr)) / sizeof((arr)[0])) #define FUCKED_UP_ENTER 10 // functions for the userpointer for each menu item. Defines callbacks and type of function called #define userfuncs (struct funcholder []){ \ {.callback = spin, .type = FH_SPIN}, \ {.callback = buy, .type = FH_BUY}, \ {.callback = quit, .type = FH_QUIT} \ } enum custom_colors { // Unspecified color CC_UNSPEC = -1, /* The standard curses colors are defined here as to prevent custom colors from reusing pre-existing // colors, in case the defaults are to be used */ CURSES_BLACK = COLOR_BLACK, // ncurses' default black CURSES_RED = COLOR_RED, // ncurses' default red CURSES_GREEN = COLOR_GREEN, // ncurses' default green CURSES_YELLOW = COLOR_YELLOW, // ncurses' default yellow CURSES_BLUE = COLOR_BLUE, // ncurses' default blue CURSES_MAGENTA = COLOR_MAGENTA, // ncurses' default magenta CURSES_CYAN = COLOR_CYAN, // ncurses' default cyan CURSES_WHITE = COLOR_WHITE, // ncurses' default white /* Start custom color definitions */ CC_RED, // RGB: 255, 0, 0 CC_ORANGE, // RGB: 255, 128, 0 CC_YELLOW, // RGB: 255, 255, 0 CC_GREEN, // RGB: 0, 255, 0 CC_BLUE, // RGB: 0, 0, 255 CC_PURPLE, // RGB: 155, 0, 255 CC_MAGENTA, // RGB: 255, 0, 255 CC_WHITE, // RGB: 255, 255, 255 CC_BLACK, // RGB: 0, 0, 0 CC_WINNING, // RGB: 232, 185, 35 // This isn't actually a color, even if you try to use it as one CC_TOOBIG }; enum customcolor_pairs { CCP_UNDEFINED = -1, CCP_CURSES_DEFAULT = 0, CCP_TESTING, // Text: White, BG: Red CCP_BANNER, // Text: White, BG: Curses' Blue CCP_RED, // Text: White, BG: Red CCP_ORANGE, // Text: Black, BG: Orange CCP_YELLOW, // Text: Black, BG: Yellow CCP_GREEN, // Text: Black, BG: Green CCP_BLUE, // Text: White, BG: Blue CCP_PURPLE, // Text: White, BG: Purple CCP_MAGENTA, // Text: White, BG: Magenta CCP_WHITE, // Text: Black, BG: White CCP_WINNING1, // Text: White, BG: Gold CCP_WINNING2, // Text: Gold, BG: White CCP_TOOBIG }; #define NUMCOLORCYCLE 4 #define COLORWIDTH (CCP_WHITE - CCP_RED) #define NUMCOLORPAIRS (COLORWIDTH + 1) struct slotholder { WINDOW *slotwin; int slotx; int sloty; WINDOW *subslot[3]; char slotchar[3][3]; }; struct funcholder { int (*callback)(void*); enum type { FH_UNSPEC, FH_SPIN, FH_BUY, FH_QUIT, FH_TOOBIG } type; }; struct params { // Previously spinp WINDOW *bannerwin; struct slotholder *slots; WINDOW *menuholder; MENU *menu; int (*decrypt_callback)(void*); void *decrypt_args; // Previously buyp unsigned int price; int numspins; }; //////////////////////////////////// SPECIFICALLY USEFUL FUNCS //////////////////////////////////// // Catch SIGINT and SIGWINCH signals void catcher(int signum, siginfo_t *info, void *ucontext); // Initialize sodium, curses, and set the proper locale. Exits on error, returns 0 otherwise int doinit(const struct sigaction *handler); // Initialize colors & define a few custom colors & color pairs. Exits on error, returns 0 otherwise int docolors(void); // Initialize a set of items using an array of items, an array of menu options, and an array of funcholder structs int init_items(ITEM *items[], const char *menuopts[], size_t menuopts_size, struct funcholder usrptrs[]); // Initialize the individual slot wheels & the window they sit on int init_slotholder(struct slotholder *slots); // Set a specific, custom menu format int init_custom_menu_format(WINDOW *menuholder, MENU *menu, const int fmtdim[2], Menu_Options toggleon, Menu_Options toggleoff); // Create the vx-gambleground banner WINDOW* create_banner(int col, int randomnum, const char *passphrase); // Deal with menu items when a user hits enter int handle_menuitem(MENU *menu, struct params *params); // Deal with switching menu contexts int handle_input(WINDOW *menuholder, MENU *menu, struct params *params); // Spin the wheel int spin(void *params); // Increase number of spins int buy(void *params); // Quit out int quit(void *params); //////////////////////////////////// GENERALLY USEFUL FUNCTIONS //////////////////////////////////// // 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); // Find the result of x + offset and constrain it to the range [min, max]. x must be >= min 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 int init_rgb_color(int colornum, int red, int green, int blue); #define RGB_MIN 0 #define RGB_MAX 255 #define CURSESCOLOR_MIN 0 #define CURSESCOLOR_MAX 1000 // Create a box starting at (x, y) with a specified width and height int mvwcreate_box(WINDOW *win, int y, int x, int height, int width, const chtype chars[6]); #endif