public void Read(BlamLib.IO.EndianReader s) { if (!MiscGroups.crdb.Test(s.ReadTag())) { throw new Debug.ExceptionLog("{0} is not a resource db!", s.FileName); } if (s.ReadInt32() != kVersion) { throw new Debug.ExceptionLog("{0} is an unsupported db!", s.FileName); } items = new List <CacheResourceDatabaseItem>(s.ReadInt32()); for (int x = 0; x < items.Count; x++) { (items[x] = new CacheResourceDatabaseItem()).Read(s); } }
public void Read(BlamLib.IO.EndianReader s) { if (!MiscGroups.crdb.Test(s.ReadTag())) throw new Debug.ExceptionLog("{0} is not a resource db!", s.FileName); if (s.ReadInt32() != kVersion) throw new Debug.ExceptionLog("{0} is an unsupported db!", s.FileName); items = new List<CacheResourceDatabaseItem>(s.ReadInt32()); for(int x = 0; x < items.Count; x++) (items[x] = new CacheResourceDatabaseItem()).Read(s); }