Beispiel #1
0
		public override object Read(BinaryReader br)
		{
			var m = new Modulator();
			m.SourceModulationData = new ModulatorType(br.ReadUInt16());
			m.DestinationGenerator = (GeneratorEnum) br.ReadUInt16();
			m.Amount = br.ReadInt16();
			m.SourceModulationAmount = new ModulatorType(br.ReadUInt16());
			m.SourceTransform = (TransformEnum) br.ReadUInt16();
			data.Add(m);
			return m;
		}
Beispiel #2
0
        public override object Read(BinaryReader br)
        {
            var m = new Modulator();

            m.SourceModulationData = new ModulatorType(br.ReadUInt16());
            m.DestinationGenerator = (GeneratorEnum)br.ReadUInt16();
            m.Amount = br.ReadInt16();
            m.SourceModulationAmount = new ModulatorType(br.ReadUInt16());
            m.SourceTransform        = (TransformEnum)br.ReadUInt16();
            data.Add(m);
            return(m);
        }
Beispiel #3
0
		public void Load(Modulator[] modulators, Generator[] generators)
		{
			// don't do the last zone, which is simply EOZ
			for (int zone = 0; zone < data.Count - 1; zone++)
			{
				var z = (Zone) data[zone];
				z.Generators = new Generator[z.generatorCount];
				Array.Copy(generators, z.generatorIndex, z.Generators, 0, z.generatorCount);
				z.Modulators = new Modulator[z.modulatorCount];
				Array.Copy(modulators, z.modulatorIndex, z.Modulators, 0, z.modulatorCount);
			}
			// we can get rid of the EOP record now
			data.RemoveAt(data.Count - 1);
		}