diff options
| author | Jan-Stefan Janetzky <git@gottz.de> | 2025-07-26 21:08:55 +0200 |
|---|---|---|
| committer | Jan-Stefan Janetzky <git@gottz.de> | 2025-07-26 21:08:55 +0200 |
| commit | b5e3839a70559cc11a06764be2c91eea7b971938 (patch) | |
| tree | 0eb434bdb466c5df613b17243c6afa7d4b88ea63 | |
| parent | 27a99dc2c5c3eb8ffcc228f4372ddb94c35afee9 (diff) | |
another mouse pos fix and removal of delta time print
| -rw-r--r-- | src/main.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
