aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-12-14 14:45:06 -0500
committerPaul Gilbert2014-12-14 14:45:06 -0500
commit924f2abdf40a97966fff991d7cb0db842212a567 (patch)
tree07c79537e96030184d365a37bace8807b283f409 /engines
parent93979484f6932759ea5075d68ac75fa479848080 (diff)
downloadscummvm-rg350-924f2abdf40a97966fff991d7cb0db842212a567.tar.gz
scummvm-rg350-924f2abdf40a97966fff991d7cb0db842212a567.tar.bz2
scummvm-rg350-924f2abdf40a97966fff991d7cb0db842212a567.zip
ACCESS: Dirty rect handling for intro screens
Diffstat (limited to 'engines')
-rw-r--r--engines/access/asurface.cpp4
-rw-r--r--engines/access/asurface.h2
-rw-r--r--engines/access/files.cpp3
-rw-r--r--engines/access/screen.cpp5
-rw-r--r--engines/access/screen.h2
5 files changed, 16 insertions, 0 deletions
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index ef8e079c42..e135ae7184 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -268,6 +268,10 @@ void ASurface::transCopyFrom(ASurface &src) {
copyFrom(src);
}
+void ASurface::copyFrom(Graphics::Surface &src) {
+ Graphics::Surface::copyFrom(src);
+}
+
void ASurface::copyBuffer(Graphics::Surface *src) {
copyFrom(*src);
}
diff --git a/engines/access/asurface.h b/engines/access/asurface.h
index c04b33c36e..db17eb2089 100644
--- a/engines/access/asurface.h
+++ b/engines/access/asurface.h
@@ -101,6 +101,8 @@ public:
virtual void transCopyFrom(ASurface &src);
+ virtual void copyFrom(Graphics::Surface &src);
+
virtual void copyBuffer(Graphics::Surface *src);
void copyTo(ASurface *dest) { dest->copyFrom(*this); }
diff --git a/engines/access/files.cpp b/engines/access/files.cpp
index b846cbd32c..004886a379 100644
--- a/engines/access/files.cpp
+++ b/engines/access/files.cpp
@@ -168,6 +168,9 @@ void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) {
res->_stream->read(pDest, dest->w);
}
}
+
+ if (dest == _vm->_screen)
+ _vm->_screen->addDirtyRect(Common::Rect(0, 0, dest->w, dest->h));
}
void FileManager::loadScreen(int fileNum, int subfile) {
diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp
index 5897fbec2e..34755ade47 100644
--- a/engines/access/screen.cpp
+++ b/engines/access/screen.cpp
@@ -271,6 +271,11 @@ void Screen::transCopyFrom(ASurface *src, const Common::Rect &bounds) {
ASurface::transCopyFrom(src, bounds);
}
+void Screen::copyFrom(Graphics::Surface &src) {
+ addDirtyRect(Common::Rect(0, 0, src.w, src.h));
+ ASurface::copyFrom(src);
+}
+
void Screen::copyBuffer(Graphics::Surface *src) {
addDirtyRect(Common::Rect(0, 0, src->w, src->h));
ASurface::copyBuffer(src);
diff --git a/engines/access/screen.h b/engines/access/screen.h
index f790dd7986..56ee9bed20 100644
--- a/engines/access/screen.h
+++ b/engines/access/screen.h
@@ -93,6 +93,8 @@ public:
virtual void transCopyFrom(ASurface *src, const Common::Rect &bounds);
+ virtual void copyFrom(Graphics::Surface &src);
+
virtual void copyBuffer(Graphics::Surface *src);
public:
Screen(AccessEngine *vm);