This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
//create your arguments list. | |
struct args { | |
char *name; | |
int x; | |
int y; | |
int width; | |
int height; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
//create a function that recieves a function pointer, and any arguments | |
void _foo(void (*function)()) { | |
function("Foo", 555); | |
} | |
void _setTimeout(void (*function)(), float time) { | |
sleep((float)time/1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdarg.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
int* screenshot(int x, int y, int width, int height) { | |
HDC screen = GetDC(0); | |
HDC memoryDC = CreateCompatibleDC(screen); | |
HBITMAP memoryBMP = CreateCompatibleBitmap(screen, width, height); | |
SelectObject(memoryDC, memoryBMP); | |
BITMAPINFO bitmapinfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
int screenshot_border_enabled = 0; | |
void enable_screenshot_border(int flag) { | |
screenshot_border_enabled = flag; | |
} | |
static void screenshot_border(int x, int y, int width, int height) { | |
HDC screen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <windows.h> | |
char SHOW_FLAG = 0; | |
void console_show() { | |
AllocConsole(); | |
freopen("CONIN$", "r", stdin); | |
freopen("CONOUT$", "w", stdout); | |
freopen("CONOUT$", "w", stderr); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdarg.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { | |
//escape commas inside string; | |
if (*str == '"' && *(str - 1) != '\\') string = !string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) | |
#include <windows.h> | |
#else | |
#include <unistd.h> | |
#define Sleep(time) sleep(time/1000) | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdarg.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdarg.h> | |
#include <string.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { |