drdaxxy / bink2-libass

Transparently add ASS subtitle support to Windows games using Bink 2
8 stars 3 forks source link

bink 1 #1

Open YouKnow-sys opened 4 years ago

YouKnow-sys commented 4 years ago

hi thanks for your perefect work its possible to use this on bink 1 games?

mirh commented 2 years ago

@dev-zetta had something like this a decade ago, but the never released sources.

drdaxxy commented 2 years ago

Sorry for the late reply. If anyone's still interested:

bink2-libass has at least one bug which makes subtitles too bright. That aside, the included libass version is 6 years old. We fixed that bug in the mod I wrote this code for (and replaced libass with xy-VSFilter). Anyone thinking about using this ought to look through that file's history and port over the changes they need. (Mind the branch - that repository's master is itself outdated)

Anyway, back on topic: This code will not work with Bink 1 as-is.

The way bink2-libass sits in between the game and Bink, its replacement bink2w32.dll file has a list of all Bink 2 functions, and if a single one a game expects to be there is missing, the game will not start. Once the game program starts, bink2-libass tries to load all of those functions so it can redirect the game there if the game needs them, and it chooses to give up if any are missing (since the game would then crash if it tried to use those).

It's trivial to adapt this to some game's Bink 1, you can probably safely take out that check too (I doubt any game's gonna check if binkw32.dll claims to have a function, then use it if it's there, that's not even in the version the game comes with)... if you know some C/C++. (If you do have basic C/C++ skills but don't know how this works, keywords to look up are "proxy DLL", "DLL hijacking", "hooking"... some of the files here might look confusing out of context but it's not a big deal really.)

I don't think anything actually changed between Bink 1 and 2 that would require bigger changes to this library but I couldn't say for sure.

If you're not a programmer, I'm sorry to say you're out of luck because I don't have the time to work on this.

drdaxxy commented 2 years ago

Oops, fat-fingered the close-with-comment button...