Skip to content

Commit

Permalink
some issues in Game.cs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
suegy committed Jan 31, 2021
1 parent 4e51512 commit 1f29a11
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Source/Common/SWIG/Classes/BWAPI/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public virtual Position getMousePosition() {
}

public virtual bool getMouseState(MouseButton button) {
bool ret = bwapiPINVOKE.Game_getMouseState__SWIG_0(swigCPtr, (int)button);
bool ret = bwapiPINVOKE.Game_getMouseState__SWIG_0(swigCPtr, Button);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Common/SWIG/Classes/BWAPIC/GameImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public override Position getMousePosition() {
}

public override bool getMouseState(MouseButton button) {
bool ret = bwapiclientPINVOKE.GameImpl_getMouseState__SWIG_0(swigCPtr, (int)button);
bool ret = bwapiclientPINVOKE.GameImpl_getMouseState__SWIG_0(swigCPtr, Button);
return ret;
}

Expand Down
Binary file modified Source/bwapi-clr-client/bwapi-clr-client.sdf
Binary file not shown.
56 changes: 35 additions & 21 deletions Source/bwapi-clr-client/bwapi-clr-client.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bwapi-native", "bwapi-nativ
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bwapi-clr", "bwapi-clr\bwapi-clr.csproj", "{6657C37C-4F1B-4972-AAB0-B395EE5F53DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testbot", "testbot\testbot.csproj", "{1C5B29FD-973D-4FE9-BD94-B29A869330C2}"
ProjectSection(ProjectDependencies) = postProject
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914} = {B64E26AE-1B34-4C89-9DEB-AC76CAB17914}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClrAIModuleLoader", "clrAIModuleLoader\ClrAIModuleLoader.csproj", "{2ADEC1F6-C45A-4BA1-A4D9-68BFF3E5F6CA}"
ProjectSection(ProjectDependencies) = postProject
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914} = {B64E26AE-1B34-4C89-9DEB-AC76CAB17914}
Expand All @@ -21,6 +16,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POSH-Launcher", "..\scbot.g
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POSH-StarCraftBot", "..\scbot.git\POSH-StarCraftBot\POSH-StarCraftBot.csproj", "{A4730B6A-6717-48D8-AEB2-810AE3A0315D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POSH.core", "..\..\..\..\posh-git\core\POSH.core.csproj", "{A29EA261-C940-427B-AB72-B27EEFDC15A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "James-StarCraftBot", "..\comp320-comp360-dissertation\Plans\scbot.git\POSH-StarCraftBot\James-StarCraftBot.csproj", "{29AFA965-A80E-424B-8479-1758434418C8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -41,6 +40,7 @@ Global
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Debug|x86.ActiveCfg = Debug|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Debug|x86.Build.0 = Debug|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Release|Any CPU.ActiveCfg = Release|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Release|Any CPU.Build.0 = Release|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Release|Mixed Platforms.Build.0 = Release|Win32
{B64E26AE-1B34-4C89-9DEB-AC76CAB17914}.Release|Win32.ActiveCfg = Release|Win32
Expand All @@ -59,20 +59,6 @@ Global
{6657C37C-4F1B-4972-AAB0-B395EE5F53DF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6657C37C-4F1B-4972-AAB0-B395EE5F53DF}.Release|Win32.ActiveCfg = Release|Any CPU
{6657C37C-4F1B-4972-AAB0-B395EE5F53DF}.Release|x86.ActiveCfg = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|Mixed Platforms.Build.0 = Debug|x86
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|Win32.ActiveCfg = Debug|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|x86.ActiveCfg = Debug|x86
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Debug|x86.Build.0 = Debug|x86
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|Any CPU.Build.0 = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|Win32.ActiveCfg = Release|Any CPU
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|x86.ActiveCfg = Release|x86
{1C5B29FD-973D-4FE9-BD94-B29A869330C2}.Release|x86.Build.0 = Release|x86
{2ADEC1F6-C45A-4BA1-A4D9-68BFF3E5F6CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ADEC1F6-C45A-4BA1-A4D9-68BFF3E5F6CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ADEC1F6-C45A-4BA1-A4D9-68BFF3E5F6CA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -104,7 +90,8 @@ Global
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Debug|Win32.ActiveCfg = Debug|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Debug|x86.ActiveCfg = Debug|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Debug|x86.Build.0 = Debug|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Any CPU.ActiveCfg = Release|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Any CPU.Build.0 = Release|Any CPU
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Mixed Platforms.Build.0 = Release|x86
{2829914E-AD78-450D-96D2-404EB8E06CB5}.Release|Win32.ActiveCfg = Release|x86
Expand All @@ -116,12 +103,39 @@ Global
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Debug|Win32.ActiveCfg = Debug|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Debug|x86.ActiveCfg = Debug|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Debug|x86.Build.0 = Debug|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Any CPU.ActiveCfg = Release|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Any CPU.Build.0 = Release|Any CPU
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Mixed Platforms.ActiveCfg = Release|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Mixed Platforms.Build.0 = Release|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|Win32.ActiveCfg = Release|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|x86.ActiveCfg = Release|x86
{A4730B6A-6717-48D8-AEB2-810AE3A0315D}.Release|x86.Build.0 = Release|x86
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|Win32.ActiveCfg = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|Any CPU.Build.0 = Release|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|Win32.ActiveCfg = Release|Any CPU
{A29EA261-C940-427B-AB72-B27EEFDC15A0}.Release|x86.ActiveCfg = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|Win32.ActiveCfg = Debug|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|x86.ActiveCfg = Debug|x86
{29AFA965-A80E-424B-8479-1758434418C8}.Debug|x86.Build.0 = Debug|x86
{29AFA965-A80E-424B-8479-1758434418C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Release|Any CPU.Build.0 = Release|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Release|Win32.ActiveCfg = Release|Any CPU
{29AFA965-A80E-424B-8479-1758434418C8}.Release|x86.ActiveCfg = Release|x86
{29AFA965-A80E-424B-8479-1758434418C8}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified Source/bwapi-clr-client/bwapi-clr-client.suo
Binary file not shown.
7 changes: 4 additions & 3 deletions Source/bwapi-clr-client/bwapi-clr/bwapi-clr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -25,7 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -34,7 +35,7 @@
<DefineConstants>TRACE;CLIENT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
Expand Down Expand Up @@ -399,6 +400,6 @@
<VisualStudio AllowExistingFolder="true" />
</ProjectExtensions>
<PropertyGroup>
<PostBuildEvent>copy /y "$(ProjectDir)$(OutDir)bwapi-clr.dll" "$(SolutionDir)..\..\Release\Libs\client"</PostBuildEvent>
<PostBuildEvent>copy /y "$(ProjectDir)$(OutDir)bwapi-clr.dll" "$(SolutionDir)..\..\$(ConfigurationName)\Libs\client"</PostBuildEvent>
</PropertyGroup>
</Project>
18 changes: 12 additions & 6 deletions Source/bwapi-clr-client/bwapi-native/bwapi-native.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v90</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -38,17 +40,17 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\BWAPI\Include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BWAPINATIVE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
Expand All @@ -60,12 +62,15 @@
</ClCompile>
<Link>
<AdditionalDependencies>bwapid.lib;bwapiclientd.lib;tinyxmld.lib;bwtad.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(SolutionDir)debug-binaries\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>../../BWAPI/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(SolutionDir)..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>xcopy /y /s "$(OutDir)"$(TargetFileName) "$(SolutionDir)"..\..\Debug\Libs\client</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand All @@ -79,6 +84,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<AdditionalDependencies>BWAPI.lib;BWAPIClient.lib;BWTA.lib;tinyxml.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -92,7 +98,7 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy /y $(OutDir)bwapi-native.dll ..\..\..\Release\Libs\client</Command>
<Command>xcopy /y /s "$(OutDir)"$(TargetFileName) "$(SolutionDir)"..\..\Release\Libs\client</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
Binary file modified Source/bwapi-clr-client/testbot/testbot.csproj
Binary file not shown.

0 comments on commit 1f29a11

Please sign in to comment.