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:
@@ -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,
|
||||
|
||||
+14
-24
@@ -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);
|
||||
|
||||
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);
|
||||
|
||||
// TODO: Give coarse scan an own context
|
||||
GetContextClipRect (&oldClipRect);
|
||||
clipRect = oldClipRect;
|
||||
clipRect.extent.height = SCAN_SCREEN_HEIGHT;
|
||||
SetContextClipRect (&clipRect);
|
||||
|
||||
BatchGraphics ();
|
||||
DrawStarBackGround ();
|
||||
DrawDefaultPlanetSphere ();
|
||||
UnbatchGraphics ();
|
||||
|
||||
SetContextClipRect (&oldClipRect);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user