aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-01-06 20:03:04 -0600
committerColin Snover2016-01-07 16:35:09 -0600
commit70d89b3e394e46bc96a7fde681cd84f36763ee52 (patch)
tree8c9beee4502e0c1334bb75a18748071d6a3c3f8b /engines
parentaeee621e4413fe71ffada6c4bc096ae2a5a8c204 (diff)
downloadscummvm-rg350-70d89b3e394e46bc96a7fde681cd84f36763ee52.tar.gz
scummvm-rg350-70d89b3e394e46bc96a7fde681cd84f36763ee52.tar.bz2
scummvm-rg350-70d89b3e394e46bc96a7fde681cd84f36763ee52.zip
SCI32: Add kSetPalStyleRange stub code
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kgraphics32.cpp16
3 files changed, 19 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 5d929a36ae..56009e42cd 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -450,6 +450,7 @@ reg_t kAddPlane(EngineState *s, int argc, reg_t *argv);
reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv);
reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv);
reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv);
+reg_t kSetPalStyleRange(EngineState *s, int argc, reg_t *argv);
reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv);
reg_t kFrameOut(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 49dfa17554..98ea067600 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -694,6 +694,8 @@ static SciKernelMapEntry s_kernelMap[] = {
// MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons
// SetPalStyleRange - 2 integer parameters, start and end. All styles from start-end
// (inclusive) are set to 0
+ { MAP_CALL(SetPalStyleRange), SIG_EVERYWHERE, "ii", NULL, NULL },
+
// MorphOn - used by SQ6, script 900, the datacorder reprogramming puzzle (from room 270)
// SCI3 Kernel Functions
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 5de440c536..2ae6b1f1f5 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -131,6 +131,22 @@ reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+reg_t kSetPalStyleRange(EngineState *s, int argc, reg_t *argv) {
+/* TODO: Transcribed from SCI engine disassembly.
+ uint16 start = argv[0].toUint16();
+ uint16 end = argv[1].toUint16();
+ if (end <= start) {
+ uint16 index = start;
+ while (index <= end) {
+ g_PalStyleRanges[index] = 0;
+ }
+ }
+*/
+
+ kStub(s, argc, argv);
+ return NULL_REG;
+}
+
reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv) {
Common::Rect objRect1 = g_sci->_gfxCompare->getNSRect(argv[0]);
Common::Rect objRect2 = g_sci->_gfxCompare->getNSRect(argv[1]);