[Scummvm-cvs-logs] SF.net SVN: scummvm:[42648] scummvm/branches/gsoc2009-draci/engines/draci/ sprite.h
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Wed Jul 22 06:47:01 CEST 2009
Revision: 42648
http://scummvm.svn.sourceforge.net/scummvm/?rev=42648&view=rev
Author: dkasak13
Date: 2009-07-22 04:47:01 +0000 (Wed, 22 Jul 2009)
Log Message:
-----------
* Removed some unnecessary virtual qualifiers from methods in Drawable, Sprite and Text.
* Changed some Drawable members from uint16 to uint.
* Added some const qualifiers to methods of Drawable.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/sprite.h
Modified: scummvm/branches/gsoc2009-draci/engines/draci/sprite.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/sprite.h 2009-07-22 04:42:33 UTC (rev 42647)
+++ scummvm/branches/gsoc2009-draci/engines/draci/sprite.h 2009-07-22 04:47:01 UTC (rev 42648)
@@ -42,31 +42,31 @@
virtual ~Drawable() {};
- virtual uint16 getWidth() { return _width; }
- virtual uint16 getHeight() { return _height; }
+ uint getWidth() const { return _width; }
+ uint getHeight() const { return _height; }
- virtual uint getScaledWidth() const { return _scaledWidth; }
- virtual uint getScaledHeight() const { return _scaledHeight; }
+ uint getScaledWidth() const { return _scaledWidth; }
+ uint getScaledHeight() const { return _scaledHeight; }
- virtual void setScaled(uint width, uint height) {
+ void setScaled(uint width, uint height) {
_scaledWidth = width;
_scaledHeight = height;
}
- virtual int getX() { return _x; }
- virtual int getY() { return _y; }
+ int getX() const { return _x; }
+ int getY() const { return _y; }
- virtual void setX(int x) { _x = x; }
- virtual void setY(int y) { _y = y; }
+ void setX(int x) { _x = x; }
+ void setY(int y) { _y = y; }
void setDelay(int delay) { _delay = delay; }
- int getDelay() { return _delay; }
+ int getDelay() const { return _delay; }
virtual Common::Rect getRect(bool scaled = true) const = 0;
private:
- uint16 _width; //!< Width of the sprite
- uint16 _height; //!< Height of the sprite
+ uint _width; //!< Width of the sprite
+ uint _height; //!< Height of the sprite
uint _scaledWidth; //!< Scaled width of the sprite
uint _scaledHeight; //!< Scaled height of the sprite
int _x, _y; //!< Sprite coordinates
@@ -105,7 +105,7 @@
void setMirrorOn();
void setMirrorOff();
- virtual Common::Rect getRect(bool scaled = true) const;
+ Common::Rect getRect(bool scaled = true) const;
const byte *getBuffer() const { return _data; }
@@ -127,7 +127,7 @@
void draw(Surface *surface, bool markDirty = true) const;
- virtual Common::Rect getRect() const;
+ Common::Rect getRect() const;
private:
byte *_text;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list