summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorEric Scrivner <zenogais@gmail.com>2005-02-19 02:30:09 +0000
committerEric Scrivner <zenogais@gmail.com>2005-02-19 02:30:09 +0000
commit202fdb7698b3329bd1a01f54780e83a08ae3065c (patch)
treefa4da255abbc90a038bbabb4da3fc2f77d78efce /src/resources/image.h
parentf71a143f37a9cc6b64f4231bb582d736c3d34a0b (diff)
downloadmana-client-202fdb7698b3329bd1a01f54780e83a08ae3065c.tar.gz
mana-client-202fdb7698b3329bd1a01f54780e83a08ae3065c.tar.bz2
mana-client-202fdb7698b3329bd1a01f54780e83a08ae3065c.tar.xz
mana-client-202fdb7698b3329bd1a01f54780e83a08ae3065c.zip
Added load function that uses SDL_RWops
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index a92e6cc3..031f6645 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -65,12 +65,21 @@ class Image : public Resource
/**
* Loads an image.
* @param filePath The path to the image file to load.
- * @return <code>true</code> if the image was loaded
- * <code>false</code> otherwise.
+ * @return <code>NULL</code> if the an error occurred, a
+ * valid pointer otherwise.
*/
static Image *load(const std::string &filePath, int flags);
/**
+ * Loads an image from a buffer in memory.
+ * @param buffer The memory buffer containing the image
+ * data.
+ * @return <code>NULL</code> if the an error occurred, a
+ * valid pointer otherwise.
+ */
+ static Image *load(const char* buffer, const unsigned int bufferSize);
+
+ /**
* Frees the resources created by SDL.
*/
virtual void unload();