fix(gfx): restore third CG glow
This commit is contained in:
@@ -410,6 +410,17 @@ public sealed class GfxState
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Op 0x1fd: immediately replace the object's current scale matrix. Script operands are
|
||||
/// integer percentages; native divides them by 100 before matrix4_make_scale at obj+0x6c.</summary>
|
||||
public void SetCurrentScale(long handle, (long X, long Y, long Z) percent)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
var o = GetOrCreate(handle);
|
||||
o.ScaleCurrent = (percent.X / 100.0, percent.Y / 100.0, percent.Z / 100.0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Op 0x21e: normalized scale target (100 = identity), with independent delay/duration.</summary>
|
||||
public void SetScaleChannel(long handle, long delayMs, long durationMs, (long X, long Y, long Z) percent)
|
||||
{
|
||||
@@ -520,8 +531,16 @@ public sealed class GfxState
|
||||
// not a request to replace every texel with white.
|
||||
alpha = a; strength = 0; blend = BlendKind.Alpha;
|
||||
}
|
||||
else if (resId != 0)
|
||||
{
|
||||
// Native mode 0 is the opaque textured path. RGB modulates the source and the
|
||||
// packed alpha byte does not become tint strength; in particular 0xffffffff is
|
||||
// identity after the foreground-transition cleanup write.
|
||||
alpha = 255; strength = 0; blend = BlendKind.Alpha; multiplyTint = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// A surfaceless mode-0 object is a solid fill, whose high byte remains fill strength.
|
||||
strength = a; blend = BlendKind.Alpha;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,6 +404,9 @@ public sealed class VirtualMachine
|
||||
Write(a[0], Gfx.TryGet(Read(a[1])) != null ? 0 : -1); return pc + 1;
|
||||
case "set-gfx-geom3-c": // 0x1ff (handle)(a)(b)(c) -> V16c
|
||||
Gfx.GetOrCreate(Read(a[0])).V16c = (Read(a[1]), Read(a[2]), Read(a[3])); return pc + 1;
|
||||
case "u00420620": // upstream ABI label
|
||||
case "gfx-set-scale-current": // 0x1fd (handle)(sx%)(sy%)(sz%) -> current scale matrix
|
||||
Gfx.SetCurrentScale(Read(a[0]), (Read(a[1]), Read(a[2]), Read(a[3]))); return pc + 1;
|
||||
case "set-gfx-field64": // 0x212 (idx)(val)
|
||||
Gfx.GetOrCreate(Read(a[0])).Field64 = Read(a[1]); return pc + 1;
|
||||
case "set-gfx-xy": // 0x213 (idx)(x)(y)
|
||||
|
||||
Reference in New Issue
Block a user