fix(D.5.2): always run effect recolor (effects==0 -> black) to match retail
Visual verification caught it: a no-mana scroll's icon edges are BLACK in retail but rendered WHITE in acdream. Cause = the effects!=0 gate (registered AP-44) that skipped retail's effects==0 recolor. Retail's effect tile is non-null even for effects==0 (the 0x21 SOLID-BLACK fallback 0x060011C5), so RenderIcons recolors pure-white pixels to black on mundane items and to the effect hue on magical ones. Remove the gate (always recolor); retire AP-44 (now faithful). TryGetEffectColor made internal + a golden test pins effects==0 -> ~black. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
702d6e1e90
commit
40c97a53ac
3 changed files with 30 additions and 10 deletions
|
|
@ -127,6 +127,24 @@ public class IconComposerTests
|
|||
Assert.Equal(0x060011C5u, composer.ResolveEffectDid(0x0000u));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TryGetEffectColor_noEffect_resolvesToBlackFallback()
|
||||
{
|
||||
var datDir = ResolveDatDir();
|
||||
if (datDir is null) return; // dats absent (CI) — skip cleanly
|
||||
|
||||
using var dats = new DatCollection(datDir, DatAccessType.Read);
|
||||
var composer = new IconComposer(dats, null!);
|
||||
|
||||
// effects==0 resolves to the 0x21 solid-black fallback tile (0x060011C5), so the
|
||||
// ALWAYS-on recolor blackens an icon's pure-white edge pixels on mundane items —
|
||||
// retail-faithful (the no-mana scroll's edges are BLACK, not white). Confirmed
|
||||
// visually against retail 2026-06-17.
|
||||
Assert.True(composer.TryGetEffectColor(0u, out var c));
|
||||
Assert.True(c.r <= 8 && c.g <= 8 && c.b <= 8, $"expected ~black, got ({c.r},{c.g},{c.b})");
|
||||
Assert.Equal(255, c.a);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReplaceColorWhite_replacesOnlyPureWhiteOpaque()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue