Explorar o código

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)

Michał W. Urbańczyk %!s(int64=18) %!d(string=hai) anos
pai
achega
97f4fbcce8
Modificáronse 4 ficheiros con 227 adicións e 0 borrados
  1. 13 0
      AI/EmptyAI/CEmptyAI.cpp
  2. 12 0
      AI/EmptyAI/CEmptyAI.h
  3. 177 0
      AI/EmptyAI/Z_EmptyAI.vcproj
  4. 25 0
      AI/EmptyAI/exp_funcs.cpp

+ 13 - 0
AI/EmptyAI/CEmptyAI.cpp

@@ -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 - 0
AI/EmptyAI/CEmptyAI.h

@@ -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 - 0
AI/EmptyAI/Z_EmptyAI.vcproj

@@ -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 - 0
AI/EmptyAI/exp_funcs.cpp

@@ -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);
+}