aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorDavid Eriksson2003-11-13 12:17:53 +0000
committerDavid Eriksson2003-11-13 12:17:53 +0000
commiteae52af55985b96beadb68f09101350f98f1f694 (patch)
tree67627db6fc6894212a991d8f2a6e2737892ddd39 /queen
parent428ebd65685d6b80800c467ab3d3f0445e4793e7 (diff)
downloadscummvm-rg350-eae52af55985b96beadb68f09101350f98f1f694.tar.gz
scummvm-rg350-eae52af55985b96beadb68f09101350f98f1f694.tar.bz2
scummvm-rg350-eae52af55985b96beadb68f09101350f98f1f694.zip
Fix crashing demos: the demos have no song parameter in cutaway animations.
svn-id: r11283
Diffstat (limited to 'queen')
-rw-r--r--queen/cutaway.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp
index 0530616aac..9e1f820535 100644
--- a/queen/cutaway.cpp
+++ b/queen/cutaway.cpp
@@ -893,12 +893,13 @@ byte *Cutaway::getCutawayAnim(byte *ptr, int header, CutawayAnim &anim) {
anim.scale = (int16)READ_BE_UINT16(ptr);
ptr += 2;
-#if 1
- anim.song = (int16)READ_BE_UINT16(ptr);
- ptr += 2;
-#else
- anim.song = 0;
-#endif
+ if (_resource->isDemo()) {
+ anim.song = 0;
+ }
+ else {
+ anim.song = (int16)READ_BE_UINT16(ptr);
+ ptr += 2;
+ }
// Extract information that depend on the signedness of values
if (anim.unpackFrame < 0) {