+Interpreter::~Interpreter() {
+ for (vector<Animation *>::const_iterator i(animations.begin()), end(animations.end()); i != end; ++i) {
+ delete *i;
+ }
+ for (vector<Hero *>::const_iterator i(heroes.begin()), end(heroes.end()); i != end; ++i) {
+ delete *i;
+ }
+ for (vector<SDL_Surface *>::const_iterator i(images.begin()), end(images.end()); i != end; ++i) {
+ SDL_FreeSurface(*i);
+ }
+ for (vector<Monster *>::const_iterator i(monsters.begin()), end(monsters.end()); i != end; ++i) {
+ delete *i;
+ }
+ for (vector<Sprite *>::const_iterator i(sprites.begin()), end(sprites.end()); i != end; ++i) {
+ delete *i;
+ }
+}
+
+
+bool Interpreter::ParsedDefinition::IsCompatible(DynamicType with) const {
+ return type == with
+ || (with == ANIMATION
+ && (type == COMPLEX_ANIMATION || type == SIMPLE_ANIMATION));
+}
+
+