summaryrefslogtreecommitdiff
path: root/src/imageparticle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imageparticle.cpp')
-rw-r--r--src/imageparticle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp
index 5e0b93d7a..863cb8ba8 100644
--- a/src/imageparticle.cpp
+++ b/src/imageparticle.cpp
@@ -30,7 +30,7 @@
std::map<std::string, int> ImageParticle::imageParticleCountByName;
-ImageParticle::ImageParticle(Map *map, Image *image):
+ImageParticle::ImageParticle(Map *const map, Image *const image):
Particle(map),
mImage(image)
{
@@ -70,8 +70,9 @@ bool ImageParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
if (!isAlive() || !mImage)
return false;
- int screenX = static_cast<int>(mPos.x) + offsetX - mImage->mBounds.w / 2;
- int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ const int screenX = static_cast<int>(mPos.x)
+ + offsetX - mImage->mBounds.w / 2;
+ const int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ offsetY - mImage->mBounds.h / 2;
// Check if on screen