diff --git a/src/p_setup.cpp b/src/p_setup.cpp index a62f5b5fc..20297ac8b 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2483,10 +2483,10 @@ void P_LoadSideDefs2 (MapData * map) // as possible from its ZDBSP incarnation. // -static unsigned int BlockHash (TArray *block) +static unsigned int BlockHash (TArray *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]; @@ -2494,7 +2494,7 @@ static unsigned int BlockHash (TArray *block) return hash & 0x7fffffff; } -static bool BlockCompare (TArray *block1, TArray *block2) +static bool BlockCompare (TArray *block1, TArray *block2) { size_t size = block1->Size(); @@ -2506,8 +2506,8 @@ static bool BlockCompare (TArray *block1, TArray *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]) @@ -2518,20 +2518,20 @@ static bool BlockCompare (TArray *block1, TArray *block2) return true; } -static void CreatePackedBlockmap (TArray &BlockMap, TArray *blocks, int bmapwidth, int bmapheight) +static void CreatePackedBlockmap (TArray &BlockMap, TArray *blocks, int bmapwidth, int bmapheight) { int buckets[4096]; int *hashes, hashblock; - TArray *block; + TArray *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) @@ -2578,12 +2578,12 @@ static void CreatePackedBlockmap (TArray &BlockMap, TArray *blocks, i static void P_CreateBlockMap () { - TArray *BlockLists, *block, *endblock; - WORD adder; + TArray *BlockLists, *block, *endblock; + int adder; int bmapwidth, bmapheight; int minx, maxx, miny, maxy; int i; - WORD line; + int line; if (numvertexes <= 0) return; @@ -2615,7 +2615,7 @@ static void P_CreateBlockMap () adder = bmapwidth; BlockMap.Push (adder); adder = bmapheight; BlockMap.Push (adder); - BlockLists = new TArray[bmapwidth * bmapheight]; + BlockLists = new TArray[bmapwidth * bmapheight]; for (line = 0; line < numlines; ++line) {