예제 #1
0
 // Inherited
 public override void Clear()
 {
     DelayTime   = 0;
     DecayFactor = 0;
     Echo        = 0;
     Samples     = new SampleIndex[20];
     //
     Data           = new byte[17]; // 16 for 8 channel pointers
     Data[0]        = 0xFF;         // terminates percussive list
     Percussives    = new List <Percussive>();
     ActiveChannels = new bool[8];
     Channels       = new List <Command> [8];
     for (int i = 0; i < 8; i++)
     {
         Channels[i] = new List <Command>();
     }
 }
예제 #2
0
        // Read from ROM
        private void ReadFromROM()
        {
            int offset = Bits.GetInt24(rom, Index * 3 + 0x042748) - 0xC00000;

            DelayTime   = rom[offset++];
            DecayFactor = rom[offset++];
            Echo        = rom[offset++];
            Samples     = new SampleIndex[20];
            int i = 0;

            while (rom[offset] != 0xFF && i < 20)
            {
                Samples[i++] = new SampleIndex(rom[offset++], rom[offset++]);
            }
            offset++;
            Length = Bits.GetShort(rom, offset); offset += 2;
            Data   = Bits.GetBytes(rom, offset, Length);
            //
            ParseScript();
        }