Some cleanups to planet stuff, from PhracturedBlue

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@323 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2002-12-04 18:41:22 +00:00
parent 0eb4f889fd
commit 596876279e
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -532,6 +532,7 @@ RotatePlanet (int x, int da, int dx, int dy, int zoom)
COUNT frameh,this_scale;
if(pSolarSysState->ScaleFrame[i]) {
DestroyDrawable (ReleaseDrawable (pSolarSysState->ScaleFrame[i]));
pSolarSysState->ScaleFrame[i]=0;
}
frameh=GetFrameHeight(pFrame[i]);
this_scale=frameh*scale_amt/MAP_HEIGHT;
+4 -3
View File
@@ -216,6 +216,8 @@ FreePlanet (void)
for(i=0;i<255;i++) {
DestroyDrawable (ReleaseDrawable (pSolarSysState->PlanetFrameArray[i]));
}
free(pSolarSysState->PlanetFrameArray);
free(pSolarSysState->isPFADefined);
for(i=0;i<2;i++) {
if(pSolarSysState->ScaleFrame[i]) {
DestroyDrawable (ReleaseDrawable (pSolarSysState->ScaleFrame[i]));
@@ -226,14 +228,13 @@ FreePlanet (void)
DestroyDrawable (ReleaseDrawable (pSolarSysState->ShieldFrame));
pSolarSysState->ShieldFrame=0;
}
if(pSolarSysState->lpTopoMap!=NULL) {
if(pSolarSysState->lpTopoMap!=0) {
for(i=0;pSolarSysState->lpTopoMap[i]!=NULL;i++) {
free(pSolarSysState->lpTopoMap[i]);
}
free(pSolarSysState->lpTopoMap);
pSolarSysState->lpTopoMap=0;
}
free(pSolarSysState->PlanetFrameArray);
free(pSolarSysState->isPFADefined);
DestroyContext (ReleaseContext (TaskContext));
TaskContext = 0;