Add Ogg, Vorbis and Theora as static decoder-only submodules for cutscene videos

This commit is contained in:
shweet committed 2026-11-20 20:56:57 -05:00
1 parent 78a2680134
commit 76c594f9a0
6 files changed
+47 -2

No files matched your search

+12
View File
@@ -14,3 +14,15 @@
path = external/stb path = external/stb
url = https://github.com/nothings/stb.git url = https://github.com/nothings/stb.git
shallow = true shallow = true
[submodule "external/ogg"]
path = external/ogg
url = https://github.com/xiph/ogg.git
shallow = true
[submodule "external/vorbis"]
path = external/vorbis
url = https://github.com/xiph/vorbis.git
shallow = true
[submodule "external/theora"]
path = external/theora
url = https://github.com/xiph/theora.git
shallow = true
+31 -1
View File
@@ -35,6 +35,36 @@ add_library(simdjson STATIC external/simdjson/singleheader/simdjson.cpp)
target_include_directories(simdjson SYSTEM PUBLIC external/simdjson/singleheader) target_include_directories(simdjson SYSTEM PUBLIC external/simdjson/singleheader)
target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0) target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0)
# Xiph's Ogg, Vorbis and Theora for the cutscene videos (.ogv): static, decoders only.
set(INCLUDE_INTTYPES_H 1)
set(INCLUDE_STDINT_H 1)
set(INCLUDE_SYS_TYPES_H 1)
set(SIZE16 int16_t)
set(USIZE16 uint16_t)
set(SIZE32 int32_t)
set(USIZE32 uint32_t)
set(SIZE64 int64_t)
set(USIZE64 uint64_t)
configure_file(external/ogg/include/ogg/config_types.h.in ${CMAKE_BINARY_DIR}/xiph/ogg/config_types.h @ONLY)
add_library(ogg STATIC external/ogg/src/bitwise.c external/ogg/src/framing.c)
target_include_directories(ogg SYSTEM PUBLIC external/ogg/include ${CMAKE_BINARY_DIR}/xiph)
file(GLOB VORBIS_SOURCES CONFIGURE_DEPENDS external/vorbis/lib/*.c)
foreach(TOOL barkmel psytune tone vorbisenc)
list(REMOVE_ITEM VORBIS_SOURCES ${CMAKE_SOURCE_DIR}/external/vorbis/lib/${TOOL}.c)
endforeach()
add_library(vorbis STATIC ${VORBIS_SOURCES})
target_include_directories(vorbis SYSTEM PUBLIC external/vorbis/include PRIVATE external/vorbis/lib)
target_link_libraries(vorbis PUBLIC ogg)
set(THEORA_DECODER apiwrapper bitpack decapiwrapper decinfo decode dequant fragment huffdec idct info internal quant state)
list(TRANSFORM THEORA_DECODER PREPEND external/theora/lib/)
list(TRANSFORM THEORA_DECODER APPEND .c)
add_library(theora STATIC ${THEORA_DECODER})
target_include_directories(theora SYSTEM PUBLIC external/theora/include)
target_link_libraries(theora PUBLIC ogg)
target_compile_options(theora PRIVATE -w)
# 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).
# generated-src/stubs.cpp defines everything not curated yet as a stub that stops the game where it is reached, so the # generated-src/stubs.cpp defines everything not curated yet as a stub that stops the game where it is reached, so the
@@ -43,4 +73,4 @@ file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp)
add_executable(isaac ${SOURCES} generated-src/stubs.cpp) add_executable(isaac ${SOURCES} generated-src/stubs.cpp)
target_include_directories(isaac PRIVATE src) target_include_directories(isaac PRIVATE src)
target_include_directories(isaac SYSTEM PRIVATE generated-src external/stb) target_include_directories(isaac SYSTEM PRIVATE generated-src external/stb)
target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua simdjson) target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua simdjson theora vorbis ogg)
+1 -1
View File
@@ -36,7 +36,7 @@ jdk/ ghidra_12.2_PUBLIC/ Temurin 21 (system java is 8, too old) and Ghidra
The goal is a C++ source tree that builds a native 64-bit Linux game: `git submodule update --init --recursive`, then 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 `cmake -B build && cmake --build build`. SDL3 (window, OpenGL context, input, audio) and Lua 5.3 (mods) are submodules
in `external/`, built statically, with simdjson for data. Online features (Steam, EOS, curl) are offline stubs. The game in `external/`, built statically, with simdjson for data and Xiph's Ogg, Vorbis and Theora (decoders only) for the cutscene videos. Online features (Steam, EOS, curl) are offline stubs. The game
reads JSON, not XML: an import tool in `tools/` converts the player's own install (XML, packed archives) and mods into reads JSON, not XML: an import tool in `tools/` converts the player's own install (XML, packed archives) and mods into
`resources/` (both gitignored). Nothing from the game ships here. `resources/` (both gitignored). 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
Vendored Submodule
+1
Submodule external/ogg added at e1774cd77f.
Vendored Submodule
+1
Submodule external/theora added at 7ffd8b2ecf.
Vendored Submodule
+1
Submodule external/vorbis added at 0657aee69d.