Cheat operations  
More...
 | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::CheatReset () | 
|   | Reset the cheat system.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::GetMemory (GAME_MEMORY type, uint8_t *&data, size_t &size) | 
|   | Get a region of memory.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::SetCheat (unsigned int index, bool enabled, const std::string &code) | 
|   | Set a cheat code.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCGenerateHashFromFile (std::string &hash, unsigned int consoleID, const std::string &filePath) | 
|   | Generates a RetroAchievements hash for a given game that can be used to identify the game by RetroAchievements.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCGetGameIDUrl (std::string &url, const std::string &hash) | 
|   | Gets a URL to the endpoint that returns the game ID.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCGetPatchFileUrl (std::string &url, const std::string &username, const std::string &token, unsigned int gameID) | 
|   | Gets a URL to the endpoint that returns the patch file.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCPostRichPresenceUrl (std::string &url, std::string &postData, const std::string &username, const std::string &token, unsigned int gameID, const std::string &richPresence) | 
|   | Gets a URL to the endpoint that updates the rich presence in the user's RetroAchievements profile.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCEnableRichPresence (const std::string &script) | 
|   | Enables rich presence.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCGetRichPresenceEvaluation (std::string &evaluation, unsigned int consoleID) | 
|   | Gets the rich presence evaluation for the current frame. Rich presence must be enabled first or this will fail.  
  | 
|   | 
| virtual GAME_ERROR  | kodi::addon::CInstanceGame::RCResetRuntime () | 
|   | Resets the runtime. Must be called each time a new rom is starting and when the savestate is changed.  
  | 
|   | 
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()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::CheatReset  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ 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 
 
 
 
◆ RCEnableRichPresence()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCEnableRichPresence  | 
          ( | 
          const std::string & |           script | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
Enables rich presence. 
- Parameters
 - 
  
    | [in] | script | The rich presence script from RetroAchievements | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if rich presence was enabled 
 
 
 
◆ RCGenerateHashFromFile()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCGenerateHashFromFile  | 
          ( | 
          std::string & |           hash,  | 
         
        
           | 
           | 
          unsigned int |           consoleID,  | 
         
        
           | 
           | 
          const std::string & |           filePath ) | 
         
       
   | 
  
inlinevirtual   | 
  
 
Generates a RetroAchievements hash for a given game that can be used to identify the game by RetroAchievements. 
- Parameters
 - 
  
    | [out] | hash | The hash of the file. Its size must be >=33 characters  | 
    | [in] | consoleID | The console ID as it is defined by rcheevos for the console the ROM is made for  | 
    | [in] | filePath | The path of the rom | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the hash was generated successfully 
 
 
 
◆ RCGetGameIDUrl()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCGetGameIDUrl  | 
          ( | 
          std::string & |           url,  | 
         
        
           | 
           | 
          const std::string & |           hash ) | 
         
       
   | 
  
inlinevirtual   | 
  
 
Gets a URL to the endpoint that returns the game ID. 
- Parameters
 - 
  
    | [out] | url | The URL to GET the game ID  | 
    | [in] | size | The size of the URL char array  | 
    | [in] | hash | The hash of the rom | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the URL was created 
 
 
 
◆ RCGetPatchFileUrl()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCGetPatchFileUrl  | 
          ( | 
          std::string & |           url,  | 
         
        
           | 
           | 
          const std::string & |           username,  | 
         
        
           | 
           | 
          const std::string & |           token,  | 
         
        
           | 
           | 
          unsigned int |           gameID ) | 
         
       
   | 
  
inlinevirtual   | 
  
 
Gets a URL to the endpoint that returns the patch file. 
- Parameters
 - 
  
    | [out] | url | The URL to GET the game patch file  | 
    | [in] | size | The size of the URL char array  | 
    | [in] | username | The RetroAchievements username of the user  | 
    | [in] | token | The login token to RetroAchievements of the user  | 
    | [in] | gameID | The ID of the game in RetroAchievements API | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the URL was created 
 
 
 
◆ RCGetRichPresenceEvaluation()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCGetRichPresenceEvaluation  | 
          ( | 
          std::string & |           evaluation,  | 
         
        
           | 
           | 
          unsigned int |           consoleID ) | 
         
       
   | 
  
inlinevirtual   | 
  
 
Gets the rich presence evaluation for the current frame. Rich presence must be enabled first or this will fail. 
- Parameters
 - 
  
    | [out] | evaluation | The evaluation of what the player is doing in the game this frame  | 
    | [in] | size | The size of the evaluation char pointer  | 
    | [in] | consoleID | The console ID as it is defined by rcheevos for the console the rom is made for | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the evaluation was created successfully 
 
 
 
◆ RCPostRichPresenceUrl()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCPostRichPresenceUrl  | 
          ( | 
          std::string & |           url,  | 
         
        
           | 
           | 
          std::string & |           postData,  | 
         
        
           | 
           | 
          const std::string & |           username,  | 
         
        
           | 
           | 
          const std::string & |           token,  | 
         
        
           | 
           | 
          unsigned int |           gameID,  | 
         
        
           | 
           | 
          const std::string & |           richPresence ) | 
         
       
   | 
  
inlinevirtual   | 
  
 
Gets a URL to the endpoint that updates the rich presence in the user's RetroAchievements profile. 
- Parameters
 - 
  
    | [out] | url | The URL to POST the rich presence to RetroAchievements  | 
    | [in] | urlSize | The size of the URL char array  | 
    | [out] | postData | The post data of the request  | 
    | [in] | postSize | The size of the post data char array  | 
    | [in] | username | The RetroAchievements username of the user  | 
    | [in] | token | The login token to RetroAchievements of the user  | 
    | [in] | gameID | The ID of the game in RetroAchievements API  | 
    | [in] | richPresence | The rich presence evaluation to POST | 
  
   
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the URL and post data were created 
 
 
 
◆ RCResetRuntime()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::RCResetRuntime  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
Resets the runtime. Must be called each time a new rom is starting and when the savestate is changed. 
- Returns
 - The error, or GAME_ERROR_NO_ERROR if the runtime was reset successfully 
 
 
 
◆ SetCheat()
  
  
      
        
          | virtual GAME_ERROR kodi::addon::CInstanceGame::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