dep/rcheevos: Update to 0181d02

This commit is contained in:
Connor McLaughlin
2022-07-18 22:46:12 +10:00
parent af91fcf195
commit 3fb61865e5
19 changed files with 3717 additions and 24 deletions

View File

@ -84,7 +84,7 @@ static void filereader_close(void* file_handle)
}
/* for unit tests - normally would call rc_hash_init_custom_filereader(NULL) */
void rc_hash_reset_filereader()
void rc_hash_reset_filereader(void)
{
filereader = NULL;
}
@ -1609,6 +1609,8 @@ int rc_hash_generate_from_buffer(char hash[33], int console_id, const uint8_t* b
case RC_CONSOLE_ATARI_2600:
case RC_CONSOLE_ATARI_JAGUAR:
case RC_CONSOLE_COLECOVISION:
case RC_CONSOLE_COMMODORE_64:
case RC_CONSOLE_FAIRCHILD_CHANNEL_F:
case RC_CONSOLE_GAMEBOY:
case RC_CONSOLE_GAMEBOY_ADVANCE:
case RC_CONSOLE_GAMEBOY_COLOR:
@ -1629,6 +1631,7 @@ int rc_hash_generate_from_buffer(char hash[33], int console_id, const uint8_t* b
case RC_CONSOLE_TIC80:
case RC_CONSOLE_VECTREX:
case RC_CONSOLE_VIRTUAL_BOY:
case RC_CONSOLE_WASM4:
case RC_CONSOLE_WONDERSWAN:
return rc_hash_buffer(hash, buffer, buffer_size);
@ -1898,6 +1901,7 @@ int rc_hash_generate_from_file(char hash[33], int console_id, const char* path)
case RC_CONSOLE_ATARI_2600:
case RC_CONSOLE_ATARI_JAGUAR:
case RC_CONSOLE_COLECOVISION:
case RC_CONSOLE_FAIRCHILD_CHANNEL_F:
case RC_CONSOLE_GAMEBOY:
case RC_CONSOLE_GAMEBOY_ADVANCE:
case RC_CONSOLE_GAMEBOY_COLOR:
@ -1905,7 +1909,6 @@ int rc_hash_generate_from_file(char hash[33], int console_id, const char* path)
case RC_CONSOLE_INTELLIVISION:
case RC_CONSOLE_MAGNAVOX_ODYSSEY2:
case RC_CONSOLE_MASTER_SYSTEM:
case RC_CONSOLE_MEGA_DRIVE:
case RC_CONSOLE_MEGADUCK:
case RC_CONSOLE_NEOGEO_POCKET:
case RC_CONSOLE_ORIC:
@ -1916,12 +1919,15 @@ int rc_hash_generate_from_file(char hash[33], int console_id, const char* path)
case RC_CONSOLE_TIC80:
case RC_CONSOLE_VECTREX:
case RC_CONSOLE_VIRTUAL_BOY:
case RC_CONSOLE_WASM4:
case RC_CONSOLE_WONDERSWAN:
/* generic whole-file hash - don't buffer */
return rc_hash_whole_file(hash, path);
case RC_CONSOLE_AMSTRAD_PC:
case RC_CONSOLE_APPLE_II:
case RC_CONSOLE_COMMODORE_64:
case RC_CONSOLE_MEGA_DRIVE:
case RC_CONSOLE_MSX:
case RC_CONSOLE_PC8800:
/* generic whole-file hash with m3u support - don't buffer */
@ -2132,7 +2138,7 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
}
}
/* bin is associated with MegaDrive, Sega32X, Atari 2600, Watara Supervision, and MegaDuck.
/* bin is associated with MegaDrive, Sega32X, Atari 2600, Watara Supervision, MegaDuck, and Fairchild Channel F.
* Since they all use the same hashing algorithm, only specify one of them */
iterator->consoles[0] = RC_CONSOLE_MEGA_DRIVE;
}
@ -2173,6 +2179,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
{
iterator->consoles[0] = RC_CONSOLE_MSX;
}
else if (rc_path_compare_extension(ext, "chf"))
{
iterator->consoles[0] = RC_CONSOLE_FAIRCHILD_CHANNEL_F;
}
break;
case 'd':
@ -2180,6 +2190,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
{
rc_hash_initialize_dsk_iterator(iterator, path);
}
else if (rc_path_compare_extension(ext, "d64"))
{
iterator->consoles[0] = RC_CONSOLE_COMMODORE_64;
}
else if (rc_path_compare_extension(ext, "d88"))
{
iterator->consoles[0] = RC_CONSOLE_PC8800;
@ -2320,6 +2334,11 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
{
iterator->consoles[0] = RC_CONSOLE_NEOGEO_POCKET;
}
else if (rc_path_compare_extension(ext, "nib"))
{
/* also Apple II, but both are full-file hashes */
iterator->consoles[0] = RC_CONSOLE_COMMODORE_64;
}
break;
case 'p':
@ -2332,8 +2351,9 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
case 'r':
if (rc_path_compare_extension(ext, "rom"))
{
/* rom is associated with MSX, Thomson TO-8, and Fairchild Channel F.
* Since they all use the same hashing algorithm, only specify one of them */
iterator->consoles[0] = RC_CONSOLE_MSX;
iterator->consoles[1] = RC_CONSOLE_THOMSONTO8; /* cartridge */
}
if (rc_path_compare_extension(ext, "ri"))
{
@ -2393,6 +2413,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
{
iterator->consoles[0] = RC_CONSOLE_WONDERSWAN;
}
else if (rc_path_compare_extension(ext, "wasm"))
{
iterator->consoles[0] = RC_CONSOLE_WASM4;
}
else if (rc_path_compare_extension(ext, "woz"))
{
iterator->consoles[0] = RC_CONSOLE_APPLE_II;