public void Assemble(ref int offset) { if (index == 0) { return; } //int offset = Bits.Get24Bit(data, index * 3 + 0x042748) - 0xC00000; Bits.SetInt24(rom, index * 3 + 0x42748, offset + 0xC00000); rom[offset++] = DelayTime; rom[offset++] = DecayFactor; rom[offset++] = Echo; foreach (SampleIndex sample in samples) { if (sample == null || !sample.Active) { continue; } rom[offset++] = (byte)sample.Sample; rom[offset++] = (byte)sample.Volume; } rom[offset++] = 0xFF; Bits.SetShort(rom, offset, Length); offset += 2; // AssembleSPCData(); Bits.SetBytes(rom, offset, spcData); offset += spcData.Length; }
private void ExportPalette(byte[] array, int offset) { for (int i = 0; checkBox1.Checked && i < paletteSet.Palettes.Length; i++) { for (int a = 0; a < 16; a++) { Bits.SetInt24(array, offset, paletteSet.Palettes[i][a]); offset += 3; } } }
public void Assemble(ref int offset) { if (sample == null) { Bits.SetInt24(rom, index * 3 + 0x042333, 0); return; } Bits.SetInt24(rom, index * 3 + 0x042333, offset + 0xC00000); Bits.SetShort(rom, offset, sample.Length); offset += 2; Bits.SetBytes(rom, offset, sample); offset += sample.Length; // Bits.SetShort(rom, index * 2 + 0x04248F, loopStart); Bits.SetShort(rom, index * 2 + 0x042577, relGain); Bits.SetShort(rom, index * 2 + 0x04265F, relFreq); }