00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00024 #ifndef __ze_zimage_h__
00025 #define __ze_zimage_h__
00026
00027 #include "ZE_ZObject.h"
00028
00029 namespace ZE
00030 {
00031
00037 class ZImage : public ZObject
00038 {
00039 protected:
00041 GLfloat rTexMaxX;
00043 GLfloat rTexMaxY;
00045 SDL_Surface *rImage;
00047 unsigned int rTexID;
00049 unsigned int rWidth;
00051 unsigned int rHeight;
00052
00053 public:
00054
00060 ZImage();
00061
00068 ZImage(string filename);
00069
00076 ZImage(SDL_Surface *surface);
00077
00089 ZImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00090
00096 ~ZImage();
00097
00099
00101
00108 void Open(string filename);
00109
00121 void OpenFromImage(SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h);
00122
00129 void Attach(SDL_Surface *surface);
00130
00136 void Release();
00137
00139
00141
00150 void SetColorKey(Uint8 red, Uint8 green, Uint8 blue);
00151
00158 void Bind();
00159
00167 void Draw(int x, int y);
00168
00170
00172
00179 bool IsLoaded();
00180
00186 SDL_Surface *Surface();
00187
00194 int Width();
00195
00202 int Height();
00203 };
00204
00205 }
00206
00207 #endif