Ejemplo n.º 1
0
		public void Read(BlamLib.IO.EndianReader s)
		{
			char[] tag = s.ReadTag();
			if (!TagInterface.TagGroup.Test(tag, Ext))
				throw new Debug.ExceptionLog("File '{0}' had a bad header '{1}'", s.FileName, new string(tag));

			int count = s.ReadInt32();

			//Names = new List<string>(count);
			//ScenarioOffsets = new List<int>(count);

			for (int x = 0; x < count; x++)
			{
				Names.Add(s.ReadString());
				Scenarios.Add(s.ReadString());
			}
		}
Ejemplo n.º 2
0
		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);
		}