mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
More map loader fixes.
SVN r194 (trunk)
This commit is contained in:
parent
3eb63cf1fa
commit
461f8a796a
2 changed files with 3 additions and 10 deletions
|
@ -3380,13 +3380,7 @@ void P_SetupLevel (char *lumpname, int position)
|
||||||
map->file->Read(mapdata, map->MapLumps[0].Size);
|
map->file->Read(mapdata, map->MapLumps[0].Size);
|
||||||
if (map->Encrypted)
|
if (map->Encrypted)
|
||||||
{
|
{
|
||||||
// Why can't the linker find this function? Ugh.
|
BloodCrypt (mapdata, 0, MIN<int> (map->MapLumps[0].Size, 256));
|
||||||
//BloodCrypt (mapdata, 0, MIN<int> (map->MapLumps[0].Size, 256));
|
|
||||||
int len = MIN<int> (map->MapLumps[0].Size, 256);
|
|
||||||
for (int i = 0; i < len; ++i)
|
|
||||||
{
|
|
||||||
mapdata[i] ^= i >> 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
buildmap = P_LoadBuildMap (mapdata, map->MapLumps[0].Size, &buildthings, &numbuildthings);
|
buildmap = P_LoadBuildMap (mapdata, map->MapLumps[0].Size, &buildthings, &numbuildthings);
|
||||||
delete[] mapdata;
|
delete[] mapdata;
|
||||||
|
@ -3461,14 +3455,14 @@ void P_SetupLevel (char *lumpname, int position)
|
||||||
{
|
{
|
||||||
// Check for compressed nodes first, then uncompressed nodes
|
// Check for compressed nodes first, then uncompressed nodes
|
||||||
FWadLump test;
|
FWadLump test;
|
||||||
DWORD id = MAKE_ID('X','x','X','x'), idcheck;
|
DWORD id = MAKE_ID('X','x','X','x'), idcheck=0;
|
||||||
|
|
||||||
if (map->MapLumps[ML_ZNODES].Size != 0 && !UsingGLNodes)
|
if (map->MapLumps[ML_ZNODES].Size != 0 && !UsingGLNodes)
|
||||||
{
|
{
|
||||||
map->Seek(ML_ZNODES);
|
map->Seek(ML_ZNODES);
|
||||||
idcheck = MAKE_ID('Z','N','O','D');
|
idcheck = MAKE_ID('Z','N','O','D');
|
||||||
}
|
}
|
||||||
else if (map->MapLumps[ML_ZNODES].Size != 0)
|
else if (map->MapLumps[ML_GLZNODES].Size != 0)
|
||||||
{
|
{
|
||||||
// If normal nodes are not present but GL nodes are, use them.
|
// If normal nodes are not present but GL nodes are, use them.
|
||||||
map->Seek(ML_GLZNODES);
|
map->Seek(ML_GLZNODES);
|
||||||
|
|
|
@ -127,7 +127,6 @@ void W_SysWadInit ();
|
||||||
|
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
static void BloodCrypt (void *data, int key, int len);
|
|
||||||
static void PrintLastError ();
|
static void PrintLastError ();
|
||||||
|
|
||||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue