#include <stdexcept>
#include <sstream>
#include <unistd.h>
-//#include <physfs.h>
+#include <physfs.h>
#include "worldmap.hpp"
WorldMap::WorldMap(const std::string& filename, const std::string& force_spawnpoint)
: tux(0), ambient_light( 1.0f, 1.0f, 1.0f, 1.0f ), force_spawnpoint(force_spawnpoint), in_level(false)
{
- tile_manager.reset(new TileManager("images/worldmap.strf"));
+ tile_manager.reset(new TileManager());
+ //"images/worldmap.strf");
tux = new Tux(this);
add_object(tux);
sq_addref(global_vm, &worldmap_table);
sq_pop(global_vm, 1);
+
+ sound_manager->preload("sounds/warp.wav");
// load worldmap objects
load(filename);
lisp::ListIterator iter(sector);
while(iter.next()) {
if(iter.item() == "tilemap") {
- add_object(new TileMap(*(iter.lisp()), tile_manager.get()));
+
+ TileMap::loading_worldmap = true;
+
+ add_object(new TileMap(*(iter.lisp())));
} else if(iter.item() == "background") {
add_object(new Background(*(iter.lisp())));
} else if(iter.item() == "music") {