SCI: Cleaned up some view type checks

This commit is contained in:
md5 2011-03-04 21:49:19 +02:00
parent bc992d77de
commit 5b9677da72
3 changed files with 6 additions and 7 deletions

View File

@ -733,7 +733,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
}
break;
case PIC_OPX_VGA_SET_PALETTE:
if (_resMan->isAmiga32color()) {
if (_resMan->getViewType() == kViewAmiga) {
if ((data[curPos] == 0x00) && (data[curPos + 1] == 0x01) && ((data[curPos + 32] & 0xF0) != 0xF0)) {
// Left-Over VGA palette, we simply ignore it
curPos += 256 + 4 + 1024;

View File

@ -113,7 +113,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_unditherState = true;
_fontIsUpscaled = false;
if (_resMan->isVGA() || (_resMan->isAmiga32color())) {
if (_resMan->getViewType() != kViewEga) {
// It is not 100% accurate to set white to be 255 for Amiga 32-color
// games. But 255 is defined as white in our SCI at all times, so it
// doesn't matter.

View File

@ -104,9 +104,9 @@ void GfxView::initData(GuiResourceId resourceId) {
}
switch (curViewType) {
case kViewEga: // View-format SCI0 (and Amiga 16 colors)
case kViewEga: // SCI0 (and Amiga 16 colors)
isEGA = true;
case kViewAmiga: // View-format Amiga (32 colors)
case kViewAmiga: // Amiga (32 colors)
case kViewVga: // View-format SCI1
// LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD...
@ -412,7 +412,7 @@ void GfxView::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCou
rlePtr = _resourceData + celInfo->offsetRLE;
if (!celInfo->offsetLiteral) { // no additional literal data
if (_resMan->isAmiga32color()) {
if (_resMan->getViewType() == kViewAmiga) {
// decompression for amiga views
while (pixelNo < pixelCount) {
pixel = *rlePtr++;
@ -531,9 +531,8 @@ const byte *GfxView::getBitmap(int16 loopNo, int16 celNo) {
// unpack the actual cel bitmap data
unpackCel(loopNo, celNo, pBitmap, pixelCount);
if (!_resMan->isVGA()) {
if (_resMan->getViewType() == kViewEga)
unditherBitmap(pBitmap, width, height, _loop[loopNo].cel[celNo].clearKey);
}
// mirroring the cel if needed
if (_loop[loopNo].mirrorFlag) {