external/: SDL3 (release-3.4.20) and Lua 5.3.6 as static submodules, wired into CMake

SDL3 replaces GLFW, Win32 and OpenAL (window, OpenGL context, input, gamepads, audio), trimmed to those pieces as in
smack-a-brother. Lua 5.3 keeps the mod API. Online features become offline stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-19 21:14:59 -05:00
1 parent 832ea0297b
commit 199c3d3d2b
5 files changed
+41 -2

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
[submodule "external/sdl"]
path = external/sdl
url = https://github.com/libsdl-org/SDL.git
shallow = true
[submodule "external/lua"]
path = external/lua
url = https://github.com/lua/lua.git
shallow = true
+27 -1
View File
@@ -1,13 +1,39 @@
cmake_minimum_required(VERSION 3.24) cmake_minimum_required(VERSION 3.24)
project(isaac LANGUAGES CXX) project(isaac LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_BUILD_TYPE Release)
endif()
# SDL: static, with only the window, OpenGL context, audio, events and gamepad pieces the game uses.
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
set(SDL_STATIC ON CACHE BOOL "" FORCE)
set(SDL_OPENGL ON CACHE BOOL "" FORCE)
set(SDL_JOYSTICK ON CACHE BOOL "" FORCE)
set(SDL_HIDAPI ON CACHE BOOL "" FORCE)
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
set(SDL_EXAMPLES OFF CACHE BOOL "" FORCE)
foreach(OPTION RENDER GPU VULKAN CAMERA HAPTIC HIDAPI_LIBUSB POWER SENSOR DIALOG TRAY OPENGLES OFFSCREEN
DUMMYVIDEO DISKAUDIO DUMMYAUDIO OSS JACK SNDIO KMSDRM IBUS LIBURING)
set(SDL_${OPTION} OFF CACHE BOOL "" FORCE)
endforeach()
add_subdirectory(external/sdl EXCLUDE_FROM_ALL)
# Lua 5.3, which mods are written against: static, POSIX, no native modules.
file(GLOB LUA_SOURCES CONFIGURE_DEPENDS external/lua/l*.c)
list(REMOVE_ITEM LUA_SOURCES ${CMAKE_SOURCE_DIR}/external/lua/lua.c ${CMAKE_SOURCE_DIR}/external/lua/ltests.c)
add_library(lua STATIC ${LUA_SOURCES})
target_include_directories(lua SYSTEM PUBLIC external/lua)
target_compile_definitions(lua PRIVATE LUA_USE_POSIX)
# The curated game: src/*.cpp, written on top of the declarations generated-src/classes.h holds for every class. # The curated game: src/*.cpp, written on top of the declarations generated-src/classes.h holds for every class.
# generated-src/'s own bodies stay out until they compile (scripts/source_tree.py --check reports how many do). # generated-src/'s own bodies stay out until they compile (scripts/source_tree.py --check reports how many do).
file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp) file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp)
add_library(isaac STATIC ${SOURCES}) add_library(isaac STATIC ${SOURCES})
target_include_directories(isaac PRIVATE src) target_include_directories(isaac PRIVATE src)
target_include_directories(isaac SYSTEM PRIVATE generated-src) target_include_directories(isaac SYSTEM PRIVATE generated-src)
target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua)
+4 -1
View File
@@ -34,7 +34,10 @@ jdk/ ghidra_12.2_PUBLIC/ Temurin 21 (system java is 8, too old) and Ghidra
## Reconstruction ## Reconstruction
The goal is a C++ source tree that builds a native 64-bit Linux game: `cmake -B build && cmake --build build`. The goal is a C++ source tree that builds a native 64-bit Linux game: `git submodule update --init --recursive`, then
`cmake -B build && cmake --build build`. SDL3 (window, OpenGL context, input, audio) and Lua 5.3 (mods) are submodules
in `external/`, built statically. Online features (Steam, EOS, curl) are offline stubs. The game's resources are read
from the player's own install at runtime; nothing from the game ships here.
`generated-src/` is the whole decompiled game as C++, regenerated every build and never edited. `src/` is the readable `generated-src/` is the whole decompiled game as C++, regenerated every build and never edited. `src/` is the readable
game, written by hand on top of it one function at a time: game, written by hand on top of it one function at a time:
Vendored Submodule
+1
Submodule external/lua added at 75ea9ccbea.
Vendored Submodule
+1
Submodule external/sdl added at f00dc919ca.