summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-03 21:04:51 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-03 21:04:51 +0000
commit47386d1d11ba26270edcfe15af832d7c127163f9 (patch)
tree6f9fc59bc69c29a2e3192d1bdca17c9faab27458 /src/resources/image.h
parent8a60e11684e84807f3526b37afa8cbf6f103b8fd (diff)
downloadmana-47386d1d11ba26270edcfe15af832d7c127163f9.tar.gz
mana-47386d1d11ba26270edcfe15af832d7c127163f9.tar.bz2
mana-47386d1d11ba26270edcfe15af832d7c127163f9.tar.xz
mana-47386d1d11ba26270edcfe15af832d7c127163f9.zip
Added automatic recoloring of images. Inspired by fungos' ideas (PR #41).
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index 485ca227..52f286f8 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -40,6 +40,8 @@
#include "resource.h"
+class Dye;
+
/**
* Defines a class for loading and storing images.
*/
@@ -63,12 +65,24 @@ class Image : public Resource
* @param buffer The memory buffer containing the image data.
* @param bufferSize The size of the memory buffer in bytes.
*
- * @return <code>NULL</code> if the an error occurred, a valid pointer
+ * @return <code>NULL</code> if an error occurred, a valid pointer
* otherwise.
*/
static Resource *load(void *buffer, unsigned bufferSize);
/**
+ * Loads an image from a buffer in memory and recolors it.
+ *
+ * @param buffer The memory buffer containing the image data.
+ * @param bufferSize The size of the memory buffer in bytes.
+ * @param dye The dye used to recolor the image.
+ *
+ * @return <code>NULL</code> if an error occurred, a valid pointer
+ * otherwise.
+ */
+ static Resource *load(void *buffer, unsigned bufferSize, Dye const &dye);
+
+ /**
* Loads an image from an SDL surface.
*/
static Image *load(SDL_Surface *);