aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/screen.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-01-01 11:46:22 -1000
committerPaul Gilbert2015-01-01 11:46:22 -1000
commitb2f1282aeb7f405f265afac3d601459f4cfebf6d (patch)
tree622091bc86636b2e6fd71ba958ee3ef3ac77653c /engines/xeen/screen.cpp
parentaa3965cd5dcdf0d774f4798b003c8089e3bcdc7e (diff)
downloadscummvm-rg350-b2f1282aeb7f405f265afac3d601459f4cfebf6d.tar.gz
scummvm-rg350-b2f1282aeb7f405f265afac3d601459f4cfebf6d.tar.bz2
scummvm-rg350-b2f1282aeb7f405f265afac3d601459f4cfebf6d.zip
XEEN: Credits screen now working
Diffstat (limited to 'engines/xeen/screen.cpp')
-rw-r--r--engines/xeen/screen.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp
index 6d5caae35f..f3cbabcfdd 100644
--- a/engines/xeen/screen.cpp
+++ b/engines/xeen/screen.cpp
@@ -60,7 +60,7 @@ void Window::open() {
}
void Window::open2() {
- _dirtyRects.push(_bounds);
+ addDirtyRect(_bounds);
frame();
fill();
}
@@ -125,7 +125,6 @@ void Window::close() {
// Update any remaining pending changes to the screen and free
// the window's internal surface storage
update();
- free();
// Remove the window from the stack and flag it as now disabled
for (uint i = 0; i < _vm->_screen->_windowStack.size(); ++i) {
@@ -142,17 +141,18 @@ void Window::close() {
}
/**
- * Pushes any pending changes for the window to the screen
+ * Update the window
*/
void Window::update() {
- while (!_dirtyRects.empty()) {
- Common::Rect r = _dirtyRects.pop();
- blitTo(*_vm->_screen, Common::Point(_bounds.left, _bounds.top));
- }
+ // Since all window drawing is done on the screen surface anyway,
+ // there's nothing that needs to be updated here
}
+/**
+ * Adds an area that requires redrawing on the next frame update
+ */
void Window::addDirtyRect(const Common::Rect &r) {
- _dirtyRects.push(r);
+ _vm->_screen->addDirtyRect(r);
}
/**
@@ -319,6 +319,7 @@ void Screen::loadBackground(const Common::String &name) {
assert(f.size() == (SCREEN_WIDTH * SCREEN_HEIGHT));
f.read((byte *)getPixels(), SCREEN_WIDTH * SCREEN_HEIGHT);
+ addDirtyRect(Common::Rect(0, 0, this->w, this->h));
}
/**