this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

zig sync

nesbox 6dd17049 6a563e83

+12 -4
+6 -2
demos/bunny/wasmmark/src/tic80.zig
··· 133 133 extern fn sfx(id: i32, note: i32, octave: i32, duration: i32, channel: i32, volumeLeft: i32, volumeRight: i32, speed: i32) void; 134 134 extern fn spr(id: i32, x: i32, y: i32, trans_colors: ?[*]const u8, color_count: i32, scale: i32, flip: i32, rotate: i32, w: i32, h: i32) void; 135 135 extern fn sync(mask: i32, bank: i32, tocart: bool) void; 136 - extern fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, u1: f32, v1: f32, u2: f32, v2: f32, u3: f32, v3: f32, texsrc: i32, trans_colors: ?[*]const u8, color_count: i32) void; 136 + extern fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, u1: f32, v1: f32, u2: f32, v2: f32, u3: f32, v3: f32, texsrc: i32, trans_colors: ?[*]const u8, color_count: i32, z1: f32, z2: f32, z3: f32, persp: bool) void; 137 137 extern fn tri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, color: i32) void; 138 138 extern fn trib(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, color: i32) void; 139 139 extern fn time() f32; ··· 263 263 const TextriArgs = struct { 264 264 texsrc : i32 = 0, 265 265 transparent: []const u8 = .{}, 266 + z1 : f32 = 0, 267 + z2 : f32 = 0, 268 + z3 : f32 = 0, 269 + persp : bool = false, 266 270 }; 267 271 268 272 pub fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, @"u1": f32, v1: f32, @"u2": f32, v2: f32, @"u3": f32, v3: f32, args: TextriArgs) void { 269 273 const color_count = @intCast(u8,args.transparent.len); 270 274 const trans_colors = args.transparent.ptr; 271 - raw.ttri(x1, y1, x2, y2, x3, y3, @"u1", v1, @"u2", v2, @"u3", v3, args.texsrc, trans_colors, color_count); 275 + raw.ttri(x1, y1, x2, y2, x3, y3, @"u1", v1, @"u2", v2, @"u3", v3, args.texsrc, trans_colors, color_count, args.z1, args.z2, args.z3, args.persp); 272 276 } 273 277 274 278 // ----
+6 -2
demos/wasm/src/tic80.zig
··· 133 133 extern fn sfx(id: i32, note: i32, octave: i32, duration: i32, channel: i32, volumeLeft: i32, volumeRight: i32, speed: i32) void; 134 134 extern fn spr(id: i32, x: i32, y: i32, trans_colors: ?[*]const u8, color_count: i32, scale: i32, flip: i32, rotate: i32, w: i32, h: i32) void; 135 135 extern fn sync(mask: i32, bank: i32, tocart: bool) void; 136 - extern fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, u1: f32, v1: f32, u2: f32, v2: f32, u3: f32, v3: f32, texsrc: i32, trans_colors: ?[*]const u8, color_count: i32) void; 136 + extern fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, u1: f32, v1: f32, u2: f32, v2: f32, u3: f32, v3: f32, texsrc: i32, trans_colors: ?[*]const u8, color_count: i32, z1: f32, z2: f32, z3: f32, persp: bool) void; 137 137 extern fn tri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, color: i32) void; 138 138 extern fn trib(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, color: i32) void; 139 139 extern fn time() f32; ··· 263 263 const TextriArgs = struct { 264 264 texsrc : i32 = 0, 265 265 transparent: []const u8 = .{}, 266 + z1 : f32 = 0, 267 + z2 : f32 = 0, 268 + z3 : f32 = 0, 269 + persp : bool = false, 266 270 }; 267 271 268 272 pub fn ttri(x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, @"u1": f32, v1: f32, @"u2": f32, v2: f32, @"u3": f32, v3: f32, args: TextriArgs) void { 269 273 const color_count = @intCast(u8,args.transparent.len); 270 274 const trans_colors = args.transparent.ptr; 271 - raw.ttri(x1, y1, x2, y2, x3, y3, @"u1", v1, @"u2", v2, @"u3", v3, args.texsrc, trans_colors, color_count); 275 + raw.ttri(x1, y1, x2, y2, x3, y3, @"u1", v1, @"u2", v2, @"u3", v3, args.texsrc, trans_colors, color_count, args.z1, args.z2, args.z3, args.persp); 272 276 } 273 277 274 278 // ----