Update to Zig 0.14.0 and raylib 5.6-dev
This commit is contained in:
parent
ae7cb3fa93
commit
1b6a05ca3b
15 changed files with 586 additions and 321 deletions
|
|
@ -1843,6 +1843,7 @@ pub const ShaderLocationIndex = enum(c_int) {
|
|||
vertex_boneids = 26,
|
||||
vertex_boneweights = 27,
|
||||
bone_matrices = 28,
|
||||
shader_loc_vertex_instance_tx
|
||||
};
|
||||
|
||||
pub const ShaderUniformDataType = enum(c_int) {
|
||||
|
|
@ -1975,7 +1976,7 @@ pub const AudioCallback = ?*const fn (?*anyopaque, c_uint) callconv(.C) void;
|
|||
pub const RAYLIB_VERSION_MAJOR = @as(i32, 5);
|
||||
pub const RAYLIB_VERSION_MINOR = @as(i32, 5);
|
||||
pub const RAYLIB_VERSION_PATCH = @as(i32, 0);
|
||||
pub const RAYLIB_VERSION = "5.5";
|
||||
pub const RAYLIB_VERSION = "5.6-devfn alloc(_: *anyopaque, len: usize, _: std.mem.Alignment, _: usize) ?[*]u8 {";
|
||||
|
||||
pub const MAX_TOUCH_POINTS = 10;
|
||||
pub const MAX_MATERIAL_MAPS = 12;
|
||||
|
|
@ -2518,8 +2519,8 @@ pub fn loadUTF8(codepoints: []const c_int) [*:0]u8 {
|
|||
}
|
||||
|
||||
/// Join text strings with delimiter
|
||||
pub fn textJoin(textList: [][*:0]const u8, delimiter: [*:0]const u8) [*:0]const u8 {
|
||||
return std.mem.span(cdef.TextJoin(@as([*c][*c]const u8, @ptrCast(textList)), @as(c_int, @intCast(textList.len)), @as([*c]const u8, @ptrCast(delimiter))));
|
||||
pub fn textJoin(textList: [][*:0]u8, delimiter: [*:0]const u8) [*:0]const u8 {
|
||||
return std.mem.span(cdef.TextJoin(@as([*c][*c]u8, @ptrCast(textList)), @as(c_int, @intCast(textList.len)), @as([*c]const u8, @ptrCast(delimiter))));
|
||||
}
|
||||
|
||||
/// Draw a triangle strip defined by points
|
||||
|
|
@ -2528,24 +2529,34 @@ pub fn drawTriangleStrip3D(points: []const Vector3, color: Color) void {
|
|||
}
|
||||
|
||||
/// Internal memory allocator
|
||||
fn alloc(_: *anyopaque, len: usize, _: u8, _: usize) ?[*]u8 {
|
||||
fn alloc(_: *anyopaque, len: usize, _: std.mem.Alignment, _: usize) ?[*]u8 {
|
||||
std.debug.assert(len > 0);
|
||||
return @ptrCast(cdef.MemAlloc(@intCast(len)));
|
||||
}
|
||||
|
||||
fn resize(_: *anyopaque, buf: []u8, _: u8, new_len: usize, _: usize) bool {
|
||||
fn resize(_: *anyopaque, buf: []u8, _: std.mem.Alignment, new_len: usize, _: usize) bool {
|
||||
return (new_len <= buf.len);
|
||||
}
|
||||
|
||||
/// Internal memory free
|
||||
fn free(_: *anyopaque, buf: []u8, _: u8, _: usize) void {
|
||||
fn free(_: *anyopaque, buf: []u8, _: std.mem.Alignment, _: usize) void {
|
||||
cdef.MemFree(buf.ptr);
|
||||
}
|
||||
|
||||
fn remap(_: *anyopaque, buf: []u8, _: std.mem.Alignment, new_len: usize, _: usize) ?[*]u8 {
|
||||
if (new_len <= buf.len) {
|
||||
return buf.ptr;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const mem_vtable = std.mem.Allocator.VTable{
|
||||
.alloc = alloc,
|
||||
.resize = resize,
|
||||
.free = free,
|
||||
.remap = remap,
|
||||
};
|
||||
|
||||
pub const mem = std.mem.Allocator{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue