public TagGroup(Import.TagGroup def) { tagGroup = def; }
public Struct(Import.Struct def) { tagStruct = def; }
public void Reset(Import.TagGroup def) { tagGroup = def; }
public TagBlock(Import.TagBlock def) { tagBlock = def; }
public void Reset(Import.Struct def) { tagStruct = def; }
public FieldSet(Import.FieldSet def) { fieldSet = def; }
public void Reset(Import.TagBlock def) { tagBlock = def; }
internal override IField ConstructField(Import.Field def) { return new Field(def); }
public void Reset(Import.FieldSet def) { fieldSet = def; }
public Field(Import.Field def) { field = def; }
public void Reset(Import.Field def) { field = def; }
public TagData(Import.TagData def) : base(def) { }
/// <summary> /// Implementation constructor /// </summary> /// <param name="proj">Project which this state will work with</param> public ProjectState(BlamLib.CheApe.Project proj) : base(BlamVersion.Halo2_PC, proj) { importer = new Import(); compiler = new Compiler(this); }
public override void Write(IO.EndianWriter stream) { const int k_alignment = Compiler.kDefaultAlignment; int align; using (var mem = InitializeMemoryStream()) { DynamicTagGroups.Write(MemoryStream); // write the data array to the stream MemoryStream.Write((int)0); MemoryStream.Write((int)0); // alignment StringPoolToMemoryStream(); Import import = OwnerState.Importer as Import; FixupsToMemoryStream(); #region Scripting { } #endregion EnumerationsToMemoryStream(); TagReferencesToMemoryStream(); TagDataToMemoryStream(); #region TagBlock TagBlock tb = new TagBlock(); foreach (Import.TagBlock tagb in import.Blocks.Values) { tb.Reset(tagb); tb.Write(MemoryStream); } #endregion #region Struct Struct strct = new Struct(); foreach (Import.Struct tags in import.Structs.Values) { strct.Reset(tags); strct.Write(MemoryStream); } #endregion #region TagGroup TagGroup tg = new TagGroup(); foreach (Import.TagGroup tagg in import.Groups.Values) { tg.Reset(tagg); tg.Write(MemoryStream); } #endregion PostprocessWritebacks(); // Create header PostprocessHeaderThenStream(stream, CalculateStringPoolBaseAddress()); mem.WriteTo(stream.BaseStream); // write all the data that will be read into memory from a tool to the file } align = k_alignment - (stream.Length % k_alignment); if (align != k_alignment) { stream.Write(new byte[align]); } }