From 2e3dfee3cdffaead07c915345f7f8856fa5ef85f Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 8 Dec 2009 17:01:38 +0000 Subject: [PATCH] Dead batching flags removed git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3404 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/libs/gfxlib.h | 3 +-- sc2/src/libs/graphics/context.h | 11 ----------- sc2/src/libs/graphics/frame.c | 19 ------------------- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/sc2/src/libs/gfxlib.h b/sc2/src/libs/gfxlib.h index 9ec004ade..1970fbafe 100644 --- a/sc2/src/libs/gfxlib.h +++ b/sc2/src/libs/gfxlib.h @@ -195,9 +195,8 @@ typedef STRINGPTR COLORMAPPTR; #include "graphics/prim.h" typedef BYTE BATCH_FLAGS; - +// This flag is currently unused but it might make sense to restore it #define BATCH_BUILD_PAGE (BATCH_FLAGS)(1 << 0) -#define BATCH_SINGLE (BATCH_FLAGS)(1 << 1) typedef struct { diff --git a/sc2/src/libs/graphics/context.h b/sc2/src/libs/graphics/context.h index 700e07ad2..6a61777bb 100644 --- a/sc2/src/libs/graphics/context.h +++ b/sc2/src/libs/graphics/context.h @@ -110,17 +110,6 @@ extern PRIMITIVE _locPrim; SetContextFBkFlags (FBK_DIRTY); \ } -/* -These seem to have been moved to gfxlib.h, but not in their -entirety. That's rather unpleasant. -- Michael - -#define BATCH_BUILD_PAGE (BATCH_FLAGS)(1 << 0) -#define BATCH_SINGLE (BATCH_FLAGS)(1 << 1) -#define BATCH_UPDATE_DRAWABLE (BATCH_FLAGS)(1 << 2) -*/ -#define BATCH_CLIP_GRAPHICS (BATCH_FLAGS)(1 << 3) -#define BATCH_XFORM (BATCH_FLAGS)(1 << 4) - typedef BYTE GRAPHICS_STATUS; extern GRAPHICS_STATUS _GraphicsStatusFlags; diff --git a/sc2/src/libs/graphics/frame.c b/sc2/src/libs/graphics/frame.c index 0cc47e5ee..8b06a75b2 100644 --- a/sc2/src/libs/graphics/frame.c +++ b/sc2/src/libs/graphics/frame.c @@ -108,8 +108,6 @@ DrawBatch (PRIMITIVE *lpBasePrim, PRIM_LINKS PrimLinks, PRIM_LINKS OldLinks; PRIMITIVE *lpPrim; - BatchFlags &= BATCH_SINGLE | BATCH_BUILD_PAGE | BATCH_XFORM; - BatchGraphics (); if (BatchFlags & BATCH_BUILD_PAGE) @@ -119,19 +117,6 @@ DrawBatch (PRIMITIVE *lpBasePrim, PRIM_LINKS PrimLinks, CurIndex = GetPredLink (PrimLinks); - if (BatchFlags & BATCH_SINGLE) - { - if (CurIndex == END_OF_LIST) - BatchFlags &= ~BATCH_SINGLE; - else - { - lpBasePrim += CurIndex; - OldLinks = GetPrimLinks (lpBasePrim); - SetPrimLinks (lpBasePrim, END_OF_LIST, END_OF_LIST); - CurIndex = 0; - } - } - for (; CurIndex != END_OF_LIST; CurIndex = GetSuccLink (GetPrimLinks (lpPrim))) { @@ -183,10 +168,6 @@ DrawBatch (PRIMITIVE *lpBasePrim, PRIM_LINKS PrimLinks, } UnbatchGraphics (); - - if (BatchFlags & BATCH_SINGLE) - SetPrimLinks (lpBasePrim, - GetPredLink (OldLinks), GetSuccLink (OldLinks)); } }