Fixed bug in reading some PSO arrays

This commit is contained in:
dexy 2019-01-13 19:25:53 +11:00
parent 9506069e35
commit 6ecfe0f235
2 changed files with 5 additions and 4 deletions

View File

@ -2641,7 +2641,8 @@ namespace CodeWalker.GameFiles
{ }
if (entry.NameLower == "popgroups.ymt")
{ }
if (entry.NameLower == "clip_sets.ymt")
{ }
}
}

View File

@ -15909,7 +15909,7 @@ namespace CodeWalker.GameFiles
{
return null;
}
var entryoffset = (arr.Pointer & 0xFFFFFF) >> 12;
var entryoffset = (arr.Pointer >> 12) & 0xFFFFF;
var arrentry = pso.DataMapSection.Entries[(int)entryid - 1];
int totoffset = arrentry.Offset + (int)entryoffset;
uint[] readdata = ConvertDataArrayRaw<uint>(data, totoffset, arr.Count1);
@ -15949,7 +15949,7 @@ namespace CodeWalker.GameFiles
{
return null;
}
var entryoffset = (arr.Pointer & 0xFFFFFF) >> 12;
var entryoffset = (arr.Pointer >> 12) & 0xFFFFF;
var arrentry = pso.DataMapSection.Entries[(int)entryid - 1];
int totoffset = arrentry.Offset + (int)entryoffset;
float[] readdata = ConvertDataArrayRaw<float>(data, totoffset, arr.Count1);
@ -15978,7 +15978,7 @@ namespace CodeWalker.GameFiles
{
return null;
}
var entryoffset = (arr.Pointer & 0xFFFFFF) >> 12;
var entryoffset = (arr.Pointer >> 12) & 0xFFFFF;
var arrentry = pso.DataMapSection.Entries[(int)entryid - 1];
int totoffset = arrentry.Offset + (int)entryoffset;
ushort[] readdata = ConvertDataArrayRaw<ushort>(data, totoffset, arr.Count1);