diff options
author | Eugene Sandulenko | 2016-02-14 12:50:04 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 12:50:04 +0100 |
commit | eaad4208c73a80dd30bce19306f3f1420abbcaa7 (patch) | |
tree | 0dbb3693340ca75259269e791d326330e3639644 /engines/sci | |
parent | fde06e342db4931c229cb493f43738a8a7c67e69 (diff) | |
download | scummvm-rg350-eaad4208c73a80dd30bce19306f3f1420abbcaa7.tar.gz scummvm-rg350-eaad4208c73a80dd30bce19306f3f1420abbcaa7.tar.bz2 scummvm-rg350-eaad4208c73a80dd30bce19306f3f1420abbcaa7.zip |
SCI: Proper initialization.
There is no guarantee of initialization order in the constructor
declaration, thus corss references are not a good idea.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/palette32.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index e330b5620b..e61ac5dac6 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -31,7 +31,7 @@ #include "sci/graphics/screen.h" namespace Sci { - + GfxPalette32::GfxPalette32(ResourceManager *resMan, GfxScreen *screen) : GfxPalette(resMan, screen), _clutTable(nullptr), @@ -42,9 +42,10 @@ GfxPalette32::GfxPalette32(ResourceManager *resMan, GfxScreen *screen) _varyTime(0), _varyDirection(0), _varyTargetPercent(0), _varyTargetPalette(nullptr), _varyStartPalette(nullptr), _varyFromColor(0), _varyToColor(255), _varyNumTimesPaused(0), - _varyPercent(_varyTargetPercent), _varyLastTick(0), + _varyLastTick(0), // Palette versioning _version(1), _versionUpdated(false) { + _varyPercent = _varyTargetPercent; memset(_fadeTable, 100, sizeof(_fadeTable)); // NOTE: In SCI engine, the palette manager constructor loads |