ScummVM API documentation
overlays.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 BLADERUNNER_OVERLAYS_H
23 #define BLADERUNNER_OVERLAYS_H
24 
25 #include "common/array.h"
26 #include "common/str.h"
27 
28 namespace Graphics {
29 struct Surface;
30 }
31 
32 namespace BladeRunner {
33 
34 class BladeRunnerEngine;
35 class SaveFileReadStream;
36 class SaveFileWriteStream;
37 class VQAPlayer;
38 
39 class Overlays {
40  friend class Debugger;
41 
42  static const int kOverlayVideos = 5;
43 
44  struct Video {
45  bool loaded;
46  VQAPlayer *vqaPlayer;
47  Common::String name;
48  int32 hash;
49  int loopId;
50  int enqueuedLoopId;
51  bool loopForever;
52  int frame;
53  };
54 
55  BladeRunnerEngine *_vm;
56  Common::Array<Video> _videos;
57 
58 public:
60  bool init();
61  ~Overlays();
62 
63  int play(const Common::String &name, int loopId, bool loopForever, bool startNow, int a6);
64  void resume(bool isLoadingGame);
65  void remove(const Common::String &name);
66  void removeAll();
67  void tick();
68 
69  void save(SaveFileWriteStream &f);
70  void load(SaveFileReadStream &f);
71 
72 private:
73  int findByHash(int32 hash) const;
74  int findEmpty() const;
75 
76  void resetSingle(int i);
77  void reset();
78 };
79 
80 } // End of namespace BladeRunner
81 
82 #endif
Definition: savefile.h:88
Definition: str.h:59
Definition: actor.h:31
Definition: savefile.h:113
Definition: vqa_player.h:45
Definition: formatinfo.h:28
Definition: overlays.h:39
Definition: debugger.h:56
Definition: bladerunner.h:113
Definition: avi_frames.h:36