Reconstruct lab story, interactions, patrol and jet pack practice flow

This commit is contained in:
UnixNight committed 2026-10-24 20:33:03 -04:00
1 parent 58424120bb
commit c929f942e1
84 files changed
+7957 -305

No files matched your search

+16 -6
View File
@@ -53,11 +53,11 @@ def inside(args):
application = ['/opt/wine-stable/bin/wine', r'Z:\port\GamePort.exe',
'--assets', r'Z:\port\assets', '--scene', r'Z:\port\scenes\level1b\scene.json',
'--level', 'gam/level1b.gam', '--original-camera', '--with-player',
'--frames', '240' if args.port_walk else '6' if args.port_window else '2', '--no-validation',
'--frames', '240' if args.port_walk else '12' if args.port_practice else '6' if args.port_window else '2', '--no-validation',
'--screenshot', r'Z:\work\port-frame.ppm']
application += ['--smoke-walk'] if args.port_walk else ['--inspect', '--time', '0.05']
application += ['--smoke-window'] if args.port_window and not args.port_walk else []
application += [] if args.port_window or args.port_walk else ['--headless']
application += ['--smoke-walk'] if args.port_walk else ['--smoke-practice-window'] if args.port_practice else ['--story', '--story-time', '12'] if args.port_story else ['--inspect', '--time', '0.05']
application += ['--smoke-window'] if args.port_window and not (args.port_walk or args.port_practice) else []
application += [] if args.port_window or args.port_walk or args.port_practice else ['--headless']
if args.asset_probe:
application = ['/opt/wine-stable/bin/wine', r'Z:\probe.exe', args.probe_model]
wine = subprocess.Popen(application, cwd='/work' if args.port_smoke else '/work/game', stdout=wlog, stderr=wlog, env=wine_env)
@@ -97,12 +97,18 @@ def main():
p.add_argument('--port-smoke', action='store_true', help='Preliminary Windows port check under Wine64; not native Windows validation')
p.add_argument('--port-window', action='store_true', help='Windows port SDL window/input/resize/animation smoke under Wine64')
p.add_argument('--port-walk', action='store_true', help='Windows port walking/jump/keyboard/resize checkpoint under Wine64')
p.add_argument('--port-story', action='store_true', help='Windows port original-resource story/camera render under Wine64')
p.add_argument('--port-practice', action='store_true', help='Windows port practice modal/input/resize under Wine64')
p.add_argument('--asset-probe', action='store_true', help='Run compiled read-only OMT shape probe inside isolated copy')
p.add_argument('--probe-model', default=r'ASE\jimstop.ase')
p.add_argument('--probe-executable', type=Path, help='Local probe executable to mount read-only for --asset-probe')
p.add_argument('--output', type=Path)
args = p.parse_args()
args.port_smoke = args.port_smoke or args.port_window or args.port_walk
args.port_smoke = args.port_smoke or args.port_window or args.port_walk or args.port_story or args.port_practice
if args.port_smoke and args.asset_probe: p.error('Select either port smoke or asset probe')
if args.port_story and (args.port_window or args.port_walk or args.port_practice): p.error('Story comparison uses headless fixed time; select one port check')
if args.port_practice and (args.port_walk or args.port_window): p.error('Select one windowed port check')
if args.probe_executable and not args.asset_probe: p.error('--probe-executable requires --asset-probe')
if not 3 <= args.seconds <= 120: p.error('--seconds must be 3..120')
if args.inside: return inside(args)
project = Path(__file__).resolve().parents[2]
@@ -128,7 +134,9 @@ def main():
if args.port_smoke:
cmd += ['--ro-bind', str(project/'dist/win-x64'), '/port']
if args.asset_probe:
cmd += ['--ro-bind', str(project/'artifacts/binary/omt_shape_probe.exe'), '/probe.exe']
probe = (args.probe_executable or project/'artifacts/binary/omt_shape_probe.exe').resolve(strict=True)
if probe.is_relative_to(source.resolve()): p.error('Probe must be a generated executable outside originals')
cmd += ['--ro-bind', str(probe), '/probe.exe']
for key,value in {'HOME':'/work/home', 'WINEPREFIX':'/work/prefix', 'WINEARCH':'win64' if args.port_smoke else 'win32',
'DISPLAY':':89', 'PATH':'/opt/wine-stable/bin:/usr/bin:/bin', 'LANG':'C.UTF-8',
'WINEDEBUG':'-all,err+all,warn+ddraw,warn+d3d,+seh' if args.debug else '-all',
@@ -148,6 +156,8 @@ def main():
if args.port_smoke: cmd += ['--port-smoke']
if args.port_window: cmd += ['--port-window']
if args.port_walk: cmd += ['--port-walk']
if args.port_story: cmd += ['--port-story']
if args.port_practice: cmd += ['--port-practice']
if args.asset_probe: cmd += ['--asset-probe', '--probe-model', args.probe_model]
print('Running isolated Windows port' if args.port_smoke else 'Running copied original', 'with no network and no original-directory mount:', work, flush=True)
subprocess.run(cmd, check=True, timeout=args.seconds + 40)