[Scummvm-cvs-logs] SF.net SVN: scummvm:[38903] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Thu Feb 26 15:53:57 CET 2009
Revision: 38903
http://scummvm.svn.sourceforge.net/scummvm/?rev=38903&view=rev
Author: peres001
Date: 2009-02-26 14:53:57 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
Added filter to preserve needed Animation across location switch.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/parallaction/parallaction.h
scummvm/trunk/engines/parallaction/parallaction_br.cpp
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2009-02-26 14:42:03 UTC (rev 38902)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2009-02-26 14:53:57 UTC (rev 38903)
@@ -213,11 +213,17 @@
return AnimationPtr();
}
-void Location::freeAnimations() {
- for (AnimationList::iterator it = _animations.begin(); it != _animations.end(); ++it) {
- (*it)->_commands.clear(); // See comment for freeZones(), about circular references.
+void Location::freeAnimations(bool removeAll) {
+ AnimationList::iterator it = _animations.begin();
+ while (it != _animations.end()) {
+ AnimationPtr a = *it;
+ if (!removeAll && ((a->_flags & kFlagsSelfuse) || (ACTIONTYPE(a) == kZoneMerge))) {
+ ++it;
+ } else {
+ a->_commands.clear(); // See comment for freeZones(), about circular references.
+ it = _animations.erase(it);
+ }
}
- _animations.clear();
}
@@ -266,7 +272,7 @@
_endComment.clear();
freeZones(removeAll);
- freeAnimations();
+ freeAnimations(removeAll);
_programs.clear();
_commands.clear();
Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h 2009-02-26 14:42:03 UTC (rev 38902)
+++ scummvm/trunk/engines/parallaction/parallaction.h 2009-02-26 14:53:57 UTC (rev 38903)
@@ -157,7 +157,7 @@
uint16 _followerStartFrame;
protected:
- void freeAnimations();
+ void freeAnimations(bool removeAll);
void freeZones(bool removeAll);
public:
Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp 2009-02-26 14:42:03 UTC (rev 38902)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp 2009-02-26 14:53:57 UTC (rev 38903)
@@ -194,15 +194,12 @@
}
void Parallaction_br::freeLocation(bool removeAll) {
-
// free open location stuff
clearSubtitles();
_subtitle[0] = _subtitle[1] = -1;
_gfx->freeLocationObjects();
- // TODO: avoid removing needed animations from 'common.slf'
- // when cleaning up!!!
_location._animations.remove(_char._ani);
_location.cleanup(removeAll);
_location._animations.push_front(_char._ani);
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