Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
TBox_Textures.h
Go to the documentation of this file.
1 // TBox_Textures.h
3 // Toolbox for converting textures formats
4 //
6 
7 /* IMPORTANT NOTE:
8 Before loading, 16 bit textures should be converted to RGB
9 since all texture conversion function accept a 24 bit texture
10 as an entry.
11 /**/
12 #ifndef TBOX_TEXTURES_H
13 #define TBOX_TEXTURES_H
14 
15 #include "framework\frm_types.h"
16 
17 namespace ToolBox {
18 
19 class ConvText {
20  public:
21  ConvText(void): _tColor(0) {};
22  void SetTranspColor(uchar pr, uchar pg, uchar pb){_tColor = (pr<<16)+(pg<<8)+pb;};
23  void Convert(TEXTURE* pText, uchar pType);
24  private:
25  uint32 _tColor; //32 bit color
26  //Conversion functions
27  void RGB2RGBA(TEXTURE* pText);
28  void RGB2A(TEXTURE* pText);
29  void RGB2LA(TEXTURE* pText);
30 };
31 
32 };
33 
34 #endif
Definition: TBox_Textures.h:19
ConvText(void)
Definition: TBox_Textures.h:21
void Convert(TEXTURE *pText, uchar pType)
Definition: TBox_Textures.cpp:17
void SetTranspColor(uchar pr, uchar pg, uchar pb)
Definition: TBox_Textures.h:22
Definition: IOTexture_BMP.h:16
unsigned char uchar
Definition: Frm_types.h:16
unsigned long int uint32
Definition: Frm_types.h:15
Definition: Frm_types.h:39