this repo has no description
0
fork

Configure Feed

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

Update to Zig 0.14.0-dev, run through `$ zig fmt` (#2675)

authored by

Des-Nerger and committed by
GitHub
e62e8922 b6630742

+20 -24
+1 -1
.gitignore
··· 179 179 tic_mruby_build_config.rb.lock 180 180 tic_mruby_wasm_build_config.rb.lock 181 181 build/mruby_vendor-prefix/ 182 - **/zig-cache 182 + **/.zig-cache 183 183 **/zig-out 184 184 .cache 185 185 *~
+1 -1
demos/bunny/wasmmark/README.md
··· 1 1 # Bunnymark in Zig / WASM 2 2 3 - This is a Zig project. To build it you'll need Zig 0.12 or newer. 3 + This is a Zig project. To build it you'll need the latest Zig development release (`0.14.0-dev.1421+f87dd43c1` or newer). 4 4 5 5 ### Building 6 6
+1 -1
demos/bunny/wasmmark/build.zig
··· 5 5 const target = b.resolveTargetQuery(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); 6 6 const exe = b.addExecutable(.{ 7 7 .name = "cart", 8 - .root_source_file = .{ .path = "src/main.zig" }, 8 + .root_source_file = b.path("src/main.zig"), 9 9 .target = target, 10 10 .optimize = optimize, 11 11 });
+4 -4
demos/bunny/wasmmark/src/main.zig
··· 7 7 8 8 const tic = @import("tic80.zig"); 9 9 const std = @import("std"); 10 - const RndGen = std.rand.DefaultPrng; 11 - var rnd: std.rand.Random = undefined; 10 + const RndGen = std.Random.DefaultPrng; 11 + var rnd: std.Random = undefined; 12 12 13 13 const screenWidth = 240; 14 14 const screenHeight = 136; ··· 150 150 } 151 151 } 152 152 153 - // -- Update 153 + // -- Update 154 154 var i: u32 = 0; 155 155 while (i < bunnyCount) { 156 156 bunnies[i].update(); 157 157 i += 1; 158 158 } 159 159 160 - // -- Draw 160 + // -- Draw 161 161 tic.cls(15); 162 162 i = 0; 163 163 while (i < bunnyCount) {
+1 -1
demos/wasm/build.zig
··· 5 5 const target = b.resolveTargetQuery(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); 6 6 const exe = b.addExecutable(.{ 7 7 .name = "cart", 8 - .root_source_file = .{ .path = "src/main.zig" }, 8 + .root_source_file = b.path("src/main.zig"), 9 9 .target = target, 10 10 .optimize = optimize, 11 11 });
+9 -13
demos/wasm/src/main.zig
··· 1 1 const tic = @import("tic80.zig"); 2 2 3 3 const TICGuy = struct { 4 - x : i32 = 96, 5 - y : i32 = 24, 4 + x: i32 = 96, 5 + y: i32 = 24, 6 6 }; 7 7 8 - var t : u16 = 0; 9 - var mascot : TICGuy = .{}; 8 + var t: u16 = 0; 9 + var mascot: TICGuy = .{}; 10 10 11 11 export fn BOOT() void {} 12 12 13 13 export fn TIC() void { 14 - tic.sync(.{ 15 - .sections = .{.tiles = true}, 16 - .bank = 1, 17 - .toCartridge = true 18 - }); 14 + tic.sync(.{ .sections = .{ .tiles = true }, .bank = 1, .toCartridge = true }); 19 15 20 16 if (tic.btn(0)) { 21 17 mascot.y -= 1; 22 18 } 23 19 if (tic.btn(1)) { 24 - mascot.y +=1; 20 + mascot.y += 1; 25 21 } 26 22 if (tic.btn(2)) { 27 23 mascot.x -= 1; ··· 31 27 } 32 28 33 29 tic.cls(13); 34 - tic.spr(@as(i32, 1+t%60/30*2),mascot.x,mascot.y,.{ 30 + tic.spr(@as(i32, 1 + t % 60 / 30 * 2), mascot.x, mascot.y, .{ 35 31 .transparent = &.{14}, 36 32 .scale = 3, 37 33 .w = 2, 38 34 .h = 2, 39 35 }); 40 - _ = tic.print("HELLO WORLD!", 84, 84, .{.fixed = true}); 36 + _ = tic.print("HELLO WORLD!", 84, 84, .{ .fixed = true }); 41 37 42 38 t += 1; 43 39 } 44 40 45 41 export fn BDR() void {} 46 42 47 - export fn OVR() void {} 43 + export fn OVR() void {}
+1 -1
templates/zig/README.md
··· 1 1 # ZIG Starter Project Template 2 2 3 - This is a ZIG / TIC-80 starter template. To build it, ensure you have the latest development release (`0.12.0-dev.2727+fad5e7a99` or newer), then run: 3 + This is a ZIG / TIC-80 starter template. To build it, ensure you have the latest development release (`0.14.0-dev.1421+f87dd43c1` or newer), then run: 4 4 5 5 ``` 6 6 zig build --release=small
+1 -1
templates/zig/build.zig
··· 5 5 const target = b.resolveTargetQuery(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); 6 6 const exe = b.addExecutable(.{ 7 7 .name = "cart", 8 - .root_source_file = .{ .path = "src/main.zig" }, 8 + .root_source_file = b.path("src/main.zig"), 9 9 .target = target, 10 10 .optimize = optimize, 11 11 });
+1 -1
templates/zig/src/main.zig
··· 33 33 34 34 export fn BDR() void {} 35 35 36 - export fn OVR() void {} 36 + export fn OVR() void {}