feat: major engine overhaul - scene demo with lighting, sphere, ground
- Scene Demo: cube + sphere + ground plane with proper lighting - Audio: XAudio2 dynamic loading + WAV playback - Physics: expanded collision system - Renderer: improved pipeline with materials - UI: extended widget system - VisualScript: enhanced serializer + block interactions - ASM: optimized math/memory/profiling routines - Window: mouse input + scroll support
This commit is contained in:
1 parent
2653926d85
commit
0669d102ce
35 files changed
+1844
-314
No files matched your search
@@ -58,23 +58,23 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(0);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(0, 1);
|
||||
return 0;
|
||||
case WM_RBUTTONDOWN:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(1);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(1, 1);
|
||||
return 0;
|
||||
case WM_MBUTTONDOWN:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(2);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(2, 1);
|
||||
return 0;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(0);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(0, 0);
|
||||
return 0;
|
||||
case WM_RBUTTONUP:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(1);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(1, 0);
|
||||
return 0;
|
||||
case WM_MBUTTONUP:
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(2);
|
||||
if (g_mouse_button_callback) g_mouse_button_callback(2, 0);
|
||||
return 0;
|
||||
|
||||
case WM_DESTROY:
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct Window {
|
||||
typedef void (*WindowKeyCallback)(int key);
|
||||
typedef void (*WindowResizeCallback)(int width, int height);
|
||||
typedef void (*WindowMouseMoveCallback)(int x, int y);
|
||||
typedef void (*WindowMouseButtonCallback)(int button);
|
||||
typedef void (*WindowMouseButtonCallback)(int button, int pressed);
|
||||
|
||||
// 创建/销毁
|
||||
Window* window_create(const char* title, int width, int height, int fullscreen);
|
||||
|
||||
Reference in new issue
Block a user