diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2021-07-01 17:35:12 +0200 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2021-07-01 17:35:12 +0200 |
commit | 92ed513b57e4c4ccf3a413cad763278e3a8372f7 (patch) | |
tree | 7586f95a74cb483ed170cc54cc0d29208a3ea418 /src/sdl.zig | |
parent | 79d2aec6e835c75962ae49462dab4bea2b122720 (diff) |
we now use points, split up projection rotation, and added an axis
Diffstat (limited to 'src/sdl.zig')
-rw-r--r-- | src/sdl.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sdl.zig b/src/sdl.zig index c7b9906..b84bbfb 100644 --- a/src/sdl.zig +++ b/src/sdl.zig @@ -1,5 +1,6 @@ const std = @import("std"); const sdl = @cImport(@cInclude("SDL2/SDL.h")); +const Point = @import("main.zig").Point; pub const instance = struct { renderer: ?*sdl.SDL_Renderer, @@ -29,8 +30,8 @@ pub fn init() instance { }; } -pub fn draw_line(i: instance, p1: []f32, p2: []f32) void { - _ = sdl.SDL_RenderDrawLineF(i.renderer, p1[0], p1[1], p2[0], p2[1]); +pub fn draw_line(i: instance, p1: Point, p2: Point) void { + _ = sdl.SDL_RenderDrawLineF(i.renderer, p1.x, p1.y, p2.x, p2.y); } pub fn delay(t: u32) void { |