- added support for loading DeepBSP's V4 nodes.
- disabled writing the nodes with the dumpmap command. ZDoom doesn't need the nodes to load a map and this only worked if the original map had standard nodes but trying to write out nodes loaded from any other format would have caused broken data. SVN r2285 (trunk)
This commit is contained in:
parent
64fe29bf0e
commit
da99577cbf
3 changed files with 126 additions and 31 deletions
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
// Some global defines, that configure the game.
|
||||
#include "doomdef.h"
|
||||
#include "m_swap.h"
|
||||
|
||||
//
|
||||
// Map level types.
|
||||
|
|
@ -220,6 +221,13 @@ struct mapsubsector_t
|
|||
WORD firstseg; // index of first one, segs are stored sequentially
|
||||
};
|
||||
|
||||
#pragma pack(1)
|
||||
struct mapsubsector4_t
|
||||
{
|
||||
WORD numsegs;
|
||||
DWORD firstseg; // index of first one, segs are stored sequentially
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
// LineSeg, generated by splitting LineDefs
|
||||
// using partition lines selected by BSP builder.
|
||||
|
|
@ -231,6 +239,22 @@ struct mapseg_t
|
|||
WORD linedef;
|
||||
SWORD side;
|
||||
SWORD offset;
|
||||
|
||||
int V1() { return LittleShort(v1); }
|
||||
int V2() { return LittleShort(v2); }
|
||||
};
|
||||
|
||||
struct mapseg4_t
|
||||
{
|
||||
SDWORD v1;
|
||||
SDWORD v2;
|
||||
SWORD angle;
|
||||
WORD linedef;
|
||||
SWORD side;
|
||||
SWORD offset;
|
||||
|
||||
int V1() { return LittleLong(v1); }
|
||||
int V2() { return LittleLong(v2); }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -238,18 +262,40 @@ struct mapseg_t
|
|||
// BSP node structure.
|
||||
|
||||
// Indicate a leaf.
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
|
||||
struct mapnode_t
|
||||
{
|
||||
enum
|
||||
{
|
||||
NF_SUBSECTOR = 0x8000,
|
||||
NF_LUMPOFFSET = 0
|
||||
};
|
||||
SWORD x,y,dx,dy; // partition line
|
||||
SWORD bbox[2][4]; // bounding box for each child
|
||||
// If NF_SUBSECTOR is or'ed in, it's a subsector,
|
||||
// else it's a node of another subtree.
|
||||
WORD children[2];
|
||||
|
||||
DWORD Child(int num) { return LittleShort(children[num]); }
|
||||
};
|
||||
|
||||
|
||||
struct mapnode4_t
|
||||
{
|
||||
enum
|
||||
{
|
||||
NF_SUBSECTOR = 0x80000000,
|
||||
NF_LUMPOFFSET = 8
|
||||
};
|
||||
SWORD x,y,dx,dy; // partition line
|
||||
SWORD bbox[2][4]; // bounding box for each child
|
||||
// If NF_SUBSECTOR is or'ed in, it's a subsector,
|
||||
// else it's a node of another subtree.
|
||||
DWORD children[2];
|
||||
|
||||
DWORD Child(int num) { return LittleLong(children[num]); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Thing definition, position, orientation and type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue