orderGroupObj and orderGroupLoc in group.h replaced by an overload of orderGroup.

master
littlepig 2011-01-15 14:42:59 +00:00
parent 268574f8c0
commit 6617500593
3 changed files with 13 additions and 17 deletions

View File

@ -265,7 +265,7 @@ void grpReset(DROID_GROUP *psGroup)
}
}
/* Give a group an order */
// Give a group of droids an order
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order)
{
DROID *psCurr;
@ -280,15 +280,15 @@ void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order)
}
}
/* Give a group of droids an order */
void orderGroupLoc(DROID_GROUP *psGroup, DROID_ORDER order, UDWORD x, UDWORD y)
// Give a group of droids an order (using a Location)
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order, UDWORD x, UDWORD y)
{
DROID *psCurr;
ASSERT(grpInitialized, "Group code not initialized yet");
ASSERT_OR_RETURN(, psGroup != NULL,
"orderGroupLoc: invalid droid group" );
ASSERT_OR_RETURN(, validOrderForLoc(order), "orderGroupLoc: Bad order");
ASSERT_OR_RETURN(, validOrderForLoc(order), "orderGroup: Bad order");
for (psCurr = psGroup->psList; psCurr != NULL; psCurr = psCurr->psGrpNext)
{
@ -296,14 +296,14 @@ void orderGroupLoc(DROID_GROUP *psGroup, DROID_ORDER order, UDWORD x, UDWORD y)
}
}
/* Give a group of droids an order */
void orderGroupObj(DROID_GROUP *psGroup, DROID_ORDER order, BASE_OBJECT *psObj)
// Give a group of droids an order (using an Object)
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order, BASE_OBJECT *psObj)
{
DROID *psCurr;
ASSERT_OR_RETURN(, psGroup != NULL,
"orderGroupObj: invalid droid group" );
ASSERT_OR_RETURN(, validOrderForObj(order), "orderGroupObj: Bad order");
"orderGroup: invalid droid group" );
ASSERT_OR_RETURN(, validOrderForObj(order), "orderGroup: Bad order");
for (psCurr = psGroup->psList; psCurr != NULL; psCurr = psCurr->psGrpNext)
{

View File

@ -64,14 +64,10 @@ unsigned int grpNumMembers(const DROID_GROUP* psGroup);
// remove all droids from a group
void grpReset(DROID_GROUP *psGroup);
/* Give a group an order */
// Give a group of droids an order
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order);
/* Give a group of droids an order */
void orderGroupLoc(DROID_GROUP *psGroup, DROID_ORDER order, UDWORD x, UDWORD y);
/* Give a group of droids an order */
void orderGroupObj(DROID_GROUP *psGroup, DROID_ORDER order, BASE_OBJECT *psObj);
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order, UDWORD x, UDWORD y);
void orderGroup(DROID_GROUP *psGroup, DROID_ORDER order, BASE_OBJECT *psObj);
/* set the secondary state for a group of droids */
void grpSetSecondary(DROID_GROUP *psGroup, SECONDARY_ORDER sec, SECONDARY_STATE state);

View File

@ -438,7 +438,7 @@ BOOL scrOrderGroupLoc(void)
debug(LOG_NEVER, "group %p (%u) order %d (%d,%d)",
psGroup, grpNumMembers(psGroup), order, x,y);
orderGroupLoc(psGroup, order, (UDWORD)x,(UDWORD)y);
orderGroup(psGroup, order, (UDWORD)x,(UDWORD)y);
return true;
}
@ -478,7 +478,7 @@ BOOL scrOrderGroupObj(void)
debug(LOG_NEVER, "group %p (%u) order %d, obj type %d player %d id %d",
psGroup, grpNumMembers(psGroup), order, psObj->type, psObj->player, psObj->id);
orderGroupObj(psGroup, order, psObj);
orderGroup(psGroup, order, psObj);
return true;
}