diff options
author | Filippos Karapetis | 2012-06-09 15:36:36 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-09 15:36:36 +0300 |
commit | dc11d223cdb156dd71300a8535cb5ab0940180c1 (patch) | |
tree | 939115424acc64a688d1b8749e36cf8a0d76601b /engines/sci/engine | |
parent | 66af2cf1d729e5944641ab203f3d36761fdff132 (diff) | |
download | scummvm-rg350-dc11d223cdb156dd71300a8535cb5ab0940180c1.tar.gz scummvm-rg350-dc11d223cdb156dd71300a8535cb5ab0940180c1.tar.bz2 scummvm-rg350-dc11d223cdb156dd71300a8535cb5ab0940180c1.zip |
SCI: Initial implementation of AddLine, UpdateLine, DeleteLine
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 3 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 6 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 32 |
3 files changed, 38 insertions, 3 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 664c97f7b5..d9fdbefbc2 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -482,6 +482,9 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv); reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv); reg_t kFont(EngineState *s, int argc, reg_t *argv); reg_t kBitmap(EngineState *s, int argc, reg_t *argv); +reg_t kAddLine(EngineState *s, int argc, reg_t *argv); +reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv); +reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv); // SCI3 Kernel functions reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 254a479e65..9b765283ec 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -568,6 +568,9 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(SetFontRes), SIG_EVERYWHERE, "ii", NULL, NULL }, { MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(Bitmap), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_CALL(AddLine), SIG_EVERYWHERE, "oiiiiiiiii", NULL, NULL }, + { MAP_CALL(UpdateLine), SIG_EVERYWHERE, "roiiiiiiiii", NULL, NULL }, + { MAP_CALL(DeleteLine), SIG_EVERYWHERE, "ro", NULL, NULL }, // SCI2.1 Empty Functions @@ -613,9 +616,6 @@ static SciKernelMapEntry s_kernelMap[] = { // SCI2.1 unmapped functions - TODO! // MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons - // AddLine - used by Torin's Passage to highlight the chapter buttons - // DeleteLine - used by Torin's Passage to delete the highlight from the chapter buttons - // UpdateLine - used by LSL6 // SetPalStyleRange - 2 integer parameters, start and end. All styles from start-end // (inclusive) are set to 0 // MorphOn - used by SQ6, script 900, the datacorder reprogramming puzzle (from room 270) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 71c4949d65..53cf8ada75 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -605,6 +605,38 @@ reg_t kEditText(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kAddLine(EngineState *s, int argc, reg_t *argv) { + reg_t plane = argv[0]; + Common::Point startPoint(argv[1].toUint16(), argv[2].toUint16()); + Common::Point endPoint(argv[3].toUint16(), argv[4].toUint16()); + // argv[5] is unknown (a number, usually 200) + byte color = (byte)argv[6].toUint16(); + byte priority = (byte)argv[7].toUint16(); + byte control = (byte)argv[8].toUint16(); + // argv[9] is unknown (usually a small number, 1 or 2). Thickness, perhaps? + return g_sci->_gfxFrameout->addPlaneLine(plane, startPoint, endPoint, color, priority, control); +} + +reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv) { + reg_t hunkId = argv[0]; + reg_t plane = argv[1]; + Common::Point startPoint(argv[2].toUint16(), argv[3].toUint16()); + Common::Point endPoint(argv[4].toUint16(), argv[5].toUint16()); + // argv[6] is unknown (a number, usually 200) + byte color = (byte)argv[7].toUint16(); + byte priority = (byte)argv[8].toUint16(); + byte control = (byte)argv[9].toUint16(); + // argv[10] is unknown (usually a small number, 1 or 2). Thickness, perhaps? + g_sci->_gfxFrameout->updatePlaneLine(plane, hunkId, startPoint, endPoint, color, priority, control); + return s->r_acc; +} +reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv) { + reg_t hunkId = argv[0]; + reg_t plane = argv[1]; + g_sci->_gfxFrameout->deletePlaneLine(plane, hunkId); + return s->r_acc; +} + #endif } // End of namespace Sci |