OpenXcom  1.0
Open-source clone of the original X-Com
RuleVideo.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom 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  * OpenXcom 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 OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <yaml-cpp/yaml.h>
21 #include <vector>
22 #include <string>
23 #include <map>
24 #include "../Interface/Text.h"
25 
26 namespace OpenXcom
27 {
28 
30 {
31  std::string musicId; // just the extension-less filename, like "GMWIN"
32  int transitionSeconds; // number of seconds to show each slide
33 };
34 
36 {
37  std::string imagePath; // relative path to slide image
38  std::string caption; // STR id of caption text
39  int w, h, x, y, color; // caption rect and color info
40  TextHAlign align; // caption alignment
41  int transitionSeconds; // number of seconds to show this slide
42 };
43 
44 class RuleVideo
45 {
46 private:
47  std::string _id;
48  bool _useUfoAudioSequence;
49  std::vector<std::string> _videos, _audioTracks;
50  SlideshowHeader _slideshowHeader;
51  std::vector<SlideshowSlide> _slides;
52 public:
53  RuleVideo(const std::string &type);
54  ~RuleVideo();
55  void load(const YAML::Node &node);
58  bool useUfoAudioSequence() const;
59  const std::vector<std::string> * getVideos() const;
60  const SlideshowHeader & getSlideshowHeader() const;
61  const std::vector<SlideshowSlide> * getSlides() const;
62  const std::vector<std::string> * getAudioTracks() const;
63 };
64 
65 }
Definition: RuleVideo.h:35
Definition: RuleVideo.h:29
Definition: RuleVideo.h:44
bool useUfoAudioSequence() const
returns whether to use the UFO audio sequence. in general, this should only ever be true for the vani...
Definition: RuleVideo.cpp:84
Definition: BaseInfoState.cpp:40