summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp20
-rw-r--r--src/being/castingeffect.h2
-rw-r--r--src/being/compoundsprite.cpp2
-rw-r--r--src/being/localplayer.cpp16
4 files changed, 20 insertions, 20 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index d25fd0207..d43912258 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -987,7 +987,7 @@ void Being::handleAttack(Being *restrict const victim,
{
const uint8_t dir = calcDirection(victim->mX,
victim->mY);
- if (dir != 0u)
+ if (dir != 0U)
setDirection(dir);
}
@@ -1090,7 +1090,7 @@ void Being::handleSkill(Being *restrict const victim,
{
const uint8_t dir = calcDirection(victim->mX,
victim->mY);
- if (dir != 0u)
+ if (dir != 0U)
setDirection(dir);
}
if ((damage != 0) && victim->mType == ActorType::Player
@@ -1791,7 +1791,7 @@ void Being::nextTile() restrict2
mPath.pop_front();
const uint8_t dir = calcDirection(pos.x, pos.y);
- if (dir != 0u)
+ if (dir != 0U)
setDirection(dir);
if (mMap == nullptr ||
@@ -2303,7 +2303,7 @@ void Being::updateBotDirection(const int dstX,
break;
}
}
- if ((newDir != 0u) && newDir != mDirection)
+ if ((newDir != 0U) && newDir != mDirection)
{
if (mType == ActorType::Homunculus)
homunculusHandler->setDirection(newDir);
@@ -2317,7 +2317,7 @@ void Being::updateBadgesPosition()
const int px = mPixelX - mapTileSize / 2;
const int py = mPixelY - mapTileSize * 2 - mapTileSize;
if (mShowBadges != BadgeDrawType::Hide &&
- mBadgesCount != 0u)
+ mBadgesCount != 0U)
{
if (mDispName != nullptr &&
gui != nullptr)
@@ -2386,7 +2386,7 @@ void Being::drawEmotion(Graphics *restrict const graphics,
if (mAnimationEffect != nullptr)
mAnimationEffect->draw(graphics, px, py);
if (mShowBadges != BadgeDrawType::Hide &&
- mBadgesCount != 0u)
+ mBadgesCount != 0U)
{
int x = mBadgesX - offsetX;
const int y = mBadgesY - offsetY;
@@ -2778,7 +2778,7 @@ void Being::updateSprite(const unsigned int slot,
if (slot >= CAST_U32(mSlots.size()))
mSlots.resize(slot + 1, BeingSlot());
- if ((slot != 0u) && mSlots[slot].spriteId == id)
+ if ((slot != 0U) && mSlots[slot].spriteId == id)
return;
setSpriteColor(slot,
id,
@@ -3503,7 +3503,7 @@ bool Being::updateFromCache() restrict2
showInactiveBadge(mInactive);
showAwayBadge(mAway);
updateAwayEffect();
- if (mType == ActorType::Player || (mTeamId != 0u))
+ if (mType == ActorType::Player || (mTeamId != 0U))
updateColors();
return true;
}
@@ -3951,7 +3951,7 @@ void Being::drawCompound(Graphics *const graphics,
posX + mOffsetX,
posY + mOffsetY);
}
- else if ((mAlpha != 0.0f) && (mAlphaImage != nullptr))
+ else if ((mAlpha != 0.0F) && (mAlphaImage != nullptr))
{
mAlphaImage->setAlpha(mAlpha);
graphics->drawImage(mAlphaImage,
@@ -5198,7 +5198,7 @@ void Being::showTeamBadge(const bool show) restrict2
{
delete2(mBadges[BadgeIndex::Team]);
if (show &&
- mTeamId != 0u &&
+ mTeamId != 0U &&
mShowBadges != BadgeDrawType::Hide)
{
const std::string name = paths.getStringValue("badges") +
diff --git a/src/being/castingeffect.h b/src/being/castingeffect.h
index 090491c1e..3e219bcd5 100644
--- a/src/being/castingeffect.h
+++ b/src/being/castingeffect.h
@@ -58,7 +58,7 @@ class CastingEffect final : public Actor
bool isTerminated() const;
float getAlpha() const override final A_WARN_UNUSED
- { return 1.0f; }
+ { return 1.0F; }
void setAlpha(const float alpha A_UNUSED) override final
{ }
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp
index 72bdc4417..843c3b6b6 100644
--- a/src/being/compoundsprite.cpp
+++ b/src/being/compoundsprite.cpp
@@ -160,7 +160,7 @@ void CompoundSprite::drawSimple(Graphics *const graphics,
{
graphics->drawImage(mImage, posX + mOffsetX, posY + mOffsetY);
}
- else if ((mAlpha != 0.0f) && (mAlphaImage != nullptr))
+ else if ((mAlpha != 0.0F) && (mAlphaImage != nullptr))
{
mAlphaImage->setAlpha(mAlpha);
graphics->drawImage(mAlphaImage,
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 240228068..54c95bd85 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -452,7 +452,7 @@ void LocalPlayer::nextTile()
if (mPickUpTarget != nullptr)
pickUp(mPickUpTarget);
- if (mWalkingDir != 0u)
+ if (mWalkingDir != 0U)
startWalking(mWalkingDir);
}
else if (mPath.size() == 1)
@@ -648,7 +648,7 @@ void LocalPlayer::setWalkingDir(const unsigned char dir)
mWalkingDir = dir;
// If we're not already walking, start walking.
- if (mAction != BeingAction::MOVE && (dir != 0u))
+ if (mAction != BeingAction::MOVE && (dir != 0U))
startWalking(dir);
}
@@ -656,7 +656,7 @@ void LocalPlayer::startWalking(const unsigned char dir)
{
// This function is called by setWalkingDir(),
// but also by nextTile() for TMW-Athena...
- if ((mMap == nullptr) || (dir == 0u))
+ if ((mMap == nullptr) || (dir == 0U))
return;
mPickUpTarget = nullptr;
@@ -707,7 +707,7 @@ void LocalPlayer::startWalking(const unsigned char dir)
void LocalPlayer::stopWalking(const bool sendToServer)
{
- if (mAction == BeingAction::MOVE && (mWalkingDir != 0u))
+ if (mAction == BeingAction::MOVE && (mWalkingDir != 0U))
{
mWalkingDir = 0;
mPickUpTarget = nullptr;
@@ -1676,10 +1676,10 @@ void LocalPlayer::moveByDirection(const unsigned char dir)
void LocalPlayer::specialMove(const unsigned char direction)
{
- if ((direction != 0u) && ((mNavigateX != 0) || (mNavigateY != 0)))
+ if ((direction != 0U) && ((mNavigateX != 0) || (mNavigateY != 0)))
navigateClean();
- if ((direction != 0u) && (settings.moveType >= 2
+ if ((direction != 0U) && (settings.moveType >= 2
&& settings.moveType <= 4))
{
if (mAction == BeingAction::MOVE)
@@ -2635,7 +2635,7 @@ void LocalPlayer::fixAttackTarget()
if ((mMap == nullptr) || (mTarget == nullptr))
return;
- if (settings.moveToTargetType == 11 || (settings.attackType == 0u)
+ if (settings.moveToTargetType == 11 || (settings.attackType == 0U)
|| !config.getBoolValue("autofixPos"))
{
return;
@@ -2676,7 +2676,7 @@ void LocalPlayer::updateNavigateList()
if (iter != mHomes.end())
{
const Vector &pos = mHomes[(*iter).first];
- if ((pos.x != 0.0f) && (pos.y != 0.0f))
+ if ((pos.x != 0.0F) && (pos.y != 0.0F))
{
mMap->addPortalTile("home", MapItemType::HOME,
CAST_S32(pos.x), CAST_S32(pos.y));