aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-06 07:25:07 +0000
committerMartin Kiewitz2009-10-06 07:25:07 +0000
commitc901f18e031e4ecae0b168a031c8b6ad71981680 (patch)
tree6971423bb05253d93ffade8dc06cb6ec9d728964 /engines
parent358bfb31419666325f0fd69907a3ffb1e9febdc6 (diff)
downloadscummvm-rg350-c901f18e031e4ecae0b168a031c8b6ad71981680.tar.gz
scummvm-rg350-c901f18e031e4ecae0b168a031c8b6ad71981680.tar.bz2
scummvm-rg350-c901f18e031e4ecae0b168a031c8b6ad71981680.zip
SCI/newgui: view 1.1 loading now completely fixed, included sanity check and one fixme
svn-id: r44687
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_view.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp
index cfa3efa848..8daa310084 100644
--- a/engines/sci/gui/gui_view.cpp
+++ b/engines/sci/gui/gui_view.cpp
@@ -129,10 +129,11 @@ void SciGuiView::initData(GuiResourceId resourceId) {
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:WORD LoopCount:BYTE Unknown:BYTE Version:WORD Unknown:WORD PaletteOffset:WORD
headerSize = READ_LE_UINT16(_resourceData + 0);
- _loopCount = READ_LE_UINT16(_resourceData + 2);
+ _loopCount = _resourceData[2];
palOffset = READ_LE_UINT16(_resourceData + 8);
+ // FIXME: After LoopCount there is another byte and its set for view 50 within Laura Bow 2 CD, check what it means
loopData = _resourceData + headerSize;
loopSize = _resourceData[12];
@@ -149,6 +150,8 @@ void SciGuiView::initData(GuiResourceId resourceId) {
seekEntry = loopData[2];
if (seekEntry != 255) {
+ if (seekEntry >= _loopCount)
+ error("Bad loop-pointer in sci 1.1 view");
_loop[loopNo].mirrorFlag = true;
loopData = _resourceData + headerSize + (seekEntry * loopSize);
} else {