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-27 20:14:03 +0200
commit66128e6f582ed24f673e1ab4ab96594911faaaaa (patch)
tree82b116bbc0ff4050ff6b602ba2000aa038704ee7
parent1757e42c58b105722a8c49253d3fc63576a93502 (diff)
downloadplus-66128e6f582ed24f673e1ab4ab96594911faaaaa.tar.gz
plus-66128e6f582ed24f673e1ab4ab96594911faaaaa.tar.bz2
plus-66128e6f582ed24f673e1ab4ab96594911faaaaa.tar.xz
plus-66128e6f582ed24f673e1ab4ab96594911faaaaa.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 ed124b472..2401e6cc3 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -4268,8 +4268,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())
{
@@ -4305,7 +4304,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
{
@@ -4324,15 +4323,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;
}
}
@@ -4342,22 +4339,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));