protected void LoadData() { List <PropertyReader.Property> props = PropertyReader.getPropList(pcc.Exports[index]); List <int> tracks = new List <int>(); foreach (PropertyReader.Property p in props) { if (pcc.getNameEntry(p.Name) == "m_fSceneLength") { m_fSceneLength = BitConverter.ToSingle(p.raw, 24); } else if (pcc.getNameEntry(p.Name) == "m_fPlayRate") { m_fPlayRate = BitConverter.ToSingle(p.raw, 24); } else if (pcc.getNameEntry(p.Name) == "m_aBioPreloadData") { int pos = 28; int count = BitConverter.ToInt32(p.raw, 24); for (int j = 0; j < count; j++) { List <PropertyReader.Property> p2 = PropertyReader.ReadProp(pcc, p.raw, pos); BioResourcePreloadItem key = new BioResourcePreloadItem(); for (int i = 0; i < p2.Count; i++) { if (pcc.getNameEntry(p2[i].Name) == "pObject") { key.pObject = p2[i].Value.IntValue; } else if (pcc.getNameEntry(p2[i].Name) == "nKeyIndex") { key.nKeyIndex = p2[i].Value.IntValue; } else if (pcc.getNameEntry(p2[i].Name) == "fTime") { key.fTime = BitConverter.ToSingle(p2[i].raw, 24); } else if (pcc.getNameEntry(p2[i].Name) == "bPreloadFired") { key.bPreloadFired = p2[i].Value.IntValue != 0; } pos += p2[i].raw.Length; } m_aBioPreloadData.Add(key); } } } }
protected void LoadData() { List<PropertyReader.Property> props = PropertyReader.getPropList(pcc.Exports[index]); List<int> tracks = new List<int>(); foreach (PropertyReader.Property p in props) { if (pcc.getNameEntry(p.Name) == "m_fSceneLength") m_fSceneLength = BitConverter.ToSingle(p.raw, 24); else if (pcc.getNameEntry(p.Name) == "m_fPlayRate") m_fPlayRate = BitConverter.ToSingle(p.raw, 24); else if (pcc.getNameEntry(p.Name) == "m_aBioPreloadData") { int pos = 28; int count = BitConverter.ToInt32(p.raw, 24); for (int j = 0; j < count; j++) { List<PropertyReader.Property> p2 = PropertyReader.ReadProp(pcc, p.raw, pos); BioResourcePreloadItem key = new BioResourcePreloadItem(); for (int i = 0; i < p2.Count; i++) { if (pcc.getNameEntry(p2[i].Name) == "pObject") key.pObject = p2[i].Value.IntValue; else if (pcc.getNameEntry(p2[i].Name) == "nKeyIndex") key.nKeyIndex = p2[i].Value.IntValue; else if (pcc.getNameEntry(p2[i].Name) == "fTime") key.fTime = BitConverter.ToSingle(p2[i].raw, 24); else if (pcc.getNameEntry(p2[i].Name) == "bPreloadFired") key.bPreloadFired = p2[i].Value.IntValue != 0; pos += p2[i].raw.Length; } m_aBioPreloadData.Add(key); } } } }