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:
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::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
◆ 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