ScummVM API documentation
qd_grid_zone_state.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_GRID_ZONE_STATE_H
23#define QDENGINE_QDCORE_QD_GRID_ZONE_STATE_H
24
25#include "qdengine/parser/xml_fwd.h"
26#include "qdengine/qdcore/qd_conditional_object.h"
27
28namespace QDEngine {
29
32public:
33 explicit qdGridZoneState(bool st);
36
37 qdGridZoneState &operator = (const qdGridZoneState &st);
38
39 int named_object_type() const {
40 return QD_NAMED_OBJECT_GRID_ZONE_STATE;
41 }
42
44 bool load_script(const xml::tag *p);
46 bool save_script(Common::WriteStream &fh, int indent = 0) const;
47
49 bool state() const {
50 return _state;
51 }
52
54
55 static const char *const ZONE_STATE_ON_NAME;
56 static const char *const ZONE_STATE_OFF_NAME;
57
58private:
59
61 bool _state;
62};
63
64} // namespace QDEngine
65
66#endif // QDENGINE_QDCORE_QD_GRID_ZONE_STATE_H
Definition: stream.h:77
Объект с условиями.
Definition: qd_conditional_object.h:37
trigger_start_mode
Варианты старта триггера.
Definition: qd_conditional_object.h:122
Состояние зоны на сетке сцены.
Definition: qd_grid_zone_state.h:31
bool save_script(Common::WriteStream &fh, int indent=0) const
Запись данных в скрипт.
int named_object_type() const
Возвращает тип объекта.
Definition: qd_grid_zone_state.h:39
qdConditionalObject::trigger_start_mode trigger_start()
Активация триггера.
bool load_script(const xml::tag *p)
Загрузка данных из скрипта.
bool state() const
Включить или выключить зону.
Definition: qd_grid_zone_state.h:49
XML тег.
Definition: xml_tag.h:33
Базовый класс для игровых ресурсов.
Definition: console.h:28