请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

ESFKAMI

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

ESFX

ESF: Xenoverse

ESF123

ESF1.2.3

EVM2.1

EVM2.1

ECXSSJ

ECX: TeamSSJ

ECX2.2

ECX RC2

ECX2.3

ECX RC3

查看: 1148|回复: 0

[MetaHook]Quake Bink Functions

[复制链接]

211

主题

216

帖子

1142

积分

ESFKAMI

Rank: 8Rank: 8

积分
1142
发表于 2017-7-14 16:52:53 | 显示全部楼层 |阅读模式

by Akatsuki

qbink.h

  1. #ifndef QBINK_H
  2. #define QBINK_H

  3. #include "bink.h"

  4. extern void PTR4* (RADEXPLINK *qBinkLogoAddress)(void);
  5. extern void (RADEXPLINK *qBinkSetError)(const char PTR4* err);
  6. extern char PTR4* (RADEXPLINK *qBinkGetError)(void);
  7. extern HBINK (RADEXPLINK *qBinkOpen)(const char PTR4* name,U32 flags);
  8. extern void (RADEXPLINK *qBinkGetFrameBuffersInfo)( HBINK bink, BINKFRAMEBUFFERS * fbset );
  9. extern void (RADEXPLINK *qBinkRegisterFrameBuffers)( HBINK bink, BINKFRAMEBUFFERS * fbset );
  10. extern S32  (RADEXPLINK *qBinkDoFrame)(HBINK bnk);
  11. extern void (RADEXPLINK *qBinkNextFrame)(HBINK bnk);
  12. extern S32  (RADEXPLINK *qBinkWait)(HBINK bnk);
  13. extern void (RADEXPLINK *qBinkClose)(HBINK bnk);
  14. extern S32  (RADEXPLINK *qBinkPause)(HBINK bnk,S32 pause);
  15. extern S32  (RADEXPLINK *qBinkCopyToBuffer)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 flags);
  16. 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);
  17. extern S32  (RADEXPLINK *qBinkGetRects)(HBINK bnk,U32 flags);
  18. extern void (RADEXPLINK *qBinkGoto)(HBINK bnk,U32 frame,S32 flags);  // use 1 for the first frame
  19. extern U32  (RADEXPLINK *qBinkGetKeyFrame)(HBINK bnk,U32 frame,S32 flags);
  20. extern S32  (RADEXPLINK *qBinkSetVideoOnOff)(HBINK bnk,S32 onoff);
  21. extern S32  (RADEXPLINK *qBinkSetSoundOnOff)(HBINK bnk,S32 onoff);
  22. extern void (RADEXPLINK *qBinkFreeGlocalMemory)( void );
  23. extern void (RADEXPLINK *qBinkSetVolume)(HBINK bnk, U32 trackid, S32 volume);
  24. extern void (RADEXPLINK *qBinkSetPan)(HBINK bnk,U32 trackid, S32 pan);
  25. extern void (RADEXPLINK *qBinkSetMixBins)(HBINK bnk,U32 trackid, U32 PTR4* mix_bins, U32 total);
  26. extern void (RADEXPLINK *qBinkSetMixBinVolumes)(HBINK bnk,U32 trackid, U32 PTR4* vol_mix_bins, S32 PTR4* volumes, U32 total);
  27. extern void (RADEXPLINK *qBinkService)(HBINK bink);
  28. extern S32  (RADEXPLINK *qBinkShouldSkip)(HBINK bink);
  29. extern void (RADEXPLINK *qBinkGetPalette)( void * out_pal );
  30. extern S32  (RADEXPLINK *qBinkControlBackgroundIO)(HBINK bink,U32 control);
  31. extern HBINKTRACK (RADEXPLINK *qBinkOpenTrack)(HBINK bnk,U32 trackindex);
  32. extern void (RADEXPLINK *qBinkCloseTrack)(HBINKTRACK bnkt);
  33. extern U32  (RADEXPLINK *qBinkGetTrackData)(HBINKTRACK bnkt,void PTR4* dest);
  34. extern U32  (RADEXPLINK *qBinkGetTrackType)(HBINK bnk,U32 trackindex);
  35. extern U32  (RADEXPLINK *qBinkGetTrackMaxSize)(HBINK bnk,U32 trackindex);
  36. extern U32  (RADEXPLINK *qBinkGetTrackID)(HBINK bnk,U32 trackindex);
  37. extern void (RADEXPLINK *qBinkGetSummary)(HBINK bnk,BINKSUMMARY PTR4* sum);
  38. extern void (RADEXPLINK *qBinkGetRealtime)(HBINK bink,BINKREALTIME PTR4* run,U32 frames);
  39. extern void (RADEXPLINK *qBinkSetSoundTrack)(U32 total_tracks, U32 PTR4* tracks);
  40. extern void (RADEXPLINK *qBinkSetIO)(BINKIOOPEN io);
  41. extern void (RADEXPLINK *qBinkSetFrameRate)(U32 forcerate,U32 forceratediv);
  42. extern void (RADEXPLINK *qBinkSetSimulate)(U32 sim);
  43. extern void (RADEXPLINK *qBinkSetIOSize)(U32 iosize);
  44. extern S32  (RADEXPLINK *qBinkSetSoundSystem)(BINKSNDSYSOPEN open, U32 param);
  45. extern void (RADEXPLINK *qBinkControlCPUFeatures)( S32 use, S32 dont_use );
  46. extern BINKSNDOPEN (RADEXPLINK *qBinkOpenDirectSound)(U32 param); // don't call directly
  47. extern BINKSNDOPEN (RADEXPLINK *qBinkOpenWaveOut)(U32 param); // don't call directly
  48. extern BINKSNDOPEN (RADEXPLINK *qBinkOpenMiles)(U32 param); // don't call directly
  49. extern S32 (RADEXPLINK *qBinkDX8SurfaceType)(void* lpD3Ds);
  50. extern S32 (RADEXPLINK *qBinkDX9SurfaceType)(void* lpD3Ds);
  51. extern HBINKBUFFER (RADEXPLINK *qBinkBufferOpen)( void* /*HWND*/ wnd, U32 width, U32 height, U32 bufferflags);
  52. extern S32 (RADEXPLINK *qBinkBufferSetHWND)( HBINKBUFFER buf, void* /*HWND*/ newwnd);
  53. extern S32 (RADEXPLINK *qBinkDDSurfaceType)(void PTR4* lpDDS);
  54. extern S32 (RADEXPLINK *qBinkIsSoftwareCursor)(void PTR4* lpDDSP, void* /*HCURSOR*/ cur);
  55. extern S32 (RADEXPLINK *qBinkCheckCursor)(void* /*HWND*/ wnd,S32 x,S32 y,S32 w,S32 h);
  56. extern S32 (RADEXPLINK *qBinkBufferSetDirectDraw)(void PTR4* lpDirectDraw, void PTR4* lpPrimary);
  57. extern void (RADEXPLINK *qBinkBufferClose)( HBINKBUFFER buf);
  58. extern S32 (RADEXPLINK *qBinkBufferLock)( HBINKBUFFER buf);
  59. extern S32 (RADEXPLINK *qBinkBufferUnlock)( HBINKBUFFER buf);
  60. extern void (RADEXPLINK *qBinkBufferSetResolution)( S32 w, S32 h, S32 bits);
  61. extern void (RADEXPLINK *qBinkBufferCheckWinPos)( HBINKBUFFER buf, S32 PTR4* NewWindowX, S32 PTR4* NewWindowY);
  62. extern S32 (RADEXPLINK *qBinkBufferSetOffset)( HBINKBUFFER buf, S32 destx, S32 desty);
  63. extern void (RADEXPLINK *qBinkBufferBlit)( HBINKBUFFER buf, BINKRECT PTR4* rects, U32 numrects );
  64. extern S32 (RADEXPLINK *qBinkBufferSetScale)( HBINKBUFFER buf, U32 w, U32 h);
  65. extern char PTR4* (RADEXPLINK *qBinkBufferGetDescription)( HBINKBUFFER buf);
  66. extern char PTR4* (RADEXPLINK *qBinkBufferGetError)();
  67. extern void (RADEXPLINK *qBinkRestoreCursor)(S32 checkcount);
  68. extern S32 (RADEXPLINK *qBinkBufferClear)(HBINKBUFFER buf, U32 RGB);
  69. extern void (RADEXPLINK *qBinkSetMemory)(BINKMEMALLOC a,BINKMEMFREE f);

  70. void QBink_Init(void);
  71. void QBink_Shutdown(void);

  72. #endif
