diff options
author | Walter van Niftrik | 2009-08-30 01:38:14 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-08-30 01:38:14 +0000 |
commit | 40d6119fd5c8a61ffb11c7744dc60f4a07388d6d (patch) | |
tree | 786d65264ebc5cf2b3d301a9da96e17965a5f16c /engines/sci/engine | |
parent | cf5483c3d862a1076943a9b7d986b38e3d1908de (diff) | |
download | scummvm-rg350-40d6119fd5c8a61ffb11c7744dc60f4a07388d6d.tar.gz scummvm-rg350-40d6119fd5c8a61ffb11c7744dc60f4a07388d6d.tar.bz2 scummvm-rg350-40d6119fd5c8a61ffb11c7744dc60f4a07388d6d.zip |
SCI: Add support for SetCursor with 4 args.
svn-id: r43813
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 89fed9d2d8..16818a9f4d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -326,9 +326,23 @@ static reg_t kSetCursorSci11(EngineState *s, int funct_nr, int argc, reg_t *argv CursorMan.showMouse(argv[0].toSint16() != 0); break; case 2: - GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, - Common::Point(argv[0].toUint16(), argv[1].toUint16()))); + GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, + Common::Point(argv[0].toUint16() + s->port->_bounds.x, argv[1].toUint16() + s->port->_bounds.y))); break; + case 4: { + int16 top = argv[0].toSint16(); + int16 left = argv[1].toSint16(); + int16 bottom = argv[2].toSint16(); + int16 right = argv[3].toSint16(); + + if ((right >= left) && (bottom >= top)) { + Common::Rect rect = Common::Rect(left, top, right + 1, bottom + 1); + GFX_ASSERT(gfxop_set_pointer_zone(s->gfx_state, rect)); + } else { + warning("kSetCursor: Ignoring invalid mouse zone (%i, %i)-(%i, %i)", left, top, right, bottom); + } + break; + } case 5: case 9: hotspot = new Common::Point(argv[3].toSint16(), argv[4].toSint16()); |