Skip to content

Commit

Permalink
ACCESS: Dirty rect handling for intro screens
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 14, 2014
1 parent 9397948 commit 924f2ab
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/access/asurface.cpp
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions engines/access/asurface.h
Expand Up @@ -101,6 +101,8 @@ class ASurface : public Graphics::Surface {

virtual void transCopyFrom(ASurface &src);

virtual void copyFrom(Graphics::Surface &src);

virtual void copyBuffer(Graphics::Surface *src);

void copyTo(ASurface *dest) { dest->copyFrom(*this); }
Expand Down
3 changes: 3 additions & 0 deletions engines/access/files.cpp
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions engines/access/screen.cpp
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions engines/access/screen.h
Expand Up @@ -93,6 +93,8 @@ class Screen: public ASurface {

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);
Expand Down

0 comments on commit 924f2ab

Please sign in to comment.