Optimize minimap icons hot path and add Trade/Brainwasher icons

Performance:
- GUID->blip result cache (256-entry direct-mapped) skips classification
  after first match; only position lookup remains per-frame
- Active NPC flag bitmask rejects most objects before the 16-entry loop
- Split tracking by object type (unit vs GO) for early exit
- Per-frame minimap info cache (center/radius/scale read once per cycle)
- Skip subname/entry reads when no filters are active
- Batch draw calls by texture (sort blips, one GxRsSet per unique texture)
- Split drawMinimapTexture into getGxTex + drawMinimapBlip for batching

Assets:
- Add Trade.blp icon (INV_Potion_85 derived) for Trade Goods vendors
- Update Brainwasher.blp with stark contrast version, downsized to 32x32
- Add png2blp.py converter (PNG to BLP2 DXT3 with mipmaps)
This commit is contained in:
MarcelineVQ
2026-03-08 15:33:42 -07:00
parent 3a84185c07
commit 4e4743afed
5 changed files with 370 additions and 61 deletions
+3 -3
View File
@@ -95,17 +95,17 @@ local NPC_CATEGORIES = {
getFilter = function() return getLocaleFilter(REAGENT_FILTERS) end },
{ name = "Poison Vendor", trackingType = "vendor", icon = "Interface\\Minimap\\Tracking\\Poison",
getFilter = function() return getLocaleFilter(POISON_FILTERS) end },
{ name = "Trade Goods", trackingType = "vendor", icon = "Interface\\Minimap\\Tracking\\Profession",
{ name = "Trade Goods", trackingType = "vendor", icon = "Interface\\Minimap\\Tracking\\Trade",
getFilter = function() return getLocaleFilter(TRADE_FILTERS) end },
{ name = "Ammunition", trackingType = "vendor", icon = "Interface\\Minimap\\Tracking\\Ammunition",
getFilter = function() return getLocaleFilter(AMMO_FILTERS) end },
{ name = "General Vendor", trackingType = "vendor", icon = "Interface\\Minimap\\Tracking\\Food" },
{ name = "Stable Master", trackingType = "stablemaster", icon = "Interface\\Minimap\\Tracking\\StableMaster" },
{ name = "Battle Master", trackingType = "battlemaster", icon = "Interface\\Minimap\\Tracking\\BattleMaster" },
{ name = "Class Trainer", trackingType = "trainer", icon = "Interface\\Minimap\\Tracking\\Class",
getFilter = function() return (UnitClass("player")) end },
{ name = "Profession Trainer", trackingType = "trainer", icon = "Interface\\Minimap\\Tracking\\Profession",
getExclude = function() return UnitClass("player") end },
{ name = "Battle Master", trackingType = "battlemaster", icon = "Interface\\Minimap\\Tracking\\BattleMaster" },
{ name = "Stable Master", trackingType = "stablemaster", icon = "Interface\\Minimap\\Tracking\\StableMaster" },
}
-- =============================================================================