From 577b9a6611d7539cde9a1cf60627ef50e1045f5b Mon Sep 17 00:00:00 2001 From: Brandon Date: Tue, 18 Apr 2017 20:16:08 -0700 Subject: [PATCH] Remove dead code --- shared/tileset.cpp | 9 +-------- shared/tileset.hpp | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/shared/tileset.cpp b/shared/tileset.cpp index d940257..fb735c4 100644 --- a/shared/tileset.cpp +++ b/shared/tileset.cpp @@ -71,7 +71,7 @@ bool Tileset::Match(const ImageTile& tile, int& tile_id, int& pal_id) const std::stringstream oss; oss << tile; if (!tile_id) - VerboseLog("%s %d %d", oss.str().c_str(), tile_id, pal_id); + VerboseLog("Tileset::Match %s %d %d", oss.str().c_str(), tile_id, pal_id); return true; } @@ -248,11 +248,9 @@ void Tileset::Init8bpp(const std::vector& images16) for (unsigned int k = 0; k < images16.size(); k++) { - bool disjoint_error = false; const Image8Bpp& image = scene.GetImage(k); const Image16Bpp& image16 = images16[k]; - offsets.push_back(tiles.size()); unsigned int tilesX = image.width / tile_width; unsigned int tilesY = image.height / tile_width; unsigned int totalTiles = tilesX * tilesY; @@ -273,11 +271,6 @@ void Tileset::Init8bpp(const std::vector& images16) ImageTile imageTile(image16, tilex, tiley, params.border); matcher.insert(std::pair(imageTile, tile)); } - else if (offsets.size() > 1 && !disjoint_error) - { - WarnLog("Tiles found in tileset image %s are not disjoint, offset calculations may be off", image.name.c_str()); - disjoint_error = true; - } } } diff --git a/shared/tileset.hpp b/shared/tileset.hpp index 5fabc2b..9bd79d7 100644 --- a/shared/tileset.hpp +++ b/shared/tileset.hpp @@ -33,8 +33,6 @@ class Tileset : public Exportable // Only one max will be used bpp = 4: paletteBanks 8: palette 16: neither std::shared_ptr palette; PaletteBankManager paletteBanks; - // Only valid for bpp = 4 and 8 - std::vector offsets; private: void Init4bpp(const std::vector& images); void Init8bpp(const std::vector& images);