ScummVM API documentation
movie_pc.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) 1999-2000 Revolution Software Ltd.
9  * This code is based on source code created by Revolution Software,
10  * used with permission.
11  *
12  * This program is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  */
26 
27 #ifndef ICB_MOVIE_PC_H__
28 #define ICB_MOVIE_PC_H__
29 
30 #include "engines/icb/global_objects_pc.h"
31 #include "engines/icb/sound/direct_sound.h"
32 #include "engines/icb/sound.h"
33 
34 #include "video/bink_decoder.h"
35 
36 namespace ICB {
37 
38 // Return codes for SequenceManager::DrawFrame()
39 #define JUSTFINE 0x0000
40 #define WAITING 0x0010
41 #define FINISHED 0x0020
42 #define NOMOVIE 0x0030
43 #define FADING 0x0040
44 
45 // Our global bink handler for movies
46 class MovieManager;
47 
48 extern MovieManager *g_theSequenceManager;
49 
50 class MovieManager {
51  Video::BinkDecoder *_binkDecoder;
52  int32 _x;
53  int32 _y;
54 
55  uint32 _fadeCounter;
56  uint32 _fadeRate;
57 
58  bool8 _loop;
59  bool _haveFaded;
60  bool _haveClearedScreen;
61  bool _rater;
62 
63 public:
64  MovieManager();
65  ~MovieManager();
66 
67  bool registerMovie(const char *fileName, bool8 fade, bool8 loop);
68 
69  uint32 getMovieHeight();
70  uint32 getMovieWidth();
71  uint32 getMovieFrames();
72 
73  bool busy();
74 
75  uint32 drawFrame(uint32 surface_id = working_buffer_id);
76  int32 getFrameNumber();
77 
78  void setRate();
79 
80  void setVolume(int32 vol);
81 
82  void kill();
83 
84 private:
85  void fadeScreen(uint32 surface_id);
86 };
87 
88 } // End of namespace ICB
89 #endif
Definition: movie_pc.h:50
Definition: actor.h:32