From: Ingo Ruhnke Date: Sat, 3 Mar 2007 14:23:49 +0000 (+0000) Subject: - added check for 'region' symbol X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c551a7ee31696e62ee6a05d4505ff93cfca24112;p=supertux.git - added check for 'region' symbol SVN-Revision: 4909 --- diff --git a/src/lisp/lisp.hpp b/src/lisp/lisp.hpp index 38d6605d4..c65b2ea20 100644 --- a/src/lisp/lisp.hpp +++ b/src/lisp/lisp.hpp @@ -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); diff --git a/src/tile.cpp b/src/tile.cpp index 3157c5104..c45f79c9c 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -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;