wasm shell + destructuring

This commit is contained in:
agra
2026-03-03 13:21:54 +02:00
parent 6c5672c7df
commit 004aff5f67
18 changed files with 219 additions and 32 deletions

View File

@@ -4,7 +4,9 @@ sdl3 :: #library "SDL3";
SDL_INIT_VIDEO :u32: 0x20;
// SDL_WindowFlags
SDL_WINDOW_OPENGL :u64: 0x2;
SDL_WINDOW_OPENGL :u64: 0x2;
SDL_WINDOW_RESIZABLE :u64: 0x20;
SDL_WINDOW_HIGH_PIXEL_DENSITY :u64: 0x2000;
// SDL_GLAttr (enum starting at 0)
SDL_GL_DOUBLEBUFFER :s32: 5;
@@ -332,3 +334,16 @@ SDL_GL_GetProcAddress :: (proc: [:0]u8) -> *void #foreign sdl3;
SDL_PollEvent :: (event: *SDL_Event) -> bool #foreign sdl3;
SDL_GetTicks :: () -> u64 #foreign sdl3;
SDL_Delay :: (ms: u32) -> void #foreign sdl3;
SDL_GetWindowDisplayScale :: (window: *void) -> f32 #foreign sdl3;
SDL_GetWindowSize :: (window: *void, w: *s32, h: *s32) -> bool #foreign sdl3;
SDL_GetWindowSizeInPixels :: (window: *void, w: *s32, h: *s32) -> bool #foreign sdl3;
SDL_Rect :: struct {
x: s32;
y: s32;
w: s32;
h: s32;
}
SDL_GetPrimaryDisplay :: () -> u32 #foreign sdl3;
SDL_GetDisplayUsableBounds :: (display_id: u32, rect: *SDL_Rect) -> bool #foreign sdl3;