Extends the MDL system beyond text overrides: bitmaps/<label>.json names a model/scale and resource list, and mdlp extracts each resource's frames, runs them through an ONNX Runtime CPU upscaler baked into mdlp-image, re-quantizes to the game's palette, and writes the result back - same build-time pipeline as message overrides. Adds animgallery, a standalone viewer that renders any data directory's animated resources as an HTML/GIF gallery with a checkbox-driven MDL JSON generator, and -only-changed to preview just what a mod overrides against the base game. Fixes a real data race in hacked's ChangeNotifier.hashAll() (found via go build -race causing non-deterministic resource counts), via a new numbered patch rather than editing the vendored source. Adds engine-patches/, a general-fixes counterpart to android/engine-patches/ now staged and applied to the desktop builds too (previously unpatched): a real GL_UNPACK_ROW_LENGTH stride bug, an audio error-logging improvement, and two critter-rendering fixes - mod art was losing to the base game's own re-opened resource files, and critters rendered at the wrong size/position once that was fixed, both from how the billboard renderer derives on-screen size and placement straight from bitmap pixel dimensions. Updates README.md and AGENTS.md to document engine-patches/.
This commit is contained in:
@@ -124,7 +124,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# of packages that didn't change.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential cmake make git curl ca-certificates pkg-config gosu \
|
||||
libgl1-mesa-dev libglx-dev libxext-dev libx11-dev libxrandr-dev \
|
||||
patch libgl1-mesa-dev libglx-dev libxext-dev libx11-dev libxrandr-dev \
|
||||
libxi-dev libxfixes-dev libxss-dev libxinerama-dev libxcursor-dev \
|
||||
libogg-dev libvorbis-dev libasound2-dev openssh-client \
|
||||
openjdk-17-jdk-headless unzip mingw-w64 zip \
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
# already has working WIN32/MINGW branches (the upstream Shockolate
|
||||
# project's own build_win64.sh/appveyor.yml build the same way, natively
|
||||
# on Windows via Git Bash/MinGW; this cross-compiles the same branches
|
||||
# fully offline and reproducibly from Linux instead), so no source
|
||||
# patching is needed, unlike the Quest build's android/engine-patches/.
|
||||
# fully offline and reproducibly from Linux instead), so building it needs
|
||||
# no patches of its own beyond engine-patches/ (applied below),
|
||||
# unlike the Quest build's android/engine-patches/.
|
||||
#
|
||||
# Builds from a scratch copy of engine/ (like android/engine-patches/
|
||||
# does for the Quest build) rather than engine/ itself: its BUNDLED
|
||||
@@ -47,6 +48,12 @@ fi
|
||||
rm -rf "$(dirname "$SCRATCH_ENGINE")/.symlink-test-dir"
|
||||
|
||||
cp "${CP_FLAGS[@]}" "$REPO_ROOT/engine" "$SCRATCH_ENGINE"
|
||||
|
||||
echo "== Applying engine-patches/ =="
|
||||
for p in "$REPO_ROOT"/engine-patches/*.patch; do
|
||||
patch -p1 -d "$SCRATCH_ENGINE" < "$p"
|
||||
done
|
||||
|
||||
cd "$SCRATCH_ENGINE"
|
||||
|
||||
# If engine/ has ever been built in-source directly (`make dist`/`make
|
||||
|
||||
@@ -8,16 +8,41 @@
|
||||
# container - see the Makefile's `engine` target, which picks whichever
|
||||
# of these applies).
|
||||
#
|
||||
# Builds from a scratch copy of engine/, patched with engine-patches/
|
||||
# (see that directory and README.md section 4.4) - same reasoning as
|
||||
# build-engine-win.sh's own scratch copy: engine/ itself is never modified in
|
||||
# place (README.md section 1).
|
||||
#
|
||||
# Output lands in engine/.build-output/: the systemshock binary, the
|
||||
# shared libraries it needs at runtime (lib/), and a default MIDI
|
||||
# soundfont - everything the root Makefile needs to assemble dist/.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(pwd)"
|
||||
ENGINE_DIR="$REPO_ROOT/engine"
|
||||
OUT_DIR="$ENGINE_DIR/.build-output"
|
||||
SCRATCH_ENGINE="$REPO_ROOT/build/linux-engine"
|
||||
OUT_DIR="$REPO_ROOT/engine/.build-output"
|
||||
|
||||
cd "$ENGINE_DIR"
|
||||
echo "== Preparing a scratch copy of engine/, patched with engine-patches/ =="
|
||||
rm -rf "$SCRATCH_ENGINE"
|
||||
mkdir -p "$(dirname "$SCRATCH_ENGINE")"
|
||||
cp -a "$REPO_ROOT/engine" "$SCRATCH_ENGINE"
|
||||
|
||||
# A checkout built in place by an older version of this script (before it
|
||||
# staged a scratch copy) can still have build_ext/CMakeCache.txt etc.
|
||||
# sitting in the real engine/ - copied along above, they'd make CMake
|
||||
# refuse to configure this copy ("directory is different than the
|
||||
# directory where CMakeCache.txt was created"). Same cleanup
|
||||
# build-engine-win.sh's own scratch copy does.
|
||||
rm -rf "$SCRATCH_ENGINE"/build_ext "$SCRATCH_ENGINE"/CMakeCache.txt \
|
||||
"$SCRATCH_ENGINE"/CMakeFiles "$SCRATCH_ENGINE"/cmake_install.cmake \
|
||||
"$SCRATCH_ENGINE"/Makefile "$SCRATCH_ENGINE"/systemshock \
|
||||
"$SCRATCH_ENGINE"/src/Libraries/CMakeFiles
|
||||
|
||||
for p in "$REPO_ROOT"/engine-patches/*.patch; do
|
||||
patch -p1 -d "$SCRATCH_ENGINE" < "$p"
|
||||
done
|
||||
|
||||
cd "$SCRATCH_ENGINE"
|
||||
|
||||
echo "== Wiring up prebuilt SDL2/SDL2_mixer/fluidsynth-lite from the image =="
|
||||
rm -rf build_ext
|
||||
|
||||
Reference in New Issue
Block a user