summaryrefslogtreecommitdiff
path: root/src/spriteloader/spriteloader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/spriteloader/spriteloader.hpp')
-rw-r--r--src/spriteloader/spriteloader.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp
index c75f4685c..7b2474633 100644
--- a/src/spriteloader/spriteloader.hpp
+++ b/src/spriteloader/spriteloader.hpp
@@ -11,11 +11,21 @@
#define SPRITELOADER_HPP
#include "../core/alloc_type.hpp"
+#include "../core/enum_type.hpp"
#include "../gfx_type.h"
struct Sprite;
typedef void *AllocatorProc(size_t size);
+/** The different colour components a sprite can have. */
+enum SpriteColourComponent {
+ SCC_RGB = 1 << 0, ///< Sprite has RGB.
+ SCC_ALPHA = 1 << 1, ///< Sprite has alpha.
+ SCC_PAL = 1 << 2, ///< Sprite has palette data.
+ SCC_MASK = SCC_RGB | SCC_ALPHA | SCC_PAL, ///< Mask of valid colour bits.
+};
+DECLARE_ENUM_AS_BIT_SET(SpriteColourComponent)
+
/** Interface for the loader of our sprites. */
class SpriteLoader {
public:
@@ -40,6 +50,7 @@ public:
int16 x_offs; ///< The x-offset of where the sprite will be drawn
int16 y_offs; ///< The y-offset of where the sprite will be drawn
SpriteType type; ///< The sprite type
+ SpriteColourComponent colours; ///< The colour components of the sprite with useful information.
SpriteLoader::CommonPixel *data; ///< The sprite itself
/**