summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
commit8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch)
tree537f717a339d1247cae222eb7a354ea5dbe8babf /src/resources/image.h
parenta246c08cef5e4d598fc07a681eb971bfbcf01519 (diff)
downloadmana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index 6fc4e89a..a7d5cdf1 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -70,13 +70,14 @@ class Image : public Resource
* Returns the width of the image.
*/
virtual int
- getWidth() const;
+ getWidth() const { return bounds.w; }
+
/**
* Returns the height of the image.
*/
virtual int
- getHeight() const;
+ getHeight() const { return bounds.h; }
/**
* Creates a new image with the desired clipping rectangle.
@@ -122,12 +123,12 @@ class Image : public Resource
bool loaded;
#ifdef USE_OPENGL
- GLuint glimage;
- int texWidth, texHeight;
+ GLuint mGLImage;
+ int mTexWidth, mTexHeight;
- static bool useOpenGL;
+ static bool mUseOpenGL;
#endif
- SDL_Surface *image;
+ SDL_Surface *mImage;
float alpha;
};
@@ -162,7 +163,7 @@ class SubImage : public Image
getSubImage(int x, int y, int width, int height);
private:
- Image *parent;
+ Image *mParent;
};
#endif