public static void Output(Blam.Halo3.CacheFileBase c, System.IO.StreamWriter s, TI.Block <cache_file_resource_gestalt_200_block> block) { const string format = "\t{0}\t\t{1}\t{2}\t{3}" ; s.WriteLine("{0}\tcache_file_resource_gestalt_200_block", block.Count); int x = 0; foreach (cache_file_resource_gestalt_200_block def in block) { if (def.TagIndex.Value != -1) { s.WriteLine(format, x.ToString(), def.Unknown08.Value.ToString("X8"), def.Unknown0C.Value.ToString("X8"), c.GetTagIndexName((DatumIndex)def.TagIndex.Value, true) ); } else { s.WriteLine("NULL"); } x++; } }
public static void Output(Blam.Halo3.CacheFileBase c, System.IO.StreamWriter s, cache_file_resource_gestalt_group def) { resource_type_block.Output(s, def.ResourceTypes); s.WriteLine(); resource_structure_type_block.Output(s, def.ResourceStructureTypes); s.WriteLine(); cache_file_resource_gestalt_tag_resource_block.Output(s, def.TagResources); s.WriteLine(); cache_file_resource_gestalt_64_block.Output(s, def.Block64, "64-general"); cache_file_resource_gestalt_64_block.Output(s, def.Block70, "70-global"); cache_file_resource_gestalt_64_block.Output(s, def.Block7C, "7C-attached?"); cache_file_resource_gestalt_64_block.Output(s, def.Block88, "88-unattached"); cache_file_resource_gestalt_64_block.Output(s, def.Block94, "94-dvd_forbidden"); cache_file_resource_gestalt_64_block.Output(s, def.BlockA0, "A0-dvd_always_streaming"); cache_file_resource_gestalt_64_block.Output(s, def.BlockAC, "AC-bsp zones-1"); cache_file_resource_gestalt_64_block.Output(s, def.BlockB8, "B8-bsp zones-2"); cache_file_resource_gestalt_64_block.Output(s, def.BlockC4, "C4-bsp zones-3"); cache_file_resource_gestalt_64_block.Output(s, def.BlockD0, "D0-?"); cache_file_resource_gestalt_64_block.Output(s, def.BlockDC, "DC-zone sets"); cache_file_resource_gestalt_100_block.Output(s, def.Block100); cache_file_resource_gestalt_164_block.Output(s, def.Block164); Output(s, def.Block1D0); s.WriteLine(); cache_file_resource_gestalt_1DC_block.Output(s, def.Block1DC); s.WriteLine(); cache_file_resource_gestalt_1E8_block.Output(s, def.Block1E8); s.WriteLine(); cache_file_resource_gestalt_1F4_block.Output(s, def.Block1F4); s.WriteLine(); cache_file_resource_gestalt_200_block.Output(c, s, def.Block200); s.WriteLine(); }
public void ToString(int index, Blam.Halo3.CacheFileBase cf, StreamWriter sw) { if (tag_index.Index == ushort.MaxValue) { sw.WriteLine("{0:X}\t(NULL)", index); return; } var ci = cf.IndexHalo3[tag_index.Index]; sw.WriteLine("{0:X}\t{1} {2}", index, ci.GroupTag.Name, cf.GetReferenceName(ci)); sw.WriteLine( "\ttype: {0}" + Program.NewLine + "\tstart: {1:X}" + Program.NewLine + "\tsize: {2:X}" + Program.NewLine + "\toffset: {3:X}" + Program.NewLine + "\tresources: {4:X}\t{5:X}" + Program.NewLine + "\tdefinitions: {6:X}\t{7:X}", resource_type, start_offset, total_size, offset, resources_count, resources_offset, definitions_count, definitions_offset ); }
public void Read(Blam.Halo3.CacheFileBase cf) { cf.InputStream.Seek(4 + 4 + 4, SeekOrigin.Current); tag_index.Read(cf.InputStream); cf.InputStream.ReadInt16(); resource_type = cf.InputStream.ReadByte(); cf.InputStream.ReadByte(); start_offset = cf.InputStream.ReadInt32(); total_size = cf.InputStream.ReadInt32(); offset = cf.InputStream.ReadInt32(); cf.InputStream.ReadInt16(); cf.InputStream.ReadInt16(); cf.InputStream.ReadInt32(); resources_count = cf.InputStream.ReadInt32(); resources_offset = cf.InputStream.ReadPointer(); cf.InputStream.ReadInt32(); definitions_count = cf.InputStream.ReadInt32(); definitions_offset = cf.InputStream.ReadPointer(); cf.InputStream.ReadInt32(); }