Inherits IAddonInstance.
Classes | |
class | CStream |
Public Member Functions | |
virtual GAME_ERROR | CheatReset () |
Reset the cheat system. | |
CInstanceGame () | |
Game class constructor. | |
void | CloseGame (void) |
Callback to Kodi Function Requests the frontend to stop the current game | |
virtual bool | ConnectController (bool connect, const std::string &port_address, const std::string &controller_id) |
Connect/disconnect a controller to a port on the virtual game console. | |
virtual GAME_ERROR | Deserialize (const uint8_t *data, size_t size) |
Deserialize the game from the given state. | |
virtual bool | EnableKeyboard (bool enable, const std::string &controller_id) |
Enable/disable keyboard input using the specified controller. | |
virtual bool | EnableMouse (bool enable, const std::string &controller_id) |
Enable/disable mouse input using the specified controller. | |
bool | Extensions (std::vector< std::string > &extensions) |
Callback to Kodi Function The extensions in the <extensions> property from addon.xml. | |
virtual void | FreeTopology (game_input_topology *topology) |
Free the topology's resources. | |
std::string | GameClientDllPath () const |
Callback to Kodi Function The path of the game client being loaded. | |
virtual GAME_ERROR | GetGameTiming (game_system_timing &timing_info) |
Get timing information about the loaded game. | |
virtual GAME_ERROR | GetMemory (GAME_MEMORY type, uint8_t *&data, size_t &size) |
Get a region of memory. | |
virtual GAME_REGION | GetRegion () |
Get region of the loaded game. | |
virtual game_input_topology * | GetTopology () |
Get the input topology that specifies which controllers can be connected. | |
virtual bool | HasFeature (const std::string &controller_id, const std::string &feature_name) |
Check if input is accepted for a feature on the controller. | |
virtual GAME_ERROR | HwContextDestroy () |
Called before the context is destroyed. | |
virtual GAME_ERROR | HwContextReset () |
Invalidates the current HW context and reinitializes GPU resources. | |
game_proc_address_t | HwGetProcAddress (const char *sym) |
Callback to Kodi Function Get a symbol from the hardware context | |
virtual bool | InputEvent (const game_input_event &event) |
Notify the add-on of an input event. | |
bool | KodiInputEvent (const game_input_event &event) |
Callback to Kodi Function Notify the port of an input event | |
virtual GAME_ERROR | LoadGame (const std::string &url) |
Load a game. | |
virtual GAME_ERROR | LoadGameSpecial (SPECIAL_GAME_TYPE type, const std::vector< std::string > &urls) |
Load a game that requires multiple files. | |
virtual GAME_ERROR | LoadStandalone () |
Begin playing without a game file. | |
std::string | ProfileDirectory () const |
Callback to Kodi Function The writable directory of the frontend. | |
bool | ProxyDllPaths (std::vector< std::string > &paths) |
Callback to Kodi Function Paths to proxy DLLs used to load the game client. | |
virtual GAME_ERROR | RCEnableRichPresence (const std::string &script) |
Enables rich presence. | |
virtual GAME_ERROR | 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 | RCGetGameIDUrl (std::string &url, const std::string &hash) |
Gets a URL to the endpoint that returns the game ID. | |
virtual GAME_ERROR | 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 | 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 | 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 | RCResetRuntime () |
Resets the runtime. Must be called each time a new rom is starting and when the savestate is changed. | |
virtual bool | RequiresGameLoop () |
Return true if the client requires the frontend to provide a game loop. | |
virtual GAME_ERROR | Reset () |
Reset the current game. | |
bool | ResourceDirectories (std::vector< std::string > &dirs) |
Callback to Kodi Function The "system" directories of the frontend. | |
virtual GAME_ERROR | RunFrame () |
Run a single frame for add-ons that use a game loop. | |
virtual GAME_ERROR | Serialize (uint8_t *data, size_t size) |
Serialize the state of the game. | |
virtual size_t | SerializeSize () |
Get the number of bytes required to serialize the game. | |
virtual GAME_ERROR | SetCheat (unsigned int index, bool enabled, const std::string &code) |
Set a cheat code. | |
virtual void | SetControllerLayouts (const std::vector< kodi::addon::GameControllerLayout > &controllers) |
Set the layouts for known controllers. | |
bool | SupportsVFS () const |
Callback to Kodi Function The value of the <supports_vfs> property from addon.xml. | |
virtual GAME_ERROR | UnloadGame () |
Unload the current game. | |
~CInstanceGame () override=default | |
Destructor. | |
Public Member Functions inherited from IAddonInstance | |
bool | CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue) |
template<typename enumType > | |
bool | CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue) |
bool | CheckInstanceSettingFloat (const std::string &settingName, float &settingValue) |
bool | CheckInstanceSettingInt (const std::string &settingName, int &settingValue) |
bool | CheckInstanceSettingString (const std::string &settingName, std::string &settingValue) |
virtual ADDON_STATUS | CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl) |
std::string | GetInstanceAPIVersion () const |
bool | GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false) |
template<typename enumType > | |
enumType | GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0)) |
float | GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f) |
int | GetInstanceSettingInt (const std::string &settingName, int defaultValue=0) |
std::string | GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="") |
std::string | GetInstanceUserPath (const std::string &append="") |
IAddonInstance (const kodi::addon::IInstanceInfo &instance) | |
bool | IsInstanceSettingUsingDefault (const std::string &settingName) |
virtual ADDON_STATUS | SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue) |
void | SetInstanceSettingBoolean (const std::string &settingName, bool settingValue) |
template<typename enumType > | |
void | SetInstanceSettingEnum (const std::string &settingName, enumType settingValue) |
void | SetInstanceSettingFloat (const std::string &settingName, float settingValue) |
void | SetInstanceSettingInt (const std::string &settingName, int settingValue) |
void | SetInstanceSettingString (const std::string &settingName, const std::string &settingValue) |