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 Marvisak#1053 (xcl-dev/xcl); the code is written anew for VIctory's loader. Assisted-by: Claude Code (Claude Opus 5.5)
On a Linux host, Rust's system ABI passes arguments using SysV. A Windows guest calls wrapped Bink imports using Microsoft's x64 ABI. When the opt-in intro skip is enabled, the wrapper and its forwarded call must agree with the guest about which registers hold the movie handle and the remaining arguments. Declare the Microsoft x64 ABI on the wrappers and the forwarding function pointer. Call a bound wrapper with distinct argument values in the fixture and verify they reach the original function. Tested-on: Fedora Linux 45 x86_64, Mesa 26.2.6 lavapipe, native vkd3d-proton ec20719 Assisted-by: gpt-6.2 sol xhigh Based-on: fxceless/victory-fork#613
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ports C-GDev's opt-in Bink intro skip to the native Linux branch. The original commit retains its author. The follow-up uses Microsoft's x64 calling convention for the wrappers and the original function pointers because the title calls both through its Windows import ABI.
On the PR base, both Bink unit tests passed. The forwarding fixture checks distinct arguments in all three registers after the movie handle. In a separate Wine-free title run with the same wrapper code and
VICTORY_SKIP_BINK=1, the 450-frame non-looping movie was skipped and the title continued to story loading.Based-on: fxceless/victory-fork#613
Tested-on: Fedora Linux 45 x86_64, Mesa 26.2.6 lavapipe, native vkd3d-proton ec20719
Assisted-by: gpt-6.2 sol xhigh