Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unused cluster iteration code.

  • Loading branch information...
commit a5e137adceace55fe04f85c86178581d373fa15d 1 parent 344abd2
@perim perim authored
View
55 src/cluster.cpp
@@ -408,61 +408,6 @@ SDWORD clustGetClusterID(BASE_OBJECT *psObj)
}
-// variables for the cluster iteration
-static SDWORD iterateClusterID;
-static BASE_OBJECT *psIterateList, *psIterateObj;
-
-// initialise iterating a cluster
-void clustInitIterate(SDWORD clusterID)
-{
- SDWORD player, cluster;
-
- iterateClusterID = clusterID;
- cluster = aClusterMap[clusterID];
- player = aClusterInfo[cluster] & CLUSTER_PLAYER_MASK;
-
- if (aClusterInfo[cluster] & CLUSTER_DROID)
- {
- psIterateList = (BASE_OBJECT *)apsDroidLists[player];
- }
- else // if (aClusterInfo[cluster] & CLUSTER_STRUCTURE)
- {
- psIterateList = (BASE_OBJECT *)apsStructLists[player];
- }
-
- psIterateObj = NULL;
-}
-
-// iterate a cluster
-BASE_OBJECT *clustIterate(void)
-{
- BASE_OBJECT *psStart;
- SDWORD cluster;
-
- cluster = aClusterMap[iterateClusterID];
-
- if (psIterateObj == NULL)
- {
- psStart = psIterateList;
- }
- else
- {
- psStart = psIterateObj->psNext;
- }
-
- for(psIterateObj=psStart;
- psIterateObj && psIterateObj->cluster != cluster;
- psIterateObj = psIterateObj->psNext)
- ;
-
- if (psIterateObj == NULL)
- {
- psIterateList = NULL;
- }
-
- return psIterateObj;
-}
-
// tell the cluster system that an objects visibility has changed
void clustObjectSeen(BASE_OBJECT *psObj, BASE_OBJECT *psViewer)
{
View
6 src/cluster.h
@@ -71,12 +71,6 @@ void clustObjectAttacked(BASE_OBJECT *psObj);
// get the cluster ID for an object
SDWORD clustGetClusterID(BASE_OBJECT *psObj);
-// initialise iterating a cluster
-void clustInitIterate(SDWORD clusterID);
-
-// iterate a cluster
-BASE_OBJECT *clustIterate(void);
-
// reset the visibility for all clusters for a particular player
void clustResetVisibility(SDWORD player);
View
33 src/scriptai.cpp
@@ -318,39 +318,6 @@ bool scrIterateGroup(void)
}
-// initialise iterating a cluster
-bool scrInitIterateCluster(void)
-{
- SDWORD clusterID;
-
- if (!stackPopParams(1, VAL_INT, &clusterID))
- {
- return false;
- }
-
- clustInitIterate(clusterID);
-
- return true;
-}
-
-
-// iterate a cluster
-bool scrIterateCluster(void)
-{
- BASE_OBJECT *psObj;
-
- psObj = clustIterate();
-
- scrFunctionResult.v.oval = psObj;
- if (!stackPushResult((INTERP_TYPE)ST_BASEOBJECT, &scrFunctionResult))
- {
- return false;
- }
-
- return true;
-}
-
-
// remove a droid from a group
bool scrDroidLeaveGroup(void)
{
View
8 src/scripttabs.cpp
@@ -681,14 +681,6 @@ FUNC_SYMBOL asFuncTable[] =
3, { (INTERP_TYPE)ST_GROUP, VAL_INT, VAL_INT },
0, 0, NULL, 0, 0, NULL, NULL },
- { "initIterateCluster", scrInitIterateCluster, VAL_VOID,
- 1, { VAL_INT },
- 0, 0, NULL, 0, 0, NULL, NULL },
-
- { "iterateCluster", scrIterateCluster, (INTERP_TYPE)ST_BASEOBJECT,
- 0, { VAL_VOID },
- 0, 0, NULL, 0, 0, NULL, NULL },
-
//Commander functions
{ "cmdDroidAddDroid", scrCmdDroidAddDroid, VAL_VOID,
2, { (INTERP_TYPE)ST_DROID, (INTERP_TYPE)ST_DROID },
Please sign in to comment.
Something went wrong with that request. Please try again.