Permalink
Browse files

Imported initial vendor revision with linefeeds converted

git-svn-id: https://spring.clan-sy.com/svn/spring/vendor@2 37977431-3df6-0310-b722-df95706aa16b
  • Loading branch information...
1 parent 589f2eb commit d1811b38413e5e98daff05e1eba3b4b1660e38f5 dave committed May 4, 2005
Showing 670 changed files with 174,559 additions and 0 deletions.
Oops, something went wrong.
@@ -0,0 +1,85 @@
+// GroupAI.h: interface for the CGroupAI class.
+// Dont modify this file
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_GROUPAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_)
+#define AFX_GROUPAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "IGroupAI.h"
+#include <set>
+#include <map>
+#include "float3.h"
+
+const char AI_NAME[]="Central build AI";
+
+using namespace std;
+
+class CGroupAI : public IGroupAI
+{
+public:
+ CGroupAI();
+ virtual ~CGroupAI();
+
+ virtual void InitAi(IGroupAiCallback* callback);
+
+ virtual bool AddUnit(int unit);
+ virtual void RemoveUnit(int unit);
+
+ virtual void GiveCommand(Command* c);
+ virtual const vector<CommandDescription>& GetPossibleCommands(){return commands;};
+ virtual int GetDefaultCmd(int unitid);
+ virtual void CommandFinished(int squad,int type);
+ virtual void Update();
+
+ void UpdateAvailableCommands(void);
+
+ int frameNum;
+
+ struct UnitInfo{
+ int lastGivenOrder; //<0 -> set to guard this unit >0 -> set to build this project
+ set<int> possibleBuildOrders;
+ vector<int> orderedBuildOrders; //the build orders in the same order as in the normal gui
+ set<int> unitsGuardingMe;
+ float buildSpeed;
+ float moveSpeed;
+ float totalGuardSpeed; //total build speed of all units guarding me
+ };
+
+ map<int,UnitInfo*> myUnits;
+ map<int,UnitInfo*>::iterator updateUnit;
+ bool unitsChanged;
+
+ struct QuedBuilding{
+ int type;
+ float3 pos;
+ std::set<int> unitsOnThis;
+ float totalBuildSpeed;
+ float buildTimeLeft;
+ int failedTries;
+ int startFrame;
+ };
+ map<int,QuedBuilding*> quedBuildngs;
+ int nextBuildingId;
+
+ struct BuildOption{
+ int type; //depends on if the unit is build in a factory or should be placed on the map
+ string name;
+ int numQued; //how many of these we have qued if its factory built
+ float buildTime;
+ };
+ map<int,BuildOption*> buildOptions;
+
+ vector<CommandDescription> commands;
+ IGroupAiCallback* callback;
+ void UpdateFactoryIcon(CommandDescription* cd, int numQued);
+ void FindNewJob(int unit);
+ void SendTxt(const char *fmt, ...);
+ int FindCloseQuedBuilding(float3 pos, float radius);
+ void FinishBuilderTask(int unit,bool failure);
+};
+
+#endif // !defined(AFX_GROUPAI_H__10718E36_5CDF_4CD4_8D90_F41311DD2694__INCLUDED_)
@@ -0,0 +1,41 @@
+#include <windows.h>
+#include "TestAI.h"
+#include "groupai.h"
+#include <set>
+
+#ifdef __cplusplus
+extern "C" { // only need to export C interface if
+ // used by C++ source code
+#endif
+
+std::set<IGroupAI*> ais;
+
+//Returnerar DLLens typ och version
+int (WINAPI GetGroupAiVersion)()
+{
+ return AI_INTERFACE_VERSION;
+}
+
+void (WINAPI GetAiName)(char* name)
+{
+ strcpy(name,AI_NAME);
+}
+
+IGroupAI* (WINAPI GetNewAI)()
+{
+ CGroupAI* ai=new CGroupAI();
+ ais.insert(ai);
+ return ai;
+}
+
+void (WINAPI ReleaseAI)(IGroupAI* i)
+{
+ delete i;
+ ais.erase(i);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
@@ -0,0 +1,11 @@
+; TestAI.def : Declares the module parameters for the DLL.
+
+LIBRARY "Default"
+DESCRIPTION 'TestAI implements an AI module spring'
+
+EXPORTS
+ ; Explicit exports can go here
+ GetGroupAiVersion @1
+ GetAiName @2
+ GetNewAI @3
+ ReleaseAI @4
@@ -0,0 +1,31 @@
+#if !defined(AFX_DUMMYAI_H__B02E38C6_00CA_11D4_AD55_0080ADA84DE3__INCLUDED_)
+#define AFX_DUMMYAI_H__B02E38C6_00CA_11D4_AD55_0080ADA84DE3__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+/////////////////////////////////////////////////////////////////////////////
+
+#include "igroupai.h"
+
+#ifdef __cplusplus
+extern "C" { // only need to export C interface if
+ // used by C++ source code
+#endif
+
+/*int (WINAPI GETGROUPAIVERSION)();
+void (WINAPI GETAINAME)(char* c);
+IGroupAI* (WINAPI GETNEWAI)();
+void (WINAPI RELEASEAI)(IGroupAI* i);
+*/
+#ifdef __cplusplus
+}
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_DUMMYAI_H__B02E38C6_00CA_11D4_AD55_0080ADA84DE3__INCLUDED_)
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestAI", "TestAI.vcproj", "{9E0389D1-EA85-471D-A3E1-35335E5038E5}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {9E0389D1-EA85-471D-A3E1-35335E5038E5}.Debug.ActiveCfg = Debug|Win32
+ {9E0389D1-EA85-471D-A3E1-35335E5038E5}.Debug.Build.0 = Debug|Win32
+ {9E0389D1-EA85-471D-A3E1-35335E5038E5}.Release.ActiveCfg = Release|Win32
+ {9E0389D1-EA85-471D-A3E1-35335E5038E5}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="TestAI"
+ ProjectGUID="{9E0389D1-EA85-471D-A3E1-35335E5038E5}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\..\rts\bagge\aidll"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\rts"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TESTAI_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/TestAI.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="2"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\..\rts\bagge\aidll/centralbuild.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ ModuleDefinitionFile=".\TestAI.def"
+ GenerateDebugInformation="TRUE"
+ AssemblyDebug="2"
+ ProgramDatabaseFile=".\..\rts\bagge\aidll/TestAI.pdb"
+ ImportLibrary=".\..\rts\bagge\aidll/TestAI.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\..\rts\bagge\aidll/TestAI.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1053"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\rts\bagge\aidll"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\rts"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TESTAI_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/TestAI.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ OutputFile=".\..\rts\bagge\aidll/centralbuild.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ ModuleDefinitionFile=".\TestAI.def"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/TestAI.pdb"
+ ImportLibrary=".\Debug/TestAI.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/TestAI.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1053"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath=".\GroupAI.cpp">
+ </File>
+ <File
+ RelativePath=".\TestAI.cpp">
+ </File>
+ <File
+ RelativePath=".\TestAI.def">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\rts\float3.h">
+ </File>
+ <File
+ RelativePath=".\GroupAI.h">
+ </File>
+ <File
+ RelativePath="..\rts\IGroupAI.h">
+ </File>
+ <File
+ RelativePath="..\rts\IGroupAiCallback.h">
+ </File>
+ <File
+ RelativePath=".\TestAI.h">
+ </File>
+ <File
+ RelativePath="..\rts\UnitDef.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Oops, something went wrong.

0 comments on commit d1811b3

Please sign in to comment.