1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00
Files
vcmi/AI/GeniusAI/DLLMain.cpp

38 lines
692 B
C++
Raw Normal View History

#include "StdInc.h"
#include "../../lib/AI_Base.h"
2008-11-25 18:51:44 +00:00
#include "CGeniusAI.h"
using namespace geniusai;
2008-11-25 18:51:44 +00:00
const char *g_cszAiName = "Genius 1.0";
extern "C" DLL_EXPORT int GetGlobalAiVersion()
2008-11-25 18:51:44 +00:00
{
return AI_INTERFACE_VER;
}
extern "C" DLL_EXPORT void GetAiName(char* name)
2008-11-25 18:51:44 +00:00
{
strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
}
extern "C" DLL_EXPORT char* GetAiNameS()
2008-11-25 18:51:44 +00:00
{
// need to be defined
return NULL;
2008-11-25 18:51:44 +00:00
}
extern "C" DLL_EXPORT CGlobalAI* GetNewAI()
2008-11-25 18:51:44 +00:00
{
return new CGeniusAI();
}
extern "C" DLL_EXPORT void ReleaseAI(CGlobalAI* i)
2008-11-25 18:51:44 +00:00
{
delete (CGeniusAI*)i;
}
extern "C" DLL_EXPORT CBattleGameInterface* GetNewBattleAI()
{
return new CGeniusAI();
2008-11-25 18:51:44 +00:00
}