aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-11-14 14:03:08 +0000
committerTorbjörn Andersson2008-11-14 14:03:08 +0000
commit5e5eebf24f1951de4300e4c7d642fd5e6fbb5936 (patch)
treef55eae32db4452fb1e96293d17bada8c176c1d64 /engines/saga
parent2ec6e678be65338ceb9d9523c0031d7ef81b4d4d (diff)
downloadscummvm-rg350-5e5eebf24f1951de4300e4c7d642fd5e6fbb5936.tar.gz
scummvm-rg350-5e5eebf24f1951de4300e4c7d642fd5e6fbb5936.tar.bz2
scummvm-rg350-5e5eebf24f1951de4300e4c7d642fd5e6fbb5936.zip
Committed my own patch #2278665 ("SCUMM: Font data in old SCUMM games") to get
rid of a few kilobytes of hard-coded font data. (The font data is still there, but now we only store how the French, German, Italian and Spanish fonts differ from the English one.) svn-id: r35056
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/animation.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/saga/animation.h b/engines/saga/animation.h
index a88d743af1..d688b0f0a7 100644
--- a/engines/saga/animation.h
+++ b/engines/saga/animation.h
@@ -166,11 +166,9 @@ private:
if (animId >= MAX_ANIMATIONS) {
if (animId >= MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations))
error("validateAnimationId: animId out of range");
- if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) {
+ if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL)
error("validateAnimationId: animId=%i unassigned", animId);
- }
- }
- if (_animations[animId] == NULL) {
+ } else if (_animations[animId] == NULL) {
error("validateAnimationId: animId=%i unassigned.", animId);
}
}
@@ -184,7 +182,7 @@ private:
AnimationData* getAnimation(uint16 animId) {
validateAnimationId(animId);
- if (animId > MAX_ANIMATIONS)
+ if (animId >= MAX_ANIMATIONS)
return _cutawayAnimations[animId - MAX_ANIMATIONS];
return _animations[animId];
}