diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /tool_src/BspLib/Texture.h | |
| download | openparsec-main.tar.xz openparsec-main.zip | |
Diffstat (limited to 'tool_src/BspLib/Texture.h')
| -rw-r--r-- | tool_src/BspLib/Texture.h | 58 |
1 files changed, 58 insertions, 0 deletions
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<Texture> TextureChunk; + + +BSPLIB_NAMESPACE_END + + +#endif // _TEXTURE_H_ + |
