00001
00002
00003
00004
00005
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
00147 BigTexture ( BigTexture & btl );
00148 void operator = ( BigTexture & btl );
00149
00150 };
00151
00152 }
00153
00154 #endif