1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00
vcmi/AI/EmptyAI/exp_funcs.cpp

31 lines
588 B
C++
Raw Normal View History

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