From 6f7ee5236eadfbb74487f86ce1872b2494026de0 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Fri, 2 May 2008 21:10:08 +0000 Subject: [PATCH] Remove unused aMapLinePoints global. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4891 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/game.c | 13 ------------- src/map.c | 5 ----- src/map.h | 3 --- src/mission.c | 4 ---- src/missiondef.h | 1 - 5 files changed, 26 deletions(-) diff --git a/src/game.c b/src/game.c index 3039580a2..3ccba43e5 100644 --- a/src/game.c +++ b/src/game.c @@ -2334,11 +2334,6 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User { // free(psMapTiles); } - if (aMapLinePoints) - { - free(aMapLinePoints); - aMapLinePoints = NULL; - } //clear all the messages? releaseAllProxDisp(); } @@ -2732,7 +2727,6 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User //load the map and the droids then swap pointers // psMapTiles = NULL; -// aMapLinePoints = NULL; //load in the map file aFileName[fileExten] = '\0'; strcat(aFileName, "mission.map"); @@ -2891,7 +2885,6 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User { LOADBARCALLBACK(); // loadingScreenCallback(); psMapTiles = NULL; - aMapLinePoints = NULL; //load in the map file aFileName[fileExten] = '\0'; strcat(aFileName, "game.map"); @@ -3515,13 +3508,7 @@ error: { // free(psMapTiles); } - if (aMapLinePoints) - { - free(aMapLinePoints); - aMapLinePoints = NULL; - } psMapTiles = NULL; - aMapLinePoints = NULL; /*if (!loadFile("blank.map", &pFileData, &fileSize)) { diff --git a/src/map.c b/src/map.c index 109ab4ddc..aeeeecdd7 100644 --- a/src/map.c +++ b/src/map.c @@ -120,9 +120,6 @@ typedef struct _zonemap_save_header { UDWORD mapWidth = 0, mapHeight = 0; MAPTILE *psMapTiles = NULL; -/* The map tiles generated by map calc line */ -TILE_COORD *aMapLinePoints = NULL; - /* Look up table that returns the terrain type of a given tile texture */ UBYTE terrainTypes[MAX_TILE_TEXTURES]; @@ -143,8 +140,6 @@ BOOL mapNew(UDWORD width, UDWORD height) freeAllFeatures(); freeAllFlagPositions(); proj_FreeAllProjectiles(); - free(aMapLinePoints); - aMapLinePoints = NULL; free(psMapTiles); psMapTiles = NULL; initStructLimits(); diff --git a/src/map.h b/src/map.h index b4aaef9ad..0e579fc4e 100644 --- a/src/map.h +++ b/src/map.h @@ -276,9 +276,6 @@ typedef struct _tile_coord MAPTILE *psTile; } TILE_COORD; -/* The map tiles generated by map calc line */ -extern TILE_COORD *aMapLinePoints; - /* Return height of x,y */ extern SWORD map_Height(int x, int y); diff --git a/src/mission.c b/src/mission.c index 4126cacd3..1d29235d2 100644 --- a/src/mission.c +++ b/src/mission.c @@ -327,7 +327,6 @@ BOOL missionShutDown(void) } psMapTiles = mission.psMapTiles; - aMapLinePoints = mission.aMapLinePoints; mapWidth = mission.mapWidth; mapHeight = mission.mapHeight; psGateways = mission.psGateways; @@ -727,7 +726,6 @@ void saveMissionData(void) //save the mission data mission.psMapTiles = psMapTiles; - mission.aMapLinePoints = aMapLinePoints; mission.mapWidth = mapWidth; mission.mapHeight = mapHeight; mission.scrollMinX = scrollMinX; @@ -900,7 +898,6 @@ void restoreMissionData(void) psMapTiles = mission.psMapTiles; - aMapLinePoints = mission.aMapLinePoints; mapWidth = mission.mapWidth; mapHeight = mission.mapHeight; scrollMinX = mission.scrollMinX; @@ -910,7 +907,6 @@ void restoreMissionData(void) psGateways = mission.psGateways; //and clear the mission pointers mission.psMapTiles = NULL; - mission.aMapLinePoints = NULL; mission.mapWidth = 0; mission.mapHeight = 0; mission.scrollMinX = 0; diff --git a/src/missiondef.h b/src/missiondef.h index 55b0732f4..e52864330 100644 --- a/src/missiondef.h +++ b/src/missiondef.h @@ -46,7 +46,6 @@ typedef struct _mission //MISSION_TYPE type; //defines which start and end functions to use UDWORD type; //defines which start and end functions to use - see levels_type in levels.h MAPTILE *psMapTiles; //the original mapTiles - TILE_COORD *aMapLinePoints; //the original mapLinePoints UDWORD mapWidth; //the original mapWidth UDWORD mapHeight; //the original mapHeight struct _gateway *psGateways; //the gateway list