aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-04 21:30:13 +0000
committerMartin Kiewitz2009-10-04 21:30:13 +0000
commit08c7ec123def1bfb298bfe30f918ba4f78a2ecea (patch)
tree4d6dce5470a157383b023620be295e7c446fcf95
parentdb2e5a4fb5018aefd72c4ffe2597968f63145774 (diff)
downloadscummvm-rg350-08c7ec123def1bfb298bfe30f918ba4f78a2ecea.tar.gz
scummvm-rg350-08c7ec123def1bfb298bfe30f918ba4f78a2ecea.tar.bz2
scummvm-rg350-08c7ec123def1bfb298bfe30f918ba4f78a2ecea.zip
SCI/newgui: SciGUIview class now uses resmanager to detect view format
svn-id: r44636
-rw-r--r--engines/sci/gui/gui_view.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp
index 1b42a76f4e..048cfc0198 100644
--- a/engines/sci/gui/gui_view.cpp
+++ b/engines/sci/gui/gui_view.cpp
@@ -57,15 +57,18 @@ void SciGUIview::initData(GUIResourceId resourceId) {
uint16 headerSize = 0;
uint16 loopSize = 0, cellSize = 0;
int loopNo, cellNo;
- int16 version;
byte seekEntry;
_embeddedPal = false;
_loopCount = 0;
- version = READ_LE_UINT16(_resourceData + 4);
- switch (version) {
- case 0: // View-format SCI1
+
+ switch (_s->resMan->getViewType()) {
+ case kViewEga: // View-format SCI0/SCI0
+ // FIXME: seems to be almost the same as kViewVga
+ break;
+
+ case kViewVga: // View-format SCI1
// LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD...
// bit 0x8000 of _resourceData[1] means palette is set
@@ -109,7 +112,7 @@ void SciGUIview::initData(GUIResourceId resourceId) {
}
break;
- case 1: // View-format SCI1.1
+ case kViewVga11: // View-format SCI1.1
// LoopCount:WORD MirrorMask:WORD Version:WORD PaletteOffset:WORD LoopOffset0:WORD LoopOffset1:WORD...
// HeaderSize:WORD LoopCount:WORD Version:WORD Unknown:WORD PaletteOffset:WORD
headerSize = READ_LE_UINT16(_resourceData + 0);
@@ -159,6 +162,13 @@ void SciGUIview::initData(GUIResourceId resourceId) {
}
}
break;
+
+ case kViewAmiga: // View-format on amiga
+ // FIXME
+ break;
+
+ default:
+ error("ViewType was not detected, can't continue");
}
}