Refactor modules architecture
This commit is contained in:
@@ -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
|
||||
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user