2014-06-25 16:29:58 +00:00
|
|
|
#include "PlatformId.h"
|
2017-11-01 22:21:10 +00:00
|
|
|
|
2014-06-25 16:29:58 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
namespace PlatformIds
|
|
|
|
{
|
|
|
|
const char* PlatformNames[PLATFORM_COUNT + 1] = {
|
|
|
|
"unknown", // nothing set
|
|
|
|
|
|
|
|
"3do",
|
|
|
|
"amiga",
|
|
|
|
"amstradcpc",
|
|
|
|
"apple2",
|
|
|
|
"arcade",
|
|
|
|
"atari800",
|
|
|
|
"atari2600",
|
|
|
|
"atari5200",
|
|
|
|
"atari7800",
|
|
|
|
"atarilynx",
|
|
|
|
"atarist",
|
|
|
|
"atarijaguar",
|
|
|
|
"atarijaguarcd",
|
|
|
|
"atarixe",
|
|
|
|
"colecovision",
|
|
|
|
"c64", // commodore 64
|
|
|
|
"intellivision",
|
|
|
|
"macintosh",
|
|
|
|
"xbox",
|
|
|
|
"xbox360",
|
2014-11-29 18:51:17 +00:00
|
|
|
"msx",
|
2014-06-25 16:29:58 +00:00
|
|
|
"neogeo",
|
|
|
|
"ngp", // neo geo pocket
|
|
|
|
"ngpc", // neo geo pocket color
|
|
|
|
"n3ds", // nintendo 3DS
|
|
|
|
"n64", // nintendo 64
|
|
|
|
"nds", // nintendo DS
|
2017-05-22 18:28:04 +00:00
|
|
|
"fds", // Famicom Disk System
|
2014-06-25 16:29:58 +00:00
|
|
|
"nes", // nintendo entertainment system
|
2019-11-27 07:52:35 +00:00
|
|
|
"channelf", // Fairchild ChannelF
|
2014-06-25 16:29:58 +00:00
|
|
|
"gb", // game boy
|
|
|
|
"gba", // game boy advance
|
|
|
|
"gbc", // game boy color
|
|
|
|
"gc", // gamecube
|
|
|
|
"wii",
|
|
|
|
"wiiu",
|
2017-05-23 20:22:34 +00:00
|
|
|
"virtualboy",
|
|
|
|
"gameandwatch",
|
2019-11-27 07:52:35 +00:00
|
|
|
"openbor",
|
2014-06-25 16:29:58 +00:00
|
|
|
"pc",
|
|
|
|
"sega32x",
|
|
|
|
"segacd",
|
|
|
|
"dreamcast",
|
|
|
|
"gamegear",
|
|
|
|
"genesis", // sega genesis
|
|
|
|
"mastersystem", // sega master system
|
|
|
|
"megadrive", // sega megadrive
|
|
|
|
"saturn", // sega saturn
|
2017-05-23 20:22:34 +00:00
|
|
|
"sg-1000",
|
2014-06-25 16:29:58 +00:00
|
|
|
"psx",
|
|
|
|
"ps2",
|
|
|
|
"ps3",
|
|
|
|
"ps4",
|
|
|
|
"psvita",
|
|
|
|
"psp", // playstation portable
|
|
|
|
"snes", // super nintendo entertainment system
|
2019-01-11 19:51:05 +00:00
|
|
|
"scummvm",
|
|
|
|
"x6800",
|
2019-11-27 07:52:35 +00:00
|
|
|
"solarus",
|
2018-11-28 19:09:52 +00:00
|
|
|
"pcengine", // (aka turbografx-16) HuCards only
|
|
|
|
"pcenginecd", // (aka turbografx-16) CD-ROMs only
|
2014-06-25 16:29:58 +00:00
|
|
|
"wonderswan",
|
|
|
|
"wonderswancolor",
|
|
|
|
"zxspectrum",
|
2019-11-27 07:52:35 +00:00
|
|
|
"zx81",
|
2017-05-23 20:22:34 +00:00
|
|
|
"videopac",
|
|
|
|
"vectrex",
|
|
|
|
"trs-80",
|
|
|
|
"coco",
|
2014-06-25 16:29:58 +00:00
|
|
|
|
|
|
|
"ignore", // do not allow scraping for this system
|
|
|
|
"invalid"
|
|
|
|
};
|
|
|
|
|
|
|
|
PlatformId getPlatformId(const char* str)
|
|
|
|
{
|
|
|
|
if(str == NULL)
|
|
|
|
return PLATFORM_UNKNOWN;
|
|
|
|
|
|
|
|
for(unsigned int i = 1; i < PLATFORM_COUNT; i++)
|
|
|
|
{
|
|
|
|
if(strcmp(PlatformNames[i], str) == 0)
|
|
|
|
return (PlatformId)i;
|
|
|
|
}
|
|
|
|
|
|
|
|
return PLATFORM_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* getPlatformName(PlatformId id)
|
|
|
|
{
|
|
|
|
return PlatformNames[id];
|
|
|
|
}
|
|
|
|
}
|