diff --git a/.vs/AppInfoParser/v16/.suo b/.vs/AppInfoParser/v16/.suo
index 0e9234f..2be95d4 100644
Binary files a/.vs/AppInfoParser/v16/.suo and b/.vs/AppInfoParser/v16/.suo differ
diff --git a/AppInfoCli/CXMLCli.csproj b/AppInfoCli/CXMLCli.csproj
index 5ec3ec2..73c096b 100644
--- a/AppInfoCli/CXMLCli.csproj
+++ b/AppInfoCli/CXMLCli.csproj
@@ -75,6 +75,9 @@
MinimumRecommendedRules.ruleset
true
+
+ cxml.ico
+
..\packages\DotNetZip.1.13.3\lib\net40\DotNetZip.dll
@@ -102,5 +105,8 @@
+
+
+
\ No newline at end of file
diff --git a/AppInfoCli/CXMLReader.cs b/AppInfoCli/CXMLReader.cs
index bc1d153..8ece126 100644
--- a/AppInfoCli/CXMLReader.cs
+++ b/AppInfoCli/CXMLReader.cs
@@ -6,7 +6,7 @@ using General;
using System.IO;
using System.Text;
using System.Xml;
-
+using System.Globalization;
namespace CXML
{
@@ -102,7 +102,7 @@ namespace CXML
public bool ProcessFiles = false;
public bool WaitExit = false;
-
+ public bool NoRecursive = false;
public void Init(string path, bool CheckMagic = true)
{
InfoFile = File.Open(path, FileMode.Open, FileAccess.Read);
@@ -479,6 +479,9 @@ namespace CXML
if (Extension == ".rcs") // Recursive Decompile, remove this if statement to remove RCS processing
{
+ if (NoRecursive)
+ return;
+
Console.WriteLine("Decompiling " + Path.GetFileName(FileName));
string DirectoryName = Path.Combine(FileDir, "converted", "RCStoXML", Path.GetFileNameWithoutExtension(FileName));
if (!Directory.Exists(DirectoryName))
@@ -611,7 +614,7 @@ namespace CXML
break;
case AttributeType.TYPE_FLOAT:
float FloatValue = bTreeTable.ReadSingle();
- AttributeValue = ((double)FloatValue).ToString() + "f";
+ AttributeValue = FloatValue.ToString("G9", CultureInfo.InvariantCulture) + "f";
Console.WriteLine("Float - Value: " + AttributeValue.ToString() + " sz:" + bTreeTable.ReadInt32());
break;
case AttributeType.TYPE_STRING:
@@ -640,11 +643,11 @@ namespace CXML
int HashTableOffset = bTreeTable.ReadInt32();
int HashTableSize = bTreeTable.ReadInt32();
HashIDTable.Seek(HashTableOffset * 4, SeekOrigin.Begin);
- Console.WriteLine("Hash ID Offset:" + HashTableOffset.ToString() + " size: " + HashTableSize);
+ Console.WriteLine("Hash ID Offset:" + HashTableOffset.ToString(CultureInfo.InvariantCulture) + " size: " + HashTableSize);
int HashId = bHashIDTable.ReadInt32();
- AttributeValue = HashId.ToString("X8");
+ AttributeValue = HashId.ToString("X8", CultureInfo.InvariantCulture);
break;
case AttributeType.TYPE_INTEGER_ARRAY:
@@ -673,7 +676,7 @@ namespace CXML
for(int i = 0; i < FloatArraySize; i++)
{
FloatValue = bFloatArrayTable.ReadSingle();
- StrList.Add(((double)FloatValue).ToString() +"f");
+ StrList.Add(FloatValue.ToString("G9", CultureInfo.InvariantCulture) +"f");
}
string[] StrArray = StrList.ToArray();
AttributeValue = "[" + String.Join(", ", StrArray) + "]";
@@ -689,7 +692,7 @@ namespace CXML
string FileHash = Tools.GenerateHash(FileData);
string FileSmallHash = Tools.GenerateShortHash(FileData);
String Extension = Tools.GetFileExtension(FileData);
- String FileName = Path.Combine(FileDir, "original", FilePtr.ToString("X")+"-"+FileHash + Extension);
+ String FileName = Path.Combine(FileDir, "original", FilePtr.ToString("X", CultureInfo.InvariantCulture) +"-"+FileHash + Extension);
String IdealName = ElementName + "-" + AttributeName + "-" + FileSmallHash + Extension;
if (!File.Exists(FileName))
{
diff --git a/AppInfoCli/GimConv.cs b/AppInfoCli/GimConv.cs
index e05aaf1..23ebefd 100644
--- a/AppInfoCli/GimConv.cs
+++ b/AppInfoCli/GimConv.cs
@@ -1,11 +1,7 @@
using Ionic.Zip;
using System;
-using System.Collections.Generic;
using System.IO;
-using System.Linq;
using System.Net;
-using System.Text;
-using System.Threading.Tasks;
namespace CXMLDecompiler
{
@@ -55,7 +51,7 @@ namespace CXMLDecompiler
zip.Dispose();
zipStream.Dispose();
- File.AppendAllText("GimConv\\GimConv.cfg", "option -psvindex8 {\r\n format_endian = little\r\n format_style = psp\r\n image_format = index8\r\n pixel_order = normal\r\n pixel_channel = rgba\r\n limit_image_width = 4096\r\n limit_image_height = 4096\r\n}");
+ File.AppendAllText("GimConv\\GimConv.cfg", "option -psvrgba8888 {\r\n format_endian = little\r\n format_style = psp\r\n image_format = rgba8888\r\n pixel_order = normal\r\n pixel_channel = rgba\r\n limit_image_width = 4096\r\n limit_image_height = 4096\r\n}\r\noption -psvindex4 {\r\n format_endian = little\r\n format_style = psp\r\n image_format = index4\r\n pixel_order = normal\r\n pixel_channel = rgba\r\n limit_image_width = 4096\r\n limit_image_height = 4096\r\n}\r\noption -psvindex8 {\r\n format_endian = little\r\n format_style = psp\r\n image_format = index8\r\n pixel_order = normal\r\n pixel_channel = rgba\r\n limit_image_width = 4096\r\n limit_image_height = 4096\r\n}");
DownloadCompleted = true;
}
diff --git a/AppInfoCli/Program.cs b/AppInfoCli/Program.cs
index e04364e..bdb165c 100644
--- a/AppInfoCli/Program.cs
+++ b/AppInfoCli/Program.cs
@@ -53,6 +53,7 @@ namespace CXMLCli
Console.WriteLine("\t-fat --dump-float-array Dump float array table.");
Console.WriteLine("\t-ft --dump-file Dump file table.");
Console.WriteLine("\t-p --process-files Process Extracted Files");
+ Console.WriteLine("\t-nr --no-recursive Do not recursively decompile .RCS to XML");
Console.WriteLine("\t-w --wait-exit Wait for keypress before exiting");
Console.WriteLine("\t-d --decompile Decompile CXML to XML.");
Console.WriteLine("\t-c --compile Compile XML to CXML");
@@ -189,6 +190,11 @@ namespace CXMLCli
cxmlParser.WaitExit = true;
}
+ if (HasArg(ArgsFull, "-nr") || HasArg(ArgsFull, "--no-recursive"))
+ {
+ cxmlParser.NoRecursive = true;
+ }
+
if (HasArg(ArgsFull, "-d") || HasArg(ArgsFull, "--decompile") && !HasArg(ArgsFull, "-dt"))
{
Console.WriteLine("Decompiling.");
diff --git a/AppInfoCli/Properties/AssemblyInfo.cs b/AppInfoCli/Properties/AssemblyInfo.cs
index 8acf2fc..0bcf651 100644
--- a/AppInfoCli/Properties/AssemblyInfo.cs
+++ b/AppInfoCli/Properties/AssemblyInfo.cs
@@ -5,13 +5,13 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("AppInfoCli")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyTitle("CXML Decompiler")]
+[assembly: AssemblyDescription("CXML Decompiler & Compiler")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("AppInfoCli")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCompany("SilicaAndPina Inc")]
+[assembly: AssemblyProduct("CXML Decompiler")]
+[assembly: AssemblyCopyright("Public Domain © 2021")]
+[assembly: AssemblyTrademark("CXML Decompiler is not a trademark of SilicaAndPina Inc")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("be72e673-25ff-47ab-af5b-9448b69e3990")]
+[assembly: Guid("7e3c8d27-de0C-45c1-96ed-a408f3c03b93")]
// Version information for an assembly consists of the following four values:
//
diff --git a/AppInfoCli/cxml.ico b/AppInfoCli/cxml.ico
new file mode 100644
index 0000000..a96e502
Binary files /dev/null and b/AppInfoCli/cxml.ico differ
diff --git a/AppInfoParser.sln b/AppInfoParser.sln
index 463d29a..caf8863 100644
--- a/AppInfoParser.sln
+++ b/AppInfoParser.sln
@@ -1,20 +1,26 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28010.2003
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31515.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CXMLCli", "AppInfoCli\CXMLCli.csproj", "{BE72E673-25FF-47AB-AF5B-9448B69E3990}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BE72E673-25FF-47AB-AF5B-9448B69E3990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE72E673-25FF-47AB-AF5B-9448B69E3990}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Debug|x64.ActiveCfg = Debug|x64
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Debug|x64.Build.0 = Debug|x64
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|Any CPU.ActiveCfg = Release|x64
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|Any CPU.Build.0 = Release|x64
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|x64.ActiveCfg = Release|x64
+ {BE72E673-25FF-47AB-AF5B-9448B69E3990}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE