aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-16 21:44:33 +0000
committerFilippos Karapetis2010-06-16 21:44:33 +0000
commit9b6f71d7cf76e529ed8010224442ceef18183fcb (patch)
tree1c69f63cf0d176085164b4a7036bba6ce0f5b620
parent289b668099071c4609a6081cca97c626d61e93eb (diff)
downloadscummvm-rg350-9b6f71d7cf76e529ed8010224442ceef18183fcb.tar.gz
scummvm-rg350-9b6f71d7cf76e529ed8010224442ceef18183fcb.tar.bz2
scummvm-rg350-9b6f71d7cf76e529ed8010224442ceef18183fcb.zip
Added handling for the SCI2.1 kPalette(1) call. The graphics in Torin's Passage are shown with the correct colors now
svn-id: r49908
-rw-r--r--engines/sci/engine/kgraphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index f56c5bb5e1..424d5049e5 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -553,9 +553,11 @@ reg_t kPalette(EngineState *s, int argc, reg_t *argv) {
switch (argv[0].toUint16()) {
case 1: // Set resource palette
- if (argc==3) {
+ if (argc == 2 || argc == 3) {
GuiResourceId resourceId = argv[1].toUint16();
- bool force = argv[2].toUint16() == 2 ? true : false;
+ bool force = false;
+ if (argc == 3)
+ force = argv[2].toUint16() == 2 ? true : false;
g_sci->_gfxPalette->kernelSetFromResource(resourceId, force);
} else {
warning("kPalette(1) called with %d parameters", argc);