复制代码
qbink.cpp

  1. #include <metahook.h>

  2. #include "bink.h"

  3. static HMODULE hBink = NULL;

  4. void PTR4* (RADEXPLINK *qBinkLogoAddress)(void) = 0;
  5. void (RADEXPLINK *qBinkSetError)(const char PTR4* err) = 0;
  6. char PTR4* (RADEXPLINK *qBinkGetError)(void) = 0;
  7. HBINK (RADEXPLINK *qBinkOpen)(const char PTR4* name,U32 flags) = 0;
  8. void (RADEXPLINK *qBinkGetFrameBuffersInfo)( HBINK bink, BINKFRAMEBUFFERS * fbset ) = 0;
  9. void (RADEXPLINK *qBinkRegisterFrameBuffers)( HBINK bink, BINKFRAMEBUFFERS * fbset ) = 0;
  10. S32  (RADEXPLINK *qBinkDoFrame)(HBINK bnk) = 0;
  11. void (RADEXPLINK *qBinkNextFrame)(HBINK bnk) = 0;
  12. S32  (RADEXPLINK *qBinkWait)(HBINK bnk) = 0;
  13. void (RADEXPLINK *qBinkClose)(HBINK bnk) = 0;
  14. S32  (RADEXPLINK *qBinkPause)(HBINK bnk,S32 pause) = 0;
  15. S32  (RADEXPLINK *qBinkCopyToBuffer)(HBINK bnk,void* dest,S32 destpitch,U32 destheight,U32 destx,U32 desty,U32 flags) = 0;
  16. 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;
  17. S32  (RADEXPLINK *qBinkGetRects)(HBINK bnk,U32 flags) = 0;
  18. void (RADEXPLINK *qBinkGoto)(HBINK bnk,U32 frame,S32 flags) = 0;  // use 1 for the first frame
  19. U32  (RADEXPLINK *qBinkGetKeyFrame)(HBINK bnk,U32 frame,S32 flags) = 0;
  20. S32  (RADEXPLINK *qBinkSetVideoOnOff)(HBINK bnk,S32 onoff) = 0;
  21. S32  (RADEXPLINK *qBinkSetSoundOnOff)(HBINK bnk,S32 onoff) = 0;
  22. void (RADEXPLINK *qBinkSetVolume)(HBINK bnk, U32 trackid, S32 volume) = 0;
  23. void (RADEXPLINK *qBinkSetPan)(HBINK bnk,U32 trackid, S32 pan) = 0;
  24. void (RADEXPLINK *qBinkSetMixBins)(HBINK bnk,U32 trackid, U32 PTR4* mix_bins, U32 total) = 0;
  25. void (RADEXPLINK *qBinkSetMixBinVolumes)(HBINK bnk,U32 trackid, U32 PTR4* vol_mix_bins, S32 PTR4* volumes, U32 total) = 0;
  26. void (RADEXPLINK *qBinkService)(HBINK bink) = 0;
  27. S32  (RADEXPLINK *qBinkShouldSkip)(HBINK bink) = 0;
  28. void (RADEXPLINK *qBinkGetPalette)( void * out_pal ) = 0;
  29. S32  (RADEXPLINK *qBinkControlBackgroundIO)(HBINK bink,U32 control) = 0;
  30. HBINKTRACK (RADEXPLINK *qBinkOpenTrack)(HBINK bnk,U32 trackindex) = 0;
  31. void (RADEXPLINK *qBinkCloseTrack)(HBINKTRACK bnkt) = 0;
  32. U32  (RADEXPLINK *qBinkGetTrackData)(HBINKTRACK bnkt,void PTR4* dest) = 0;
  33. U32  (RADEXPLINK *qBinkGetTrackType)(HBINK bnk,U32 trackindex) = 0;
  34. U32  (RADEXPLINK *qBinkGetTrackMaxSize)(HBINK bnk,U32 trackindex) = 0;
  35. U32  (RADEXPLINK *qBinkGetTrackID)(HBINK bnk,U32 trackindex) = 0;
  36. void (RADEXPLINK *qBinkGetSummary)(HBINK bnk,BINKSUMMARY PTR4* sum) = 0;
  37. void (RADEXPLINK *qBinkGetRealtime)(HBINK bink,BINKREALTIME PTR4* run,U32 frames) = 0;
  38. void (RADEXPLINK *qBinkSetSoundTrack)(U32 total_tracks, U32 PTR4* tracks) = 0;
  39. void (RADEXPLINK *qBinkSetIO)(BINKIOOPEN io) = 0;
  40. void (RADEXPLINK *qBinkSetFrameRate)(U32 forcerate,U32 forceratediv) = 0;
  41. void (RADEXPLINK *qBinkSetSimulate)(U32 sim) = 0;
  42. void (RADEXPLINK *qBinkSetIOSize)(U32 iosize) = 0;
  43. S32  (RADEXPLINK *qBinkSetSoundSystem)(BINKSNDSYSOPEN open, U32 param) = 0;
  44. BINKSNDOPEN (RADEXPLINK *qBinkOpenDirectSound)(U32 param) = 0; // don't call directly
  45. BINKSNDOPEN (RADEXPLINK *qBinkOpenWaveOut)(U32 param) = 0; // don't call directly
  46. BINKSNDOPEN (RADEXPLINK *qBinkOpenMiles)(U32 param) = 0; // don't call directly
  47. S32 (RADEXPLINK *qBinkDX8SurfaceType)(void* lpD3Ds) = 0;
  48. S32 (RADEXPLINK *qBinkDX9SurfaceType)(void* lpD3Ds) = 0;
  49. HBINKBUFFER (RADEXPLINK *qBinkBufferOpen)( void* /*HWND*/ wnd, U32 width, U32 height, U32 bufferflags) = 0;
  50. S32 (RADEXPLINK *qBinkBufferSetHWND)( HBINKBUFFER buf, void* /*HWND*/ newwnd) = 0;
  51. S32 (RADEXPLINK *qBinkDDSurfaceType)(void PTR4* lpDDS) = 0;
  52. S32 (RADEXPLINK *qBinkIsSoftwareCursor)(void PTR4* lpDDSP, void* /*HCURSOR*/ cur) = 0;
  53. S32 (RADEXPLINK *qBinkCheckCursor)(void* /*HWND*/ wnd,S32 x,S32 y,S32 w,S32 h) = 0;
  54. S32 (RADEXPLINK *qBinkBufferSetDirectDraw)(void PTR4* lpDirectDraw, void PTR4* lpPrimary) = 0;
  55. void (RADEXPLINK *qBinkBufferClose)( HBINKBUFFER buf) = 0;
  56. S32 (RADEXPLINK *qBinkBufferLock)( HBINKBUFFER buf) = 0;
  57. S32 (RADEXPLINK *qBinkBufferUnlock)( HBINKBUFFER buf) = 0;
  58. void (RADEXPLINK *qBinkBufferSetResolution)( S32 w, S32 h, S32 bits) = 0;
  59. void (RADEXPLINK *qBinkBufferCheckWinPos)( HBINKBUFFER buf, S32 PTR4* NewWindowX, S32 PTR4* NewWindowY) = 0;
  60. S32 (RADEXPLINK *qBinkBufferSetOffset)( HBINKBUFFER buf, S32 destx, S32 desty) = 0;
  61. void (RADEXPLINK *qBinkBufferBlit)( HBINKBUFFER buf, BINKRECT PTR4* rects, U32 numrects ) = 0;
  62. S32 (RADEXPLINK *qBinkBufferSetScale)( HBINKBUFFER buf, U32 w, U32 h) = 0;
  63. char PTR4* (RADEXPLINK *qBinkBufferGetDescription)( HBINKBUFFER buf) = 0;
  64. char PTR4* (RADEXPLINK *qBinkBufferGetError)() = 0;
  65. void (RADEXPLINK *qBinkRestoreCursor)(S32 checkcount) = 0;
  66. S32 (RADEXPLINK *qBinkBufferClear)(HBINKBUFFER buf, U32 RGB) = 0;
  67. void (RADEXPLINK *qBinkSetMemory)(BINKMEMALLOC a,BINKMEMFREE f) = 0;

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

  71.     if (hBink)
  72.     {
  73.         qBinkLogoAddress = (void PTR4* (RADEXPLINK *)(void))GetProcAddress(hBink, "_BinkLogoAddress@0");
  74.         qBinkSetError = (void (RADEXPLINK *)(const char PTR4*))GetProcAddress(hBink, "_BinkSetError@4");
  75.         qBinkGetError = (char PTR4* (RADEXPLINK *)(void))GetProcAddress(hBink, "_BinkGetError@0");
  76.         qBinkOpen = (HBINK (RADEXPLINK *)(const char PTR4*,U32))GetProcAddress(hBink, "_BinkOpen@8");
  77.         qBinkGetFrameBuffersInfo = (void (RADEXPLINK *)( HBINK, BINKFRAMEBUFFERS *))GetProcAddress(hBink, "_BinkGetFrameBuffersInfo@8");
  78.         qBinkRegisterFrameBuffers = (void (RADEXPLINK *)( HBINK, BINKFRAMEBUFFERS *))GetProcAddress(hBink, "_BinkRegisterFrameBuffers@8");
  79.         qBinkDoFrame = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkDoFrame@4");
  80.         qBinkNextFrame = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkNextFrame@4");
  81.         qBinkWait = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkWait@4");
  82.         qBinkClose = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkClose@4");
  83.         qBinkPause = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkPause@8");
  84.         qBinkCopyToBuffer = (S32  (RADEXPLINK *)(HBINK,void*,S32,U32,U32,U32,U32))GetProcAddress(hBink, "_BinkCopyToBuffer@28");
  85.         qBinkCopyToBufferRect = (S32  (RADEXPLINK *)(HBINK,void*,S32,U32,U32,U32,U32, U32, U32, U32, U32))GetProcAddress(hBink, "_BinkCopyToBufferRect@44");
  86.         qBinkGetRects = (S32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetRects@8");
  87.         qBinkGoto = (void (RADEXPLINK *)(HBINK,U32,S32))GetProcAddress(hBink, "_BinkGoto@12");  // use 1 for the first frame
  88.         qBinkGetKeyFrame = (U32  (RADEXPLINK *)(HBINK,U32,S32))GetProcAddress(hBink, "_BinkGetKeyFrame@12");
  89.         qBinkSetVideoOnOff = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkSetVideoOnOff@8");
  90.         qBinkSetSoundOnOff = (S32  (RADEXPLINK *)(HBINK,S32))GetProcAddress(hBink, "_BinkSetSoundOnOff@8");
  91.         qBinkSetVolume = (void (RADEXPLINK *)(HBINK, U32, S32))GetProcAddress(hBink, "_BinkSetVolume@12");
  92.         qBinkSetPan = (void (RADEXPLINK *)(HBINK,U32, S32))GetProcAddress(hBink, "_BinkSetPan@12");
  93.         qBinkSetMixBins = (void (RADEXPLINK *)(HBINK,U32, U32 PTR4*, U32))GetProcAddress(hBink, "_BinkSetMixBins@16");
  94.         qBinkSetMixBinVolumes = (void (RADEXPLINK *)(HBINK,U32, U32 PTR4*, S32 PTR4*, U32))GetProcAddress(hBink, "_BinkSetMixBinVolumes@20");
  95.         qBinkService = (void (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkService@4");
  96.         qBinkShouldSkip = (S32  (RADEXPLINK *)(HBINK))GetProcAddress(hBink, "_BinkShouldSkip@4");
  97.         qBinkGetPalette = (void (RADEXPLINK *)( void * ))GetProcAddress(hBink, "_BinkGetPalette@4");
  98.         qBinkControlBackgroundIO = (S32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkControlBackgroundIO@8");
  99.         qBinkOpenTrack = (HBINKTRACK (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkOpenTrack@8");
  100.         qBinkCloseTrack = (void (RADEXPLINK *)(HBINKTRACK))GetProcAddress(hBink, "_BinkCloseTrack@4");
  101.         qBinkGetTrackData = (U32  (RADEXPLINK *)(HBINKTRACK,void PTR4*))GetProcAddress(hBink, "_BinkGetTrackData@8");
  102.         qBinkGetTrackType = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackType@8");
  103.         qBinkGetTrackMaxSize = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackMaxSize@8");
  104.         qBinkGetTrackID = (U32  (RADEXPLINK *)(HBINK,U32))GetProcAddress(hBink, "_BinkGetTrackID@8");
  105.         qBinkGetSummary = (void (RADEXPLINK *)(HBINK,BINKSUMMARY PTR4*))GetProcAddress(hBink, "_BinkGetSummary@8");
  106.         qBinkGetRealtime = (void (RADEXPLINK *)(HBINK,BINKREALTIME PTR4*,U32))GetProcAddress(hBink, "_BinkGetRealtime@12");
  107.         qBinkSetSoundTrack = (void (RADEXPLINK *)(U32, U32 PTR4*))GetProcAddress(hBink, "_BinkSetSoundTrack@8");
  108.         qBinkSetIO = (void (RADEXPLINK *)(BINKIOOPEN))GetProcAddress(hBink, "_BinkSetIO@4");
  109.         qBinkSetFrameRate = (void (RADEXPLINK *)(U32,U32))GetProcAddress(hBink, "_BinkSetFrameRate@8");
  110.         qBinkSetSimulate = (void (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkSetSimulate@4");
  111.         qBinkSetIOSize = (void (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkSetIOSize@4");
  112.         qBinkSetSoundSystem = (S32  (RADEXPLINK *)(BINKSNDSYSOPEN, U32))GetProcAddress(hBink, "_BinkSetSoundSystem@8");
  113.         qBinkOpenDirectSound = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenDirectSound@4"); // don't call directly
  114.         qBinkOpenWaveOut = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenWaveOut@4"); // don't call directly
  115.         qBinkOpenMiles = (BINKSNDOPEN (RADEXPLINK *)(U32))GetProcAddress(hBink, "_BinkOpenMiles@4"); // don't call directly
  116.         qBinkDX8SurfaceType = (S32 (RADEXPLINK *)(void*))GetProcAddress(hBink, "_BinkDX8SurfaceType@4");
  117.         qBinkDX9SurfaceType = (S32 (RADEXPLINK *)(void*))GetProcAddress(hBink, "_BinkDX9SurfaceType@4");
  118.         qBinkBufferOpen = (HBINKBUFFER (RADEXPLINK *)( void* /*HWND*/, U32, U32, U32))GetProcAddress(hBink, "_BinkBufferOpen@16");
  119.         qBinkBufferSetHWND = (S32 (RADEXPLINK *)( HBINKBUFFER, void* /*HWND*/))GetProcAddress(hBink, "_BinkBufferSetHWND@8");
  120.         qBinkDDSurfaceType = (S32 (RADEXPLINK *)(void PTR4*))GetProcAddress(hBink, "_BinkDDSurfaceType@4");
  121.         qBinkIsSoftwareCursor = (S32 (RADEXPLINK *)(void PTR4*, void* /*HCURSOR*/))GetProcAddress(hBink, "_BinkIsSoftwareCursor@8");
  122.         qBinkCheckCursor = (S32 (RADEXPLINK *)(void* /*HWND*/,S32,S32,S32,S32))GetProcAddress(hBink, "_BinkCheckCursor@20");
  123.         qBinkBufferSetDirectDraw = (S32 (RADEXPLINK *)(void PTR4*, void PTR4*))GetProcAddress(hBink, "_BinkBufferSetDirectDraw@8");
  124.         qBinkBufferClose = (void (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferClose@4");
  125.         qBinkBufferLock = (S32 (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferLock@4");
  126.         qBinkBufferUnlock = (S32 (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferUnlock@4");
  127.         qBinkBufferSetResolution = (void (RADEXPLINK *)( S32, S32, S32))GetProcAddress(hBink, "_BinkBufferSetResolution@12");
  128.         qBinkBufferCheckWinPos = (void (RADEXPLINK *)( HBINKBUFFER, S32 PTR4*, S32 PTR4*))GetProcAddress(hBink, "_BinkBufferCheckWinPos@12");
  129.         qBinkBufferSetOffset = (S32 (RADEXPLINK *)( HBINKBUFFER, S32, S32))GetProcAddress(hBink, "_BinkBufferSetOffset@12");
  130.         qBinkBufferBlit = (void (RADEXPLINK *)( HBINKBUFFER, BINKRECT PTR4*, U32 ))GetProcAddress(hBink, "_BinkBufferBlit@12");
  131.         qBinkBufferSetScale = (S32 (RADEXPLINK *)( HBINKBUFFER, U32, U32))GetProcAddress(hBink, "_BinkBufferSetScale@12");
  132.         qBinkBufferGetDescription = (char PTR4* (RADEXPLINK *)( HBINKBUFFER))GetProcAddress(hBink, "_BinkBufferGetDescription@4");
  133.         qBinkBufferGetError = (char PTR4* (RADEXPLINK *)())GetProcAddress(hBink, "_BinkBufferGetError@0");
  134.         qBinkRestoreCursor = (void (RADEXPLINK *)(S32))GetProcAddress(hBink, "_BinkRestoreCursor@4");
  135.         qBinkBufferClear = (S32 (RADEXPLINK *)(HBINKBUFFER, U32))GetProcAddress(hBink, "_BinkBufferClear@8");
  136.         qBinkSetMemory = (void (RADEXPLINK *)(BINKMEMALLOC,BINKMEMFREE))GetProcAddress(hBink, "_BinkSetMemory@8");
  137.     }
  138. }

  139. void QBink_Shutdown(void)
  140. {
  141.     if (hBink)
  142.         FreeLibrary(hBink);
  143. }
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|ESFKAMI    

GMT+8, 2018-5-24 02:43 , Processed in 0.237600 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表