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  * Additional copyright for this file:
8  * Copyright (C) 1995-1997 Presto Studios, Inc.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 
25 #ifndef PEGASUS_MOVIE_H
26 #define PEGASUS_MOVIE_H
27 
28 #include "common/str.h"
29 
30 #include "pegasus/elements.h"
31 #include "pegasus/surface.h"
32 #include "video/qt_decoder.h"
33 
34 namespace Video {
35 class VideoDecoder;
36 }
37 
38 namespace Pegasus {
39 
40 class Movie : public Animation, public PixelImage {
41 public:
42  Movie(const DisplayElementID);
43  ~Movie() override;
44 
45  virtual void initFromMovieFile(const Common::Path &fileName, bool transparent = false);
46 
47  bool isMovieValid() { return _video != 0; }
48 
49  virtual void releaseMovie();
50 
51  void draw(const Common::Rect &) override;
52  virtual void redrawMovieWorld();
53 
54  void setTime(const TimeValue, const TimeScale = 0) override;
55 
56  void setRate(const Common::Rational) override;
57 
58  void start() override;
59  void stop() override;
60  void resume() override;
61  void pause() override;
62 
63  virtual void moveMovieBoxTo(const CoordType, const CoordType);
64 
65  void setStop(const TimeValue, const TimeScale = 0) override;
66 
67  TimeValue getDuration(const TimeScale = 0) const override;
68 
69  // *** HACK ALERT
70  Video::VideoDecoder *getMovie() { return _video; }
71  void setVolume(uint16);
72 
73 protected:
74  void updateTime() override;
75 
77  Common::Rect _movieBox;
78 };
79 
80 class GlowingMovie : public Movie {
81 public:
82  GlowingMovie(DisplayElementID);
83  ~GlowingMovie() override {}
84 
85  void draw(const Common::Rect &) override;
86 
87  void setBounds(const Common::Rect &) override;
88 
89  void setGlowing(const bool glowing) { _glowing = glowing; }
90 
91 protected:
92  bool _glowing;
93 };
94 
95 class ScalingMovie : public GlowingMovie {
96 public:
97  ScalingMovie(DisplayElementID);
98  ~ScalingMovie() override {}
99 
100  void draw(const Common::Rect &) override;
101 };
102 
103 } // End of namespace Pegasus
104 
105 #endif
Definition: movie.h:40
Definition: qt_decoder.h:60
Definition: movie.h:80
Definition: rect.h:144
Definition: path.h:52
Definition: rational.h:40
Definition: movie.h:95
Definition: video_decoder.h:53
Definition: elements.h:112
Definition: surface.h:92
Definition: avi_frames.h:36
Definition: ai_action.h:33