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/Texture.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tool_src/BspLib/Texture.h (limited to 'tool_src/BspLib/Texture.h') diff --git a/tool_src/BspLib/Texture.h b/tool_src/BspLib/Texture.h new file mode 100644 index 0000000..cbea4fe --- /dev/null +++ b/tool_src/BspLib/Texture.h @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------------- +// BSPLIB HEADER: Texture.h +// +// Copyright (c) 1996-1997 by Markus Hadwiger +// All Rights Reserved. +//----------------------------------------------------------------------------- + +#ifndef _TEXTURE_H_ +#define _TEXTURE_H_ + +// bsplib header files +#include "BspLibDefs.h" +#include "Chunk.h" +#include "SystemIO.h" + + +BSPLIB_NAMESPACE_BEGIN + + +#define MAX_TEXNAME 31 + + +// class Texture; file oriented, only used for descriptive purposes ----------- +// +class Texture : public virtual SystemIO { + +public: + Texture( int w = -1, int h = -1, char *tname = NULL, char *fname = NULL ); + ~Texture() { } + + int getWidth() const { return m_width; } + int getHeight() const { return m_height; } + const char* getName() const { return m_name; } + const char* getFile() const { return m_file; } + + void setWidth( int w ) { m_width = w; } + void setHeight( int h ) { m_height = h; } + void setName( const char *tname ); + void setFile( const char *fname ); + + void WriteInfo( FILE *fp ); + +private: + int m_width; + int m_height; + char m_name[ MAX_TEXNAME + 1 ]; + char m_file[ PATH_MAX + 1 ]; +}; + +// typedef chunk of textures -------------------------------------------------- +typedef Chunk TextureChunk; + + +BSPLIB_NAMESPACE_END + + +#endif // _TEXTURE_H_ + -- cgit v1.2.3