aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kgraphics.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-20 18:20:05 +0000
committerMartin Kiewitz2010-06-20 18:20:05 +0000
commit3c6639eb86e8328af84c190878b09c331fe4c1ac (patch)
tree8731a58e4dc5635b37140bfe3564db8abd7f3b4e /engines/sci/engine/kgraphics.cpp
parentff785325ad3527394cec06fbd9dc331854e97f30 (diff)
downloadscummvm-rg350-3c6639eb86e8328af84c190878b09c331fe4c1ac.tar.gz
scummvm-rg350-3c6639eb86e8328af84c190878b09c331fe4c1ac.tar.bz2
scummvm-rg350-3c6639eb86e8328af84c190878b09c331fe4c1ac.zip
SCI: implemented kPalVary(reverse) for pharkas, although there is a bug somewhere, not working 100%
svn-id: r50089
Diffstat (limited to 'engines/sci/engine/kgraphics.cpp')
-rw-r--r--engines/sci/engine/kgraphics.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 090af4fb1f..1c69afc48a 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -647,7 +647,7 @@ reg_t kPalVary(EngineState *s, int argc, reg_t *argv) {
case 0: { // Init
GuiResourceId paletteId;
uint16 ticks, stepStop;
- int16 direction;
+ uint16 direction;
if ((argc >= 3) && (argc <= 5)) {
paletteId = argv[1].toUint16();
ticks = argv[2].toUint16();
@@ -661,9 +661,20 @@ reg_t kPalVary(EngineState *s, int argc, reg_t *argv) {
}
break;
}
- case 1: { // Unknown
- warning("kPalVary(1) called with parameter %d (argc %d)", argv[1].toUint16(), argc);
- break;
+ case 1: { // Reverse
+ int16 ticks, stepStop, direction;
+
+ if ((argc >= 1) && (argc <= 4)) {
+ ticks = argc >= 2 ? argv[1].toUint16() : -1;
+ stepStop = argc >= 3 ? argv[2].toUint16() : 0;
+ direction = argc >= 4 ? argv[3].toSint16() : -1;
+
+ int16 result = g_sci->_gfxPalette->kernelPalVaryReverse(ticks, stepStop, direction);
+ warning("kPalVary(reverse) called with ticks = %d, stop = %d, direction = %d", ticks, stepStop, direction);
+ return make_reg(0, result);
+ } else {
+ warning("kPalVary(1) called with parameter %d (argc %d)", argv[1].toUint16(), argc);
+ }
}
case 2: { // Get Current Step
if (argc == 1) {