1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

More work on auto-fight.

Dynamic libraries return smart-pointers to what they create.
This commit is contained in:
Michał W. Urbańczyk
2013-06-22 21:47:51 +00:00
parent 2be2143844
commit 4a0587d500
15 changed files with 130 additions and 136 deletions

View File

@@ -19,18 +19,7 @@ extern "C" DLL_EXPORT void GetAiName(char* name)
strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
}
extern "C" DLL_EXPORT char* GetAiNameS()
extern "C" DLL_EXPORT void GetNewBattleAI(shared_ptr<CBattleGameInterface> &out)
{
// need to be defined
return NULL;
}
extern "C" DLL_EXPORT CBattleGameInterface* GetNewBattleAI()
{
return new CStupidAI();
}
extern "C" DLL_EXPORT void ReleaseBattleAI(CBattleGameInterface* i)
{
delete (CStupidAI*)i;
}
out = make_shared<CStupidAI>();
}