Commit e9ae5e34 authored by Alexey Hohlov's avatar Alexey Hohlov
Browse files

Очистка текстур ландшафта

parent 6a44346c
......@@ -15,7 +15,7 @@ CMap::CMap()
{
CFabric& fabric = CFabric::GetFabric();
grounds = new Texture[16];
grounds = new Texture[16]();
grounds[0] = LoadSpr("gamedata/textures/grounds/ground.tga");
grounds[1] = LoadSpr("gamedata/textures/grounds/grass.tga");
......@@ -459,5 +459,11 @@ CMap::~CMap()
}
for (i = 0; i < 16; i++) {
if (grounds[i].imageData) {
glDeleteTextures(1, &grounds[i].texID);
free(grounds[i].imageData);
}
}
delete [] grounds;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment