From b5e3839a70559cc11a06764be2c91eea7b971938 Mon Sep 17 00:00:00 2001 From: Jan-Stefan Janetzky Date: Sat, 26 Jul 2025 21:08:55 +0200 Subject: another mouse pos fix and removal of delta time print --- src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index 397fcda..699432a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -622,7 +622,7 @@ const Game = struct { fn process(self: *Game) void { const dt = rl.getFrameTime(); - std.debug.print("Delta time: {d}\n", .{dt}); + // std.debug.print("Delta time: {d}\n", .{dt}); // TODO: find a better method of mutating the original switch (self.screen_state) { @@ -1127,7 +1127,7 @@ const ScreenBattle = struct { .cpu => |cpu| { const texture = game.texture_map.get(.cpu).?; - const msp = rl.getMousePosition().scale(1 / self.camera.zoom); + const msp = getMousePos(&self.camera); const mx: usize = @intFromFloat(msp.x / cell_size); const my: usize = @intFromFloat(msp.y / cell_size); const hovered = mx == x and my == y; -- cgit v1.3.1