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
// gcc -Os -s -municode -nostartfiles -mfpmath=both -march=core2 -e __main -Wl,-gc-sections win.c -o win -luser32 -lkernel32 -lgdi32 -lopengl32 | |
#include <windows.h> | |
#include <stdint.h> | |
#include <gl/gl.h> | |
#include <stdio.h> | |
#include <time.h> | |
typedef struct { | |
GLfloat x, y; | |
} Vector2; |
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
// gcc -Os -s -nostartfiles -nostdlib -e __main -Wl,-gc-sections win.c -o win -luser32 -lkernel32 | |
#define UNICODE | |
#include <windows.h> | |
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); | |
void _main(){ | |
MSG msg = {0}; | |
WNDCLASS wc = {0}; | |
wc.lpfnWndProc = WndProc; |
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
typedef struct node { | |
uint8_t *Elem; | |
uint16_t Size; | |
struct node *Next; | |
} node_t; | |
void Node_Push(node_t **Head, uint8_t *Elem, uint16_t Size){ | |
node_t *Node = malloc(sizeof(node_t)); | |
Node->Elem = Elem; | |
Node->Size = Size; |
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
#define Btrj(x, y, z) asm goto("btr %0, %1\n\t" \ | |
"jnc %l0 \n\t" \ | |
: "+rm"(x) \ | |
: "r"(y) \ | |
: "cc" \ | |
: z) |
NewerOlder