From 8ea690f252daaa3ae05ef96949e71a0c38642cb9 Mon Sep 17 00:00:00 2001 From: Marto Date: Wed, 15 Apr 2026 23:52:00 +0200 Subject: [PATCH] Version bump --- .gitignore | 1 + build.zig.zon | 4 ++-- src/simulator.zig | 10 ++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 9127dcb..d401abb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.zig-cache/ /zig-out/ /.idea/ +/zig-pkg/ diff --git a/build.zig.zon b/build.zig.zon index d3e53cd..5d9bd23 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -33,8 +33,8 @@ // internet connectivity. .dependencies = .{ .raylib_zig = .{ - .url = "git+https://github.com/raylib-zig/raylib-zig#aa9ee05f2246b813f75206bf817c9fbdfcb06101", - .hash = "raylib_zig-5.6.0-dev-KE8RECFQBQBn0BrEyEyK5NST461oRzpk6XeGeF9qBU2M", + .url = "git+https://github.com/raylib-zig/raylib-zig?ref=devel#4b6a05cd102d51f00523dd5c5e18e628df359d20", + .hash = "raylib_zig-5.6.0-dev-KE8REKNmBQDek2Sz27ULioxYpY9IYR0K0CeIC-iJRLCI", }, }, .paths = .{ diff --git a/src/simulator.zig b/src/simulator.zig index a1d0d11..6e04f20 100644 --- a/src/simulator.zig +++ b/src/simulator.zig @@ -161,7 +161,7 @@ pub const Simulator = struct { rl.drawText(@tagName(self.mode), 10, c.HEIGHT - c.TEXT_SIZE, c.TEXT_SIZE, .black); // displays id of the element we hover over over - const entityInfo = self.getHighlightedEntityInfo() catch |err| { + const entityInfo = self.getHighlightedEntityInfo(&buf) catch |err| { std.debug.panic("Failed to capture highlighted entity info: {}\n", .{err}); }; @@ -248,14 +248,12 @@ pub const Simulator = struct { } /// Get ID info of the highlighted info and returns it - fn getHighlightedEntityInfo(self: *const Simulator) ![:0]const u8 { - var buf: [1024]u8 = undefined; - + fn getHighlightedEntityInfo(self: *const Simulator, buf: *[1024]u8) ![:0]const u8 { if (self.node_man.highlighted_node) |node| - return std.fmt.bufPrintZ(&buf, "Node ID: {d}", .{node.id}); + return std.fmt.bufPrintZ(buf, "Node ID: {d}", .{node.id}); if (self.road_man.highlighted_road) |road| - return std.fmt.bufPrintZ(&buf, "Road ID: {d}", .{road.id}); + return std.fmt.bufPrintZ(buf, "Road ID: {d}", .{road.id}); return ""; }