summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig2
-rw-r--r--src/main.zig22
2 files changed, 12 insertions, 12 deletions
diff --git a/build.zig b/build.zig
index bbd4531..428903c 100644
--- a/build.zig
+++ b/build.zig
@@ -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 },
},
};