SCI: making vga views work in ega games :P

svn-id: r50025
This commit is contained in:
Martin Kiewitz 2010-06-18 17:40:13 +00:00
parent 6f7f6572c4
commit 636ef64c68
2 changed files with 17 additions and 1 deletions

View File

@ -203,6 +203,7 @@ void GfxPalette::setEGA() {
_sysPalette.colors[curColor].g = (_sysPalette.colors[color1].g >> 1) + (_sysPalette.colors[color2].g >> 1);
_sysPalette.colors[curColor].b = (_sysPalette.colors[color1].b >> 1) + (_sysPalette.colors[color2].b >> 1);
}
_sysPalette.timestamp = 1;
setOnScreen();
}

View File

@ -75,12 +75,27 @@ void GfxView::initData(GuiResourceId resourceId) {
byte seekEntry;
bool isEGA = false;
bool isCompressed = true;
ViewType curViewType = _resMan->getViewType();
_loopCount = 0;
_embeddedPal = false;
_EGAmapping = NULL;
switch (_resMan->getViewType()) {
// If we find a SCI1/SCI1.1 view (not amiga), we switch to that type for EGA
if (curViewType == kViewEga) {
if (_resourceData[1] == 0x80) {
switch (READ_LE_UINT16(_resourceData + 4)) {
case 0: // SCI1
curViewType = kViewVga;
break;
case 1: // SCI1.1
curViewType = kViewVga11;
break;
}
}
}
switch (curViewType) {
case kViewEga: // View-format SCI0 (and Amiga 16 colors)
isEGA = true;
case kViewAmiga: // View-format Amiga (32 colors)