コード例 #1
0
ファイル: TestDatRV.cs プロジェクト: psplandy/RVWorld
        private static void SetMergeType(MergeType mt, DatHeader dh)
        {
            bool hasRom = DatHasRomOf.HasRomOf(dh.BaseDir);

            if (hasRom)
            {
                switch (mt)
                {
                case MergeType.Merge:
                    DatClean.DatSetMakeMergeSet(dh.BaseDir);
                    break;

                case MergeType.NonMerged:
                    DatClean.DatSetMakeNonMergeSet(dh.BaseDir);
                    break;

                case MergeType.Split:
                    DatClean.DatSetMakeSplitSet(dh.BaseDir);
                    //DatClean.RemoveNotCollected(dh.BaseDir);
                    break;

                case MergeType.CHDsMerge:
                    DatClean.DatSetMakeMergeSet(dh.BaseDir, false);
                    break;
                }



                DatClean.RemoveDupes(dh.BaseDir);
                DatClean.RemoveEmptySets(dh.BaseDir);
            }
        }
コード例 #2
0
ファイル: DatReader.cs プロジェクト: finalmillenium/RVWorld
        private static void SetMergeType(DatRule datRule, DatHeader dh)
        {
            bool hasRom = DatHasRomOf.HasRomOf(dh.BaseDir);

            if (hasRom)
            {
                MergeType mt = datRule.Merge;
                if (!datRule.MergeOverrideDAT)
                {
                    switch (dh.MergeType?.ToLower())
                    {
                    case "full":
                        mt = MergeType.Merge;
                        break;

                    case "nonmerge":
                        mt = MergeType.NonMerged;
                        break;

                    case "split":
                        mt = MergeType.Split;
                        break;
                    }
                }

                switch (mt)
                {
                case MergeType.Merge:
                    DatClean.DatSetMakeMergeSet(dh.BaseDir, dh.MameXML);
                    break;

                case MergeType.NonMerged:
                    DatClean.DatSetMakeNonMergeSet(dh.BaseDir);
                    break;

                case MergeType.Split:
                    DatClean.DatSetMakeSplitSet(dh.BaseDir);
                    //DatClean.RemoveNotCollected(dh.BaseDir);
                    break;

                case MergeType.CHDsMerge:
                    DatClean.DatSetMakeMergeSet(dh.BaseDir, false);
                    break;
                }

                DatClean.RemoveDupes(dh.BaseDir, !dh.MameXML);
                DatClean.RemoveEmptySets(dh.BaseDir);
            }
        }