diff options
author | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
commit | 71bdb86e028db9556611f88b3686ce93312a8131 (patch) | |
tree | 3c24233044a8e72bd8ecd73b981f50c725d5d282 /video/codecs/indeo3.cpp | |
parent | 89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff) | |
parent | 8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff) | |
download | scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2 scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip |
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16
Conflicts:
graphics/png.cpp
Diffstat (limited to 'video/codecs/indeo3.cpp')
-rw-r--r-- | video/codecs/indeo3.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp index c8f62d2452..b4f6c6ffe3 100644 --- a/video/codecs/indeo3.cpp +++ b/video/codecs/indeo3.cpp @@ -51,7 +51,7 @@ Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _correc _pixelFormat = g_system->getScreenFormat(); _surface = new Graphics::Surface; - _surface->create(width, height, _pixelFormat.bytesPerPixel); + _surface->create(width, height, _pixelFormat); buildModPred(); allocFrames(); @@ -322,10 +322,10 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream * const uint32 color = _pixelFormat.RGBToColor(r, g, b); - for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->bytesPerPixel) { - if (_surface->bytesPerPixel == 1) + for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->format.bytesPerPixel) { + if (_surface->format.bytesPerPixel == 1) *((uint8 *)rowDest) = (uint8)color; - else if (_surface->bytesPerPixel == 2) + else if (_surface->format.bytesPerPixel == 2) *((uint16 *)rowDest) = (uint16)color; } } |