90303894ce
build / build (push) Successful in 2m52s
- writeGIF now pads every frame to one shared canvas instead of writing each at its own (possibly storage-cropped) size - GIF disposal rules were showing a previous frame's stale pixels through the uncovered border of a smaller frame, bleeding content between frames in the gallery. - decodeFrames/decodeViewFrames/decodeAnimationFrames now always hand bitmap.DecodeReferenced a zero buffer instead of the previous frame/block's real pixels. The game's actual RSD8 decoder treats a "skip" run as literal zero, with no mechanism to carry a reference frame's pixels forward (confirmed against Night Dive's published source), and hacked's own multi-block Bitmap preview decodes the same way. The previous behavior ghosted a previous frame's stale content into the current frame's skip-run regions, in both the gallery and the AI upscaler's source input. - index.html now shows a labeled per-frame filmstrip next to each animated GIF, and a base-vs-this-build side-by-side comparison for every resource a mod overrides. - Gallery GIFs play back at a third of real speed by default, for easier frame-by-frame review. - modding/mods/*/bitmaps/*.json gains considerPreviousFrames: a per-resource list that runs a temporal-consistency pass (median across the animation's own frames) on independently-upscaled frames to reduce per-frame AI flicker. Applied to 0x7B1 in upscale_medbot. - Drop the rebecca-test example mod.
95 lines
3.8 KiB
Makefile
95 lines
3.8 KiB
Makefile
# Builds the modding subproject - see README.md.
|
|
#
|
|
# Targets:
|
|
# all (default) - `hacked` and `mods`.
|
|
# build-image - builds the hacked-build-image Docker image
|
|
# (./hacked-build-image.sh). Only needed once, or after
|
|
# hacked-build-image/ or hacked/go.mod|go.sum changes.
|
|
# hacked - compiles hacked/ for Linux and Windows via that image,
|
|
# offline. Output lands in dist/.
|
|
# mdlp-image - builds the mdlp-image Docker image (./mdlp-image.sh).
|
|
# Only needed once, or after mdlp-image/ or
|
|
# mdlp/go.mod|go.sum changes.
|
|
# mods - builds every mod under mods/ via that image, offline.
|
|
# Set MODS="name1 name2" to build only those. Output
|
|
# lands in dist/mods/.
|
|
# animgallery_base - browses res/assets/ss_ee/data alone: every animated
|
|
# resource as a looping GIF in build/gallery-base/.
|
|
# animgallery_mods - same, but with every built mod under dist/mods/
|
|
# layered on top (later wins), in build/gallery-mods/ -
|
|
# shows what a mod actually changes without launching
|
|
# the game. Every card for a resource a mod overrides
|
|
# shows the original alongside it for comparison. Run
|
|
# `make mods` first.
|
|
# animgallery_dist - every built mod under dist/mods/ layered on top of
|
|
# the base game, like animgallery_mods, but restricted
|
|
# to only the resources a mod actually overrides, in
|
|
# build/gallery-dist/ - a focused "what did my mods
|
|
# change" view, in the base game's own colors (unlike
|
|
# a mod's own output alone, which has no palette
|
|
# resource and would render in grayscale).
|
|
# Run `make mods` first.
|
|
# (animgallery_base/_mods/_dist all write into this
|
|
# subproject's own build/, not the repo root's.)
|
|
#
|
|
# clean - removes dist/.
|
|
.PHONY: all build-image hacked mdlp-image mods animgallery_base animgallery_mods animgallery_dist clean
|
|
|
|
export MODS
|
|
|
|
all: hacked mods
|
|
|
|
build-image:
|
|
./hacked-build-image.sh
|
|
|
|
# If we're already running inside the hacked-build-image
|
|
# (HACKED_BUILD_IMAGE, set by its Dockerfile), compile directly instead of
|
|
# trying to docker-run it again - e.g. a CI job already using this image as
|
|
# its container. Otherwise, run it via Docker as usual.
|
|
hacked:
|
|
@if [ -n "$$HACKED_BUILD_IMAGE" ]; then \
|
|
bash hacked-build-image/build-hacked.sh; \
|
|
else \
|
|
./hacked-build-run-image.sh; \
|
|
fi
|
|
|
|
mdlp-image:
|
|
./mdlp-image.sh
|
|
|
|
# Same already-in-the-image shortcut as `hacked` above, for MDLP_IMAGE.
|
|
mods:
|
|
@if [ -n "$$MDLP_IMAGE" ]; then \
|
|
bash mdlp-image/process-mods.sh; \
|
|
else \
|
|
./mdlp-run-image.sh; \
|
|
fi
|
|
|
|
animgallery_base:
|
|
./gen_animgallery.sh -data res/assets/ss_ee/data -out modding/build/gallery-base
|
|
|
|
# Layers every built mod's mod/ folder on top of the base assets, later
|
|
# wins - same discovery pattern as res/run-mods.sh.
|
|
animgallery_mods:
|
|
@ARGS="-data res/assets/ss_ee/data"; \
|
|
for d in dist/mods/*/mod; do \
|
|
[ -d "$$d" ] && ARGS="$$ARGS -data modding/$$d"; \
|
|
done; \
|
|
./gen_animgallery.sh $$ARGS -out modding/build/gallery-mods
|
|
|
|
# Same layering as animgallery_mods, but -only-changed restricts the output
|
|
# to resources a mod layer actually overrides.
|
|
animgallery_dist:
|
|
@ARGS="-data res/assets/ss_ee/data"; \
|
|
FOUND=""; \
|
|
for d in dist/mods/*/mod; do \
|
|
[ -d "$$d" ] && ARGS="$$ARGS -data modding/$$d" && FOUND=1; \
|
|
done; \
|
|
if [ -z "$$FOUND" ]; then \
|
|
echo "PREFLIGHT FAIL: no built mods found under dist/mods/ - run 'make mods' first" >&2; \
|
|
exit 1; \
|
|
fi; \
|
|
./gen_animgallery.sh $$ARGS -only-changed -out modding/build/gallery-dist
|
|
|
|
clean:
|
|
rm -rf dist
|