From b0a41a23e0b92ec4ccd1227fc5ef335c88507092 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Thu, 16 Jan 2014 19:16:09 +0100 Subject: [PATCH] Rename typedef and fix wrong documenting comment --- src/tileatlas.h | 9 +++++---- src/tilemap.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tileatlas.h b/src/tileatlas.h index 458b9b5..04acf6a 100644 --- a/src/tileatlas.h +++ b/src/tileatlas.h @@ -46,16 +46,17 @@ struct Blit {} }; -typedef std::vector BlitList; +typedef std::vector BlitVec; /* Calculates the minimum atlas size required to hold * a tileset of height 'tilesetH'. If the required dimensions * exceed 'maxAtlasSize', Vec2i(-1, -1) is returned. */ Vec2i minSize(int tilesetH, int maxAtlasSize); -/* Calculates a series of blits necessary to fill dstRows - * with srcRows without wasting any space */ -BlitList calcBlits(int tilesetH, const Vec2i &atlasSize); +/* Calculates a series of blits necessary to fill an atlas + * of size 'atlasSize' with a tileset of height 'tilesetH'. + * Usually fed results from 'minSize()'. */ +BlitVec calcBlits(int tilesetH, const Vec2i &atlasSize); /* Translates a tile coordinate (not pixel!) to a physical * pixel coordinate in the atlas */ diff --git a/src/tilemap.cpp b/src/tilemap.cpp index e6b7fd1..c1bd2b9 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -630,7 +630,7 @@ struct TilemapPrivate for (size_t i = 0; i < atlas.usableATs.size(); ++i) autotiles[atlas.usableATs[i]]->flush(); - TileAtlas::BlitList blits = TileAtlas::calcBlits(atlas.efTilesetH, atlas.size); + TileAtlas::BlitVec blits = TileAtlas::calcBlits(atlas.efTilesetH, atlas.size); /* Clear atlas */ FBO::bind(atlas.gl.fbo, FBO::Draw);