qafBigTexture.h

00001 /* 
00002 ** Qaf Framework 1.2
00003 ** June 2006
00004 ** 
00005 ** Pedro Luchini de Moraes, Public Domain - Free Lunch Code
00006 */
00007 
00008 #ifndef QAF_BIGTEXTURE_H
00009 #define QAF_BIGTEXTURE_H
00010 
00011 #include <hge.h>
00012 
00013 
00014 namespace qaf {
00015 
00034     class BigTexture {
00035         public:
00047             BigTexture ( const char * sourceImage );
00048             
00049             
00053             inline int getImageWidth () const {
00054                 return imageWidth;
00055             }
00056             
00060             inline int getImageHeight () const {
00061                 return imageHeight;
00062             }
00063             
00092             void renderRectangle ( int x0, int y0,
00093                                    int tx = 0, int ty = 0,
00094                                    int width = 0, int height = 0,
00095                                    unsigned long color = 0xFFFFFFFF,
00096                                    unsigned long blend = 2,
00097                                    bool flipX = false,
00098                                    bool flipY = false ) const;
00099             
00100             
00119             void renderTriple ( const hgeTriple * triple ) const;
00120             
00121             
00126             void renderQuad ( const hgeQuad * quad ) const;
00127             
00128             
00132             virtual ~BigTexture ();
00133             
00134         private:
00135             struct SubTexture {
00136                 unsigned long tex;
00137                 int width, height;
00138             };
00139             
00140             SubTexture * subTextures;
00141             int rows, cols;
00142             int imageWidth, imageHeight;
00143             
00144             void * pHGE;
00145             
00146             // Users should not use copy constructors or assignment operators.
00147             BigTexture ( BigTexture & btl );
00148             void operator = ( BigTexture & btl );
00149             
00150     };
00151     
00152 }
00153 
00154 #endif

Generated on Sun Mar 25 12:32:12 2007 for Qaf Framework by  doxygen 1.5.1-p1