blob: cbea4fe0bed4891bb37b1f60fb56e5bd66a28df8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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_
|