diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:53:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-30 19:53:23 +0300 |
commit | d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5 (patch) | |
tree | ae9e96faf2ae25a47b0f0f207b55d201729e3e41 /src/being/being.cpp | |
parent | 237449794444d60ecc4a669d78becac5372da723 (diff) | |
download | mv-d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5.tar.gz mv-d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5.tar.bz2 mv-d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5.tar.xz mv-d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5.zip |
Fix code style in being.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 683bfb6f5..182bf3947 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -179,8 +179,8 @@ Being::Being(const int id, const Type type, const uint16_t subtype, mCriticalHit(0), mPvpRank(0), mNumber(100), - mLook(0), mUsageCounter(1), + mLook(0U), mHairColor(0), mErased(false), mEnemy(false), @@ -1331,7 +1331,7 @@ void Being::nextTile() mActionTime += static_cast<int>(mSpeed / 10); if ((mType != PLAYER || mUseDiagonal) && mX != pos.x && mY != pos.y) - mSpeed = mWalkSpeed.x * 1.4; + mSpeed = static_cast<float>(mWalkSpeed.x * 1.4F); else mSpeed = mWalkSpeed.x; @@ -1535,7 +1535,7 @@ void Being::petLogic() } } - const int walkMask = getWalkMask(); + const unsigned char walkMask = getWalkMask(); if (!mMap->getWalk(dstX, dstY, walkMask)) { if (dstX != dstX0) @@ -1592,7 +1592,7 @@ void Being::petLogic() break; } - int newDir = 0; + uint8_t newDir = 0; switch (directionType) { case 0: @@ -2783,7 +2783,7 @@ int Being::searchSlotValue(const std::vector<int> &slotRemap, for (size_t slot = 0; slot < sz; slot ++) { if (slotRemap[slot] == val) - return slot; + return static_cast<int>(slot); } return getNumberOfLayers() - 1; } @@ -3271,7 +3271,7 @@ void Being::playSfx(const SoundInfo &sound, Being *const being, } } -void Being::setLook(const int look) +void Being::setLook(const uint8_t look) { if (mType == PLAYER) setSubtype(mSubType, look); |