1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00
vcmi/AI/EmptyAI/exp_funcs.cpp

31 lines
517 B
C++
Raw Normal View History

#include "../../AI_Base.h"
#include "CEmptyAI.h"
#include <cstring>
#include <set>
2007-10-21 16:45:13 +00:00
std::set<CGlobalAI*> ais;
DLL_EXPORT int GetGlobalAiVersion()
{
return AI_INTERFACE_VER;
}
DLL_EXPORT void GetAiName(char* name)
{
strcpy(name,NAME);
}
2007-10-21 16:45:13 +00:00
DLL_EXPORT char * GetAiNameS()
{
char * ret = new char[50];
strcpy(ret,NAME);
return ret;
}
DLL_EXPORT CGlobalAI * GetNewAI()
{
return new CEmptyAI();
// return
}
2007-10-21 16:45:13 +00:00
DLL_EXPORT void ReleaseAI(CGlobalAI * i)
{
2007-10-21 16:45:13 +00:00
delete (CEmptyAI*)i;
ais.erase(i);
}