feat(D.5.2): IconComposer 2-stage effect composite + 5-arg GetIcon
Widen the cache key to (typeUnderlay, icon, underlay, overlay, effects). GetIcon is now a 2-stage composite mirroring retail IconData::RenderIcons (0x0058d180): Stage 1 builds the drag composite (base + overlay) and, when effects != 0, ReplaceColorWhite tints it with the effect tile's mean-opaque color (DR-1: tint SOURCE, not blit; DR-3: zero-effects black path skipped). Stage 2 blits typeUnderlay + custom underlay + drag into the final cached GL texture. Both callers updated: ToolbarController Func arity widened to 6-arg (passes item.Effects); GameWindow closure and OnLiveEntitySpawned EnrichItem call pass spawn.UiEffects. Tree builds with 0 warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3e019e408a
commit
e0dce5aa9f
4 changed files with 49 additions and 20 deletions
|
|
@ -2002,7 +2002,7 @@ public sealed class GameWindow : IDisposable
|
|||
_toolbarController = AcDream.App.UI.Layout.ToolbarController.Bind(
|
||||
toolbarLayout, Items,
|
||||
() => Shortcuts,
|
||||
iconIds: (type, icon, under, over) => iconComposer.GetIcon(type, icon, under, over),
|
||||
iconIds: (type, icon, under, over, effects) => iconComposer.GetIcon(type, icon, under, over, effects),
|
||||
useItem: guid => UseItemByGuid(guid),
|
||||
combatState: Combat,
|
||||
peaceDigits: toolbarPeaceDigits,
|
||||
|
|
@ -2646,7 +2646,7 @@ public sealed class GameWindow : IDisposable
|
|||
// WeenieHeader tail so IconComposer composites all icon layers.
|
||||
Items.EnrichItem(spawn.Guid, spawn.IconId, spawn.Name ?? string.Empty,
|
||||
(AcDream.Core.Items.ItemType)(spawn.ItemType ?? 0),
|
||||
spawn.IconOverlayId, spawn.IconUnderlayId);
|
||||
spawn.IconOverlayId, spawn.IconUnderlayId, spawn.UiEffects);
|
||||
|
||||
// Phase A.1 hotfix: live CreateObject handler reads dats extensively
|
||||
// (Setup, GfxObj, Surface, SurfaceTexture) to hydrate the spawned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue