// $Id$
-//
+//
// SuperTux
-// Copyright (C) 2004 SuperTux Development Team, see AUTHORS for details
+// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include <stdexcept>
#include "video/screen.hpp"
-#include "msg.hpp"
+#include "log.hpp"
#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#include "lisp/list_iterator.hpp"
if(token == "version") {
iter.value()->get(version);
if(version > 2) {
- msg_warning << "level format newer than application" << std::endl;
+ log_warning << "level format newer than application" << std::endl;
}
} else if(token == "name") {
iter.value()->get(name);
} else if(token == "author") {
iter.value()->get(author);
} else if(token == "sector") {
- Sector* sector = new Sector;
+ Sector* sector = new Sector(this);
sector->parse(*(iter.lisp()));
add_sector(sector);
} else {
- msg_warning << "Unknown token '" << token << "' in level file" << std::endl;
+ log_warning << "Unknown token '" << token << "' in level file" << std::endl;
continue;
}
}
reader.get("name", name);
reader.get("author", author);
- Sector* sector = new Sector;
+ Sector* sector = new Sector(this);
sector->parse_old_format(reader);
add_sector(sector);
}