Update Zig demo cart to use wrapper API
@@ -12,27 +12,23 @@ export fn BOOT() void {
}
export fn TIC() void {
- if (tic.btn(0) != 0) {
+ if (tic.btn(0)) {
mascot.y -= 1;
}
- if (tic.btn(1) != 0) {
+ if (tic.btn(1)) {
mascot.y +=1;
}
- if (tic.btn(2) != 0) {
+ if (tic.btn(2)) {
mascot.x -= 1;
}
- if (tic.btn(3) != 0) {
+ if (tic.btn(3)) {
mascot.x += 1;
}
tic.cls(13);
- var trans_color = [_]u8 {14};
- tic.spr(@as(i32, 1+t%60/30*2),mascot.x,mascot.y,&trans_color,1,3,0,0,2,2);
- _ = tic.print("HELLO WORLD!", 84, 84, 15, true, 1, false);
+ tic.spr(@as(i32, 1+t%60/30*2),mascot.x,mascot.y,.{.w=2, .h=2, .transparent=&.{14}, .scale=3});
+ _ = tic.print("HELLO WORLD!", 84, 84, .{});
- // cls(13)
- // spr()
- // print("HELLO WORLD!",84,84)
t += 1;
}
