OPTPiX SpriteStudio SDK
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
sshTextureBMP.h
1 #ifndef __TKTEXTURE__
2 #define __TKTEXTURE__
3 
4 #include "IsshTexture.h"
5 
6 
7 
8 //画像ファイルの縦横サイズを調べる目的等で使用する
9 //画像ファイルデータは読み捨てる クラス名が適切でないかも
10 //画像の加工等を行う場合は拡張をお願いします。
11 class SSTextureBMP : public ISSTexture
12 {
13 public:
14  int tex_width;
15  int tex_height;
16 
17  std::string m_filename;
18 
19 public:
20  SSTextureBMP() : tex_width(0) , tex_height(0) , m_filename(""){}
21  virtual ~SSTextureBMP(){}
22  bool Load( const char* fname );
23 
24  virtual int getWidth() { return tex_width; }
25  virtual int getHeight() { return tex_height; }
26 
27  virtual ISSTexture* create(){ return new SSTextureBMP(); }
28  virtual const char* getFilename(){ return m_filename.c_str(); }
29 };
30 
31 
32 
33 
34 
35 
36 
37 #endif