annotate VideoPlayer.h @ 1256:236d39ae8f6e

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