From 97a47852c1cb0747460fdde15e50419addee84a7 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 2 Jan 2017 10:13:02 -0600 Subject: SCI32: Fix kSetShowStyle signature for SCI3 --- engines/sci/engine/kernel_tables.h | 3 ++- engines/sci/engine/kgraphics32.cpp | 14 +++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 2db3c59e64..1241a9753e 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -868,7 +868,8 @@ static SciKernelMapEntry s_kernelMap[] = { // our own memory manager and garbage collector, thus we simply call FlushResources, which in turn invokes // our garbage collector (i.e. the SCI0-SCI1.1 semantics). { "Purge", kFlushResources, SIG_EVERYWHERE, "i", NULL, NULL }, - { MAP_CALL(SetShowStyle), SIG_EVERYWHERE, "ioiiiii([ri])(i)", NULL, NULL }, + { MAP_CALL(SetShowStyle), SIG_THRU_SCI21MID, SIGFOR_ALL, "ioiiiii([ri])(i)", NULL, NULL }, + { MAP_CALL(SetShowStyle), SIG_SINCE_SCI21LATE, SIGFOR_ALL, "ioiiiiii(r)(i)", NULL, NULL }, { MAP_CALL(String), SIG_EVERYWHERE, "(.*)", kString_subops, NULL }, { MAP_CALL(UpdatePlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index a3f7e4fbd3..f710df1ca5 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -389,13 +389,13 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { pFadeArray = NULL_REG; divisions = argc > 7 ? argv[7].toSint16() : -1; } - // SCI 2.1mid–2.1late - else if (getSciVersion() < SCI_VERSION_3) { + // SCI 2.1mid + else if (getSciVersion() < SCI_VERSION_2_1_LATE) { blackScreen = 0; pFadeArray = argc > 7 ? argv[7] : NULL_REG; divisions = argc > 8 ? argv[8].toSint16() : -1; } - // SCI 3 + // SCI 2.1late-3 else { blackScreen = argv[7].toSint16(); pFadeArray = argc > 8 ? argv[8] : NULL_REG; @@ -406,14 +406,6 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { error("Illegal show style %d for plane %04x:%04x", type, PRINT_REG(planeObj)); } -// TODO: Reuse later for SCI2 and SCI3 implementation and then discard -// warning("kSetShowStyle: effect %d, plane: %04x:%04x (%s), sec: %d, " -// "dir: %d, prio: %d, animate: %d, ref frame: %d, black screen: %d, " -// "pFadeArray: %04x:%04x (%s), divisions: %d", -// type, PRINT_REG(planeObj), s->_segMan->getObjectName(planeObj), seconds, -// back, priority, animate, refFrame, blackScreen, -// PRINT_REG(pFadeArray), s->_segMan->getObjectName(pFadeArray), divisions); - // NOTE: The order of planeObj and showStyle are reversed // because this is how SCI3 called the corresponding method // on the KernelMgr -- cgit v1.2.3