Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int CFamiTrackerDoc::DeepCloneInstrument(unsigned int Index) {
- int Slot = CloneInstrument(Index);
- if (Slot != -1) {
- CInstrument *newInst = m_pInstruments[Slot];
- CInstrument *oldInst = m_pInstruments[Index];
- if(newInst->GetType() == INST_2A03) {
- for(unsigned int i = 0; i < SEQ_COUNT; i++) {
- int freeSeq = this->GetFreeSequence(i);
- int oldSeq = ((CInstrument2A03*)newInst)->GetSeqIndex(i);
- if( ((CInstrument2A03*)newInst)->GetSeqEnable(i) ) {
- this->GetSequence(freeSeq, i)->Copy( this->GetSequence(oldSeq, i) );
- }
- ((CInstrument2A03*)newInst)->SetSeqIndex(i, freeSeq);
- }
- }
- }
- return Slot;
- }
Advertisement
Add Comment
Please, Sign In to add comment