mirror of
https://github.com/HeyPuter/gex.git
synced 2026-11-13 18:34:21 -10:00
Merge p/demo-1013 (aa4bedfc) into x/drag-move
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_ea9f71488b6e448da93d6c2dabf4879c
This commit is contained in:
commit
a43586c90e
3 files changed
+23
-6
No files matched your search
@@ -14,8 +14,12 @@
|
||||
# run on tier-1, and the number would mean nothing.
|
||||
#
|
||||
# The frozen inputs, in NOITA_LEG_DIR (default ~/gex-sandbox/scratch/W/gate-noitapage):
|
||||
# base/ a W3 page tree (W's tree C, 2026-10-10: web/public/gex/nt/w3d.tar,
|
||||
# Mesa, node_modules), never written in place, plus
|
||||
# base/ a W3 page tree (W's tree C, 2026-10-10: Mesa, node_modules), never
|
||||
# written in place, with web/public/gex/nt/w3d.tar, the W3 dist: tree
|
||||
# C's, with the PE skeletons, winepe.wasm and wine{,.wasm} rebuilt from
|
||||
# a wine-w3 commit and wine linked against a gex tree's gexgl.c
|
||||
# (base/README.base gives the commits and the recipe; for gexgl alone,
|
||||
# scratch/W/gate-noitapage/w3d-gexgl.sh), plus
|
||||
# web/public/gex/nt/noita.tar: the W3 prefix at /pfx with
|
||||
# port/seedpin's mod_config.xml in its save, xkb data, and the game at
|
||||
# /g with mods/seedpin (NOITA_WORLD_SEED 1767225600), made by
|
||||
|
||||
@@ -39,6 +39,9 @@ const WORLD = 0x122374c;
|
||||
const IMAGE = 0x400000;
|
||||
// Minutes from the page's start to the world, at most (tier-1 or a hang).
|
||||
const worldBy = Number(process.env.NOITA_WORLD_BY_MIN || 12) * 60000;
|
||||
// Whether TREE's compositor hit-tests by input region (545564cb): the
|
||||
// click offset above depends on it.
|
||||
const inputRegions = readFileSync(`${tree}/web/src/compositor-worker.js`, 'utf8').includes('#takesInput');
|
||||
|
||||
// noita.exe's PE signature and file header (24 bytes at e_lfanew: machine,
|
||||
// sections, link time stamp...), as mapped at its base.
|
||||
@@ -141,10 +144,12 @@ for (;;) {
|
||||
// area is a GL subsurface there, which the page compositor hands the
|
||||
// pointer to with subsurface-local coordinates (it ignores the empty
|
||||
// input region Wine gives it), and Wine reads those as relative to the
|
||||
// whole window: so the point is offset by the frame once more. When
|
||||
// the compositor honours input regions, drop the second (3,29).
|
||||
// whole window: so the point is offset by the frame once more. A
|
||||
// compositor that honours input regions (545564cb, `#takesInput`)
|
||||
// gives the window the pointer in its own coordinates: one (3,29).
|
||||
const st = steps.shift();
|
||||
const x = w.x + 3 + 3 + st.x, y = w.y + 29 + 29 + st.y;
|
||||
const [fx, fy] = inputRegions ? [3, 29] : [6, 58];
|
||||
const x = w.x + fx + st.x, y = w.y + fy + st.y;
|
||||
console.log(`${secs()} s, frame ${n}: ${st.what} at ${x},${y} (window ${w.w}x${w.h}@${w.x},${w.y})`);
|
||||
await click(x, y);
|
||||
await grab(`step-${3 - steps.length}`);
|
||||
|
||||
+9
-1
@@ -254,13 +254,21 @@ cp "$PUB/rootfs/base.tar.zst" "$STAGE/rootfs/"
|
||||
# Mesa (the host's GL, gex_wgpu), fetched only when a GL program starts.
|
||||
if [ -f "$PUB/gex/gex-wgpu-replay.wasm" ]; then
|
||||
cp "$PUB/gex/gex-wgpu-replay.js" "$PUB/gex/gex-wgpu-replay.wasm" "$STAGE/gex/"
|
||||
# And its cold part, when the build split it (web/mesa-split.py). Plain,
|
||||
# not .zst: a miss before the prefetch has landed loads it with a
|
||||
# synchronous XHR (web/gex-wgpu-split.js), which zfetch.js cannot decode,
|
||||
# and without the file the static server answers index.html -- every GL
|
||||
# client then failed its first cold call and never drew a frame.
|
||||
if [ -f "$PUB/gex/gex-wgpu-replay.deferred.wasm" ]; then
|
||||
wasm-tools strip "$PUB/gex/gex-wgpu-replay.deferred.wasm" -o "$STAGE/gex/gex-wgpu-replay.deferred.wasm"
|
||||
fi
|
||||
else
|
||||
echo " no web/public/gex/gex-wgpu-replay.wasm (web/build-all.sh --mp --gl-only): GL items will not draw" >&2
|
||||
fi
|
||||
[ -d "$PUB/pkgs" ] && cp -r "$PUB/pkgs" "$STAGE/"
|
||||
[ -d "$PUB/gex-apt" ] && cp -r "$PUB/gex-apt" "$STAGE/"
|
||||
before=0 stripped=0 packed=0
|
||||
for w in $(find "$STAGE/gex" -name '*.wasm' -not -path '*/cgen/*'); do
|
||||
for w in $(find "$STAGE/gex" -name '*.wasm' -not -path '*/cgen/*' -not -name '*.deferred.wasm'); do
|
||||
b=$(size "$w"); before=$((before + b))
|
||||
case ${w##*/} in
|
||||
seed*.wasm) wasm-tools strip -d '^\.debug' "$w" -o "$w.s" ;; # keeps gex.* and name
|
||||
|
||||
Reference in new issue
Block a user