From 48dee0817f5fe8c09a085f0150e0c6b4a699ab7c Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Wed, 27 Oct 2021 15:37:28 -0400 Subject: Update SFML wrapper --- src/main.zig | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main.zig') 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, ); -- cgit v1.3.1