ESF天神殿CS七龙珠|ESFKAMI Earth's Special Forces Homepage
Forum Home Forum Home > 代码|Codes > C语言代码|C++ Code
  New Posts New Posts
  FAQ FAQ  Forum Search    RegisterRegister  Login Login

[MetaHook]Quake Bink Functions

 Post Reply Post Reply
Author
Message
Jerry小坏 View Drop Down
Admin Group
Admin Group
Avatar

Joined: 10 Dec 2016
Location: China
Posts: 271
Post Options Post Options   Quote Jerry小坏 Quote  Post ReplyReply Direct Link To This Post Topic: [MetaHook]Quake Bink Functions
    Posted: 26 Mar 2017 at 4:02pm
by Akatsuki

qbink.h
#ifndef QBINK_H
#define QBINK_H

#include "bink.h"

extern void PTR4* (RADEXPLINK *qBinkLogoAddress)(void);
extern void (RADEXPLINK *qBinkSetError)(const char PTR4* err);
extern char PTR4* (RADEXPLINK *qBinkGetError)(void);
extern HBINK (RADEXPLINK *qBinkOpen)(const char PTR4* name,U32 flags);
extern void (RADEXPLINK *qBinkGetFrameBuffersInfo)( HBINK bink, BINKFRAMEBUFFERS * fbset );
extern void (RADEXPLINK *qBinkRegisterFrameBuffers)( HBINK bink, BINKFRAMEBUFFERS * fbset );
extern S32  (RADEXPLINK *qBinkDoFrame)(HBINK bnk);
extern void (RADEXPLINK *qBinkNextFrame)(HBINK bnk);
extern S32  (RADEXPLINK *qBinkWait)(HBINK bnk);
extern void (RADEXPLINK *qBinkClose)(HBINK bnk);
extern S32  (RADEXPLINK *qBinkPause)(HBINK bnk,S32 pause);
extern S32  (RADEXPLINK *qBinkCopyToBuffer)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 flags);
extern S32  (RADEXPLINK *qBinkCopyToBufferRect)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 srcx, U32 srcy, U32 srcw, U32 srch, U32 flags);
extern S32  (RADEXPLINK *qBinkGetRects)(HBINK bnk,U32 flags);
extern void (RADEXPLINK *qBinkGoto)(HBINK bnk,U32 frame,S32 flags);  // use 1 for the first frame
extern U32  (RADEXPLINK *qBinkGetKeyFrame)(HBINK bnk,U32 frame,S32 flags);
extern S32  (RADEXPLINK *qBinkSetVideoOnOff)(HBINK bnk,S32 onoff);
extern S32  (RADEXPLINK *qBinkSetSoundOnOff)(HBINK bnk,S32 onoff);
extern void (RADEXPLINK *qBinkFreeGlocalMemory)( void );
extern void (RADEXPLINK *qBinkSetVolume)(HBINK bnk, U32 trackid, S32 volume);
extern void (RADEXPLINK *qBinkSetPan)(HBINK bnk,U32 trackid, S32 pan);
extern void (RADEXPLINK *qBinkSetMixBins)(HBINK bnk,U32 trackid, U32 PTR4* mix_bins, U32 total);
extern void (RADEXPLINK *qBinkSetMixBinVolumes)(HBINK bnk,U32 trackid, U32 PTR4* vol_mix_bins, S32 PTR4* volumes, U32 total);
extern void (RADEXPLINK *qBinkService)(HBINK bink);
extern S32  (RADEXPLINK *qBinkShouldSkip)(HBINK bink);
extern void (RADEXPLINK *qBinkGetPalette)( void * out_pal );
extern S32  (RADEXPLINK *qBinkControlBackgroundIO)(HBINK bink,U32 control);
extern HBINKTRACK (RADEXPLINK *qBinkOpenTrack)(HBINK bnk,U32 trackindex);
extern void (RADEXPLINK *qBinkCloseTrack)(HBINKTRACK bnkt);
extern U32  (RADEXPLINK *qBinkGetTrackData)(HBINKTRACK bnkt,void PTR4* dest);
extern U32  (RADEXPLINK *qBinkGetTrackType)(HBINK bnk,U32 trackindex);
extern U32  (RADEXPLINK *qBinkGetTrackMaxSize)(HBINK bnk,U32 trackindex);
extern U32  (RADEXPLINK *qBinkGetTrackID)(HBINK bnk,U32 trackindex);
extern void (RADEXPLINK *qBinkGetSummary)(HBINK bnk,BINKSUMMARY PTR4* sum);
extern void (RADEXPLINK *qBinkGetRealtime)(HBINK bink,BINKREALTIME PTR4* run,U32 frames);
extern void (RADEXPLINK *qBinkSetSoundTrack)(U32 total_tracks, U32 PTR4* tracks);
extern void (RADEXPLINK *qBinkSetIO)(BINKIOOPEN io);
extern void (RADEXPLINK *qBinkSetFrameRate)(U32 forcerate,U32 forceratediv);
extern void (RADEXPLINK *qBinkSetSimulate)(U32 sim);
extern void (RADEXPLINK *qBinkSetIOSize)(U32 iosize);
extern S32  (RADEXPLINK *qBinkSetSoundSystem)(BINKSNDSYSOPEN open, U32 param);
extern void (RADEXPLINK *qBinkControlCPUFeatures)( S32 use, S32 dont_use );
extern BINKSNDOPEN (RADEXPLINK *qBinkOpenDirectSound)(U32 param); // don't call directly
extern BINKSNDOPEN (RADEXPLINK *qBinkOpenWaveOut)(U32 param); // don't call directly
extern BINKSNDOPEN (RADEXPLINK *qBinkOpenMiles)(U32 param); // don't call directly
extern S32 (RADEXPLINK *qBinkDX8SurfaceType)(void* lpD3Ds);
extern S32 (RADEXPLINK *qBinkDX9SurfaceType)(void* lpD3Ds);
extern HBINKBUFFER (RADEXPLINK *qBinkBufferOpen)( void* /*HWND*/ wnd, U32 width, U32 height, U32 bufferflags);
extern S32 (RADEXPLINK *qBinkBufferSetHWND)( HBINKBUFFER buf, void* /*HWND*/ newwnd);
extern S32 (RADEXPLINK *qBinkDDSurfaceType)(void PTR4* lpDDS);
extern S32 (RADEXPLINK *qBinkIsSoftwareCursor)(void PTR4* lpDDSP, void* /*HCURSOR*/ cur);
extern S32 (RADEXPLINK *qBinkCheckCursor)(void* /*HWND*/ wnd,S32 x,S32 y,S32 w,S32 h);
extern S32 (RADEXPLINK *qBinkBufferSetDirectDraw)(void PTR4* lpDirectDraw, void PTR4* lpPrimary);
extern void (RADEXPLINK *qBinkBufferClose)( HBINKBUFFER buf);
extern S32 (RADEXPLINK *qBinkBufferLock)( HBINKBUFFER buf);
extern S32 (RADEXPLINK *qBinkBufferUnlock)( HBINKBUFFER buf);
extern void (RADEXPLINK *qBinkBufferSetResolution)( S32 w, S32 h, S32 bits);
extern void (RADEXPLINK *qBinkBufferCheckWinPos)( HBINKBUFFER buf, S32 PTR4* NewWindowX, S32 PTR4* NewWindowY);
extern S32 (RADEXPLINK *qBinkBufferSetOffset)( HBINKBUFFER buf, S32 destx, S32 desty);
extern void (RADEXPLINK *qBinkBufferBlit)( HBINKBUFFER buf, BINKRECT PTR4* rects, U32 numrects );
extern S32 (RADEXPLINK *qBinkBufferSetScale)( HBINKBUFFER buf, U32 w, U32 h);
extern char PTR4* (RADEXPLINK *qBinkBufferGetDescription)( HBINKBUFFER buf);
extern char PTR4* (RADEXPLINK *qBinkBufferGetError)();
extern void (RADEXPLINK *qBinkRestoreCursor)(S32 checkcount);
extern S32 (RADEXPLINK *qBinkBufferClear)(HBINKBUFFER buf, U32 RGB);
extern void (RADEXPLINK *qBinkSetMemory)(BINKMEMALLOC a,BINKMEMFREE f);

