Updating core to SDL3.

This commit is contained in:
Ulysse Cura 2026-07-25 02:03:28 +02:00
parent d1bbf0050e
commit 70513b0b15
7 changed files with 11 additions and 12 deletions

3
.ccls
View File

@ -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

6
.gitmodules vendored
View File

@ -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

View File

@ -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

@ -1 +0,0 @@
Subproject commit 0524f6ada9e11518a2fbb5db5339ad7af54cbddb

1
SDL3_Core Submodule

@ -0,0 +1 @@
Subproject commit 54b15900b26aef396a9283982c60ed5cc31893ad

View File

@ -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
'';
}

View File

@ -1,13 +1,11 @@
#include "game.h"
#include <time.h>
#include <stdlib.h>
#include "display.h"
#include "asset_manager.h"
#include "ecs.h"
#include "components.h"
#include <SDL2/SDL_timer.h>
int game_init(void)
{
game.is_running = false;