1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-28 03:57:02 +02:00
vcmi/AI/EmptyAI/exp_funcs.cpp
beegee1 7f04ed990b Major refactoring. First part: BattleInterface
Introduction of pre compiled headers,...
2011-12-13 21:23:17 +00:00

32 lines
566 B
C++

#include "StdInc.h"
#include "../../AI_Base.h"
#include "CEmptyAI.h"
std::set<CGlobalAI*> ais;
extern "C" DLL_LINKAGE int GetGlobalAiVersion()
{
return AI_INTERFACE_VER;
}
extern "C" DLL_LINKAGE void GetAiName(char* name)
{
strcpy(name,NAME);
}
extern "C" DLL_LINKAGE char * GetAiNameS()
{
char * ret = new char[50];
strcpy(ret,NAME);
return ret;
}
extern "C" DLL_LINKAGE CGlobalAI * GetNewAI()
{
return new CEmptyAI();
// return
}
extern "C" DLL_LINKAGE void ReleaseAI(CGlobalAI * i)
{
delete (CEmptyAI*)i;
ais.erase(i);
}