diff options
author | Martin Kiewitz | 2010-06-18 17:40:13 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-18 17:40:13 +0000 |
commit | 636ef64c688d1a059bc3dedb2afc35c3acb2e713 (patch) | |
tree | 5a1cc3c70c7050283e9a8d852d827f82f8ec9fa2 /engines | |
parent | 6f7f6572c4ded607d5f479c699d035cb2c8ebabb (diff) | |
download | scummvm-rg350-636ef64c688d1a059bc3dedb2afc35c3acb2e713.tar.gz scummvm-rg350-636ef64c688d1a059bc3dedb2afc35c3acb2e713.tar.bz2 scummvm-rg350-636ef64c688d1a059bc3dedb2afc35c3acb2e713.zip |
SCI: making vga views work in ega games :P
svn-id: r50025
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/palette.cpp | 1 | ||||
-rw-r--r-- | engines/sci/graphics/view.cpp | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 0972943b79..8af6b597d6 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -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(); } diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 2ba14fbd8f..40c96dcfed 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -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) |