diff options
author | Max Horn | 2004-03-22 01:40:24 +0000 |
---|---|---|
committer | Max Horn | 2004-03-22 01:40:24 +0000 |
commit | 838d3e3a9387d63819fd2c8b137d53041de9abdb (patch) | |
tree | 5b886711ee1735dc92b4ecb7c18a768368884bc8 /graphics | |
parent | 4466a855986d08d20c6fc6296baec191e1f5e027 (diff) | |
download | scummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.tar.gz scummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.tar.bz2 scummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.zip |
some more cleanup
svn-id: r13359
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/animation.cpp | 32 | ||||
-rw-r--r-- | graphics/animation.h | 2 |
2 files changed, 18 insertions, 16 deletions
diff --git a/graphics/animation.cpp b/graphics/animation.cpp index 65aca29b00..d8219c5a55 100644 --- a/graphics/animation.cpp +++ b/graphics/animation.cpp @@ -48,6 +48,23 @@ BaseAnimationState::~BaseAnimationState() { +bool BaseAnimationState::checkPaletteSwitch() { +#ifdef BACKEND_8BIT + // if we have reached the last image with this palette, switch to new one + if (framenum == palettes[palnum].end) { + unsigned char *l = lut2; + palnum++; + setPalette(palettes[palnum].pal); + lutcalcnum = (BITDEPTH + palettes[palnum].end - (framenum + 1) + 2) / (palettes[palnum].end - (framenum + 1) + 2); + lut2 = lut; + lut = l; + return true; + } +#endif + + return false; +} + #ifdef BACKEND_8BIT /** @@ -100,21 +117,6 @@ void BaseAnimationState::buildLookup(int p, int lines) { } } -bool BaseAnimationState::checkPaletteSwitch() { - // if we have reached the last image with this palette, switch to new one - if (framenum == palettes[palnum].end) { - unsigned char *l = lut2; - palnum++; - setPalette(palettes[palnum].pal); - lutcalcnum = (BITDEPTH + palettes[palnum].end - (framenum + 1) + 2) / (palettes[palnum].end - (framenum + 1) + 2); - lut2 = lut; - lut = l; - return true; - } - - return false; -} - #else OverlayColor *BaseAnimationState::lookup = 0; diff --git a/graphics/animation.h b/graphics/animation.h index cfd96b3d78..0ddaf76e5c 100644 --- a/graphics/animation.h +++ b/graphics/animation.h @@ -123,9 +123,9 @@ public: virtual ~BaseAnimationState(); protected: + bool checkPaletteSwitch(); #ifdef BACKEND_8BIT void buildLookup(int p, int lines); - bool checkPaletteSwitch(); virtual void setPalette(byte *pal) = 0; #else void buildLookup(void); |