current mode visualization

This commit is contained in:
Dejvino
2026-11-15 09:45:28 +01:00
parent ce668a8005
commit 01d3d192af
2 changed files with 11 additions and 7 deletions
+9 -7
View File
@@ -531,10 +531,10 @@ struct UnitStat {
uint8_t maxHp;
};
static const UnitStat STATS[4] = {
{ 16 * 16, 5, 65, 1, 4, 6 }, // marine: rng 8.0, 4 shots / 2 s
{ 14 * 14, 6, 55, 1, 5, 4 }, // droid: rng 7.0
{ 14 * 14, 7, 70, 2, 7, 10 }, // heavy: rng 7.0, 2 dmg
{ 21 * 21, 4, 80, 1, 0, 60 }, // turret: rng 10.5, high ROF
{ 16 * 16, 5, 65, 1, 4, 6 }, // marine
{ 14 * 14, 6, 55, 1, 5, 4 }, // droid
{ 14 * 14, 7, 50, 2, 7, 10 }, // heavy
{ 14 * 14, 4, 60, 1, 0, 8 }, // turret
};
enum { TEAM_MARINE = 0, TEAM_DROID = 1 };
@@ -1785,10 +1785,12 @@ static void render()
renderBeacon();
renderHud();
uint16_t bc = (int32_t)(millis() - viewFlashUntil) < 0 ? nd::C_CURSOR : nd::C_BORDER;
GFXP->drawFastHLine(nd::HUD_X, nd::HUD_Y - 1, nd::HUD_W, bc);
// current mode highlighter
uint16_t bc = viewMode == VM_CAMERAS ? nd::C_CAMERAS : nd::C_NETWORK;
GFXP->drawRect(0, 0, nd::VIEW_W, nd::VIEW_H, bc);
// mode change flasher
if ((int32_t)(millis() - viewFlashUntil) < 0) {
GFXP->drawRect(0, 0, nd::VIEW_W, nd::VIEW_H, nd::C_CURSOR);
GFXP->drawRect(1, 1, nd::VIEW_W-2, nd::VIEW_H-2, bc);
}
renderCursor();
+2
View File
@@ -71,5 +71,7 @@ constexpr uint16_t C_WARN = 0xFFE0; // yellow meter fill
constexpr uint16_t C_HOT = 0xF800; // red meter fill
constexpr uint16_t C_CURSOR = 0xFFE0; // cursor cross, bright amber
constexpr uint16_t C_FREEZE = 0x07FF; // tactical-freeze tint accents
constexpr uint16_t C_CAMERAS = 0x42CD; // cameras mode
constexpr uint16_t C_NETWORK = 0x07AA; // network mode
} // namespace nd