diff --git a/tools/re-capture/fade_quads.py b/tools/re-capture/fade_quads.py index bd642539..b24e0c02 100755 --- a/tools/re-capture/fade_quads.py +++ b/tools/re-capture/fade_quads.py @@ -4,8 +4,12 @@ The screen-transition fade lives here -- see docs/re/screen-transitions.md. Usage: 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