ScummVM API documentation
qd_animation_frame.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_FRAME_H
23#define QDENGINE_QDCORE_QD_ANIMATION_FRAME_H
24
25#include "qdengine/qdcore/qd_sprite.h"
26
27
28namespace QDEngine {
29
31class qdAnimationFrame : public qdSprite {
32public:
36
37 qdAnimationFrame &operator = (const qdAnimationFrame &frm);
38
39 qdAnimationFrame *clone() const;
40
41 float start_time() const {
42 return _start_time;
43 }
44 float end_time() const {
45 return _start_time + _length;
46 }
47 float length() const {
48 return _length;
49 }
50
51 void set_start_time(float tm) {
52 _start_time = tm;
53 }
54 void set_length(float tm) {
55 _length = tm;
56 }
57
58 virtual void qda_load(class Common::SeekableReadStream *fh, int version = 100);
59
60 bool load_resources();
61 void free_resources();
62
63private:
64 float _start_time;
65 float _length;
66};
67
69
70} // namespace QDEngine
71
72#endif // QDENGINE_QDCORE_QD_ANIMATION_FRAME_H
Definition: stream.h:745
Кадр анимации.
Definition: qd_animation_frame.h:31
Спрайт.
Definition: qd_sprite.h:39
Базовый класс для игровых ресурсов.
Definition: console.h:28