void QBink_Init(void);
void QBink_Shutdown(void);

#endif

qbink.cpp
#include <metahook.h>

#include "bink.h"

static HMODULE hBink = NULL;

void PTR4* (RADEXPLINK *qBinkLogoAddress)(void) = 0;
void (RADEXPLINK *qBinkSetError)(const char PTR4* err) = 0;
char PTR4* (RADEXPLINK *qBinkGetError)(void) = 0;
HBINK (RADEXPLINK *qBinkOpen)(const char PTR4* name,U32 flags) = 0;
void (RADEXPLINK *qBinkGetFrameBuffersInfo)( HBINK bink, BINKFRAMEBUFFERS * fbset ) = 0;
void (RADEXPLINK *qBinkRegisterFrameBuffers)( HBINK bink, BINKFRAMEBUFFERS * fbset ) = 0;
S32  (RADEXPLINK *qBinkDoFrame)(HBINK bnk) = 0;
void (RADEXPLINK *qBinkNextFrame)(HBINK bnk) = 0;
S32  (RADEXPLINK *qBinkWait)(HBINK bnk) = 0;
void (RADEXPLINK *qBinkClose)(HBINK bnk) = 0;
S32  (RADEXPLINK *qBinkPause)(HBINK bnk,S32 pause) = 0;
S32  (RADEXPLINK *qBinkCopyToBuffer)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 flags) = 0;
S32  (RADEXPLINK *qBinkCopyToBufferRect)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 srcx, U32 srcy, U32 srcw, U32 srch, U32 flags) = 0;
S32  (RADEXPLINK *qBinkGetRects)(HBINK bnk,U32 flags) = 0;
void (RADEXPLINK *qBinkGoto)(HBINK bnk,U32 frame,S32 flags) = 0;  // use 1 for the first frame
U32  (RADEXPLINK *qBinkGetKeyFrame)(HBINK bnk,U32 frame,S32 flags) = 0;
S32  (RADEXPLINK *qBinkSetVideoOnOff)(HBINK bnk,S32 onoff) = 0;
S32  (RADEXPLINK *qBinkSetSoundOnOff)(HBINK bnk,S32 onoff) = 0;
void (RADEXPLINK *qBinkSetVolume)(HBINK bnk, U32 trackid, S32 volume) = 0;
void (RADEXPLINK *qBinkSetPan)(HBINK bnk,U32 trackid, S32 pan) = 0;
void (RADEXPLINK *qBinkSetMixBins)(HBINK bnk,U32 trackid, U32 PTR4* mix_bins, U32 total) = 0;
void (RADEXPLINK *qBinkSetMixBinVolumes)(HBINK bnk,U32 trackid, U32 PTR4* vol_mix_bins, S32 PTR4* volumes, U32 total) = 0;
void (RADEXPLINK *qBinkService)(HBINK bink) = 0;
S32  (RADEXPLINK *qBinkShouldSkip)(HBINK bink) = 0;
void (RADEXPLINK *qBinkGetPalette)( void * out_pal ) = 0;
S32  (RADEXPLINK *qBinkControlBackgroundIO)(HBINK bink,U32 control) = 0;
HBINKTRACK (RADEXPLINK *qBinkOpenTrack)(HBINK bnk,U32 trackindex) = 0;
void (RADEXPLINK *qBinkCloseTrack)(HBINKTRACK bnkt) = 0;
U32  (RADEXPLINK *qBinkGetTrackData)(HBINKTRACK bnkt,void PTR4* dest) = 0;
U32  (RADEXPLINK *qBinkGetTrackType)(HBINK bnk,U32 trackindex) = 0;
U32  (RADEXPLINK *qBinkGetTrackMaxSize)(HBINK bnk,U32 trackindex) = 0;
U32  (RADEXPLINK *qBinkGetTrackID)(HBINK bnk,U32 trackindex) = 0;
void (RADEXPLINK *qBinkGetSummary)(HBINK bnk,BINKSUMMARY PTR4* sum) = 0;
void (RADEXPLINK *qBinkGetRealtime)(HBINK bink,BINKREALTIME PTR4* run,U32 frames) = 0;
void (RADEXPLINK *qBinkSetSoundTrack)(U32 total_tracks, U32 PTR4* tracks) = 0;
void (RADEXPLINK *qBinkSetIO)(BINKIOOPEN io) = 0;
void (RADEXPLINK *qBinkSetFrameRate)(U32 forcerate,U32 forceratediv) = 0;
void (RADEXPLINK *qBinkSetSimulate)(U32 sim) = 0;
void (RADEXPLINK *qBinkSetIOSize)(U32 iosize) = 0;
S32  (RADEXPLINK *qBinkSetSoundSystem)(BINKSNDSYSOPEN open, U32 param) = 0;
BINKSNDOPEN (RADEXPLINK *qBinkOpenDirectSound)(U32 param) = 0; // don't call directly
BINKSNDOPEN (RADEXPLINK *qBinkOpenWaveOut)(U32 param) = 0; // don't call directly
BINKSNDOPEN (RADEXPLINK *qBinkOpenMiles)(U32 param) = 0; // don't call directly
S32 (RADEXPLINK *qBinkDX8SurfaceType)(void* lpD3Ds) = 0;
S32 (RADEXPLINK *qBinkDX9SurfaceType)(void* lpD3Ds) = 0;
HBINKBUFFER (RADEXPLINK *qBinkBufferOpen)( void* /*HWND*/ wnd, U32 width, U32 height, U32 bufferflags) = 0;
S32 (RADEXPLINK *qBinkBufferSetHWND)( HBINKBUFFER buf, void* /*HWND*/ newwnd) = 0;
S32 (RADEXPLINK *qBinkDDSurfaceType)(void PTR4* lpDDS) = 0;
S32 (RADEXPLINK *qBinkIsSoftwareCursor)(void PTR4* lpDDSP, void* /*HCURSOR*/ cur) = 0;
S32 (RADEXPLINK *qBinkCheckCursor)(void* /*HWND*/ wnd,S32 x,S32 y,S32 w,S32 h) = 0;
S32 (RADEXPLINK *qBinkBufferSetDirectDraw)(void PTR4* lpDirectDraw, void PTR4* lpPrimary) = 0;
void (RADEXPLINK *qBinkBufferClose)( HBINKBUFFER buf) = 0;
S32 (RADEXPLINK *qBinkBufferLock)( HBINKBUFFER buf) = 0;
S32 (RADEXPLINK *qBinkBufferUnlock)( HBINKBUFFER buf) = 0;
void (RADEXPLINK *qBinkBufferSetResolution)( S32 w, S32 h, S32 bits) = 0;
void (RADEXPLINK *qBinkBufferCheckWinPos)( HBINKBUFFER buf, S32 PTR4* NewWindowX, S32 PTR4* NewWindowY) = 0;
S32 (RADEXPLINK *qBinkBufferSetOffset)( HBINKBUFFER buf, S32 destx, S32 desty) = 0;
void (RADEXPLINK *qBinkBufferBlit)( HBINKBUFFER buf, BINKRECT PTR4* rects, U32 numrects ) = 0;
S32 (RADEXPLINK *qBinkBufferSetScale)( HBINKBUFFER buf, U32 w, U32 h) = 0;
char PTR4* (RADEXPLINK *qBinkBufferGetDescription)( HBINKBUFFER buf) = 0;
char PTR4* (RADEXPLINK *qBinkBufferGetError)() = 0;
void (RADEXPLINK *qBinkRestoreCursor)(S32 checkcount) = 0;
S32 (RADEXPLINK *qBinkBufferClear)(HBINKBUFFER buf, U32 RGB) = 0;
void (RADEXPLINK *qBinkSetMemory)(BINKMEMALLOC a,BINKMEMFREE f) = 0;

