aboutsummaryrefslogtreecommitdiff
path: root/graphics/animation.cpp
diff options
context:
space:
mode:
authorMax Horn2004-03-22 01:40:24 +0000
committerMax Horn2004-03-22 01:40:24 +0000
commit838d3e3a9387d63819fd2c8b137d53041de9abdb (patch)
tree5b886711ee1735dc92b4ecb7c18a768368884bc8 /graphics/animation.cpp
parent4466a855986d08d20c6fc6296baec191e1f5e027 (diff)
downloadscummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.tar.gz
scummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.tar.bz2
scummvm-rg350-838d3e3a9387d63819fd2c8b137d53041de9abdb.zip
some more cleanup
svn-id: r13359
Diffstat (limited to 'graphics/animation.cpp')
-rw-r--r--graphics/animation.cpp32
1 files changed, 17 insertions, 15 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;