feat(D.5.1): faithful item-icon type-default underlay (EnumIDMap 0x10000004) — opaque icon backing
Retail IconData::RenderIcons (decomp 407524) builds the icon layer stack bottom→top: type-default underlay (OPAQUE, Blit_Normal) first, then custom underlay, base icon, custom overlay. acdream's IconComposer omitted the type-default underlay, leaving filled toolbar slots with a transparent background. Resolution via the two-level EnumIDMap chain that retail uses (DBCache::GetDIDFromEnum 0x413940): Portal.Header.MasterMapId (0x25000000) → master[0x10000004] → submap DID (0x25000008) → submap[LSB(itemType)+1] → 0x06 RenderSurface underlay DID. Golden values confirmed against the live dats: MeleeWeapon→0x060011CB, Armor→0x060011CF, Clothing→0x060011F3, Jewelry→0x060011D5, None(fallback 0x21)→0x060011D4. Changes: - IconComposer: add ResolveUnderlayDid(ItemType)/EnsureUnderlaySubMap (memoised); widen cache key from (uint,uint,uint)→(uint,uint,uint,uint); GetIcon gains ItemType param and prepends the opaque underlay as layer 0 (Compose sizes to it → fully opaque) - ToolbarController: widen _iconIds Func from 3-arg to 4-arg; Populate passes item.Type - GameWindow: update toolbar mount lambda to 4-arg form - Tests: update ToolbarController test stubs to (_,_,_,_); add Compose_opaqueUnderlayFirst_resultIsFullyOpaque (dat-free) and ResolveUnderlayDid_goldenValues_matchDat (dat-gated, skip when dats absent) No divergence-register row existed for this omission; none added (fully ported now). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bfc452d610
commit
f21dbfad80
5 changed files with 156 additions and 23 deletions
|
|
@ -1920,7 +1920,7 @@ public sealed class GameWindow : IDisposable
|
|||
_toolbarController = AcDream.App.UI.Layout.ToolbarController.Bind(
|
||||
toolbarLayout, Items,
|
||||
() => Shortcuts,
|
||||
iconIds: (icon, under, over) => iconComposer.GetIcon(icon, under, over),
|
||||
iconIds: (type, icon, under, over) => iconComposer.GetIcon(type, icon, under, over),
|
||||
useItem: guid => UseItemByGuid(guid),
|
||||
combatState: Combat);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue