1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

First EmptyAI. It's not used yet, but it can be compiled.

Support for AIs I'll soon after infoboxes for towns (if there won't anything urgent)
This commit is contained in:
Michał W. Urbańczyk 2007-10-16 22:41:45 +00:00
parent 4cca2da9c0
commit 97f4fbcce8
4 changed files with 227 additions and 0 deletions

13
AI/EmptyAI/CEmptyAI.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "CEmptyAI.h"
void CEmptyAI::yourTurn()
{
}
void CEmptyAI::heroKilled(const CHeroInstance *)
{
}
void CEmptyAI::heroCreated(const CHeroInstance *)
{
}
void CEmptyAI::heroMoved(const HeroMoveDetails &)
{
}

12
AI/EmptyAI/CEmptyAI.h Normal file
View File

@ -0,0 +1,12 @@
#include "../../AI_Base.h"
class CEmptyAI : public CAIBase
{
public:
void yourTurn();
void heroKilled(const CHeroInstance *);
void heroCreated(const CHeroInstance *);
void heroMoved(const HeroMoveDetails &);
};
#define NAME "EmptyAI 0.1"

177
AI/EmptyAI/Z_EmptyAI.vcproj Normal file
View File

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Z_EmptyAI"
ProjectGUID="{954A9AEC-B3D0-46FA-9969-D44F069EAA23}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="EmptyAI.dll"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="EmptyAI.dll"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\CEmptyAI.cpp"
>
</File>
<File
RelativePath=".\exp_funcs.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\CEmptyAI.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

25
AI/EmptyAI/exp_funcs.cpp Normal file
View File

@ -0,0 +1,25 @@
#include "../../AI_Base.h"
#include "CEmptyAI.h"
#include <cstring>
#include <set>
std::set<CAIBase*> ais;
DLL_EXPORT int GetGlobalAiVersion()
{
return AI_INTERFACE_VER;
}
DLL_EXPORT void GetAiName(char* name)
{
strcpy(name,NAME);
}
DLL_EXPORT CAIBase * GetNewAI()
{
return new CEmptyAI();
// return
}
DLL_EXPORT void ReleaseAI(CAIBase * i)
{
//delete (TTAICore*)i;
//ais.erase(i);
}