ScummVM API documentation
qd_video.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 QDENGINE_QDCORE_QD_VIDEO_H
23#define QDENGINE_QDCORE_QD_VIDEO_H
24
25#include "qdengine/parser/xml_fwd.h"
26#include "qdengine/qdcore/qd_sprite.h"
27#include "qdengine/qdcore/qd_conditional_object.h"
28#include "qdengine/qdcore/qd_file_owner.h"
29
30
31namespace QDEngine {
32
34class qdVideo : public qdConditionalObject, public qdFileOwner {
35public:
36 enum { // flags
46 VID_ENABLE_MUSIC = 0x10
47 };
48
49 qdVideo();
50 qdVideo(const qdVideo &v);
51 ~qdVideo();
52
53 qdVideo &operator = (const qdVideo &v);
54 int named_object_type() const {
55 return QD_NAMED_OBJECT_VIDEO;
56 }
57
58 const Common::Path file_name() const {
59 return _file_name;
60 }
61 void set_file_name(const Common::Path &fname) {
62 _file_name = fname;
63 }
64
65 // Фон, на котором будет проигрываться видео
66 void set_background_file_name(const Common::Path &fname) {
67 _background.set_file(fname);
68 }
69 const Common::Path background_file_name() const {
70 return _background.file();
71 }
72 bool draw_background();
73
74 // Экранные координаты верхнего левого угла
75 const Vect2s &position() const {
76 return _position;
77 }
78 void set_position(const Vect2s pos) {
79 _position = pos;
80 }
81
82 bool load_script(const xml::tag *p);
83 bool save_script(Common::WriteStream &fh, int indent = 0) const;
84
86
87 bool is_intro_movie() const {
89 }
90
91private:
92
93 Vect2s _position;
94 Common::Path _file_name;
95
96 qdSprite _background;
97};
98
99} // namespace QDEngine
100
101#endif // QDENGINE_QDCORE_QD_VIDEO_H
Definition: path.h:52
Definition: stream.h:77
Definition: xmath.h:419
Объект с условиями.
Definition: qd_conditional_object.h:37
trigger_start_mode
Варианты старта триггера.
Definition: qd_conditional_object.h:122
Definition: qd_file_owner.h:27
bool check_flag(int fl) const
Возвращает true, если установлен флаг fl.
Definition: qd_named_object.h:99
Спрайт.
Definition: qd_sprite.h:39
Видеовставка.
Definition: qd_video.h:34
qdConditionalObject::trigger_start_mode trigger_start()
Активация триггера.
@ VID_ENABLE_MUSIC
не прерывать музыку при показе видео
Definition: qd_video.h:46
@ VID_INTRO_MOVIE
показывать ролик при запуске игры до главного меню
Definition: qd_video.h:44
@ VID_CENTER_FLAG
расположить в центре экрана
Definition: qd_video.h:38
@ VID_DISABLE_INTERRUPT_FLAG
нельзя прерывать ролик нажатием мыши/кнопки
Definition: qd_video.h:42
@ VID_FULLSCREEN_FLAG
растягивать на весь экран
Definition: qd_video.h:40
int named_object_type() const
Возвращает тип объекта.
Definition: qd_video.h:54
Базовый класс для игровых ресурсов.
Definition: console.h:28