void QBink_Init(void)
{
    hBink = LoadLibrary("binkw32.dll");

    if (hBink)
    {
        qBinkLogoAddress = (void PTR4* (RADEXPLINK *)(void))GetProcAddress(hBink, "_BinkLogoAddress@0");
        qBinkSetError = (void (RADEXPLINK *)(const char PTR4*))GetProcAddress(hBink, "_BinkSetError@4");
        qBinkGetError = (char PTR4* (RADEXPLINK *)(void))GetProcAddress(hBink, "_BinkGetError@0");
        qBinkOpen = (HBINK (RADEXPLINK *)(const char PTR4*,U32))GetProcAddress(hBink, "_BinkOpen@8");
        qBinkGetFrameBuffersInfo = (void (RADEXPLINK *)( HBINK, BINKFRAMEBUFFERS *))GetProcAddress(hBink, "_BinkGetFrameBuffersInfo@8");
        qBinkRegisterFrameBuffers = (void (RADEXPLINK *)( HBINK, BINKFRAMEBUFFERS *))GetProcAddress(hBink, "_BinkRegisterFrameBuffers@8");
        qBinkDoFrame = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkDoFrame@4");
        qBinkNextFrame = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkNextFrame@4");
        qBinkWait = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkWait@4");
        qBinkClose = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkClose@4");
        qBinkPause = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkPause@8");
        qBinkCopyToBuffer = (S32  (RADEXPLINK *)(HBINK,void*,S32,U32,U32,U32,U32))GetProcAddress(hBink, "_BinkCopyToBuffer@28");
        qBinkCopyToBufferRect = (S32  (RADEXPLINK *)(HBINK,void*,S32,U32,U32,U32,U32, U32, U32, U32, U32))GetProcAddress(hBink, "_BinkCopyToBufferRect@44");
        qBinkGetRects = (S32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetRects@8");
        qBinkGoto = (void (RADEXPLINK *)(HBINK,U32,S32))GetProcAddress(hBink, "_BinkGoto@12");  // use 1 for the first frame
        qBinkGetKeyFrame = (U32  (RADEXPLINK *)(HBINK,U32,S32))GetProcAddress(hBink, "_BinkGetKeyFrame@12");
        qBinkSetVideoOnOff = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkSetVideoOnOff@8");
        qBinkSetSoundOnOff = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkSetSoundOnOff@8");
        qBinkSetVolume = (void (RADEXPLINK *)(HBINK, U32, S32))GetProcAddress(hBink, "_BinkSetVolume@12");
        qBinkSetPan = (void (RADEXPLINK *)(HBINK,U32, S32))GetProcAddress(hBink, "_BinkSetPan@12");
        qBinkSetMixBins = (void (RADEXPLINK *)(HBINK,U32, U32 PTR4*, U32))GetProcAddress(hBink, "_BinkSetMixBins@16");
        qBinkSetMixBinVolumes = (void (RADEXPLINK *)(HBINK,U32, U32 PTR4*, S32 PTR4*, U32))GetProcAddress(hBink, "_BinkSetMixBinVolumes@20");
        qBinkService = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkService@4");
        qBinkShouldSkip = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkShouldSkip@4");
        qBinkGetPalette = (void (RADEXPLINK *)( void * ))GetProcAddress(hBink, "_BinkGetPalette@4");
        qBinkControlBackgroundIO = (S32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkControlBackgroundIO@8");
        qBinkOpenTrack = (HBINKTRACK (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkOpenTrack@8");
        qBinkCloseTrack = (void (RADEXPLINK *)(HBINKTRACK))GetProcAddress(hBink, "_BinkCloseTrack@4");
        qBinkGetTrackData = (U32  (RADEXPLINK *)(HBINKTRACK,void PTR4*))GetProcAddress(hBink, "_BinkGetTrackData@8");
        qBinkGetTrackType = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackType@8");
        qBinkGetTrackMaxSize = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackMaxSize@8");
        qBinkGetTrackID = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackID@8");
        qBinkGetSummary = (void (RADEXPLINK *)(HBINK,BINKSUMMARY PTR4*))GetProcAddress(hBink, "_BinkGetSummary@8");
        qBinkGetRealtime = (void (RADEXPLINK *)(HBINK,BINKREALTIME PTR4*,U32))GetProcAddress(hBink, "_BinkGetRealtime@12");
        qBinkSetSoundTrack = (void (RADEXPLINK *)(U32, U32 PTR4*))GetProcAddress(hBink, "_BinkSetSoundTrack@8");
        qBinkSetIO = (void (RADEXPLINK *)(BINKIOOPEN))GetProcAddress(hBink, "_BinkSetIO@4");
        qBinkSetFrameRate = (void (RADEXPLINK *)(U32,U32))GetProcAddress(hBink, "_BinkSetFrameRate@8");
        qBinkSetSimulate = (void (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkSetSimulate@4");
        qBinkSetIOSize = (void (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkSetIOSize@4");
        qBinkSetSoundSystem = (S32  (RADEXPLINK *)(BINKSNDSYSOPEN, U32))GetProcAddress(hBink, "_BinkSetSoundSystem@8");
        qBinkOpenDirectSound = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenDirectSound@4"); // don't call directly
        qBinkOpenWaveOut = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenWaveOut@4"); // don't call directly
        qBinkOpenMiles = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenMiles@4"); // don't call directly
        qBinkDX8SurfaceType = (S32 (RADEXPLINK *)(void*))GetProcAddress(hBink, "_BinkDX8SurfaceType@4");
        qBinkDX9SurfaceType = (S32 (RADEXPLINK *)(void*))GetProcAddress(hBink, "_BinkDX9SurfaceType@4");
        qBinkBufferOpen = (HBINKBUFFER (RADEXPLINK *)( void* /*HWND*/, U32, U32, U32))GetProcAddress(hBink, "_BinkBufferOpen@16");
        qBinkBufferSetHWND = (S32 (RADEXPLINK *)( HBINKBUFFER, void* /*HWND*/))GetProcAddress(hBink, "_BinkBufferSetHWND@8");
        qBinkDDSurfaceType = (S32 (RADEXPLINK *)(void PTR4*))GetProcAddress(hBink, "_BinkDDSurfaceType@4");
        qBinkIsSoftwareCursor = (S32 (RADEXPLINK *)(void PTR4*, void* /*HCURSOR*/))GetProcAddress(hBink, "_BinkIsSoftwareCursor@8");
        qBinkCheckCursor = (S32 (RADEXPLINK *)(void* /*HWND*/,S32,S32,S32,S32))GetProcAddress(hBink, "_BinkCheckCursor@20");
        qBinkBufferSetDirectDraw = (S32 (RADEXPLINK *)(void PTR4*, void PTR4*))GetProcAddress(hBink, "_BinkBufferSetDirectDraw@8");
        qBinkBufferClose = (void (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferClose@4");
        qBinkBufferLock = (S32 (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferLock@4");
        qBinkBufferUnlock = (S32 (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferUnlock@4");
        qBinkBufferSetResolution = (void (RADEXPLINK *)( S32, S32, S32))GetProcAddress(hBink, "_BinkBufferSetResolution@12");
        qBinkBufferCheckWinPos = (void (RADEXPLINK *)( HBINKBUFFER, S32 PTR4*, S32 PTR4*))GetProcAddress(hBink, "_BinkBufferCheckWinPos@12");
        qBinkBufferSetOffset = (S32 (RADEXPLINK *)( HBINKBUFFER, S32, S32))GetProcAddress(hBink, "_BinkBufferSetOffset@12");
        qBinkBufferBlit = (void (RADEXPLINK *)( HBINKBUFFER, BINKRECT PTR4*, U32 ))GetProcAddress(hBink, "_BinkBufferBlit@12");
        qBinkBufferSetScale = (S32 (RADEXPLINK *)( HBINKBUFFER, U32, U32))GetProcAddress(hBink, "_BinkBufferSetScale@12");
        qBinkBufferGetDescription = (char PTR4* (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferGetDescription@4");
        qBinkBufferGetError = (char PTR4* (RADEXPLINK *)())GetProcAddress(hBink, "_BinkBufferGetError@0");
        qBinkRestoreCursor = (void (RADEXPLINK *)(S32))GetProcAddress(hBink, "_BinkRestoreCursor@4");
        qBinkBufferClear = (S32 (RADEXPLINK *)(HBINKBUFFER, U32))GetProcAddress(hBink, "_BinkBufferClear@8");
        qBinkSetMemory = (void (RADEXPLINK *)(BINKMEMALLOC,BINKMEMFREE))GetProcAddress(hBink, "_BinkSetMemory@8");
    }
}

void QBink_Shutdown(void)
{
    if (hBink)
        FreeLibrary(hBink);
}


Edited by Jerry小坏 - 26 Mar 2017 at 4:02pm
Back to Top
 Post Reply Post Reply

Quick Reply
Name:

Message:
   Enable BBcodes to format post
Security Code:
Code Image - Please contact webmaster if you have problems seeing this image code Load New Code
CAPTCHA Software by Web Wiz CAPTCHA version 4.0 wwf
Copyright ©2005-2008 Web Wiz
Please enter the Security Code exactly as shown in image format.
Cookies must be enabled on your web browser.
 

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.64 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in .140 seconds.