Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

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.

Function Documentation

◆ CheatReset()

virtual GAME_ERROR CheatReset ( )
inlinevirtual

Reset the cheat system.

Returns
the error, or GAME_ERROR_NO_ERROR if the cheat system was reset

◆ GetMemory()

virtual GAME_ERROR GetMemory ( GAME_MEMORY type,
uint8_t *& data,
size_t & size )
inlinevirtual

Get a region of memory.

Parameters
[in]typeThe type of memory to retrieve
[in]dataSet to the region of memory; must remain valid until UnloadGame() is called
[in]sizeSet 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

◆ RCGenerateHashFromFile()

virtual GAME_ERROR 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]hashThe hash of the file. Its size must be >=33 characters
[in]consoleIDThe console ID as it is defined by rcheevos for the console the ROM is made for
[in]filePathThe path of the rom
Returns
the error, or GAME_ERROR_NO_ERROR if the hash was generated successfully

◆ RCGetGameIDUrl()

virtual GAME_ERROR RCGetGameIDUrl ( std::string & url,
const std::string & hash )
inlinevirtual

Gets a URL to the endpoint that returns the game ID.

Parameters
[out]urlThe URL to GET the game ID
[in]sizeThe size of the URL char array
[in]hashThe hash of the rom
Returns
the error, or GAME_ERROR_NO_ERROR if the URL was created

◆ RCGetPatchFileUrl()

virtual GAME_ERROR 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]urlThe URL to GET the game patch file
[in]sizeThe size of the URL char array
[in]usernameThe RetroAchievements username of the user
[in]tokenThe login token to RetroAchievements of the user
[in]gameIDThe ID of the game in RetroAchievements API
Returns
the error, or GAME_ERROR_NO_ERROR if the URL was created

◆ RCPostRichPresenceUrl()

virtual GAME_ERROR 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]urlThe URL to POST the rich presence to RetroAchievements
[in]urlSizeThe size of the URL char array
[out]postDataThe post data of the request
[in]postSizeThe size of the post data char array
[in]usernameThe RetroAchievements username of the user
[in]tokenThe login token to RetroAchievements of the user
[in]gameIDThe ID of the game in RetroAchievements API
[in]richPresenceThe rich presence evaluation to POST
Returns
the error, or GAME_ERROR_NO_ERROR if the URL and post data were created

◆ RCEnableRichPresence()

virtual GAME_ERROR RCEnableRichPresence ( const std::string & script)
inlinevirtual

Enables rich presence.

Parameters
[in]scriptThe rich presence script from RetroAchievements
Returns
the error, or GAME_ERROR_NO_ERROR if rich presence was enabled

◆ RCGetRichPresenceEvaluation()

virtual GAME_ERROR 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]evaluationThe evaluation of what the player is doing in the game this frame
[in]sizeThe size of the evaluation char pointer
[in]consoleIDThe 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

◆ RCResetRuntime()

virtual GAME_ERROR 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 runtim was reseted successfully