Changed some platform enumerators to make them more clear and consistent.

This commit is contained in:
Leon Styhre 2021-02-07 20:49:52 +01:00
parent 7da2f6b039
commit 47f5b889d5
4 changed files with 103 additions and 104 deletions

View file

@ -48,7 +48,7 @@ FileData::FileData(
// Metadata needs at least a name field (since that's what getName() will return).
if (metadata.get("name").empty()) {
if ((system->hasPlatformId(PlatformIds::ARCADE) ||
system->hasPlatformId(PlatformIds::NEOGEO)) &&
system->hasPlatformId(PlatformIds::SNK_NEO_GEO)) &&
metadata.getType() != FOLDER_METADATA) {
// If it's a MAME or Neo Geo game, expand the game name accordingly.
metadata.set("name",
@ -406,7 +406,7 @@ const bool FileData::isArcadeAsset()
{
const std::string stem = Utils::FileSystem::getStem(mPath);
return ((mSystem && (mSystem->hasPlatformId(PlatformIds::ARCADE) ||
mSystem->hasPlatformId(PlatformIds::NEOGEO))) &&
mSystem->hasPlatformId(PlatformIds::SNK_NEO_GEO))) &&
(MameNames::getInstance()->isBios(stem) ||
MameNames::getInstance()->isDevice(stem)));
}
@ -415,7 +415,7 @@ const bool FileData::isArcadeGame()
{
const std::string stem = Utils::FileSystem::getStem(mPath);
return ((mSystem && (mSystem->hasPlatformId(PlatformIds::ARCADE) ||
mSystem->hasPlatformId(PlatformIds::NEOGEO))) &&
mSystem->hasPlatformId(PlatformIds::SNK_NEO_GEO))) &&
(!MameNames::getInstance()->isBios(stem) &&
!MameNames::getInstance()->isDevice(stem)));
}

View file

@ -18,13 +18,13 @@ namespace PlatformIds
THREEDO, // Names can't start with a number.
ADVENTUREGAMESTUDIO,
AMIGA,
AMIGACD32,
COMMODORE_AMIGA,
COMMODORE_AMIGA_CD32,
AMSTRAD_CPC,
APPLE_II,
APPLE_IIGS,
ARCADE,
ASTROCADE,
BALLY_ASTROCADE,
ATARI_2600,
ATARI_5200,
ATARI_7800,
@ -40,26 +40,26 @@ namespace PlatformIds
CAVESTORY,
COMMODORE_CDTV,
FAIRCHILD_CHANNELF,
TANDY,
TANDY_COLOR_COMPUTER,
COLECOVISION,
DAPHNE,
DOS,
DRAGON32,
SEGA_DREAMCAST,
FAMICOM,
FAMICOM_DISK_SYSTEM,
NINTENDO_FAMICOM,
NINTENDO_FAMICOM_DISK_SYSTEM,
NINTENDO_GAME_AND_WATCH,
SEGA_GAME_GEAR,
GAME_BOY,
GAME_BOY_ADVANCE,
GAME_BOY_COLOR,
NINTENDO_GAME_BOY,
NINTENDO_GAME_BOY_ADVANCE,
NINTENDO_GAME_BOY_COLOR,
NINTENDO_GAMECUBE,
SEGA_GENESIS,
AMSTRAD_GX4000,
INTELLIVISION,
LOVE,
LUTRO,
MAC_OS,
APPLE_MACINTOSH,
SEGA_MASTER_SYSTEM,
SEGA_MEGA_DRIVE,
MESS,
@ -70,26 +70,26 @@ namespace PlatformIds
NINTENDO_64,
SEGA_NAOMI,
NINTENDO_DS,
NEOGEO,
NEOGEO_CD,
SNK_NEO_GEO,
SNK_NEO_GEO_CD,
NINTENDO_ENTERTAINMENT_SYSTEM,
NEOGEO_POCKET,
NEOGEO_POCKET_COLOR,
SNK_NEO_GEO_POCKET,
SNK_NEO_GEO_POCKET_COLOR,
VIDEOPAC_ODYSSEY2,
OPENBOR,
ORIC,
TANGERINE_ORIC,
PALM_OS,
PC,
TURBOGRAFX_16,
TURBOGRAFX_CD,
PCFX,
NEC_PC_ENGINE,
NEC_PC_ENGINE_CD,
NEC_PCFX,
NINTENDO_POKEMON_MINI,
PLAYSTATION_2,
PLAYSTATION_3,
PLAYSTATION_4,
PLAYSTATION_PORTABLE,
PLAYSTATION_VITA,
PLAYSTATION,
SONY_PLAYSTATION_2,
SONY_PLAYSTATION_3,
SONY_PLAYSTATION_4,
SONY_PLAYSTATION_PORTABLE,
SONY_PLAYSTATION_VITA,
SONY_PLAYSTATION,
RESIDUALVM,
SAMCOUPE,
NINTENDO_SATELLAVIEW,
@ -102,25 +102,25 @@ namespace PlatformIds
SOLARUS,
SPECTRAVIDEO,
STRATAGUS,
SUFAMI_TURBO,
SUPERGRAFX,
TI99,
TRS80_COLOR_COMPUTER,
BANDAI_SUFAMI_TURBO,
NEC_SUPERGRAFX,
TEXAS_INSTRUMENTS_TI99,
TANDY_TRS80,
UZEBOX,
VECTREX,
VIDEOPAC,
PHILIPS_VIDEOPAC,
NINTENDO_VIRTUAL_BOY,
NINTENDO_WII,
NINTENDO_WII_U,
WONDERSWAN,
WONDERSWAN_COLOR,
BANDAI_WONDERSWAN,
BANDAI_WONDERSWAN_COLOR,
SHARP_X1,
SHARP_X68000,
XBOX,
XBOX_360,
ZMACHINE,
ZX81_SINCLAR,
ZX_SPECTRUM,
MICROSOFT_XBOX,
MICROSOFT_XBOX_360,
SINCLAIR_Z_MACHINE,
SINCLAIR_ZX81_SINCLAR,
SINCLAIR_ZX_SPECTRUM,
PLATFORM_IGNORE, // Do not allow scraping for this system.
PLATFORM_COUNT

