public FileIndex(string uoFolder, string idxFile, string mulFile, int length)
{
m_Index = new Entry3D[length];
string idxPath = Path.Combine(uoFolder, idxFile);
string mulPath = Path.Combine(uoFolder, mulFile);
if( idxPath != null && mulPath != null )
{
using( FileStream index = new FileStream(idxPath, FileMode.Open, FileAccess.Read, FileShare.Read) )
{
BinaryReader bin = new BinaryReader(index);
m_Stream = new FileStream(mulPath, FileMode.Open, FileAccess.Read, FileShare.Read);
int count = (int)( index.Length / 12 );
for( int i = 0; i < count && i < length; ++i )
{
m_Index[i].lookup = bin.ReadInt32();
m_Index[i].length = bin.ReadInt32();
m_Index[i].extra = bin.ReadInt32();
}
for( int i = count; i < length; ++i )
{
m_Index[i].lookup = -1;
m_Index[i].length = -1;
m_Index[i].extra = -1;
}
}
}
}