annotate VideoPlayer.h @ 1555:9c4cf5b07e98

Minor assert fixes in players.cpp
author Grumpy7
date Sat, 07 Sep 2013 21:17:47 +0200
parents 934074e7fcc1
children 633f81bb3ae7
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "OSAPI.h"
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1253
diff changeset
3 #include "Texture.h"
0
Ritor1
parents:
diff changeset
4
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
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1262
diff changeset
107 void ShowIntroVideo_and_LoadingScreen();
0
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 {
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1253
diff changeset
115 VideoPlayer();
0
Ritor1
parents:
diff changeset
116 //----- (004BECBD) --------------------------------------------------------
Ritor1
parents:
diff changeset
117 virtual ~VideoPlayer()
Ritor1
parents:
diff changeset
118 {
Ritor1
parents:
diff changeset
119 bStopBeforeSchedule = false;
165
Ritor1
parents: 0
diff changeset
120 pResetflag = 0;
0
Ritor1
parents:
diff changeset
121 pVideoFrame.Release();
Ritor1
parents:
diff changeset
122 }
Ritor1
parents:
diff changeset
123
Ritor1
parents:
diff changeset
124 void PlayDeathMovie();
Ritor1
parents:
diff changeset
125 unsigned int SmackCheckSurfaceFromat();
Ritor1
parents:
diff changeset
126 void Initialize();
Ritor1
parents:
diff changeset
127 void Prepare();
Ritor1
parents:
diff changeset
128 void Unload();
Ritor1
parents:
diff changeset
129 void FastForwardToFrame(unsigned int uFrameNum);
Ritor1
parents:
diff changeset
130 void BinkDrawFrame(HWND hWnd, int a3, int a4);
Ritor1
parents:
diff changeset
131 void BinkUpdatePalette(HWND hWnd) {}
Ritor1
parents:
diff changeset
132 void SmackDrawFrame(HWND hWnd, int a3, int a4);
Ritor1
parents:
diff changeset
133 void SmackUpdatePalette(HWND hWnd);
Ritor1
parents:
diff changeset
134 _BINK *OpenBink(const char *pName);
Ritor1
parents:
diff changeset
135 struct _SMACK *OpenSmack(const char *pFilename);
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
136 void OpenHouseMovie(const char *pMovieName, unsigned int a3_1);//0x4BF28F
0
Ritor1
parents:
diff changeset
137 bool AnyMovieLoaded();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
138 void OpenGlobalMovie(const char *pFilename, unsigned int bLoop, int a4);
0
Ritor1
parents:
diff changeset
139 void _4BF5B2();
898
10fa7dad1391 DrawPaperdoll clean
Ritor1
parents: 323
diff changeset
140 void SelectMovieType();//0x4BF73A
0
Ritor1
parents:
diff changeset
141 _BINKBUF *CreateBinkBuffer(HWND a1, unsigned int uWidth, unsigned int uHeight, char a4);
Ritor1
parents:
diff changeset
142
Ritor1
parents:
diff changeset
143 static void __fastcall MovieLoop(const char *pMovieName, int a2, int a3, int a4);
Ritor1
parents:
diff changeset
144
Ritor1
parents:
diff changeset
145
Ritor1
parents:
diff changeset
146 RGBTexture pVideoFrame;
Ritor1
parents:
diff changeset
147 struct _SMACK *pSmackerMovie;
Ritor1
parents:
diff changeset
148 struct _SMACKBUF *pSmackerBuffer;
Ritor1
parents:
diff changeset
149 char *pSomeSmackerBuffer;
Ritor1
parents:
diff changeset
150 int field_34;
Ritor1
parents:
diff changeset
151 MovieHeader *pMightVideoHeaders;
Ritor1
parents:
diff changeset
152 MovieHeader *pMagicVideoHeaders;
165
Ritor1
parents: 0
diff changeset
153 int pResetflag;
0
Ritor1
parents:
diff changeset
154 int field_44;
Ritor1
parents:
diff changeset
155 unsigned int uNumMightVideoHeaders;
Ritor1
parents:
diff changeset
156 unsigned int uNumMagicVideoHeaders;
Ritor1
parents:
diff changeset
157 int uBinkDirectDrawSurfaceType;
Ritor1
parents:
diff changeset
158 int field_54;
Ritor1
parents:
diff changeset
159 unsigned int bPlayingMovie;
Ritor1
parents:
diff changeset
160 unsigned int bFirstFrame;
Ritor1
parents:
diff changeset
161 unsigned int bUsingSmackerMMX;
Ritor1
parents:
diff changeset
162 unsigned int bLoopPlaying;
Ritor1
parents:
diff changeset
163 int field_68;
Ritor1
parents:
diff changeset
164 unsigned int bStopBeforeSchedule;
Ritor1
parents:
diff changeset
165 HWND hWindow;
Ritor1
parents:
diff changeset
166 struct _SMACKBLIT *pSmackMovieBlit;
Ritor1
parents:
diff changeset
167 HANDLE hMightVid;
Ritor1
parents:
diff changeset
168 HANDLE hMagicVid;
Ritor1
parents:
diff changeset
169 _BINK *pBinkMovie;
Ritor1
parents:
diff changeset
170 _BINKBUF *pBinkBuffer;
Ritor1
parents:
diff changeset
171 char field_88[20];
Ritor1
parents:
diff changeset
172 unsigned int uMovieFormat;
Ritor1
parents:
diff changeset
173 int dword_0000A0;
Ritor1
parents:
diff changeset
174 char pCurrentMovieName[64];
Ritor1
parents:
diff changeset
175 char pVideoFrameTextureFilename[32];
323
d720a13e2273 Very basic picking & entering houses
Nomad
parents: 165
diff changeset
176 int field_104;
0
Ritor1
parents:
diff changeset
177 };
Ritor1
parents:
diff changeset
178 #pragma pack(pop)
Ritor1
parents:
diff changeset
179
Ritor1
parents:
diff changeset
180
Ritor1
parents:
diff changeset
181
Ritor1
parents:
diff changeset
182
Ritor1
parents:
diff changeset
183
Ritor1
parents:
diff changeset
184 extern VideoPlayer *pVideoPlayer;