dep: Update rcheevos to 0e9eb7c

This commit is contained in:
Connor McLaughlin
2022-03-27 01:01:32 +10:00
parent a55b5022c7
commit 4c4e62cee6
21 changed files with 2155 additions and 715 deletions

View File

@ -76,6 +76,11 @@ enum {
RC_CONSOLE_SHARPX1 = 64,
RC_CONSOLE_TIC80 = 65,
RC_CONSOLE_THOMSONTO8 = 66,
RC_CONSOLE_PC6000 = 67,
RC_CONSOLE_PICO = 68,
RC_CONSOLE_MEGADUCK = 69,
RC_CONSOLE_ZEEBO = 70,
RC_CONSOLE_ARDUBOY = 71,
RC_CONSOLE_HUBS = 100,
RC_CONSOLE_EVENTS = 101

View File

@ -101,7 +101,7 @@ extern "C" {
*/
typedef void* (*rc_hash_cdreader_open_track_handler)(const char* path, uint32_t track);
/* attempts to read the specified number of bytes from the file starting at the read pointer.
/* attempts to read the specified number of bytes from the file starting at the specified absolute sector.
* returns the number of bytes actually read.
*/
typedef size_t (*rc_hash_cdreader_read_sector_handler)(void* track_handle, uint32_t sector, void* buffer, size_t requested_bytes);
@ -109,17 +109,18 @@ extern "C" {
/* closes the track handle */
typedef void (*rc_hash_cdreader_close_track_handler)(void* track_handle);
/* convert absolute sector to track sector */
typedef uint32_t(*rc_hash_cdreader_absolute_sector_to_track_sector)(void* track_handle, uint32_t sector);
/* gets the absolute sector index for the first sector of a track */
typedef uint32_t(*rc_hash_cdreader_first_track_sector_handler)(void* track_handle);
struct rc_hash_cdreader
{
rc_hash_cdreader_open_track_handler open_track;
rc_hash_cdreader_read_sector_handler read_sector;
rc_hash_cdreader_close_track_handler close_track;
rc_hash_cdreader_absolute_sector_to_track_sector absolute_sector_to_track_sector;
rc_hash_cdreader_first_track_sector_handler first_track_sector;
};
void rc_hash_get_default_cdreader(struct rc_hash_cdreader* cdreader);
void rc_hash_init_default_cdreader(void);
void rc_hash_init_custom_cdreader(struct rc_hash_cdreader* reader);

View File

@ -58,6 +58,7 @@ typedef struct rc_runtime_lboard_t {
void* buffer;
rc_memref_t* invalid_memref;
unsigned char md5[16];
int serialized_size;
char owns_memrefs;
}
rc_runtime_lboard_t;
@ -66,6 +67,7 @@ typedef struct rc_runtime_richpresence_t {
rc_richpresence_t* richpresence;
void* buffer;
struct rc_runtime_richpresence_t* previous;
unsigned char md5[16];
char owns_memrefs;
}
rc_runtime_richpresence_t;

View File

@ -54,6 +54,8 @@ enum {
RC_MEMSIZE_16_BITS_BE,
RC_MEMSIZE_24_BITS_BE,
RC_MEMSIZE_32_BITS_BE,
RC_MEMSIZE_FLOAT,
RC_MEMSIZE_MBF32,
RC_MEMSIZE_VARIABLE
};
@ -67,6 +69,8 @@ typedef struct rc_memref_value_t {
char size;
/* True if the value changed this frame. */
char changed;
/* The value type of the value (for variables) */
char type;
/* True if the reference will be used in indirection.
* NOTE: This is actually a property of the rc_memref_t, but we put it here to save space */
char is_indirect;
@ -123,7 +127,7 @@ typedef struct rc_operand_t {
}
rc_operand_t;
int rc_operand_is_memref(rc_operand_t* operand);
int rc_operand_is_memref(const rc_operand_t* operand);
/*****************************************************************************\
| Conditions |
@ -280,7 +284,7 @@ struct rc_value_t {
/* The list of conditions to evaluate. */
rc_condset_t* conditions;
/* The memory references required by the value. */
/* The memory references required by the variable. */
rc_memref_t* memrefs;
/* The name of the variable. */
@ -337,7 +341,13 @@ enum {
RC_FORMAT_SCORE,
RC_FORMAT_VALUE,
RC_FORMAT_MINUTES,
RC_FORMAT_SECONDS_AS_MINUTES
RC_FORMAT_SECONDS_AS_MINUTES,
RC_FORMAT_FLOAT1,
RC_FORMAT_FLOAT2,
RC_FORMAT_FLOAT3,
RC_FORMAT_FLOAT4,
RC_FORMAT_FLOAT5,
RC_FORMAT_FLOAT6
};
int rc_parse_format(const char* format_str);
@ -398,6 +408,7 @@ rc_richpresence_t* rc_parse_richpresence(void* buffer, const char* script, lua_S
int rc_evaluate_richpresence(rc_richpresence_t* richpresence, char* buffer, unsigned buffersize, rc_peek_t peek, void* peek_ud, lua_State* L);
void rc_update_richpresence(rc_richpresence_t* richpresence, rc_peek_t peek, void* peek_ud, lua_State* L);
int rc_get_richpresence_display_string(rc_richpresence_t* richpresence, char* buffer, unsigned buffersize, rc_peek_t peek, void* peek_ud, lua_State* L);
void rc_reset_richpresence(rc_richpresence_t* self);
#ifdef __cplusplus
}