From a950d2fcb78a0ab5fc0dbe2626128653b7b7d466 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 22 Oct 2022 16:47:14 -0600 Subject: [PATCH] qbsp: add exportobj.hh header --- include/qbsp/exportobj.hh | 34 ++++++++++++++++++++++++++++++++++ include/qbsp/map.hh | 5 ----- qbsp/CMakeLists.txt | 1 + qbsp/exportobj.cc | 3 ++- qbsp/qbsp.cc | 1 + 5 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 include/qbsp/exportobj.hh diff --git a/include/qbsp/exportobj.hh b/include/qbsp/exportobj.hh new file mode 100644 index 00000000..eec8c16e --- /dev/null +++ b/include/qbsp/exportobj.hh @@ -0,0 +1,34 @@ +/* + Copyright (C) 1996-1997 Id Software, Inc. + Copyright (C) 1997 Greg Lewis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + See file, 'COPYING', for details. +*/ + +#pragma once + +#include +#include + +struct face_t; +struct bspbrush_t; +struct node_t; + +void ExportObj_Faces(const std::string &filesuffix, const std::vector &faces); +void ExportObj_Brushes(const std::string &filesuffix, const std::vector &brushes); +void ExportObj_Nodes(const std::string &filesuffix, const node_t *nodes); +void ExportObj_Marksurfaces(const std::string &filesuffix, const node_t *nodes); diff --git a/include/qbsp/map.hh b/include/qbsp/map.hh index 8e3a1076..8b445362 100644 --- a/include/qbsp/map.hh +++ b/include/qbsp/map.hh @@ -332,11 +332,6 @@ struct bspxbrushes_s void BSPX_Brushes_Finalize(struct bspxbrushes_s *ctx); void BSPX_Brushes_Init(struct bspxbrushes_s *ctx); -void ExportObj_Faces(const std::string &filesuffix, const std::vector &faces); -void ExportObj_Brushes(const std::string &filesuffix, const std::vector &brushes); -void ExportObj_Nodes(const std::string &filesuffix, const node_t *nodes); -void ExportObj_Marksurfaces(const std::string &filesuffix, const node_t *nodes); - void WriteBspBrushMap(std::string_view filename_suffix, const bspbrush_t::container &list); bool IsValidTextureProjection(const qvec3f &faceNormal, const qvec3f &s_vec, const qvec3f &t_vec); diff --git a/qbsp/CMakeLists.txt b/qbsp/CMakeLists.txt index 21aebb4d..1c5b2fc3 100644 --- a/qbsp/CMakeLists.txt +++ b/qbsp/CMakeLists.txt @@ -2,6 +2,7 @@ set(QBSP_INCLUDES ${CMAKE_SOURCE_DIR}/include/qbsp/qbsp.hh ${CMAKE_SOURCE_DIR}/include/qbsp/brush.hh ${CMAKE_SOURCE_DIR}/include/qbsp/csg.hh + ${CMAKE_SOURCE_DIR}/include/qbsp/exportobj.hh ${CMAKE_SOURCE_DIR}/include/qbsp/map.hh ${CMAKE_SOURCE_DIR}/include/qbsp/winding.hh ${CMAKE_SOURCE_DIR}/include/qbsp/merge.hh diff --git a/qbsp/exportobj.cc b/qbsp/exportobj.cc index 37216500..ee413b5e 100644 --- a/qbsp/exportobj.cc +++ b/qbsp/exportobj.cc @@ -18,8 +18,9 @@ See file, 'COPYING', for details. */ -#include +#include +#include #include #include #include diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 93f7b02c..8cbe2b1a 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -31,6 +31,7 @@ #include #include +#include #include #include #include