Fix SC0000 retained translation query
This commit is contained in:
@@ -221,18 +221,18 @@ public sealed partial class GfxState
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Op 0x228: query the translation target decomposed from the native target matrix at
|
||||
/// obj+0x17c (translation obj+0x1ac/+0x1b0/+0x1b4). This is independent of draw/base position V24.</summary>
|
||||
public bool TryQueryTranslationTarget(long handle, out (double X, double Y, double Z) target)
|
||||
/// <summary>Op 0x228: query the current translation decomposed from the native matrix at obj+0x16c.
|
||||
/// This is independent of both the delayed target at obj+0x1ac and draw/base position V24.</summary>
|
||||
public bool TryQueryTranslationCurrent(long handle, out (double X, double Y, double Z) current)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (_objects.TryGetValue(handle, out var o))
|
||||
{
|
||||
target = o.TranslationTarget;
|
||||
current = o.TranslationCurrent;
|
||||
return true;
|
||||
}
|
||||
target = default;
|
||||
current = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,11 @@ public sealed partial class VirtualMachine
|
||||
case "set-gfx-range-scale-target": // 0x22d (delay)(duration)(sx%)(sy%)(sz%)
|
||||
Gfx.SetRangeScaleChannel(Read(a[0]), Read(a[1]), (Read(a[2]), Read(a[3]), Read(a[4])));
|
||||
return pc + 1;
|
||||
case "u00421940": // 0x228: (succ)(handle)(outX)(outY)(outZ) <- target translation matrix
|
||||
case "query-gfx-translation-target": // pre-correction generated-name compatibility
|
||||
case "u00421940":
|
||||
case "query-gfx-translation-current": // 0x228: (succ)(handle)(outX)(outY)(outZ) <- current matrix
|
||||
{
|
||||
if (Gfx.TryQueryTranslationTarget(Read(a[1]), out var v))
|
||||
if (Gfx.TryQueryTranslationCurrent(Read(a[1]), out var v))
|
||||
{
|
||||
Write(a[2], (long)v.X); Write(a[3], (long)v.Y); Write(a[4], (long)v.Z);
|
||||
Write(a[0], 0);
|
||||
|
||||
@@ -1546,7 +1546,9 @@ public sealed partial class VirtualMachine
|
||||
case "u00421EF0": // 0x232 cyclic packed ARGB; negative alpha/RGB preserve static obj color
|
||||
case "set-scale-cycle": // 0x233 (handle)(period ms)(target scale x/y/z percent)
|
||||
return StepAnimation(label, a, pc);
|
||||
case "u00421940": // 0x228: (succ)(handle)(outX)(outY)(outZ) <- target translation matrix
|
||||
case "query-gfx-translation-target": // pre-correction generated-name compatibility
|
||||
case "query-gfx-translation-current":
|
||||
case "u00421940": // 0x228: (succ)(handle)(outX)(outY)(outZ) <- current translation matrix
|
||||
return StepRetainedObject(label, a, pc);
|
||||
case "u00422930":
|
||||
case "query-surface-stop-time-ms":
|
||||
|
||||
Reference in New Issue
Block a user