diff options
Diffstat (limited to 'src/level.zig')
| -rw-r--r-- | src/level.zig | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/level.zig b/src/level.zig index a5d7330..dce2a14 100644 --- a/src/level.zig +++ b/src/level.zig @@ -18,26 +18,33 @@ const std = @import("std"); pub const Object = struct { - height : f32, - width : f32, - texture : u8, - pos_x : f32, - pos_y : f32, - pos_z : f32 = 0, + height: f32, + width: f32, + texture: u8, + pos_x: f32, + pos_y: f32, + pos_z: f32 = 0, }; pub const Cell = struct { floor_height: f32 = 0, - ceiling_height : f32 = DEFAULT_HEIGHT, + ceiling_height: f32 = DEFAULT_HEIGHT, draw_down: bool = false, lower_texture: u8 = 0, upper_texture: u8 = 0, floor_texture: u8 = 0, ceiling_texture: u8 = 2, - pub const floor = Cell{ }; + vertices: [][2]f32 = [][2]f32{ + .{ 0, 0 }, + .{ 1, 0 }, + .{ 1, 1 }, + .{ 0, 1 }, + }, - pub const DEFAULT_HEIGHT : f32 = 4; + pub const floor = Cell{}; + + pub const DEFAULT_HEIGHT: f32 = 4; }; pub const Map = struct { |
