summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-04-23 22:01:05 +0200
committerFedja Beader <fedja@protonmail.ch>2024-04-24 11:53:42 +0000
commitebbd31598cd8875a1d04fe8357bdb7e8f678236a (patch)
tree42596c34a361c3caf848cb506e52b8c5c7379681
parent6c93bbe03abc5ef097607e45fa36683b55808d7d (diff)
downloadManaVerse-ebbd31598cd8875a1d04fe8357bdb7e8f678236a.tar.gz
ManaVerse-ebbd31598cd8875a1d04fe8357bdb7e8f678236a.tar.bz2
ManaVerse-ebbd31598cd8875a1d04fe8357bdb7e8f678236a.tar.xz
ManaVerse-ebbd31598cd8875a1d04fe8357bdb7e8f678236a.zip
Reformat
Should this function gain emplace()-like semantics?
-rw-r--r--src/being/being.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index f9079cb32..e918877a1 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -4292,8 +4292,7 @@ void Being::drawPortalSpriteAt(Graphics *restrict const graphics,
graphics->setColor(userPalette->
getColorWithAlpha(UserColorId::PORTAL_HIGHLIGHT));
- graphics->fillRectangle(Rect(x, y,
- mapTileSize, mapTileSize));
+ graphics->fillRectangle(Rect(x, y, mapTileSize, mapTileSize));
if (mDrawHotKeys && !mName.empty())
{
@@ -4329,7 +4328,7 @@ void Being::drawHpBar(Graphics *restrict const graphics,
else if (maxHP != damage)
{
p = static_cast<float>(maxHP)
- / static_cast<float>(maxHP - damage);
+ / static_cast<float>(maxHP - damage);
}
else
{
@@ -4348,15 +4347,13 @@ void Being::drawHpBar(Graphics *restrict const graphics,
|| (hp == 0 && maxHP == damage))
{
graphics->setColor(userPalette->getColorWithAlpha(color1));
- graphics->fillRectangle(Rect(
- x, y, dx, height));
+ graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
graphics->setColor(userPalette->getColorWithAlpha(color2));
- graphics->fillRectangle(Rect(
- x, y, width, height));
+ graphics->fillRectangle(Rect(x, y, width, height));
return;
}
}
@@ -4366,22 +4363,19 @@ void Being::drawHpBar(Graphics *restrict const graphics,
if (hp == maxHP)
{
graphics->setColor(userPalette->getColorWithAlpha(color1));
- graphics->fillRectangle(Rect(
- x, y, dx, height));
+ graphics->fillRectangle(Rect(x, y, dx, height));
return;
}
else if (width - dx <= 0)
{
graphics->setColor(userPalette->getColorWithAlpha(color2));
- graphics->fillRectangle(Rect(
- x, y, width, height));
+ graphics->fillRectangle(Rect(x, y, width, height));
return;
}
}
graphics->setColor(userPalette->getColorWithAlpha(color1));
- graphics->fillRectangle(Rect(
- x, y, dx, height));
+ graphics->fillRectangle(Rect(x, y, dx, height));
graphics->setColor(userPalette->getColorWithAlpha(color2));
graphics->fillRectangle(Rect(x + dx, y, width - dx, height));