ScummVM API documentation
fireflies.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 STARK_VISUAL_EFFECTS_FIREFLIES_H
23
#define STARK_VISUAL_EFFECTS_FIREFLIES_H
24
25
#include "engines/stark/visual/effects/effect.h"
26
27
#include "common/array.h"
28
#include "common/rect.h"
29
30
namespace
Stark
{
31
32
namespace
Gfx {
33
class
Driver;
34
class
SurfaceRenderer;
35
}
36
40
class
VisualEffectFireFlies
:
public
VisualEffect
{
41
public
:
42
static
const
VisualType TYPE = Visual::kEffectFirefly;
43
44
explicit
VisualEffectFireFlies
(
Gfx::Driver
*gfx,
const
Common::Point
&size);
45
~
VisualEffectFireFlies
()
override
;
46
48
void
setParams(
const
Common::String
¶ms);
49
51
void
render(
const
Common::Point
&position);
52
53
private
:
54
55
struct
Frame {
56
float
weight1;
57
float
weight2;
58
float
weight3;
59
float
weight4;
60
uint32 color;
61
};
62
63
struct
FireFly {
64
Common::Point
currentPosition;
65
uint32 currentFrame;
66
Common::Point
point1;
67
Common::Point
point2;
68
Common::Point
point3;
69
Common::Point
point4;
70
};
71
72
// Parameters
73
uint _fireFlyCount;
74
byte _mainColorR;
75
byte _mainColorG;
76
byte _mainColorB;
77
78
// State
79
Common::Array<Frame>
_frames;
80
Common::Array<FireFly>
_fireFlies;
81
82
void
update();
83
void
drawFireFly(
const
FireFly &fly);
84
};
85
86
}
// End of namespace Stark
87
88
#endif // STARK_VISUAL_EFFECTS_FIREFLIES_H
Common::String
Definition:
str.h:59
Stark::VisualEffect
Definition:
effect.h:48
Common::Array< Frame >
Stark::Gfx::Driver
Definition:
driver.h:44
Stark
Definition:
console.h:27
Common::Point
Definition:
rect.h:45
Stark::VisualEffectFireFlies
Definition:
fireflies.h:40
engines
stark
visual
effects
fireflies.h
Generated on Fri Nov 22 2024 09:24:20 for ScummVM API documentation by
1.8.13