Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rc_client_t #242

Merged
merged 86 commits into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
15257d8
add rc_runtime2_t
Jamiras Apr 16, 2023
0a943c0
add async test
Jamiras Apr 27, 2023
3213e86
add begin_load_game path
Jamiras Apr 30, 2023
52c68f2
process achievements on game load
Jamiras May 1, 2023
0df27a9
process leaderboards on game load
Jamiras May 1, 2023
fce70a4
process rich presence on game load
Jamiras May 1, 2023
c37f9f3
load active achievements into runtime
Jamiras May 1, 2023
117646d
handle failure during load game
Jamiras May 2, 2023
4346283
add rc_runtime2_get_achievement_list
Jamiras May 3, 2023
7deb41c
add rc_runtime2_do_frame
Jamiras May 4, 2023
653c1b5
add test for measured progress event
Jamiras May 4, 2023
b2f7edb
add test for challenge indicator event
Jamiras May 4, 2023
b0d6c3c
add hardcore toggle
Jamiras May 7, 2023
49c6dd4
add encore_mode
Jamiras May 7, 2023
d9762e0
track softcore score separately
Jamiras May 7, 2023
23b02ea
add userdata
Jamiras May 7, 2023
0de6a03
hook up leaderboard events
Jamiras May 7, 2023
06f197d
add tests for sharing trackers
Jamiras May 8, 2023
69bc43b
add tests for mastery
Jamiras May 11, 2023
1199e39
add progress buckets tests for achievement list
Jamiras May 11, 2023
902636c
add identify_and_load_game
Jamiras May 15, 2023
b060b4b
add change_media
Jamiras May 16, 2023
b432afe
add ping
Jamiras May 16, 2023
8fedd97
automatically retry failed unlocks
Jamiras May 17, 2023
4e92fcd
automatically retry failed leaderboard submissions
Jamiras May 18, 2023
552c934
disable active trackers when disabling hardcore
Jamiras May 18, 2023
f383b86
events should not be raised inside lock
Jamiras May 18, 2023
2f8d9e7
reset leaderboards and rich presence on reset
Jamiras May 18, 2023
fe4e84b
add serialize/deserialize progress
Jamiras May 18, 2023
6e45fa2
cache media hashes within a game session
Jamiras May 19, 2023
3427c7d
add get_rich_presence_message
Jamiras May 19, 2023
468a6c8
handle change_media while game is loading
Jamiras May 20, 2023
c8339fb
add test_unofficial flag
Jamiras May 20, 2023
3f0fb09
rename rc_runtime2 -> rc_client
Jamiras May 25, 2023
7cbabba
add image helpers
Jamiras May 25, 2023
86c921e
rename get_achievement_list->create_achievement_list
Jamiras May 25, 2023
fcac332
don't initialize unlock state in encore mode
Jamiras May 26, 2023
20dc41d
rename runtime variables -> client
Jamiras May 29, 2023
ad42133
only raise one progress event per frame
Jamiras May 29, 2023
026bb79
add null checks
Jamiras May 29, 2023
dbe1413
allow memory read function to be changed after initialization
Jamiras May 29, 2023
c7c5717
add rc_libretro_memory_read
Jamiras May 30, 2023
236c1a2
return uninitialized game for hash resolution failure
Jamiras May 30, 2023
ac75ab4
add RC_ABORTED
Jamiras May 30, 2023
462d8aa
add measured_percent to rc_client_achievement_t
Jamiras Jun 1, 2023
24482e1
add rc_client_get_user_game_summary
Jamiras Jun 1, 2023
dd9799e
add tests for async login while loading game
Jamiras Jun 3, 2023
4110396
put trackers on game->buffer
Jamiras Jun 7, 2023
c5c2638
move achievement and leaderboard lists into subset structure
Jamiras Jun 9, 2023
29f3746
support for subsets in rc_client_create_achievement_list
Jamiras Jun 9, 2023
530baef
add rc_client_is_processing_required
Jamiras Jun 10, 2023
d5fa664
fix subset title when subset loaded first
Jamiras Jun 10, 2023
33e7667
don't lock achievements when toggling hardcore with encore mode enabled
Jamiras Jun 11, 2023
09e390d
don't raise mastery event for subset
Jamiras Jun 11, 2023
d28488e
fix qsort for recent unlocks
Jamiras Jun 11, 2023
f5945eb
add RC_NO_RESPONSE
Jamiras Jun 11, 2023
0279c3e
fix c89 build
Jamiras Jun 11, 2023
b343880
fix valgrind errors
Jamiras Jun 11, 2023
dc51136
variadic macros are not universally supported
Jamiras Jun 11, 2023
ae57491
fix x86 build
Jamiras Jun 11, 2023
f9b5b80
fix valgrind errors
Jamiras Jun 12, 2023
e363d1b
add callbacks in case malloc fails
Jamiras Jun 27, 2023
6710148
delay change media lookup until after game is fully loaded
Jamiras Jun 28, 2023
07c7d2f
fix compile warning
Jamiras Jun 28, 2023
e79c4cd
remove rc_client_get_achievement_count
Jamiras Jun 28, 2023
94e5a34
add points_core and points_unlocked to rc_client_user_game_summary_t
Jamiras Jun 28, 2023
feb48fd
don't start a session if spectator mode enabled before loading game
Jamiras Jun 28, 2023
b6d56ea
add rc_client_t to rc_client_message_callback_t
Jamiras Jun 28, 2023
c33d316
move rc_client_t out of rc_client_event_t
Jamiras Jun 28, 2023
43440b1
renamed rc_client_set_test_unofficial to rc_client_set_unofficial_ena…
Jamiras Jun 28, 2023
b019eb8
add rc_client_create_leaderboard_list
Jamiras Jun 28, 2023
f617f7d
use rc_api_server_response_t in rc_client_server_callback_t
Jamiras Jun 29, 2023
7904857
add header
Jamiras Jun 29, 2023
706c40d
add rc_client_begin_fetch_leaderboard_entries
Jamiras Jun 29, 2023
1c081a9
address valgrind warnings
Jamiras Jun 30, 2023
2e17302
add callback_userdata to all begin_ functions
Jamiras Jun 30, 2023
8fe862c
add rc_client_async_handle_t
Jamiras Jun 30, 2023
55d0a1b
fix c89 build
Jamiras Jul 1, 2023
28bbbf5
allow rc_client_deserialize_progress to be called with NULL progress
Jamiras Jul 1, 2023
a57a587
add rc_client_logout
Jamiras Jul 1, 2023
34509ab
Merge branch 'develop' into rc_client
Jamiras Jul 1, 2023
ac91c36
address compile warning
Jamiras Jul 1, 2023
fb62c65
don't raise progress indicator event when value becomes 0
Jamiras Jul 2, 2023
51f88a0
reset achievement->measured_percent when measured_value becomes 0
Jamiras Jul 3, 2023
86374e5
fix active count calculation when hardcode toggled while encore enabled
Jamiras Jul 4, 2023
52ea1df
log when setting encore/unofficial/spectator modes
Jamiras Jul 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end_of_line = crlf
insert_final_newline = true

