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