diff options
author | Torbjörn Andersson | 2005-09-27 06:16:16 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-09-27 06:16:16 +0000 |
commit | ab3ddb787307a62095fc58546f511d0ef6680afa (patch) | |
tree | 9281cbc7843d70130f2c1dfc142c02a4f64931fd /saga/animation.h | |
parent | d18827876d91d1b72804adf335ea8deb45b46a59 (diff) | |
download | scummvm-rg350-ab3ddb787307a62095fc58546f511d0ef6680afa.tar.gz scummvm-rg350-ab3ddb787307a62095fc58546f511d0ef6680afa.tar.bz2 scummvm-rg350-ab3ddb787307a62095fc58546f511d0ef6680afa.zip |
Applied my patch #1304998 to fix some issues with the IHNM intro. The intro
plays fine now, as far as I can tell, except for some missing sound effects
and the subtitles use the wrong font and are probably drawn in the wrong
position.
svn-id: r18887
Diffstat (limited to 'saga/animation.h')
-rw-r--r-- | saga/animation.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/saga/animation.h b/saga/animation.h index 0f27ceee35..2e245489c2 100644 --- a/saga/animation.h +++ b/saga/animation.h @@ -129,6 +129,8 @@ public: int16 getCurrentFrame(uint16 animId); bool hasAnimation(uint16 animId) { if (animId >= MAX_ANIMATIONS) { + if (animId < MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations)) + return (_cutawayAnimations[animId - MAX_ANIMATIONS] != NULL); return false; } return (_animations[animId] != NULL); @@ -139,7 +141,11 @@ private: void validateAnimationId(uint16 animId) { if (animId >= MAX_ANIMATIONS) { - error("validateAnimationId: animId out of range"); + if (animId >= MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations)) + error("validateAnimationId: animId out of range"); + if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) { + error("validateAnimationId: animId=%i unassigned", animId); + } } if (_animations[animId] == NULL) { error("validateAnimationId: animId=%i unassigned", animId); @@ -155,6 +161,8 @@ private: AnimationData* getAnimation(uint16 animId) { validateAnimationId(animId); + if (animId > MAX_ANIMATIONS) + return _cutawayAnimations[animId - MAX_ANIMATIONS]; return _animations[animId]; } @@ -170,6 +178,7 @@ private: SagaEngine *_vm; AnimationData *_animations[MAX_ANIMATIONS]; + AnimationData *_cutawayAnimations[2]; Cutaway *_cutawayList; int _cutawayListLength; bool _cutawayActive; |