|
|
@ -70,7 +70,12 @@ void World::setBordersVisible(bool visible)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mBorderVisible = visible;
|
|
|
|
mBorderVisible = visible;
|
|
|
|
|
|
|
|
|
|
|
|
if (!visible)
|
|
|
|
if (visible)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (std::set<std::pair<int,int>>::iterator it = mLoadedCells.begin(); it != mLoadedCells.end(); ++it)
|
|
|
|
|
|
|
|
mCellBorder->createCellBorderGeometry(it->first,it->second);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
mCellBorder->destroyCellBorderGeometry();
|
|
|
|
mCellBorder->destroyCellBorderGeometry();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -78,12 +83,16 @@ void World::loadCell(int x, int y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mBorderVisible)
|
|
|
|
if (mBorderVisible)
|
|
|
|
mCellBorder->createCellBorderGeometry(x,y);
|
|
|
|
mCellBorder->createCellBorderGeometry(x,y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLoadedCells.insert(std::pair<int,int>(x,y));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void World::unloadCell(int x, int y)
|
|
|
|
void World::unloadCell(int x, int y)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mBorderVisible)
|
|
|
|
if (mBorderVisible)
|
|
|
|
mCellBorder->destroyCellBorderGeometry(x,y);
|
|
|
|
mCellBorder->destroyCellBorderGeometry(x,y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLoadedCells.erase(std::pair<int,int>(x,y));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void World::setTargetFrameRate(float rate)
|
|
|
|
void World::setTargetFrameRate(float rate)
|
|
|
|