From a1e289f5fa3c60d47356949de4de497fffa35f9e Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Thu, 19 Jan 2023 12:32:28 +0100 Subject: [PATCH] Export plane type field, to allow optimizations for axis-aligned planes --- main.cpp | 3 ++- ps1bsp.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index c34657d..5a76030 100644 --- a/main.cpp +++ b/main.cpp @@ -411,7 +411,8 @@ int process_faces(const world_t* world) ps1bsp_plane_t outPlane = { 0 }; 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); } diff --git a/ps1bsp.h b/ps1bsp.h index f840c67..cf54dfa 100644 --- a/ps1bsp.h +++ b/ps1bsp.h @@ -85,7 +85,8 @@ typedef struct typedef struct { SVECTOR normal; - int dist; + short dist; + short type; } ps1bsp_plane_t; typedef struct