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:
@@ -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>();
|
||||
}
|
||||
Reference in New Issue
Block a user