diff options
author | Nicola Mettifogo | 2007-08-04 18:58:50 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-04 18:58:50 +0000 |
commit | 663e78b911a7447c25d24e5b7de820a1c790a759 (patch) | |
tree | b4b1ca91417bd3390f80216d6b9d3e9065404fb2 /engines/parallaction/graphics.cpp | |
parent | 44279df48e3951fe58b325c36fae276eddcb1f94 (diff) | |
download | scummvm-rg350-663e78b911a7447c25d24e5b7de820a1c790a759.tar.gz scummvm-rg350-663e78b911a7447c25d24e5b7de820a1c790a759.tar.bz2 scummvm-rg350-663e78b911a7447c25d24e5b7de820a1c790a759.zip |
Added routine to restore door backgrounds: this means that backgrounds for door and get zones are now handled by two different sets of routines. This fixes bugs #1765191 and #1762643 (it was actually the same bug).
svn-id: r28449
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 16b1059c28..8d45c4aaa9 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -548,9 +548,41 @@ void Gfx::backupGetBackground(GetData *data, int16 x, int16 y) { } // +// restores background according to specified frame +// +void Gfx::restoreDoorBackground(StaticCnv *cnv, const Common::Rect& r, byte* background) { + + byte *t = cnv->_data0; + byte *s = background; + byte *d0 = _buffers[kBitBack] + r.left + r.top * _vm->_screenWidth; + byte *d1 = _buffers[kBit2] + r.left + r.top * _vm->_screenWidth; + + for (uint16 i = 0; i < r.height() ; i++) { + for (uint16 j = 0; j < r.width() ; j++) { + if (*t) { + *d0 = *s; + *d1 = *s; + } + + d0++; + d1++; + t++; + s++; + } + + d0 += (_vm->_screenWidth - r.width()); + d1 += (_vm->_screenWidth - r.width()); + } + + + return; +} + + +// // copies a rectangular bitmap on the background // -void Gfx::restoreZoneBackground(const Common::Rect& r, byte *data) { +void Gfx::restoreGetBackground(const Common::Rect& r, byte *data) { StaticCnv cnv; |