From: Ingo Ruhnke Date: Sun, 18 Feb 2007 22:43:26 +0000 (+0000) Subject: - added some code to list free tile ids X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=335d9f3ae7582b70b714ca1be65a80be1ab3ea9f;p=supertux.git - added some code to list free tile ids SVN-Revision: 4863 --- diff --git a/src/tile_manager.cpp b/src/tile_manager.cpp index cbdb6b541..391fc5549 100644 --- a/src/tile_manager.cpp +++ b/src/tile_manager.cpp @@ -152,4 +152,22 @@ void TileManager::load_tileset(std::string filename) log_warning << "Unknown symbol '" << iter.item() << "' tile defintion file" << std::endl; } } + + if (0) + { // enable this if you want to see a list of free tiles + log_info << "Last Tile ID is " << tiles.size()-1 << std::endl; + int last = -1; + for(int i = 0; i < int(tiles.size()); ++i) + { + if (tiles[i] == 0 && last == -1) + { + last = i; + } + else if (tiles[i] && last != -1) + { + log_info << "Free Tile IDs (" << i - last << "): " << last << " - " << i-1 << std::endl; + last = -1; + } + } + } }