summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-19 17:46:46 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-19 17:46:46 +0000
commit41cf359468d6379bc0e033bee9ac148d1b9255dd (patch)
treed351692d76e861607fd504366ae22374613b0fec /src/resources/image.h
parentc3e36e443698b001e98219e48cc97e259ada0a1d (diff)
downloadmana-41cf359468d6379bc0e033bee9ac148d1b9255dd.tar.gz
mana-41cf359468d6379bc0e033bee9ac148d1b9255dd.tar.bz2
mana-41cf359468d6379bc0e033bee9ac148d1b9255dd.tar.xz
mana-41cf359468d6379bc0e033bee9ac148d1b9255dd.zip
Factored code between resource handlers. Implemented failure-friendly sprite loader.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index 34515dda..485ca227 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -62,18 +62,16 @@ class Image : public Resource
*
* @param buffer The memory buffer containing the image data.
* @param bufferSize The size of the memory buffer in bytes.
- * @param idPath The path identifying the resource.
*
* @return <code>NULL</code> if the an error occurred, a valid pointer
* otherwise.
*/
- static Image*
- load(void* buffer, unsigned int bufferSize, const std::string &idPath);
+ static Resource *load(void *buffer, unsigned bufferSize);
/**
* Loads an image from an SDL surface.
*/
- static Image *load(SDL_Surface *, std::string const &idPath);
+ static Image *load(SDL_Surface *);
/**
* Frees the resources created by SDL.
@@ -129,8 +127,8 @@ class Image : public Resource
* Constructor.
*/
#ifdef USE_OPENGL
- Image(const std::string &idPath, GLuint glimage, int width, int height,
- int texWidth, int texHeight);
+ Image(GLuint glimage, int width, int height,
+ int texWidth, int texHeight);
/**
* Returns the first power of two equal or bigger than the input.
@@ -138,7 +136,7 @@ class Image : public Resource
static int
powerOfTwo(int input);
#endif
- Image(const std::string &idPath, SDL_Surface *image);
+ Image(SDL_Surface *image);
SDL_Rect mBounds;
bool mLoaded;