Cheat operations
Cheat operation parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ CheatReset()
◆ GetMemory()
Get a region of memory.
- Parameters
-
| [in] | type | The type of memory to retrieve |
| [in] | data | Set to the region of memory; must remain valid until UnloadGame() is called |
| [in] | size | Set to the size of the region of memory |
- Returns
- The error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer
◆ SetCheat()
| virtual GAME_ERROR SetCheat |
( |
unsigned int | index, |
|
|
bool | enabled, |
|
|
const std::string & | code ) |
|
inlinevirtual |
Set a cheat code.
- Parameters
-
| [in] | index | |
| [in] | enabled | |
| [in] | code | |
- Returns
- The error, or GAME_ERROR_NO_ERROR if the cheat was set
◆ SetRetroAchievementsCredentials()
| virtual GAME_ERROR SetRetroAchievementsCredentials |
( |
const std::string & | username, |
|
|
const std::string & | token ) |
|
inlinevirtual |
Set the credentials of the RetroAchievements user.
- Parameters
-
| [in] | username | The RetroAchievements username of the user |
| [in] | token | The login token to RetroAchievements of the user |
- Returns
- The error, or GAME_ERROR_NO_ERROR if the call was successful
◆ ActivateAchievement()
| virtual GAME_ERROR ActivateAchievement |
( |
unsigned int | cheevoId, |
|
|
const std::string & | memAddrExpression ) |
|
inlinevirtual |
Activate an achievement.
- Parameters
-
| [in] | cheevoId | The achievement ID |
| [in] | memAddrExpression | Achievement memory expression from patch data as a string |
- Returns
- The error, or GAME_ERROR_NO_ERROR if the call was successful
◆ GetCheevoUrlId()
| virtual GAME_ERROR GetCheevoUrlId |
( |
const std::function< void(const std::string &achievementUrl, unsigned int cheevoId)> & | callback | ) |
|
|
inlinevirtual |
Get triggered achievement URL and ID pairs.
- Parameters
-
| [in] | callback | Callback invoked once per triggered achievement during this call. It may be called zero or more times before the function returns. Implementations must not retain/copy the callback for later use. The URL string reference is valid only for the callback invocation and must be copied if needed afterwards. |
- Returns
- The error, or GAME_ERROR_NO_ERROR if the call was successful
◆ RCOnGameLoaded()
Callback to Kodi Function
Notify Kodi that a game has been identified by the achievement runtime
- Parameters
-
| [in] | data | The achievement set of the game |
- Note
- Added in Game API 8.0.0
◆ RCOnAchievementTriggered()
Callback to Kodi Function
Notify Kodi that the player has earned an achievement
- Parameters
-
| [in] | data | The achievement that was earned |
- Note
- Added in Game API 8.0.0
◆ RCOnGameCompleted()
| void RCOnGameCompleted |
( |
const std::string & | title, |
|
|
bool | hardcore ) |
|
inline |
Callback to Kodi Function
Notify Kodi that every achievement of the game has been earned
- Parameters
-
| [in] | title | The title of the completed game |
| [in] | hardcore | True if the game was completed in hardcore mode |
- Note
- Added in Game API 8.0.0
◆ RCOnRichPresenceUpdated()
| void RCOnRichPresenceUpdated |
( |
const std::string & | evaluation | ) |
|
|
inline |
Callback to Kodi Function
Publish the current rich presence evaluation to Kodi
- Parameters
-
| [in] | evaluation | What the player is currently doing in the game |
- Note
- Added in Game API 8.0.0
◆ RCOnLoginResult()
Callback to Kodi Function
Notify Kodi of the outcome of a login attempt
- Parameters
-
- Note
- Added in Game API 8.0.0
◆ RCOnAchievementProgress()
Callback to Kodi Function
Publish progress towards the game's measured achievements
Sent whenever the reported progress changes. Achievements without a measured trigger condition are omitted.
- Parameters
-
| [in] | progress | Progress of each measured achievement |
- Note
- Added in Game API 8.0.0
◆ RCOnServerError()
| void RCOnServerError |
( |
const std::string & | message, |
|
|
const std::string & | api ) |
|
inline |
Callback to Kodi Function
Report an error returned by the RetroAchievements server
- Parameters
-
| [in] | message | The error as reported by the server |
| [in] | api | The API call that failed, or an empty string |
- Note
- Added in Game API 8.0.0
◆ RCOnConnectionChanged()
| void RCOnConnectionChanged |
( |
bool | connected | ) |
|
|
inline |
Callback to Kodi Function
Report a change in connectivity to the RetroAchievements server
Unlocks earned while disconnected are held by the add-on and submitted once the connection returns.
- Parameters
-
| [in] | connected | True if the server is reachable again |
- Note
- Added in Game API 8.0.0