ScummVM API documentation
set_effects.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 BLADERUNNER_SET_EFFECTS_H
23 #define BLADERUNNER_SET_EFFECTS_H
24 
25 #include "bladerunner/bladerunner.h"
26 #include "bladerunner/color.h"
27 #include "bladerunner/fog.h"
28 
29 #include "common/stream.h"
30 
31 namespace BladeRunner {
32 
33 class SetEffects {
34  friend class Debugger;
35 
36  BladeRunnerEngine *_vm;
37 
38  Color _distanceColor;
39  float _distanceCoeficient;
40  Color _fadeColor;
41  float _fadeDensity;
42  int _fogCount;
43  Fog *_fogs;
44 
45 public:
47  ~SetEffects();
48 
49  void read(Common::ReadStream *stream, int frameCount);
50 
51  void reset();
52 
53  void setupFrame(int frame);
54 
55  void setFadeColor(float r, float g, float b);
56  void setFadeDensity(float density);
57  void setFogColor(const Common::String &fogName, float r, float g, float b);
58  void setFogDensity(const Common::String &fogName, float density);
59 
60  void calculateColor(Vector3 viewPosition, Vector3 position, float *outCoeficient, Color *outColor) const;
61 
62 private:
63  Fog *findFog(const Common::String &fogName) const;
64 };
65 
66 } // End of namespace BladeRunner
67 
68 #endif
Definition: str.h:59
Definition: actor.h:31
Definition: color.h:29
Definition: set_effects.h:33
Definition: fog.h:36
Definition: debugger.h:56
Definition: vector.h:47
Definition: stream.h:385
Definition: bladerunner.h:113