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/sci/graphics/view.cpp | |
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/sci/graphics/view.cpp')
-rw-r--r-- | engines/sci/graphics/view.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
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) |