From: <av...@us...> - 2007-06-22 22:05:41
|
Revision: 2781 http://sc2.svn.sourceforge.net/sc2/?rev=2781&view=rev Author: avolkov Date: 2007-06-22 15:05:38 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Cleanup: access escort's window location directly Modified Paths: -------------- trunk/sc2/src/sc2code/build.c trunk/sc2/src/sc2code/shipyard.c Modified: trunk/sc2/src/sc2code/build.c =================================================================== --- trunk/sc2/src/sc2code/build.c 2007-06-22 21:29:44 UTC (rev 2780) +++ trunk/sc2/src/sc2code/build.c 2007-06-22 22:05:38 UTC (rev 2781) @@ -274,9 +274,7 @@ StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hOldShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - win_loc = GET_GROUP_LOC (StarShipPtr); + win_loc = StarShipPtr->ShipInfo.var2; UnlockStarShip (&GLOBAL (built_ship_q), hOldShip); if (which_window <= win_loc) break; @@ -284,9 +282,7 @@ StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - SET_GROUP_LOC (StarShipPtr, which_window - 1); + StarShipPtr->ShipInfo.var2 = which_window - 1; UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); InsertQueue (&GLOBAL (built_ship_q), hStarShip, hOldShip); Modified: trunk/sc2/src/sc2code/shipyard.c =================================================================== --- trunk/sc2/src/sc2code/shipyard.c 2007-06-22 21:29:44 UTC (rev 2780) +++ trunk/sc2/src/sc2code/shipyard.c 2007-06-22 22:05:38 UTC (rev 2781) @@ -370,7 +370,7 @@ { StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - if (GET_GROUP_LOC (StarShipPtr) > which_window) + if (StarShipPtr->ShipInfo.var2 > which_window) { UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); break; @@ -385,9 +385,7 @@ hStarShip = hTailShip; StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - SET_GROUP_LOC (StarShipPtr, which_window); + StarShipPtr->ShipInfo.var2 = which_window; UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); } @@ -656,9 +654,7 @@ StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - if (GET_GROUP_LOC (StarShipPtr) == pMS->CurState) + if (StarShipPtr->ShipInfo.var2 == pMS->CurState) { UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |