mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
@@ -1,4 +1,13 @@
|
||||
#include "CEmptyAI.h"
|
||||
#include <iostream>
|
||||
void CEmptyAI::init(CCallback * CB)
|
||||
{
|
||||
cb = CB;
|
||||
human=false;
|
||||
playerID=-1;
|
||||
serialID=-1;
|
||||
std::cout << "EmptyAI initialized." << std::endl;
|
||||
}
|
||||
void CEmptyAI::yourTurn()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "../../AI_Base.h"
|
||||
|
||||
class CEmptyAI : public CAIBase
|
||||
class CEmptyAI : public CGlobalAI
|
||||
{
|
||||
CCallback * cb;
|
||||
public:
|
||||
void init(CCallback * CB);
|
||||
void yourTurn();
|
||||
void heroKilled(const CHeroInstance *);
|
||||
void heroCreated(const CHeroInstance *);
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -48,7 +50,12 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="EmptyAI.dll"
|
||||
OutputFile="../EmptyAI.dll"
|
||||
Version="0.1"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
MapFileName="mapfile.map"
|
||||
MapExports="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
@@ -98,6 +105,12 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
EnableFiberSafeOptimizations="true"
|
||||
WholeProgramOptimization="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -110,7 +123,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="EmptyAI.dll"
|
||||
OutputFile="../EmptyAI.dll"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "CEmptyAI.h"
|
||||
#include <cstring>
|
||||
#include <set>
|
||||
std::set<CAIBase*> ais;
|
||||
std::set<CGlobalAI*> ais;
|
||||
|
||||
DLL_EXPORT int GetGlobalAiVersion()
|
||||
{
|
||||
@@ -13,13 +13,19 @@ DLL_EXPORT void GetAiName(char* name)
|
||||
{
|
||||
strcpy(name,NAME);
|
||||
}
|
||||
DLL_EXPORT CAIBase * GetNewAI()
|
||||
DLL_EXPORT char * GetAiNameS()
|
||||
{
|
||||
char * ret = new char[50];
|
||||
strcpy(ret,NAME);
|
||||
return ret;
|
||||
}
|
||||
DLL_EXPORT CGlobalAI * GetNewAI()
|
||||
{
|
||||
return new CEmptyAI();
|
||||
// return
|
||||
}
|
||||
DLL_EXPORT void ReleaseAI(CAIBase * i)
|
||||
DLL_EXPORT void ReleaseAI(CGlobalAI * i)
|
||||
{
|
||||
//delete (TTAICore*)i;
|
||||
//ais.erase(i);
|
||||
delete (CEmptyAI*)i;
|
||||
ais.erase(i);
|
||||
}
|
||||
Reference in New Issue
Block a user