From d6f276be6bc1214c88cfc5346ceb7a5bea610638 Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Wed, 14 Jan 2026 19:21:33 -0500 Subject: i HATE physics bugs (i haven't fixed them yet) --- src/input.odin | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/input.odin') diff --git a/src/input.odin b/src/input.odin index 475be92..0b1d56e 100644 --- a/src/input.odin +++ b/src/input.odin @@ -18,6 +18,7 @@ actions: struct { move_right: Keybind, jump: Keybind, dash: Keybind, + shoot: Keybind, } init_keybinds :: proc() { @@ -25,6 +26,7 @@ init_keybinds :: proc() { actions.move_right.input = .D actions.jump.input = .SPACE actions.dash.input = .LEFT_SHIFT + actions.shoot.input = rl.MouseButton.LEFT } is_keybind_down :: proc(keybind: Keybind) -> bool { @@ -50,3 +52,10 @@ is_keybind_just_down :: proc(keybind: Keybind) -> bool { assert(false) return false } + +get_mouse_pos :: proc() -> (mouse_pos: Vec2) { + mouse_pos = Vec2{f32(rl.GetMouseX()), f32(rl.GetMouseY())} + mouse_pos /= Vec2{f32(rl.GetScreenWidth()), f32(rl.GetScreenHeight())} + mouse_pos *= SCREEN_SIZE + return +} -- cgit v1.3-2-g0d8e