Mercurial > mm7
comparison Bink_Smacker.cpp @ 2139:f9b55be70c1b
Слияние
author | Ritor1 |
---|---|
date | Thu, 02 Jan 2014 09:11:28 +0600 |
parents | ba3de1337989 |
children | aff7a7b072b7 |
comparison
equal
deleted
inserted
replaced
2138:7cc14d9d966d | 2139:f9b55be70c1b |
---|---|
22 void (__stdcall *smackw32_SmackBufferClose)(HSMACKBUF) = 0; | 22 void (__stdcall *smackw32_SmackBufferClose)(HSMACKBUF) = 0; |
23 void (__stdcall *smackw32_SmackBlitClose)(HSMACKBLIT) = 0; | 23 void (__stdcall *smackw32_SmackBlitClose)(HSMACKBLIT) = 0; |
24 int (__stdcall *smackw32_SmackBlitClear)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int) = 0; | 24 int (__stdcall *smackw32_SmackBlitClear)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int) = 0; |
25 int (__stdcall *smackw32_SmackGoto)(_SMACK *, long) = 0; | 25 int (__stdcall *smackw32_SmackGoto)(_SMACK *, long) = 0; |
26 int (__stdcall *smackw32_SmackBufferOpen)(HWND a1, long a2, long a3, long a4, long a5, long a6) = nullptr; | 26 int (__stdcall *smackw32_SmackBufferOpen)(HWND a1, long a2, long a3, long a4, long a5, long a6) = nullptr; |
27 void(__stdcall *smackw32_SmackBufferNewPalette)(HSMACKBUF, void *, unsigned int) = nullptr; | |
28 void(__stdcall *smackw32_SmackColorRemapWithTrans)(_SMACK *, void *, unsigned int, unsigned int, unsigned int) = nullptr; | |
27 void SMACKW32_DLL_Initialize() | 29 void SMACKW32_DLL_Initialize() |
28 { | 30 { |
29 HMODULE pDll = LoadLibraryW(L"SmackW32.dll"); | 31 HMODULE pDll = LoadLibraryW(L"SmackW32.dll"); |
30 | 32 |
31 smackw32_SmackSoundUseMSS = (int (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_SmackSoundUseMSS@4"); | 33 #define LOAD(x) smackw32_##x = (decltype(smackw32_##x))GetProcAddress(pDll, #x) |
32 smackw32_SmackUseMMX = (unsigned int (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackUseMMX@4"); | 34 { |
33 smackw32_SmackOpen = (HSMACK (__stdcall *)(HANDLE, unsigned int, unsigned int))GetProcAddress(pDll, "_SmackOpen@12"); | 35 smackw32_SmackSoundUseMSS = (int (__stdcall *)(HDIGDRIVER))GetProcAddress(pDll, "_SmackSoundUseMSS@4"); |
34 smackw32_SmackBlitOpen = (HSMACKBLIT (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackBlitOpen@4"); | 36 smackw32_SmackUseMMX = (unsigned int (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackUseMMX@4"); |
35 smackw32_SmackToBuffer = (void (__stdcall *)(HSMACK, unsigned int, unsigned int, unsigned int, unsigned int, void *, unsigned int))GetProcAddress(pDll, "_SmackToBuffer@28"); | 37 smackw32_SmackOpen = (HSMACK (__stdcall *)(HANDLE, unsigned int, unsigned int))GetProcAddress(pDll, "_SmackOpen@12"); |
36 smackw32_SmackBlitSetPalette = (void (__stdcall *)(HSMACKBLIT, void *, unsigned int))GetProcAddress(pDll, "_SmackBlitSetPalette@12"); | 38 smackw32_SmackBlitOpen = (HSMACKBLIT (__stdcall *)(unsigned int))GetProcAddress(pDll, "_SmackBlitOpen@4"); |
37 smackw32_SmackDoFrame = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackDoFrame@4"); | 39 smackw32_SmackToBuffer = (void (__stdcall *)(HSMACK, unsigned int, unsigned int, unsigned int, unsigned int, void *, unsigned int))GetProcAddress(pDll, "_SmackToBuffer@28"); |
38 smackw32_SmackToBufferRect = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackToBufferRect@8"); | 40 smackw32_SmackBlitSetPalette = (void (__stdcall *)(HSMACKBLIT, void *, unsigned int))GetProcAddress(pDll, "_SmackBlitSetPalette@12"); |
39 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"); | 41 smackw32_SmackDoFrame = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackDoFrame@4"); |
40 smackw32_SmackNextFrame = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackNextFrame@4"); | 42 smackw32_SmackToBufferRect = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackToBufferRect@8"); |
41 smackw32_SmackWait = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackWait@4"); | 43 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"); |
42 smackw32_SmackSoundOnOff = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackSoundOnOff@8"); | 44 smackw32_SmackNextFrame = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackNextFrame@4"); |
43 smackw32_SmackClose = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackClose@4"); | 45 smackw32_SmackWait = (unsigned int (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackWait@4"); |
44 smackw32_SmackBufferClose = (void (__stdcall *)(HSMACKBUF))GetProcAddress(pDll, "_SmackBufferClose@4"); | 46 smackw32_SmackSoundOnOff = (unsigned int (__stdcall *)(HSMACK, unsigned int))GetProcAddress(pDll, "_SmackSoundOnOff@8"); |
45 smackw32_SmackBlitClose = (void (__stdcall *)(HSMACKBLIT))GetProcAddress(pDll, "_SmackBlitClose@4"); | 47 smackw32_SmackClose = (void (__stdcall *)(HSMACK))GetProcAddress(pDll, "_SmackClose@4"); |
46 smackw32_SmackBlitClear = (int (__stdcall *)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int))GetProcAddress(pDll, "_SmackBlitClear@32"); | 48 smackw32_SmackBufferClose = (void (__stdcall *)(HSMACKBUF))GetProcAddress(pDll, "_SmackBufferClose@4"); |
47 smackw32_SmackGoto = (int (__stdcall *)(_SMACK *, long))GetProcAddress(pDll, "_SmackGoto@8"); | 49 smackw32_SmackBlitClose = (void (__stdcall *)(HSMACKBLIT))GetProcAddress(pDll, "_SmackBlitClose@4"); |
48 smackw32_SmackBufferOpen = (int (__stdcall *)(HWND, long, long, long, long, long))GetProcAddress(pDll, "_SmackBufferOpen@24"); | 50 smackw32_SmackBlitClear = (int (__stdcall *)(HSMACKBLIT, unsigned short *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int))GetProcAddress(pDll, "_SmackBlitClear@32"); |
49 } | 51 smackw32_SmackGoto = (int (__stdcall *)(_SMACK *, long))GetProcAddress(pDll, "_SmackGoto@8"); |
50 | 52 smackw32_SmackBufferOpen = (int (__stdcall *)(HWND, long, long, long, long, long))GetProcAddress(pDll, "_SmackBufferOpen@24"); |
51 | 53 smackw32_SmackBufferNewPalette = (void(__stdcall *)(HSMACKBUF, void *, unsigned int))GetProcAddress(pDll, "_SmackBufferNewPalette@12"); |
52 | 54 smackw32_SmackColorRemapWithTrans = (void(__stdcall *)(_SMACK *, void *, unsigned int, unsigned int, unsigned int))GetProcAddress(pDll, "_SmackColorRemapWithTrans@20"); |
53 | 55 //LOAD(SmackBufferNewPalette); |
54 | 56 //LOAD(SmackColorRemapWithTrans); |
57 } | |
58 } | |
59 | |
60 | |
61 | |
62 | |
63 void __stdcall SmackColorRemapWithTrans(_SMACK *a1, void *a2, unsigned int a3, unsigned int a4, unsigned int a5) | |
64 { | |
65 return (smackw32_SmackColorRemapWithTrans)(a1, a2, a3, a4, a5); | |
66 } | |
55 | 67 |
56 void __stdcall SmackBlitClose(HSMACKBLIT hBlit) | 68 void __stdcall SmackBlitClose(HSMACKBLIT hBlit) |
57 { | 69 { |
58 (smackw32_SmackBlitClose)(hBlit); | 70 (smackw32_SmackBlitClose)(hBlit); |
59 } | 71 } |
150 return 0; | 162 return 0; |
151 } | 163 } |
152 | 164 |
153 | 165 |
154 // sub_4D83D0: using guessed type int __stdcall SmackBufferNewPalette(_DWORD, _DWORD, _DWORD); | 166 // sub_4D83D0: using guessed type int __stdcall SmackBufferNewPalette(_DWORD, _DWORD, _DWORD); |
155 int __stdcall SmackBufferNewPalette(long a1, long a2, long a3) | 167 void __stdcall SmackBufferNewPalette(HSMACKBUF a1, void *a2, unsigned int a3) |
156 { | 168 { |
157 //__asm int 3 | 169 (smackw32_SmackBufferNewPalette)(a1, a2, a3); |
158 return 0; | 170 } |
159 } | |
160 | |
161 // sub_4D83D4: using guessed type int __stdcall SmackColorRemapWithTrans(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); | |
162 int __stdcall SmackColorRemapWithTrans(long a1, long a2, long a3, long a4, long a5) | |
163 { | |
164 //__asm int 3 | |
165 return 0; | |
166 } | |
167 | |
168 | |
169 | 171 |
170 | 172 |
171 | 173 |
172 | 174 |
173 | 175 |