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:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stages a scratch, patched copy of src/hacked/ at the given destination -
|
||||
# shared by process-mods.sh (mdlp) and ../gen_animgallery.sh (animgallery),
|
||||
# both of which build against hacked's source directly (via their own
|
||||
# go.mod's `replace ../hacked`) and so both need the same patches applied
|
||||
# that hacked-build-image/build-hacked.sh already applies for hacked's own
|
||||
# binary. src/hacked/ is never built or patched in place.
|
||||
#
|
||||
# Usage: stage-hacked.sh <modding-root> <dest-dir-for-hacked>
|
||||
set -euo pipefail
|
||||
|
||||
MODDING_ROOT="$1"
|
||||
DEST="$2"
|
||||
|
||||
rm -rf "$DEST"
|
||||
mkdir -p "$(dirname "$DEST")"
|
||||
cp -a "$MODDING_ROOT/src/hacked" "$DEST"
|
||||
for p in "$MODDING_ROOT"/src/hacked-patches/*.patch; do
|
||||
patch -p1 -d "$DEST" < "$p"
|
||||
done
|
||||
Reference in New Issue
Block a user