X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftile_manager.hpp;h=64906cf09035e4fc55d0a79b83119177c4578d90;hb=3e86b3d0c8c9ed1137e8716fcecbcd0ca67bea7b;hp=b8ef087f5a065e4000cb58918a139cfce19f7887;hpb=86181b0a14d89cf45daf97199c3556c4dd1ee7b7;p=supertux.git diff --git a/src/tile_manager.hpp b/src/tile_manager.hpp index b8ef087f5..64906cf09 100644 --- a/src/tile_manager.hpp +++ b/src/tile_manager.hpp @@ -1,7 +1,8 @@ // $Id$ -// +// // SuperTux // Copyright (C) 2004 Tobias Glaesser +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,7 +13,7 @@ // 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 @@ -28,6 +29,7 @@ #include #include #include +#include "log.hpp" #include "tile.hpp" struct TileGroup @@ -51,7 +53,7 @@ private: std::set tilegroups; std::string tiles_path; - + void load_tileset(std::string filename); public: @@ -69,13 +71,13 @@ public: assert(id < tiles.size()); Tile* tile = tiles[id]; if(!tile) { - std::cout << "TileManager: Invalid tile: " << id << std::endl; + log_warning << "Invalid tile: " << id << std::endl; return tiles[0]; } if(tile->images.size() == 0 && tile->imagespecs.size() != 0) tile->load_images(tiles_path); - + return tile; } @@ -95,4 +97,6 @@ public: } }; +extern TileManager* tile_manager; + #endif