diff options
author | Peter Kohaut | 2015-09-13 01:48:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-29 22:33:40 +0200 |
commit | 6672e443a870963354ee43298c75164d382a5636 (patch) | |
tree | 0cee43adb6ac77aa467700f3756668c456bb9af6 /engines/bladerunner/set_effects.cpp | |
parent | a4ba6091316f8f50ea40d4dfd42bd26d419b1206 (diff) | |
download | scummvm-rg350-6672e443a870963354ee43298c75164d382a5636.tar.gz scummvm-rg350-6672e443a870963354ee43298c75164d382a5636.tar.bz2 scummvm-rg350-6672e443a870963354ee43298c75164d382a5636.zip |
BLADERUNNER: just basic objects description scene stuff - lightning and effects movement track actor clues db actor walking info moved view from vqa decoder, because its needed elsewhere
does not compile, because new files are not in makefile...
Diffstat (limited to 'engines/bladerunner/set_effects.cpp')
-rw-r--r-- | engines/bladerunner/set_effects.cpp | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/engines/bladerunner/set_effects.cpp b/engines/bladerunner/set_effects.cpp new file mode 100644 index 0000000000..f524820033 --- /dev/null +++ b/engines/bladerunner/set_effects.cpp @@ -0,0 +1,83 @@ +#include "bladerunner/set_effects.h" + +namespace BladeRunner +{ + SetEffects::SetEffects(BladeRunnerEngine* vm) + { + _vm = vm; + + _distanceColor.r = 1.0f; + _distanceColor.g = 1.0f; + _distanceColor.b = 1.0f; + _distanceCoeficient = 0.1f; + + _fadeColor.r = 0.0f; + _fadeColor.g = 0.0f; + _fadeColor.b = 0.0f; + _fadeDensity = 0.0f; + + _fogsCount = 0; + _fogs = NULL; + } + + SetEffects::~SetEffects() + { + reset(); + } + + void SetEffects::read(Common::ReadStream* stream, int framesCount) + { + _distanceCoeficient = stream->readFloatLE(); + _distanceColor.r = stream->readFloatLE(); + _distanceColor.g = stream->readFloatLE(); + _distanceColor.b = stream->readFloatLE(); + + _fogsCount = stream->readUint32LE(); + int i; + for (i = 0; i < _fogsCount; i++) + { + int type = stream->readUint32LE(); + Fog* fog = NULL; + switch(type) + { + case 0: + fog = new FogCone(); + break; + case 1: + fog = new FogSphere(); + break; + case 2: + fog = new FogBox(); + break; + } + if(!fog) + { + //TODO exception, unknown fog type + } + fog->read(stream, framesCount); + fog->_next = _fogs; + _fogs = fog; + } + } + + void SetEffects::reset() + { + Fog* fog, *nextFog; + + if (!_fogs) + return; + + do + { + fog = _fogs; + nextFog = fog->_next; + delete fog; + fog = nextFog; + } while (nextFog); + + } + + void SetEffects::setupFrame(int frame) + { + } +}
\ No newline at end of file |