From 4633aed567c3c6fac9bcad540374ad37c72c36e2 Mon Sep 17 00:00:00 2001 From: catangent Date: Mon, 23 Dec 2024 18:49:37 +0000 Subject: [PATCH] refactor: replace c types with zig types --- src/world/chunk.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world/chunk.zig b/src/world/chunk.zig index 560b124..333f9c1 100644 --- a/src/world/chunk.zig +++ b/src/world/chunk.zig @@ -162,9 +162,9 @@ pub const Chunk = struct { } } - const triangle_count: c_int = @intCast(raw_quads.items.len * 2); + const triangle_count: i32 = @as(i32, @intCast(raw_quads.items.len)) * 2; - const arr_size: c_uint = @as(c_uint, @intCast(triangle_count)) * 3 * @sizeOf(f32); + const arr_size: u32 = @as(u32, @intCast(triangle_count)) * 3 * @sizeOf(f32); const vertices: [*]f32 = @ptrCast(@alignCast(raylib.MemAlloc(arr_size * 3))); const texcoords: [*]f32 = @ptrCast(@alignCast(raylib.MemAlloc(arr_size * 2)));