Skip to content

Instantly share code, notes, and snippets.

@peteroupc
peteroupc / graf.c
Last active February 10, 2026 14:42
// If this code is in a file named 'graf.c' then:
// To compile: i686-w64-mingw32-gcc -O3 graf.c -lgdi32 -o graf.exe
#include <stdio.h>
#include <windows.h>
#include <tchar.h>
#define APP_NAME _T("Game App")
#define ALLOC(m) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,m)
#define FREE(m) HeapFree(GetProcessHeap(),0,m)