diff options
author | Filippos Karapetis | 2010-09-17 15:19:18 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-09-17 15:19:18 +0000 |
commit | 8bf677716350c8a4c7b1009b9f97db56ca2e534f (patch) | |
tree | 039ef2ed0fe2b2f5bd0b152967f3ccbcc2989ca4 /engines/sci/engine | |
parent | a13d6ae102fa5971c24bac05537f82ad62733bb1 (diff) | |
download | scummvm-rg350-8bf677716350c8a4c7b1009b9f97db56ca2e534f.tar.gz scummvm-rg350-8bf677716350c8a4c7b1009b9f97db56ca2e534f.tar.bz2 scummvm-rg350-8bf677716350c8a4c7b1009b9f97db56ca2e534f.zip |
SCI2: some very early work on kSetShowStyle
svn-id: r52764
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 26 |
3 files changed, 28 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index c42214dd01..e50c6aaae2 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -444,6 +444,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 kRepaintPlane(EngineState *s, int argc, reg_t *argv); +reg_t kSetShowStyle(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); reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv); // kOnMe for SCI2, kIsOnMe for SCI2.1 diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index b190335f56..d52d42e0dc 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -488,6 +488,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(ListIndexOf), SIG_EVERYWHERE, "l[o0]", NULL, NULL }, { "OnMe", kIsOnMe, SIG_EVERYWHERE, "iioi", NULL, NULL }, { MAP_CALL(RepaintPlane), SIG_EVERYWHERE, "o", NULL, NULL }, + { MAP_CALL(SetShowStyle), SIG_EVERYWHERE, "ioiiiii(i)", NULL, NULL }, { MAP_CALL(String), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(UpdatePlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 5bf9bc20c9..c0563ce933 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1478,6 +1478,32 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +/** + * Used to programmatically mass set properties of the target plane + */ +reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { + // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now + kStub(s, argc, argv); + + // showStyle matches the style selector of the associated plane object + uint16 showStyle = argv[0].toUint16(); // 0 - 15 + reg_t planeObj = argv[1]; + //argv[2] + //int16 priority = argv[3].toSint16(); + //argv[4] + //argv[5] + //argv[6] + //argv[7] + //int16 unk8 = (argc >= 9) ? argv[8].toSint16() : 0; + + if (showStyle > 15) { + warning("kSetShowStyle: Illegal style %d for plane %04x:%04x", showStyle, PRINT_REG(planeObj)); + return s->r_acc; + } + + return s->r_acc; +} + #endif } // End of namespace Sci |