0
|
1 #pragma once
|
|
2 #include "OSAPI.h"
|
|
3
|
|
4 #include "mm7_data.h"
|
|
5
|
|
6
|
|
7
|
|
8 #pragma pack(push, 1)
|
|
9
|
|
10
|
|
11
|
|
12 struct _BINK
|
|
13 {
|
|
14 int uWidth;
|
|
15 int uHeight;
|
|
16 };
|
|
17
|
|
18 struct _BINK_1_5_21_0: public _BINK
|
|
19 {
|
|
20 int uNumFrames;
|
|
21 int uCurrentFrame;
|
|
22 int Data1;
|
|
23 int uFrameRate;
|
|
24 int field_18[3];
|
|
25 int uFlags;
|
|
26 };
|
|
27
|
|
28 struct _BINK_3_0_0_0: public _BINK
|
|
29 {
|
|
30 int unk_0;
|
|
31 int unk_1;
|
|
32 int uNumFrames;
|
|
33 int uCurrentFrame;
|
|
34 int _unk2;
|
|
35 int _unk_[10];
|
|
36 };
|
|
37
|
|
38
|
|
39 struct _BINKBUF
|
|
40 {
|
|
41 int uWidth;
|
|
42 int uHeight;
|
|
43 int field_8;
|
|
44 int field_C;
|
|
45 int uBinkDDSurfaceType;
|
|
46 void *pDDrawSurfaceData;
|
|
47 int uDDrawSurfacePitch;
|
|
48 int field_1C;
|
|
49 int field_20;
|
|
50 int field_24;
|
|
51 int field_28;
|
|
52 int field_2C;
|
|
53 int field_30;
|
|
54 int field_34;
|
|
55 int field_38;
|
|
56 int field_3C;
|
|
57 int field_40;
|
|
58 int field_44;
|
|
59 struct IDirectDrawSurface *pTargetDDrawSurface;
|
|
60 int field_4C;
|
|
61 int uRectX;
|
|
62 int uRectY;
|
|
63 HWND hWnd;
|
|
64 int field_5C;
|
|
65 float field_60;
|
|
66 float field_64;
|
|
67 int field_68;
|
|
68 int field_6C;
|
|
69 void *pDDrawSurfaceData_;
|
|
70 int field_74;
|
|
71 int field_78;
|
|
72 };
|
|
73 struct _BINKBUF_1_5_21_0: public _BINKBUF
|
|
74 {
|
|
75 int field_7C;
|
|
76 int field_80;
|
|
77 int field_84;
|
|
78 int field_88;
|
|
79 int field_8C;
|
|
80 int field_90;
|
|
81 int field_94;
|
|
82 int field_98;
|
|
83 int field_9C;
|
|
84 int field_A0;
|
|
85 };
|
|
86
|
|
87 struct _BINKBUF_3_0_0_0: public _BINKBUF
|
|
88 {
|
|
89 };
|
|
90 #pragma pack(pop)
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95 #pragma pack(push, 1)
|
|
96 struct MovieHeader
|
|
97 {
|
|
98 char pVideoName[40];
|
|
99 unsigned int uFileOffset;
|
|
100 };
|
|
101 #pragma pack(pop)
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
107 void __cdecl ShowIntroVideo_and_LoadingScreen();
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112 #pragma pack(push, 1)
|
|
113 struct VideoPlayer
|
|
114 {
|
|
115 //----- (004BE6F5) --------------------------------------------------------
|
|
116 inline VideoPlayer():
|
|
117 field_54(0),
|
|
118 pBinkMovie(nullptr), pBinkBuffer(nullptr),
|
|
119 pSmackerMovie(nullptr), pSmackerBuffer(nullptr), pSmackMovieBlit(nullptr)
|
|
120 {
|
|
121 //RGBTexture::RGBTexture(&pVideoPlayer->pVideoFrame);
|
|
122 bStopBeforeSchedule = false;
|
165
|
123 pResetflag = 0;
|
0
|
124 byte_F8BC0C = 0;
|
|
125 //pBinkMovie = nullptr;
|
|
126 }
|
|
127 //----- (004BECBD) --------------------------------------------------------
|
|
128 virtual ~VideoPlayer()
|
|
129 {
|
|
130 bStopBeforeSchedule = false;
|
165
|
131 pResetflag = 0;
|
0
|
132 pVideoFrame.Release();
|
|
133 }
|
|
134
|
|
135 void PlayDeathMovie();
|
|
136 unsigned int SmackCheckSurfaceFromat();
|
|
137 void Initialize();
|
|
138 void Prepare();
|
|
139 void Unload();
|
|
140 void FastForwardToFrame(unsigned int uFrameNum);
|
|
141 void BinkDrawFrame(HWND hWnd, int a3, int a4);
|
|
142 void BinkUpdatePalette(HWND hWnd) {}
|
|
143 void SmackDrawFrame(HWND hWnd, int a3, int a4);
|
|
144 void SmackUpdatePalette(HWND hWnd);
|
|
145 _BINK *OpenBink(const char *pName);
|
|
146 struct _SMACK *OpenSmack(const char *pFilename);
|
898
|
147 void OpenHouseMovie(const char *pMovieName, unsigned int a3_1);//0x4BF28F
|
0
|
148 bool AnyMovieLoaded();
|
898
|
149 void OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4);
|
0
|
150 void _4BF5B2();
|
898
|
151 void SelectMovieType();//0x4BF73A
|
0
|
152 _BINKBUF *CreateBinkBuffer(HWND a1, unsigned int uWidth, unsigned int uHeight, char a4);
|
|
153
|
|
154 static void __fastcall MovieLoop(const char *pMovieName, int a2, int a3, int a4);
|
|
155
|
|
156
|
|
157 RGBTexture pVideoFrame;
|
|
158 struct _SMACK *pSmackerMovie;
|
|
159 struct _SMACKBUF *pSmackerBuffer;
|
|
160 char *pSomeSmackerBuffer;
|
|
161 int field_34;
|
|
162 MovieHeader *pMightVideoHeaders;
|
|
163 MovieHeader *pMagicVideoHeaders;
|
165
|
164 int pResetflag;
|
0
|
165 int field_44;
|
|
166 unsigned int uNumMightVideoHeaders;
|
|
167 unsigned int uNumMagicVideoHeaders;
|
|
168 int uBinkDirectDrawSurfaceType;
|
|
169 int field_54;
|
|
170 unsigned int bPlayingMovie;
|
|
171 unsigned int bFirstFrame;
|
|
172 unsigned int bUsingSmackerMMX;
|
|
173 unsigned int bLoopPlaying;
|
|
174 int field_68;
|
|
175 unsigned int bStopBeforeSchedule;
|
|
176 HWND hWindow;
|
|
177 struct _SMACKBLIT *pSmackMovieBlit;
|
|
178 HANDLE hMightVid;
|
|
179 HANDLE hMagicVid;
|
|
180 _BINK *pBinkMovie;
|
|
181 _BINKBUF *pBinkBuffer;
|
|
182 char field_88[20];
|
|
183 unsigned int uMovieFormat;
|
|
184 int dword_0000A0;
|
|
185 char pCurrentMovieName[64];
|
|
186 char pVideoFrameTextureFilename[32];
|
323
|
187 int field_104;
|
0
|
188 };
|
|
189 #pragma pack(pop)
|
|
190
|
|
191
|
|
192
|
|
193
|
|
194
|
|
195 extern VideoPlayer *pVideoPlayer;
|