summaryrefslogtreecommitdiff
path: root/src/graphic/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphic/image.h')
-rw-r--r--src/graphic/image.h73
1 files changed, 6 insertions, 67 deletions
diff --git a/src/graphic/image.h b/src/graphic/image.h
index 60e04eac..1bc43ef4 100644
--- a/src/graphic/image.h
+++ b/src/graphic/image.h
@@ -31,72 +31,17 @@
#include "../log.h"
/**
- * A class storing a single sprite in video memory if available,
- * else as a refernece to a RLE_SPRITE in a datafile.
- * The class stores the offsets needed to compensate the cropping
- * operated by the grabber utility.
+ * A video image stored in memory.
*/
-class Image {
- public:
- /**
- * Creates an Image
- * @param offset_x is the x offset from where to start drawing
- * @param offset_y is the y offset from where to start drawing
- */
- Image(int offset_x, int offset_y);
-
- /**
- * Virtual function to draw a sprite
- * @param dest is the destination bitmap on which to draw the sprite
- * @param x is the horizontal position
- * @param y is the vertical position
- */
- virtual void draw(BITMAP *dest, int x, int y) = 0;
-
- protected:
- // From where to start drawing
- int offset_x, offset_y;
-};
-
-/**
- * A RLE sprite
- */
-class RleImage : public Image {
- public:
- /**
- * Creates a RleSprite
- * @param src is a reference to a RLE_SPRITE in a datafile
- * @param offset_x is the x offset from where to start drawing
- * @param offset_y is the y offset from where to start drawing
- */
- RleImage(RLE_SPRITE *src, int offset_x, int offset_y);
-
- /**
- * Destructor
- */
- virtual ~RleImage();
-
- /**
- * Draws a sprite
- */
- void draw(BITMAP *dest, int x, int y);
-
+class VideoImage {
private:
- // Reference to RLE_SPRITE
- RLE_SPRITE *src;
-};
-
-/**
- * An image stored in video memory
- */
-class VideoImage : public Image {
- private:
- // Reference to bitmap stored in video memory
BITMAP *src;
+ int offset_x, offset_y;
+
public:
/**
* Creates a VideoImage
- * @param src is a reference to a BITMAP in video memory
+ * @param src is a reference to a BITMAP
* @param offset_x is the x offset from where to start drawing
* @param offset_y is the y offset from where to start drawing
*/
@@ -119,13 +64,7 @@ class VideoImage : public Image {
class Spriteset {
public:
// Vector storing the whole spriteset.
- std::vector<Image*> spriteset;
-
- /**
- * Load a datafile containing the spriteset
- * @param filename is the path of the datafile
- */
- Spriteset(std::string filename);
+ std::vector<VideoImage*> spriteset;
/*
* Cuts the passed bitmap in a grid of sub bitmaps.