2011-12-14 00:23:17 +03:00
|
|
|
#include "StdInc.h"
|
|
|
|
|
2007-10-17 01:41:45 +03:00
|
|
|
#include "CEmptyAI.h"
|
2011-12-14 00:23:17 +03:00
|
|
|
|
2007-10-21 19:45:13 +03:00
|
|
|
std::set<CGlobalAI*> ais;
|
2011-12-14 00:23:17 +03:00
|
|
|
extern "C" DLL_LINKAGE int GetGlobalAiVersion()
|
2007-10-17 01:41:45 +03:00
|
|
|
{
|
|
|
|
return AI_INTERFACE_VER;
|
|
|
|
}
|
|
|
|
|
2011-12-14 00:23:17 +03:00
|
|
|
extern "C" DLL_LINKAGE void GetAiName(char* name)
|
2007-10-17 01:41:45 +03:00
|
|
|
{
|
|
|
|
strcpy(name,NAME);
|
|
|
|
}
|
2011-12-14 00:23:17 +03:00
|
|
|
extern "C" DLL_LINKAGE char * GetAiNameS()
|
2007-10-21 19:45:13 +03:00
|
|
|
{
|
|
|
|
char * ret = new char[50];
|
|
|
|
strcpy(ret,NAME);
|
|
|
|
return ret;
|
|
|
|
}
|
2011-12-14 00:23:17 +03:00
|
|
|
extern "C" DLL_LINKAGE CGlobalAI * GetNewAI()
|
2007-10-17 01:41:45 +03:00
|
|
|
{
|
|
|
|
return new CEmptyAI();
|
|
|
|
// return
|
|
|
|
}
|
2011-12-14 00:23:17 +03:00
|
|
|
extern "C" DLL_LINKAGE 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);
|
2011-12-14 00:23:17 +03:00
|
|
|
}
|