Silence compiler complaints about memory leaks in tile drawing code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4992 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
c5187c9406
commit
bdb6bf9ef0
|
@ -106,6 +106,7 @@ extern void pie_Draw3DShape(iIMDShape *shape, int frame, int team, PIELIGHT colo
|
|||
extern void pie_DrawImage(PIEIMAGE *image, PIERECT *dest);
|
||||
|
||||
void pie_TerrainInit(int sizex, int sizey);
|
||||
void pie_TerrainCleanup(void);
|
||||
void pie_DrawTerrain(int mapx, int mapy);
|
||||
void pie_DrawTerrainTriangle(int index, const TERRAIN_VERTEX *aVrts);
|
||||
void pie_DrawWaterTriangle(const TERRAIN_VERTEX *aVrts);
|
||||
|
|
|
@ -778,6 +778,25 @@ void pie_TerrainInit(int sizex, int sizey)
|
|||
rowLength = sizex;
|
||||
}
|
||||
|
||||
void pie_TerrainCleanup()
|
||||
{
|
||||
if (aColour)
|
||||
{
|
||||
free(aColour);
|
||||
}
|
||||
if (aTexCoord)
|
||||
{
|
||||
free(aTexCoord);
|
||||
}
|
||||
if (aVertex)
|
||||
{
|
||||
free(aVertex);
|
||||
}
|
||||
aColour = NULL;
|
||||
aTexCoord = NULL;
|
||||
aVertex = NULL;
|
||||
}
|
||||
|
||||
void pie_DrawTerrain(int mapx, int mapy)
|
||||
{
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
|
|
|
@ -487,6 +487,7 @@ void systemShutdown(void)
|
|||
iV_ShutDown();
|
||||
levShutDown();
|
||||
widgShutDown();
|
||||
pie_TerrainCleanup();
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1157,7 +1158,7 @@ BOOL stageThreeShutDown(void)
|
|||
{
|
||||
initPlayerColours(); // reset colours leaving multiplayer game.
|
||||
}
|
||||
|
||||
|
||||
setScriptWinLoseVideo(PLAY_NONE);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue