-
Notifications
You must be signed in to change notification settings - Fork 26
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
Game API v4.0.0: Achievement support for RetroPlayer #104
base: Omega
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ class CCheevos | |
void ResetRuntime(); | ||
bool GenerateHashFromFile(std::string& hash, unsigned int consoleID, const std::string& filePath); | ||
bool GetGameIDUrl(std::string& url, const std::string& hash); | ||
void SetRetroAchievementsCredentials(const std::string& username, const std::string& token); | ||
bool GetPatchFileUrl(std::string& url, | ||
const std::string& username, | ||
const std::string& token, | ||
|
@@ -42,7 +43,13 @@ class CCheevos | |
const std::string& richPresence); | ||
void EnableRichPresence(const std::string& script); | ||
void EvaluateRichPresence(std::string& evaluation, unsigned int consoleID); | ||
void ActivateAchievement(unsigned cheevo_id, const char* memaddr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change the param name to |
||
bool AwardAchievement( | ||
char* url, size_t size, unsigned cheevo_id, int hardcore, const std::string& game_hash); | ||
void DeactivateTriggeredAchievement(unsigned cheevo_id); | ||
void TestCheevoStatusPerFrame(); | ||
unsigned int Peek(unsigned int address, unsigned int numBytes); | ||
void GetCheevo_URL_ID(void (*callback)(const char* achievement_url, unsigned cheevo_id)); | ||
|
||
private: | ||
const uint8_t* FixupFind(unsigned address, CMemoryMap& mmap, int consolecheevos); | ||
|
@@ -51,6 +58,9 @@ class CCheevos | |
size_t Reduce(size_t addr, size_t mask); | ||
|
||
static unsigned int PeekInternal(unsigned address, unsigned num_bytes, void* ud); | ||
static void RuntimeEventHandler(const rc_runtime_event_t* runtime_event); | ||
|
||
void (*m_callback)(const char* achievement_url, unsigned cheevo_id); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why but I remember that we wanted to remove this, I had open this PR Shardul555#1 I just rebased it on this PR. @garbear can you check it if you remember why we wanted this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want a static function in RetroPlayer. |
||
|
||
int m_consoleID; | ||
|
||
|
@@ -61,5 +71,9 @@ class CCheevos | |
rc_richpresence_t* m_richPresence = nullptr; | ||
std::string m_richPresenceScript; | ||
std::vector<char> m_richPresenceBuffer; | ||
|
||
std::string m_hash; | ||
std::string m_username; | ||
std::string m_token; | ||
}; | ||
} // namespace LIBRETRO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should add a check here instead of a comment like we do in the other methods