Ejemplo n.º 1
0
        public CacheExtractionInfo(CacheFile cf, DatumIndex tag_datum, CacheExtractionArguments args)
        {
            var bd = Program.GetManager(cf.EngineVersion);

            Database       = bd.CreateCacheTagDatabase(cf.CacheId);
            DatabaseErrors = bd.CreateErrorTagDatabase();

            root_definition = cf.Index.Tags[tag_datum.Index];
            Reset(root_definition);

            Arguments = args;
            Arguments.CreateOutputDirectory();
        }
Ejemplo n.º 2
0
		void ErrorDatabaseUpdate(TagManager tm)
		{
			if (!tm.ContainsBadReferences) return;

			if(errorDatabase == null) // If this is the first tag to have errors, we need to create the database now
				errorDatabase = Program.GetManager(engine).CreateErrorTagDatabase();

			// Add our 'root' tag, which isn't problematic
			errorDatabase.SetRoot(tm.Name, tm.GroupTag.ID);

			foreach(TagInterface.TagReference tr in tm.BadRefereces)
			{
				ErrorTagDatabase.ErrorFlags ef;

				// determine what problem we had with this reference
				if (tr.Datum == kSkipped)					ef = ErrorTagDatabase.ErrorFlags.Skipped;
				else if (tr.Datum == kMissing)				ef = ErrorTagDatabase.ErrorFlags.Missing;
				else if (tr.Datum == kVersionInvalid)		ef = ErrorTagDatabase.ErrorFlags.InvalidVersion;
				else if (tr.Datum == Blam.DatumIndex.Null)	ef = ErrorTagDatabase.ErrorFlags.Failure;
				else throw new Debug.Exceptions.UnreachableException(tr.Datum);

				// add this reference to the database under our 'root' tag
				int hash_value = errorDatabase.AddDependent(refManager[tr.ReferenceId], tr.GroupTagInt, ef);

				errorDatabaseBadTagHashes.Add(hash_value);
			}
		}
Ejemplo n.º 3
0
		public CacheExtractionInfo(CacheFile cf, DatumIndex tag_datum, CacheExtractionArguments args)
		{
			var bd = Program.GetManager(cf.EngineVersion);
			Database = bd.CreateCacheTagDatabase(cf.CacheId);
			DatabaseErrors = bd.CreateErrorTagDatabase();

			root_definition = cf.Index.Tags[tag_datum.Index];
			Reset(root_definition);

			Arguments = args;
			Arguments.CreateOutputDirectory();
		}