~ubuntu-branches/debian/jessie/scummvm/jessie

« back to all changes in this revision

Viewing changes to engines/saga/sprite.cpp

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2011-11-05 10:29:43 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20111105102943-zfm3dhlvy5b01u7v
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL$
22
 
 * $Id$
23
 
 *
24
21
 */
25
22
 
26
23
// Sprite management module
210
207
        const byte *srcPointer;
211
208
 
212
209
        int backBufferPitch = _vm->_gfx->getBackBufferPitch();
213
 
        
 
210
 
214
211
        //find Rects intersection
215
212
        yDiff = clipRect.top - spritePointer.y;
216
213
        if (yDiff > 0) {
250
247
        }
251
248
        bufRowPointer = _vm->_gfx->getBackBufferPixels() + backBufferPitch * yDstOffset + xDstOffset;
252
249
        srcRowPointer = spriteBuffer + width * ySrcOffset + xSrcOffset;
253
 
        
 
250
 
254
251
        // validate src, dst buffers
255
252
        assert(_vm->_gfx->getBackBufferPixels() <= bufRowPointer);
256
 
        assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >= 
 
253
        assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >=
257
254
                (byte *)(bufRowPointer + backBufferPitch * (cHeight - 1) + cWidth));
258
255
        assert((const byte *)spriteBuffer <= srcRowPointer);
259
256
        assert(((const byte *)spriteBuffer + (width * height)) >= (const byte *)(srcRowPointer + width * (cHeight - 1) + cWidth));
472
469
 
473
470
        _decodeBuf.resize(outLength);
474
471
        byte *dst = &_decodeBuf.front();
475
 
        
 
472
 
476
473
        memset(dst, 0, _decodeBuf.size());
477
474
 
478
475
        for (int i = 0; i < height; i++) {