use of com.github.jakz.romlib.data.set.DataSupplier in project rom-manager by Jakz.
the class OfflineListProviderPlugin method buildRomSets.
@Override
public GameSet[] buildRomSets(List<DatParserPlugin> datParsers) {
DatParserPlugin parser = this.findDatParser(datParsers, "offline-list");
List<GameSet> sets = new ArrayList<>();
try {
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", new GBASaveParserOL());
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.GBA, KnownProviders.OFFLINE_LIST.derive("", "", "Replouf66", new Provider.Source("http://offlinelistgba.free.fr/tool/ReleaseList/gba_OL_0.7.1.zip")), datParser, format, GBA_ATTRIBUTES, new AssetManager(GBA_ASSETS, new URL("http://offlinelistgba.free.fr/imgs/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", new GBASaveParserAS());
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.GBA, KnownProviders.ADVAN_SCENE.derive("pure", "", "AdvanScene", new Provider.Source("http://www.advanscene.com/offline/datas/ADVANsCEne_GBA.zip")), datParser, format, GBA_ATTRIBUTES, new AssetManager(GBA_ASSETS, new URL("http://www.advanscene.com/offline/imgs/ADVANsCEne_GBA/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) (s -> GameSave.NULL));
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
final Asset[] PSP_ASSETS = { new Asset.Image(Paths.get("title"), new Dimension(208, 181 * 2)), new Asset.Image(Paths.get("gameplay"), new Dimension(320 * 2, 181 * 2)) };
final Attribute[] attributes = { GameAttribute.TITLE, GameAttribute.NUMBER, GameAttribute.SIZE, GameAttribute.PUBLISHER, GameAttribute.LOCATION, GameAttribute.LANGUAGE, GameAttribute.GROUP, GameAttribute.COMMENT };
sets.add(new GameSet(Platforms.PSP, KnownProviders.ADVAN_SCENE.derive("", "", "AdvanScene", new Provider.Source("http://www.advanscene.com/offline/datas/ADVANsCEne_PSP.zip")), datParser, format, attributes, new AssetManager(PSP_ASSETS, new URL("http://www.advanscene.com/offline/imgs/ADVANsCEne_PSP/")), s -> new MyGameSetFeatures(s)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", new NDSSaveParser());
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.NDS, KnownProviders.ADVAN_SCENE.derive("collection", "", "AdvanScene", new Provider.Source("http://www.advanscene.com/offline/datas/ADVANsCEne_NDS.zip")), datParser, format, GBA_ATTRIBUTES, new AssetManager(NDS_ASSETS, new URL("http://www.advanscene.com/offline/imgs/ADVANsCEne_NDS/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
/* Nintendo 3DS */
{
final Asset[] _3DS_ASSETS = { new Asset.Image(Paths.get("title"), new Dimension(268, 480)), new Asset.Image(Paths.get("gameplay"), new Dimension(400, 480)) };
final Attribute[] _3DS_ATTRIBUTES = { GameAttribute.TITLE, GameAttribute.NUMBER, GameAttribute.SIZE, GameAttribute.PUBLISHER, GameAttribute.GROUP, GameAttribute.SAVE_TYPE, GameAttribute.LOCATION, GameAttribute.LANGUAGE, GameAttribute.COMMENT };
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) s -> null);
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms._3DS, KnownProviders.ADVAN_SCENE.derive("", "", "AdvanScene", new Provider.Source("http://www.advanscene.com/offline/datas/ADVANsCEne_3DS.zip")), datParser, format, _3DS_ATTRIBUTES, new AssetManager(_3DS_ASSETS, new URL("http://www.advanscene.com/offline/imgs/ADVANsCEne_3DS/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) (r -> null));
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.GBC, KnownProviders.NO_INTRO.derive("", "", "Replouf66", new Provider.Source("http://nointro.free.fr/datas/Official%20No-Intro%20Nintendo%20Gameboy%20Color.zip")), datParser, format, GB_ATTRIBUTES, new AssetManager(GB_ASSETS, new URL("http://nointro.free.fr/imgs/Official%20No-Intro%20Nintendo%20Gameboy%20Color/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) (r -> null));
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.GB, KnownProviders.NO_INTRO.derive("", "", "MadBob", new Provider.Source("http://nointro.free.fr/datas/Official%20No-Intro%20Nintendo%20Gameboy.zip")), datParser, format, GB_ATTRIBUTES, new AssetManager(GB_ASSETS, new URL("http://nointro.free.fr/imgs/Official%20No-Intro%20Nintendo%20Gameboy/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) (r -> null));
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.NES, KnownProviders.NO_INTRO.derive("", "", "Zepman", new Provider.Source("http://nointro.free.fr/datas/Official%20No-Intro%20Nintendo%20NES%20-%20Famicom.zip")), datParser, format, NES_ATTRIBUTES, new AssetManager(GB_ASSETS, new URL("http://nointro.free.fr/imgs/Official%20No-Intro%20Nintendo%20NES%20-%20Famicom/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
sets.add(new GameSet(Platforms.NES, KnownProviders.OFFLINE_LIST.derive("", "", "Zepman", new Provider.Source("http://nesofflinelist.free.fr/dat/nes_OL.zip")), datParser, format, NES_ATTRIBUTES, new AssetManager(NES_ASSETS, new URL("http://nesofflinelist.free.fr/imgs/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
{
Map<String, Object> args = new HashMap<>();
args.put("save-parser", (SaveParser) (r -> null));
DataSupplier datParser = parser.buildDatLoader("offline-list", args);
DatFormat format = datParser.getFormat();
sets.add(new GameSet(Platforms.LYNX, KnownProviders.NO_INTRO.derive("", "", "Atari Lynx", new Provider.Source("http://nointro.free.fr/datas/Official%20No-Intro%20Atari%20Lynx.zip")), datParser, format, NES_ATTRIBUTES, new AssetManager(LYNX_ASSETS, new URL("http://nointro.free.fr/imgs/Official%20No-Intro%20Atari%20Lynx/")), s -> new MyGameSetFeatures(s, Feature.FINITE_SIZE_SET)));
}
return sets.toArray(new GameSet[sets.size()]);
} catch (MalformedURLException e) {
e.printStackTrace();
}
return null;
}
use of com.github.jakz.romlib.data.set.DataSupplier 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<>();
Provider.Source gameGearSource = new Provider.Source("http://datomatic.no-intro.org/?page=download&fun=dat", "inc_unl", "1", "format", "clrmamepro", "language_filter", "all_languages", "region_filter", "all_regions", "dbutton", "Download", "Download27", "");
{
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.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)));
}
return sets.toArray(new GameSet[sets.size()]);
}
Aggregations