diff options
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 { |