Mercurial > might-and-magic-trilogy
comparison VideoPlayer.h @ 0:8b8875f5b359
Initial commit
author | Nomad |
---|---|
date | Fri, 05 Oct 2012 16:07:14 +0200 |
parents | |
children | 3fa5d0522f92 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:8b8875f5b359 |
---|---|
1 #pragma once | |
2 #include "OSAPI.h" | |
3 | |
4 #include "Texture.h" | |
5 #include "mm7_data.h" | |
6 | |
7 | |
8 | |
9 #pragma pack(push, 1) | |
10 | |
11 | |
12 | |
13 struct _BINK | |
14 { | |
15 int Width; | |
16 int Height; | |
17 int Frame; | |
18 int CurrentFrame; | |
19 int Data1; | |
20 int FrameRate; | |
21 int field_18[3]; | |
22 int Flags; | |
23 }; | |
24 | |
25 struct _BINKBUF | |
26 { | |
27 int uWidth; | |
28 int uHeight; | |
29 int field_8; | |
30 int field_C; | |
31 int uBinkDDSurfaceType; | |
32 void *pDDrawSurfaceData; | |
33 int uDDrawSurfacePitch; | |
34 int field_1C; | |
35 int field_20; | |
36 int field_24; | |
37 int field_28; | |
38 int field_2C; | |
39 int field_30; | |
40 int field_34; | |
41 int field_38; | |
42 int field_3C; | |
43 int field_40; | |
44 int field_44; | |
45 struct IDirectDrawSurface *pTargetDDrawSurface; | |
46 int field_4C; | |
47 int uRectX; | |
48 int uRectY; | |
49 HWND hWnd; | |
50 int field_5C; | |
51 float field_60; | |
52 float field_64; | |
53 int field_68; | |
54 int field_6C; | |
55 void *pDDrawSurfaceData_; | |
56 int field_74; | |
57 int field_78; | |
58 }; | |
59 #pragma pack(pop) | |
60 | |
61 | |
62 | |
63 | |
64 #pragma pack(push, 1) | |
65 struct MovieHeader | |
66 { | |
67 char pVideoName[40]; | |
68 unsigned int uFileOffset; | |
69 }; | |
70 #pragma pack(pop) | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 void __cdecl ShowIntroVideo_and_LoadingScreen(); | |
77 | |
78 | |
79 | |
80 | |
81 #pragma pack(push, 1) | |
82 struct VideoPlayer | |
83 { | |
84 //----- (004BE6F5) -------------------------------------------------------- | |
85 inline VideoPlayer(): | |
86 field_54(0), | |
87 pBinkMovie(nullptr), pBinkBuffer(nullptr), | |
88 pSmackerMovie(nullptr), pSmackerBuffer(nullptr), pSmackMovieBlit(nullptr) | |
89 { | |
90 //RGBTexture::RGBTexture(&pVideoPlayer->pVideoFrame); | |
91 bStopBeforeSchedule = false; | |
92 field_40 = 0; | |
93 byte_F8BC0C = 0; | |
94 //pBinkMovie = nullptr; | |
95 } | |
96 //----- (004BECBD) -------------------------------------------------------- | |
97 virtual ~VideoPlayer() | |
98 { | |
99 bStopBeforeSchedule = false; | |
100 field_40 = 0; | |
101 pVideoFrame.Release(); | |
102 } | |
103 | |
104 void PlayDeathMovie(); | |
105 unsigned int SmackCheckSurfaceFromat(); | |
106 void Initialize(); | |
107 void Prepare(); | |
108 void Unload(); | |
109 void _4BECD5(unsigned int a2); | |
110 void BinkDrawFrame(HWND hWnd, int a3, int a4); | |
111 void BinkUpdatePalette(HWND hWnd) {} | |
112 void SmackDrawFrame(HWND hWnd, int a3, int a4); | |
113 void SmackUpdatePalette(HWND hWnd); | |
114 _BINK *OpenBink(const char *pName); | |
115 struct _SMACK *OpenSmack(const char *pFilename); | |
116 void _4BF28F(const char *pMovieName, unsigned int a3_1); | |
117 bool AnyMovieLoaded(); | |
118 void OpenMovie(const char *pFilename, unsigned int bLoop, int a4); | |
119 void _4BF5B2(); | |
120 void _4BF73A(); | |
121 _BINKBUF *CreateBinkBuffer(HWND a1, unsigned int uWidth, unsigned int uHeight, char a4); | |
122 | |
123 static void __fastcall MovieLoop(const char *pMovieName, int a2, int a3, int a4); | |
124 | |
125 | |
126 RGBTexture pVideoFrame; | |
127 struct _SMACK *pSmackerMovie; | |
128 struct _SMACKBUF *pSmackerBuffer; | |
129 char *pSomeSmackerBuffer; | |
130 int field_34; | |
131 MovieHeader *pMightVideoHeaders; | |
132 MovieHeader *pMagicVideoHeaders; | |
133 int field_40; | |
134 int field_44; | |
135 unsigned int uNumMightVideoHeaders; | |
136 unsigned int uNumMagicVideoHeaders; | |
137 int uBinkDirectDrawSurfaceType; | |
138 int field_54; | |
139 unsigned int bPlayingMovie; | |
140 unsigned int bFirstFrame; | |
141 unsigned int bUsingSmackerMMX; | |
142 unsigned int bLoopPlaying; | |
143 int field_68; | |
144 unsigned int bStopBeforeSchedule; | |
145 HWND hWindow; | |
146 struct _SMACKBLIT *pSmackMovieBlit; | |
147 HANDLE hMightVid; | |
148 HANDLE hMagicVid; | |
149 _BINK *pBinkMovie; | |
150 _BINKBUF *pBinkBuffer; | |
151 char field_88[20]; | |
152 unsigned int uMovieFormat; | |
153 int dword_0000A0; | |
154 char pCurrentMovieName[64]; | |
155 char pVideoFrameTextureFilename[32]; | |
156 }; | |
157 #pragma pack(pop) | |
158 | |
159 | |
160 | |
161 | |
162 | |
163 extern VideoPlayer *pVideoPlayer; |