summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorDaniel Bradshaw <daniel+commits@the-cell.co.uk>2010-01-26 21:02:20 +0000
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-01-28 10:19:12 +0100
commitca2950fb8bffa9924aa49ab1d4729dbc2a391752 (patch)
treed95f92db525f415a4107ed8704b75368b70da967 /src/being.cpp
parent8d299d86c1209be6084e0d78c0454c946874e00f (diff)
downloadmana-ca2950fb8bffa9924aa49ab1d4729dbc2a391752.tar.gz
mana-ca2950fb8bffa9924aa49ab1d4729dbc2a391752.tar.bz2
mana-ca2950fb8bffa9924aa49ab1d4729dbc2a391752.tar.xz
mana-ca2950fb8bffa9924aa49ab1d4729dbc2a391752.zip
Added virtual destructors, some implicit casts, and a couple of type changes.
Many warnings removed. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp
index de334291..b30194e4 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -127,8 +127,8 @@ void Being::setPosition(const Vector &pos)
updateCoords();
if (mText)
- mText->adviseXY(pos.x,
- pos.y - getHeight() - mText->getHeight() - 6);
+ mText->adviseXY((int)pos.x,
+ (int)pos.y - getHeight() - mText->getHeight() - 6);
}
#ifdef EATHENA_SUPPORT
@@ -507,7 +507,7 @@ void Being::nextStep()
mX = pos.x;
mY = pos.y;
setAction(WALK);
- mWalkTime += mWalkSpeed / 10;
+ mWalkTime += (int)(mWalkSpeed / 10);
}
#endif
@@ -808,7 +808,7 @@ int Being::getOffset(char pos, char neg) const
if (mAction != WALK || !(mDirection & (pos | neg)))
return 0;
- int offset = (get_elapsed_time(mWalkTime) * 32) / mWalkSpeed;
+ int offset = (int)((get_elapsed_time(mWalkTime) * 32) / mWalkSpeed);
// We calculate the offset _from_ the _target_ location
offset -= 32;