From 924f2abdf40a97966fff991d7cb0db842212a567 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 14 Dec 2014 14:45:06 -0500 Subject: ACCESS: Dirty rect handling for intro screens --- engines/access/asurface.cpp | 4 ++++ engines/access/asurface.h | 2 ++ engines/access/files.cpp | 3 +++ engines/access/screen.cpp | 5 +++++ engines/access/screen.h | 2 ++ 5 files changed, 16 insertions(+) (limited to 'engines/access') 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); -- cgit v1.2.3