mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
cab8f9e11d
Fixes for issues with deserialization and handling Tactics secondary skill.
40 lines
787 B
C++
40 lines
787 B
C++
#pragma warning (disable: 4100 4251 4245 4018 4081)
|
|
#include "../../AI_Base.h"
|
|
#pragma warning (default: 4100 4251 4245 4018 4081)
|
|
|
|
#include "CGeniusAI.h"
|
|
|
|
using namespace geniusai;
|
|
|
|
const char *g_cszAiName = "Genius 1.0";
|
|
|
|
extern "C" DLL_F_EXPORT int GetGlobalAiVersion()
|
|
{
|
|
return AI_INTERFACE_VER;
|
|
}
|
|
|
|
extern "C" DLL_F_EXPORT void GetAiName(char* name)
|
|
{
|
|
strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
|
|
}
|
|
|
|
extern "C" DLL_F_EXPORT char* GetAiNameS()
|
|
{
|
|
// need to be defined
|
|
return NULL;
|
|
}
|
|
|
|
extern "C" DLL_F_EXPORT CGlobalAI* GetNewAI()
|
|
{
|
|
return new CGeniusAI();
|
|
}
|
|
|
|
extern "C" DLL_F_EXPORT void ReleaseAI(CGlobalAI* i)
|
|
{
|
|
delete (CGeniusAI*)i;
|
|
}
|
|
|
|
extern "C" DLL_F_EXPORT CBattleGameInterface* GetNewBattleAI()
|
|
{
|
|
return new CGeniusAI();
|
|
} |