comparison VideoPlayer.h @ 0:9c0607679772

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