diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-18 14:36:51 +0700 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-18 14:56:49 +0700 |
| commit | 96f80b1a331d5e2e18fec57d8d6c5e0eac22e459 (patch) | |
| tree | a45266a13cc001cb70f860ee0825eeb2dc35f268 /src/main.zig | |
| parent | b1e4fa0d290c3f484054b61f8d2875cae33e099d (diff) | |
| download | blackshades-96f80b1a331d5e2e18fec57d8d6c5e0eac22e459.tar.gz | |
Reorganize textures
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig index 5c4e1c2..e6eea7b 100644 --- a/src/main.zig +++ b/src/main.zig @@ -24,6 +24,11 @@ const gf = @import("gfz"); const gl = @import("zgl"); const legacy = @cImport(@cInclude("Game.h")); +comptime { + // Work around lazy compilation. + @export(@import("misc.zig").loadTexture, .{ .name = "loadTexture" }); +} + var game: *legacy.Game = undefined; fn resizeWindow(window: ?*gf.Window.Impl, @@ -75,7 +80,6 @@ pub fn main() !void { defer context.deinit() catch unreachable; try al.useContext(context); - _ = @import("misc.zig").loadTexture("Font.png"); // work around laziness legacy.initGame(game); defer legacy.closeGame(game); while (!try window.shouldClose()) { |
