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 
29 namespace TwinE {
30 
32 #define FLASCREEN_WIDTH 320
33 
34 #define FLASCREEN_HEIGHT 200
35 
39  int8 version[5] {0};
41  int32 numOfFrames = 0;
43  int16 speed = 0;
45  int16 xsize = 0;
47  int16 ysize = 0;
48 };
49 
52  int16 nbFrames = 0;
53  int32 offsetNextFrame = 0;
54 };
55 
56 class TwinEEngine;
57 
58 class Movies {
59 private:
60  TwinEEngine *_engine;
61 
62  Common::File _file;
63 
65  int32 _fadeOut = 0;
67  int32 _fadeOutFrames = 0;
68  bool _flaPaletteVar = false;
69 
71  uint8 _flaBuffer[FLASCREEN_WIDTH * FLASCREEN_HEIGHT] {0};
72 
74  int32 _samplesInFla = 0;
76  FLAHeaderStruct _flaHeaderData;
78  FLAFrameDataStruct _frameData;
79 
80  void drawKeyFrame(Common::MemoryReadStream &stream, int32 width, int32 height);
81  void drawDeltaFrame(Common::MemoryReadStream &stream, int32 width);
87  void scaleFla2x();
88  void processFrame();
89 
90  void prepareGIF(int index);
91  void playGIFMovie(const char *flaName);
92 
93  bool playSmkMovie(const char *name, int index);
94 
95 public:
96  Movies(TwinEEngine *engine);
97 
103  bool playMovie(const char *name);
104 };
105 
106 } // namespace TwinE
107 
108 #endif
Definition: movies.h:51
int16 speed
Definition: movies.h:43
int16 xsize
Definition: movies.h:45
Definition: movies.h:37
Definition: file.h:47
int16 ysize
Definition: movies.h:47
Definition: twine.h:200
Definition: achievements_tables.h:27
Definition: memstream.h:43
int32 numOfFrames
Definition: movies.h:41
Definition: movies.h:58
int8 version[5]
Definition: movies.h:39