diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-01 00:07:47 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-01 00:07:47 +0000 |
commit | 17de81fb71b4f91d2e0897f802a36df5630f1eaa (patch) | |
tree | a8d6444c8f4da24918228eb7566204aa5dded4a9 /src/resources/image.h | |
parent | e9a413d772c608f4ceba2953fabea643a02e0266 (diff) | |
download | mana-17de81fb71b4f91d2e0897f802a36df5630f1eaa.tar.gz mana-17de81fb71b4f91d2e0897f802a36df5630f1eaa.tar.bz2 mana-17de81fb71b4f91d2e0897f802a36df5630f1eaa.tar.xz mana-17de81fb71b4f91d2e0897f802a36df5630f1eaa.zip |
Changed around recent additions to Image class a bit and fixed OpenGL compile.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r-- | src/resources/image.h | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/resources/image.h b/src/resources/image.h index 084bb211..f5869167 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -47,22 +47,6 @@ class Image : public Resource { public: /** - * Constructor. - */ -#ifdef USE_OPENGL - Image(GLuint image, - int width, int height, - int texWidth, int texHeight); -#else - Image(SDL_Surface *image); -#endif - - /** - * Two time intialization Contructor. For now : Only to be used with create. - */ - Image(); - - /** * Destructor. */ virtual ~Image(); @@ -92,6 +76,11 @@ class Image : public Resource static Image *load(const char* buffer, unsigned int bufferSize); /** + * Creates a new empty image with given height and width. + */ + static Image *create(int width, int height); + + /** * Frees the resources created by SDL. */ virtual void unload(); @@ -149,17 +138,24 @@ class Image : public Resource float getAlpha(); /** - * Creates a new empty image with given height and width. - */ - bool create(int width, int height); - - /** * Fills the image with given color. */ - void fillWithColor(unsigned char red, unsigned char green, unsigned blue); + void fillWithColor( + unsigned char red, unsigned char green, unsigned blue); protected: + /** + * Constructor. + */ +#ifdef USE_OPENGL + Image(GLuint image, + int width, int height, + int texWidth, int texHeight); +#else + Image(SDL_Surface *image); +#endif + #ifdef USE_OPENGL GLuint image; int width, height; |