ScummVM API documentation
fish.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_FISH_H
23
#define STARK_VISUAL_EFFECTS_FISH_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
VisualEffectFish
:
public
VisualEffect
{
41
public
:
42
static
const
VisualType TYPE = Visual::kEffectFish;
43
44
explicit
VisualEffectFish
(
Gfx::Driver
*gfx,
const
Common::Point
&size);
45
~
VisualEffectFish
()
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
};
61
62
struct
Fish {
63
Common::Point
currentPosition;
64
Common::Point
previousPosition;
65
Common::Point
point1;
66
Common::Point
point2;
67
Common::Point
point3;
68
Common::Point
point4;
69
};
70
71
// Parameters
72
uint _fishCount;
73
int
_fishPathWidthRatio;
74
int
_fishPathHeightRatio;
75
int
_fishPathWidth;
76
int
_fishPathHeight;
77
int
_masterPathWidth;
78
int
_masterPathHeight;
79
byte _mainColorR;
80
byte _mainColorG;
81
byte _mainColorB;
82
uint32 _mainColor;
83
uint32 _otherColor;
84
uint _numFrames;
85
uint _maxRadius;
86
87
// State
88
uint32 _currentFrame;
89
Common::Array<Frame>
_frames;
90
Common::Array<Fish>
_fishList;
91
Fish _masterPath;
92
93
void
update();
94
void
drawFish(
const
Fish &fish);
95
};
96
97
}
// End of namespace Stark
98
99
#endif // STARK_VISUAL_EFFECTS_FISH_H
Common::String
Definition:
str.h:59
Stark::VisualEffect
Definition:
effect.h:48
Common::Array< Frame >
Stark::VisualEffectFish
Definition:
fish.h:40
Stark::Gfx::Driver
Definition:
driver.h:44
Stark
Definition:
console.h:27
Common::Point
Definition:
rect.h:45
engines
stark
visual
effects
fish.h
Generated on Sat Aug 31 2024 09:16:50 for ScummVM API documentation by
1.8.13