From 01d3d192afa7960929a3fde085a0feaf5e273c1b Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 15 Nov 2026 09:45:28 +0100 Subject: [PATCH] current mode visualization --- src/netdeck/NetDeck.ino | 16 +++++++++------- src/netdeck/nd_layout.h | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/netdeck/NetDeck.ino b/src/netdeck/NetDeck.ino index f6d3319..b060c0e 100644 --- a/src/netdeck/NetDeck.ino +++ b/src/netdeck/NetDeck.ino @@ -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(); diff --git a/src/netdeck/nd_layout.h b/src/netdeck/nd_layout.h index 42af671..1d2aebe 100644 --- a/src/netdeck/nd_layout.h +++ b/src/netdeck/nd_layout.h @@ -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