From b4913b47648496d933a1768a4ec188a662e01ebe Mon Sep 17 00:00:00 2001 From: dxrkness Date: Fri, 23 Jan 2026 19:57:17 +0200 Subject: [PATCH] first commit, on the way to implement window drawing --- .gitignore | 2 ++ build/.gitk | 0 code/.clangd | 9 +++++++++ code/Makefile | 5 +++++ code/win32_handmade.cpp | 16 ++++++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100644 build/.gitk create mode 100644 code/.clangd create mode 100644 code/Makefile create mode 100644 code/win32_handmade.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb6954e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/build/* +!/build/.gitk diff --git a/build/.gitk b/build/.gitk new file mode 100644 index 0000000..e69de29 diff --git a/code/.clangd b/code/.clangd new file mode 100644 index 0000000..72bdecc --- /dev/null +++ b/code/.clangd @@ -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_" diff --git a/code/Makefile b/code/Makefile new file mode 100644 index 0000000..a4e10df --- /dev/null +++ b/code/Makefile @@ -0,0 +1,5 @@ +comp: + zig c++ --target=x86_64-windows -o ../build/win32_handmade.exe win32_handmade.cpp +.PHONY: clean +clean: + rm ../build/* diff --git a/code/win32_handmade.cpp b/code/win32_handmade.cpp new file mode 100644 index 0000000..548b05a --- /dev/null +++ b/code/win32_handmade.cpp @@ -0,0 +1,16 @@ +#include + +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); +}