[Scummvm-cvs-logs] SF.net SVN: scummvm:[35058] scummvm/trunk/engines/saga/animation.h
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Nov 14 18:51:48 CET 2008
Revision: 35058
http://scummvm.svn.sourceforge.net/scummvm/?rev=35058&view=rev
Author: thebluegr
Date: 2008-11-14 17:51:48 +0000 (Fri, 14 Nov 2008)
Log Message:
-----------
Some corrections, based on observations from bug report #2284298 - "SAGA: Compiler warnings; possibly an engine bug"
Modified Paths:
--------------
scummvm/trunk/engines/saga/animation.h
Modified: scummvm/trunk/engines/saga/animation.h
===================================================================
--- scummvm/trunk/engines/saga/animation.h 2008-11-14 14:12:18 UTC (rev 35057)
+++ scummvm/trunk/engines/saga/animation.h 2008-11-14 17:51:48 UTC (rev 35058)
@@ -164,15 +164,18 @@
void validateAnimationId(uint16 animId) {
if (animId >= MAX_ANIMATIONS) {
+ // Cutaway
if (animId >= MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations))
error("validateAnimationId: animId out of range");
if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) {
error("validateAnimationId: animId=%i unassigned", animId);
}
+ } else {
+ // Animation
+ if (_animations[animId] == NULL) {
+ error("validateAnimationId: animId=%i unassigned.", animId);
+ }
}
- if (_animations[animId] == NULL) {
- error("validateAnimationId: animId=%i unassigned.", animId);
- }
}
bool isLongData() const {
@@ -184,7 +187,7 @@
AnimationData* getAnimation(uint16 animId) {
validateAnimationId(animId);
- if (animId > MAX_ANIMATIONS)
+ if (animId >= MAX_ANIMATIONS)
return _cutawayAnimations[animId - MAX_ANIMATIONS];
return _animations[animId];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list