View file

@ -35,8 +35,8 @@ namespace
const std::map<PlatformId, std::string> gamesdb_new_platformid_map {
{ THREEDO, "25" },
{ AMIGA, "4911" },
{ AMIGACD32, "4947" },
{ COMMODORE_AMIGA, "4911" },
{ COMMODORE_AMIGA_CD32, "4947" },
{ AMSTRAD_CPC, "4914" },
{ APPLE_II, "4942" },
{ ARCADE, "23" },
@ -54,23 +54,23 @@ const std::map<PlatformId, std::string> gamesdb_new_platformid_map {
{ COMMODORE_64, "40" },
{ DAPHNE, "23" },
{ INTELLIVISION, "32" },
{ MAC_OS, "37" },
{ XBOX, "14" },
{ XBOX_360, "15" },
{ APPLE_MACINTOSH, "37" },
{ MICROSOFT_XBOX, "14" },
{ MICROSOFT_XBOX_360, "15" },
{ MOONLIGHT, "1" },
{ MSX, "4929" },
{ NEOGEO, "24" },
{ NEOGEO_CD, "24" },
{ NEOGEO_POCKET, "4922" },
{ NEOGEO_POCKET_COLOR, "4923" },
{ SNK_NEO_GEO, "24" },
{ SNK_NEO_GEO_CD, "24" },
{ SNK_NEO_GEO_POCKET, "4922" },
{ SNK_NEO_GEO_POCKET_COLOR, "4923" },
{ NINTENDO_3DS, "4912" },
{ NINTENDO_64, "3" },
{ NINTENDO_DS, "8" },
{ FAMICOM_DISK_SYSTEM, "4936" },
{ NINTENDO_FAMICOM_DISK_SYSTEM, "4936" },
{ NINTENDO_ENTERTAINMENT_SYSTEM, "7" },
{ GAME_BOY, "4" },
{ GAME_BOY_ADVANCE, "5" },
{ GAME_BOY_COLOR, "41" },
{ NINTENDO_GAME_BOY, "4" },
{ NINTENDO_GAME_BOY_ADVANCE, "5" },
{ NINTENDO_GAME_BOY_COLOR, "41" },
{ NINTENDO_GAMECUBE, "2" },
{ NINTENDO_WII, "9" },
{ NINTENDO_WII_U, "38" },
@ -78,10 +78,10 @@ const std::map<PlatformId, std::string> gamesdb_new_platformid_map {
{ NINTENDO_GAME_AND_WATCH, "-1" },
{ NINTENDO_POKEMON_MINI, "4957" },
{ NINTENDO_SATELLAVIEW, "6" },
{ SUFAMI_TURBO, "6" },
{ BANDAI_SUFAMI_TURBO, "6" },
{ DOS, "1" },
{ PC, "1" },
{ PCFX, "4930" },
{ NEC_PCFX, "4930" },
{ SEGA_32X, "33" },
{ SEGA_CD, "21" },
{ SEGA_DREAMCAST, "16" },
@ -91,25 +91,25 @@ const std::map<PlatformId, std::string> gamesdb_new_platformid_map {
{ SEGA_MEGA_DRIVE, "36" },
{ SEGA_SATURN, "17" },
{ SEGA_SG1000, "4949" },
{ PLAYSTATION, "10" },
{ PLAYSTATION_2, "11" },
{ PLAYSTATION_3, "12" },
{ PLAYSTATION_4, "4919" },
{ PLAYSTATION_VITA, "39" },
{ PLAYSTATION_PORTABLE, "13" },
{ SONY_PLAYSTATION, "10" },
{ SONY_PLAYSTATION_2, "11" },
{ SONY_PLAYSTATION_3, "12" },
{ SONY_PLAYSTATION_4, "4919" },
{ SONY_PLAYSTATION_VITA, "39" },
{ SONY_PLAYSTATION_PORTABLE, "13" },
{ SUPER_NINTENDO, "6" },
{ SHARP_X1, "4977" },
{ SHARP_X68000, "4931"},
{ SUPERGRAFX, "34" }, // Combined with TurboGrafx-16
{ TURBOGRAFX_16, "34" }, // HuCards only.
{ TURBOGRAFX_CD, "4955" }, // CD-ROMs only.
{ WONDERSWAN, "4925" },
{ WONDERSWAN_COLOR, "4926" },
{ ZX_SPECTRUM, "4913" },
{ NEC_SUPERGRAFX, "34" },
{ NEC_PC_ENGINE, "34" },
{ NEC_PC_ENGINE_CD, "4955" },
{ BANDAI_WONDERSWAN, "4925" },
{ BANDAI_WONDERSWAN_COLOR, "4926" },
{ SINCLAIR_ZX_SPECTRUM, "4913" },
{ VIDEOPAC_ODYSSEY2, "4927" },
{ VECTREX, "4939" },
{ TRS80_COLOR_COMPUTER, "4941" },
{ TANDY, "4941" },
{ TANDY_COLOR_COMPUTER, "4941" },
{ TANDY_TRS80, "4941" },
};
void thegamesdb_generate_json_scraper_requests(const ScraperSearchParams& params,

View file

@ -28,8 +28,8 @@ using namespace PlatformIds;
// https://www.screenscraper.fr/api/systemesListe.php?devid=xxx&devpassword=yyy&softname=zzz&output=XML
const std::map<PlatformId, unsigned short> screenscraper_platformid_map {
{ THREEDO, 29 },
{ AMIGA, 64 },
{ AMIGACD32, 130 },
{ COMMODORE_AMIGA, 64 },
{ COMMODORE_AMIGA_CD32, 130 },
{ AMSTRAD_CPC, 65 },
{ AMSTRAD_GX4000, 87 },
{ APPLE_II, 86 },
@ -53,24 +53,24 @@ const std::map<PlatformId, unsigned short> screenscraper_platformid_map {
{ DAPHNE, 49 },
{ INTELLIVISION, 115 },
{ LUTRO, 206 },
{ MAC_OS, 146 },
{ XBOX, 32 },
{ XBOX_360, 33 },
{ APPLE_MACINTOSH, 146 },
{ MICROSOFT_XBOX, 32 },
{ MICROSOFT_XBOX_360, 33 },
{ MOONLIGHT, 138 },
{ MSX, 113 },
{ NEOGEO, 142 },
{ NEOGEO_CD, 142 },
{ NEOGEO_POCKET, 25},
{ NEOGEO_POCKET_COLOR, 82 },
{ SNK_NEO_GEO, 142 },
{ SNK_NEO_GEO_CD, 142 },
{ SNK_NEO_GEO_POCKET, 25},
{ SNK_NEO_GEO_POCKET_COLOR, 82 },
{ NINTENDO_3DS, 17 },
{ NINTENDO_64, 14 },
{ NINTENDO_DS, 15 },
{ FAMICOM_DISK_SYSTEM, 106 },
{ NINTENDO_FAMICOM_DISK_SYSTEM, 106 },
{ NINTENDO_ENTERTAINMENT_SYSTEM, 3 },
{ FAIRCHILD_CHANNELF, 80 },
{ GAME_BOY, 9 },
{ GAME_BOY_ADVANCE, 12 },
{ GAME_BOY_COLOR, 10 },
{ NINTENDO_GAME_BOY, 9 },
{ NINTENDO_GAME_BOY_ADVANCE, 12 },
{ NINTENDO_GAME_BOY_COLOR, 10 },
{ NINTENDO_GAMECUBE, 13 },
{ NINTENDO_WII, 16 },
{ NINTENDO_WII_U, 18 },
@ -78,12 +78,12 @@ const std::map<PlatformId, unsigned short> screenscraper_platformid_map {
{ NINTENDO_GAME_AND_WATCH, 52 },
{ NINTENDO_POKEMON_MINI, 211 },
{ NINTENDO_SATELLAVIEW, 107 },
{ SUFAMI_TURBO, 108 },
{ BANDAI_SUFAMI_TURBO, 108 },
{ DOS, 135 },
{ PC, 135 },
{ PCFX, 72 },
{ NEC_PCFX, 72 },
{ OPENBOR, 214 },
{ ORIC, 131 },
{ TANGERINE_ORIC, 131 },
{ SCUMMVM, 123},
{ SEGA_32X, 19 },
{ SEGA_CD, 20 },
@ -97,25 +97,24 @@ const std::map<PlatformId, unsigned short> screenscraper_platformid_map {
{ SHARP_X1, 220},
{ SHARP_X68000, 79},
{ SOLARUS, 223 },
{ PLAYSTATION, 57 },
{ PLAYSTATION_2, 58 },
{ PLAYSTATION_3, 59 },
// Missing Sony Playstation 4 ?
{ PLAYSTATION_VITA, 62 },
{ PLAYSTATION_PORTABLE, 61 },
{ SONY_PLAYSTATION, 57 },
{ SONY_PLAYSTATION_2, 58 },
{ SONY_PLAYSTATION_3, 59 },
{ SONY_PLAYSTATION_VITA, 62 },
{ SONY_PLAYSTATION_PORTABLE, 61 },
{ SAMCOUPE, 213 },
{ SUPER_NINTENDO, 4 },
{ SUPERGRAFX, 105 },
{ TURBOGRAFX_16, 31 },
{ TURBOGRAFX_CD, 114 },
{ WONDERSWAN, 45 },
{ WONDERSWAN_COLOR, 46 },
{ ZX_SPECTRUM, 76 },
{ ZX81_SINCLAR, 77 },
{ NEC_SUPERGRAFX, 105 },
{ NEC_PC_ENGINE, 31 },
{ NEC_PC_ENGINE_CD, 114 },
{ BANDAI_WONDERSWAN, 45 },
{ BANDAI_WONDERSWAN_COLOR, 46 },
{ SINCLAIR_ZX_SPECTRUM, 76 },
{ SINCLAIR_ZX81_SINCLAR, 77 },
{ VIDEOPAC_ODYSSEY2, 104 },
{ VECTREX, 102 },
{ TRS80_COLOR_COMPUTER, 144 },
{ TANDY, 144 },
{ TANDY_TRS80, 144 },
{ TANDY_COLOR_COMPUTER, 144 },
{ SEGA_NAOMI, 56 },
{ THOMSON_MOTO, 141 },
{ UZEBOX, 216 },