aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/gfx_driver.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2009-10-03 20:49:18 +0000
committerWillem Jan Palenstijn2009-10-03 20:49:18 +0000
commitb9cdb1abb76c94723c24ca66eb8d47d96c8c5ebd (patch)
treed4f40b3f6a8f55aef1e24506bd3771f8269d64a1 /engines/sci/gfx/gfx_driver.cpp
parentf6de0b4ec9fcc240cdc0c46aedb2e2089e07bd5c (diff)
downloadscummvm-rg350-b9cdb1abb76c94723c24ca66eb8d47d96c8c5ebd.tar.gz
scummvm-rg350-b9cdb1abb76c94723c24ca66eb8d47d96c8c5ebd.tar.bz2
scummvm-rg350-b9cdb1abb76c94723c24ca66eb8d47d96c8c5ebd.zip
SCI: Merge new GUI code written by m_kiewitz.
This is a major rewrite of the graphics code. A slightly adapted version of the old code is still available and currently the default. The new code is selectable in sci.cpp, but is not yet finished. svn-id: r44565
Diffstat (limited to 'engines/sci/gfx/gfx_driver.cpp')
-rw-r--r--engines/sci/gfx/gfx_driver.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp
index 15704b636c..ccf15f3e30 100644
--- a/engines/sci/gfx/gfx_driver.cpp
+++ b/engines/sci/gfx/gfx_driver.cpp
@@ -248,4 +248,19 @@ void GfxDriver::setPointer(gfx_pixmap_t *pointer, Common::Point *hotspot) {
cursorData = 0;
}
+void GfxDriver::animatePalette(int fromColor, int toColor, int stepCount) {
+ int i;
+ PaletteEntry firstColor = _mode->palette->getColor(fromColor);
+ PaletteEntry loopColor;
+ for (i=fromColor+1; i<=toColor; i++) {
+ loopColor = _mode->palette->getColor(i);
+ loopColor.r = 0;
+ loopColor.g = 0;
+ loopColor.b = 0;
+ _mode->palette->makeSystemColor(i-1, loopColor); // loopColor.r, loopColor.g, loopColor.b);
+ }
+// _mode->palette->setColor(toColor, firstColor.r, firstColor.g, firstColor.b);
+ _mode->palette->makeSystemColor(toColor, firstColor);
+}
+
} // End of namespace Sci