From e9c75074ee1eb307c7ad0e75f6830e7337183a6d Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Fri, 18 Jul 2025 20:01:49 -0500 Subject: [PATCH] Enable decompilation of Locals block --- libs/UIX.DecompXml/Decompiler.cs | 7 +++++++ test/ADDTOCOLLECTION.31_48_decomp.uix | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libs/UIX.DecompXml/Decompiler.cs b/libs/UIX.DecompXml/Decompiler.cs index 9ec11b2..f93d3e5 100644 --- a/libs/UIX.DecompXml/Decompiler.cs +++ b/libs/UIX.DecompXml/Decompiler.cs @@ -54,6 +54,9 @@ public partial class Decompiler if (export.InitializePropertiesOffset is not uint.MaxValue) AnalyzeMethodForInit(export.InitializePropertiesOffset, xExport, export, name + "_prop"); + if (export.InitializeLocalsInputOffset is not uint.MaxValue) + AnalyzeMethodForInit(export.InitializeLocalsInputOffset, xExport, export, name + "_locl"); + if (export.InitialEvaluateOffsets is { Length: > 0 }) { XElement xScripts = new(_nsUix + "Scripts"); @@ -205,6 +208,10 @@ public partial class Decompiler PropertyListAddOnXElement(targetInstance2, targetListProperty, IrisObject.Create(valueToAdd, null, _context)); break; + + case OpCode.ConstructListenerStorage: + var listenerCount = (ushort)instruction.Operands.First().Value; + break; } } catch (Exception ex) diff --git a/test/ADDTOCOLLECTION.31_48_decomp.uix b/test/ADDTOCOLLECTION.31_48_decomp.uix index cf7fe87..47320fb 100644 --- a/test/ADDTOCOLLECTION.31_48_decomp.uix +++ b/test/ADDTOCOLLECTION.31_48_decomp.uix @@ -1,5 +1,5 @@ - + @@ -7,5 +7,13 @@ + + + + + + + + \ No newline at end of file