diff options
author | md5 | 2011-03-07 13:23:52 +0200 |
---|---|---|
committer | md5 | 2011-03-07 13:23:52 +0200 |
commit | 4ddc66d68ef1439ceb669658ea2651a6a5a06597 (patch) | |
tree | 18ad30cacc91ec7d224e4b559893f2b5b9b7f8a4 /engines/sci/graphics/view.cpp | |
parent | df1a800d01918ddda9159e3b9f42e8ef8d701456 (diff) | |
download | scummvm-rg350-4ddc66d68ef1439ceb669658ea2651a6a5a06597.tar.gz scummvm-rg350-4ddc66d68ef1439ceb669658ea2651a6a5a06597.tar.bz2 scummvm-rg350-4ddc66d68ef1439ceb669658ea2651a6a5a06597.zip |
SCI: Initial handling of the views in Longbow Amiga. Still not right
Diffstat (limited to 'engines/sci/graphics/view.cpp')
-rw-r--r-- | engines/sci/graphics/view.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index a6c0805f65..fd74714495 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -106,7 +106,8 @@ void GfxView::initData(GuiResourceId resourceId) { switch (curViewType) { case kViewEga: // SCI0 (and Amiga 16 colors) isEGA = true; - case kViewAmiga: // Amiga (32 colors) + case kViewAmiga: // Amiga ECS (32 colors) + case kViewAmiga64: // Amiga AGA (64 colors) case kViewVga: // View-format SCI1 // LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD... @@ -396,15 +397,23 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo if (curByte & 0x07) { // fill with color runLength = curByte & 0x07; curByte = curByte >> 3; - while (runLength-- && pixelNr < pixelCount) { + while (runLength-- && pixelNr < pixelCount) outPtr[pixelNr++] = curByte; - } } else { // fill with transparent runLength = curByte >> 3; pixelNr += runLength; } } break; + case kViewAmiga64: + // TODO: This isn't 100% right. Implement it fully. + while (pixelNr < pixelCount) { + curByte = *rlePtr++; + runLength = curByte >> 6; + memset(outPtr + pixelNr, curByte & 0x3F, MIN<uint16>(runLength, pixelCount - pixelNr)); + pixelNr += runLength; + } + break; case kViewVga: case kViewVga11: while (pixelNr < pixelCount) { @@ -432,6 +441,7 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo error("Unsupported picture viewtype"); } } else { + // decompression for data that has two separate streams (probably a SCI 1.1 view) if (isMacSci11ViewData) { // KQ6/Freddy Pharkas use byte lengths, all others use uint16 // The SCI devs must have realized that a max of 255 pixels wide @@ -457,7 +467,6 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo pixelNr = pixelLine + width; } } else { - // decompression for data that has two separate streams (probably SCI 1.1 view) while (pixelNr < pixelCount) { curByte = *rlePtr++; runLength = curByte & 0x3F; |