annotate VideoPlayer.h @ 993:ada1ed5f44a1

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