mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 00:43:00 +08:00
Dat151 progress
This commit is contained in:
parent
77d9c4e4c8
commit
2d77d76e0c
@ -762,9 +762,20 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//var sorted = RelDatasSorted.ToList();
|
//for the correct index ordering, needs to be in order of hashes, but with bits rotated right by 8 (why!?)
|
||||||
|
var sorted = RelDatasSorted.ToList();
|
||||||
//sorted.Sort((a, b) => { return ((uint)a.NameHash).CompareTo((uint)b.NameHash); });
|
//sorted.Sort((a, b) => { return ((uint)a.NameHash).CompareTo((uint)b.NameHash); });
|
||||||
//RelDatas = sorted.ToArray();
|
sorted.Sort((a, b) =>
|
||||||
|
{
|
||||||
|
var ah = (uint)a.NameHash;
|
||||||
|
var bh = (uint)b.NameHash;
|
||||||
|
var av = (ah >> 8) | (ah << 24);
|
||||||
|
var bv = (bh >> 8) | (bh << 24);
|
||||||
|
return av.CompareTo(bv);
|
||||||
|
});
|
||||||
|
RelDatas = sorted.ToArray();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var hashes = new RelIndexHash[RelDatas.Length];
|
var hashes = new RelIndexHash[RelDatas.Length];
|
||||||
for (int i = 0; i < RelDatas.Length; i++)
|
for (int i = 0; i < RelDatas.Length; i++)
|
||||||
|
@ -2121,6 +2121,7 @@ namespace CodeWalker.GameFiles
|
|||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
StringBuilder sbh = new StringBuilder();
|
StringBuilder sbh = new StringBuilder();
|
||||||
|
StringBuilder sbi = new StringBuilder();
|
||||||
|
|
||||||
foreach (RpfFile rpf in RpfMan.AllRpfs)
|
foreach (RpfFile rpf in RpfMan.AllRpfs)
|
||||||
{
|
{
|
||||||
@ -2222,7 +2223,7 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < data.Length; i++) //raw file test
|
for (int i = 0; i < data.Length; i++) //raw file test
|
||||||
if (data[i] != rel.RawFileData[i])
|
if (data[i] != rel.RawFileData[i])
|
||||||
{ }
|
{ break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2235,6 +2236,15 @@ namespace CodeWalker.GameFiles
|
|||||||
if (rel2.RelDatas == null)
|
if (rel2.RelDatas == null)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//sbi.Clear();
|
||||||
|
//foreach (var rd in rel.RelDatas)
|
||||||
|
//{
|
||||||
|
// sbi.AppendLine(new FlagsUint(rd.NameHash).Bin);
|
||||||
|
//}
|
||||||
|
//string indexbinstr = sbi.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user