diff options
author | Paul Gilbert | 2016-09-04 21:16:51 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-04 21:30:05 -0400 |
commit | 94e1b960c416d1089a94539706cef858f80f9772 (patch) | |
tree | 576e19198ad121a248ea34cf33b4fdf7b5620f16 /engines/xeen/screen.cpp | |
parent | 12d57ad5fe48568a8d67665ed285c9d591590d1a (diff) | |
download | scummvm-rg350-94e1b960c416d1089a94539706cef858f80f9772.tar.gz scummvm-rg350-94e1b960c416d1089a94539706cef858f80f9772.tar.bz2 scummvm-rg350-94e1b960c416d1089a94539706cef858f80f9772.zip |
XEEN: Converted XSurface to derive from ManagedSurface
Diffstat (limited to 'engines/xeen/screen.cpp')
-rw-r--r-- | engines/xeen/screen.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp index a013b9706b..e1e7b50a56 100644 --- a/engines/xeen/screen.cpp +++ b/engines/xeen/screen.cpp @@ -33,12 +33,21 @@ Window::Window() : _vm(nullptr), _enabled(false), _a(0), _border(0), _xLo(0), _xHi(0), _ycL(0), _ycH(0) { } +Window::Window(const Window &src) : _vm(src._vm), _enabled(src._enabled), + _a(src._a), _border(src._border), _xLo(src._xLo), _ycL(src._ycL), + _xHi(src._xHi), _ycH(src._ycH) { + if (src._vm) { + setBounds(src._bounds); + create(*_vm->_screen, Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); + } +} + Window::Window(XeenEngine *vm, const Common::Rect &bounds, int a, int border, int xLo, int ycL, int xHi, int ycH): _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, Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); } void Window::setBounds(const Common::Rect &r) { @@ -346,7 +355,7 @@ void Screen::loadPage(int pageNum) { _pages[1].create(SCREEN_WIDTH, SCREEN_HEIGHT); } - blitTo(_pages[pageNum]); + _pages[pageNum].blitFrom(*this); } void Screen::freePages() { @@ -447,7 +456,7 @@ void Screen::saveBackground(int slot) { void Screen::restoreBackground(int slot) { assert(slot > 0 && slot < 10); - _savedScreens[slot - 1].blitTo(*this); + blitFrom(_savedScreens[slot - 1]); } void Screen::frameWindow(uint bgType) { |