aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/bitmapresource.h
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-24 14:00:55 +0000
committerFilippos Karapetis2011-01-24 14:00:55 +0000
commit6dc0999c6d000c08175e961da7e19c1b9a68e4c8 (patch)
tree679542adef082532a8c713be44d42f8a06359054 /engines/sword25/gfx/bitmapresource.h
parent03faae85517b9b5642d7ab9ccf1218e09d6b27c3 (diff)
downloadscummvm-rg350-6dc0999c6d000c08175e961da7e19c1b9a68e4c8.tar.gz
scummvm-rg350-6dc0999c6d000c08175e961da7e19c1b9a68e4c8.tar.bz2
scummvm-rg350-6dc0999c6d000c08175e961da7e19c1b9a68e4c8.zip
SWORD25: Cleanup
svn-id: r55501
Diffstat (limited to 'engines/sword25/gfx/bitmapresource.h')
-rw-r--r--engines/sword25/gfx/bitmapresource.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index 5abff58642..9feca82184 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -59,14 +59,15 @@ public:
FLIP_VH = FLIP_H | FLIP_V
};
- BitmapResource(const Common::String &filename, Image *pImage);
- virtual ~BitmapResource();
+ BitmapResource(const Common::String &filename, Image *pImage) :
+ _pImage(pImage), Resource(filename, Resource::TYPE_BITMAP) {}
+ virtual ~BitmapResource() { delete _pImage; }
/**
@brief Gibt zurück, ob das Objekt einen gültigen Zustand hat.
*/
bool isValid() const {
- return _valid;
+ return (_pImage != 0);
}
/**
@@ -156,7 +157,9 @@ public:
@remark Diese Methode sollte auf keine Fall benutzt werden um größere Teile des Bildes zu lesen, da sie sehr langsam ist. Sie ist
eher dafür gedacht einzelne Pixel des Bildes auszulesen.
*/
- uint getPixel(int x, int y) const;
+ uint getPixel(int x, int y) const {
+ return _pImage->getPixel(x, y);
+ }
//@{
/** @name Auskunfts-Methoden */
@@ -204,7 +207,6 @@ public:
private:
Image *_pImage;
- bool _valid;
};
} // End of namespace Sword25