mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-09 22:55:09 +08:00
FxcFile Save method and loading improvements
This commit is contained in:
parent
9904e92082
commit
a2f34ddf05
File diff suppressed because it is too large
Load Diff
@ -217,6 +217,7 @@ namespace CodeWalker.GameFiles
|
||||
//TestYmaps();
|
||||
//TestYpdbs();
|
||||
//TestMrfs();
|
||||
//TestFxcs();
|
||||
//TestPlacements();
|
||||
//TestDrawables();
|
||||
//TestCacheFiles();
|
||||
@ -4550,6 +4551,44 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TestFxcs()
|
||||
{
|
||||
foreach (RpfFile file in AllRpfs)
|
||||
{
|
||||
foreach (RpfEntry entry in file.AllEntries)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (entry.NameLower.EndsWith(".fxc"))
|
||||
{
|
||||
UpdateStatus(string.Format(entry.Path));
|
||||
var fxcfile = RpfMan.GetFile<FxcFile>(entry);
|
||||
if (fxcfile != null)
|
||||
{
|
||||
var odata = entry.File.ExtractFile(entry as RpfFileEntry);
|
||||
var ndata = fxcfile.Save();
|
||||
if (ndata.Length == odata.Length)
|
||||
{
|
||||
for (int i = 0; i < ndata.Length; i++)
|
||||
{
|
||||
if (ndata[i] != odata[i])
|
||||
{ break; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UpdateStatus("Error! " + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void TestPlacements()
|
||||
{
|
||||
//int totplacements = 0;
|
||||
|
@ -79,14 +79,7 @@ namespace CodeWalker.Forms
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(fxc.LastError))
|
||||
{
|
||||
StatusLabel.Text = fxc.LastError;
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusLabel.Text = (fxc.Shaders?.Length??0).ToString() + " shaders, " + (fxc.Techniques?.Length??0).ToString() + " techniques";
|
||||
}
|
||||
StatusLabel.Text = (fxc.Shaders?.Length??0).ToString() + " shaders, " + (fxc.Techniques?.Length??0).ToString() + " techniques";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user