aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-06 23:36:31 +0200
committerEugene Sandulenko2013-12-06 23:36:31 +0200
commit172128931bbcfae86b61be0b13050654ae63f0a3 (patch)
tree3750c143109efbb5b3f8d14d6ddac0a235e74b08 /engines/fullpipe
parent8844d461a959d8ffbbd7ec397c529cdd2fcee606 (diff)
downloadscummvm-rg350-172128931bbcfae86b61be0b13050654ae63f0a3.tar.gz
scummvm-rg350-172128931bbcfae86b61be0b13050654ae63f0a3.tar.bz2
scummvm-rg350-172128931bbcfae86b61be0b13050654ae63f0a3.zip
FULLPIPE: Implement MctlLadder::freeItems()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/motion.cpp13
-rw-r--r--engines/fullpipe/motion.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 5e399a2fe9..30f71aa0b3 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -196,6 +196,10 @@ MctlLadder::MctlLadder() {
_ladder_field_24 = 0;
}
+MctlLadder::~MctlLadder() {
+ freeItems();
+}
+
int MctlLadder::collisionDetection(StaticANIObject *man) {
warning("STUB: MctlLaddercollisionDetection()");
@@ -270,7 +274,14 @@ bool MctlLadder::initMovement(StaticANIObject *ani, MctlLadderMovement *movement
}
void MctlLadder::freeItems() {
- warning("STUB: MctlLadder::freeItems()");
+ _mgm.clear();
+
+ for (Common::List<MctlLadderMovement *>::iterator it = _movements.begin(); it != _movements.end(); ++it) {
+ delete (*it)->movVars;
+ delete [] (*it)->staticIds;
+ }
+
+ _movements.clear();
}
MessageQueue *MctlLadder::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 92240506b4..5988b71d15 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -191,6 +191,7 @@ public:
public:
MctlLadder();
+ virtual ~MctlLadder();
int collisionDetection(StaticANIObject *man);
virtual void addObject(StaticANIObject *obj);