first commit, on the way to implement window drawing

This commit is contained in:
2026-01-23 19:57:17 +02:00
commit b4913b4764
5 changed files with 32 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build/*
!/build/.gitk

0
build/.gitk Normal file
View File

9
code/.clangd Normal file
View File

@@ -0,0 +1,9 @@
CompileFlags:
Add:
- "--target=x86_64-w64-windows-gnu"
- "-isystem"
- "/usr/lib/zig/libc/include/any-windows-any"
- "-isystem"
- "/usr/lib/zig/libc/include/generic-musl"
- "-D_WIN32"
- "-D_X86_64_"

5
code/Makefile Normal file
View File

@@ -0,0 +1,5 @@
comp:
zig c++ --target=x86_64-windows -o ../build/win32_handmade.exe win32_handmade.cpp
.PHONY: clean
clean:
rm ../build/*

16
code/win32_handmade.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include <windows.h>
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
WNDCLASS WindowClass = {0};
WindowClass.style = ;
WindowClass.lpfnWndProc = ;
// WindowClass.cbClsExtra = ;
// WindowClass.cbWndExtra = ;
WindowClass.hInstance = hInstance;
// WindowClass.hIcon = ;
// WindowClass.hCursor = ;
// WindowClass.lpszMenuName = ;
WindowClass.lpszClassName = "HandmadeHeroWindowClass";
return (0);
}