* Updated to ZDoom r3096:

- Removed obsolete references to 'generated' directory from Wadsrc project. 
- Fixed: The internal blockmap builder still used 16 bit WORDs to reference linedefs so it failed on USMF maps which exceed this value.
- Fixed: Hexen's chess ending should never use the cluster's endtext.
- Make the assembly span drawers compatible with newer NASM's default optimization level.
- Added Chris's second crashcatcher patch.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1161 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2011-01-09 16:52:22 +00:00
parent d2899c014d
commit 05763b39eb
8 changed files with 252 additions and 179 deletions

View file

@ -2524,10 +2524,10 @@ void P_LoadSideDefs2 (MapData * map)
// as possible from its ZDBSP incarnation.
//
static unsigned int BlockHash (TArray<WORD> *block)
static unsigned int BlockHash (TArray<int> *block)
{
int hash = 0;
WORD *ar = &(*block)[0];
int *ar = &(*block)[0];
for (size_t i = 0; i < block->Size(); ++i)
{
hash = hash * 12235 + ar[i];
@ -2535,7 +2535,7 @@ static unsigned int BlockHash (TArray<WORD> *block)
return hash & 0x7fffffff;
}
static bool BlockCompare (TArray<WORD> *block1, TArray<WORD> *block2)
static bool BlockCompare (TArray<int> *block1, TArray<int> *block2)
{
size_t size = block1->Size();
@ -2547,8 +2547,8 @@ static bool BlockCompare (TArray<WORD> *block1, TArray<WORD> *block2)
{
return true;
}
WORD *ar1 = &(*block1)[0];
WORD *ar2 = &(*block2)[0];
int *ar1 = &(*block1)[0];
int *ar2 = &(*block2)[0];
for (size_t i = 0; i < size; ++i)
{
if (ar1[i] != ar2[i])
@ -2559,20 +2559,20 @@ static bool BlockCompare (TArray<WORD> *block1, TArray<WORD> *block2)
return true;
}
static void CreatePackedBlockmap (TArray<int> &BlockMap, TArray<WORD> *blocks, int bmapwidth, int bmapheight)
static void CreatePackedBlockmap (TArray<int> &BlockMap, TArray<int> *blocks, int bmapwidth, int bmapheight)
{
int buckets[4096];
int *hashes, hashblock;
TArray<WORD> *block;
TArray<int> *block;
int zero = 0;
int terminator = -1;
WORD *array;
int *array;
int i, hash;
int hashed = 0, nothashed = 0;
hashes = new int[bmapwidth * bmapheight];
memset (hashes, 0xff, sizeof(WORD)*bmapwidth*bmapheight);
memset (hashes, 0xff, sizeof(int)*bmapwidth*bmapheight);
memset (buckets, 0xff, sizeof(buckets));
for (i = 0; i < bmapwidth * bmapheight; ++i)
@ -2619,12 +2619,12 @@ static void CreatePackedBlockmap (TArray<int> &BlockMap, TArray<WORD> *blocks, i
static void P_CreateBlockMap ()
{
TArray<WORD> *BlockLists, *block, *endblock;
WORD adder;
TArray<int> *BlockLists, *block, *endblock;
int adder;
int bmapwidth, bmapheight;
int minx, maxx, miny, maxy;
int i;
WORD line;
int line;
if (numvertexes <= 0)
return;
@ -2656,7 +2656,7 @@ static void P_CreateBlockMap ()
adder = bmapwidth; BlockMap.Push (adder);
adder = bmapheight; BlockMap.Push (adder);
BlockLists = new TArray<WORD>[bmapwidth * bmapheight];
BlockLists = new TArray<int>[bmapwidth * bmapheight];
for (line = 0; line < numlines; ++line)
{