-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbink.h
More file actions
77 lines (67 loc) · 2.47 KB
/
bink.h
File metadata and controls
77 lines (67 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file
*
* @author OmniBlade
*
* @brief Stub library containing subset of functions from binkw32.dll as used by the W3D engine.
*
* @copyright This is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version
* 2 of the License, or (at your option) any later version.
* A full copy of the GNU General Public License can be found in
* LICENSE
*/
#pragma once
#if !defined _MSC_VER
#if !defined(__stdcall)
#if defined __has_attribute && __has_attribute(stdcall)
#define __stdcall __attribute__((stdcall))
#else
#define __stdcall
#endif
#endif /* !defined __stdcall */
#endif /* !defined COMPILER_MSVC */
#ifdef BINKDLL
#define BINKEXPORT __declspec(dllexport)
#else
#define BINKEXPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BINKSURFACE24 1
#define BINKSURFACE32 3
#define BINKSURFACE555 9
#define BINKSURFACE565 10
#define BINKPRELOADALL 0x00002000
#define BINKCOPYNOSCALING 0x70000000
typedef struct BINK
{
unsigned int Width;
unsigned int Height;
unsigned int Frames;
unsigned int FrameNum;
unsigned int LastFrameNum;
unsigned int FrameRate;
unsigned int FrameRateDiv;
/* Original struct has more members, but we only need these to match the ABI*/
} BINK, *HBINK;
typedef void *(__stdcall *SndOpenCallback)(unsigned long param);
typedef unsigned int u32;
BINKEXPORT HBINK __stdcall BinkOpen(const char *name, unsigned int flags);
BINKEXPORT void __stdcall BinkSetSoundTrack(unsigned int total_tracks, unsigned int *tracks);
BINKEXPORT int __stdcall BinkSetSoundSystem(SndOpenCallback open, unsigned long param);
BINKEXPORT void *__stdcall BinkOpenDirectSound(unsigned long param);
BINKEXPORT void __stdcall BinkClose(HBINK handle);
BINKEXPORT int __stdcall BinkWait(HBINK handle);
BINKEXPORT int __stdcall BinkDoFrame(HBINK handle);
BINKEXPORT int __stdcall BinkCopyToBuffer(
HBINK handle, void *dest, int destpitch, unsigned int destheight, unsigned int destx, unsigned int desty, unsigned int flags);
BINKEXPORT void __stdcall BinkSetVolume(HBINK handle, unsigned int trackid, int volume);
BINKEXPORT void __stdcall BinkNextFrame(HBINK handle);
BINKEXPORT void __stdcall BinkGoto(HBINK handle, unsigned int frame, int flags);
#define BinkSoundUseDirectSound(x) BinkSetSoundSystem(BinkOpenDirectSound, (unsigned long)x)
#ifdef __cplusplus
} // extern "C"
#endif