From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- tool_src/BspLib/BspFormat.h | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tool_src/BspLib/BspFormat.h (limited to 'tool_src/BspLib/BspFormat.h') diff --git a/tool_src/BspLib/BspFormat.h b/tool_src/BspLib/BspFormat.h new file mode 100644 index 0000000..9097a80 --- /dev/null +++ b/tool_src/BspLib/BspFormat.h @@ -0,0 +1,77 @@ +//----------------------------------------------------------------------------- +// BSPLIB HEADER: BspFormat.h +// +// Copyright (c) 1997 by Markus Hadwiger +// All Rights Reserved. +//----------------------------------------------------------------------------- + +#ifndef _BSPFORMAT_H_ +#define _BSPFORMAT_H_ + +// bsplib header files +#include "BspLibDefs.h" +#include "SingleFormat.h" + + +BSPLIB_NAMESPACE_BEGIN + + +// class containing bsp format specifics -------------------------------------- +// +class BspFormat : public virtual SingleFormat { + +protected: + + // section enumeration + // (additional sections not supported by SingleFormat) + enum { + _bsptree = _num_single_sections, + _polygons, + + _num_bsp_sections + }; + +public: + BspFormat() { } + ~BspFormat() { } + + BspFormat( const BspFormat& copyobj ) : SingleFormat( copyobj ) { } + BspFormat& operator =( const BspFormat& copyobj ); + +protected: + static int GetSectionId( char *section_name ); + static const char* GetSectionName( int section_id ); + +public: + static const char _bspspec_polygon_str[]; + static const char _bspspec_frontlist_str[]; + static const char _bspspec_backlist_str[]; + static const char _bspspec_fronttree_str[]; + static const char _bspspec_backtree_str[]; + static const char _bspspec_plane_str[]; + static const char _bspspec_boundingbox_str[]; + +protected: + static const char _bspsig_str[]; + static const char BSP_FILE_EXTENSION[]; + + static const char _bsptree_str[]; + static const char _polygons_str[]; + + static const char* section_strings[]; + static const int section_ids[]; +}; + +// assignment operator -------------------------------------------------------- +inline BspFormat& BspFormat::operator =( const BspFormat& copyobj ) +{ + *(SingleFormat *)this = copyobj; + return *this; +} + + +BSPLIB_NAMESPACE_END + + +#endif // _BSPFORMAT_H_ + -- cgit v1.2.3