ScummVM API documentation
movies.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 TWINE_FLAMOVIES_H
23#define TWINE_FLAMOVIES_H
24
25#include "common/memstream.h"
26#include "common/scummsys.h"
27#include "common/file.h"
28#include "graphics/palette.h"
29
30namespace TwinE {
31
33#define FLASCREEN_WIDTH 320
35#define FLASCREEN_HEIGHT 200
36
40 int8 version[5] {0};
42 int32 numOfFrames = 0;
44 int16 speed = 0;
46 int16 xsize = 0;
48 int16 ysize = 0;
49};
50
53 int16 nbFrames = 0;
54 int32 offsetNextFrame = 0;
55};
56
57class TwinEEngine;
58
59class Movies {
60private:
61 TwinEEngine *_engine;
62
63 Common::File _file;
64
66 int32 _fadeOut = 0;
68 int32 _fadeOutFrames = 0;
69 bool _flagFirst = false;
70 Graphics::Palette _paletteOrg{0};
71
73 uint8 _flaBuffer[FLASCREEN_WIDTH * FLASCREEN_HEIGHT] {0};
74
76 int32 _samplesInFla = 0;
78 FLAHeaderStruct _flaHeaderData;
80 FLAFrameDataStruct _frameData;
81
82 void drawKeyFrame(Common::MemoryReadStream &stream, int32 width, int32 height);
83 void drawDeltaFrame(Common::MemoryReadStream &stream, int32 width);
89 void scaleFla2x();
90 void drawNextFrameFla();
91
92#ifdef USE_GIF
93 void prepareGIF(int index);
94#endif
95 void playGIFMovie(const char *flaName);
96
97 bool playSmkMovie(const char *name, int index);
98
99public:
100 Movies(TwinEEngine *engine);
101
107 bool playMovie(const char *name);
108};
109
110} // namespace TwinE
111
112#endif
Definition: file.h:47
Definition: memstream.h:43
Simple class for handling a palette data.
Definition: palette.h:61
Definition: movies.h:59
bool playMovie(const char *name)
Definition: twine.h:207
Definition: movies.h:52
Definition: movies.h:38
int16 xsize
Definition: movies.h:46
int16 speed
Definition: movies.h:44
int32 numOfFrames
Definition: movies.h:42
int8 version[5]
Definition: movies.h:40
int16 ysize
Definition: movies.h:48