ScummVM API documentation
movie.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 * This file is dual-licensed.
22 * In addition to the GPLv3 license mentioned above, MojoTouch has
23 * exclusively licensed this code on March 23th, 2024, to be used in
24 * closed-source products.
25 * Therefore, any contributions (commits) to it will also be dual-licensed.
26 *
27 */
28
29#ifndef TOON_MOVIE_H
30#define TOON_MOVIE_H
31
32#include "toon/toon.h"
33#include "video/smk_decoder.h"
34
35namespace Toon {
36
37class SubtitleRenderer;
38
40public:
42
43 bool loadStream(Common::SeekableReadStream *stream) override;
44 bool isLowRes() { return _lowRes; }
45
46protected:
47 void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize) override;
48 SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 version) const override;
49
50private:
51 bool _lowRes;
52};
53
54class Movie {
55public:
57 virtual ~Movie(void);
58
59 void init() const;
60 void play(const Common::Path &video, int32 flags = 0);
61 bool isPlaying() { return _playing; }
62
63protected:
64 void playVideo(bool isFirstIntroVideo);
65 ToonEngine *_vm;
67 bool _playing;
68 SubtitleRenderer *_subtitle;
69};
70
71} // End of namespace Toon
72
73#endif
Definition: path.h:52
Definition: rational.h:40
Definition: stream.h:745
Definition: movie.h:54
Definition: subtitles.h:49
Definition: toon.h:118
Definition: movie.h:39
bool loadStream(Common::SeekableReadStream *stream) override
Definition: smk_decoder.h:77
Definition: anim.h:39