Dead context clipping flag removed

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3403 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-12-08 16:55:56 +00:00
parent a8ea62eeb0
commit 3c63c20371
8 changed files with 2 additions and 36 deletions
-1
View File
@@ -246,7 +246,6 @@ extern Color SetContextBackGroundColor (Color Color);
extern Color GetContextBackGroundColor (void);
extern FRAME SetContextFGFrame (FRAME Frame);
extern FRAME GetContextFGFrame (void);
extern BOOLEAN SetContextClipping (BOOLEAN ClipStatus);
// Context cliprect defines the drawing bounds. Additionally, all
// drawing positions (x,y) are relative to the cliprect corner.
extern BOOLEAN SetContextClipRect (RECT *pRect);
-22
View File
@@ -98,7 +98,6 @@ CreateContextAux (void)
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F));
SetContextBackGroundColor (
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00));
SetContextClipping (TRUE);
SetContext (OldContext);
}
@@ -200,27 +199,6 @@ GetContextBackGroundColor (void)
return _get_context_bg_color ();
}
BOOLEAN
SetContextClipping (BOOLEAN ClipStatus)
{
BOOLEAN oldClipStatus;
if (!ContextActive ())
return (TRUE);
oldClipStatus = (_get_context_flags () & BATCH_CLIP_GRAPHICS) != 0;
if (ClipStatus)
{
SetContextFlags (BATCH_CLIP_GRAPHICS);
}
else
{
UnsetContextFlags (BATCH_CLIP_GRAPHICS);
}
return (oldClipStatus);
}
BOOLEAN
SetContextClipRect (RECT *lpRect)
{
+2
View File
@@ -29,6 +29,8 @@ typedef UWORD FBK_FLAGS;
struct context_desc
{
UWORD Flags;
// Low nibble currently unused
// High nibble contains GRAPHICS_STATUS
Color ForeGroundColor, BackGroundColor;
FRAME ForeGroundFrame;
-2
View File
@@ -110,8 +110,6 @@ DrawBatch (PRIMITIVE *lpBasePrim, PRIM_LINKS PrimLinks,
BatchFlags &= BATCH_SINGLE | BATCH_BUILD_PAGE | BATCH_XFORM;
BatchFlags |= _get_context_flags () & BATCH_CLIP_GRAPHICS;
BatchGraphics ();
if (BatchFlags & BATCH_BUILD_PAGE)
-5
View File
@@ -281,7 +281,6 @@ Present_DrawMovieFrame (PRESENTATION_INPUT_STATE* pPIS)
s.origin.y = 0;
s.frame = SetAbsFrameIndex (pPIS->Frame, pPIS->MovieFrame);
LockMutex (GraphicsLock);
SetContextClipping (TRUE);
DrawStamp (&s);
UnlockMutex (GraphicsLock);
}
@@ -496,7 +495,6 @@ DoPresentation (void *pIS)
t.baseline.y = y;
if (!pPIS->Batched)
LockMutex (GraphicsLock);
SetContextClipping (TRUE);
DrawTextEffect (&t, pPIS->TextColor, pPIS->TextBackColor,
pPIS->TextEffect);
if (!pPIS->Batched)
@@ -542,7 +540,6 @@ DoPresentation (void *pIS)
}
LockMutex (GraphicsLock);
SetContextClipping (TRUE);
for (i = 0; i < pPIS->LinesCount; ++i)
DrawTextEffect (pPIS->TextLines + i, pPIS->TextFadeColor,
pPIS->TextFadeColor, pPIS->TextEffect);
@@ -565,7 +562,6 @@ DoPresentation (void *pIS)
Present_UnbatchGraphics (pPIS, TRUE);
LockMutex (GraphicsLock);
SetContextClipping (TRUE);
/* do transition */
SetTransitionSource (&pPIS->tfade_r);
BatchGraphics ();
@@ -659,7 +655,6 @@ DoPresentation (void *pIS)
LockMutex (GraphicsLock);
old_mode = SetGraphicScaleMode (scale_mode);
old_scale = SetGraphicScale (scale);
SetContextClipping (TRUE);
DrawStamp (&s);
SetGraphicScale (old_scale);
SetGraphicScaleMode (old_mode);
-1
View File
@@ -1486,7 +1486,6 @@ InitPlanetSide (POINT pt)
r.extent.width = SURFACE_WIDTH;
r.extent.height = SURFACE_HEIGHT;
SetContextClipRect (&r);
SetContextClipping (TRUE);
SetTransitionSource (&r);
BatchGraphics ();
-2
View File
@@ -134,7 +134,6 @@ RenderTopography (FRAME DstFrame, BYTE *pTopoData, int w, int h)
OldHot = SetFrameHot (DstFrame, MAKE_HOT_SPOT (0, 0));
GetContextClipRect (&ClipRect);
SetContextClipRect (NULL);
SetContextClipping (FALSE);
pBatch = &BatchArray[0];
for (i = 0; i < NUM_BATCH_POINTS; ++i, ++pBatch)
@@ -201,7 +200,6 @@ RenderTopography (FRAME DstFrame, BYTE *pTopoData, int w, int h)
DrawBatch (BatchArray, i, 0);
}
SetContextClipping (TRUE);
SetContextClipRect (&ClipRect);
SetFrameHot (DstFrame, OldHot);
}
-3
View File
@@ -57,7 +57,6 @@ ClearReportArea (void)
SetContextBackGroundColor (BLACK_COLOR);
ClearDrawable ();
SetContextClipping (FALSE);
SetContextForeGroundColor (
BUILD_COLOR (MAKE_RGB15 (0x00, 0x07, 0x00), 0x57));
@@ -78,8 +77,6 @@ ClearReportArea (void)
s.origin.y += r.extent.height + 1;
}
SetContextClipping (TRUE);
UnbatchGraphics ();
}