From 295ed7d1d681ab809041e7af05fecd158e0c580f Mon Sep 17 00:00:00 2001 From: avolkov Date: Wed, 3 Sep 2003 20:04:37 +0000 Subject: [PATCH] Logistics and formatting corrections; Passing UNDEFINED_DELTA where it is not necessary causes an unwanted redraw. Partially fixes bug #461/2. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1192 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/shipyard.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sc2/src/sc2code/shipyard.c b/sc2/src/sc2code/shipyard.c index 942c8d517..937a6fee7 100644 --- a/sc2/src/sc2code/shipyard.c +++ b/sc2/src/sc2code/shipyard.c @@ -831,7 +831,8 @@ DoModifyShips (PMENU_STATE pMS) RemoveQueue (&GLOBAL (built_ship_q), hStarShip); FreeStarShip (&GLOBAL (built_ship_q), hStarShip); // refresh SIS display - DeltaSISGauges (UNDEFINED_DELTA, UNDEFINED_DELTA, UNDEFINED_DELTA); + DeltaSISGauges (UNDEFINED_DELTA, UNDEFINED_DELTA, + UNDEFINED_DELTA); DrawStatusMessage ((UNICODE *)~0); r.corner.x = pMS->flash_rect0.corner.x; r.corner.y = pMS->flash_rect0.corner.y; @@ -910,8 +911,10 @@ DoModifyShips (PMENU_STATE pMS) if (StarShipPtr->ShipInfo.crew_level > 0) DeltaSISGauges (0, 0, -GLOBAL (CrewCost)); else - DeltaSISGauges (UNDEFINED_DELTA,UNDEFINED_DELTA, - -(COUNT)ShipCost[GET_RACE_ID (StarShipPtr)]); + DeltaSISGauges (0, 0, + -(COUNT)ShipCost[ + GET_RACE_ID (StarShipPtr) + ]); ++StarShipPtr->ShipInfo.crew_level; crew_delta = 1; ShowShipCrew (StarShipPtr, &pMS->flash_rect0); @@ -962,8 +965,10 @@ DoModifyShips (PMENU_STATE pMS) - (crew_bought == CREW_EXPENSE_THRESHOLD ? 2 : 0)); else - DeltaSISGauges (UNDEFINED_DELTA,UNDEFINED_DELTA, - (COUNT)ShipCost[GET_RACE_ID (StarShipPtr)]); + DeltaSISGauges (0, 0, + (COUNT)ShipCost[ + GET_RACE_ID (StarShipPtr) + ]); crew_delta = -1; --StarShipPtr->ShipInfo.crew_level; }