ScummVM API documentation
movie_object.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_BAGLIB_MOVIE_OBJECT_H
24 #define BAGEL_BAGLIB_MOVIE_OBJECT_H
25 
26 #include "bagel/spacebar/baglib/object.h"
27 #include "bagel/spacebar/baglib/sound_object.h"
28 
29 namespace Bagel {
30 namespace SpaceBar {
31 
32 #define ASYNCH_DONT_QUEUE 0x0001
33 #define ASYNCH_PLAY_IMMEDIATE 0x0002
34 #define ASYNCH_DONT_OVERRIDE 0x0004
35 
39 class CBagMovieObject : public CBagObject {
40 public:
41  enum class dispType {
42  MOVIE, EXAMINE, PDA_MSG, ASYNCH_PDA_MSG
43  };
44 
45 private:
46  dispType _xDisplayType;
47  byte _bFlyThru;
48  int16 _nAsynchFlags;
49  bool _bIncrement : 1; // Increment timer for this movie?
50  bool _bOnBlack : 1; // Play movie on a black background.
51  CBagSoundObject *_pSndObj; // associated sound object
52 
53 public:
55  virtual ~CBagMovieObject();
56 
57  // Associated sound object access members
58  void setAssociatedSound(CBagSoundObject *p) {
59  _pSndObj = p;
60  }
61 
62  CBagSoundObject *getAssociatedSound() const {
63  return _pSndObj;
64  }
65 
66  ParseCodes setInfo(CBagIfstream &istr) override;
67 
68  bool runObject() override;
69 
70  // Return true if this asynch zelda movie can play right now
71  bool asynchPDAMovieCanPlay();
72 
73  // Special routines for handling asynch zelda movies
74  void setDontQueue() {
75  _nAsynchFlags |= ASYNCH_DONT_QUEUE;
76  }
77 
78  void setDontOverride() {
79  _nAsynchFlags |= ASYNCH_DONT_OVERRIDE;
80  }
81 
82  void setPlayImmediate() {
83  _nAsynchFlags |= ASYNCH_PLAY_IMMEDIATE;
84  }
85 
86  void setIncrement(bool b = true) {
87  _bIncrement = b;
88  }
89 
90  void setOnBlack(bool b = true) {
91  _bOnBlack = b;
92  }
93 
94  bool isDontQueue() const {
95  return (_nAsynchFlags & ASYNCH_DONT_QUEUE) != 0;
96  }
97 
98  bool isDontOverride() const {
99  return (_nAsynchFlags & ASYNCH_DONT_OVERRIDE) != 0;
100  }
101 
102  bool isPlayImmediate() const {
103  return (_nAsynchFlags & ASYNCH_PLAY_IMMEDIATE) != 0;
104  }
105 
106  bool isIncrement() const {
107  return _bIncrement;
108  }
109 
110  bool isOnBlack() const {
111  return _bOnBlack;
112  }
113 };
114 
115 } // namespace SpaceBar
116 } // namespace Bagel
117 
118 #endif
Definition: ifstream.h:32
Definition: object.h:86
Definition: movie_object.h:39
Definition: sound_object.h:36
Definition: afxwin.h:27