summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile18
-rw-r--r--src/main.c134
-rw-r--r--src/main.h18
-rwxr-xr-xsrc/runscreen.sh12
-rw-r--r--src/screen.c142
-rw-r--r--src/screen.h164
6 files changed, 287 insertions, 201 deletions
diff --git a/src/Makefile b/src/Makefile
index e600e47..f7d05be 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,23 +1,21 @@
1CC = gcc 1CC = gcc
2CFLAGS = -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -Og -g3 -ggdb 2CFLAGS = -Wall -Wextra -Wpedantic -fanalyzer -Wanalyzer-too-complex -Og -g3 -ggdb
3LDLIBS = $$(pkg-config --libs libsodium) -lmenu $$(pkg-config --libs ncurses)
3 4
4SHELL := /usr/bin/env -S bash 5SHELL := /usr/bin/env -S bash
5BINARY_FILES := screen main encryption.o search.o ll.o 6BINARY_FILES := main.o encryption.o search.o screen.o ll.o main
6 7
7.PHONY: all clean 8.PHONY: all clean
8 9
9all: $(BINARY_FILES) 10all: $(BINARY_FILES)
10 11
11clean: 12clean:
12 rm -rvf $(BINARY_FILES) 13 rm -rvf $(BINARY_FILES) $(wildcard *.o)
13
14
15main: main.c search.o encryption.o ll.o
16 set -e -o pipefail && $(CC) $(CFLAGS) $$(pkg-config --cflags libsodium) main.c -o main $$(pkg-config --libs libsodium)
17
18screen: screen.c screen.h
19 set -e -o pipefail && $(CC) $(CFLAGS) $$(pkg-config --cflags libsodium) screen.c -o screen $$(pkg-config --libs libsodium) -lmenu $$(pkg-config --libs ncurses)
20 14
15main.o: main.c main.h
21encryption.o: encryption.c encryption.h 16encryption.o: encryption.c encryption.h
22search.o: search.c search.h 17search.o: search.c search.h
23ll.o: ll.c ll.h \ No newline at end of file 18screen.o: screen.c screen.h
19ll.o: ll.c ll.h
20
21main: $(wildcard *.o) \ No newline at end of file
diff --git a/src/main.c b/src/main.c
index a382ccb..564846d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,8 +10,11 @@
10 10
11#define _GNU_SOURCE 11#define _GNU_SOURCE
12 12
13#include "main.h"
14
13#include "encryption.h" 15#include "encryption.h"
14#include "search.h" 16#include "search.h"
17#include "screen.h"
15#include "ll.h" 18#include "ll.h"
16 19
17#include <sodium.h> 20#include <sodium.h>
@@ -41,14 +44,16 @@ static char argdoc[] = "lmao";
41 44
42static struct argp_option options[] = { 45static struct argp_option options[] = {
43 {.name = "passphrase", .key = 'p', .arg = "key", .flags = 0, .doc = "Specify passphrase for encryption/decryption", .group = 0}, 46 {.name = "passphrase", .key = 'p', .arg = "key", .flags = 0, .doc = "Specify passphrase for encryption/decryption", .group = 0},
44 {"decrypt", 'd', 0, 0, "Skip the slots minigame and immediately decrypt (or encrypt) files", 0}, 47 {"decrypt", 'd', 0, 0, "Skip the slots minigame and immediately decrypt (or encrypt) files", 0},
45 {"noenc", 'n', 0, 0, "Don't encrypt files when ran, just play slots"}, 48 {"noencrypt", 'n', 0, 0, "Don't encrypt files when ran, just play slots", 0},
46 {0} 49 {0}
47}; 50};
51#define SKIPSLOTS 0x1
52#define SKIPENC 0x2
48 53
49struct arguments { 54struct arguments {
50 char *inputpass; 55 char *inputpass;
51 int skipslots; 56 int flags;
52}; 57};
53 58
54static error_t parse_opt(int key, char *arg, struct argp_state *state) { 59static error_t parse_opt(int key, char *arg, struct argp_state *state) {
@@ -56,21 +61,28 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
56 61
57 switch(key) { 62 switch(key) {
58 case 'p': 63 case 'p':
59 /* Specifying the start option of "-p=<phrase>" errors out unless this is done. 64 /* Specifying the start option of "-p=<phrase>" errors out unless this is done.
60 // Technically a user should use --passphrase=<phrase> if they want to use the = sign, but I think 65 // Technically a user should use --passphrase=<phrase> if they want to use the = sign, but I think
61 // this is how it should work. RMS can suck it */ 66 // this is how it should work. RMS can suck it */
62 if(*arg == '=') 67 if(*arg == '=')
63 arg++; 68 arg++;
64 69
65 args->inputpass = arg; 70 args->inputpass = arg;
66 break; 71 if(strlen(args->inputpass) != PHRASESIZE) {
72 error(1, 0, "Encryption passphrase must be exactly %d characters long", PHRASESIZE);
73 }
74 break;
67 75
68 case 'd': 76 case 'd':
69 args->skipslots = 1; 77 args->flags |= SKIPSLOTS;
70 break; 78 break;
79
80 case 'n':
81 args->flags |= SKIPENC;
82 break;
71 83
72 default: 84 default:
73 return ARGP_ERR_UNKNOWN; 85 return ARGP_ERR_UNKNOWN;
74 } 86 }
75 87
76 return 0; 88 return 0;
@@ -90,34 +102,88 @@ int genphrase(char *phrase, size_t phrasesize) {
90 return 0; 102 return 0;
91} 103}
92 104
105// roflmao fuck this project i'm too tired to bother with making it nice
106int doslots(struct bullshit *stuff) {
107 // I have no fucking clue why gcc complains that this isn't properly bracketed. Maybe im rarted
108 stuff->handler = (struct sigaction){
109 .sa_flags = SA_SIGINFO,
110 .sa_mask = SIGINT | SIGWINCH,
111 .sa_sigaction = catcher,
112 };
113 doinit(&stuff->handler);
114 docolors();
115
116 getmaxyx(stdscr, stuff->row, stuff->col);
117 stuff->randphrase = randombytes_uniform(STATIC_ARRSIZE(phrases) + 1);
118 stuff->banner = create_banner(stuff->col, stuff->randphrase);
119
120 init_items(stuff->items, menu_choices, STATIC_ARRSIZE(menu_choices), userfuncs);
121 stuff->menu = new_menu(stuff->items);
122 if(stuff->menu == NULL) {
123 endwin();
124 error(1, errno, "Could not create menu");
125 }
93 126
94int main(int argc, char *argv[]) { 127 stuff->menuholder = newwin(1, stuff->col, stuff->row - 1, 0);
95 if(sodium_init() < 0) 128 keypad(stuff->menuholder, TRUE);
96 error(1, errno, "[VX-GAMBLEGROUND] Could not init sodium"); 129 init_custom_menu_format(stuff->menuholder, stuff->menu, (int []){1, stuff->col}, O_ONEVALUE | O_IGNORECASE, O_SHOWDESC | O_NONCYCLIC);
130
131 stuff->slots.slotwin = newwin(stuff->row - 2, stuff->col, 1, 0);
132 if(stuff->slots.slotwin == NULL) {
133 endwin();
134 error(1, errno, "[VX-GAMBLEGROUND] Could not create slots window");
135 }
136 init_slotholder(&stuff->slots);
137
138 doupdate();
139
140 stuff->params = (struct params){
141 .bannerwin = stuff->banner,
142 .menu = stuff->menu,
143 .menuholder = stuff->menuholder,
144 .numspins = 3,
145 .price = 1,
146 .slots = &stuff->slots,
147 };
97 148
98 struct arguments args; 149 handle_input(stuff->menuholder, stuff->menu, &stuff->params);
99 args.inputpass = NULL;
100 args.skipslots = 0;
101 150
151 unpost_menu(stuff->menu);
152 free_menu(stuff->menu);
153 for(long unsigned int i = 0; i < STATIC_ARRSIZE(menu_choices); i++)
154 free_item(stuff->items[i]);
155
156 endwin();
157
158 return 0;
159}
160
161int main(int argc, char *argv[]) {
162 struct arguments args = {
163 .inputpass = NULL,
164 .flags = 0
165 };
102 argp_parse(&argp, argc, argv, ARGP_NO_ARGS, 0, &args); 166 argp_parse(&argp, argc, argv, ARGP_NO_ARGS, 0, &args);
103 167
104 if(args.inputpass != NULL) { 168 if(args.flags == (SKIPENC | SKIPSLOTS))
105 if(strlen(args.inputpass) != PHRASESIZE) { 169 error(1, 0, "[VX-GAMBLEGROUND] You want to skip the slots, and the encryption? Ok, sure");
106 error(1, 0, "Encryption passphrase must be exactly %d characters long", PHRASESIZE); 170
107 } 171 struct bullshit stuff;
172 doslots(&stuff);
108 173
109 printf("Using input passphrase \"%s\"\n", args.inputpass); 174 // if(args.inputpass != NULL) {
110 } else { 175 // printf("Using input passphrase \"%s\"\n", args.inputpass);
111 char phrase[PHRASESIZE]; 176 // } else {
112 genphrase(phrase, PHRASESIZE); 177 // char phrase[PHRASESIZE];
178 // genphrase(phrase, PHRASESIZE);
113 179
114 printf("Encryption phrase: %s\n\nWrite this phrase down EXACTLY if you want to recover your files\n", phrase); 180 // printf("Encryption phrase: %s\n\nWrite this phrase down EXACTLY if you want to recover your files\n", phrase);
115 181
116 if(args.skipslots == 0) { 182 // if(args.flags & SKIPSLOTS != 0) {
117 printf("Hit Enter to contine, or CTRL+C to cancel..."); 183 // printf("Hit Enter to contine, or CTRL+C to cancel...");
118 getchar(); 184 // getchar();
119 } 185 // }
120 } 186 // }
121 187
122 /* Get files 188 /* Get files
123 struct nodelist *files = scanfiles("./", alphasort); 189 struct nodelist *files = scanfiles("./", alphasort);
diff --git a/src/main.h b/src/main.h
new file mode 100644
index 0000000..579e541
--- /dev/null
+++ b/src/main.h
@@ -0,0 +1,18 @@
1#ifndef __SLOTS__MAIN_H__1443534935301
2#define __SLOTS__MAIN_H__1443534935301
3
4#include "screen.h"
5
6struct bullshit {
7 struct sigaction handler;
8 int row, col, randphrase;
9
10 WINDOW *banner, *menuholder;
11 ITEM *items[STATIC_ARRSIZE(menu_choices) + 1];
12 MENU *menu;
13
14 struct slotholder slots;
15 struct params params;
16};
17
18#endif \ No newline at end of file
diff --git a/src/runscreen.sh b/src/runscreen.sh
index f0dac47..7873451 100755
--- a/src/runscreen.sh
+++ b/src/runscreen.sh
@@ -3,27 +3,29 @@
3# This file exists because I've gotten to the point where I need to open the terminal in specific dimensions 3# This file exists because I've gotten to the point where I need to open the terminal in specific dimensions
4# or the thing looks bad 4# or the thing looks bad
5 5
6BINNAME="main"
7SCRIPT_DIR="$(cd "$(dirname "$0")" && echo "$PWD")"
8
6main() { 9main() {
7 # Stop interrupts 10 # Stop interrupts
8 trap '' INT 11 trap '' INT
9 12
10 # Get location of script 13 # Make sure script location is there
11 SCRIPT_DIR="$(cd "$(dirname "$0")" && echo "$PWD")"
12 if [ -z "$SCRIPT_DIR" ]; then 14 if [ -z "$SCRIPT_DIR" ]; then
13 printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Couldn't get location of script. Exiting...\n\033[m" 1>&2 15 printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Couldn't get location of script. Exiting...\n\033[m" 1>&2
14 return 1 16 return 1
15 fi 17 fi
16 18
17 # Check to make sure the screen binary exists 19 # Check to make sure the screen binary exists
18 if [ ! -x "$SCRIPT_DIR/screen" ]; then 20 if [ ! -x "$SCRIPT_DIR/$BINNAME" ]; then
19 printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Screen binary doesn't exist. Exiting...\n\033[m" 1>&2 21 printf "\033[38;2;255;0;0m\033[1m[runscreen.sh] Screen binary doesn't exist. Exiting...\n\033[m" 1>&2
20 return 1 22 return 1
21 fi 23 fi
22 24
23 # Run the thing in gnome terminal 25 # Run the thing in gnome terminal
24 gnome-terminal --hide-menubar --geometry=156x27 --wait -- "$SCRIPT_DIR/screen" \ 26 gnome-terminal --hide-menubar --geometry=156x27 --wait -- "$SCRIPT_DIR/$BINNAME" \
25 && return $? 27 && return $?
26 28
27} 29}
28 30
29main && exit $? \ No newline at end of file 31main && exit $?
diff --git a/src/screen.c b/src/screen.c
index 7018c2a..e70bf21 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -396,7 +396,7 @@ int rangemod(int x, int offset, int min, int max) {
396 return ((x - min + offset) % (max - min + 1)) + min; 396 return ((x - min + offset) % (max - min + 1)) + min;
397} 397}
398 398
399static int init_rgb_color(int colornum, int red, int green, int blue) { 399int init_rgb_color(int colornum, int red, int green, int blue) {
400 int nred = normalize(red, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX); 400 int nred = normalize(red, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX);
401 int ngreen = normalize(green, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX); 401 int ngreen = normalize(green, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX);
402 int nblue = normalize(blue, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX); 402 int nblue = normalize(blue, RGB_MIN, RGB_MAX, CURSESCOLOR_MIN, CURSESCOLOR_MAX);
@@ -429,72 +429,74 @@ int mvwcreate_box(WINDOW *win, int y, int x, int height, int width, const chtype
429 429
430//////////////////////////////////// MAIN //////////////////////////////////// 430//////////////////////////////////// MAIN ////////////////////////////////////
431 431
432int main() { 432// Use this as an example for implementing screen's functions in another file
433 // I have no fucking clue why gcc complains that this isn't properly bracketed. Maybe im rarted 433
434 const struct sigaction handler = { 434// int main() {
435 .sa_flags = SA_SIGINFO, 435// // I have no fucking clue why gcc complains that this isn't properly bracketed. Maybe im rarted
436 .sa_mask = SIGINT | SIGWINCH, 436// const struct sigaction handler = {
437 .sa_sigaction = catcher, 437// .sa_flags = SA_SIGINFO,
438 }; 438// .sa_mask = SIGINT | SIGWINCH,
439 doinit(&handler); 439// .sa_sigaction = catcher,
440 440// };
441 docolors(); 441// doinit(&handler);
442 442
443 // Variable definitions 443// docolors();
444 ITEM *items[STATIC_ARRSIZE(menu_choices) + 1]; // An array of ITEM pointers large enough to store all the menu items 444
445 struct params params; // Function pointer used for callbacks in the menu driver 445// // Variable definitions
446 WINDOW *menuholder = NULL; // The window for displaying the menu 446// ITEM *items[STATIC_ARRSIZE(menu_choices) + 1]; // An array of ITEM pointers large enough to store all the menu items
447 int row = -1, col = -1; // The rows and columns of the main screen 447// struct params params; // Function pointer used for callbacks in the menu driver
448 uint32_t randomnum; // A random number for getting the banner phrase 448// WINDOW *menuholder = NULL; // The window for displaying the menu
449 MENU *menu; // The actual menu object 449// int row = -1, col = -1; // The rows and columns of the main screen
450 450// uint32_t randomnum; // A random number for getting the banner phrase
451 struct slotholder slots; 451// MENU *menu; // The actual menu object
452 452
453 getmaxyx(stdscr, row, col); 453// struct slotholder slots;
454 randomnum = randombytes_uniform(STATIC_ARRSIZE(phrases) + 1); 454
455 455// getmaxyx(stdscr, row, col);
456 WINDOW *banner = create_banner(col, randomnum); 456// randomnum = randombytes_uniform(STATIC_ARRSIZE(phrases) + 1);
457 init_items(items, menu_choices, STATIC_ARRSIZE(menu_choices), userfuncs); 457
458 458// WINDOW *banner = create_banner(col, randomnum);
459 // No point in moving this into a function 459// init_items(items, menu_choices, STATIC_ARRSIZE(menu_choices), userfuncs);
460 menu = new_menu(items); 460
461 if(menu == NULL) { 461// // No point in moving this into a function
462 endwin(); 462// menu = new_menu(items);
463 error(1, errno, "Could not create menu"); 463// if(menu == NULL) {
464 } 464// endwin();
465 465// error(1, errno, "Could not create menu");
466 // Set up the menuholder & init everything 466// }
467 menuholder = newwin(1, col, row - 1, 0); 467
468 keypad(menuholder, TRUE); 468// // Set up the menuholder & init everything
469 init_custom_menu_format(menuholder, menu, (int []){1, col}, O_ONEVALUE | O_IGNORECASE, O_SHOWDESC | O_NONCYCLIC); 469// menuholder = newwin(1, col, row - 1, 0);
470 470// keypad(menuholder, TRUE);
471 471// init_custom_menu_format(menuholder, menu, (int []){1, col}, O_ONEVALUE | O_IGNORECASE, O_SHOWDESC | O_NONCYCLIC);
472 slots.slotwin = newwin(row - 2, col, 1, 0); 472
473 if(slots.slotwin == NULL) { 473
474 endwin(); 474// slots.slotwin = newwin(row - 2, col, 1, 0);
475 error(1, errno, "[VX-GAMBLEGROUND] Could not create slots window"); 475// if(slots.slotwin == NULL) {
476 } 476// endwin();
477 477// error(1, errno, "[VX-GAMBLEGROUND] Could not create slots window");
478 init_slotholder(&slots); 478// }
479 479
480 doupdate(); 480// init_slotholder(&slots);
481 481
482 params.bannerwin = banner; 482// doupdate();
483 params.menu = menu; 483
484 params.menuholder = menuholder; 484// params.bannerwin = banner;
485 params.numspins = 3; 485// params.menu = menu;
486 params.price = 1; 486// params.menuholder = menuholder;
487 params.slots = &slots; 487// params.numspins = 3;
488 488// params.price = 1;
489 handle_input(menuholder, menu, &params); 489// params.slots = &slots;
490 490
491 // Clean up the menu 491// handle_input(menuholder, menu, &params);
492 unpost_menu(menu); 492
493 free_menu(menu); 493// // Clean up the menu
494 for(long unsigned int i = 0; i < STATIC_ARRSIZE(menu_choices); i++) 494// unpost_menu(menu);
495 free_item(items[i]); 495// free_menu(menu);
496 //*/ 496// for(long unsigned int i = 0; i < STATIC_ARRSIZE(menu_choices); i++)
497 497// free_item(items[i]);
498 endwin(); // Clean up curses 498// //*/
499 return 0; 499
500} \ No newline at end of file 500// endwin(); // Clean up curses
501// return 0;
502// } \ No newline at end of file
diff --git a/src/screen.h b/src/screen.h
index 7c776e6..2d4f610 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -5,87 +5,87 @@
5#include <curses.h> 5#include <curses.h>
6#include <signal.h> 6#include <signal.h>
7 7
8const char *phrases[] = { 8#define phrases (const char *[]){\
9 // By @syxhe on telegram 9 /* By @syxhe on Telegram */\
10 "WE CLOWN IN THIS MF, TAKE YO SENSITIVE ASS BACK TO @GENTOOMEMES", 10 "WE CLOWN IN THIS MF, TAKE YO SENSITIVE ASS BACK TO @GENTOOMEMES",\
11 "R.I.P VxHeaven", 11 "R.I.P VxHeaven",\
12 "tmp(2) nuked by Smelly", 12 "tmp(2) nuked by Smelly",\
13 "99% of Ransomware Operators quit before compromising a bank", 13 "99% of Ransomware Operators quit before compromising a bank",\
14 "Equation Group wuz here", 14 "Equation Group wuz here",\
15 "Lazarus wuz here", 15 "Lazarus wuz here",\
16 "LockBit wuz here", 16 "LockBit wuz here",\
17 "Sponsored by Equation Group", 17 "Sponsored by Equation Group",\
18 "Sponsored by Lazarus", 18 "Sponsored by Lazarus",\
19 "Sponsored by LockBit", 19 "Sponsored by LockBit",\
20 "Free my boy Ross Ulbricht he did nothing wrong", 20 "Free my boy Ross Ulbricht he did nothing wrong",\
21 "Stay off the dark web, kids", 21 "Stay off the dark web, kids",\
22 "FREE BITCOIN JUST 3 SPINS AWAY", 22 "FREE BITCOIN JUST 3 SPINS AWAY",\
23 "We all glow in the dark", 23 "We all glow in the dark",\
24 "Shoutouts to Simpleflips", 24 "Shoutouts to Simpleflips",\
25 "Shoutouts to BugHunter", 25 "Shoutouts to BugHunter",\
26 "Shoutouts to EyeDeeKay", 26 "Shoutouts to EyeDeeKay",\
27 ":beecat:", 27 ":beecat:",\
28 ":3", 28 ":3",\
29 "You think Jack Rhysider will interview me now?", 29 "You think Jack Rhysider will interview me now?",\
30 "Check out \"Darknet Diaries\"", 30 "Check out \"Darknet Diaries\"",\
31 "Chill and losing it since 2016", 31 "Chill and losing it since 2016",\
32 "POOL'S CLOSED", 32 "POOL'S CLOSED",\
33 "I've been diagnosed with snaids", 33 "I've been diagnosed with snaids",\
34 "My balls itch", 34 "My balls itch",\
35 "We killin filez and shiit", 35 "We killin filez and shiit",\
36 "lonix users BTFO once again", 36 "lonix users BTFO once again",\
37 "This space left intentionally blank", 37 "This space left intentionally blank",\
38 "Thinking of a way out is self-centered at best", 38 "Thinking of a way out is self-centered at best",\
39 "Searching for the punchline to an infinite jest?", 39 "Searching for the punchline to an infinite jest?",\
40 "Still learning what it means to feel", 40 "Still learning what it means to feel",\
41 "Killroy was NOT here", 41 "Killroy was NOT here",\
42 "Go fuck yourself lmao", 42 "Go fuck yourself lmao",\
43 "It's so over", 43 "It's so over",\
44 "We're so back", 44 "We're so back",\
45 "It never even began", 45 "It never even began",\
46 "Pepito they shot Trump", 46 "Pepito they shot Trump",\
47 "This shit ain't nothing to me man", 47 "This shit ain't nothing to me man",\
48 "I'm him, I will continue to be him", 48 "I'm him, I will continue to be him",\
49 "THERE ARE MOSQUITOS IN YOUR URETHRA, GET THEM OUT!!!", 49 "THERE ARE MOSQUITOS IN YOUR URETHRA, GET THEM OUT!!!",\
50 "Something wicked this way comes", 50 "Something wicked this way comes",\
51 "Schizo hour", 51 "Schizo hour",\
52 "Man I could really use some Chicken Bouillon rn", 52 "Man I could really use some Chicken Bouillon rn",\
53 "Fuck my digital footprint, I need a digital footjob", 53 "Fuck my digital footprint, I need a digital footjob",\
54 "Having my weekly \"Ted was right\" moment", 54 "Having my weekly \"Ted was right\" moment",\
55 "Why aren't you in the gym?", 55 "Why aren't you in the gym?",\
56 "Proof?", 56 "Proof?",\
57 "I've gone completely mental", 57 "I've gone completely mental",\
58 "The rage consumes me", 58 "The rage consumes me",\
59 "Go outside. Now.", 59 "Go outside. Now.",\
60 "Beautiful Day Sunny Morning", 60 "Beautiful Day Sunny Morning",\
61 "Fuck crypto all my homies hate crypto", 61 "Fuck crypto all my homies hate crypto",\
62 "stfu fedsmoker is my dad he'll eat you alive", 62 "stfu fedsmoker is my dad he'll eat you alive",\
63 "Almost dog in hot car'd myself", 63 "Almost dog in hot car'd myself",\
64 64 \
65 // by @danielsprofile on telegram 65 /* by @danielsprofile on telegram */ \
66 "Daniel Spears loves femboys", 66 "Daniel Spears loves femboys",\
67 "LizardSquad > Razer", 67 "LizardSquad > Razer",\
68 "Sponsored by Major League Gaming", 68 "Sponsored by Major League Gaming",\
69 "Sponsored by LemonParty.org", 69 "Sponsored by LemonParty.org",\
70 "Sponsored by FTX", 70 "Sponsored by FTX",\
71 "RIP Harambe", 71 "RIP Harambe",\
72 "Shoutout Elliot Alderson", 72 "Shoutout Elliot Alderson",\
73 "Ted Kaczynski was right", 73 "Ted Kaczynski was right",\
74 "The FBI watches me jerk off to MILFs lol", 74 "The FBI watches me jerk off to MILFs lol",\
75 "robux generator free online 2024 100% working undetected", 75 "robux generator free online 2024 100% working undetected",\
76 "Doge wuz here", 76 "Doge wuz here",\
77 "We like Fortnite we like Fortnite", 77 "We like Fortnite we like Fortnite",\
78 "We live in a society", 78 "We live in a society",\
79 "Hab you seen a alien pls?", 79 "Hab you seen a alien pls?",\
80 "using a flipperzero makes me an APT, right?", 80 "using a flipperzero makes me an APT, right?",\
81 "Subscribe to PewDiePie", 81 "Subscribe to PewDiePie",\
82}; 82}
83 83
84const char *menu_choices[] = { 84#define menu_choices (const char *[]){\
85 "Spin", 85 "Spin",\
86 "Buy spins", 86 "Buy spins",\
87 "Quit" 87 "Quit"\
88}; 88}
89 89
90#define STATIC_ARRSIZE(arr) (sizeof((arr)) / sizeof((arr)[0])) 90#define STATIC_ARRSIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
91 91
@@ -191,7 +191,7 @@ struct params {
191 // Previously buyp 191 // Previously buyp
192 unsigned int price; 192 unsigned int price;
193 int numspins; 193 int numspins;
194} params; 194};
195 195
196 196
197//////////////////////////////////// SPECIFICALLY USEFUL FUNCS //////////////////////////////////// 197//////////////////////////////////// SPECIFICALLY USEFUL FUNCS ////////////////////////////////////
@@ -246,7 +246,7 @@ int rangemod(int x, int offset, int min, int max);
246 246
247 247
248// Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range 248// Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range
249static int init_rgb_color(int colornum, int red, int green, int blue); 249int init_rgb_color(int colornum, int red, int green, int blue);
250#define RGB_MIN 0 250#define RGB_MIN 0
251#define RGB_MAX 255 251#define RGB_MAX 255
252#define CURSESCOLOR_MIN 0 252#define CURSESCOLOR_MIN 0