tools: fade_quads could not run -- two pre-monorepo paths
`screen-transitions.md` cites `fade_quads.py` as the command behind its decoded fade ramp, and the command had been dead since the monorepo migration: it read regn_decode.py from /work/Syplheed-Reborn and defaulted its pak to /work/sylph_extract, neither of which exists. Resolve the helper beside the script and default the pak under $SYLPHEED_DISC, the way run-canary and sylpheed-cli already do. A cited command that no longer runs is a citation nobody can check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014voBspJ6kFncNErZJuZcLw
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
The screen-transition fade lives here -- see docs/re/screen-transitions.md.
|
||||
Usage: PAK=<pak> fade_quads.py [build...] (default: GP_TITLE, builds 2 4 5 6)"""
|
||||
import struct, sys, glob, os, zlib
|
||||
sys.path.insert(0, "/work/Syplheed-Reborn/tools/re-capture")
|
||||
src = open("/work/Syplheed-Reborn/tools/re-capture/regn_decode.py").read()
|
||||
# The monorepo migration left this pointing at /work/Syplheed-Reborn, a path
|
||||
# that no longer exists -- so the command screen-transitions.md cites as its
|
||||
# evidence could not be re-run. Resolve beside this file instead.
|
||||
_SD = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, _SD)
|
||||
src = open(os.path.join(_SD, "regn_decode.py")).read()
|
||||
exec(src.split("# ── POF0")[0])
|
||||
|
||||
DECL_AT, DECL_ENTRY, KF = 0x20, 60, 40
|
||||
@@ -34,7 +38,10 @@ def parse(bundle):
|
||||
groups[idx]=g; pos=end
|
||||
return names, groups
|
||||
|
||||
pak = os.environ.get("PAK", "/work/sylph_extract/dat/GP_TITLE.pak")
|
||||
# ...and the default pak pointed at /work/sylph_extract, which the disc mount
|
||||
# replaced. $SYLPHEED_DISC is what run-canary and sylpheed-cli both use.
|
||||
pak = os.environ.get("PAK") or os.path.join(
|
||||
os.environ.get("SYLPHEED_DISC", "/disc"), "dat", "GP_TITLE.pak")
|
||||
E = pak_entries(pak)
|
||||
E = [b for h,b in E]
|
||||
# build index -> pak entry index, from `screen list`: 0..9 then 12, 15
|
||||
|
||||
Reference in New Issue
Block a user