annotate Bink_Smacker.cpp @ 160:062e8a8e09bc

LoadWindow(work) 30.11.12
author Ritor1
date Fri, 30 Nov 2012 17:29:38 +0600
parents 8a8dd0164b12
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include "Bink_Smacker.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 int (__stdcall *smackw32_SmackSoundUseMSS)(HDIGDRIVER) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 unsigned int (__stdcall *smackw32_SmackUseMMX)(unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 HSMACK (__stdcall *smackw32_SmackOpen)(HANDLE, unsigned int, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 HSMACKBLIT (__stdcall *smackw32_SmackBlitOpen)(unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 void (__stdcall *smackw32_SmackToBuffer)(HSMACK, unsigned int, unsigned int, unsigned int, unsigned int, void *, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 void (__stdcall *smackw32_SmackBlitSetPalette)(HSMACKBLIT, void *, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 unsigned int (__stdcall *smackw32_SmackDoFrame)(HSMACK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 unsigned int (__stdcall *smackw32_SmackToBufferRect)(HSMACK, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 void (__stdcall *smackw32_SmackBlit)(HSMACKBLIT, void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 void (__stdcall *smackw32_SmackNextFrame)(HSMACK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 unsigned int (__stdcall *smackw32_SmackWait)(HSMACK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 unsigned int (__stdcall *smackw32_SmackSoundOnOff)(HSMACK, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 void (__stdcall *smackw32_SmackClose)(HSMACK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 void (__stdcall *smackw32_SmackBufferClose)(HSMACKBUF) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 void (__stdcall *smackw32_SmackBlitClose)(HSMACKBLIT) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 int (__stdcall *smackw32_SmackBlitClear)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int) = 0;
47
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
25 int (__stdcall *smackw32_SmackGoto)(_SMACK *, long) = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 void SMACKW32_DLL_Initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 HMODULE pDll = LoadLibraryW(L"SmackW32.dll");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 smackw32_SmackSoundUseMSS = (int (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_SmackSoundUseMSS@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 smackw32_SmackUseMMX = (unsigned int (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackUseMMX@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 smackw32_SmackOpen = (HSMACK (__stdcall *)(HANDLE, unsigned int, unsigned int))GetProcAddress(pDll, "_SmackOpen@12");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 smackw32_SmackBlitOpen = (HSMACKBLIT (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackBlitOpen@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 smackw32_SmackToBuffer = (void (__stdcall *)(HSMACK, unsigned int, unsigned int, unsigned int, unsigned int, void *, unsigned int))GetProcAddress(pDll, "_SmackToBuffer@28");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 smackw32_SmackBlitSetPalette = (void (__stdcall *)(HSMACKBLIT, void *, unsigned int))GetProcAddress(pDll, "_SmackBlitSetPalette@12");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 smackw32_SmackDoFrame = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackDoFrame@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 smackw32_SmackToBufferRect = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackToBufferRect@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 smackw32_SmackBlit = (void (__stdcall *)(HSMACKBLIT, void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))GetProcAddress(pDll, "_SmackBlit@44");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 smackw32_SmackNextFrame = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackNextFrame@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 smackw32_SmackWait = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackWait@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 smackw32_SmackSoundOnOff = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackSoundOnOff@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 smackw32_SmackClose = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackClose@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 smackw32_SmackBufferClose = (void (__stdcall *)(HSMACKBUF))GetProcAddress(pDll, "_SmackBufferClose@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 smackw32_SmackBlitClose = (void (__stdcall *)(HSMACKBLIT))GetProcAddress(pDll, "_SmackBlitClose@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 smackw32_SmackBlitClear = (int (__stdcall *)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int))GetProcAddress(pDll, "_SmackBlitClear@32");
47
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
46 smackw32_SmackGoto = (int (__stdcall *)(_SMACK *, long))GetProcAddress(pDll, "_SmackGoto@8");
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 void __stdcall SmackBlitClose(HSMACKBLIT hBlit)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 (smackw32_SmackBlitClose)(hBlit);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 void __stdcall SmackBufferClose(HSMACKBUF hBuf)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 (smackw32_SmackBufferClose)(hBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 void __stdcall SmackClose(HSMACK hSmack)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 (smackw32_SmackClose)(hSmack);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 unsigned int __stdcall SmackSoundOnOff(HSMACK hSmack, unsigned int bOn)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 return (smackw32_SmackSoundOnOff)(hSmack, bOn);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 unsigned int __stdcall SmackWait(HSMACK hSmack)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 return (smackw32_SmackWait)(hSmack);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 void __stdcall SmackNextFrame(HSMACK hSmack)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 (smackw32_SmackNextFrame)(hSmack);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 void __stdcall SmackBlit(HSMACKBLIT hBlit, void *pDest, unsigned int uDestPitch, unsigned int uDestX, unsigned int uDestY, void *pSrc, unsigned int uSrcPitch, unsigned int uSrcX, unsigned int uSrcY, unsigned int uSrcZ, unsigned int uSrcW)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 (smackw32_SmackBlit)(hBlit, pDest, uDestPitch, uDestX, uDestY, pSrc, uSrcPitch, uSrcX, uSrcY, uSrcZ, uSrcW);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 unsigned int __stdcall SmackToBufferRect(HSMACK hSmack, unsigned int uSmackSurface)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 return (smackw32_SmackToBufferRect)(hSmack, uSmackSurface);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 unsigned int __stdcall SmackDoFrame(HSMACK hSmack)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 return (smackw32_SmackDoFrame)(hSmack);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 void __stdcall SmackBlitSetPalette(HSMACKBLIT hBlit, void *pPalette, unsigned int uPalType)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 (smackw32_SmackBlitSetPalette)(hBlit, pPalette, uPalType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 int __stdcall SmackSoundUseMSS(HDIGDRIVER hDrv)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 return (smackw32_SmackSoundUseMSS)(hDrv);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 unsigned int __stdcall SmackUseMMX(unsigned int flag)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 return (smackw32_SmackUseMMX)(flag);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 HSMACK __stdcall SmackOpen(HANDLE hSourceFile, unsigned int uFlags, unsigned int uExtraBuffers)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 return (smackw32_SmackOpen)(hSourceFile, uFlags, uExtraBuffers);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 HSMACKBLIT __stdcall SmackBlitOpen(unsigned int uSurfaceFormat)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 return (smackw32_SmackBlitOpen)(uSurfaceFormat);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 void __stdcall SmackToBuffer(HSMACK hSmack, unsigned int uX, unsigned int uY, unsigned int uPitch, unsigned int uHeight, void *pBuffer, unsigned int uFlags)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 (smackw32_SmackToBuffer)(hSmack, uX, uY, uPitch, uHeight, pBuffer, uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 int __stdcall SmackBlitClear(HSMACKBLIT a1, unsigned short *pFrameData, unsigned int uTargetSurfacePitch, unsigned int uOutX, unsigned int uOutY, unsigned int uOutZ, unsigned int uOutW, int a8)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 return (smackw32_SmackBlitClear)(a1, pFrameData, uTargetSurfacePitch, uOutX, uOutY, uOutZ, uOutW, a8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133
47
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
134 int __stdcall SmackGoto(_SMACK *a1, long a2)
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
135 {
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
136 return (smackw32_SmackGoto)(a1, a2);
8a8dd0164b12 BLV render
Nomad
parents: 0
diff changeset
137 }
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 int __stdcall SmackBufferOpen(HWND a1, long a2, long a3, long a4, long a5, long a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 __asm int 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 int __fastcall SmackVolumePan(long a1, long a2, _SMACK *a3, long a4, long a5, long a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 __asm int 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 // sub_4D83D0: using guessed type int __stdcall SmackBufferNewPalette(_DWORD, _DWORD, _DWORD);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 int __stdcall SmackBufferNewPalette(long a1, long a2, long a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 __asm int 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 // sub_4D83D4: using guessed type int __stdcall SmackColorRemapWithTrans(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 int __stdcall SmackColorRemapWithTrans(long a1, long a2, long a3, long a4, long a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 __asm int 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 int (__stdcall *binkw32_BinkDDSurfaceType)(struct IDirectDrawSurface *) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 int (__stdcall *binkw32_BinkSetSoundSystem)(void *, HDIGDRIVER) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 int (__stdcall *binkw32_BinkOpenMiles)(int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 HBINK (__stdcall *binkw32_BinkOpen)(void *, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 int (__stdcall *binkw32_BinkWait)(HBINK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 int (__stdcall *binkw32_BinkDoFrame)(HBINK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 int (__stdcall *binkw32_BinkNextFrame)(HBINK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 int (__stdcall *binkw32_BinkGetRects)(HBINK, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 int (__stdcall *binkw32_BinkCopyToBuffer)(HBINK, void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 int (__stdcall *binkw32_BinkPause)(HBINK, int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 int (__stdcall *binkw32_BinkClose)(HBINK) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 int (__stdcall *binkw32_BinkBufferSetOffset)(void *, int, int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 int (__stdcall *binkw32_BinkBufferSetScale)(void *, unsigned int, unsigned int) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 void BINKW32_DLL_Initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 HMODULE pDll = LoadLibraryW(L"BinkW32.dll");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 binkw32_BinkDDSurfaceType = (int (__stdcall *)(struct IDirectDrawSurface *))GetProcAddress(pDll, "_BinkDDSurfaceType@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 binkw32_BinkSetSoundSystem = (int (__stdcall *)(void *, HDIGDRIVER))GetProcAddress(pDll, "_BinkSetSoundSystem@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 binkw32_BinkOpenMiles = (int (__stdcall *)(int))GetProcAddress(pDll, "_BinkOpenMiles@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 binkw32_BinkOpen = (HBINK (__stdcall *)(void *, unsigned int))GetProcAddress(pDll, "_BinkOpen@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 binkw32_BinkWait = (int (__stdcall *)(HBINK))GetProcAddress(pDll, "_BinkWait@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 binkw32_BinkBufferSetOffset = (int (__stdcall *)(void *, int, int))GetProcAddress(pDll, "_BinkBufferSetOffset@12");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 binkw32_BinkBufferSetScale = (int (__stdcall *)(void *, unsigned int, unsigned int))GetProcAddress(pDll, "_BinkBufferSetScale@12");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 binkw32_BinkDoFrame = (int (__stdcall *)(HBINK))GetProcAddress(pDll, "_BinkDoFrame@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 binkw32_BinkNextFrame = (int (__stdcall *)(HBINK))GetProcAddress(pDll, "_BinkNextFrame@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 binkw32_BinkGetRects = (int (__stdcall *)(HBINK, unsigned int))GetProcAddress(pDll, "_BinkGetRects@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 binkw32_BinkCopyToBuffer = (int (__stdcall *)(HBINK, void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))GetProcAddress(pDll, "_BinkCopyToBuffer@28");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 binkw32_BinkPause = (int (__stdcall *)(HBINK, int))GetProcAddress(pDll, "_BinkPause@8");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 binkw32_BinkClose = (int (__stdcall *)(HBINK))GetProcAddress(pDll, "_BinkClose@4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 int __stdcall BinkPause(HBINK hBink, int bPause)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 return (binkw32_BinkPause)(hBink, bPause);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 int __stdcall BinkClose(HBINK hBink)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 return (binkw32_BinkClose)(hBink);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 int __stdcall BinkGetRects(HBINK hBink, unsigned int uFlags)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 return (binkw32_BinkGetRects)(hBink, uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 int __stdcall BinkCopyToBuffer(HBINK hBink, void *pBuffer, unsigned int lPitch, unsigned int uNumScanlines, unsigned int uX, unsigned int uY, unsigned int uFlags)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 return (binkw32_BinkCopyToBuffer)(hBink, pBuffer, lPitch, uNumScanlines, uX, uY, uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 int __stdcall BinkDoFrame(HBINK hBink)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 return (binkw32_BinkDoFrame)(hBink);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 int __stdcall BinkNextFrame(HBINK hBink)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 return (binkw32_BinkNextFrame)(hBink);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 HBINK __stdcall BinkOpen(void *hFileHandle, unsigned int uFlags)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 return (binkw32_BinkOpen)(hFileHandle, uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 int __stdcall BinkOpenMiles(int unk)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 return (binkw32_BinkOpenMiles)(unk);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 int __stdcall BinkWait(HBINK hBink)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 return (binkw32_BinkWait)(hBink);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 int __stdcall BinkBufferSetOffset(void *pStruct, int b, int c)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 return (binkw32_BinkBufferSetOffset)(pStruct, b, c);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 int __stdcall BinkBufferSetScale(void *pStruct, unsigned int uWidth, unsigned int uHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 return (binkw32_BinkBufferSetScale)(pStruct, uWidth, uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 int __stdcall BinkDDSurfaceType(struct IDirectDrawSurface *pDDS)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 return (binkw32_BinkDDSurfaceType)(pDDS);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 int __stdcall BinkSetSoundSystem(void *pSoundSystem, HDIGDRIVER hDrv)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 return (binkw32_BinkSetSoundSystem)(pSoundSystem, hDrv);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 int __stdcall BinkGoto(_BINK *a1, long a2, long a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 __asm int 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328