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:
@@ -246,7 +246,6 @@ extern Color SetContextBackGroundColor (Color Color);
|
|||||||
extern Color GetContextBackGroundColor (void);
|
extern Color GetContextBackGroundColor (void);
|
||||||
extern FRAME SetContextFGFrame (FRAME Frame);
|
extern FRAME SetContextFGFrame (FRAME Frame);
|
||||||
extern FRAME GetContextFGFrame (void);
|
extern FRAME GetContextFGFrame (void);
|
||||||
extern BOOLEAN SetContextClipping (BOOLEAN ClipStatus);
|
|
||||||
// Context cliprect defines the drawing bounds. Additionally, all
|
// Context cliprect defines the drawing bounds. Additionally, all
|
||||||
// drawing positions (x,y) are relative to the cliprect corner.
|
// drawing positions (x,y) are relative to the cliprect corner.
|
||||||
extern BOOLEAN SetContextClipRect (RECT *pRect);
|
extern BOOLEAN SetContextClipRect (RECT *pRect);
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ CreateContextAux (void)
|
|||||||
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F));
|
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F));
|
||||||
SetContextBackGroundColor (
|
SetContextBackGroundColor (
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00));
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00));
|
||||||
SetContextClipping (TRUE);
|
|
||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,27 +199,6 @@ GetContextBackGroundColor (void)
|
|||||||
return _get_context_bg_color ();
|
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
|
BOOLEAN
|
||||||
SetContextClipRect (RECT *lpRect)
|
SetContextClipRect (RECT *lpRect)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ typedef UWORD FBK_FLAGS;
|
|||||||
struct context_desc
|
struct context_desc
|
||||||
{
|
{
|
||||||
UWORD Flags;
|
UWORD Flags;
|
||||||
|
// Low nibble currently unused
|
||||||
|
// High nibble contains GRAPHICS_STATUS
|
||||||
|
|
||||||
Color ForeGroundColor, BackGroundColor;
|
Color ForeGroundColor, BackGroundColor;
|
||||||
FRAME ForeGroundFrame;
|
FRAME ForeGroundFrame;
|
||||||
|
|||||||
@@ -110,8 +110,6 @@ DrawBatch (PRIMITIVE *lpBasePrim, PRIM_LINKS PrimLinks,
|
|||||||
|
|
||||||
BatchFlags &= BATCH_SINGLE | BATCH_BUILD_PAGE | BATCH_XFORM;
|
BatchFlags &= BATCH_SINGLE | BATCH_BUILD_PAGE | BATCH_XFORM;
|
||||||
|
|
||||||
BatchFlags |= _get_context_flags () & BATCH_CLIP_GRAPHICS;
|
|
||||||
|
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|
||||||
if (BatchFlags & BATCH_BUILD_PAGE)
|
if (BatchFlags & BATCH_BUILD_PAGE)
|
||||||
|
|||||||
@@ -281,7 +281,6 @@ Present_DrawMovieFrame (PRESENTATION_INPUT_STATE* pPIS)
|
|||||||
s.origin.y = 0;
|
s.origin.y = 0;
|
||||||
s.frame = SetAbsFrameIndex (pPIS->Frame, pPIS->MovieFrame);
|
s.frame = SetAbsFrameIndex (pPIS->Frame, pPIS->MovieFrame);
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
}
|
}
|
||||||
@@ -496,7 +495,6 @@ DoPresentation (void *pIS)
|
|||||||
t.baseline.y = y;
|
t.baseline.y = y;
|
||||||
if (!pPIS->Batched)
|
if (!pPIS->Batched)
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
DrawTextEffect (&t, pPIS->TextColor, pPIS->TextBackColor,
|
DrawTextEffect (&t, pPIS->TextColor, pPIS->TextBackColor,
|
||||||
pPIS->TextEffect);
|
pPIS->TextEffect);
|
||||||
if (!pPIS->Batched)
|
if (!pPIS->Batched)
|
||||||
@@ -542,7 +540,6 @@ DoPresentation (void *pIS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
for (i = 0; i < pPIS->LinesCount; ++i)
|
for (i = 0; i < pPIS->LinesCount; ++i)
|
||||||
DrawTextEffect (pPIS->TextLines + i, pPIS->TextFadeColor,
|
DrawTextEffect (pPIS->TextLines + i, pPIS->TextFadeColor,
|
||||||
pPIS->TextFadeColor, pPIS->TextEffect);
|
pPIS->TextFadeColor, pPIS->TextEffect);
|
||||||
@@ -565,7 +562,6 @@ DoPresentation (void *pIS)
|
|||||||
Present_UnbatchGraphics (pPIS, TRUE);
|
Present_UnbatchGraphics (pPIS, TRUE);
|
||||||
|
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
/* do transition */
|
/* do transition */
|
||||||
SetTransitionSource (&pPIS->tfade_r);
|
SetTransitionSource (&pPIS->tfade_r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
@@ -659,7 +655,6 @@ DoPresentation (void *pIS)
|
|||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
old_mode = SetGraphicScaleMode (scale_mode);
|
old_mode = SetGraphicScaleMode (scale_mode);
|
||||||
old_scale = SetGraphicScale (scale);
|
old_scale = SetGraphicScale (scale);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
SetGraphicScale (old_scale);
|
SetGraphicScale (old_scale);
|
||||||
SetGraphicScaleMode (old_mode);
|
SetGraphicScaleMode (old_mode);
|
||||||
|
|||||||
@@ -1486,7 +1486,6 @@ InitPlanetSide (POINT pt)
|
|||||||
r.extent.width = SURFACE_WIDTH;
|
r.extent.width = SURFACE_WIDTH;
|
||||||
r.extent.height = SURFACE_HEIGHT;
|
r.extent.height = SURFACE_HEIGHT;
|
||||||
SetContextClipRect (&r);
|
SetContextClipRect (&r);
|
||||||
SetContextClipping (TRUE);
|
|
||||||
|
|
||||||
SetTransitionSource (&r);
|
SetTransitionSource (&r);
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ RenderTopography (FRAME DstFrame, BYTE *pTopoData, int w, int h)
|
|||||||
OldHot = SetFrameHot (DstFrame, MAKE_HOT_SPOT (0, 0));
|
OldHot = SetFrameHot (DstFrame, MAKE_HOT_SPOT (0, 0));
|
||||||
GetContextClipRect (&ClipRect);
|
GetContextClipRect (&ClipRect);
|
||||||
SetContextClipRect (NULL);
|
SetContextClipRect (NULL);
|
||||||
SetContextClipping (FALSE);
|
|
||||||
|
|
||||||
pBatch = &BatchArray[0];
|
pBatch = &BatchArray[0];
|
||||||
for (i = 0; i < NUM_BATCH_POINTS; ++i, ++pBatch)
|
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);
|
DrawBatch (BatchArray, i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetContextClipping (TRUE);
|
|
||||||
SetContextClipRect (&ClipRect);
|
SetContextClipRect (&ClipRect);
|
||||||
SetFrameHot (DstFrame, OldHot);
|
SetFrameHot (DstFrame, OldHot);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ ClearReportArea (void)
|
|||||||
|
|
||||||
SetContextBackGroundColor (BLACK_COLOR);
|
SetContextBackGroundColor (BLACK_COLOR);
|
||||||
ClearDrawable ();
|
ClearDrawable ();
|
||||||
SetContextClipping (FALSE);
|
|
||||||
SetContextForeGroundColor (
|
SetContextForeGroundColor (
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x00, 0x07, 0x00), 0x57));
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x07, 0x00), 0x57));
|
||||||
|
|
||||||
@@ -78,8 +77,6 @@ ClearReportArea (void)
|
|||||||
s.origin.y += r.extent.height + 1;
|
s.origin.y += r.extent.height + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetContextClipping (TRUE);
|
|
||||||
|
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user