- added check for 'region' symbol
authorIngo Ruhnke <grumbel@gmx.de>
Sat, 3 Mar 2007 14:23:49 +0000 (14:23 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Sat, 3 Mar 2007 14:23:49 +0000 (14:23 +0000)
SVN-Revision: 4909

src/lisp/lisp.hpp
src/tile.cpp

index 38d6605..c65b2ea 100644 (file)
@@ -57,6 +57,12 @@ public:
     return true;
   }
 
+  std::string get_symbol() const
+  {
+    assert(type == TYPE_SYMBOL);
+    return v.string;
+  }
+
   std::string get_string() const
   {
     assert(type == TYPE_STRING);
index 3157c51..c45f79c 100644 (file)
@@ -116,7 +116,8 @@ Tile::parse_images(const lisp::Lisp& images_lisp)
       cur->get(file);
       imagespecs.push_back(ImageSpec(file, Rect(0, 0, 0, 0)));
     } else if(cur->get_type() == lisp::Lisp::TYPE_CONS &&
-        cur->get_car()->get_type() == lisp::Lisp::TYPE_SYMBOL) {
+                                 cur->get_car()->get_type() == lisp::Lisp::TYPE_SYMBOL &&
+              cur->get_car()->get_symbol() == "region") {
       const lisp::Lisp* ptr = cur->get_cdr();
 
       std::string file;