[Super-tux-commit] supertux/src/object tilemap.cpp,1.5,1.6
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2005-04-03 21:07:41
|
Update of /cvsroot/super-tux/supertux/src/object In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18703/src/object Modified Files: tilemap.cpp Log Message: make sure all tiles are loaded Index: tilemap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/object/tilemap.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tilemap.cpp 25 Mar 2005 20:39:55 -0000 1.5 +++ tilemap.cpp 3 Apr 2005 21:07:14 -0000 1.6 @@ -83,6 +83,10 @@ if(int(tiles.size()) != width*height) { throw std::runtime_error("wrong number of tiles in tilemap."); } + + // make sure all tiles are loaded + for(Tiles::iterator i = tiles.begin(); i != tiles.end(); ++i) + tilemanager->get(*i); } TileMap::TileMap(int layer_, bool solid_, size_t width_, size_t height_) @@ -200,6 +204,10 @@ solid = newsolid; if(solid) flags |= FLAG_SOLID; + + // make sure all tiles are loaded + for(Tiles::iterator i = tiles.begin(); i != tiles.end(); ++i) + tilemanager->get(*i); } void |