diff options
author | Raymaekers Luca <luca@spacehb.net> | 2025-07-24 11:05:50 +0200 |
---|---|---|
committer | Raymaekers Luca <luca@spacehb.net> | 2025-07-24 11:11:23 +0200 |
commit | e7dc403c36d5958238691578610d442a27ecc943 (patch) | |
tree | 95ad6a7f74acf736c5d423c8742496761dd436e7 /code/handmade_platform.h | |
parent | 4ab197add10847d4ba3036ed525f96db00a9849f (diff) |
checkpoint
Diffstat (limited to 'code/handmade_platform.h')
-rw-r--r-- | code/handmade_platform.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/code/handmade_platform.h b/code/handmade_platform.h index 2eef88b..e241b28 100644 --- a/code/handmade_platform.h +++ b/code/handmade_platform.h @@ -81,6 +81,7 @@ extern "C" { typedef uint64_t u64; typedef size_t memory_index; + typedef s32 rune; typedef float r32; typedef double r64; @@ -141,6 +142,14 @@ extern "C" { s16 *Samples; } game_sound_output_buffer; + typedef struct game_text_button + { + rune Codepoint; + b32 Control; + b32 Shift; + b32 Alt; + } game_text_button; + typedef struct game_button_state { int HalfTransitionCount; @@ -150,6 +159,15 @@ extern "C" { typedef struct game_controller_input { b32 IsConnected; + + struct + { + u32 TextInputCount; + game_text_button TextInputBuffer[64]; + + // TODO(luca): Generate code for keys that are not characters like Return, Backspace, etc. + } Keyboard; + b32 IsAnalog; r32 StickAverageX; r32 StickAverageY; @@ -192,7 +210,7 @@ extern "C" { typedef struct game_input { - game_button_state MouseButtons[5]; + game_button_state MouseButtons[PlatformMouseButton_Count]; s32 MouseX, MouseY, MouseZ; r32 dtForFrame; |