Skip to content

Commit

Permalink
Improved the look of shield indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Oct 26, 2024
1 parent be7bb28 commit f582705
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3430,7 +3430,6 @@ static void queueDroidPowerBarsRects(DROID *psDroid, bool drawBox, BatchedMultiR
int maxShieldPoints = droidGetMaxShieldPoints(psDroid);
shields = PERCENT(psDroid->shieldPoints, maxShieldPoints);
shields = static_cast<UDWORD>((float)psDroid->shieldPoints / (float)maxShieldPoints * (float)psDroid->sDisplay.screenR);
shields *= 2;
}

PIELIGHT powerCol = WZCOL_BLACK;
Expand Down Expand Up @@ -3472,7 +3471,18 @@ static void queueDroidPowerBarsRects(DROID *psDroid, bool drawBox, BatchedMultiR
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(psDroid->sDisplay.screenX - psDroid->sDisplay.screenR - 1, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 2, psDroid->sDisplay.screenX + psDroid->sDisplay.screenR + 1, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 6, WZCOL_RELOAD_BACKGROUND), rectGroup);
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(psDroid->sDisplay.screenX - psDroid->sDisplay.screenR, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 3, psDroid->sDisplay.screenX - psDroid->sDisplay.screenR + damage, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 4, powerCol), rectGroup);
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(psDroid->sDisplay.screenX - psDroid->sDisplay.screenR, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 4, psDroid->sDisplay.screenX - psDroid->sDisplay.screenR + damage, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 5, powerColShadow), rectGroup);
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(psDroid->sDisplay.screenX - psDroid->sDisplay.screenR, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 8, psDroid->sDisplay.screenX - psDroid->sDisplay.screenR + shields, psDroid->sDisplay.screenY + psDroid->sDisplay.screenR + 6, WZCOL_LBLUE), rectGroup);
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(
psDroid->sDisplay.screenX - psDroid->sDisplay.screenR - 3,
psDroid->sDisplay.screenY + psDroid->sDisplay.screenR,
psDroid->sDisplay.screenX - psDroid->sDisplay.screenR - 1,
psDroid->sDisplay.screenY + psDroid->sDisplay.screenR - shields, WZCOL_LBLUE),
rectGroup);
batchedMultiRectRenderer.addRect(PIERECT_DrawRequest(
psDroid->sDisplay.screenX - psDroid->sDisplay.screenR - 2,
psDroid->sDisplay.screenY + psDroid->sDisplay.screenR,
psDroid->sDisplay.screenX - psDroid->sDisplay.screenR,
psDroid->sDisplay.screenY + psDroid->sDisplay.screenR - shields, WZCOL_BLACK),
rectGroup);
}

static void queueDroidEnemyHealthBarsRects(DROID *psDroid, BatchedMultiRectRenderer& batchedMultiRectRenderer, size_t rectGroup)
Expand Down

0 comments on commit f582705

Please sign in to comment.