From b4d24e8f2cb4838acc0b827f007e7faa609039ba Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 24 Dec 2025 15:35:21 +0100 Subject: Use build.bat for building Everything is included in main.cpp Do not rely on vcpkg anymore --- include/window.hpp | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'include/window.hpp') diff --git a/include/window.hpp b/include/window.hpp index 33fce4f..2484742 100644 --- a/include/window.hpp +++ b/include/window.hpp @@ -10,7 +10,14 @@ class vkrenderer; #include #elif defined(WINDOWS) -#include +// #include +typedef struct HWND__* HWND; +typedef int64_t LRESULT; +typedef int64_t LPARAM; +typedef uint64_t WPARAM; +typedef unsigned int UINT; +typedef void* LPVOID; +#define CALLBACK __stdcall #endif // enum MODIFIERS: uint32_t { @@ -122,13 +129,28 @@ enum EVENT_TYPES: int32_t { MOUSE_MOVE }; +// struct event { +// uint32_t width; +// uint32_t height; +// KEYS key; +// BUTTONS button; +// int32_t x; +// int32_t y; +// EVENT_TYPES type; +// }; struct event { - uint32_t width; - uint32_t height; - KEYS key; - BUTTONS button; - int32_t x; - int32_t y; + union { + struct { + uint32_t width; + uint32_t height; + } size; + struct { + int32_t x; + int32_t y; + } position; + KEYS key; + BUTTONS button; + } data; EVENT_TYPES type; }; @@ -147,7 +169,7 @@ class window { static LRESULT CALLBACK window_procedure(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam); HWND handle {}; - WNDCLASS window_class {}; + const char* window_class_name; LPVOID main_fiber; LPVOID message_loop_fiber; #elif defined(LINUX) -- cgit v1.3