Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
TricksterGuy committed Apr 19, 2017
1 parent 2648b9e commit 577b9a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 1 addition & 8 deletions shared/tileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -248,11 +248,9 @@ void Tileset::Init8bpp(const std::vector<Image16Bpp>& 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;
Expand All @@ -273,11 +271,6 @@ void Tileset::Init8bpp(const std::vector<Image16Bpp>& images16)
ImageTile imageTile(image16, tilex, tiley, params.border);
matcher.insert(std::pair<ImageTile, Tile>(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;
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions shared/tileset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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> palette;
PaletteBankManager paletteBanks;
// Only valid for bpp = 4 and 8
std::vector<int> offsets;
private:
void Init4bpp(const std::vector<Image16Bpp>& images);
void Init8bpp(const std::vector<Image16Bpp>& images);
Expand Down

0 comments on commit 577b9a6

Please sign in to comment.