annotate VideoPlayer.cpp @ 1111:044d65e41250

Merge
author Grumpy7
date Mon, 27 May 2013 23:07:13 +0200
parents 5d5c78088274
children 29a8defbad9e
rev   line source
0
Ritor1
parents:
diff changeset
1 #include "OSAPI.h"
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3 #include "Bink_Smacker.h"
Ritor1
parents:
diff changeset
4
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 898
diff changeset
5 #include "CShow.h"
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 898
diff changeset
6 #include "Mouse.h"
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 898
diff changeset
7
0
Ritor1
parents:
diff changeset
8 #include "OSInfo.h"
Ritor1
parents:
diff changeset
9 #include "VideoPlayer.h"
Ritor1
parents:
diff changeset
10 #include "AudioPlayer.h"
Ritor1
parents:
diff changeset
11 #include "Game.h"
Ritor1
parents:
diff changeset
12 #include "Render.h"
Ritor1
parents:
diff changeset
13 #include "Party.h"
Ritor1
parents:
diff changeset
14 #include "GUIWindow.h"
Ritor1
parents:
diff changeset
15 #include "Allocator.h"
Ritor1
parents:
diff changeset
16 #include "Time.h"
Ritor1
parents:
diff changeset
17 #include "Log.h"
629
59713bb36033 houses func moved to uihouses
Gloval
parents: 481
diff changeset
18 #include "UIHouses.h"
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
19 #include "texts.h"
481
5b6e2021c6fe HOUSE_ID
Ritor1
parents: 480
diff changeset
20 #include "MM7.h"
0
Ritor1
parents:
diff changeset
21 #include "mm7_data.h"
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24 VideoPlayer *pVideoPlayer = nullptr;
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32 #pragma comment(lib, "Version.lib")
Ritor1
parents:
diff changeset
33 bool GetDllVersion(const wchar_t *pDllName, uint *pMajor, uint *pMinor)
Ritor1
parents:
diff changeset
34 {
Ritor1
parents:
diff changeset
35 uint uVersionSize = GetFileVersionInfoSizeW(pDllName, nullptr);
Ritor1
parents:
diff changeset
36 void *pVersionData = HeapAlloc(GetProcessHeap(), 0, uVersionSize);
Ritor1
parents:
diff changeset
37 {
Ritor1
parents:
diff changeset
38 GetFileVersionInfoW(pDllName, 0, uVersionSize, pVersionData);
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40 VS_FIXEDFILEINFO *pInfo = nullptr;
Ritor1
parents:
diff changeset
41 UINT uInfoSize = 0;
Ritor1
parents:
diff changeset
42 VerQueryValueW(pVersionData, L"\\", (void **)&pInfo, &uInfoSize);
Ritor1
parents:
diff changeset
43
Ritor1
parents:
diff changeset
44 if (!pMajor || !pMinor)
Ritor1
parents:
diff changeset
45 {
Ritor1
parents:
diff changeset
46 HeapFree(GetProcessHeap(), 0, pVersionData);
Ritor1
parents:
diff changeset
47 return false;
Ritor1
parents:
diff changeset
48 }
Ritor1
parents:
diff changeset
49 *pMajor = pInfo->dwFileVersionMS;
Ritor1
parents:
diff changeset
50 *pMinor = pInfo->dwFileVersionLS;
Ritor1
parents:
diff changeset
51 }
Ritor1
parents:
diff changeset
52 HeapFree(GetProcessHeap(), 0, pVersionData);
Ritor1
parents:
diff changeset
53 return true;
Ritor1
parents:
diff changeset
54 }
Ritor1
parents:
diff changeset
55
Ritor1
parents:
diff changeset
56
Ritor1
parents:
diff changeset
57 // 3.15.1.0:
Ritor1
parents:
diff changeset
58 // 3 15 1 0
Ritor1
parents:
diff changeset
59 // 0x0003000F00010000
Ritor1
parents:
diff changeset
60 unsigned __int64 uBinkVersion;
Ritor1
parents:
diff changeset
61
Ritor1
parents:
diff changeset
62
Ritor1
parents:
diff changeset
63
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65
Ritor1
parents:
diff changeset
66
Ritor1
parents:
diff changeset
67 //----- (004BFE2D) --------------------------------------------------------
Ritor1
parents:
diff changeset
68 _BINKBUF *VideoPlayer::CreateBinkBuffer(HWND hWindow, unsigned int uWidth, unsigned int uHeight, char a4)
Ritor1
parents:
diff changeset
69 {
Ritor1
parents:
diff changeset
70 __int32 v4; // edi@3
Ritor1
parents:
diff changeset
71 _BINKBUF *v5; // esi@3
Ritor1
parents:
diff changeset
72 HRESULT v6; // eax@5
Ritor1
parents:
diff changeset
73 IDirectDrawSurface *v7; // eax@6
Ritor1
parents:
diff changeset
74 HRESULT v8; // eax@9
Ritor1
parents:
diff changeset
75 char v9; // al@11
Ritor1
parents:
diff changeset
76 DDSURFACEDESC2 v11; // [sp+Ch] [bp-108h]@7
Ritor1
parents:
diff changeset
77 DDSURFACEDESC Dst; // [sp+88h] [bp-8Ch]@3
Ritor1
parents:
diff changeset
78 unsigned int v13; // [sp+F4h] [bp-20h]@1
Ritor1
parents:
diff changeset
79 struct tagRECT Rect; // [sp+F8h] [bp-1Ch]@11
Ritor1
parents:
diff changeset
80 IDirectDrawSurface4 *v15; // [sp+108h] [bp-Ch]@7
Ritor1
parents:
diff changeset
81 IDirectDrawSurface2 *a2; // [sp+10Ch] [bp-8h]@3
Ritor1
parents:
diff changeset
82 HWND hWnd; // [sp+110h] [bp-4h]@1
Ritor1
parents:
diff changeset
83
Ritor1
parents:
diff changeset
84 v13 = uWidth;
Ritor1
parents:
diff changeset
85 hWnd = hWindow;
Ritor1
parents:
diff changeset
86 if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
Ritor1
parents:
diff changeset
87 {
Ritor1
parents:
diff changeset
88 v4 = 0;
Ritor1
parents:
diff changeset
89 v15 = 0;
Ritor1
parents:
diff changeset
90
Ritor1
parents:
diff changeset
91 if (uBinkVersion == 0x0001000500150000)
Ritor1
parents:
diff changeset
92 {
Ritor1
parents:
diff changeset
93 v5 = new _BINKBUF_1_5_21_0;
Ritor1
parents:
diff changeset
94 memset(v5, 0, sizeof(_BINKBUF_1_5_21_0));
Ritor1
parents:
diff changeset
95 }
Ritor1
parents:
diff changeset
96 else if (uBinkVersion == 0x0003000000000000)
Ritor1
parents:
diff changeset
97 {
Ritor1
parents:
diff changeset
98 v5 = new _BINKBUF_3_0_0_0;
Ritor1
parents:
diff changeset
99 memset(v5, 0, sizeof(_BINKBUF_3_0_0_0));
Ritor1
parents:
diff changeset
100 }
Ritor1
parents:
diff changeset
101
Ritor1
parents:
diff changeset
102 memset(&v11, 0, 0x7Cu);
Ritor1
parents:
diff changeset
103 v11.dwSize = 124;
Ritor1
parents:
diff changeset
104 v11.dwWidth = v13;
Ritor1
parents:
diff changeset
105 v11.dwFlags = 0x1007u; // DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT
Ritor1
parents:
diff changeset
106 v11.ddsCaps.dwCaps = 0x4040u; // DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY
Ritor1
parents:
diff changeset
107 v11.dwHeight = uHeight;
Ritor1
parents:
diff changeset
108 *(_QWORD *)&v11.ddpfPixelFormat.dwSize = 0x400000020ui64;// DDPF_FOURCC
Ritor1
parents:
diff changeset
109 v11.ddpfPixelFormat.dwFourCC = 0x32595559u;
Ritor1
parents:
diff changeset
110 if ( dword_6BE384_2dacceloff || pRenderer->pDirectDraw4->CreateSurface(&v11, &v15, 0) )
Ritor1
parents:
diff changeset
111 {
Ritor1
parents:
diff changeset
112 memset(&v11.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT));
Ritor1
parents:
diff changeset
113
Ritor1
parents:
diff changeset
114 v11.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
Ritor1
parents:
diff changeset
115 v11.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
Ritor1
parents:
diff changeset
116
Ritor1
parents:
diff changeset
117 auto hr = pRenderer->pDirectDraw4->CreateSurface(&v11, &v15, 0);
Ritor1
parents:
diff changeset
118 ErrD3D(hr, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Video.cpp:1476");
Ritor1
parents:
diff changeset
119 }
Ritor1
parents:
diff changeset
120 v5->uWidth = v11.dwWidth;
Ritor1
parents:
diff changeset
121 v5->uHeight = v11.dwHeight;
Ritor1
parents:
diff changeset
122 v5->uBinkDDSurfaceType = BinkDDSurfaceType((IDirectDrawSurface *)v15);
Ritor1
parents:
diff changeset
123 v5->field_38 = 0;
Ritor1
parents:
diff changeset
124 v7 = (IDirectDrawSurface *)v15;
Ritor1
parents:
diff changeset
125 }
Ritor1
parents:
diff changeset
126 else
Ritor1
parents:
diff changeset
127 {
Ritor1
parents:
diff changeset
128 v4 = 0;
Ritor1
parents:
diff changeset
129 a2 = 0;
Ritor1
parents:
diff changeset
130
Ritor1
parents:
diff changeset
131
Ritor1
parents:
diff changeset
132 if (uBinkVersion == 0x0001000500150000)
Ritor1
parents:
diff changeset
133 {
Ritor1
parents:
diff changeset
134 v5 = new _BINKBUF_1_5_21_0;
Ritor1
parents:
diff changeset
135 memset(v5, 0, sizeof(_BINKBUF_1_5_21_0));
Ritor1
parents:
diff changeset
136 }
Ritor1
parents:
diff changeset
137 else if (uBinkVersion == 0x0003000000000000)
Ritor1
parents:
diff changeset
138 {
Ritor1
parents:
diff changeset
139 v5 = new _BINKBUF_3_0_0_0;
Ritor1
parents:
diff changeset
140 memset(v5, 0, sizeof(_BINKBUF_3_0_0_0));
Ritor1
parents:
diff changeset
141 }
Ritor1
parents:
diff changeset
142
Ritor1
parents:
diff changeset
143 memset(&Dst, 0, 0x6Cu);
Ritor1
parents:
diff changeset
144 Dst.dwSize = 108;
Ritor1
parents:
diff changeset
145 Dst.dwWidth = v13;
Ritor1
parents:
diff changeset
146 Dst.dwFlags = 4103;
Ritor1
parents:
diff changeset
147 Dst.ddsCaps.dwCaps = 16448;
Ritor1
parents:
diff changeset
148 Dst.dwHeight = uHeight;
Ritor1
parents:
diff changeset
149 Dst.ddpfPixelFormat.dwSize = 32;
Ritor1
parents:
diff changeset
150 Dst.ddpfPixelFormat.dwFlags = 4;
Ritor1
parents:
diff changeset
151 Dst.ddpfPixelFormat.dwFourCC = 844715353;
Ritor1
parents:
diff changeset
152 if ( dword_6BE384_2dacceloff
Ritor1
parents:
diff changeset
153 || pRenderer->pDirectDraw2->CreateSurface(&Dst, (LPDIRECTDRAWSURFACE *)&a2, 0) )
Ritor1
parents:
diff changeset
154 {
Ritor1
parents:
diff changeset
155 memset(&Dst.ddpfPixelFormat, 0, sizeof(DDPIXELFORMAT));
Ritor1
parents:
diff changeset
156
Ritor1
parents:
diff changeset
157 Dst.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
Ritor1
parents:
diff changeset
158 Dst.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
Ritor1
parents:
diff changeset
159
Ritor1
parents:
diff changeset
160 auto hr = pRenderer->pDirectDraw2->CreateSurface(&Dst, (LPDIRECTDRAWSURFACE *)&a2, 0);
Ritor1
parents:
diff changeset
161 ErrD3D(hr, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Video.cpp:1426");
Ritor1
parents:
diff changeset
162 }
Ritor1
parents:
diff changeset
163 v5->uWidth = Dst.dwWidth;
Ritor1
parents:
diff changeset
164 v5->uHeight = Dst.dwHeight;
Ritor1
parents:
diff changeset
165 v5->uBinkDDSurfaceType = BinkDDSurfaceType((IDirectDrawSurface *)a2);
Ritor1
parents:
diff changeset
166 v5->field_38 = 0;
Ritor1
parents:
diff changeset
167 v7 = (IDirectDrawSurface *)a2;
Ritor1
parents:
diff changeset
168 }
Ritor1
parents:
diff changeset
169 v5->pTargetDDrawSurface = v7;
Ritor1
parents:
diff changeset
170 v5->hWnd = hWnd;
Ritor1
parents:
diff changeset
171 v9 = a4;
Ritor1
parents:
diff changeset
172 v5->field_4C = v4;
Ritor1
parents:
diff changeset
173 v5->field_68 = v4;
Ritor1
parents:
diff changeset
174 v5->field_5C = v4;
Ritor1
parents:
diff changeset
175 v5->field_74 = v9 & 0x1F;
Ritor1
parents:
diff changeset
176 v5->field_78 = 1;
Ritor1
parents:
diff changeset
177 v5->field_24 = GetSystemMetrics(v4);
Ritor1
parents:
diff changeset
178 v5->field_28 = GetSystemMetrics(SM_CYSCREEN);
Ritor1
parents:
diff changeset
179 v5->field_2C = 16;
Ritor1
parents:
diff changeset
180 GetWindowRect(hWnd, &Rect);
Ritor1
parents:
diff changeset
181 v5->field_8 = Rect.right - Rect.left;
Ritor1
parents:
diff changeset
182 v5->field_C = Rect.bottom - Rect.top;
Ritor1
parents:
diff changeset
183 v5->field_1C = Rect.left;
Ritor1
parents:
diff changeset
184 v5->field_20 = Rect.top;
Ritor1
parents:
diff changeset
185 Rect.left = v4;
Ritor1
parents:
diff changeset
186 Rect.top = v4;
Ritor1
parents:
diff changeset
187 ClientToScreen(hWnd, (LPPOINT)&Rect);
Ritor1
parents:
diff changeset
188 v5->field_1C = Rect.left - v5->field_1C;
Ritor1
parents:
diff changeset
189 v5->field_20 = Rect.top - v5->field_20;
Ritor1
parents:
diff changeset
190 GetClientRect(hWnd, &Rect);
Ritor1
parents:
diff changeset
191 v5->field_30 = v5->field_8 - Rect.right;
Ritor1
parents:
diff changeset
192 v5->field_34 = v5->field_C - Rect.bottom;
Ritor1
parents:
diff changeset
193 v5->field_8 = v5->uWidth + v5->field_30;
Ritor1
parents:
diff changeset
194 v5->field_C = v5->uHeight + v5->field_34;
Ritor1
parents:
diff changeset
195 BinkBufferSetOffset(v5, v4, v4);
Ritor1
parents:
diff changeset
196 BinkBufferSetScale(v5, v5->uWidth, v5->uHeight);
Ritor1
parents:
diff changeset
197 return v5;
Ritor1
parents:
diff changeset
198 }
Ritor1
parents:
diff changeset
199
Ritor1
parents:
diff changeset
200
Ritor1
parents:
diff changeset
201 //----- (004C0133) --------------------------------------------------------
Ritor1
parents:
diff changeset
202 bool BinkLockBuffer(_BINKBUF *_this)
Ritor1
parents:
diff changeset
203 {
Ritor1
parents:
diff changeset
204 _BINKBUF *v1; // esi@1
Ritor1
parents:
diff changeset
205 IDirectDrawSurface *v2; // edi@5
Ritor1
parents:
diff changeset
206 DWORD v4; // eax@8
Ritor1
parents:
diff changeset
207 DWORD v5; // eax@8
Ritor1
parents:
diff changeset
208 IDirectDrawSurface4 *v6; // edi@11
Ritor1
parents:
diff changeset
209 LPVOID v7; // eax@14
Ritor1
parents:
diff changeset
210
Ritor1
parents:
diff changeset
211 v1 = _this;
Ritor1
parents:
diff changeset
212 if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
Ritor1
parents:
diff changeset
213 {
Ritor1
parents:
diff changeset
214 DDSURFACEDESC2 v8; // [sp+Ch] [bp-7Ch]@4
Ritor1
parents:
diff changeset
215 if ( _this->pTargetDDrawSurface )
Ritor1
parents:
diff changeset
216 {
Ritor1
parents:
diff changeset
217 memset(&v8, 0, 0x7Cu);
Ritor1
parents:
diff changeset
218 v8.dwSize = 124;
Ritor1
parents:
diff changeset
219 while ( 1 )
Ritor1
parents:
diff changeset
220 {
Ritor1
parents:
diff changeset
221 v6 = (IDirectDrawSurface4 *)v1->pTargetDDrawSurface;
Ritor1
parents:
diff changeset
222 if ( !v6->Lock(0, &v8, 1u, 0) )
Ritor1
parents:
diff changeset
223 break;
Ritor1
parents:
diff changeset
224
Ritor1
parents:
diff changeset
225 if (uBinkVersion < 0x0003000000000000)
Ritor1
parents:
diff changeset
226 BYTE3(v1->uBinkDDSurfaceType) |= 0x80u;
Ritor1
parents:
diff changeset
227 else
Ritor1
parents:
diff changeset
228 BYTE3(v1->uBinkDDSurfaceType) |= 0x04;
Ritor1
parents:
diff changeset
229
Ritor1
parents:
diff changeset
230 if ( v6->Restore() )
Ritor1
parents:
diff changeset
231 return 0;
Ritor1
parents:
diff changeset
232 }
Ritor1
parents:
diff changeset
233 v7 = v8.lpSurface;
Ritor1
parents:
diff changeset
234 v1->pDDrawSurfaceData_ = v8.lpSurface;
Ritor1
parents:
diff changeset
235 v1->pDDrawSurfaceData = v7;
Ritor1
parents:
diff changeset
236 v5 = v8.lPitch;
Ritor1
parents:
diff changeset
237 goto LABEL_15;
Ritor1
parents:
diff changeset
238 }
Ritor1
parents:
diff changeset
239 }
Ritor1
parents:
diff changeset
240 else
Ritor1
parents:
diff changeset
241 {
Ritor1
parents:
diff changeset
242 DDSURFACEDESC v8; // [sp+Ch] [bp-7Ch]@4
Ritor1
parents:
diff changeset
243 if ( _this->pTargetDDrawSurface )
Ritor1
parents:
diff changeset
244 {
Ritor1
parents:
diff changeset
245 memset(&v8.lPitch, 0, 0x6Cu);
Ritor1
parents:
diff changeset
246 v8.lPitch = 108;
Ritor1
parents:
diff changeset
247 while ( 1 )
Ritor1
parents:
diff changeset
248 {
Ritor1
parents:
diff changeset
249 v2 = v1->pTargetDDrawSurface;
Ritor1
parents:
diff changeset
250 if ( !v2->Lock(0, (LPDDSURFACEDESC)&v8.lPitch, 1u, 0) )
Ritor1
parents:
diff changeset
251 break;
Ritor1
parents:
diff changeset
252
Ritor1
parents:
diff changeset
253 if (uBinkVersion < 0x0003000000000000)
Ritor1
parents:
diff changeset
254 __asm int 3;
Ritor1
parents:
diff changeset
255 else
Ritor1
parents:
diff changeset
256 BYTE3(v1->uBinkDDSurfaceType) |= 4u;
Ritor1
parents:
diff changeset
257
Ritor1
parents:
diff changeset
258 if ( v2->Restore() )
Ritor1
parents:
diff changeset
259 return 0;
Ritor1
parents:
diff changeset
260 }
Ritor1
parents:
diff changeset
261 v4 = (DWORD)v8.lpSurface;
Ritor1
parents:
diff changeset
262 v1->pDDrawSurfaceData_ = (void *)v8.lpSurface;
Ritor1
parents:
diff changeset
263 v1->pDDrawSurfaceData = (void *)v4;
Ritor1
parents:
diff changeset
264 v5 = v8.dwReserved;
Ritor1
parents:
diff changeset
265 LABEL_15:
Ritor1
parents:
diff changeset
266 v1->uDDrawSurfacePitch = v5;
Ritor1
parents:
diff changeset
267 return 1;
Ritor1
parents:
diff changeset
268 }
Ritor1
parents:
diff changeset
269 }
Ritor1
parents:
diff changeset
270 return 1;
Ritor1
parents:
diff changeset
271 }
Ritor1
parents:
diff changeset
272
Ritor1
parents:
diff changeset
273 //----- (004C01FB) --------------------------------------------------------
Ritor1
parents:
diff changeset
274 void BinkUnlockBuffer(_BINKBUF *_this)
Ritor1
parents:
diff changeset
275 {
Ritor1
parents:
diff changeset
276 _BINKBUF *v1; // esi@1
Ritor1
parents:
diff changeset
277 IDirectDrawSurface *v2; // eax@1
Ritor1
parents:
diff changeset
278
Ritor1
parents:
diff changeset
279 v1 = _this;
Ritor1
parents:
diff changeset
280 v2 = _this->pTargetDDrawSurface;
Ritor1
parents:
diff changeset
281 if ( v2 )
Ritor1
parents:
diff changeset
282 {
Ritor1
parents:
diff changeset
283 v2->Unlock(0);
Ritor1
parents:
diff changeset
284 v1->uDDrawSurfacePitch = 0;
Ritor1
parents:
diff changeset
285 v1->pDDrawSurfaceData = 0;
Ritor1
parents:
diff changeset
286
Ritor1
parents:
diff changeset
287 if (uBinkVersion < 0x0003000000000000)
Ritor1
parents:
diff changeset
288 BYTE3(_this->uBinkDDSurfaceType) &= 0x7F;
Ritor1
parents:
diff changeset
289 else
Ritor1
parents:
diff changeset
290 BYTE3(_this->uBinkDDSurfaceType) &= 0xFB;
Ritor1
parents:
diff changeset
291 }
Ritor1
parents:
diff changeset
292 }
Ritor1
parents:
diff changeset
293 //----- (004BF794) --------------------------------------------------------
Ritor1
parents:
diff changeset
294 void __cdecl ShowIntroVideo_and_LoadingScreen()
Ritor1
parents:
diff changeset
295 {
Ritor1
parents:
diff changeset
296 RGBTexture tex; // [sp+Ch] [bp-30h]@1
Ritor1
parents:
diff changeset
297 unsigned int uTrackStartMS; // [sp+34h] [bp-8h]@8
Ritor1
parents:
diff changeset
298 unsigned int uTrackEndMS; // [sp+38h] [bp-4h]@8
Ritor1
parents:
diff changeset
299
Ritor1
parents:
diff changeset
300 pVideoPlayer->bStopBeforeSchedule = false;
165
Ritor1
parents: 151
diff changeset
301 pVideoPlayer->pResetflag = 0;
0
Ritor1
parents:
diff changeset
302 bGameoverLoop = 1;
256
c5e5c5146957 -novideo command arg
Nomad
parents: 227
diff changeset
303 if (!bNoVideo)
0
Ritor1
parents:
diff changeset
304 {
Ritor1
parents:
diff changeset
305 pRenderer->PresentBlackScreen();
Ritor1
parents:
diff changeset
306 pGame->pCShow->PlayMovie(MOVIE_3DOLogo, 1);
Ritor1
parents:
diff changeset
307 if ( !pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
308 {
Ritor1
parents:
diff changeset
309 pGame->pCShow->PlayMovie(MOVIE_NWCLogo, 1);
Ritor1
parents:
diff changeset
310 if ( !pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
311 {
Ritor1
parents:
diff changeset
312 pGame->pCShow->PlayMovie(MOVIE_JVC, 1);
Ritor1
parents:
diff changeset
313 if ( !pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
314 pGame->pCShow->PlayMovie(MOVIE_Intro, 1);
Ritor1
parents:
diff changeset
315 }
Ritor1
parents:
diff changeset
316 }
Ritor1
parents:
diff changeset
317 }
Ritor1
parents:
diff changeset
318 tex.Load("mm6title.pcx", 2);
Ritor1
parents:
diff changeset
319 pRenderer->BeginScene();
Ritor1
parents:
diff changeset
320 pRenderer->DrawTextureRGB(0, 0, &tex);
Ritor1
parents:
diff changeset
321 free(tex.pPixels);
Ritor1
parents:
diff changeset
322 tex.pPixels = 0;
762
cf2fbac6edc9 Misc cleaning
Nomad
parents: 731
diff changeset
323
cf2fbac6edc9 Misc cleaning
Nomad
parents: 731
diff changeset
324 LoadFonts_and_DrawCopyrightWindow();
cf2fbac6edc9 Misc cleaning
Nomad
parents: 731
diff changeset
325
0
Ritor1
parents:
diff changeset
326 pRenderer->EndScene();
Ritor1
parents:
diff changeset
327 pRenderer->Present();
1004
eac5af72b614 UI cleans
Nomad
parents: 898
diff changeset
328
eac5af72b614 UI cleans
Nomad
parents: 898
diff changeset
329 #ifndef _DEBUG
eac5af72b614 UI cleans
Nomad
parents: 898
diff changeset
330 Sleep(1500); // let the copyright window stay for a while
eac5af72b614 UI cleans
Nomad
parents: 898
diff changeset
331 #endif
eac5af72b614 UI cleans
Nomad
parents: 898
diff changeset
332
0
Ritor1
parents:
diff changeset
333 if (!bNoSound && pAudioPlayer->hAILRedbook )
Ritor1
parents:
diff changeset
334 {
Ritor1
parents:
diff changeset
335 pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0));
Ritor1
parents:
diff changeset
336 AIL_redbook_stop(pAudioPlayer->hAILRedbook);
Ritor1
parents:
diff changeset
337 AIL_redbook_track_info(pAudioPlayer->hAILRedbook, 0xE, &uTrackStartMS, &uTrackEndMS);
Ritor1
parents:
diff changeset
338 AIL_redbook_play(pAudioPlayer->hAILRedbook, uTrackStartMS + 1, uTrackEndMS);
Ritor1
parents:
diff changeset
339 }
Ritor1
parents:
diff changeset
340 bGameoverLoop = 0;
Ritor1
parents:
diff changeset
341 }
Ritor1
parents:
diff changeset
342
Ritor1
parents:
diff changeset
343
Ritor1
parents:
diff changeset
344
Ritor1
parents:
diff changeset
345
Ritor1
parents:
diff changeset
346 //----- (004BE70E) --------------------------------------------------------
227
bcd55744c2f4 Clicking background in MainMenu fix
Nomad
parents: 165
diff changeset
347 void __fastcall VideoPlayer::MovieLoop(const char *pMovieName, int a2, int ScreenSizeFlag, int a4)
0
Ritor1
parents:
diff changeset
348 {
Ritor1
parents:
diff changeset
349 int v4; // ebp@1
Ritor1
parents:
diff changeset
350 const char *pName; // edi@1
Ritor1
parents:
diff changeset
351 MSG Msg; // [sp+Ch] [bp-1Ch]@12
Ritor1
parents:
diff changeset
352
Ritor1
parents:
diff changeset
353 v4 = a2;
Ritor1
parents:
diff changeset
354 pName = pMovieName;
Ritor1
parents:
diff changeset
355 if ( !(dword_6BE364_game_settings_1 & 0x44) )
Ritor1
parents:
diff changeset
356 {
Ritor1
parents:
diff changeset
357 if ( a2 == 2 )
Ritor1
parents:
diff changeset
358 v4 = 0;
Ritor1
parents:
diff changeset
359 ShowCursor(0);
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
360 pVideoPlayer->OpenGlobalMovie(pName, 0, ScreenSizeFlag);
0
Ritor1
parents:
diff changeset
361 pVideoPlayer->bPlayingMovie = 1;
Ritor1
parents:
diff changeset
362 pVideoPlayer->field_44 = v4;
Ritor1
parents:
diff changeset
363 if ( pRenderer->pRenderD3D )
Ritor1
parents:
diff changeset
364 {
Ritor1
parents:
diff changeset
365 pRenderer->ClearTarget(0);
Ritor1
parents:
diff changeset
366 }
Ritor1
parents:
diff changeset
367 else
Ritor1
parents:
diff changeset
368 {
Ritor1
parents:
diff changeset
369 pRenderer->BeginScene();
Ritor1
parents:
diff changeset
370 pRenderer->ClearTarget(0);
Ritor1
parents:
diff changeset
371 pRenderer->EndScene();
Ritor1
parents:
diff changeset
372 }
151
9abdd40a107b pCurrentScreen
Ritor1
parents: 4
diff changeset
373 pCurrentScreen = SCREEN_VIDEO;
0
Ritor1
parents:
diff changeset
374 if ( pVideoPlayer->uMovieFormat == 2 )
Ritor1
parents:
diff changeset
375 {
Ritor1
parents:
diff changeset
376 if ( pVideoPlayer->pBinkMovie )
Ritor1
parents:
diff changeset
377 {
Ritor1
parents:
diff changeset
378 pVideoPlayer->BinkDrawFrame(pVideoPlayer->hWindow, v4, ScreenSizeFlag);
Ritor1
parents:
diff changeset
379 while ( pVideoPlayer->pBinkMovie )
Ritor1
parents:
diff changeset
380 {
Ritor1
parents:
diff changeset
381 if ( pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
382 break;
Ritor1
parents:
diff changeset
383 while ( PeekMessageA(&Msg, 0, 0, 0, 1) )
Ritor1
parents:
diff changeset
384 {
Ritor1
parents:
diff changeset
385 if ( Msg.message == 18 )
Ritor1
parents:
diff changeset
386 Game_DeinitializeAndTerminate(0);
Ritor1
parents:
diff changeset
387 if ( Msg.message == 15 )
Ritor1
parents:
diff changeset
388 break;
Ritor1
parents:
diff changeset
389 TranslateMessage(&Msg);
Ritor1
parents:
diff changeset
390 DispatchMessageA(&Msg);
Ritor1
parents:
diff changeset
391 }
Ritor1
parents:
diff changeset
392 GUI_MainMenuMessageProc();
Ritor1
parents:
diff changeset
393 if ( !pVideoPlayer->pBinkMovie )
Ritor1
parents:
diff changeset
394 break;
Ritor1
parents:
diff changeset
395 if ( !BinkWait(pVideoPlayer->pBinkMovie) && !pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
396 pVideoPlayer->BinkDrawFrame(pVideoPlayer->hWindow, v4, ScreenSizeFlag);
Ritor1
parents:
diff changeset
397 }
Ritor1
parents:
diff changeset
398 }
Ritor1
parents:
diff changeset
399 if ( pVideoPlayer->bStopBeforeSchedule == 1 )
Ritor1
parents:
diff changeset
400 Sleep(0x3E8u);
Ritor1
parents:
diff changeset
401 }
Ritor1
parents:
diff changeset
402 else
Ritor1
parents:
diff changeset
403 {
Ritor1
parents:
diff changeset
404 if ( pVideoPlayer->uMovieFormat == 1 )
Ritor1
parents:
diff changeset
405 {
Ritor1
parents:
diff changeset
406 if ( pVideoPlayer->pSmackerMovie )
Ritor1
parents:
diff changeset
407 {
Ritor1
parents:
diff changeset
408 pVideoPlayer->SmackDrawFrame(pVideoPlayer->hWindow, v4, ScreenSizeFlag);
Ritor1
parents:
diff changeset
409 while ( pVideoPlayer->pSmackerMovie )
Ritor1
parents:
diff changeset
410 {
Ritor1
parents:
diff changeset
411 if ( pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
412 break;
Ritor1
parents:
diff changeset
413 while ( PeekMessageW(&Msg, 0, 0, 0, 1) )
Ritor1
parents:
diff changeset
414 {
Ritor1
parents:
diff changeset
415 if (Msg.message == WM_QUIT)
Ritor1
parents:
diff changeset
416 Game_DeinitializeAndTerminate(0);
Ritor1
parents:
diff changeset
417 if (Msg.message == WM_PAINT)
Ritor1
parents:
diff changeset
418 break;
Ritor1
parents:
diff changeset
419 TranslateMessage(&Msg);
Ritor1
parents:
diff changeset
420 DispatchMessageW(&Msg);
Ritor1
parents:
diff changeset
421 }
4
8e33efd39355 15.01.13(work)
Ritor1
parents: 3
diff changeset
422 GUI_MainMenuMessageProc();
0
Ritor1
parents:
diff changeset
423 if ( !pVideoPlayer->pSmackerMovie )
Ritor1
parents:
diff changeset
424 break;
Ritor1
parents:
diff changeset
425 if ( !SmackWait(pVideoPlayer->pSmackerMovie) && !pVideoPlayer->bStopBeforeSchedule )
Ritor1
parents:
diff changeset
426 pVideoPlayer->SmackDrawFrame(pVideoPlayer->hWindow, v4, ScreenSizeFlag);
Ritor1
parents:
diff changeset
427 }
Ritor1
parents:
diff changeset
428 }
Ritor1
parents:
diff changeset
429 }
Ritor1
parents:
diff changeset
430 }
227
bcd55744c2f4 Clicking background in MainMenu fix
Nomad
parents: 165
diff changeset
431 if (a4 == 1)
151
9abdd40a107b pCurrentScreen
Ritor1
parents: 4
diff changeset
432 pCurrentScreen = SCREEN_GAME;
0
Ritor1
parents:
diff changeset
433 pVideoPlayer->bPlayingMovie = 0;
Ritor1
parents:
diff changeset
434 ShowCursor(1);
151
9abdd40a107b pCurrentScreen
Ritor1
parents: 4
diff changeset
435 if ( pCurrentScreen == SCREEN_VIDEO )
9abdd40a107b pCurrentScreen
Ritor1
parents: 4
diff changeset
436 pCurrentScreen = SCREEN_GAME;
0
Ritor1
parents:
diff changeset
437 }
Ritor1
parents:
diff changeset
438 }
Ritor1
parents:
diff changeset
439
Ritor1
parents:
diff changeset
440
Ritor1
parents:
diff changeset
441
Ritor1
parents:
diff changeset
442
Ritor1
parents:
diff changeset
443 //----- (004BE95A) --------------------------------------------------------
Ritor1
parents:
diff changeset
444 unsigned int VideoPlayer::SmackCheckSurfaceFromat()
Ritor1
parents:
diff changeset
445 {
Ritor1
parents:
diff changeset
446 DDPIXELFORMAT a2; // [sp+0h] [bp-20h]@1
Ritor1
parents:
diff changeset
447
Ritor1
parents:
diff changeset
448 a2.dwSize = 32;
Ritor1
parents:
diff changeset
449 a2.dwFlags = 64;
Ritor1
parents:
diff changeset
450 pRenderer->GetTargetPixelFormat(&a2);
Ritor1
parents:
diff changeset
451 if ( a2.dwRGBBitCount != 8 )
Ritor1
parents:
diff changeset
452 {
Ritor1
parents:
diff changeset
453 if ( a2.dwRBitMask == 0xF800 )
Ritor1
parents:
diff changeset
454 {
Ritor1
parents:
diff changeset
455 if ( a2.dwGBitMask == 0x7E0 && a2.dwBBitMask == 0x1F )
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
456 return SMACKBUFFER565;
0
Ritor1
parents:
diff changeset
457 }
Ritor1
parents:
diff changeset
458 else
Ritor1
parents:
diff changeset
459 {
Ritor1
parents:
diff changeset
460 if ( a2.dwRBitMask == 0x7C00
Ritor1
parents:
diff changeset
461 && a2.dwGBitMask == 0x3E0
Ritor1
parents:
diff changeset
462 && a2.dwBBitMask == 0x1F )
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
463 return SMACKBUFFER555;
0
Ritor1
parents:
diff changeset
464 }
Ritor1
parents:
diff changeset
465 MessageBoxA(0, "Unsupported pixel format.", "Smacker Error", 0);
Ritor1
parents:
diff changeset
466 }
Ritor1
parents:
diff changeset
467 return 0;
Ritor1
parents:
diff changeset
468 }
Ritor1
parents:
diff changeset
469
Ritor1
parents:
diff changeset
470 //----- (004BE9D8) --------------------------------------------------------
Ritor1
parents:
diff changeset
471 void VideoPlayer::Initialize()
Ritor1
parents:
diff changeset
472 {
Ritor1
parents:
diff changeset
473 DWORD NumberOfBytesRead; // [sp+10h] [bp-4h]@9
Ritor1
parents:
diff changeset
474
Ritor1
parents:
diff changeset
475 uint uBinkVersionMajor = -1,
Ritor1
parents:
diff changeset
476 uBinkVersionMinor = -1;
Ritor1
parents:
diff changeset
477 GetDllVersion(L"BINKW32.DLL", &uBinkVersionMajor, &uBinkVersionMinor);
Ritor1
parents:
diff changeset
478 uBinkVersion = (unsigned __int64)uBinkVersionMajor << 32 | uBinkVersionMinor;
Ritor1
parents:
diff changeset
479
Ritor1
parents:
diff changeset
480 strcpy(pTmpBuf, "anims\\might7.vid");
Ritor1
parents:
diff changeset
481 hMightVid = CreateFileW(L"anims\\might7.vid", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0x8000080u, 0);
Ritor1
parents:
diff changeset
482 if ( hMightVid == INVALID_HANDLE_VALUE )
Ritor1
parents:
diff changeset
483 {
Ritor1
parents:
diff changeset
484 sprintf(pTmpBuf2, "Can't open file - anims\\%s.smk", pTmpBuf);
Ritor1
parents:
diff changeset
485 MessageBoxA(0, pTmpBuf2, "Video File Error", 0);
Ritor1
parents:
diff changeset
486 return;
Ritor1
parents:
diff changeset
487 }
Ritor1
parents:
diff changeset
488 strcpy(pTmpBuf, "anims\\magic7.vid");
Ritor1
parents:
diff changeset
489 hMagicVid = CreateFileW(L"anims\\magic7.vid", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0x8000080u, 0);
Ritor1
parents:
diff changeset
490 if ( hMagicVid == INVALID_HANDLE_VALUE )
Ritor1
parents:
diff changeset
491 {
Ritor1
parents:
diff changeset
492 if ( !bCanLoadFromCD )
Ritor1
parents:
diff changeset
493 {
Ritor1
parents:
diff changeset
494 sprintf(pTmpBuf2, "Can't open file - anims\\%s.smk", pTmpBuf);
Ritor1
parents:
diff changeset
495 MessageBoxA(0, pTmpBuf2, "Video File Error", 0);
Ritor1
parents:
diff changeset
496 return;
Ritor1
parents:
diff changeset
497 }
Ritor1
parents:
diff changeset
498 sprintf(pTmpBuf2, "%c:\\%s", (unsigned __int8)cMM7GameCDDriveLetter, pTmpBuf);
Ritor1
parents:
diff changeset
499 hMagicVid = CreateFileA(pTmpBuf2, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0x8000080u, 0);
Ritor1
parents:
diff changeset
500 if ( hMagicVid == (HANDLE)INVALID_HANDLE_VALUE )
Ritor1
parents:
diff changeset
501 {
Ritor1
parents:
diff changeset
502 sprintf(pTmpBuf2, "Can't open file - %s", pTmpBuf);
Ritor1
parents:
diff changeset
503 MessageBoxA(0, pTmpBuf2, "Video File Error", 0);
Ritor1
parents:
diff changeset
504 return;
Ritor1
parents:
diff changeset
505 }
Ritor1
parents:
diff changeset
506 }
Ritor1
parents:
diff changeset
507 ReadFile(hMightVid, &uNumMightVideoHeaders, 4, &NumberOfBytesRead, 0);
Ritor1
parents:
diff changeset
508 ReadFile(hMagicVid, &uNumMagicVideoHeaders, 4, &NumberOfBytesRead, 0);
Ritor1
parents:
diff changeset
509 pMagicVideoHeaders = 0;
Ritor1
parents:
diff changeset
510 pMightVideoHeaders = 0;
Ritor1
parents:
diff changeset
511 pMightVideoHeaders = (MovieHeader *)pAllocator->AllocNamedChunk(0, 44 * uNumMightVideoHeaders + 2, 0);
Ritor1
parents:
diff changeset
512 pMagicVideoHeaders = (MovieHeader *)pAllocator->AllocNamedChunk(pMagicVideoHeaders, 44 * uNumMagicVideoHeaders + 2, 0);
Ritor1
parents:
diff changeset
513 ReadFile(hMightVid, pMightVideoHeaders, 44 * uNumMightVideoHeaders, &NumberOfBytesRead, 0);
Ritor1
parents:
diff changeset
514 ReadFile(hMagicVid, pMagicVideoHeaders, 44 * uNumMagicVideoHeaders, &NumberOfBytesRead, 0);
Ritor1
parents:
diff changeset
515 }
Ritor1
parents:
diff changeset
516
Ritor1
parents:
diff changeset
517 //----- (004BEB41) --------------------------------------------------------
Ritor1
parents:
diff changeset
518 void VideoPlayer::Prepare()
Ritor1
parents:
diff changeset
519 {
Ritor1
parents:
diff changeset
520 VideoPlayer *pVideoPlayer; // esi@1
Ritor1
parents:
diff changeset
521 IDirectDrawSurface *v2; // [sp-4h] [bp-Ch]@5
Ritor1
parents:
diff changeset
522
Ritor1
parents:
diff changeset
523 pVideoPlayer = this;
Ritor1
parents:
diff changeset
524 pEventTimer->Pause();
Ritor1
parents:
diff changeset
525 pVideoPlayer->bStopBeforeSchedule = 0;
Ritor1
parents:
diff changeset
526 if ( pAudioPlayer->hAILRedbook )
Ritor1
parents:
diff changeset
527 AIL_redbook_pause(pAudioPlayer->hAILRedbook);
Ritor1
parents:
diff changeset
528 pVideoPlayer->field_54 = 1;
Ritor1
parents:
diff changeset
529 pVideoPlayer->hWindow = hWnd;
Ritor1
parents:
diff changeset
530 pVideoPlayer->pSmackerMovie = 0;
Ritor1
parents:
diff changeset
531 pVideoPlayer->pSmackerBuffer = 0;
Ritor1
parents:
diff changeset
532 pVideoPlayer->pBinkMovie = 0;
Ritor1
parents:
diff changeset
533 pVideoPlayer->pBinkBuffer = 0;
Ritor1
parents:
diff changeset
534 pVideoPlayer->bPlayingMovie = 0;
Ritor1
parents:
diff changeset
535 pVideoPlayer->bFirstFrame = 0;
Ritor1
parents:
diff changeset
536 pVideoPlayer->bUsingSmackerMMX = SmackUseMMX(1);
Ritor1
parents:
diff changeset
537 BinkSetSoundSystem(BinkOpenMiles, pAudioPlayer->hDigDriver);
Ritor1
parents:
diff changeset
538 if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5 )
Ritor1
parents:
diff changeset
539 v2 = (IDirectDrawSurface*)pRenderer->pBackBuffer4;
Ritor1
parents:
diff changeset
540 else
Ritor1
parents:
diff changeset
541 v2 = (IDirectDrawSurface*)pRenderer->pBackBuffer2;
Ritor1
parents:
diff changeset
542 pVideoPlayer->uBinkDirectDrawSurfaceType = BinkDDSurfaceType(v2);
Ritor1
parents:
diff changeset
543 _flushall();
Ritor1
parents:
diff changeset
544 }
Ritor1
parents:
diff changeset
545
Ritor1
parents:
diff changeset
546
Ritor1
parents:
diff changeset
547 //----- (004BEBD7) --------------------------------------------------------
Ritor1
parents:
diff changeset
548 void VideoPlayer::Unload()
Ritor1
parents:
diff changeset
549 {
Ritor1
parents:
diff changeset
550 VideoPlayer *pVideoPlayer; // esi@1
Ritor1
parents:
diff changeset
551 _BINK *pBinkMovie; // eax@1
Ritor1
parents:
diff changeset
552 _BINKBUF *pBinkBuffer; // eax@3
Ritor1
parents:
diff changeset
553 _SMACK *pSmackerMovie; // eax@5
Ritor1
parents:
diff changeset
554
Ritor1
parents:
diff changeset
555 pVideoPlayer = this;
Ritor1
parents:
diff changeset
556 pBinkMovie = this->pBinkMovie;
Ritor1
parents:
diff changeset
557 if ( pBinkMovie )
Ritor1
parents:
diff changeset
558 {
Ritor1
parents:
diff changeset
559 BinkPause(pBinkMovie, 1);
Ritor1
parents:
diff changeset
560 Sleep(300);
Ritor1
parents:
diff changeset
561 BinkClose(pVideoPlayer->pBinkMovie);
Ritor1
parents:
diff changeset
562 pVideoPlayer->pBinkMovie = 0;
Ritor1
parents:
diff changeset
563 }
Ritor1
parents:
diff changeset
564 pBinkBuffer = pVideoPlayer->pBinkBuffer;
Ritor1
parents:
diff changeset
565 if ( pBinkBuffer )
Ritor1
parents:
diff changeset
566 {
Ritor1
parents:
diff changeset
567 pBinkBuffer->pTargetDDrawSurface->Release();
Ritor1
parents:
diff changeset
568 pVideoPlayer->pBinkBuffer->pTargetDDrawSurface = 0;
Ritor1
parents:
diff changeset
569 free(pVideoPlayer->pBinkBuffer);
Ritor1
parents:
diff changeset
570 pVideoPlayer->pBinkBuffer = 0;
Ritor1
parents:
diff changeset
571 }
Ritor1
parents:
diff changeset
572 pSmackerMovie = pVideoPlayer->pSmackerMovie;
Ritor1
parents:
diff changeset
573 if ( pSmackerMovie )
Ritor1
parents:
diff changeset
574 {
Ritor1
parents:
diff changeset
575 SmackSoundOnOff(pSmackerMovie, 0);
Ritor1
parents:
diff changeset
576 SmackClose(pVideoPlayer->pSmackerMovie);
Ritor1
parents:
diff changeset
577 pVideoPlayer->pSmackerMovie = 0;
Ritor1
parents:
diff changeset
578 }
Ritor1
parents:
diff changeset
579 if ( pVideoPlayer->pSmackerBuffer )
Ritor1
parents:
diff changeset
580 {
Ritor1
parents:
diff changeset
581 SmackBufferClose(pVideoPlayer->pSmackerBuffer);
Ritor1
parents:
diff changeset
582 pVideoPlayer->pSmackerBuffer = 0;
Ritor1
parents:
diff changeset
583 }
Ritor1
parents:
diff changeset
584 if ( pVideoPlayer->pSmackMovieBlit )
Ritor1
parents:
diff changeset
585 {
Ritor1
parents:
diff changeset
586 SmackBlitClose(pVideoPlayer->pSmackMovieBlit);
Ritor1
parents:
diff changeset
587 pVideoPlayer->pSmackMovieBlit = 0;
Ritor1
parents:
diff changeset
588 }
Ritor1
parents:
diff changeset
589 pVideoPlayer->field_54 = 0;
Ritor1
parents:
diff changeset
590 pVideoPlayer->uMovieFormat = 0;
Ritor1
parents:
diff changeset
591 pVideoPlayer->dword_0000A0 = 0;
Ritor1
parents:
diff changeset
592 memset(pVideoPlayer->pCurrentMovieName, 0, 0x40);
Ritor1
parents:
diff changeset
593 if ( pAudioPlayer->hAILRedbook && !bGameoverLoop )
Ritor1
parents:
diff changeset
594 AIL_redbook_resume(pAudioPlayer->hAILRedbook);
Ritor1
parents:
diff changeset
595 pEventTimer->Resume();
Ritor1
parents:
diff changeset
596 }
Ritor1
parents:
diff changeset
597
Ritor1
parents:
diff changeset
598 //----- (004BECD5) --------------------------------------------------------
Ritor1
parents:
diff changeset
599 void VideoPlayer::FastForwardToFrame(unsigned int uDstFrameNum)
Ritor1
parents:
diff changeset
600 {
Ritor1
parents:
diff changeset
601 VideoPlayer *v2; // esi@1
Ritor1
parents:
diff changeset
602 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
603
Ritor1
parents:
diff changeset
604 v2 = this;
Ritor1
parents:
diff changeset
605 v3 = this->uMovieFormat;
Ritor1
parents:
diff changeset
606 if ( v3 == 2 )
Ritor1
parents:
diff changeset
607 {
Ritor1
parents:
diff changeset
608 if (uDstFrameNum)
Ritor1
parents:
diff changeset
609 {
Ritor1
parents:
diff changeset
610 int *pCurrentFrame = uBinkVersion == 0x0001000500150000 ? &((_BINK_1_5_21_0 *)pBinkMovie)->uCurrentFrame :
Ritor1
parents:
diff changeset
611 uBinkVersion == 0x0003000000000000 ? &((_BINK_3_0_0_0 *)pBinkMovie)->uCurrentFrame :
Ritor1
parents:
diff changeset
612 nullptr;
Ritor1
parents:
diff changeset
613 while (*pCurrentFrame < uDstFrameNum)
Ritor1
parents:
diff changeset
614 {
Ritor1
parents:
diff changeset
615 BinkDoFrame(pBinkMovie);
Ritor1
parents:
diff changeset
616 BinkNextFrame(pBinkMovie);
Ritor1
parents:
diff changeset
617 }
Ritor1
parents:
diff changeset
618 }
Ritor1
parents:
diff changeset
619 }
Ritor1
parents:
diff changeset
620 else
Ritor1
parents:
diff changeset
621 {
Ritor1
parents:
diff changeset
622 if ( v3 != 1 )
Ritor1
parents:
diff changeset
623 return;
Ritor1
parents:
diff changeset
624 SmackSoundOnOff(this->pSmackerMovie, 0);
Ritor1
parents:
diff changeset
625 if (uDstFrameNum)
Ritor1
parents:
diff changeset
626 {
Ritor1
parents:
diff changeset
627 while ( v2->pSmackerMovie->FrameNum < uDstFrameNum)
Ritor1
parents:
diff changeset
628 {
Ritor1
parents:
diff changeset
629 SmackDoFrame(v2->pSmackerMovie);
Ritor1
parents:
diff changeset
630 SmackNextFrame(v2->pSmackerMovie);
Ritor1
parents:
diff changeset
631 }
Ritor1
parents:
diff changeset
632 }
Ritor1
parents:
diff changeset
633 }
Ritor1
parents:
diff changeset
634 Unload();
Ritor1
parents:
diff changeset
635 }
Ritor1
parents:
diff changeset
636
Ritor1
parents:
diff changeset
637
Ritor1
parents:
diff changeset
638 //----- (004BED4F) --------------------------------------------------------
Ritor1
parents:
diff changeset
639 void VideoPlayer::BinkDrawFrame(HWND hWnd, int a3, int a4)
Ritor1
parents:
diff changeset
640 {
Ritor1
parents:
diff changeset
641 //VideoPlayer *v4; // esi@1
Ritor1
parents:
diff changeset
642 _BINKBUF *v5; // eax@5
Ritor1
parents:
diff changeset
643 LONG v6; // edx@6
Ritor1
parents:
diff changeset
644 int v7; // ecx@6
Ritor1
parents:
diff changeset
645 LONG v8; // edx@6
Ritor1
parents:
diff changeset
646 struct tagRECT a3a; // [sp+8h] [bp-20h]@10
Ritor1
parents:
diff changeset
647 struct tagRECT a1; // [sp+18h] [bp-10h]@6
Ritor1
parents:
diff changeset
648
Ritor1
parents:
diff changeset
649 //v4 = this;
Ritor1
parents:
diff changeset
650 if ( this->pBinkMovie && this->pBinkBuffer )
Ritor1
parents:
diff changeset
651 {
Ritor1
parents:
diff changeset
652 BinkDoFrame(pBinkMovie);
Ritor1
parents:
diff changeset
653 BinkGetRects(pBinkMovie, pBinkBuffer->uBinkDDSurfaceType);
Ritor1
parents:
diff changeset
654 if ( BinkLockBuffer(pBinkBuffer) )
Ritor1
parents:
diff changeset
655 {
Ritor1
parents:
diff changeset
656 BinkCopyToBuffer(pBinkMovie, pBinkBuffer->pDDrawSurfaceData, pBinkBuffer->uDDrawSurfacePitch, pBinkBuffer->uHeight,
Ritor1
parents:
diff changeset
657 0, 0, pBinkBuffer->uBinkDDSurfaceType);
Ritor1
parents:
diff changeset
658 BinkUnlockBuffer(pBinkBuffer);
Ritor1
parents:
diff changeset
659 }
Ritor1
parents:
diff changeset
660 v5 = pBinkBuffer;
Ritor1
parents:
diff changeset
661 if ( pRenderer->bWindowMode )
Ritor1
parents:
diff changeset
662 {
Ritor1
parents:
diff changeset
663 v6 = v5->uRectX;
Ritor1
parents:
diff changeset
664 a1.left = v6;
Ritor1
parents:
diff changeset
665 a1.top = v5->uRectY;
Ritor1
parents:
diff changeset
666 v7 = v6 + v5->uWidth;
Ritor1
parents:
diff changeset
667 a1.right = v6 + v5->uWidth;
Ritor1
parents:
diff changeset
668 v8 = a1.top + v5->uHeight;
Ritor1
parents:
diff changeset
669 }
Ritor1
parents:
diff changeset
670 else
Ritor1
parents:
diff changeset
671 {
Ritor1
parents:
diff changeset
672 a1.left = 0;
Ritor1
parents:
diff changeset
673 a1.top = 0;
Ritor1
parents:
diff changeset
674 v7 = v5->uWidth;
Ritor1
parents:
diff changeset
675 a1.right = v5->uWidth;
Ritor1
parents:
diff changeset
676 v8 = v5->uHeight;
Ritor1
parents:
diff changeset
677 }
Ritor1
parents:
diff changeset
678 a1.bottom = v8;
Ritor1
parents:
diff changeset
679 if ( a4 )
Ritor1
parents:
diff changeset
680 {
Ritor1
parents:
diff changeset
681 a1.right = v5->uWidth + v7;
Ritor1
parents:
diff changeset
682 a1.bottom = v5->uHeight + v8;
Ritor1
parents:
diff changeset
683 }
Ritor1
parents:
diff changeset
684 a3a.left = 0;
Ritor1
parents:
diff changeset
685 a3a.top = 0;
Ritor1
parents:
diff changeset
686 a3a.right = v5->uWidth;
Ritor1
parents:
diff changeset
687 a3a.bottom = v5->uHeight;
Ritor1
parents:
diff changeset
688 pRenderer->BltToFront(&a1, v5->pTargetDDrawSurface, &a3a, 0x1000000u);
Ritor1
parents:
diff changeset
689
Ritor1
parents:
diff changeset
690
Ritor1
parents:
diff changeset
691 int *pCurrentFrame = uBinkVersion == 0x0001000500150000 ? &((_BINK_1_5_21_0 *)pBinkMovie)->uCurrentFrame :
Ritor1
parents:
diff changeset
692 uBinkVersion == 0x0003000000000000 ? &((_BINK_3_0_0_0 *)pBinkMovie)->uCurrentFrame:
Ritor1
parents:
diff changeset
693 nullptr;
Ritor1
parents:
diff changeset
694 int *pNumFrames = uBinkVersion == 0x0001000500150000 ? &((_BINK_1_5_21_0 *)pBinkMovie)->uNumFrames :
Ritor1
parents:
diff changeset
695 uBinkVersion == 0x0003000000000000 ? &((_BINK_3_0_0_0 *)pBinkMovie)->uNumFrames :
Ritor1
parents:
diff changeset
696 nullptr;
Ritor1
parents:
diff changeset
697
Ritor1
parents:
diff changeset
698 if (*pCurrentFrame != *pNumFrames - 1 || bLoopPlaying)
Ritor1
parents:
diff changeset
699 BinkNextFrame(pBinkMovie);
Ritor1
parents:
diff changeset
700 else
Ritor1
parents:
diff changeset
701 Unload();
Ritor1
parents:
diff changeset
702 }
Ritor1
parents:
diff changeset
703 }
Ritor1
parents:
diff changeset
704
Ritor1
parents:
diff changeset
705
Ritor1
parents:
diff changeset
706
Ritor1
parents:
diff changeset
707 //----- (004BEE6B) --------------------------------------------------------
Ritor1
parents:
diff changeset
708 void VideoPlayer::SmackDrawFrame(HWND hWnd, int a3, int a4)
Ritor1
parents:
diff changeset
709 {
Ritor1
parents:
diff changeset
710 VideoPlayer *v4; // esi@1
Ritor1
parents:
diff changeset
711 _SMACK *v5; // eax@3
Ritor1
parents:
diff changeset
712 unsigned int v6; // eax@5
Ritor1
parents:
diff changeset
713 char v7; // zf@5
Ritor1
parents:
diff changeset
714 int v8; // eax@11
Ritor1
parents:
diff changeset
715 _SMACK *v9; // eax@13
Ritor1
parents:
diff changeset
716 _SMACK *v10; // eax@16
Ritor1
parents:
diff changeset
717 _SMACK *v11; // eax@20
Ritor1
parents:
diff changeset
718 unsigned int v12; // [sp-1Ch] [bp-34h]@7
Ritor1
parents:
diff changeset
719 LONG v13; // [sp-18h] [bp-30h]@7
Ritor1
parents:
diff changeset
720 LONG v14; // [sp-14h] [bp-2Ch]@7
Ritor1
parents:
diff changeset
721 signed int v15; // [sp-10h] [bp-28h]@7
Ritor1
parents:
diff changeset
722 signed int v16; // [sp-Ch] [bp-24h]@7
Ritor1
parents:
diff changeset
723 signed int v17; // [sp-8h] [bp-20h]@7
Ritor1
parents:
diff changeset
724 struct tagPOINT Point; // [sp+8h] [bp-10h]@7
Ritor1
parents:
diff changeset
725 unsigned short *pOutSurface; // [sp+10h] [bp-8h]@5
Ritor1
parents:
diff changeset
726 unsigned int uPixelsPerRow; // [sp+14h] [bp-4h]@5
Ritor1
parents:
diff changeset
727
Ritor1
parents:
diff changeset
728 v4 = this;
Ritor1
parents:
diff changeset
729 if ( !pRenderer->bWindowMode || GetFocus() == hWnd )
Ritor1
parents:
diff changeset
730 {
Ritor1
parents:
diff changeset
731 v5 = v4->pSmackerMovie;
Ritor1
parents:
diff changeset
732 if ( v5->NewPalette )
Ritor1
parents:
diff changeset
733 SmackBlitSetPalette(v4->pSmackMovieBlit, v5->Palette, v5->PalType);
Ritor1
parents:
diff changeset
734 SmackDoFrame(v4->pSmackerMovie);
Ritor1
parents:
diff changeset
735 pRenderer->LockFrontBuffer((void **)&pOutSurface, &uPixelsPerRow);
Ritor1
parents:
diff changeset
736 v6 = 2 * uPixelsPerRow;
Ritor1
parents:
diff changeset
737 v7 = v4->bFirstFrame == 0;
Ritor1
parents:
diff changeset
738 uPixelsPerRow *= 2;
Ritor1
parents:
diff changeset
739 if ( !v7 )
Ritor1
parents:
diff changeset
740 {
Ritor1
parents:
diff changeset
741 if ( pRenderer->bWindowMode )
Ritor1
parents:
diff changeset
742 {
Ritor1
parents:
diff changeset
743 Point.y = 0;
Ritor1
parents:
diff changeset
744 Point.x = 0;
Ritor1
parents:
diff changeset
745 ClientToScreen(hWnd, &Point);
Ritor1
parents:
diff changeset
746 v17 = -1;
Ritor1
parents:
diff changeset
747 v16 = 480;
Ritor1
parents:
diff changeset
748 v15 = 640;
Ritor1
parents:
diff changeset
749 v14 = Point.y;
Ritor1
parents:
diff changeset
750 v13 = Point.x;
Ritor1
parents:
diff changeset
751 v12 = uPixelsPerRow;
Ritor1
parents:
diff changeset
752 }
Ritor1
parents:
diff changeset
753 else
Ritor1
parents:
diff changeset
754 {
Ritor1
parents:
diff changeset
755 v17 = -1;
Ritor1
parents:
diff changeset
756 v16 = 480;
Ritor1
parents:
diff changeset
757 v15 = 640;
Ritor1
parents:
diff changeset
758 v14 = 0;
Ritor1
parents:
diff changeset
759 v13 = 0;
Ritor1
parents:
diff changeset
760 v12 = v6;
Ritor1
parents:
diff changeset
761 }
Ritor1
parents:
diff changeset
762 SmackBlitClear(v4->pSmackMovieBlit, pOutSurface, v12, v13, v14, v15, v16, v17);
Ritor1
parents:
diff changeset
763 v4->bFirstFrame = 0;
Ritor1
parents:
diff changeset
764 }
Ritor1
parents:
diff changeset
765 pRenderer->RestoreFrontBuffer();
Ritor1
parents:
diff changeset
766 if ( pRenderer->bWindowMode )
Ritor1
parents:
diff changeset
767 {
Ritor1
parents:
diff changeset
768 Point.y = 0;
Ritor1
parents:
diff changeset
769 Point.x = 0;
Ritor1
parents:
diff changeset
770 ClientToScreen(hWnd, &Point);
Ritor1
parents:
diff changeset
771 v8 = SmackToBufferRect(v4->pSmackerMovie, 0);
Ritor1
parents:
diff changeset
772 if ( a4 )
Ritor1
parents:
diff changeset
773 {
Ritor1
parents:
diff changeset
774 while ( v8 )
Ritor1
parents:
diff changeset
775 {
Ritor1
parents:
diff changeset
776 v9 = v4->pSmackerMovie;
Ritor1
parents:
diff changeset
777 SmackBlit(
Ritor1
parents:
diff changeset
778 v4->pSmackMovieBlit,
Ritor1
parents:
diff changeset
779 pOutSurface,
Ritor1
parents:
diff changeset
780 uPixelsPerRow,
Ritor1
parents:
diff changeset
781 v9->LastRectx + Point.x / 2,
Ritor1
parents:
diff changeset
782 a3 + v9->LastRecty + Point.y / 2,
Ritor1
parents:
diff changeset
783 v4->pSomeSmackerBuffer,
Ritor1
parents:
diff changeset
784 v9->Width,
Ritor1
parents:
diff changeset
785 v9->LastRectx,
Ritor1
parents:
diff changeset
786 v9->LastRecty,
Ritor1
parents:
diff changeset
787 v9->LastRectw,
Ritor1
parents:
diff changeset
788 v9->LastRecth);
Ritor1
parents:
diff changeset
789 v8 = SmackToBufferRect(v4->pSmackerMovie, 0);
Ritor1
parents:
diff changeset
790 }
Ritor1
parents:
diff changeset
791 }
Ritor1
parents:
diff changeset
792 else
Ritor1
parents:
diff changeset
793 {
Ritor1
parents:
diff changeset
794 while ( v8 )
Ritor1
parents:
diff changeset
795 {
Ritor1
parents:
diff changeset
796 v10 = v4->pSmackerMovie;
Ritor1
parents:
diff changeset
797 SmackBlit(v4->pSmackMovieBlit, pOutSurface, uPixelsPerRow, Point.x + v10->LastRectx, a3 + Point.y + v10->LastRecty,
Ritor1
parents:
diff changeset
798 v4->pSomeSmackerBuffer, v10->Width, v10->LastRectx, v10->LastRecty, v10->LastRectw, v10->LastRecth);
Ritor1
parents:
diff changeset
799 v8 = SmackToBufferRect(v4->pSmackerMovie, 0);
Ritor1
parents:
diff changeset
800 }
Ritor1
parents:
diff changeset
801 }
Ritor1
parents:
diff changeset
802 }
Ritor1
parents:
diff changeset
803 else
Ritor1
parents:
diff changeset
804 {
Ritor1
parents:
diff changeset
805 while ( SmackToBufferRect(v4->pSmackerMovie, 0) )
Ritor1
parents:
diff changeset
806 {
Ritor1
parents:
diff changeset
807 v11 = v4->pSmackerMovie;
Ritor1
parents:
diff changeset
808 SmackBlit(v4->pSmackMovieBlit, pOutSurface, uPixelsPerRow, v11->LastRectx, a3 + v11->LastRecty, v4->pSomeSmackerBuffer,
Ritor1
parents:
diff changeset
809 v11->Width, v11->LastRectx, v11->LastRecty, v11->LastRectw, v11->LastRecth);
Ritor1
parents:
diff changeset
810 }
Ritor1
parents:
diff changeset
811 }
Ritor1
parents:
diff changeset
812 pRenderer->UnlockFrontBuffer();
Ritor1
parents:
diff changeset
813 if ( v4->pSmackerMovie->FrameNum != v4->pSmackerMovie->Frames - 1 || v4->bLoopPlaying )
Ritor1
parents:
diff changeset
814 SmackNextFrame(v4->pSmackerMovie);
Ritor1
parents:
diff changeset
815 else
Ritor1
parents:
diff changeset
816 Unload();
Ritor1
parents:
diff changeset
817 }
Ritor1
parents:
diff changeset
818 }
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
819
0
Ritor1
parents:
diff changeset
820
Ritor1
parents:
diff changeset
821 //----- (004BF08B) --------------------------------------------------------
Ritor1
parents:
diff changeset
822 void VideoPlayer::SmackUpdatePalette(HWND hWnd)
Ritor1
parents:
diff changeset
823 {
Ritor1
parents:
diff changeset
824 VideoPlayer *v2; // esi@1
Ritor1
parents:
diff changeset
825 unsigned __int16 *v3; // ebx@1
Ritor1
parents:
diff changeset
826 unsigned int v4; // edi@1
Ritor1
parents:
diff changeset
827 unsigned int v5; // eax@1
Ritor1
parents:
diff changeset
828 _SMACK *v6; // eax@1
Ritor1
parents:
diff changeset
829
Ritor1
parents:
diff changeset
830 v2 = this;
Ritor1
parents:
diff changeset
831 pRenderer->BeginScene();
Ritor1
parents:
diff changeset
832 v3 = pRenderer->pTargetSurface;
Ritor1
parents:
diff changeset
833 v4 = pRenderer->uTargetSurfacePitch;
Ritor1
parents:
diff changeset
834 v5 = SmackCheckSurfaceFromat();
Ritor1
parents:
diff changeset
835 SmackToBuffer(v2->pSmackerMovie, 8, 8, 2 * v4, pRenderer->field_14, v3, v5);
Ritor1
parents:
diff changeset
836 v6 = v2->pSmackerMovie;
Ritor1
parents:
diff changeset
837 if ( v6->NewPalette )
Ritor1
parents:
diff changeset
838 {
Ritor1
parents:
diff changeset
839 SmackBufferNewPalette((long)pSmackerBuffer, (long)v6->Palette, LOWORD(v6->PalType));
Ritor1
parents:
diff changeset
840 SmackColorRemapWithTrans(
Ritor1
parents:
diff changeset
841 (long)pSmackerMovie,
Ritor1
parents:
diff changeset
842 (long)pSmackerBuffer->Palette,
Ritor1
parents:
diff changeset
843 (long)pSmackerBuffer->MaxPalColors,
Ritor1
parents:
diff changeset
844 (long)pSmackerBuffer->PalType,
Ritor1
parents:
diff changeset
845 1000);
Ritor1
parents:
diff changeset
846 }
Ritor1
parents:
diff changeset
847 SmackDoFrame(v2->pSmackerMovie);
Ritor1
parents:
diff changeset
848 if ( v2->pSmackerMovie->FrameNum != v2->pSmackerMovie->Frames - 1 || v2->bLoopPlaying )
Ritor1
parents:
diff changeset
849 SmackNextFrame(v2->pSmackerMovie);
Ritor1
parents:
diff changeset
850 else
Ritor1
parents:
diff changeset
851 Unload();
Ritor1
parents:
diff changeset
852 pRenderer->EndScene();
Ritor1
parents:
diff changeset
853 }
Ritor1
parents:
diff changeset
854
Ritor1
parents:
diff changeset
855
Ritor1
parents:
diff changeset
856
Ritor1
parents:
diff changeset
857
Ritor1
parents:
diff changeset
858
Ritor1
parents:
diff changeset
859 //----- (004BF141) --------------------------------------------------------
Ritor1
parents:
diff changeset
860 _BINK *VideoPlayer::OpenBink(const char *pName)
Ritor1
parents:
diff changeset
861 {
Ritor1
parents:
diff changeset
862 //VideoPlayer *v2; // esi@1
Ritor1
parents:
diff changeset
863 signed int v3; // edi@1
Ritor1
parents:
diff changeset
864 int v4; // ebx@2
Ritor1
parents:
diff changeset
865 signed int v5; // edi@5
Ritor1
parents:
diff changeset
866 int v6; // ebx@6
Ritor1
parents:
diff changeset
867 HANDLE v8; // [sp-8h] [bp-18h]@10
Ritor1
parents:
diff changeset
868 unsigned int v9; // [sp-4h] [bp-14h]@10
Ritor1
parents:
diff changeset
869
Ritor1
parents:
diff changeset
870 for (uint i = 0; i < uNumMightVideoHeaders; ++i)
Ritor1
parents:
diff changeset
871 if (!strcmpi(pName, pMightVideoHeaders[i].pVideoName))
Ritor1
parents:
diff changeset
872 {
Ritor1
parents:
diff changeset
873 SetFilePointer(hMightVid, pMightVideoHeaders[i].uFileOffset, 0, FILE_BEGIN);
Ritor1
parents:
diff changeset
874
Ritor1
parents:
diff changeset
875 if (uBinkVersion < 0x0003000000000000)
Ritor1
parents:
diff changeset
876 return BinkOpen(hMightVid, 0x8800000);
Ritor1
parents:
diff changeset
877 else
Ritor1
parents:
diff changeset
878 return BinkOpen(hMightVid, 0x82000000);
Ritor1
parents:
diff changeset
879 }
Ritor1
parents:
diff changeset
880
Ritor1
parents:
diff changeset
881 for (uint i = 0; i < uNumMagicVideoHeaders; ++i)
Ritor1
parents:
diff changeset
882 if (!strcmpi(pName, pMagicVideoHeaders[i].pVideoName))
Ritor1
parents:
diff changeset
883 {
Ritor1
parents:
diff changeset
884 SetFilePointer(hMagicVid, pMagicVideoHeaders[i].uFileOffset, 0, FILE_BEGIN);
Ritor1
parents:
diff changeset
885
Ritor1
parents:
diff changeset
886 if (uBinkVersion < 0x0003000000000000)
Ritor1
parents:
diff changeset
887 return BinkOpen(hMagicVid, 0x8800000);
Ritor1
parents:
diff changeset
888 else
Ritor1
parents:
diff changeset
889 return BinkOpen(hMagicVid, 0x82000000);
Ritor1
parents:
diff changeset
890 }
Ritor1
parents:
diff changeset
891
Ritor1
parents:
diff changeset
892 return nullptr;
Ritor1
parents:
diff changeset
893 }
Ritor1
parents:
diff changeset
894 //----- (004BF1E6) --------------------------------------------------------
Ritor1
parents:
diff changeset
895 _SMACK *VideoPlayer::OpenSmack(const char *pFilename)
Ritor1
parents:
diff changeset
896 {
Ritor1
parents:
diff changeset
897 VideoPlayer *pVideoPlayer; // esi@1
Ritor1
parents:
diff changeset
898 signed int v3; // edi@1
Ritor1
parents:
diff changeset
899 int v4; // ebx@2
Ritor1
parents:
diff changeset
900 signed int v5; // edi@5
Ritor1
parents:
diff changeset
901 //int v6; // ebx@6
Ritor1
parents:
diff changeset
902 //HANDLE v8; // [sp-Ch] [bp-1Ch]@10
Ritor1
parents:
diff changeset
903 //unsigned int v9; // [sp-8h] [bp-18h]@10
Ritor1
parents:
diff changeset
904 //signed int v10; // [sp-4h] [bp-14h]@10
Ritor1
parents:
diff changeset
905
Ritor1
parents:
diff changeset
906 pVideoPlayer = this;
Ritor1
parents:
diff changeset
907 if ( (signed int)this->uNumMightVideoHeaders > 0 )
Ritor1
parents:
diff changeset
908 {
Ritor1
parents:
diff changeset
909 for ( v3 = 0; v3 < (signed int)pVideoPlayer->uNumMightVideoHeaders; ++v3)
Ritor1
parents:
diff changeset
910 {
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1035
diff changeset
911 v4 = _stricmp(pVideoPlayer->pMightVideoHeaders[v3].pVideoName, pFilename);
0
Ritor1
parents:
diff changeset
912 if ( !v4 )
Ritor1
parents:
diff changeset
913 {
Ritor1
parents:
diff changeset
914 SetFilePointer(pVideoPlayer->hMightVid, pVideoPlayer->pMightVideoHeaders[v3].uFileOffset, 0, 0);
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
915 return SmackOpen(pVideoPlayer->hMightVid, 0x7140, -1);//problem training house video in WinXP
0
Ritor1
parents:
diff changeset
916 }
Ritor1
parents:
diff changeset
917 }
Ritor1
parents:
diff changeset
918 }
Ritor1
parents:
diff changeset
919 v5 = 0;
Ritor1
parents:
diff changeset
920 if ( (signed int)pVideoPlayer->uNumMagicVideoHeaders > 0 )
Ritor1
parents:
diff changeset
921 {
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 1035
diff changeset
922 while ( _stricmp(pVideoPlayer->pMagicVideoHeaders[v5].pVideoName, pFilename) )
0
Ritor1
parents:
diff changeset
923 {
Ritor1
parents:
diff changeset
924 ++v5;
Ritor1
parents:
diff changeset
925 if ( v5 >= (signed int)pVideoPlayer->uNumMagicVideoHeaders )
Ritor1
parents:
diff changeset
926 return 0;
Ritor1
parents:
diff changeset
927 }
Ritor1
parents:
diff changeset
928 SetFilePointer(pVideoPlayer->hMagicVid, pVideoPlayer->pMagicVideoHeaders[v5].uFileOffset, 0, 0);
Ritor1
parents:
diff changeset
929 return SmackOpen(pVideoPlayer->hMagicVid, 0x7140, -1);
Ritor1
parents:
diff changeset
930 }
Ritor1
parents:
diff changeset
931 return 0;
Ritor1
parents:
diff changeset
932 }
Ritor1
parents:
diff changeset
933
Ritor1
parents:
diff changeset
934 //----- (004BF28F) --------------------------------------------------------
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
935 void VideoPlayer::OpenHouseMovie(const char *pMovieName, unsigned int a3_1)
0
Ritor1
parents:
diff changeset
936 {
Ritor1
parents:
diff changeset
937 VideoPlayer *v3; // esi@1
Ritor1
parents:
diff changeset
938 std::string *v4; // ecx@3
Ritor1
parents:
diff changeset
939 _SMACK *v5; // eax@4
Ritor1
parents:
diff changeset
940 _SMACK *v6; // eax@7
Ritor1
parents:
diff changeset
941 int v7; // eax@7
Ritor1
parents:
diff changeset
942 int v8; // ecx@7
Ritor1
parents:
diff changeset
943 unsigned int v9; // ebx@8
Ritor1
parents:
diff changeset
944 unsigned int v10; // eax@8
Ritor1
parents:
diff changeset
945 signed __int64 v11; // qax@9
Ritor1
parents:
diff changeset
946 char *v12; // [sp-20h] [bp-54h]@3
Ritor1
parents:
diff changeset
947 int v13; // [sp-1Ch] [bp-50h]@3
Ritor1
parents:
diff changeset
948 std::string v14; // [sp-18h] [bp-4Ch]@3
Ritor1
parents:
diff changeset
949 const char *v15; // [sp-8h] [bp-3Ch]@3
Ritor1
parents:
diff changeset
950 int v16; // [sp-4h] [bp-38h]@3
Ritor1
parents:
diff changeset
951 char Str2[0x30]; // [sp+Ch] [bp-28h]@4
Ritor1
parents:
diff changeset
952 std::string *v18; // [sp+3Ch] [bp+8h]@3
Ritor1
parents:
diff changeset
953 std::string *v19; // [sp+3Ch] [bp+8h]@5
Ritor1
parents:
diff changeset
954 unsigned __int16 *v20; // [sp+3Ch] [bp+8h]@8
Ritor1
parents:
diff changeset
955
Ritor1
parents:
diff changeset
956 v3 = this;
Ritor1
parents:
diff changeset
957 if ( !this->field_54 )
Ritor1
parents:
diff changeset
958 {
Ritor1
parents:
diff changeset
959 Prepare();
Ritor1
parents:
diff changeset
960 v3->bLoopPlaying = a3_1;
323
d720a13e2273 Very basic picking & entering houses
Nomad
parents: 256
diff changeset
961 if ( LOBYTE(v3->field_104) == 1 )
0
Ritor1
parents:
diff changeset
962 {
Ritor1
parents:
diff changeset
963 v15 = "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Video.cpp:925";
Ritor1
parents:
diff changeset
964 v12 = "Unsupported Bink playback!";
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
965 MessageBoxA(nullptr, v12, v15, 0);
0
Ritor1
parents:
diff changeset
966 return;
Ritor1
parents:
diff changeset
967 }
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
968 sprintfex(Str2, "%s.smk", pMovieName);
0
Ritor1
parents:
diff changeset
969 v5 = OpenSmack(Str2);
Ritor1
parents:
diff changeset
970 v3->pSmackerMovie = v5;
Ritor1
parents:
diff changeset
971 if ( !v5 )
Ritor1
parents:
diff changeset
972 {
Ritor1
parents:
diff changeset
973 v3->Unload();
Ritor1
parents:
diff changeset
974 sprintf(pTmpBuf, "Can't load %s", &Str2);
Ritor1
parents:
diff changeset
975 v15 = "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Video.cpp:937";
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
976 MessageBoxA(nullptr, pTmpBuf, v15, 0);
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
977 return;
0
Ritor1
parents:
diff changeset
978 }
Ritor1
parents:
diff changeset
979 v16 = (int)pMovieName;
Ritor1
parents:
diff changeset
980 v3->uMovieFormat = 1;
Ritor1
parents:
diff changeset
981 strcpy(v3->pCurrentMovieName, (const char *)v16);
Ritor1
parents:
diff changeset
982 v6 = v3->pSmackerMovie;
Ritor1
parents:
diff changeset
983 v3->dword_0000A0 = 1;
Ritor1
parents:
diff changeset
984 v7 = SmackBufferOpen(v3->hWindow, 4, LOWORD(v6->Width), LOWORD(v6->Height), LOWORD(v6->Width), LOWORD(v6->Height));
Ritor1
parents:
diff changeset
985 v3->pSmackerBuffer = (_SMACKBUF *)v7;
Ritor1
parents:
diff changeset
986 if ( v7 )
Ritor1
parents:
diff changeset
987 {
Ritor1
parents:
diff changeset
988 pRenderer->BeginScene();
Ritor1
parents:
diff changeset
989 v9 = pRenderer->uTargetSurfacePitch;
Ritor1
parents:
diff changeset
990 v20 = pRenderer->pTargetSurface;
Ritor1
parents:
diff changeset
991 v10 = SmackCheckSurfaceFromat();
Ritor1
parents:
diff changeset
992 SmackToBuffer(v3->pSmackerMovie, 8, 8, 2 * v9, pRenderer->field_14, v20, v10);
Ritor1
parents:
diff changeset
993 pRenderer->EndScene();
Ritor1
parents:
diff changeset
994 }
Ritor1
parents:
diff changeset
995 v16 = 32767;
Ritor1
parents:
diff changeset
996 v11 = (signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 32767.0);
347
c067c5739e1f minor fixes
zipi
parents: 336
diff changeset
997 SmackVolumePan(v3->pSmackerMovie, 1040384, v11, 32767);
0
Ritor1
parents:
diff changeset
998 }
Ritor1
parents:
diff changeset
999 }
Ritor1
parents:
diff changeset
1000
Ritor1
parents:
diff changeset
1001 //----- (004BF3F9) --------------------------------------------------------
Ritor1
parents:
diff changeset
1002 bool VideoPlayer::AnyMovieLoaded()
Ritor1
parents:
diff changeset
1003 {
Ritor1
parents:
diff changeset
1004 return pSmackerMovie || pBinkMovie;
Ritor1
parents:
diff changeset
1005 }
Ritor1
parents:
diff changeset
1006
Ritor1
parents:
diff changeset
1007 //----- (004BF411) --------------------------------------------------------
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
1008 void VideoPlayer::OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4)
0
Ritor1
parents:
diff changeset
1009 {
Ritor1
parents:
diff changeset
1010 VideoPlayer *pVideoPlayer; // esi@1
Ritor1
parents:
diff changeset
1011 _BINK *pVideoOpen; // eax@2
Ritor1
parents:
diff changeset
1012 _SMACK *v6; // eax@3
Ritor1
parents:
diff changeset
1013 _BINK *pBinkMovie; // eax@5
Ritor1
parents:
diff changeset
1014 _SMACK *v8; // eax@7
Ritor1
parents:
diff changeset
1015 char *v9; // eax@7
Ritor1
parents:
diff changeset
1016 unsigned int v10; // eax@11
Ritor1
parents:
diff changeset
1017 _SMACKBLIT *v11; // eax@14
Ritor1
parents:
diff changeset
1018 const char *v12; // [sp-4h] [bp-38h]@8
Ritor1
parents:
diff changeset
1019 char pVideoName[120]; // [sp+Ch] [bp-28h]@2
Ritor1
parents:
diff changeset
1020
Ritor1
parents:
diff changeset
1021 pVideoPlayer = this;
Ritor1
parents:
diff changeset
1022 if ( !this->field_54 )
Ritor1
parents:
diff changeset
1023 {
Ritor1
parents:
diff changeset
1024 Prepare();
Ritor1
parents:
diff changeset
1025 pVideoPlayer->bLoopPlaying = bLoop;
Ritor1
parents:
diff changeset
1026 sprintf(pVideoName, "%s.bik", pFilename);
Ritor1
parents:
diff changeset
1027 pVideoOpen = OpenBink(pVideoName);
Ritor1
parents:
diff changeset
1028 pVideoPlayer->pBinkMovie = pVideoOpen;
Ritor1
parents:
diff changeset
1029 if ( pVideoOpen )
Ritor1
parents:
diff changeset
1030 {
Ritor1
parents:
diff changeset
1031 pVideoPlayer->uMovieFormat = 2;
Ritor1
parents:
diff changeset
1032 strcpy(pVideoPlayer->pCurrentMovieName, pFilename);
Ritor1
parents:
diff changeset
1033 pBinkMovie = pVideoPlayer->pBinkMovie;
Ritor1
parents:
diff changeset
1034 pVideoPlayer->dword_0000A0 = 1;
Ritor1
parents:
diff changeset
1035 if ( pBinkMovie )
Ritor1
parents:
diff changeset
1036 pVideoPlayer->pBinkBuffer = CreateBinkBuffer(pVideoPlayer->hWindow, pBinkMovie->uWidth, pBinkMovie->uHeight, 0);
Ritor1
parents:
diff changeset
1037 }
Ritor1
parents:
diff changeset
1038 else
Ritor1
parents:
diff changeset
1039 {
Ritor1
parents:
diff changeset
1040 Unload();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
1041 sprintfex(pVideoName, "%s.smk", pFilename);
0
Ritor1
parents:
diff changeset
1042 v6 = OpenSmack(pVideoName);
Ritor1
parents:
diff changeset
1043 pVideoPlayer->pSmackerMovie = v6;
Ritor1
parents:
diff changeset
1044 if ( !v6 )
Ritor1
parents:
diff changeset
1045 {
Ritor1
parents:
diff changeset
1046 Unload();
Ritor1
parents:
diff changeset
1047 sprintf(pVideoName, "Can't load file - anims\\%s.smk", pFilename);
Ritor1
parents:
diff changeset
1048 MessageBoxA(0, pVideoName, "Smacker Error", 0);
Ritor1
parents:
diff changeset
1049 return;
Ritor1
parents:
diff changeset
1050 }
Ritor1
parents:
diff changeset
1051 pVideoPlayer->uMovieFormat = 1;
Ritor1
parents:
diff changeset
1052 strcpy(pVideoPlayer->pCurrentMovieName, pFilename);
Ritor1
parents:
diff changeset
1053 v8 = pVideoPlayer->pSmackerMovie;
Ritor1
parents:
diff changeset
1054 pVideoPlayer->dword_0000A0 = 2;
Ritor1
parents:
diff changeset
1055 v9 = (char *)malloc(v8->Width * v8->Height);
Ritor1
parents:
diff changeset
1056 pVideoPlayer->pSomeSmackerBuffer = v9;
Ritor1
parents:
diff changeset
1057 if ( !v9 )
Ritor1
parents:
diff changeset
1058 {
Ritor1
parents:
diff changeset
1059 Unload();
Ritor1
parents:
diff changeset
1060 v12 = "Can't allocate memory for buffer";
Ritor1
parents:
diff changeset
1061 sprintf(pVideoName, v12);
Ritor1
parents:
diff changeset
1062 MessageBoxA(0, pVideoName, "Smacker Error", 0);
Ritor1
parents:
diff changeset
1063 return;
Ritor1
parents:
diff changeset
1064 }
Ritor1
parents:
diff changeset
1065 SmackToBuffer(pVideoPlayer->pSmackerMovie, 0, 0, pVideoPlayer->pSmackerMovie->Width, pVideoPlayer->pSmackerMovie->Height, v9, 0);
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1066
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1067 v10 = SmackCheckSurfaceFromat();
0
Ritor1
parents:
diff changeset
1068 if ( a4 )
Ritor1
parents:
diff changeset
1069 {
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1070 v10 |= SMACKBLIT2X;
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1071
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1072 if (uCPUSpeed >= 165 )
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1073 v10 |= SMACKBLIT2XSMOOTHING;
0
Ritor1
parents:
diff changeset
1074 else
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1075 Log::Warning(L"Smacker seems to use lower resolution because it thinks CPU is slow");
0
Ritor1
parents:
diff changeset
1076 }
1035
306ec23b37df 004C1EE5 & other stuff
Nomad
parents: 1018
diff changeset
1077
0
Ritor1
parents:
diff changeset
1078 v11 = SmackBlitOpen(v10);
Ritor1
parents:
diff changeset
1079 pVideoPlayer->pSmackMovieBlit = v11;
Ritor1
parents:
diff changeset
1080 if ( !v11 )
Ritor1
parents:
diff changeset
1081 {
Ritor1
parents:
diff changeset
1082 Unload();
Ritor1
parents:
diff changeset
1083 v12 = "Failed to open Blit API";
Ritor1
parents:
diff changeset
1084 sprintf(pVideoName, v12);
Ritor1
parents:
diff changeset
1085 MessageBoxA(0, pVideoName, "Smacker Error", 0);
Ritor1
parents:
diff changeset
1086 return;
Ritor1
parents:
diff changeset
1087 }
Ritor1
parents:
diff changeset
1088 }
Ritor1
parents:
diff changeset
1089 }
Ritor1
parents:
diff changeset
1090 }
Ritor1
parents:
diff changeset
1091
Ritor1
parents:
diff changeset
1092
Ritor1
parents:
diff changeset
1093 //----- (004BF5B2) --------------------------------------------------------
Ritor1
parents:
diff changeset
1094 void VideoPlayer::_4BF5B2()
Ritor1
parents:
diff changeset
1095 {
Ritor1
parents:
diff changeset
1096 VideoPlayer *v1; // esi@1
Ritor1
parents:
diff changeset
1097 unsigned int v2; // eax@1
Ritor1
parents:
diff changeset
1098 _BINK **v3; // edi@2
Ritor1
parents:
diff changeset
1099
Ritor1
parents:
diff changeset
1100 v1 = this;
Ritor1
parents:
diff changeset
1101 v2 = this->uMovieFormat;
Ritor1
parents:
diff changeset
1102 if ( v2 == 2 )
Ritor1
parents:
diff changeset
1103 {
Ritor1
parents:
diff changeset
1104 v3 = &this->pBinkMovie;
Ritor1
parents:
diff changeset
1105 BinkGoto(pBinkMovie, 1, 0);
Ritor1
parents:
diff changeset
1106 BinkDoFrame(pBinkMovie);
Ritor1
parents:
diff changeset
1107 BinkNextFrame(pBinkMovie);
Ritor1
parents:
diff changeset
1108 }
Ritor1
parents:
diff changeset
1109 else
Ritor1
parents:
diff changeset
1110 {
Ritor1
parents:
diff changeset
1111 if ( v2 != 1 )
Ritor1
parents:
diff changeset
1112 return;
Ritor1
parents:
diff changeset
1113 SmackGoto(pSmackerMovie, 1);
Ritor1
parents:
diff changeset
1114 if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
Ritor1
parents:
diff changeset
1115 {
Ritor1
parents:
diff changeset
1116 SmackDoFrame(pSmackerMovie);
Ritor1
parents:
diff changeset
1117 SmackNextFrame(pSmackerMovie);
Ritor1
parents:
diff changeset
1118 }
Ritor1
parents:
diff changeset
1119 }
Ritor1
parents:
diff changeset
1120 pMouse->_469E24();
336
ea55d6414029 Event_proceccor preliminary
Gloval
parents: 323
diff changeset
1121 if ( window_SpeakInHouse && window_SpeakInHouse->ptr_1C == (void *)165 && !v1->pSmackerMovie )
0
Ritor1
parents:
diff changeset
1122 {
Ritor1
parents:
diff changeset
1123 bGameoverLoop = 1;
Ritor1
parents:
diff changeset
1124 sub_4BD8B5();
336
ea55d6414029 Event_proceccor preliminary
Gloval
parents: 323
diff changeset
1125 window_SpeakInHouse->Release();
0
Ritor1
parents:
diff changeset
1126 pParty->uFlags &= 0xFFFFFFFDu;
481
5b6e2021c6fe HOUSE_ID
Ritor1
parents: 480
diff changeset
1127 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) )
0
Ritor1
parents:
diff changeset
1128 {
388
d95a91011d57 AudioPlayer::PlaySound
Nomad
parents: 347
diff changeset
1129 pAudioPlayer->PlaySound(SOUND_Invalid, 0, 0, -1, 0, 0, 0, 0);
336
ea55d6414029 Event_proceccor preliminary
Gloval
parents: 323
diff changeset
1130 window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 165, 0);
832
dfd683c4f538 Hotkeys fixed
Nomad
parents: 762
diff changeset
1131 window_SpeakInHouse->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0);
dfd683c4f538 Hotkeys fixed
Nomad
parents: 762
diff changeset
1132 window_SpeakInHouse->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0);
dfd683c4f538 Hotkeys fixed
Nomad
parents: 762
diff changeset
1133 window_SpeakInHouse->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0);
dfd683c4f538 Hotkeys fixed
Nomad
parents: 762
diff changeset
1134 window_SpeakInHouse->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0);
0
Ritor1
parents:
diff changeset
1135 }
Ritor1
parents:
diff changeset
1136 bGameoverLoop = 0;
Ritor1
parents:
diff changeset
1137 }
Ritor1
parents:
diff changeset
1138 }
Ritor1
parents:
diff changeset
1139
Ritor1
parents:
diff changeset
1140 //----- (004BF73A) --------------------------------------------------------
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
1141 void VideoPlayer::SelectMovieType()
0
Ritor1
parents:
diff changeset
1142 {
Ritor1
parents:
diff changeset
1143 VideoPlayer *v1; // esi@1
Ritor1
parents:
diff changeset
1144 int v2; // edi@1
Ritor1
parents:
diff changeset
1145 unsigned __int8 v3; // bl@1
Ritor1
parents:
diff changeset
1146 int v4; // edi@1
Ritor1
parents:
diff changeset
1147 char Source[32]; // [sp+Ch] [bp-40h]@1
Ritor1
parents:
diff changeset
1148
Ritor1
parents:
diff changeset
1149 v1 = this;
Ritor1
parents:
diff changeset
1150 v2 = this->dword_0000A0;
Ritor1
parents:
diff changeset
1151 v3 = LOBYTE(this->bLoopPlaying);
Ritor1
parents:
diff changeset
1152 strcpy(Source, this->pCurrentMovieName);
Ritor1
parents:
diff changeset
1153 Unload();
Ritor1
parents:
diff changeset
1154 v4 = v2 - 1;
Ritor1
parents:
diff changeset
1155 if ( v4 )
Ritor1
parents:
diff changeset
1156 {
Ritor1
parents:
diff changeset
1157 if ( v4 == 1 )
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
1158 OpenGlobalMovie(Source, v3, 1);
0
Ritor1
parents:
diff changeset
1159 }
Ritor1
parents:
diff changeset
1160 else
Ritor1
parents:
diff changeset
1161 {
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 832
diff changeset
1162 OpenHouseMovie(Source, v3);
0
Ritor1
parents:
diff changeset
1163 }
Ritor1
parents:
diff changeset
1164 }
Ritor1
parents:
diff changeset
1165
Ritor1
parents:
diff changeset
1166 //----- (004BF8F6) --------------------------------------------------------
Ritor1
parents:
diff changeset
1167 void VideoPlayer::PlayDeathMovie()
Ritor1
parents:
diff changeset
1168 {
Ritor1
parents:
diff changeset
1169 bStopBeforeSchedule = 0;
165
Ritor1
parents: 151
diff changeset
1170 pResetflag = 0;
0
Ritor1
parents:
diff changeset
1171 pGame->pCShow->PlayMovie(MOVIE_Death, 1);
Ritor1
parents:
diff changeset
1172 }