ScummVM API documentation
vdx.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 GROOVIE_VIDEO_VDX_H
23#define GROOVIE_VIDEO_VDX_H
24
25#include "groovie/video/player.h"
26#include "audio/mixer.h"
27
28namespace Common {
29class ReadStream;
30}
31
32namespace Groovie {
33
34class VDXPlayer : public VideoPlayer {
35public:
37 ~VDXPlayer() override;
38 void resetFlags() override;
39 void setOrigin(int16 x, int16 y) override;
40
41protected:
42 uint16 loadInternal() override;
43 bool playFrameInternal() override;
44 void stopAudioStream() override;
45
46private:
47 Graphics::Surface *_fg, *_bg;
48 uint8 _palBuf[3 * 256];
49 Audio::SoundHandle _soundHandle;
50
51 // Origin
52 int16 _origX, _origY;
53
54 // Video flags
55 bool _flagZero;
56 bool _flagOne;
57 bool _flagOnePrev;
58 byte _flag2Byte;
59 bool _flagThree;
60 bool _flagFour;
61 bool _flagFive;
62 bool _flagSix;
63 bool _flagSeven;
64 bool _flagEight;
65 bool _flagNine;
66
67 //bool _flagSkipStill;
68 bool _flagSkipPalette;
69 bool _flagFirstFrame;
70 //bool _flagTransparent;
71 //bool _flagUpdateStill;
72
73 void getStill(Common::ReadStream *in);
74 void getDelta(Common::ReadStream *in);
75 void expandColorMap(byte *out, uint16 colorMap, uint8 color1, uint8 color0);
76 void decodeBlockStill(byte *buf, byte *colors, uint16 imageWidth, uint8 mask);
77 void decodeBlockDelta(uint32 offset, byte *colors, uint16 imageWidth);
78 void chunkSound(Common::ReadStream *in);
79 void setPalette(uint8 *palette);
80 void fadeIn(uint8 *palette);
81};
82
83} // End of Groovie namespace
84
85#endif // GROOVIE_VIDEO_VDX_H
Definition: mixer.h:49
Definition: stream.h:385
Definition: groovie.h:116
Definition: vdx.h:34
Definition: player.h:36
Definition: algorithm.h:29
Definition: cursor.h:32
Definition: surface.h:67