aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorFlorian Kagerer2008-03-17 00:40:00 +0000
committerFlorian Kagerer2008-03-17 00:40:00 +0000
commiteceee73424a3338f1eedcced1e2dbb4fb7f71849 (patch)
treebeb33b8cc9a010e3a5e6b7139e50f13b660c5169 /engines/kyra
parent6c672d92f0558a52c8d549e31f6b8f46f3d3f866 (diff)
downloadscummvm-rg350-eceee73424a3338f1eedcced1e2dbb4fb7f71849.tar.gz
scummvm-rg350-eceee73424a3338f1eedcced1e2dbb4fb7f71849.tar.bz2
scummvm-rg350-eceee73424a3338f1eedcced1e2dbb4fb7f71849.zip
- fix demo
svn-id: r31151
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/staticres.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 34ac268024..dea7fe24b8 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -932,13 +932,15 @@ void KyraEngine_v2::initStaticResource() {
_ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize);
_itemAnimTable = _staticres->loadRawData(k2IngameItemAnimTable, tmpSize);
- for (int i = 0; i < 15; i++) {
- const uint8 *tmp = _itemAnimTable + 56 * i;
- _itemAnimData[i].itemIndex = (int16) READ_LE_UINT16(tmp);
- _itemAnimData[i].numFrames = tmp[2];
- _itemAnimData[i].curFrame = tmp[3];
- _itemAnimData[i].nextFrame = READ_LE_UINT32(&tmp[4]);
- _itemAnimData[i].frames = &tmp[8];
+ if (_itemAnimTable) {
+ for (int i = 0; i < 15; i++) {
+ const uint8 *tmp = _itemAnimTable + 56 * i;
+ _itemAnimData[i].itemIndex = (int16) READ_LE_UINT16(tmp);
+ _itemAnimData[i].numFrames = tmp[2];
+ _itemAnimData[i].curFrame = tmp[3];
+ _itemAnimData[i].nextFrame = READ_LE_UINT32(&tmp[4]);
+ _itemAnimData[i].frames = &tmp[8];
+ }
}
// replace sequence talkie files with localized versions and cut off .voc