Skip to content

Commit

Permalink
gamegfx: Fix tile count and remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Malvineous committed Aug 4, 2012
1 parent 0ff00ae commit be4de43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/gamegfx.cpp
Expand Up @@ -105,7 +105,7 @@ void printTilesetList(std::string prefix, gg::TilesetPtr pTileset,
} else { } else {
std::cout << ", "; std::cout << ", ";
if (tiles.size()) { if (tiles.size()) {
std::cout << (tiles.size() - 1) << " items\n"; std::cout << tiles.size() << " items\n";
} else { } else {
std::cout << "no images" << '\n'; std::cout << "no images" << '\n';
} }
Expand Down Expand Up @@ -361,8 +361,6 @@ void pngToTileset(gg::TilesetPtr tileset, const std::string& srcFile)
if ((*i)->attr & gg::Tileset::SubTileset) continue; // aah! tileset! bad! if ((*i)->attr & gg::Tileset::SubTileset) continue; // aah! tileset! bad!


gg::ImagePtr img = tileset->openImage(*i); gg::ImagePtr img = tileset->openImage(*i);
gg::StdImageDataPtr data = img->toStandard();
gg::StdImageDataPtr mask = img->toStandardMask();


unsigned int offX = (t % tilesX) * width; unsigned int offX = (t % tilesX) * width;
unsigned int offY = (t / tilesX) * height; unsigned int offY = (t / tilesX) * height;
Expand Down

0 comments on commit be4de43

Please sign in to comment.