diff options
m--------- | lib/gfz | 0 | ||||
-rw-r--r-- | src/main.zig | 17 |
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/gfz b/lib/gfz -Subproject bac6c9042375f2a09d6505cc8dda20166c1a152 +Subproject 3e6d3467bec4c5850b3b1f5c555ca88e5dcf201 diff --git a/src/main.zig b/src/main.zig index 11775ec..57ac609 100644 --- a/src/main.zig +++ b/src/main.zig @@ -22,6 +22,7 @@ pub const c = @cImport({ }); const Loca = @import("loca").Loca; +const Window = gf.Window; const al = @import("zeal"); const allocator = std.heap.c_allocator; const configuration = @import("config.zig"); @@ -33,22 +34,20 @@ const std = @import("std"); var game: *c.Game = undefined; -fn resizeWindow(window: ?*gf.Window.Impl, - width: c_int, height: c_int) callconv(.C) void { +fn resizeWindow(window: Window, width: c_int, height: c_int) void { c.resizeWindow(game, width, height); } -fn handleKey(window: ?*gf.Window.Impl, key: c_int, scancode: c_int, - action: c_int, mods: c_int) callconv(.C) void { +fn handleKey(window: Window, key: c_int, scancode: c_int, + action: c_int, mods: c_int) void { c.handleKey(game, key, action, mods); } -fn look(window: ?*gf.Window.Impl, xpos: f64, ypos: f64) callconv(.C) void { +fn look(window: Window, xpos: f64, ypos: f64) void { c.look(game, xpos, ypos); } -fn click(window: ?*gf.Window.Impl, button: c_int, - action: c_int, mods: c_int) callconv(.C) void { +fn click(window: Window, button: c_int, action: c_int, mods: c_int) void { c.click(game, button, action, mods); } @@ -60,8 +59,8 @@ pub fn main() !void { try gf.init(); defer gf.deinit() catch unreachable; - const window = try gf.Window.create(config.width, config.height, - "Black Shades", .{}, .{}); + const window = try Window.create(config.width, config.height, + "Black Shades", .{}, .{}); try window.makeCurrent(); game = c.makeGame(@bitCast(c.Config, config)).?; |