ScummVM API documentation
pmvplayer.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef MADE_PMVPLAYER_H
23 #define MADE_PMVPLAYER_H
24 
25 #include "audio/mixer.h"
26 
27 namespace Common {
28 class File;
29 }
30 
31 namespace Graphics {
32 struct Surface;
33 }
34 
35 namespace Audio {
36 class QueuingAudioStream;
37 }
38 
39 namespace Made {
40 
41 class MadeEngine;
42 
43 class PmvPlayer {
44 public:
45  PmvPlayer(MadeEngine *vm, Audio::Mixer *mixer);
46  ~PmvPlayer();
47  // Returns true if the movie was played till the end
48  bool play(const char *filename);
49 protected:
50  MadeEngine *_vm;
51  Audio::Mixer *_mixer;
52  Common::File *_fd;
53  Audio::QueuingAudioStream *_audioStream;
54  Audio::SoundHandle _audioStreamHandle;
55  byte _paletteRGB[768];
56  Graphics::Surface *_surface;
57  bool _aborted;
58  void readChunk(uint32 &chunkType, uint32 &chunkSize);
59  void handleEvents();
60  void updateScreen();
61  void decompressPalette(byte *palData, byte *outPal, uint32 palDataSize);
62 };
63 
64 }
65 
66 #endif
Definition: surface.h:66
Definition: made.h:55
Definition: mixer.h:49
Definition: mixer.h:59
Definition: file.h:47
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: pmvplayer.h:43
Definition: audiostream.h:370
Definition: console.h:27
Definition: system.h:37