From cb171b7cf80854950efb62ada836da97969411a7 Mon Sep 17 00:00:00 2001 From: Strangedusk Date: Sat, 16 Jul 2022 15:33:02 +0200 Subject: [PATCH] Test SDL Image --- .gitmodules | 2 +- lib/SDL.zig | 2 +- src/Game.zig | 1 - src/MainMenu.zig | 2 +- src/main.zig | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 7fc7afa..92af0ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "lib/SDL.zig"] path = lib/SDL.zig - url = https://github.com/MasterQ32/SDL.zig.git + url = ../SDL.zig diff --git a/lib/SDL.zig b/lib/SDL.zig index 360e5ea..ab6ef00 160000 --- a/lib/SDL.zig +++ b/lib/SDL.zig @@ -1 +1 @@ -Subproject commit 360e5ea16ae911ec30d72ec539c201bcb26ffa73 +Subproject commit ab6ef00008f28f70a2dac89a949ad6685d8405ad diff --git a/src/Game.zig b/src/Game.zig index 9e28277..638e8a5 100644 --- a/src/Game.zig +++ b/src/Game.zig @@ -105,7 +105,6 @@ pub fn tick(self: *Self) State { self.piece.timer_dropped.stop(); self.piece.dropped = true; } - // Repeat Right // DAS diff --git a/src/MainMenu.zig b/src/MainMenu.zig index f087d13..3b39fd6 100644 --- a/src/MainMenu.zig +++ b/src/MainMenu.zig @@ -62,7 +62,7 @@ pub fn tick(self: *Self) State { \\Tab: {s} \\Selection: {s} \\ - , .{tab.*.name, sel.*.name}); + , .{ tab.*.name, sel.*.name }); return self.state; } diff --git a/src/main.zig b/src/main.zig index 7a1cdd6..a9f0372 100644 --- a/src/main.zig +++ b/src/main.zig @@ -36,6 +36,7 @@ pub fn main() !void { var current_state: State = main_menu.state; _ = SDL.SDL_SetRenderDrawBlendMode(renderer, SDL.SDL_BLENDMODE_BLEND); + _ = SDL.IMG_Init(SDL.IMG_INIT_JPG); mainLoop: while (true) { var ev: SDL.SDL_Event = undefined;