diff options
author | Martin Kiewitz | 2009-10-04 10:42:18 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-04 10:42:18 +0000 |
commit | 772cb3365189a99f08c1a7be461455be9771c141 (patch) | |
tree | 9f24390a2d2b334b89f13b0d78c5bf233bec137a | |
parent | bb7a728a999f3fb13dd13e53795d3aeb6ff8baac (diff) | |
download | scummvm-rg350-772cb3365189a99f08c1a7be461455be9771c141.tar.gz scummvm-rg350-772cb3365189a99f08c1a7be461455be9771c141.tar.bz2 scummvm-rg350-772cb3365189a99f08c1a7be461455be9771c141.zip |
SCI/oldgui: onControl code moved
svn-id: r44593
-rw-r--r-- | engines/sci/gui32/gui32.cpp | 27 | ||||
-rw-r--r-- | engines/sci/gui32/gui32.h | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp index 5205d7fe30..83ad251eb5 100644 --- a/engines/sci/gui32/gui32.cpp +++ b/engines/sci/gui32/gui32.cpp @@ -711,6 +711,33 @@ void SciGUI32::paletteAnimate(int fromColor, int toColor, int speed) { warning("STUB"); } +int16 SciGUI32::onControl(byte screenMask, Common::Rect rect) { + gfx_map_mask_t map = (gfx_map_mask_t)screenMask; + rect_t gfxrect = gfx_rect(rect.left, rect.top + 10, rect.width(), rect.height()); + + return gfxop_scan_bitmask(s->gfx_state, gfxrect, map); +// old code +// int xstart, ystart; +// int xlen = 1, ylen = 1; +// +// if (argc == 2 || argc == 4) +// map = GFX_MASK_CONTROL; +// else { +// arg = 1; +// map = (gfx_map_mask_t) argv[0].toSint16(); +// } +// +// ystart = argv[arg + 1].toSint16(); +// xstart = argv[arg].toSint16(); +// +// if (argc > 3) { +// ylen = argv[arg + 3].toSint16() - ystart; +// xlen = argv[arg + 2].toSint16() - xstart; +// } +// +// return make_reg(0, gfxop_scan_bitmask(s->gfx_state, gfx_rect(xstart, ystart + 10, xlen, ylen), map)); +} + void SciGUI32::moveCursor(int16 x, int16 y) { Common::Point newPos; diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h index 5f4fe360af..1971e26917 100644 --- a/engines/sci/gui32/gui32.h +++ b/engines/sci/gui32/gui32.h @@ -67,6 +67,8 @@ public: virtual int16 paletteFind(int r, int g, int b); void paletteAnimate(int fromColor, int toColor, int speed); + int16 onControl(byte screenMask, Common::Rect rect); + void moveCursor(int16 x, int16 y); private: |