# latin1 is a type of ASCII, should work with mbcs
[*.{h,cpp}]
[*.{h,c,cpp}]
charset = latin1
indent_style = space
indent_size = 2
Expand Down
11 changes: 11 additions & 0 deletions include/rc_api_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "rc_error.h"

#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -66,6 +68,15 @@ void rc_api_destroy_request(rc_api_request_t* request);
void rc_api_set_host(const char* hostname);
void rc_api_set_image_host(const char* hostname);

typedef struct rc_api_server_response_t {
/* Pointer to the data returned from the server */
const char* body;
/* Length of data returned from the server (Content-Length) */
size_t body_length;
/* HTTP status code returned from the server */
int http_status_code;
} rc_api_server_response_t;

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions include/rc_api_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ typedef struct rc_api_award_achievement_response_t {
unsigned awarded_achievement_id;
/* The updated player score */
unsigned new_player_score;
/* The updated player softcore score */
unsigned new_player_score_softcore;
/* The number of achievements the user has not yet unlocked for this game
* (in hardcore/non-hardcore per hardcore flag in request) */
unsigned achievements_remaining;
Expand Down
2 changes: 2 additions & 0 deletions include/rc_api_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ typedef struct rc_api_login_response_t {
const char* api_token;
/* The current score of the player */
unsigned score;
/* The current softcore score of the player */
unsigned score_softcore;
/* The number of unread messages waiting for the player on the web site */
unsigned num_unread_messages;
/* The preferred name to display for the player */
Expand Down
Loading