Added a post processing step to runScripts, so that Animation can be validated after buggy scripts have been executed.
svn-id: r33363
This commit is contained in:
parent
16fe053ab4
commit
c6cbf1f144
3 changed files with 25 additions and 16 deletions
|
@ -81,6 +81,12 @@ byte* Animation::getFrameData(uint32 index) const {
|
|||
return gfxobj->getData(index);
|
||||
}
|
||||
|
||||
void Animation::validateScriptVars() {
|
||||
// this is used to clip values of _frame, _left and _top
|
||||
// which can be screwed up by buggy scripts.
|
||||
|
||||
_frame = CLIP(_frame, (int16)0, (int16)(getFrameNum() - 1));
|
||||
}
|
||||
|
||||
#define NUM_LOCALS 10
|
||||
char _localNames[NUM_LOCALS][10];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue