ScummVM API documentation
qd_animation_info.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_ANIMATION_INFO_H
23 #define QDENGINE_QDCORE_QD_ANIMATION_INFO_H
24 
25 #include "qdengine/parser/xml_fwd.h"
26 #include "qdengine/qdcore/qd_named_object.h"
27 
28 
29 namespace QDEngine {
30 
31 class qdAnimation;
32 
35 public:
38  ~qdAnimationInfo();
39 
40  qdAnimationInfo &operator = (const qdAnimationInfo &p);
41 
42  int named_object_type() const {
43  return QD_NAMED_OBJECT_ANIMATION_INFO;
44  }
45 
46  float speed() const {
47  return _speed;
48  }
49  void set_speed(float sp) {
50  _speed = sp;
51  }
52 
53  float animation_speed() const {
54  return _animation_speed;
55  }
56  void set_animation_speed(float sp) {
57  _animation_speed = sp;
58  }
59 
60  qdAnimation *animation() const;
61  const char *animation_name() const {
62  return name();
63  }
64 
65  void load_script(const xml::tag *p);
66  bool save_script(Common::WriteStream &fh, int indent = 0) const;
67 
68  void set_animation_name(const char *name) {
69  set_name(name);
70  }
71  void free_animation_name() {
72  set_name(0);
73  }
74 
75 private:
76 
77  float _speed;
78  float _animation_speed;
79 };
80 
82 
83 } // namespace QDEngine
84 
85 #endif // QDENGINE_QDCORE_QD_ANIMATION_INFO_H
void set_name(const char *p)
Устанавливает имя объекта.
Definition: qd_named_object_base.h:45
Definition: stream.h:77
Поименованный объект.
Definition: qd_named_object.h:70
Информация об анимации.
Definition: qd_animation_info.h:34
const char * name() const
Возвращает имя объекта.
Definition: qd_named_object_base.h:40
int named_object_type() const
Возвращает тип объекта.
Definition: qd_animation_info.h:42
XML тег.
Definition: xml_tag.h:33
Базовый класс для игровых ресурсов.
Definition: console.h:28
Анимация.
Definition: qd_animation.h:57