Added activateAllShips().
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2148 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -65,10 +65,11 @@ debugKeyPressed (void)
|
||||
equipShip ();
|
||||
instantMove = !instantMove;
|
||||
showSpheres ();
|
||||
activateAllShips ();
|
||||
// forwardToNextEvent (TRUE);
|
||||
|
||||
// Tests
|
||||
//Scale_PerfTest ();
|
||||
// Scale_PerfTest ();
|
||||
|
||||
// Informational:
|
||||
// dumpEvents (stderr);
|
||||
@@ -353,6 +354,33 @@ showSpheres (void)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
activateAllShips (void)
|
||||
{
|
||||
HSTARSHIP hStarShip, hNextShip;
|
||||
|
||||
for (hStarShip = GetHeadLink (&GLOBAL (avail_race_q));
|
||||
hStarShip != NULL; hStarShip = hNextShip)
|
||||
{
|
||||
EXTENDED_SHIP_FRAGMENTPTR StarShipPtr;
|
||||
|
||||
StarShipPtr = (EXTENDED_SHIP_FRAGMENTPTR) LockStarShip (
|
||||
&GLOBAL (avail_race_q), hStarShip);
|
||||
hNextShip = _GetSuccLink (StarShipPtr);
|
||||
|
||||
if (StarShipPtr->ShipInfo.icons != NULL)
|
||||
// Skip the Ur-Quan probe.
|
||||
{
|
||||
StarShipPtr->ShipInfo.ship_flags &= ~(GOOD_GUY | BAD_GUY);
|
||||
StarShipPtr->ShipInfo.ship_flags |= GOOD_GUY;
|
||||
}
|
||||
|
||||
UnlockStarShip (&GLOBAL (avail_race_q), hStarShip);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
forAllStars (void (*callback) (STAR_DESC *, void *), void *arg)
|
||||
{
|
||||
|
||||
@@ -52,6 +52,8 @@ void equipShip (void);
|
||||
// Show all active spheres of influence.
|
||||
void showSpheres (void);
|
||||
|
||||
// Make the ships of all races available for building at the shipyard.
|
||||
void activateAllShips (void);
|
||||
|
||||
// Call a function for all stars.
|
||||
void forAllStars (void (*callback) (STAR_DESC *, void *), void *arg);
|
||||
|
||||
Reference in New Issue
Block a user