-added sidecovers and shortcovers magic number wild cards (xx).

sidecovers = 513053xx
shortcovers = 51304dxx
the last 2 chars (xx) can be any hex char (0 - f). this is mainly for the quakegx mod plugin but can be used for other plugins that might need side or short covers provided they aren't already in use.
This commit is contained in:
fledge68 2018-05-30 12:48:42 +00:00
parent 113c7e015e
commit 469c549940
2 changed files with 9 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -477,14 +477,15 @@ bool CMenu::_Source()
return newSource; return newSource;
} }
static const char sideCovers[4][9] = { static const char sideCovers[5][9] = {
"534e5854", //Snes9X-Next "534e5854", //Snes9X-Next
"534e4553", //SNES9xGX "534e4553", //SNES9xGX
"4e4f3634", //Not64 "4e4f3634", //Not64
"57493634" //Wii64 "57493634", //Wii64
"513053xx" //QuakeGX Serverloader wild cards
}; };
static const char shortCovers[19][9] = { static const char shortCovers[13][9] = {
"474d4254", //Gambatte "474d4254", //Gambatte
"474d4264", //Gambatte GB "474d4264", //Gambatte GB
"474d4274", //Gambatte GBC "474d4274", //Gambatte GBC
@ -497,22 +498,16 @@ static const char shortCovers[19][9] = {
"4d45446e", //WiiMednafen GBC "4d45446e", //WiiMednafen GBC
"4d45447e", //WiiMednafen GBA "4d45447e", //WiiMednafen GBA
"57495358", //WiiSX - playstation "57495358", //WiiSX - playstation
"51304d30", //QuakeGX Modloader ID "51304dxx" //QuakeGX Modloader wild cards
"51304d31", //QuakeGX Modloader hipnotic
"51304d32", //QuakeGX Modloader scourge
"51304d51", //QuakeGX Modloader Q
"51304d58", //QuakeGX Modloader X
"51304d59", //QuakeGX Modloader Y
"51304d5a" //QuakeGX Modloader Z
}; };
bool CMenu::_sideCover(const char *magic) bool CMenu::_sideCover(const char *magic)
{ {
if(magic == NULL) if(magic == NULL)
return false; return false;
for(i = 0; i < 4; i++) for(i = 0; i < ARRAY_SIZE(sideCovers); i++)
{ {
if(strncasecmp(magic, sideCovers[i], 8) == 0) if((sideCovers[i][6] == 'x' && strncasecmp(magic, sideCovers[i], 6) == 0) || strncasecmp(magic, sideCovers[i], 8) == 0)
return true; return true;
} }
return false; return false;
@ -522,9 +517,9 @@ bool CMenu::_shortCover(const char *magic)
{ {
if(magic == NULL) if(magic == NULL)
return false; return false;
for(i = 0; i < 15; i++) for(i = 0; i < ARRAY_SIZE(sideCovers); i++)
{ {
if(strncasecmp(magic, shortCovers[i], 8) == 0) if((shortCovers[i][6] == 'x' && strncasecmp(magic, shortCovers[i], 6) == 0) || strncasecmp(magic, shortCovers[i], 8) == 0)
return true; return true;
} }
return false; return false;