Increased the size of the display queue (disp_q)
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2847 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Changes towards version 0.7:
|
||||
- Increased the size of display queue (elements were sometimes missing
|
||||
in e.g. Nemesis vs. Nemesis battles with many marines out) - Alex
|
||||
- ShowPresentation() no longer clears the screen by force; presentations
|
||||
now do this by request - Michael
|
||||
- Added match_matchPatternOnce() - SvdB
|
||||
|
||||
@@ -29,6 +29,10 @@ typedef struct battlestate_struct {
|
||||
} BATTLE_STATE;
|
||||
|
||||
extern QUEUE disp_q;
|
||||
// The maximum number of elements is chosen to provide a slight margin.
|
||||
// Currently, it is maximum *known used* in Melee + 30
|
||||
#define MAX_DISPLAY_ELEMENTS 150
|
||||
|
||||
extern BYTE battle_counter[NUM_SIDES];
|
||||
extern BOOLEAN instantVictory;
|
||||
#ifdef NETPLAY
|
||||
|
||||
@@ -157,7 +157,7 @@ struct element
|
||||
HELEMENT hTarget;
|
||||
};
|
||||
|
||||
#define MAX_DISPLAY_PRIMS 280
|
||||
#define MAX_DISPLAY_PRIMS 330
|
||||
extern COUNT DisplayFreeList;
|
||||
extern PRIMITIVE DisplayArray[MAX_DISPLAY_PRIMS];
|
||||
|
||||
|
||||
@@ -80,6 +80,11 @@ AllocElement (void)
|
||||
LockElement (hElement, &ElementPtr);
|
||||
memset (ElementPtr, 0, sizeof (*ElementPtr));
|
||||
ElementPtr->PrimIndex = AllocDisplayPrim ();
|
||||
if (ElementPtr->PrimIndex == END_OF_LIST)
|
||||
{
|
||||
log_add (log_Error, "AllocElement: Out of display prims!");
|
||||
explode ();
|
||||
}
|
||||
SetPrimType (&DisplayArray[ElementPtr->PrimIndex], NO_PRIM);
|
||||
UnlockElement (hElement);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ InitContexts (void)
|
||||
if (OffScreenContext == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (!InitQueue (&disp_q, 100, sizeof (ELEMENT)))
|
||||
if (!InitQueue (&disp_q, MAX_DISPLAY_ELEMENTS, sizeof (ELEMENT)))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user