Browse Source

Export plane type field, to allow optimizations for axis-aligned planes

master
Nico de Poel 3 years ago
parent
commit
a1e289f5fa
  1. 3
      main.cpp
  2. 3
      ps1bsp.h

3
main.cpp

@ -411,7 +411,8 @@ int process_faces(const world_t* world)
ps1bsp_plane_t outPlane = { 0 }; ps1bsp_plane_t outPlane = { 0 };
outPlane.normal = convertNormal(plane->normal); outPlane.normal = convertNormal(plane->normal);
outPlane.dist = (int)(plane->dist * 4);
outPlane.dist = (short)(plane->dist * 4);
outPlane.type = (short)plane->type;
outPlanes.push_back(outPlane); outPlanes.push_back(outPlane);
} }

3
ps1bsp.h

@ -85,7 +85,8 @@ typedef struct
typedef struct typedef struct
{ {
SVECTOR normal; SVECTOR normal;
int dist;
short dist;
short type;
} ps1bsp_plane_t; } ps1bsp_plane_t;
typedef struct typedef struct

Loading…
Cancel
Save