summaryrefslogtreecommitdiff
path: root/src/graphic/image.h
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-12-19 10:11:10 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-12-19 10:11:10 +0000
commit129040251c8242bd4b56f4fc6b107017d62bca3c (patch)
tree5d34f0dea16dcaece3ea64ed3ed15ebbda5030bb /src/graphic/image.h
parent75668f13e61ef137d1835b3d60e6de9a7a9ecb42 (diff)
downloadmana-129040251c8242bd4b56f4fc6b107017d62bca3c.tar.gz
mana-129040251c8242bd4b56f4fc6b107017d62bca3c.tar.bz2
mana-129040251c8242bd4b56f4fc6b107017d62bca3c.tar.xz
mana-129040251c8242bd4b56f4fc6b107017d62bca3c.zip
Commented image.h
Diffstat (limited to 'src/graphic/image.h')
-rw-r--r--src/graphic/image.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/graphic/image.h b/src/graphic/image.h
index f2ea6784..9d9e42c3 100644
--- a/src/graphic/image.h
+++ b/src/graphic/image.h
@@ -30,7 +30,7 @@
#include <iostream>
#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
@@ -41,25 +41,25 @@ class Image {
// From where to start drawing
int offset_x, offset_y;
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
+ * @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) {
this->offset_x = offset_x;
this->offset_y = 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
+ * @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;
};
-/*
+/**
* A RLE sprite
*/
class RleImage : public Image {
@@ -67,22 +67,22 @@ class RleImage : public Image {
// Refernce to RLE_SPRITE
RLE_SPRITE *src;
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
+ * @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) : Image(offset_x, offset_y) {
this->src = src;
}
- /*
+ /**
* Destroy a RleSprite
*/
virtual ~RleImage() {
destroy_rle_sprite(src);
}
- /*
+ /**
* Draw a sprite
*/
void draw(BITMAP *dest, int x, int y) {
@@ -90,7 +90,7 @@ class RleImage : public Image {
}
};
-/*
+/**
* An image stored in video memory
*/
class VideoImage : public Image {
@@ -98,22 +98,22 @@ class VideoImage : public Image {
// Reference to bitmap stored in video memory
BITMAP *src;
public:
- /*
+ /**
* Creates a VideoImage
- * \param src is a reference to a BITMAP in video memory
- * \param offset_x is the x offset from where to start drawing
- * \param offset_y is the y offset from where to start drawing
+ * @param src is a reference to a BITMAP in video memory
+ * @param offset_x is the x offset from where to start drawing
+ * @param offset_y is the y offset from where to start drawing
*/
VideoImage(BITMAP *src, int offset_x, int offset_y) : Image(offset_x, offset_y) {
this->src = src;
}
- /*
+ /**
* Destroy a VideoImage
*/
virtual ~VideoImage() {
destroy_bitmap(src);
}
- /*
+ /**
* Draw a sprite
*/
void draw(BITMAP *dest, int x, int y) {
@@ -121,15 +121,15 @@ class VideoImage : public Image {
}
};
-/*
+/**
* Stores a complete set of sprites.
*/
class Spriteset {
private:
- /*
+ /**
* Helper function to get offset
- * \param datafile is a reference to the whole spriteset
- * \param type is the property of the datafile object
+ * @param datafile is a reference to the whole spriteset
+ * @param type is the property of the datafile object
*/
int get_property(DATAFILE *datafile, int type) {
return atoi(get_datafile_property(datafile, type));
@@ -137,9 +137,9 @@ 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
+ * @param filename is the path of the datafile
*/
Spriteset(std::string filename) {
DATAFILE *datafile = load_datafile(filename.c_str());