Kodi Development  20.0
for Binary and Script based Add-Ons

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.

Header parts:

GAME_ERROR GetMemory(GAME_MEMORY type, uint8_t*& data, size_t& size) override;
GAME_ERROR SetCheat(unsigned int index, bool enabled, const std::string& code) override;
virtual GAME_ERROR CheatReset()
Reset the cheat system.
Definition: Game.h:916
virtual GAME_ERROR GetMemory(GAME_MEMORY type, uint8_t *&data, size_t &size)
Get a region of memory.
Definition: Game.h:931
virtual GAME_ERROR SetCheat(unsigned int index, bool enabled, const std::string &code)
Set a cheat code.
Definition: Game.h:946
GAME_MEMORY
Game Memory
Definition: game.h:600
GAME_ERROR
Game add-on error codes
Definition: game.h:34

Source parts:

GAME_ERROR CMyInstance::CheatReset()
{
}
GAME_ERROR CMyInstance::GetMemory(GAME_MEMORY type, uint8_t*& data, size_t& size)
{
}
GAME_ERROR CMyInstance::SetCheat(unsigned int index, bool enabled, const std::string& code)
{
}
@ GAME_ERROR_NOT_IMPLEMENTED
the method that the frontend called is not implemented
Definition: game.h:42

Modules

 Group header include
 
 Group source include
 

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