WIP: switch build to SDL 3 (does not compile yet)
This is the first commit of the SDL 1.2 -> SDL 3 migration. It lands
the build-system change and the include-path rewrites; the code does
NOT compile against SDL 3 yet, by design. Stays on this branch until
the migration is finished.
- CMakeLists.txt: find_package(SDL3 CONFIG) + SDL3::SDL3 /
SDL3_image::SDL3_image. Drops the legacy FindSDL machinery.
- glSDL.h, sprite.c, glSDL.c, filters.c, gfxengine.cpp, audio.c:
rewrite #include "SDL*.h" -> <SDL3/...> / <SDL3_image/...>.
Known wall: graphics/glSDL.{c,h} collides with SDL 3's surface API
renames (SDL_FreeSurface, SDL_FillRect, SDL_SetColorKey,
SDL_SetClipRect, SDL_bool). The next phase deletes the entire glSDL
shim and rewrites graphics/ against SDL_Renderer / SDL_Texture.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@
|
||||
#include <math.h>
|
||||
#include "logger.h"
|
||||
#include "glSDL.h"
|
||||
#include "SDL_image.h"
|
||||
#include <SDL3_image/SDL_image.h>
|
||||
#include "sprite.h"
|
||||
#include "filters.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "gfxengine.h"
|
||||
#include "filters.h"
|
||||
#include "SDL_image.h"
|
||||
#include <SDL3_image/SDL_image.h>
|
||||
#include "glSDL.h"
|
||||
#include "sofont.h"
|
||||
#include "window.h"
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#if HAS_SDL_OPENGL_H
|
||||
#include "SDL_opengl.h"
|
||||
#include <SDL3/SDL_opengl.h>
|
||||
#else
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/* We're still using SDL datatypes here - we just add some stuff. */
|
||||
#include "SDL.h"
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
/*
|
||||
* Ignore the flag from SDL w/ glSDL backend, since we're going
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ TODO: tables as needed when loading banks.
|
||||
#include <string.h>
|
||||
#include "logger.h"
|
||||
#include "glSDL.h"
|
||||
#include "SDL_image.h"
|
||||
#include <SDL3_image/SDL_image.h>
|
||||
#include "sprite.h"
|
||||
#include "filters.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user