summaryrefslogtreecommitdiff
path: root/src/actorsprite.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/actorsprite.h
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/actorsprite.h')
-rw-r--r--src/actorsprite.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/actorsprite.h b/src/actorsprite.h
index ab327e16..f657d5cb 100644
--- a/src/actorsprite.h
+++ b/src/actorsprite.h
@@ -63,7 +63,7 @@ public:
ActorSprite(int id);
- ~ActorSprite();
+ ~ActorSprite() override;
int getId() const
{ return mId; }
@@ -75,9 +75,9 @@ public:
*/
virtual Type getType() const { return UNKNOWN; }
- virtual int getDrawOrder() const;
+ int getDrawOrder() const override;
- virtual bool draw(Graphics *graphics, int offsetX, int offsetY) const;
+ bool draw(Graphics *graphics, int offsetX, int offsetY) const override;
virtual bool drawSpriteAt(Graphics *graphics, int x, int y) const;
@@ -85,7 +85,7 @@ public:
static void actorLogic();
- void setMap(Map* map);
+ void setMap(Map* map) override;
/**
* Gets the way the object blocks pathfinding for other objects
@@ -112,7 +112,7 @@ public:
/**
* Untargets the actor.
*/
- void untarget() { mUsedTargetCursor = NULL; }
+ void untarget() { mUsedTargetCursor = nullptr; }
/**
* Triggers a visual effect, such as `level up'. Only draws the visual
@@ -146,16 +146,16 @@ public:
*/
void setStatusEffectBlock(int offset, uint16_t flags);
- virtual void setAlpha(float alpha)
+ void setAlpha(float alpha) override
{ CompoundSprite::setAlpha(alpha); }
- virtual float getAlpha() const
+ float getAlpha() const override
{ return CompoundSprite::getAlpha(); }
- virtual int getWidth() const
+ int getWidth() const override
{ return CompoundSprite::getWidth(); }
- virtual int getHeight() const
+ int getHeight() const override
{ return CompoundSprite::getHeight(); }
static void load();