annotate Bink_Smacker.h @ 110:430786d916d6

6.11.12 SaveLoad
author Ritor1
date Tue, 06 Nov 2012 17:30:24 +0600
parents 8b8875f5b359
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include "AIL.h"
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 void BINKW32_DLL_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 int __stdcall BinkDDSurfaceType(struct IDirectDrawSurface *);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 int __stdcall BinkSetSoundSystem(void *pSoundSystem, HDIGDRIVER hDrv);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 int __stdcall BinkOpenMiles(int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 HBINK __stdcall BinkOpen(void *hFileHandle, unsigned int uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 int __stdcall BinkWait(HBINK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 int __stdcall BinkDoFrame(HBINK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 int __stdcall BinkNextFrame(HBINK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 int __stdcall BinkGetRects(HBINK hBink, unsigned int uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 int __stdcall BinkCopyToBuffer(HBINK hBink, void *pBuffer, unsigned int lPitch, unsigned int uNumLines, unsigned int uX, unsigned int uY, unsigned int uFlags);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 int __stdcall BinkPause(HBINK, int bPause);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 int __stdcall BinkClose(HBINK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 int __stdcall BinkGoto(HBINK, long a2, long a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 int __stdcall BinkBufferSetOffset(void *, int, int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 int __stdcall BinkBufferSetScale(void *, unsigned int uWidth, unsigned int uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 void SMACKW32_DLL_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 struct _SMACK
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 unsigned int Version; // SMK2 only right now
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 unsigned int Width; // Width (1 based, 640 for example)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 unsigned int Height; // Height (1 based, 480 for example)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 unsigned int Frames; // Number of frames (1 based, 100 = 100 frames)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 unsigned int MSPerFrame; // Frame Rate
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 unsigned int SmackerType; // bit 0 set=ring frame
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 unsigned int LargestInTrack[7]; // Largest single size for each track
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 unsigned int tablesize; // Size of the init tables
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 unsigned int codesize; // Compression info
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 unsigned int absize; // ditto
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 unsigned int detailsize; // ditto
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 unsigned int typesize; // ditto
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 unsigned int TrackType[7]; // high byte=0x80-Comp,0x40-PCM data,0x20-16 bit,0x10-stereo
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 unsigned int extra; // extra value (should be zero)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 unsigned int NewPalette; // set to one if the palette changed
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 unsigned char Palette[772]; // palette data
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 unsigned int PalType; // type of palette
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 unsigned int FrameNum; // 0374 Frame Number to be displayed
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 unsigned int FrameSize; // The current frame's size in bytes
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 unsigned int SndSize; // The current frame sound tracks' size in bytes
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 int LastRectx; // 0380 Rect set in from SmackToBufferRect (X coord)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 int LastRecty; // Rect set in from SmackToBufferRect (Y coord)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 int LastRectw; // Rect set in from SmackToBufferRect (Width)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 int LastRecth; // 038C Rect set in from SmackToBufferRect (Height)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 unsigned int OpenFlags; // flags used on open
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 unsigned int LeftOfs; // Left Offset used in SmackTo
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 unsigned int TopOfs; // Top Offset used in SmackTo
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 unsigned int LargestFrameSize; // Largest frame size
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 unsigned int Highest1SecRate; // Highest 1 sec data rate
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 unsigned int Highest1SecFrame; // Highest 1 sec data rate starting frame
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 unsigned int ReadError; // Set to non-zero if a read error has ocurred
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 unsigned int addr32; // translated address for 16 bit interface
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 struct _SMACKBLIT
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 unsigned int Flags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 unsigned char *Palette;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 unsigned int PalType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 unsigned short *SmoothTable;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 unsigned short *Conv8to16Table;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 unsigned int whichmode;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 unsigned int palindex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 unsigned int t16index;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 unsigned int smoothindex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 unsigned int smoothtype;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 unsigned int firstpalette;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 struct _SMACKBUF
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 unsigned int Reversed; // 1 if the buffer is upside down
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 unsigned int SurfaceType; // SMACKSURFACExxxx defines
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 unsigned int BlitType; // SMACKxxxxBLIT defines
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 unsigned int FullScreen; // 1 if full-screen
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 unsigned int Width;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 unsigned int Height;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 unsigned int Pitch;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 unsigned int Zoomed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 unsigned int ZWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 unsigned int ZHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 unsigned int DispColors; // colors on the screen
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 unsigned int MaxPalColors; // total possible colors in palette (usually 256)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 unsigned int PalColorsInUse; // Used colors in palette (usually 236)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 unsigned int StartPalColor; // first usable color index (usually 10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 unsigned int EndPalColor; // last usable color index (usually 246)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 RGBQUAD Palette[256];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 unsigned int PalType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 unsigned int forceredraw; // force a complete redraw on next blit (for >8bit)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 unsigned int didapalette; // force an invalidate on the next palette change
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 void * Buffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 void * DIBRestore;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 unsigned int OurBitmap;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 unsigned int OrigBitmap;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 unsigned int OurPalette;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 unsigned int WinGDC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 unsigned int FullFocused;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 unsigned int ParentHwnd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 unsigned int OldParWndProc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 unsigned int OldDispWndProc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 unsigned int DispHwnd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 unsigned int WinGBufHandle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 void * lpDD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 void * lpDDSP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 unsigned int DDSurfaceType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 struct _SMACKBLIT DDblit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 int ddSoftwarecur;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 int didaddblit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 int lastwasdd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 RECT ddscreen;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 int manyblits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 int * blitrects;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 int * rectsptr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 int maxrects;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 int numrects;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 HDC lastdc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 int __stdcall SmackSoundUseMSS(HDIGDRIVER hDrv);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 unsigned int __stdcall SmackUseMMX(unsigned int flag);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 HSMACK __stdcall SmackOpen(HANDLE hSourceFile, unsigned int uFlags, unsigned int uExtraBuffers);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 HSMACKBLIT __stdcall SmackBlitOpen(unsigned int uSurfaceFormat);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 void __stdcall SmackToBuffer(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
154 void __stdcall SmackBlitSetPalette(HSMACKBLIT hBlit, void *pPalette, unsigned int uPalType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 unsigned int __stdcall SmackDoFrame(HSMACK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 unsigned int __stdcall SmackToBufferRect(HSMACK, unsigned int uSmackSurface);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 void __stdcall SmackBlit(HSMACKBLIT, 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
158 void __stdcall SmackNextFrame(HSMACK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 unsigned int __stdcall SmackWait(HSMACK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 unsigned int __stdcall SmackSoundOnOff(HSMACK, unsigned int bOn);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 void __stdcall SmackClose(HSMACK);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 void __stdcall SmackBufferClose(HSMACKBUF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 void __stdcall SmackBlitClose(HSMACKBLIT);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 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
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 int __stdcall SmackBufferOpen(HWND a1, long a2, long a3, long a4, long a5, long a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 int __fastcall SmackVolumePan(long a1, long a2, _SMACK *a3, long a4, long a5, long a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 int __stdcall SmackGoto(_SMACK *a1, long a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 // sub_4D83D0: using guessed type int __stdcall SmackBufferNewPalette(_DWORD, _DWORD, _DWORD);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 int __stdcall SmackBufferNewPalette(long a1, long a2, long a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 // sub_4D83D4: using guessed type int __stdcall SmackColorRemapWithTrans(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 int __stdcall SmackColorRemapWithTrans(long a1, long a2, long a3, long a4, long a5);
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