Repository navigation
Conversation
VICTORY_SKIP_BINK=1 skips the movies that play once (the intro); VICTORY_SKIP_BINK=all also the looping ones. Unset, nothing changes. The title's own Bink DLL still opens each movie. The exports a player loop calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame, BinkGoto, BinkShouldSkip, BinkClose) are bound to wrappers; on the first of these calls for a movie that is skipped, the movie is put on its last frame, and from then on nothing is decoded, so the title's own end-of-movie check ends it at once. Whether a movie loops is read from its open flags at that first call, after any BinkSetWillLoop. In a run of the title with VICTORY_SKIP_BINK=1, the one movie it opened (3840x2160, 450 frames, not looping) was skipped. The idea comes from XCL PR fxceless#1053 (xcl-dev/xcl); the code is written anew for VIctory's loader. Assisted-by: Claude Code (Claude Opus 5.5)
|
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head AI-assisted (Claude Code); no game data. |
Adds an opt-in switch that skips the title's Bink movies (the startup intro). Unset, nothing changes.
VICTORY_SKIP_BINK=1: skips movies that play once (logos, intro)VICTORY_SKIP_BINK=all: skips looping ones too (menu backgrounds stay dark)Idea from XCL's merged PR xcl-dev/xcl#1053 (its
XCL_SKIP_BINKpart only). XCL is GPL-2.0-only, so no code is taken from it; this is written anew for VIctory's loader.How
The title's own
Bink2Scarlett.dllstill loads and opens every movie. When the switch is on, the title's imports of the exports a player loop calls on an open movie (BinkWait,BinkShouldSkip,BinkDoFrame,BinkDoFrameAsync[Multi|Wait],BinkNextFrame,BinkGoto,BinkClose) are bound to wrappers (SkipMovies, a resolver aroundWithTitleDlls). On the first such call for a movie, its looping flag is read (so aBinkSetWillLoopafter opening counts). If the movie is skipped, it is put on its last frame and nothing more is decoded, so the title's own end-of-movie check ends it at once. Other movies and every other export go straight to the DLL. The wrappers pass all four argument registers through unchanged, so they don't depend on each export's exact signature.What is in it
crates/victory-hle/src/bink.rs: the wrappers, the resolver, and two unit tests (mode parsing; a fake Bink DLL: a one-shot movie is skipped and the DLL is not called, a looping one plays,allskips it, close reaches the DLL)apps/victory/src/run.rs:SkipMoviesaround the title resolver, for imports bound at start and for DLLs the title loads later (+2 lines)README.md: the switchTested
Windows 11 (26200), AMD RX 9070 XT (driver 32.0.32029.2010), Intel Core Ultra 5 250K Plus, Rust 1.98.1, release build of this branch (
75fe122), Series X profile.cargo test --workspace: 507 passed, 0 failed, 8 ignoredcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: cleancargo clippy --workspace --all-targets --locked -- -D warnings: fails onplaced_filler_twins(dead code invictory-gpu/src/resource.rs), which is already onmainand is whymain's CI is red. Not touched here.VICTORY_SKIP_BINK=1: the intro is skipped (watched on screen). The log shows the one movie opened in the run being skipped. Its fields read back sensibly, which checks the struct layout:Bink movie width=3840 height=2160 frames=450 looping=false skip=trueamdxc64.dll+0x861b9f), so that crash is onmainwith this GPU and not from this change.Not tested
VICTORY_SKIP_BINK=all: the run reached no looping movieGetProcAddress(this title imports them statically, so they aren't wrapped)AI use
Claude Code with Claude Opus 5.5 wrote the code, the tests and this description and ran the checks above. I watched the in-game run.