Join also our Discord channel! Click here.

Help with .bik video subtitle display hook tools

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times

Help with .bik video subtitle display hook tools

Post by stevenx » Sat Mar 07, 2009 2:57 pm

Many game use .bik format to show the video .
Can anyone make a hook tools to show subtitle in a none subtitle .bik video?

for details, if the game play a special .bik video ,the hook tool will show a special unicode subtitle on current window,the time_start,time_end,font_size,font_color,position_x,position_y can be set in source or in a ini file.

Please help me,very thanks. And my friend have made one,but not finished.If you want to take a look,i will post here. It used the way of proxy dll.

Crypton
advanced
Posts: 60
Joined: Sat Aug 09, 2008 11:19 am
Has thanked: 2 times
Been thanked: 21 times

Re: Help with .bik video subtitle display hook tools

Post by Crypton » Sun Mar 08, 2009 12:30 pm

Yep, its possible, and I think that I can do it :P I have unofficial bink sdk, made by some guy, so I can make a app that will load and play bink videos with subtitles... but you probably want hook for bink dll, I know how to hook too, but I dont think that it will be legalish to release that hook package (injector + hook dll)...

stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times

Re: Help with .bik video subtitle display hook tools

Post by stevenx » Sun Mar 08, 2009 2:54 pm

Crypton wrote:Yep, its possible, and I think that I can do it :P I have unofficial bink sdk, made by some guy, so I can make a app that will load and play bink videos with subtitles... but you probably want hook for bink dll, I know how to hook too, but I dont think that it will be legalish to release that hook package (injector + hook dll)...
so what help can you give me?
Can you give the unofficial bink sdk or the hook dll to me by mail instead of post here?
my mail so750515@yahoo.co.jp
Very thanks!

Crypton
advanced
Posts: 60
Joined: Sat Aug 09, 2008 11:19 am
Has thanked: 2 times
Been thanked: 21 times

Re: Help with .bik video subtitle display hook tools

Post by Crypton » Sun Mar 08, 2009 4:03 pm

Ehm :D I always recommend to use google for searching "this kind" of stuff :P
Anyway, if you want to hook bunk.dll, then sdk is useless for you, because you need to hook only one function -> BinkCopyToBuffer. This function has about 6 parameters, but you need only one for your purpose and its pointer to buffer where bink frame will be decompressed, and its second parameter:

Code: Select all

BinkCopyToBuffer(Bink:Pointer; OutBuffer:Pointer; ScanlineSize: DWORD; Height: DWORD; XOffset:DWORD; YOffset:DWORD; SurfaceFlag: DWORD);
To get size of output buffer, you need to multiply ScanlineSize and Height:
OutBufferSize:= ScanlineSize * Height;

-------------------------------------------------------------------
And my friend have made one,but not finished.If you want to take a look,i will post here. It used the way of proxy dll.
Well, if its not finished, what about releasing source codes ? Maybe somebody (or I) will finish it :P

Edit: I see you also asked on alugi forums :D

stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times

Re: Help with .bik video subtitle display hook tools

Post by stevenx » Sun Mar 08, 2009 10:59 pm

very thanks for useful information!

clauddiu
ultra-n00b
Posts: 7
Joined: Wed Aug 25, 2010 6:45 pm
Has thanked: 2 times
Been thanked: 3 times

Re: Help with .bik video subtitle display hook tools

Post by clauddiu » Fri Dec 24, 2010 9:10 pm

The BinkCopyToBuffer params are:

C++

Code: Select all

// The basic type S32 describes a signed 32-bit integer.
// The basic type U32 describes an unsigned 32-bit integer.

S32 BinkCopyToBuffer(
  HBINK bink,
  VOID_PTR dest_addr,
  S32 dest_pitch,
  U32 dest_height,
  U32 dest_x,
  U32 dest_y,
  BINK_COPY_FLAGS copy_flags
);
Delphi

Code: Select all

(*
  type
  U32 = UInt32; // Cardinal
  S32 = Int32; // Integer
*)
Function BinkCopyToBuffer(
  BINK: HBink;
  dest_addr: Pointer;
  dest_pitch: S32;
  dest_height : U32;
  dest_x : U32;
  dest_y : U32;
  copy_flags : U32
  ): U32;
In Parameters
bink
Specifies the Bink handle.
dest_addr
Address of the destination memory buffer.
dest_pitch
Pitch of the destination buffer in bytes.
dest_height
Height of the destination buffer in pixels.
dest_x
X (left) pixel offset into the destination buffer.
dest_y
Y (top) pixel offset into the destination buffer.
copy_flags
Specifies the flags that describe the destination buffer type and other special copy options.

Returns
Returns one if the frame was skipped, or zero otherwise.

I wonder if any of you have a working example of how to use bink, like to play a bink file? I have try but with no success.

Peace,
Claudiu

Post Reply