aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
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
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')
-rw-r--r--engines/sci/engine/kgraphics.cpp19
-rw-r--r--engines/sci/engine/message.cpp2
2 files changed, 16 insertions, 5 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) {
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index a4bde9b582..18e60eb521 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -380,7 +380,7 @@ void MessageState::outputString(reg_t buf, const Common::String &str) {
if ((unsigned)buffer_r.maxSize >= str.size() + 1) {
_segMan->strcpy(buf, str.c_str());
} else {
- error("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str());
+ warning("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str());
// Set buffer to empty string if possible
if (buffer_r.maxSize > 0)