summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 6cbf240..f861b19 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -37,38 +37,43 @@ var game: *c.Game = undefined;
 var prng: DefaultPrng = undefined;
 
 fn resizeWindow(window: gf.Window, width: c_int, height: c_int) void {
+    _ = window;
     c.resizeWindow(game, width, height);
 }
 
 fn handleKey(window: gf.Window, key: gf.Key, scancode: c_int,
              action: gf.KeyAction, mods: gf.Mods) void {
+    _ = window;
+    _ = scancode;
     c.handleKey(game, @enumToInt(key), @enumToInt(action), mods.toInt());
 }
 
 fn look(window: gf.Window, xpos: f64, ypos: f64) void {
+    _ = window;
     c.look(game, xpos, ypos);
 }
 
 fn click(window: gf.Window, button: gf.MouseButton,
          action: gf.MouseButton.Action, mods: gf.Mods) void {
+    _ = window;
     c.click(game, @enumToInt(button), @enumToInt(action), mods.toInt());
 }
 
 /// Return a floating point value evenly distributed in the range [0, 1).
 export fn randFloat() f32 {
-    return prng.random.float(f32);
+    return prng.random().float(f32);
 }
 
 /// Return a random integer i where at_least <= i <= at_most.
 /// The results of this function may be biased.
 export fn randInt(at_least: i32, at_most: i32) i32 {
-    return prng.random.intRangeAtMostBiased(i32, at_least, at_most);
+    return prng.random().intRangeAtMostBiased(i32, at_least, at_most);
 }
 
 /// Return a random integer i where 0 <= i < less_than.
 /// The results of this function may be biased.
 export fn randUint(less_than: u32) u32 {
-    return prng.random.uintLessThanBiased(u32, less_than);
+    return prng.random().uintLessThanBiased(u32, less_than);
 }
 
 pub fn main() !void {