summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h72
1 files changed, 25 insertions, 47 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
index 247f24b..4ce5bbc 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2016 Team Kodi 2 * Copyright (C) 2014-2017 Team Kodi
3 * http://kodi.tv 3 * http://kodi.tv
4 * 4 *
5 * This Program is free software; you can redistribute it and/or modify 5 * This Program is free software; you can redistribute it and/or modify
@@ -26,28 +26,6 @@
26extern "C" { 26extern "C" {
27#endif 27#endif
28 28
29// --- Game API operations -----------------------------------------------------
30
31/*!
32 * \brief Return GAME_API_VERSION_STRING
33 *
34 * The add-on is backwards compatible with the frontend if this API version is
35 * is at least the frontend's minimum API version.
36 *
37 * \return Must be GAME_API_VERSION_STRING
38 */
39const char* GetGameAPIVersion(void);
40
41/*!
42 * \brief Return GAME_MIN_API_VERSION_STRING
43 *
44 * The add-on is forwards compatible with the frontend if this minimum version
45 * is no more than the frontend's API version.
46 *
47 * \return Must be GAME_MIN_API_VERSION_STRING
48 */
49const char* GetMininumGameAPIVersion(void);
50
51// --- Game operations --------------------------------------------------------- 29// --- Game operations ---------------------------------------------------------
52 30
53/*! 31/*!
@@ -233,7 +211,7 @@ GAME_ERROR CheatReset(void);
233 * 211 *
234 * \return the error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer 212 * \return the error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer
235 */ 213 */
236GAME_ERROR GetMemory(GAME_MEMORY type, const uint8_t** data, size_t* size); 214GAME_ERROR GetMemory(GAME_MEMORY type, uint8_t** data, size_t* size);
237 215
238/*! 216/*!
239 * \brief Set a cheat code 217 * \brief Set a cheat code
@@ -254,30 +232,30 @@ GAME_ERROR SetCheat(unsigned int index, bool enabled, const char* code);
254 * Note that get_addon() is defined here, so it will be available in all 232 * Note that get_addon() is defined here, so it will be available in all
255 * compiled game clients. 233 * compiled game clients.
256 */ 234 */
257void __declspec(dllexport) get_addon(GameClient* pClient) 235void __declspec(dllexport) get_addon(void* ptr)
258{ 236{
259 pClient->GetGameAPIVersion = GetGameAPIVersion; 237 AddonInstance_Game* pClient = static_cast<AddonInstance_Game*>(ptr);
260 pClient->GetMininumGameAPIVersion = GetMininumGameAPIVersion; 238
261 pClient->LoadGame = LoadGame; 239 pClient->toAddon.LoadGame = LoadGame;
262 pClient->LoadGameSpecial = LoadGameSpecial; 240 pClient->toAddon.LoadGameSpecial = LoadGameSpecial;
263 pClient->LoadStandalone = LoadStandalone; 241 pClient->toAddon.LoadStandalone = LoadStandalone;
264 pClient->UnloadGame = UnloadGame; 242 pClient->toAddon.UnloadGame = UnloadGame;
265 pClient->GetGameInfo = GetGameInfo; 243 pClient->toAddon.GetGameInfo = GetGameInfo;
266 pClient->GetRegion = GetRegion; 244 pClient->toAddon.GetRegion = GetRegion;
267 pClient->RequiresGameLoop = RequiresGameLoop; 245 pClient->toAddon.RequiresGameLoop = RequiresGameLoop;
268 pClient->RunFrame = RunFrame; 246 pClient->toAddon.RunFrame = RunFrame;
269 pClient->Reset = Reset; 247 pClient->toAddon.Reset = Reset;
270 pClient->HwContextReset = HwContextReset; 248 pClient->toAddon.HwContextReset = HwContextReset;
271 pClient->HwContextDestroy = HwContextDestroy; 249 pClient->toAddon.HwContextDestroy = HwContextDestroy;
272 pClient->UpdatePort = UpdatePort; 250 pClient->toAddon.UpdatePort = UpdatePort;
273 pClient->HasFeature = HasFeature; 251 pClient->toAddon.HasFeature = HasFeature;
274 pClient->InputEvent = InputEvent; 252 pClient->toAddon.InputEvent = InputEvent;
275 pClient->SerializeSize = SerializeSize; 253 pClient->toAddon.SerializeSize = SerializeSize;
276 pClient->Serialize = Serialize; 254 pClient->toAddon.Serialize = Serialize;
277 pClient->Deserialize = Deserialize; 255 pClient->toAddon.Deserialize = Deserialize;
278 pClient->CheatReset = CheatReset; 256 pClient->toAddon.CheatReset = CheatReset;
279 pClient->GetMemory = GetMemory; 257 pClient->toAddon.GetMemory = GetMemory;
280 pClient->SetCheat = SetCheat; 258 pClient->toAddon.SetCheat = SetCheat;
281} 259}
282 260
283#ifdef __cplusplus 261#ifdef __cplusplus