/// <summary> /// Initializes a new instance of the <see cref="ugh_"/> class. /// </summary> /// <param name="meta">The meta.</param> /// <remarks></remarks> public ugh_(ref Meta.Meta meta) { BinaryReader BR = new BinaryReader(meta.MS); BR.BaseStream.Position = 16; int tempc = BR.ReadInt32(); int tempr = BR.ReadInt32() - meta.magic - meta.offset; BR.BaseStream.Position = tempr; SoundNamesTranslation = tempr; for (int x = 0; x < tempc; x++) { SoundNames.Add(meta.Map.Strings.Name[BR.ReadUInt16()]); ushort s = BR.ReadUInt16(); } BR.BaseStream.Position = 32; tempc = BR.ReadInt32(); tempr = BR.ReadInt32() - meta.magic - meta.offset; BR.BaseStream.Position = tempr; PermutationsTranslation = tempr; for (int x = 0; x < tempc; x++) { SoundPermutationChunk tempp = new SoundPermutationChunk(); tempp.unknown1 = BR.ReadInt32(); tempp.unknown2 = BR.ReadInt32(); tempp.choiceindex = BR.ReadUInt16(); tempp.choicecount = BR.ReadUInt16(); Permutations.Add(tempp); } BR.BaseStream.Position = 40; tempc = BR.ReadInt32(); tempr = BR.ReadInt32() - meta.magic - meta.offset; BR.BaseStream.Position = tempr; ChoicesTranslation = tempr; for (int x = 0; x < tempc; x++) { SoundChoiceChunk tempp = new SoundChoiceChunk(); tempp.NameIndex = BR.ReadUInt16(); tempp.Name = meta.Map.Strings.Name[tempp.NameIndex]; tempp.unknown1 = BR.ReadInt16(); tempp.unknown2 = BR.ReadInt32(); tempp.unknown3 = BR.ReadInt32(); tempp.soundindex = BR.ReadUInt16(); tempp.soundcount = BR.ReadUInt16(); Choices.Add(tempp); } BR.BaseStream.Position = 64; tempc = BR.ReadInt32(); tempr = BR.ReadInt32() - meta.magic - meta.offset; SoundChunk1Translation = tempr; for (int x = 0; x < tempc; x++) { BR.BaseStream.Position = tempr + (x * 12); SoundType1Chunk tempp = new SoundType1Chunk(); tempp.offset = BR.ReadInt32(); tempp.size = BR.ReadUInt16(); meta.Map.Functions.ParsePointer(ref tempp.offset, ref tempp.rawLocation); tempp.unknown1 = BR.ReadUInt16(); tempp.unknown2 = BR.ReadInt32(); SoundChunks1.Add(tempp); } BR.BaseStream.Position = 80; tempc = BR.ReadInt32(); tempr = BR.ReadInt32() - meta.magic - meta.offset; for (int x = 0; x < tempc; x++) { BR.BaseStream.Position = tempr + (x * 12) + 8; SoundType2Chunk tempp = new SoundType2Chunk(); tempp.offset = BR.ReadInt32(); tempp.size = BR.ReadInt32(); meta.Map.Functions.ParsePointer(ref tempp.offset, ref tempp.rawLocation); SoundChunks2.Add(tempp); } }