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:
|
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,
|
||||||
|
|||||||
+12
-22
@@ -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
|
||||||
|
GetContextClipRect (&oldClipRect);
|
||||||
|
clipRect = oldClipRect;
|
||||||
|
clipRect.extent.height = SCAN_SCREEN_HEIGHT;
|
||||||
|
SetContextClipRect (&clipRect);
|
||||||
|
|
||||||
r.corner.x = (SIS_SCREEN_WIDTH >> 1) - (nameEraseWidth >> 1);
|
BatchGraphics ();
|
||||||
r.corner.y = 13 - 10;
|
DrawStarBackGround ();
|
||||||
r.extent.width = nameEraseWidth;
|
DrawDefaultPlanetSphere ();
|
||||||
r.extent.height = 14;
|
UnbatchGraphics ();
|
||||||
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);
|
|
||||||
|
|
||||||
|
SetContextClipRect (&oldClipRect);
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user