mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 03:57:29 +00:00
fix const
This commit is contained in:
parent
37ddb70f93
commit
528bcf29c5
@ -290,6 +290,9 @@ def parse_header(header_name: str, output_file: str, ext_file: str, prefix: str,
|
||||
"DrawTextCodepoints",
|
||||
"LoadUTF8",
|
||||
"TextJoin",
|
||||
"DrawLineStrip",
|
||||
"DrawTriangleFan",
|
||||
"DrawTriangleStrip",
|
||||
"DrawTriangleStrip3D",
|
||||
]
|
||||
|
||||
|
@ -1376,19 +1376,7 @@ pub fn loadMusicStreamFromMemory(fileType: [:0]const u8, data: []const u8) Music
|
||||
return cdef.LoadMusicStreamFromMemory(@as([*c]const u8, @ptrCast(fileType)), @as([*c]const u8, @ptrCast(data)), @as(c_int, @intCast(data.len)));
|
||||
}
|
||||
|
||||
pub fn drawLineStrip(points: []Vector2, color: Color) void {
|
||||
cdef.DrawLineStrip(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleFan(points: []Vector2, color: Color) void {
|
||||
cdef.DrawTriangleFan(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleStrip(points: []Vector2, color: Color) void {
|
||||
cdef.DrawTriangleStrip(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn checkCollisionPointPoly(point: Vector2, points: []Vector2) bool {
|
||||
pub fn checkCollisionPointPoly(point: Vector2, points: []const Vector2) bool {
|
||||
return cdef.CheckCollisionPointPoly(point, @as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)));
|
||||
}
|
||||
|
||||
@ -1412,6 +1400,6 @@ 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 drawTriangleStrip3D(points: []Vector3, color: Color) void {
|
||||
pub fn drawTriangleStrip3D(points: []const Vector3, color: Color) void {
|
||||
cdef.DrawTriangleStrip3D(@as([*c]Vector3, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
@ -1376,19 +1376,7 @@ pub fn loadMusicStreamFromMemory(fileType: [:0]const u8, data: []const u8) Music
|
||||
return cdef.LoadMusicStreamFromMemory(@as([*c]const u8, @ptrCast(fileType)), @as([*c]const u8, @ptrCast(data)), @as(c_int, @intCast(data.len)));
|
||||
}
|
||||
|
||||
pub fn drawLineStrip(points: []Vector2, color: Color) void {
|
||||
cdef.DrawLineStrip(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleFan(points: []Vector2, color: Color) void {
|
||||
cdef.DrawTriangleFan(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleStrip(points: []Vector2, color: Color) void {
|
||||
cdef.DrawTriangleStrip(@as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
pub fn checkCollisionPointPoly(point: Vector2, points: []Vector2) bool {
|
||||
pub fn checkCollisionPointPoly(point: Vector2, points: []const Vector2) bool {
|
||||
return cdef.CheckCollisionPointPoly(point, @as([*c]Vector2, @ptrCast(points)), @as(c_int, @intCast(points.len)));
|
||||
}
|
||||
|
||||
@ -1412,7 +1400,7 @@ 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 drawTriangleStrip3D(points: []Vector3, color: Color) void {
|
||||
pub fn drawTriangleStrip3D(points: []const Vector3, color: Color) void {
|
||||
cdef.DrawTriangleStrip3D(@as([*c]Vector3, @ptrCast(points)), @as(c_int, @intCast(points.len)), color);
|
||||
}
|
||||
|
||||
@ -2192,10 +2180,6 @@ pub fn drawLineEx(startPos: Vector2, endPos: Vector2, thick: f32, color: Color)
|
||||
cdef.DrawLineEx(startPos, endPos, thick, color);
|
||||
}
|
||||
|
||||
pub fn drawLineStrip(points: []const Vector2, pointCount: i32, color: Color) void {
|
||||
cdef.DrawLineStrip(@as([*c]const Vector2, @ptrCast(points)), @as(c_int, pointCount), color);
|
||||
}
|
||||
|
||||
pub fn drawLineBezier(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) void {
|
||||
cdef.DrawLineBezier(startPos, endPos, thick, color);
|
||||
}
|
||||
@ -2296,14 +2280,6 @@ pub fn drawTriangleLines(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) vo
|
||||
cdef.DrawTriangleLines(v1, v2, v3, color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleFan(points: []const Vector2, pointCount: i32, color: Color) void {
|
||||
cdef.DrawTriangleFan(@as([*c]const Vector2, @ptrCast(points)), @as(c_int, pointCount), color);
|
||||
}
|
||||
|
||||
pub fn drawTriangleStrip(points: []const Vector2, pointCount: i32, color: Color) void {
|
||||
cdef.DrawTriangleStrip(@as([*c]const Vector2, @ptrCast(points)), @as(c_int, pointCount), color);
|
||||
}
|
||||
|
||||
pub fn drawPoly(center: Vector2, sides: i32, radius: f32, rotation: f32, color: Color) void {
|
||||
cdef.DrawPoly(center, @as(c_int, sides), radius, rotation, color);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user