public MyMusicStageBGM CreateMyMusicStageBGM(int sEntryBGMID, ushort index)
        {
            MyMusicStageBGM myMusicStageBGM = new MyMusicStageBGM(this, sEntryBGMID);

            myMusicStageBGM.Index    = (short)(index + 1);
            myMusicStageBGM.Rarity   = 100;
            myMusicStageBGM.SubIndex = -1;
            myMusicStageBGM.Unk3     = -1;

            return(myMusicStageBGM);
        }
        public object Clone()
        {
            SoundEntryCollection sCollection = new SoundEntryCollection();

            foreach (BGMEntry sEntryBGM in _SoundEntriesBGMs)
            {
                BGMEntry newSEntryBGM = (BGMEntry)sEntryBGM.Clone();
                sCollection._SoundEntriesBGMs.Add(newSEntryBGM);
            }
            sCollection.GenerateSoundEntriesBGMDictionary();

            foreach (SoundEntry sEntry in _SoundEntries)
            {
                SoundEntry newSEntry = (SoundEntry)sEntry.Clone();
                newSEntry.BGMFiles = new List <SoundEntryBGM>();
                foreach (SoundEntryBGM sEntryBGM in sEntry.BGMFiles)
                {
                    newSEntry.BGMFiles.Add(new SoundEntryBGM(sCollection, newSEntry, sEntryBGM.BGMID));
                }
                newSEntry.SoundEntryCollection = sCollection;
                sCollection._SoundEntries.Add(newSEntry);
            }
            sCollection.GenerateSoundEntriesDictionary();

            foreach (MyMusicStage myMusicStage in _MyMusicStages)
            {
                MyMusicStage nMyMusicStage = new MyMusicStage(myMusicStage.MyMusicStageID);
                foreach (MyMusicStageBGM sMusicStageBGM in myMusicStage.BGMs)
                {
                    MyMusicStageBGM nMyMusicStageBGM = (MyMusicStageBGM)sMusicStageBGM.Clone();
                    nMyMusicStageBGM.SoundEntryCollection = sCollection;
                    nMyMusicStage.BGMs.Add(nMyMusicStageBGM);
                }
                sCollection._MyMusicStages.Add(nMyMusicStage);
            }

            foreach (SoundDBStage soundDBStage in _SoundDBStages)
            {
                List <SoundDBStageSoundEntry> sEntries = new List <SoundDBStageSoundEntry>();
                foreach (SoundDBStageSoundEntry sSoundDBStageSoundEntry in soundDBStage.SoundEntries)
                {
                    sEntries.Add(new SoundDBStageSoundEntry(sCollection, sSoundDBStageSoundEntry.SoundID));
                }
                SoundDBStage nSoundDBStage = new SoundDBStage(sCollection, soundDBStage.SoundDBStageID);
                nSoundDBStage.SoundEntries = sEntries;
                sCollection._SoundDBStages.Add(nSoundDBStage);
            }

            sCollection.GenerateStagesDictionaries();

            return(sCollection);
        }
Exemple #3
0
        private void WriteBGMEntry(BinaryWriter w, MyMusicStageBGM myMusicStageBGM)
        {
            w.Write(myMusicStageBGM.BGMID);
            w.Write(myMusicStageBGM.Index);
            w.Write(myMusicStageBGM.SubIndex);
            w.Write(myMusicStageBGM.Rarity);
            w.Write(myMusicStageBGM.Unk3);
            w.Write(myMusicStageBGM.Unk4);
            w.Write(myMusicStageBGM.PlayDelay);
            w.Write(myMusicStageBGM.Unk6);
            w.Write(myMusicStageBGM.Unk7);
            w.Write(myMusicStageBGM.Unk8);
            w.Write(myMusicStageBGM.Unk9);

            for (int i = 0; i < 0x18; i++) //Padding??
            {
                w.Write((byte)0x0);
            }
        }
Exemple #4
0
        private MyMusicStageBGM ParseBGMEntry(BinaryReader b)
        {
            int BGMID = b.ReadInt32();

            MyMusicStageBGM sMyMusicBGM = new MyMusicStageBGM(SoundEntryCollection, BGMID);

            sMyMusicBGM.Index     = b.ReadInt16();
            sMyMusicBGM.SubIndex  = b.ReadInt16();
            sMyMusicBGM.Rarity    = b.ReadInt32();
            sMyMusicBGM.Unk3      = b.ReadInt16();
            sMyMusicBGM.Unk4      = b.ReadInt16();
            sMyMusicBGM.PlayDelay = b.ReadInt32();
            sMyMusicBGM.Unk6      = b.ReadInt32();
            sMyMusicBGM.Unk7      = b.ReadInt32();
            sMyMusicBGM.Unk8      = b.ReadInt32();
            sMyMusicBGM.Unk9      = b.ReadInt32();

            return(sMyMusicBGM);
        }