diff options
author | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/gob/video_v2.cpp | |
parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'engines/gob/video_v2.cpp')
-rw-r--r-- | engines/gob/video_v2.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/gob/video_v2.cpp b/engines/gob/video_v2.cpp index 98cf4a5d4f..c908ccf7b1 100644 --- a/engines/gob/video_v2.cpp +++ b/engines/gob/video_v2.cpp @@ -34,9 +34,9 @@ Video_v2::Video_v2(GobEngine *vm) : Video_v1(vm) { } char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, - int16 x, int16 y, int16 transp, SurfaceDesc &destDesc) { + int16 x, int16 y, int16 transp, Surface &destDesc) { byte *memBuffer; - byte *srcPtr, *destPtr, *linePtr; + byte *srcPtr; byte temp; uint32 sourceLeft; uint16 cmdVar; @@ -47,7 +47,7 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, int16 strLen; int16 lenCmd; - _vm->validateVideoMode(destDesc._vidMode); + //_vm->validateVideoMode(destDesc._vidMode); if (sprBuf[0] != 1) return 0; @@ -56,9 +56,8 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, return 0; if (sprBuf[2] == 2) { - SurfaceDesc sourceDesc(0x13, srcWidth, srcHeight, sprBuf + 3); - Video::drawSprite(sourceDesc, destDesc, 0, 0, srcWidth - 1, - srcHeight - 1, x, y, transp); + Surface sourceDesc(srcWidth, srcHeight, 1, sprBuf + 3); + destDesc.blit(sourceDesc, 0, 0, srcWidth - 1, srcHeight - 1, x, y, (transp == 0) ? -1 : 0); return 1; } else if (sprBuf[2] == 1) { memBuffer = new byte[4370]; @@ -70,12 +69,12 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, sourceLeft = READ_LE_UINT32(srcPtr); - destPtr = destDesc.getVidMem() + destDesc.getWidth() * y + x; + Pixel destPtr = destDesc.get(x, y); curWidth = 0; curHeight = 0; - linePtr = destPtr; + Pixel linePtr = destPtr; srcPtr += 4; if ((READ_LE_UINT16(srcPtr) == 0x1234) && (READ_LE_UINT16(srcPtr + 2) == 0x5678)) { @@ -99,7 +98,7 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, temp = *srcPtr++; if ((temp != 0) || (transp == 0)) - *destPtr = temp; + destPtr.set(temp); destPtr++; curWidth++; @@ -133,7 +132,7 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, temp = memBuffer[(offset + counter2) % 4096]; if ((temp != 0) || (transp == 0)) - *destPtr = temp; + destPtr.set(temp); destPtr++; curWidth++; |