コード例 #1
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(32);
     serSoundSamples = new SerializeData();
     serSoundSamples.Parse(buffer);
     //still checking variablearrays
     this.SoundSamples = new List<SoundSample>( buffer.ReadInt(0) );
     for(int loop12 = 0; loop12 < _SoundSamples.Count; loop12++)
     {
         _SoundSamples[loop12] = new SoundSample();
         _SoundSamples[loop12].Parse(buffer);
     }
     serSampleTimestamps = new SerializeData();
     serSampleTimestamps.Parse(buffer);
     //still checking variablearrays
     this.SampleTimestamps = new List<long>( buffer.ReadInt(0) );
     for(int loop12 = 0; loop12 < _SampleTimestamps.Count; loop12++)
     {
         _SampleTimestamps[loop12] = buffer.ReadInt64(0);
     }
     Field5 = buffer.ReadInt(32);
 }
コード例 #2
0
 public void FileRead(MpqFileStream stream, long offset)
 {
     stream.Position = offset + 20;
     Field0 = stream.ReadValueS32();
     stream.Position = offset + 12;
     serSoundSamples = new SerializeData();
     serSoundSamples.FileRead(stream, stream.Position);
     stream.Position = offset + 24;
     //still checking variablearrays
     SoundSamples = new List<SoundSample>();
     for(int i = 0; i < (int)(serSoundSamples.Field1 / 680); i++)
     {
     stream.Position = serSoundSamples.Field0 + 16 + (680*i) ;
         SoundSample temp12_SoundSamples;
         temp12_SoundSamples = new SoundSample();
         temp12_SoundSamples.FileRead(stream, stream.Position);
         _SoundSamples.Add(temp12_SoundSamples);
     }
     stream.Position = offset + 28;
     serSampleTimestamps = new SerializeData();
     serSampleTimestamps.FileRead(stream, stream.Position);
     stream.Position = offset + 36;
     //still checking variablearrays
     SampleTimestamps = new List<long>();
     for(int i = 0; i < (int)(serSampleTimestamps.Field1 / 8); i++)
     {
     stream.Position = serSampleTimestamps.Field0 + 16 + (8*i) ;
         long temp12_SampleTimestamps;
         temp12_SampleTimestamps = stream.ReadValueS64();
         _SampleTimestamps.Add(temp12_SampleTimestamps);
     }
     stream.Position = offset + 40;
     Field5 = stream.ReadValueS32();
 }