diff options
author | Colin Snover | 2016-07-09 19:36:17 -0500 |
---|---|---|
committer | Colin Snover | 2016-07-11 10:39:50 -0500 |
commit | bc362e5b7cf5867946adc45c3a961050323e14b5 (patch) | |
tree | 8b4f7a8b4334af2677d241f28710d4af3f8d6ce8 /engines | |
parent | 8fb55564a68078ab2e320b64c2fc63552316d8ae (diff) | |
download | scummvm-rg350-bc362e5b7cf5867946adc45c3a961050323e14b5.tar.gz scummvm-rg350-bc362e5b7cf5867946adc45c3a961050323e14b5.tar.bz2 scummvm-rg350-bc362e5b7cf5867946adc45c3a961050323e14b5.zip |
SCI32: Minor cleanup of GfxPalette32
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/palette32.cpp | 14 | ||||
-rw-r--r-- | engines/sci/graphics/palette32.h | 10 |
2 files changed, 11 insertions, 13 deletions
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index a43ac27e2e..4ee33bdd38 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -145,12 +145,12 @@ GfxPalette32::GfxPalette32(ResourceManager *resMan) // Palette cycling _cyclers(), _cycleMap() { - _varyPercent = _varyTargetPercent; - for (int i = 0, len = ARRAYSIZE(_fadeTable); i < len; ++i) { - _fadeTable[i] = 100; - } + _varyPercent = _varyTargetPercent; + for (int i = 0, len = ARRAYSIZE(_fadeTable); i < len; ++i) { + _fadeTable[i] = 100; + } - loadPalette(999); + loadPalette(999); } GfxPalette32::~GfxPalette32() { @@ -356,7 +356,7 @@ inline Palette GfxPalette32::getPaletteFromResourceInternal(const GuiResourceId Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false); if (!palResource) { - error("Could not load vary target %d", resourceId); + error("Could not load vary palette %d", resourceId); } HunkPalette rawPalette(palResource->data); @@ -384,8 +384,6 @@ inline void GfxPalette32::setVaryTimeInternal(const int16 percent, const int tim } } -// TODO: This gets called *a lot* in at least the first scene -// of SQ6. Optimisation would not be the worst idea in the world. void GfxPalette32::kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int time, const int16 fromColor, const int16 toColor) { Palette palette = getPaletteFromResourceInternal(paletteId); setVary(&palette, percent, time, fromColor, toColor); diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h index 6c773cc5c0..d06541fc47 100644 --- a/engines/sci/graphics/palette32.h +++ b/engines/sci/graphics/palette32.h @@ -193,11 +193,6 @@ private: ResourceManager *_resMan; /** - * The currently displayed palette. - */ - Palette _currentPalette; - - /** * The palette revision version. Increments once per game * loop that changes the source palette. */ @@ -209,6 +204,11 @@ private: bool _needsUpdate; /** + * The currently displayed palette. + */ + Palette _currentPalette; + + /** * The unmodified source palette loaded by kPalette. Additional * palette entries may be mixed into the source palette by * CelObj objects, which contain their own palettes. |