ScummVM API documentation
AnimationFrame.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/*
23 * This code is based on the CRAB engine
24 *
25 * Copyright (c) Arvind Raja Yadav
26 *
27 * Licensed under MIT
28 *
29 */
30
31#ifndef CRAB_ANIMATIONFRAME_H
32#define CRAB_ANIMATIONFRAME_H
33
34#include "crab/animation/AnimationEffect.h"
35#include "crab/image/ImageManager.h"
36#include "crab/text/TextManager.h"
37#include "crab/ui/HoverInfo.h"
38
39namespace Crab {
40
41namespace pyrodactyl {
42namespace anim {
43
44struct AnimationFrame : public Vector2i {
45 // The image drawn in this frame
46 ImageKey _img;
47
48 // This is the time in we draw the frame milliseconds relative to the start of the entire animation
49 uint32 _start, _finish;
50
51 // The effect applied to the image
52 AnimationEffect _eff;
53
54 // In case we want to display any words during the animation
56
57 // The color drawn on the screen
58 Color _col;
59
61 _img = 0;
62 _start = 0;
63 _finish = 0;
64 _col.r = 0;
65 _col.g = 0;
66 _col.b = 0;
67 _col.a = 255;
68 }
69
70 AnimationFrame(rapidxml::xml_node<char> *node);
71
72 void reset();
73 void draw(const uint32 &timestamp);
74 DrawType internalEvents(const uint32 &timestamp);
75};
76} // End of namespace anim
77} // End of namespace pyrodactyl
78
79} // End of namespace Crab
80
81#endif // CRAB_ANIMATIONFRAME_H
Definition: HoverInfo.h:41
Definition: color.h:26
Definition: AnimationEffect.h:55
Definition: AnimationFrame.h:44