map draw improvements

This commit is contained in:
Henrique
2011-08-12 01:34:21 -03:00
parent 7cf188a67d
commit 0a268fc7d9
6 changed files with 60 additions and 21 deletions

View File

@@ -47,3 +47,21 @@ void Tile::draw(int x, int y, int z)
(*it)->draw(x, y, z);
}
bool Tile::hasGround()
{
return m_ground != 0;
}
int Tile::getStackSize()
{
int ret = 0;
if(m_ground)
ret++;
ret += m_itemsBot.size();
ret += m_creatures.size();
ret += m_itemsTop.size();
return ret;
}