Search in sources :

Example 1 with GoodOldDaysFixer

use of com.github.jakz.romlib.data.cataloguers.impl.GoodOldDaysFixer in project rom-manager by Jakz.

the class ClrMamePlugin method buildRomSets.

@Override
public GameSet[] buildRomSets(List<DatParserPlugin> datParsers) {
    DatParserPlugin datParser = this.findDatParser(datParsers, "clr-mame-pro-nointro");
    List<GameSet> sets = new ArrayList<>();
    {
        DataSupplier parser = datParser.buildDatLoader("clr-mame-pro-nointro");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.GG, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
    }
    {
        DataSupplier parser = datParser.buildDatLoader("clr-mame-pro-nointro");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.LYNX, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.MD, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        // TODO: this should be added only if XMDB is not present
        parser = parser.apply(new NormalizedTitleCloneSetCreator());
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.NDS, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.PSP, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.PSP, KnownProviders.NO_INTRO.derive("With Clones", "with-clones", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms.N64, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        DatFormat format = parser.getFormat();
        sets.add(new GameSet(Platforms._3DS, KnownProviders.NO_INTRO.derive("", "", "", null), parser, format, GG_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        parser = parser.apply(new RedumpAggregatorByDisks());
        parser = parser.apply(new NormalizedTitleCloneSetCreator());
        DatFormat format = parser.getFormat();
        final Attribute[] PC_ATTRIBUTES = { GameAttribute.TITLE, GameAttribute.SIZE, GameAttribute.LOCATION, GameAttribute.LANGUAGE, GameAttribute.VERSION, GameAttribute.VERSION_NUMBER };
        sets.add(new GameSet(Platforms.IBM_PC, KnownProviders.REDUMP.derive("", "", "", new Provider.Source("http://redump.org/datfile/pc/")), parser, format, PC_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        parser = parser.apply(new RedumpAggregatorByDisks());
        parser = parser.apply(new NormalizedTitleCloneSetCreator());
        DatFormat format = parser.getFormat();
        final Attribute[] PC_ATTRIBUTES = { GameAttribute.TITLE, GameAttribute.SIZE, GameAttribute.LOCATION, GameAttribute.LANGUAGE, GameAttribute.VERSION, GameAttribute.VERSION_NUMBER };
        sets.add(new GameSet(Platforms.PS2, KnownProviders.REDUMP.derive("", "", "", null), parser, format, PC_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
        sets.add(new GameSet(Platforms.GC, KnownProviders.REDUMP.derive("", "", "", new Provider.Source("http://redump.org/datfile/gc/")), parser, format, PC_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s)));
    }
    {
        DataSupplier parser = findDatParser(datParsers, "logiqx-xml").buildDatLoader("logiqx-xml");
        parser = parser.apply(new GoodOldDaysFixer());
        parser = parser.apply(new GoodOldDaysFixer.CloneCreator());
        DatFormat format = parser.getFormat();
        final Attribute[] PC_ATTRIBUTES = { GameAttribute.TITLE, GameAttribute.SIZE, GameAttribute.LOCATION, GameAttribute.LANGUAGE, GameAttribute.RELEASE_DATE, GameAttribute.DESCRIPTION, GameAttribute.COMMENT };
        sets.add(new GameSet(Platforms.IBM_PC, KnownProviders.GOOD_OLD_DAYS, parser, format, PC_ATTRIBUTES, AssetManager.DUMMY, s -> new MyGameSetFeatures(s, GameID.Generator.BY_RELEASE_NUMBER, Feature.FINITE_SIZE_SET)));
    }
    return sets.toArray(new GameSet[sets.size()]);
}
Also used : NormalizedTitleCloneSetCreator(com.github.jakz.romlib.data.cataloguers.impl.NormalizedTitleCloneSetCreator) DataSupplier(com.github.jakz.romlib.data.set.DataSupplier) RedumpAggregatorByDisks(com.github.jakz.romlib.data.cataloguers.impl.RedumpAggregatorByDisks) MyGameSetFeatures(jack.rm.data.romset.MyGameSetFeatures) ArrayList(java.util.ArrayList) DatFormat(com.github.jakz.romlib.data.set.DatFormat) GoodOldDaysFixer(com.github.jakz.romlib.data.cataloguers.impl.GoodOldDaysFixer) DatParserPlugin(jack.rm.plugins.types.DatParserPlugin) GameSet(com.github.jakz.romlib.data.set.GameSet)

Aggregations

GoodOldDaysFixer (com.github.jakz.romlib.data.cataloguers.impl.GoodOldDaysFixer)1 NormalizedTitleCloneSetCreator (com.github.jakz.romlib.data.cataloguers.impl.NormalizedTitleCloneSetCreator)1 RedumpAggregatorByDisks (com.github.jakz.romlib.data.cataloguers.impl.RedumpAggregatorByDisks)1 DatFormat (com.github.jakz.romlib.data.set.DatFormat)1 DataSupplier (com.github.jakz.romlib.data.set.DataSupplier)1 GameSet (com.github.jakz.romlib.data.set.GameSet)1 MyGameSetFeatures (jack.rm.data.romset.MyGameSetFeatures)1 DatParserPlugin (jack.rm.plugins.types.DatParserPlugin)1 ArrayList (java.util.ArrayList)1