Refactor modules architecture

This commit is contained in:
Riyyi
2026-09-17 22:09:05 +02:00
parent eb495f67c2
commit 22be96ee45
11 changed files with 93 additions and 99 deletions
+25
View File
@@ -0,0 +1,25 @@
package core
import "sindri:base"
import "sindri:platform"
// -----------------------------------------
// Public functions
// Returns the state of the keyboard key
key_state :: proc(key: base.Key) -> base.Action {
return platform.os_key_state(key)
}
// Returns the state of the mouse button
mouse_button_state :: proc(button: base.Mouse_Button) -> base.Action {
return platform.os_mouse_button_state(button)
}
// Returns the position of the mouse cursor
mouse_position :: proc() -> (x_pos: f32, y_pos: f32) {
return platform.os_mouse_position()
}
// -----------------------------------------
// Private functions
-21
View File
@@ -1,21 +0,0 @@
package core
// -----------------------------------------
Settings :: struct {
width: u16,
height: u16,
title: string,
mode: WindowMode,
refresh: u16, // 0 = unlimited
vsync: bool,
// TODO:
// windowed resizable y/n
// exit key (ex: escape)
}
WindowMode :: enum u8 {
Windowed = 0,
Borderless = 1,
Fullscreen = 2,
}