From 70513b0b15e20a38155f7f3119b1ab3a66452a68 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Sat, 25 Jul 2026 02:03:28 +0200 Subject: [PATCH] Updating core to SDL3. --- .ccls | 3 ++- .gitmodules | 6 +++--- Makefile | 2 +- SDL2_Core | 1 - SDL3_Core | 1 + shell.nix | 6 +++--- src/game.c | 4 +--- 7 files changed, 11 insertions(+), 12 deletions(-) delete mode 160000 SDL2_Core create mode 160000 SDL3_Core diff --git a/.ccls b/.ccls index 421a3a6..b222101 100644 --- a/.ccls +++ b/.ccls @@ -1,9 +1,10 @@ gcc # Headers -Isrc/components/headers --ISDL2_Core/src/headers +-ISDL3_Core/src/headers #-INCurses_Core/src/headers -Iassets/asset_builder/src/headers + # Macros -DASSET_FILE_NAME="$(make print-ASSET_OUTPUT)" -DDEBUG=1 diff --git a/.gitmodules b/.gitmodules index 6897043..76cc0f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "SDL2_Core"] - path = SDL2_Core - url = https://gitea.skadubpc.net/ulysse/2D_Engine_SDL2_Core.git +[submodule "SDL3_Core"] + path = SDL3_Core + url = https://gitea.skadubpc.net/ulysse/2D_Engine_SDL3_Core.git diff --git a/Makefile b/Makefile index ccb5c0f..877e10e 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ all: build_core build_src build_assets # Sub Makefiles SOURCE_DIR = src -CORE_DIR = SDL2_Core/src +CORE_DIR = SDL3_Core/src ASSETS_DIR = assets include $(CORE_DIR)/Makefile diff --git a/SDL2_Core b/SDL2_Core deleted file mode 160000 index 0524f6a..0000000 --- a/SDL2_Core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0524f6ada9e11518a2fbb5db5339ad7af54cbddb diff --git a/SDL3_Core b/SDL3_Core new file mode 160000 index 0000000..54b1590 --- /dev/null +++ b/SDL3_Core @@ -0,0 +1 @@ +Subproject commit 54b15900b26aef396a9283982c60ed5cc31893ad diff --git a/shell.nix b/shell.nix index b90816f..5b890f5 100644 --- a/shell.nix +++ b/shell.nix @@ -10,12 +10,12 @@ stdenv.mkDerivation { ]; buildInputs = [ libpng - SDL2 + sdl3 ncurses ]; shellHook = '' - export LD_LIBRARY_PATH=${pkgs.libpng}/lib:${pkgs.SDL2}/lib:${pkgs.sdl3}/lib:${pkgs.ncurses}/lib:$LD_LIBRARY_PATH - export PKG_CONFIG_PATH=${pkgs.libpng}/lib/pkgconfig:${pkgs.SDL2}/lib/pkgconfig:${pkgs.sdl3}/lib/pkgconfig:${pkgs.ncurses}/lib/pkgconfig:$PKG_CONFIG_PATH + export LD_LIBRARY_PATH=${pkgs.libpng}/lib:${pkgs.sdl3}/lib:${pkgs.ncurses}/lib:$LD_LIBRARY_PATH + export PKG_CONFIG_PATH=${pkgs.libpng}/lib/pkgconfig:${pkgs.sdl3}/lib/pkgconfig:${pkgs.ncurses}/lib/pkgconfig:$PKG_CONFIG_PATH unset TEMP TMP TEMPDIR TMPDIR ''; } diff --git a/src/game.c b/src/game.c index 97aa0ff..53a598a 100644 --- a/src/game.c +++ b/src/game.c @@ -1,13 +1,11 @@ #include "game.h" -#include +#include #include "display.h" #include "asset_manager.h" #include "ecs.h" #include "components.h" -#include - int game_init(void) { game.is_running = false;