diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-05 12:33:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-05 15:48:51 +0300 |
commit | 126b1470842302537b0bc5e4527cf7fd540a9125 (patch) | |
tree | 8d98425338e7a7f01add71d762fba147fc097fc2 /src/sprite.h | |
parent | f6920653c7a958528df248ff61c372a0bd3d4f1d (diff) | |
download | mv-126b1470842302537b0bc5e4527cf7fd540a9125.tar.gz mv-126b1470842302537b0bc5e4527cf7fd540a9125.tar.bz2 mv-126b1470842302537b0bc5e4527cf7fd540a9125.tar.xz mv-126b1470842302537b0bc5e4527cf7fd540a9125.zip |
Add checks and const to animatedsprites and related classes.
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sprite.h b/src/sprite.h index 79cad1125..d8b5d989d 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -47,7 +47,7 @@ class Sprite * * @returns true if the sprite changed, false otherwise */ - virtual bool play(std::string action) = 0; + virtual bool play(const std::string &action) = 0; /** * Inform the animation of the passed time so that it can output the @@ -55,13 +55,14 @@ class Sprite * * @returns true if the sprite changed, false otherwise */ - virtual bool update(int time) = 0; + virtual bool update(const int time) = 0; /** * Draw the current animation frame at the coordinates given in screen * pixels. */ - virtual bool draw(Graphics* graphics, int posX, int posY) const = 0; + virtual bool draw(Graphics *const graphics, + const int posX, const int posY) const = 0; /** * Gets the width in pixels of the image of the current frame |