aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authortslil clingman <>2021-10-27 15:37:28 -0400
committertslil clingman <>2021-10-27 15:37:28 -0400
commit48dee0817f5fe8c09a085f0150e0c6b4a699ab7c (patch)
treed6ab0a54f2260cb73c79e00ca1489c034f555f09 /src/main.zig
parent486935299e4b7e097754611d9f8dd40003351ae4 (diff)
Update SFML wrapper
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig
index 6a10921..30add69 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -98,14 +98,13 @@ pub fn main() !void {
// Initialise SFML
//--------------------------------------------------------------------------
- var window = try sf.RenderWindow.create(.{ .x = constants.ScreenWidth, .y = constants.ScreenHeight }, 32, "zirc", sf.window.Style.none);
+ var window = try sf.RenderWindow.create(.{ .x = constants.ScreenWidth, .y = constants.ScreenHeight }, 32, "zirc", sf.window.Style.none, null);
defer window.destroy();
window.setFramerateLimit(40);
- // TODO: implement this in the SFML wrapper and make a PR
- sf.c.sfRenderWindow_setMouseCursorGrabbed(window.ptr, 1);
- sf.c.sfRenderWindow_setMouseCursorVisible(window.ptr, 0);
+ window.setMouseCursorGrabbed(true);
+ window.setMouseCursorVisible(false);
// Load the background skybox, really `skycylinder', and assign it to a
// sprite -- it's set to repeating so that it goes on forever. We need to
@@ -207,11 +206,11 @@ pub fn main() !void {
try renderer.renderWorld(
plyr,
- window,
+ &window,
objects_image,
walls_image,
surfaces_image,
- rendered_surfaces_texture,
+ &rendered_surfaces_texture,
rendered_surfaces_sprite,
map,
);