all: update to latest Zig APIs (zig fmt)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d95a453e78
commit
4bc32adeb8
61 changed files with 806 additions and 806 deletions
|
|
@ -94,11 +94,11 @@ pub const CompressorParams = struct {
|
|||
}
|
||||
|
||||
pub fn getPackUASTCFlags(self: CompressorParams) PackUASTCFlags {
|
||||
return @bitCast(PackUASTCFlags, b.compressor_params_get_pack_uastc_flags(self.handle));
|
||||
return @as(PackUASTCFlags, @bitCast(b.compressor_params_get_pack_uastc_flags(self.handle)));
|
||||
}
|
||||
|
||||
pub fn setPackUASTCFlags(self: CompressorParams, flags: PackUASTCFlags) void {
|
||||
b.compressor_params_set_pack_uastc_flags(self.handle, @bitCast(u32, flags));
|
||||
b.compressor_params_set_pack_uastc_flags(self.handle, @as(u32, @bitCast(flags)));
|
||||
}
|
||||
|
||||
pub fn setBasisFormat(self: CompressorParams, format: BasisTextureFormat) void {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ pub const Transcoder = struct {
|
|||
handle: *b.BasisFile,
|
||||
|
||||
pub fn init(src: []const u8) error{Unknown}!Transcoder {
|
||||
const h = b.transcoder_init(src.ptr, @intCast(u32, src.len));
|
||||
const h = b.transcoder_init(src.ptr, @as(u32, @intCast(src.len)));
|
||||
return if (!b.transcoder_start_transcoding(h))
|
||||
error.Unknown
|
||||
else
|
||||
|
|
@ -101,11 +101,11 @@ pub const Transcoder = struct {
|
|||
if (!b.transcoder_transcode(
|
||||
self.handle,
|
||||
out_buf.ptr,
|
||||
@intCast(u32, out_buf.len),
|
||||
@as(u32, @intCast(out_buf.len)),
|
||||
image_index,
|
||||
level_index,
|
||||
@intFromEnum(format),
|
||||
@bitCast(u32, params.decode_flags),
|
||||
@as(u32, @bitCast(params.decode_flags)),
|
||||
params.output_row_pitch orelse 0,
|
||||
params.output_rows orelse 0,
|
||||
)) return error.Unknown;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue