ScummVM API documentation
interactivevideo.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 NANCY_ACTION_INTERACTIVEVIDEO_H
23 #define NANCY_ACTION_INTERACTIVEVIDEO_H
24 
25 #include "engines/nancy/action/actionrecord.h"
26 
27 namespace Nancy {
28 namespace Action {
29 
30 class ActionManager;
31 class PlaySecondaryMovie;
32 
34  Common::Rect hotspot;
35  int32 setID = 0;
36  int16 flagID = -1;
37  int16 cursorID = -1;
38 };
39 
41  uint16 frameID = 0;
42  bool triggerOnNoHotspot = false;
43  int16 noHSFlagID = -1;
44  int16 noHSCursorID = -1;
46 };
47 
48 // Contents of an .iv file: the movie the hotspots belong to, and the list of
49 // movie frames that have hotspots on them.
51  Common::Path videoName;
53 
54  // Nancy14 only: the file's named hotspot sets, in file order. A hotspot's
55  // setID is an index into this array, and the name is what the action record
56  // keys its own set table by.
58 };
59 
60 void readInteractiveVideoFile(const Common::Path &filename, InteractiveVideoData &data);
61 
62 // Nancy14 replaced the .iv format with an "IVDataHI" one: the sets are named
63 // rather than numbered, and the flag and cursor for each live in the action
64 // record instead of the file.
65 void readInteractiveVideoFileNancy14(const Common::Path &filename, InteractiveVideoData &data);
66 
68 public:
69  InteractiveVideo() {}
70  virtual ~InteractiveVideo() {}
71 
72  void readData(Common::SeekableReadStream &stream) override;
73  void execute() override;
74 
75  void handleInput(NancyInput &input) override;
76 
77 protected:
78  Common::String getRecordTypeName() const override { return "InteractiveVideo"; }
79 
81  Common::Array<int16> _cursors;
82 
83  InteractiveVideoData _ivData;
84 
85  // Pointer to a movie AR
86  PlaySecondaryMovie *_movieAR = nullptr;
87 };
88 
89 } // End of namespace Action
90 } // End of namespace Nancy
91 
92 #endif // NANCY_ACTION_INTERACTIVEVIDEO_H
Definition: str.h:59
Definition: interactivevideo.h:50
Definition: array.h:52
Definition: rect.h:536
Definition: path.h:52
Definition: stream.h:745
Definition: secondarymovie.h:47
Definition: input.h:41
Definition: actionrecord.h:107
Definition: interactivevideo.h:67
Definition: interactivevideo.h:33
Definition: interactivevideo.h:40
Definition: actionmanager.h:32