mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 03:00:47 +00:00
* Updated to ZDoom 3982:
- Fixed: The map loader did not check for the new node formats. - Added support for loading ZGL3/XGL3 nodes. - Added additional debug spew for the nodebuilder. - Restored the nodebuilder's debug spew that was present in ZDBSP but not the internal version. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1483 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
0c7216007d
commit
f433b6edfc
9 changed files with 94 additions and 25 deletions
|
@ -892,7 +892,7 @@ void P_LoadGLZSegs (FileReaderBase &data, int type)
|
|||
BYTE side;
|
||||
|
||||
data >> v1 >> partner;
|
||||
if (type == 2)
|
||||
if (type >= 2)
|
||||
{
|
||||
data >> line;
|
||||
}
|
||||
|
@ -1045,13 +1045,20 @@ void LoadZNodes(FileReaderBase &data, int glnodes)
|
|||
|
||||
for (i = 0; i < numNodes; ++i)
|
||||
{
|
||||
SWORD x, y, dx, dy;
|
||||
if (glnodes < 3)
|
||||
{
|
||||
SWORD x, y, dx, dy;
|
||||
|
||||
data >> x >> y >> dx >> dy;
|
||||
nodes[i].x = x << FRACBITS;
|
||||
nodes[i].y = y << FRACBITS;
|
||||
nodes[i].dx = dx << FRACBITS;
|
||||
nodes[i].dy = dy << FRACBITS;
|
||||
data >> x >> y >> dx >> dy;
|
||||
nodes[i].x = x << FRACBITS;
|
||||
nodes[i].y = y << FRACBITS;
|
||||
nodes[i].dx = dx << FRACBITS;
|
||||
nodes[i].dy = dy << FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
data >> nodes[i].x >> nodes[i].y >> nodes[i].dx >> nodes[i].dy;
|
||||
}
|
||||
for (int j = 0; j < 2; ++j)
|
||||
{
|
||||
for (int k = 0; k < 4; ++k)
|
||||
|
@ -1100,6 +1107,11 @@ void P_LoadZNodes (FileReader &dalump, DWORD id)
|
|||
compressed = true;
|
||||
break;
|
||||
|
||||
case MAKE_ID('Z','G','L','3'):
|
||||
type = 3;
|
||||
compressed = true;
|
||||
break;
|
||||
|
||||
case MAKE_ID('X','N','O','D'):
|
||||
type = 0;
|
||||
compressed = false;
|
||||
|
@ -1115,6 +1127,11 @@ void P_LoadZNodes (FileReader &dalump, DWORD id)
|
|||
compressed = false;
|
||||
break;
|
||||
|
||||
case MAKE_ID('X','G','L','3'):
|
||||
type = 3;
|
||||
compressed = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -3680,7 +3697,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
{
|
||||
// Check for compressed nodes first, then uncompressed nodes
|
||||
FWadLump test;
|
||||
DWORD id = MAKE_ID('X','x','X','x'), idcheck = 0, idcheck2 = 0, idcheck3 = 0, idcheck4 = 0;
|
||||
DWORD id = MAKE_ID('X','x','X','x'), idcheck = 0, idcheck2 = 0, idcheck3 = 0, idcheck4 = 0, idcheck5 = 0, idcheck6 = 0;
|
||||
|
||||
if (map->Size(ML_ZNODES) != 0)
|
||||
{
|
||||
|
@ -3694,12 +3711,14 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
map->Seek(ML_GLZNODES);
|
||||
idcheck = MAKE_ID('Z','G','L','N');
|
||||
idcheck2 = MAKE_ID('Z','G','L','2');
|
||||
idcheck3 = MAKE_ID('X','G','L','N');
|
||||
idcheck4 = MAKE_ID('X','G','L','2');
|
||||
idcheck3 = MAKE_ID('Z','G','L','3');
|
||||
idcheck4 = MAKE_ID('X','G','L','N');
|
||||
idcheck5 = MAKE_ID('X','G','L','2');
|
||||
idcheck6 = MAKE_ID('X','G','L','3');
|
||||
}
|
||||
|
||||
map->file->Read (&id, 4);
|
||||
if (id != 0 && (id == idcheck || id == idcheck2 || id == idcheck3 || id == idcheck4))
|
||||
if (id != 0 && (id == idcheck || id == idcheck2 || id == idcheck3 || id == idcheck4 || id == idcheck5 || id == idcheck6))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue