aboutsummaryrefslogtreecommitdiff
path: root/src/level.zig
diff options
context:
space:
mode:
authortslil clingman <>2021-09-12 21:40:58 -0400
committertslil clingman <>2021-09-12 21:40:58 -0400
commitd89f038b7a5eb42dd48d729d8808747d5cbc182b (patch)
tree2f726aef25edaf1723e62ec99e19c425afa37cdf /src/level.zig
parentb674e201cecf38ae719f76c0d159d8cbf00158ed (diff)
Walk bob and collision detection
Diffstat (limited to 'src/level.zig')
-rw-r--r--src/level.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/level.zig b/src/level.zig
index 610eb7b..1d61a02 100644
--- a/src/level.zig
+++ b/src/level.zig
@@ -62,8 +62,7 @@ pub const Map = struct {
}
pub fn lookup(self: Map, x: i32, y: i32) Cell {
- // live dangerously, no bounds check
- std.debug.assert(x >= 0 and y >= 0); // compiler hint?
+ // std.debug.assert(x >= 0 and y >= 0); // would this work as a compiler hint?
return self.cells.items[@intCast(u32, y) * self.width + @intCast(u32, x)];
}
};