Fixed planet blinking when exiting scan; bug #799

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3394 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-12-05 22:38:37 +00:00
parent e151b933f8
commit 890b844edb
2 changed files with 15 additions and 24 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7:
- Fixed planet blinking when exiting scan (bug #799) - Alex
- Restore menu sounds after editing a control set name (bug #1066) - Alex
- Added 'COLOR' resource type - SvdB
- All graphics operations use 24-bits colors at the game level too now,
+12 -22
View File
@@ -76,33 +76,23 @@ RepairBackRect (RECT *pRect)
static void
EraseCoarseScan (void)
{
RECT r, tr;
const int leftScanWidth = 80;
const int rightScanWidth = 80;
const int leftScanOffset = 5;
const int rightScanOffset = 50;
const int nameEraseWidth = SIS_SCREEN_WIDTH - 2;
RECT oldClipRect;
RECT clipRect;
LockMutex (GraphicsLock);
SetContext (SpaceContext);
// TODO: Give coarse scan an own context
GetContextClipRect (&oldClipRect);
clipRect = oldClipRect;
clipRect.extent.height = SCAN_SCREEN_HEIGHT;
SetContextClipRect (&clipRect);
r.corner.x = (SIS_SCREEN_WIDTH >> 1) - (nameEraseWidth >> 1);
r.corner.y = 13 - 10;
r.extent.width = nameEraseWidth;
r.extent.height = 14;
RepairBackRect (&r);
GetFrameRect (SetAbsFrameIndex (SpaceJunkFrame, 20), &tr);
r = tr;
r.corner.x += leftScanOffset;
r.extent.width = leftScanWidth;
RepairBackRect (&r);
r = tr;
r.corner.x += (r.extent.width - rightScanOffset);
r.extent.width = rightScanWidth;
RepairBackRect (&r);
BatchGraphics ();
DrawStarBackGround ();
DrawDefaultPlanetSphere ();
UnbatchGraphics ();
SetContextClipRect (&oldClipRect);
UnlockMutex (GraphicsLock);
}