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: 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 - Restore menu sounds after editing a control set name (bug #1066) - Alex
- Added 'COLOR' resource type - SvdB - Added 'COLOR' resource type - SvdB
- All graphics operations use 24-bits colors at the game level too now, - All graphics operations use 24-bits colors at the game level too now,
+14 -24
View File
@@ -76,33 +76,23 @@ RepairBackRect (RECT *pRect)
static void static void
EraseCoarseScan (void) EraseCoarseScan (void)
{ {
RECT r, tr; RECT oldClipRect;
const int leftScanWidth = 80; RECT clipRect;
const int rightScanWidth = 80;
const int leftScanOffset = 5;
const int rightScanOffset = 50;
const int nameEraseWidth = SIS_SCREEN_WIDTH - 2;
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
SetContext (SpaceContext); SetContext (SpaceContext);
// TODO: Give coarse scan an own context
r.corner.x = (SIS_SCREEN_WIDTH >> 1) - (nameEraseWidth >> 1); GetContextClipRect (&oldClipRect);
r.corner.y = 13 - 10; clipRect = oldClipRect;
r.extent.width = nameEraseWidth; clipRect.extent.height = SCAN_SCREEN_HEIGHT;
r.extent.height = 14; SetContextClipRect (&clipRect);
RepairBackRect (&r);
BatchGraphics ();
GetFrameRect (SetAbsFrameIndex (SpaceJunkFrame, 20), &tr); DrawStarBackGround ();
r = tr; DrawDefaultPlanetSphere ();
r.corner.x += leftScanOffset; UnbatchGraphics ();
r.extent.width = leftScanWidth;
RepairBackRect (&r); SetContextClipRect (&oldClipRect);
r = tr;
r.corner.x += (r.extent.width - rightScanOffset);
r.extent.width = rightScanWidth;
RepairBackRect (&r);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
} }