From 92ed513b57e4c4ccf3a413cad763278e3a8372f7 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Thu, 1 Jul 2021 17:35:12 +0200 Subject: we now use points, split up projection rotation, and added an axis --- src/sdl.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/sdl.zig') 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 { -- cgit v1.2.3