Skip to content

Commit

Permalink
alpha 4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
atenfyr committed Apr 22, 2022
1 parent 38dc899 commit 1b89f19
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 77 deletions.
12 changes: 6 additions & 6 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private void GetUnknownProperties(PropertyData dat)
}
else if (dat is MapPropertyData mapDat)
{
foreach (var entry in mapDat.Value)
foreach (var entry in mapDat.Value)
{
GetUnknownProperties(entry.Key);
GetUnknownProperties(entry.Value);
Expand Down Expand Up @@ -380,7 +380,7 @@ public void LoadFileAt(string filePath)
dataGridView1.Columns.Clear();
dataGridView1.Rows.Clear();
UAGPalette.RefreshTheme(this);
switch(ex)
switch (ex)
{
case IOException _:
MessageBox.Show("Failed to open this file! Please make sure the specified engine version is correct.", "Uh oh!");
Expand Down Expand Up @@ -550,7 +550,7 @@ private void dataGridClickCell(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.CurrentCell != null && dataGridView1.CurrentCell.Style != null && dataGridView1.CurrentCell.Style.Font != null && dataGridView1.CurrentCell.Style.Font.Underline == true)
{
switch(dataGridView1.CurrentCell.Tag)
switch (dataGridView1.CurrentCell.Tag)
{
case "CategoryJump":
DataGridViewCell previousCell = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[dataGridView1.CurrentCell.ColumnIndex - 1];
Expand Down Expand Up @@ -698,7 +698,7 @@ public void ForceResize()
byteView1.Refresh();
}

if (jsonView != null)
if (jsonView != null)
{
jsonView.Size = dataGridView1.Size;
jsonView.Location = dataGridView1.Location;
Expand All @@ -720,7 +720,7 @@ private void frm_closing(object sender, FormClosingEventArgs e)
if (!existsUnsavedChanges) return;

DialogResult res = MessageBox.Show("Do you want to save your changes?", DisplayVersion, MessageBoxButtons.YesNoCancel);
switch(res)
switch (res)
{
case DialogResult.Yes:
if (!ForceSave(currentSavingPath)) e.Cancel = true;
Expand Down Expand Up @@ -911,7 +911,7 @@ private void replaceAllReferencesToolStripMenuItem_Click(object sender, EventArg
{
DisplayText = "Enter a string to replace references of this name with"
};

if (replacementPrompt.ShowDialog(this) == DialogResult.OK)
{
FString newTxt = FString.FromString(replacementPrompt.OutputText);
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]
[assembly: AssemblyVersion("1.0.0.4")]
[assembly: AssemblyFileVersion("1.0.0.4")]
132 changes: 66 additions & 66 deletions TableHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,82 +131,82 @@ public void FillOutTree()
switch (baseUs)
{
case RawExport us3:
{
var parentNode = new PointingTreeNode("Raw Data (" + us3.Data.Length + " B)", us3.Data);
categoryNode.Nodes.Add(parentNode);
break;
}
case NormalExport us:
{
var parentNode = new PointingTreeNode((baseUs.ClassIndex.IsImport() ? baseUs.ClassIndex.ToImport(asset).ObjectName.Value.Value : baseUs.ClassIndex.Index.ToString()) + " (" + us.Data.Count + ")", us);
categoryNode.Nodes.Add(parentNode);

for (int j = 0; j < us.Data.Count; j++) InterpretThing(us.Data[j], parentNode);

if (us is StringTableExport us2)
{
var parentNode2 = new PointingTreeNode(us2.Table.TableNamespace + " (" + us2.Table.Count + ")", us2.Table);
categoryNode.Nodes.Add(parentNode2);
var parentNode = new PointingTreeNode("Raw Data (" + us3.Data.Length + " B)", us3.Data);
categoryNode.Nodes.Add(parentNode);
break;
}

if (us is StructExport structUs)
case NormalExport us:
{
var parentNode2 = new PointingTreeNode("UStruct Data", structUs, PointingTreeNodeType.StructData);
categoryNode.Nodes.Add(parentNode2);
if (structUs.ScriptBytecode == null)
var parentNode = new PointingTreeNode((baseUs.ClassIndex.IsImport() ? baseUs.ClassIndex.ToImport(asset).ObjectName.Value.Value : baseUs.ClassIndex.Index.ToString()) + " (" + us.Data.Count + ")", us);
categoryNode.Nodes.Add(parentNode);

for (int j = 0; j < us.Data.Count; j++) InterpretThing(us.Data[j], parentNode);

if (us is StringTableExport us2)
{
var bytecodeNode = new PointingTreeNode("ScriptBytecode (" + structUs.ScriptBytecodeRaw.Length + " B)", structUs.ScriptBytecodeRaw, PointingTreeNodeType.Normal);
parentNode2.Nodes.Add(bytecodeNode);
var parentNode2 = new PointingTreeNode(us2.Table.TableNamespace + " (" + us2.Table.Count + ")", us2.Table);
categoryNode.Nodes.Add(parentNode2);
}
else

if (us is StructExport structUs)
{
var bytecodeNode = new PointingTreeNode("ScriptBytecode (" + structUs.ScriptBytecode.Length + " instructions)", structUs.ScriptBytecode, PointingTreeNodeType.Normal);
parentNode2.Nodes.Add(bytecodeNode);
var parentNode2 = new PointingTreeNode("UStruct Data", structUs, PointingTreeNodeType.StructData);
categoryNode.Nodes.Add(parentNode2);
if (structUs.ScriptBytecode == null)
{
var bytecodeNode = new PointingTreeNode("ScriptBytecode (" + structUs.ScriptBytecodeRaw.Length + " B)", structUs.ScriptBytecodeRaw, PointingTreeNodeType.Normal);
parentNode2.Nodes.Add(bytecodeNode);
}
else
{
var bytecodeNode = new PointingTreeNode("ScriptBytecode (" + structUs.ScriptBytecode.Length + " instructions)", structUs.ScriptBytecode, PointingTreeNodeType.Normal);
parentNode2.Nodes.Add(bytecodeNode);
}
}
}

if (us is ClassExport)
{
var parentNode2 = new PointingTreeNode("UClass Data", (ClassExport)us, PointingTreeNodeType.ClassData);
categoryNode.Nodes.Add(parentNode2);
}

if (us is PropertyExport)
{
var parentNode2 = new PointingTreeNode("UProperty Data", (PropertyExport)us, PointingTreeNodeType.UPropertyData);
categoryNode.Nodes.Add(parentNode2);
}
if (us is ClassExport)
{
var parentNode2 = new PointingTreeNode("UClass Data", (ClassExport)us, PointingTreeNodeType.ClassData);
categoryNode.Nodes.Add(parentNode2);
}

if (us is DataTableExport us4)
{
var parentNode2 = new PointingTreeNode("Table Info (" + us4.Table.Data.Count + ")", us4.Table);
categoryNode.Nodes.Add(parentNode2);
foreach (StructPropertyData entry in us4.Table.Data)
if (us is PropertyExport)
{
string decidedName = entry.Name.Value.Value;
var parentNode2 = new PointingTreeNode("UProperty Data", (PropertyExport)us, PointingTreeNodeType.UPropertyData);
categoryNode.Nodes.Add(parentNode2);
}

var structNode = new PointingTreeNode(decidedName + " (" + entry.Value.Count + ")", entry);
parentNode2.Nodes.Add(structNode);
for (int j = 0; j < entry.Value.Count; j++)
if (us is DataTableExport us4)
{
var parentNode2 = new PointingTreeNode("Table Info (" + us4.Table.Data.Count + ")", us4.Table);
categoryNode.Nodes.Add(parentNode2);
foreach (StructPropertyData entry in us4.Table.Data)
{
InterpretThing(entry.Value[j], structNode);
string decidedName = entry.Name.Value.Value;

var structNode = new PointingTreeNode(decidedName + " (" + entry.Value.Count + ")", entry);
parentNode2.Nodes.Add(structNode);
for (int j = 0; j < entry.Value.Count; j++)
{
InterpretThing(entry.Value[j], structNode);
}
}
}
}

if (us is EnumExport us5)
{
var parentNode2 = new PointingTreeNode("Enum Data", us5, PointingTreeNodeType.EnumData);
categoryNode.Nodes.Add(parentNode2);
}
if (us is EnumExport us5)
{
var parentNode2 = new PointingTreeNode("Enum Data", us5, PointingTreeNodeType.EnumData);
categoryNode.Nodes.Add(parentNode2);
}

{
var parentNode3 = new PointingTreeNode("Extra Data (" + us.Extras.Length + " B)", us.Extras);
categoryNode.Nodes.Add(parentNode3);
}
{
var parentNode3 = new PointingTreeNode("Extra Data (" + us.Extras.Length + " B)", us.Extras);
categoryNode.Nodes.Add(parentNode3);
}

break;
}
break;
}
}
}

Expand Down Expand Up @@ -629,7 +629,7 @@ private PropertyData RowToPD(int rowNum, PropertyData original)
case TextHistoryType.Base:
if (value1B == null || value2B == null || value3B == null || !(value1B is string) || !(value2B is string) || !(value3B is string)) return null;
decidedTextData.Namespace = (string)value1B == FString.NullCase ? null : FString.FromString((string)value1B);
decidedTextData.Value = (string)value2B == FString.NullCase ? null : FString.FromString((string)value2B);
decidedTextData.Value = (string)value2B == FString.NullCase ? null : FString.FromString((string)value2B);
decidedTextData.CultureInvariantString = (string)value3B == FString.NullCase ? null : FString.FromString((string)value3B);
break;
case TextHistoryType.StringTableEntry:
Expand Down Expand Up @@ -1000,7 +1000,7 @@ public void Load() // Updates the table with selected asset data
switch (pointerNode.Pointer)
{
case NormalExport usCategory:
switch(pointerNode.Type)
switch (pointerNode.Type)
{
case PointingTreeNodeType.Normal:
for (int num = 0; num < usCategory.Data.Count; num++)
Expand Down Expand Up @@ -1262,7 +1262,7 @@ public void Load() // Updates the table with selected asset data
standardRendering = false;
break;
}

break;
case FStringTable strUs:
{
Expand Down Expand Up @@ -1710,7 +1710,7 @@ public void Save(bool forceNewLoad) // Reads from the table and updates the asse
}
else
{
asset.DependsMap.Insert(vals[0], new int[]{ vals[1] });
asset.DependsMap.Insert(vals[0], new int[] { vals[1] });
}
}
break;
Expand Down Expand Up @@ -1844,7 +1844,7 @@ public void Save(bool forceNewLoad) // Reads from the table and updates the asse
}
else if (pointerNode.Pointer is NormalExport usCat)
{
switch(pointerNode.Type)
switch (pointerNode.Type)
{
case PointingTreeNodeType.Normal:
List<PropertyData> newData = new List<PropertyData>();
Expand All @@ -1870,7 +1870,7 @@ public void Save(bool forceNewLoad) // Reads from the table and updates the asse
{
var currRow = dataGridView1.Rows[i];
if (currRow == null || currRow.Cells.Count < 2) continue;

string enumFrontValue = (string)currRow.Cells[0].Value;
string enumValueValue = (string)currRow.Cells[1].Value;
if (enumFrontValue == "CppForm")
Expand All @@ -1887,7 +1887,7 @@ public void Save(bool forceNewLoad) // Reads from the table and updates the asse
}
break;
}

}
else if (pointerNode.Pointer is UDataTable dtUs)
{
Expand Down
9 changes: 6 additions & 3 deletions next_patch_notes.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
* Overhauled internal code and improved support for a variety of engine versions and assets (UAssetAPI 1.0).
* Overhauled internal code and vastly improved support for a variety of engine versions and assets (UAssetAPI 1.0).
* Added further BlueprintGeneratedClass, UFunction, and UserDefinedEnum support.
* Renamed tabs and fields to be more tool-agnostic.
* Added support for importing and exporting assets to and from a custom JSON format.
* Added support for displaying JSON for Kismet bytecode scripts (implemented by LongerWarrior).
* Added the ability to directly modify export preload dependencies for assets from games that use the event driven loader.
* Added many new shortcut keys.
* Added support for versioned assets.
* Added a new tab containing information about the CustomVersionContainer.
* Added a new tab containing information about the WorldTileInfo, if it exists.
* Added the ability to select an engine version to parse assets with.
* Added the ability to add new NormalExports (None-terminated UProperty list categories) within UAssetGUI.
* Added the ability to add new NormalExports (None-terminated UProperty list exports) within UAssetGUI.
* Added DPI awareness.
* Added the ability to manually change the encoding of entries in the name map (header list).
* Added more information while displaying TextProperty data.
* Added support for a variety of new properties.
* Renamed tabs and fields to be more tool-agnostic.

0 comments on commit 1b89f19

Please sign in to comment.