mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 10:41:55 +00:00
SCI: Cleaned up some view type checks
This commit is contained in:
parent
bc992d77de
commit
5b9677da72
@ -733,7 +733,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PIC_OPX_VGA_SET_PALETTE:
|
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)) {
|
if ((data[curPos] == 0x00) && (data[curPos + 1] == 0x01) && ((data[curPos + 32] & 0xF0) != 0xF0)) {
|
||||||
// Left-Over VGA palette, we simply ignore it
|
// Left-Over VGA palette, we simply ignore it
|
||||||
curPos += 256 + 4 + 1024;
|
curPos += 256 + 4 + 1024;
|
||||||
|
@ -113,7 +113,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
|
|||||||
_unditherState = true;
|
_unditherState = true;
|
||||||
_fontIsUpscaled = false;
|
_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
|
// 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
|
// games. But 255 is defined as white in our SCI at all times, so it
|
||||||
// doesn't matter.
|
// doesn't matter.
|
||||||
|
@ -104,9 +104,9 @@ void GfxView::initData(GuiResourceId resourceId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (curViewType) {
|
switch (curViewType) {
|
||||||
case kViewEga: // View-format SCI0 (and Amiga 16 colors)
|
case kViewEga: // SCI0 (and Amiga 16 colors)
|
||||||
isEGA = true;
|
isEGA = true;
|
||||||
case kViewAmiga: // View-format Amiga (32 colors)
|
case kViewAmiga: // Amiga (32 colors)
|
||||||
case kViewVga: // View-format SCI1
|
case kViewVga: // View-format SCI1
|
||||||
// LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD...
|
// 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;
|
rlePtr = _resourceData + celInfo->offsetRLE;
|
||||||
if (!celInfo->offsetLiteral) { // no additional literal data
|
if (!celInfo->offsetLiteral) { // no additional literal data
|
||||||
if (_resMan->isAmiga32color()) {
|
if (_resMan->getViewType() == kViewAmiga) {
|
||||||
// decompression for amiga views
|
// decompression for amiga views
|
||||||
while (pixelNo < pixelCount) {
|
while (pixelNo < pixelCount) {
|
||||||
pixel = *rlePtr++;
|
pixel = *rlePtr++;
|
||||||
@ -531,9 +531,8 @@ const byte *GfxView::getBitmap(int16 loopNo, int16 celNo) {
|
|||||||
// unpack the actual cel bitmap data
|
// unpack the actual cel bitmap data
|
||||||
unpackCel(loopNo, celNo, pBitmap, pixelCount);
|
unpackCel(loopNo, celNo, pBitmap, pixelCount);
|
||||||
|
|
||||||
if (!_resMan->isVGA()) {
|
if (_resMan->getViewType() == kViewEga)
|
||||||
unditherBitmap(pBitmap, width, height, _loop[loopNo].cel[celNo].clearKey);
|
unditherBitmap(pBitmap, width, height, _loop[loopNo].cel[celNo].clearKey);
|
||||||
}
|
|
||||||
|
|
||||||
// mirroring the cel if needed
|
// mirroring the cel if needed
|
||||||
if (_loop[loopNo].mirrorFlag) {
|
if (_loop[loopNo].mirrorFlag) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user