diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2022-12-16 18:38:01 +0100 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2022-12-16 18:38:01 +0100 |
commit | 70ac042b7d69d1e9113fc6835859059040074edb (patch) | |
tree | d64061b2b58b7352d95444f83421bfe5e757d0a7 | |
parent | b31f1d5379c61373f672fc689705acf902ad9cf9 (diff) |
v10
-rw-r--r-- | build.zig | 2 | ||||
-rw-r--r-- | src/main.zig | 22 |
2 files changed, 12 insertions, 12 deletions
@@ -8,7 +8,7 @@ pub fn build(b: *std.build.Builder) void { exe.setTarget(target); exe.setBuildMode(mode); exe.install(); - exe.linkSystemLibrary("SDL2"); + exe.linkSystemLibrary("sdl2"); const run_cmd = exe.run(); run_cmd.step.dependOn(b.getInstallStep()); diff --git a/src/main.zig b/src/main.zig index ffaf130..6801150 100644 --- a/src/main.zig +++ b/src/main.zig @@ -142,19 +142,19 @@ pub fn scale_cube(cube: Cube, scale: f32) Cube { pub fn draw_axis(arena: *ArenaAllocator, instance: sdl.instance) void { var o = center_point( - project_point(arena, Point{ .x = 00, .y = 00, .z = 00 }), + project_point(arena, Point{ .x = 0, .y = 0, .z = 0 }), 250, ); var x = center_point( - project_point(arena, Point{ .x = 50, .y = 00, .z = 00 }), + project_point(arena, Point{ .x = 50, .y = 0, .z = 0 }), 250, ); var y = center_point( - project_point(arena, Point{ .x = 00, .y = 50, .z = 00 }), + project_point(arena, Point{ .x = 0, .y = 50, .z = 0 }), 250, ); var z = center_point( - project_point(arena, Point{ .x = 00, .y = 00, .z = 50 }), + project_point(arena, Point{ .x = 0, .y = 0, .z = 50 }), 250, ); @@ -173,13 +173,13 @@ pub fn main() anyerror!void { const unit_cube = Cube{ .points = [8]Point{ - Point{ .x = 01, .y = 01, .z = 01 }, - Point{ .x = 01, .y = 01, .z = -1 }, - Point{ .x = 01, .y = -1, .z = 01 }, - Point{ .x = 01, .y = -1, .z = -1 }, - Point{ .x = -1, .y = 01, .z = 01 }, - Point{ .x = -1, .y = 01, .z = -1 }, - Point{ .x = -1, .y = -1, .z = 01 }, + Point{ .x = 1, .y = 1, .z = 1 }, + Point{ .x = 1, .y = 1, .z = -1 }, + Point{ .x = 1, .y = -1, .z = 1 }, + Point{ .x = 1, .y = -1, .z = -1 }, + Point{ .x = -1, .y = 1, .z = 1 }, + Point{ .x = -1, .y = 1, .z = -1 }, + Point{ .x = -1, .y = -1, .z = 1 }, Point{ .x = -1, .y = -1, .z = -1 }, }, }; |