diff options
author | Paul Gilbert | 2015-01-24 15:14:57 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-24 15:14:57 -0500 |
commit | 339dfcb2cc9fde227abc15ad9b298f7b16194785 (patch) | |
tree | 8d5acca3f63957387204d1db1b09ed2cce6d703b /engines/xeen/screen.cpp | |
parent | 177f47a5355fdbe6e45b51328274db02baace79b (diff) | |
download | scummvm-rg350-339dfcb2cc9fde227abc15ad9b298f7b16194785.tar.gz scummvm-rg350-339dfcb2cc9fde227abc15ad9b298f7b16194785.tar.bz2 scummvm-rg350-339dfcb2cc9fde227abc15ad9b298f7b16194785.zip |
XEEN: Restrict drawing in windows to drawing within their bounds
Diffstat (limited to 'engines/xeen/screen.cpp')
-rw-r--r-- | engines/xeen/screen.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index 42182cc7fe..16e4955cde 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -38,7 +38,7 @@ Window::Window(XeenEngine *vm, const Common::Rect &bounds, int a, int border, _vm(vm), _enabled(false), _a(a), _border(border), _xLo(xLo), _ycL(ycL), _xHi(xHi), _ycH(ycH) { setBounds(bounds); - create(_vm->_screen, Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + create(_vm->_screen, bounds); } void Window::setBounds(const Common::Rect &r) { @@ -167,17 +167,12 @@ void Window::writeString(const Common::String &s) { } void Window::drawList(DrawStruct *items, int count) { - Screen &screen = *_vm->_screen; - for (int i = 0; i < count; ++i, ++items) { if (items->_frame == -1 || items->_scale == -1 || items->_sprites == nullptr) continue; - - Common::Rect bounds = _innerBounds; - bounds.translate(items->_x, items->_y); - + // TODO: There are two sprite calls in this method. Figure out why - items->_sprites->draw(screen, items->_frame, + items->_sprites->draw(*this, items->_frame, Common::Point(items->_x, items->_y), items->_flags, items->_scale); } } |