Browse Source

Added StarWarrior as a sample program and the Tests solution for Linux.

kjpou1 13 years ago
parent
commit
f1b06b87d0

+ 20 - 0
Samples/Linux/StarWarrior/Program.cs

@@ -0,0 +1,20 @@
+using System;
+
+namespace StarWarrior
+{
+    static class Program
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        static void Main(string[] args)
+        {
+            using (Game1 game = new Game1())
+            {
+                game.Run();
+            }
+        }
+    }
+}
+
+

+ 175 - 0
Samples/Linux/StarWarrior/StarWarrior.csproj

@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{2012F252-E53A-4900-A2C5-9550D008DF8B}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>StarWarrior</RootNamespace>
+    <AssemblyName>StarWarrior</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;LINUX</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Compile Include="..\..\MacOS\StarWarrior\EntityFactory.cs">
+      <Link>EntityFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Pool.cs">
+      <Link>Pool.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Enemy.cs">
+      <Link>Components\Enemy.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Expires.cs">
+      <Link>Components\Expires.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Health.cs">
+      <Link>Components\Health.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\SpatialForm.cs">
+      <Link>Components\SpatialForm.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Transform.cs">
+      <Link>Components\Transform.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Velocity.cs">
+      <Link>Components\Velocity.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Components\Weapon.cs">
+      <Link>Components\Weapon.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Primitives\Lines.cs">
+      <Link>Primitives\Lines.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Primitives\PrimitiveBatch.cs">
+      <Link>Primitives\PrimitiveBatch.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Primitives\Triangles.cs">
+      <Link>Primitives\Triangles.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Primitives\TrianglesStrip.cs">
+      <Link>Primitives\TrianglesStrip.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Spatials\EnemyShip.cs">
+      <Link>Spatials\EnemyShip.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Spatials\Explosion.cs">
+      <Link>Spatials\Explosion.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Spatials\Missile.cs">
+      <Link>Spatials\Missile.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Spatials\PlayerShip.cs">
+      <Link>Spatials\PlayerShip.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Spatials\ShipExplosion.cs">
+      <Link>Spatials\ShipExplosion.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\CollisionSystem.cs">
+      <Link>Systems\CollisionSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\EnemyShipMovementSystem.cs">
+      <Link>Systems\EnemyShipMovementSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\EnemyShooterSystem.cs">
+      <Link>Systems\EnemyShooterSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\EnemySpawnSystem.cs">
+      <Link>Systems\EnemySpawnSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\ExpirationSystem.cs">
+      <Link>Systems\ExpirationSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\HealthBarRenderSystem.cs">
+      <Link>Systems\HealthBarRenderSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\HudRenderSystem.cs">
+      <Link>Systems\HudRenderSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\MovementSystem.cs">
+      <Link>Systems\MovementSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\PlayerShipControlSystem.cs">
+      <Link>Systems\PlayerShipControlSystem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\StarWarrior\Systems\RenderSystem.cs">
+      <Link>Systems\RenderSystem.cs</Link>
+    </Compile>
+    <Compile Include="Program.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\MacOS\StarWarrior\Game.ico">
+      <Link>Game.ico</Link>
+    </None>
+    <None Include="..\..\MacOS\StarWarrior\GameThumbnail.png">
+      <Link>GameThumbnail.png</Link>
+    </None>
+    <None Include="..\..\MacOS\StarWarrior\PhoneGameThumb.png">
+      <Link>PhoneGameThumb.png</Link>
+    </None>
+    <None Include="..\..\MacOS\StarWarrior\Readme.md">
+      <Link>Readme.md</Link>
+    </None>
+    <None Include="..\..\MacOS\StarWarrior\Content\myFont.spritefont">
+      <Link>Content\myFont.spritefont</Link>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="artemis, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\MacOS\StarWarrior\Artemis\PC\artemis.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Linux.csproj">
+      <Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
+      <Name>MonoGame.Framework.Linux</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\MacOS\StarWarrior\Content\Arial.xnb">
+      <Link>Content\Arial.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\StarWarrior\Content\bullet.png">
+      <Link>Content\bullet.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\StarWarrior\Content\enemy.png">
+      <Link>Content\enemy.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\StarWarrior\Content\explosion.png">
+      <Link>Content\explosion.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\StarWarrior\Content\player.png">
+      <Link>Content\player.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 1 - 1
Samples/MacOS/StarWarrior/Program.cs

@@ -1 +1 @@
-using System;

namespace StarWarrior
{

	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main (string[] args)
		{
			MonoMac.AppKit.NSApplication.Init ();
			
			using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
				MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
				MonoMac.AppKit.NSApplication.Main(args);
			}
		}
	}
	
	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
	{
		
		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
		{
			using (Game1 game = new Game1()) {
				game.Run ();
			}
		}
		
		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
		{
			return true;
		}
	}


}

+using System;

namespace StarWarrior
{

	static class Program
	{	
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main (string[] args)
		{
			MonoMac.AppKit.NSApplication.Init ();
			
			using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
				MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
				MonoMac.AppKit.NSApplication.Main(args);
			}
		}
	}
	
	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
	{
		
		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
		{
			using (Game1 game = new Game1()) {
				game.Run ();
			}
		}
		
		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
		{
			return true;
		}
	}

}


+ 23 - 1
Samples/MonoGame.Samples.Linux.sln

@@ -41,6 +41,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.AsteroidBe
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.FloodControl.Linux", "Linux\BookSourceCode\XNAGameDevelopmentbyExampleCode\FloodControl\MonoGame.Samples.FloodControl.Linux.csproj", "{86A219E2-C8F1-422B-C762-C69D5BB07C98}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.FloodControl.Linux", "Linux\BookSourceCode\XNAGameDevelopmentbyExampleCode\FloodControl\MonoGame.Samples.FloodControl.Linux.csproj", "{86A219E2-C8F1-422B-C762-C69D5BB07C98}"
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StarWarrior", "Linux\StarWarrior\StarWarrior.csproj", "{2012F252-E53A-4900-A2C5-9550D008DF8B}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -55,6 +57,26 @@ Global
 		Release|x86 = Release|x86
 		Release|x86 = Release|x86
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Debug|x86.Build.0 = Debug|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|iPhone.Build.0 = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|x86.ActiveCfg = Release|Any CPU
+		{2012F252-E53A-4900-A2C5-9550D008DF8B}.Release|x86.Build.0 = Release|Any CPU
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.ActiveCfg = Debug|x86
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.ActiveCfg = Debug|x86
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.Build.0 = Debug|x86
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.Build.0 = Debug|x86
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|iPhone.ActiveCfg = Debug|x86
 		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|iPhone.ActiveCfg = Debug|x86
@@ -444,7 +466,7 @@ Global
 		{86A219E2-C8F1-422B-C762-C69D5BB07C98} = {A28FF8DB-5350-4D08-A94D-93C3C67FCB63}
 		{86A219E2-C8F1-422B-C762-C69D5BB07C98} = {A28FF8DB-5350-4D08-A94D-93C3C67FCB63}
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Linux\RenderTarget2DSample\RenderTarget2DSample.csproj
+		StartupItem = Linux\StarWarrior\StarWarrior.csproj
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE

+ 87 - 0
Tests/Linux/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester.csproj

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{6BC96721-9A69-4698-BF22-7BDB319FF381}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>MouseGetStateAndIsMouseVisibleTester</RootNamespace>
+    <AssemblyName>MouseGetStateAndIsMouseVisibleTester</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;LINUX</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Linux.csproj">
+      <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
+      <Name>Lidgren.Network.Linux</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Linux.csproj">
+      <Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
+      <Name>MonoGame.Framework.Linux</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Drawing" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Enums.cs">
+      <Link>Enums.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\InputManager.cs">
+      <Link>InputManager.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Object.cs">
+      <Link>Object.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Program.cs">
+      <Link>Program.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\TextManager.cs">
+      <Link>TextManager.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Properties\AssemblyInfo.cs">
+      <Link>Properties\AssemblyInfo.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\MainMenu.xib">
+      <Link>MainMenu.xib</Link>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Content\UiCursor.xnb">
+      <Link>Content\UiCursor.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\Content\fntStandard.xnb">
+      <Link>Content\fntStandard.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 7 - 6
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Game1.cs

@@ -8,10 +8,10 @@ using Microsoft.Xna.Framework.GamerServices;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Input;
 using Microsoft.Xna.Framework.Input;
 using Microsoft.Xna.Framework.Media;
 using Microsoft.Xna.Framework.Media;
-using System.Windows.Forms;
 
 
-using MonoMac.AppKit;
-using MonoMac.Foundation;
+
+//using MonoMac.AppKit;
+//using MonoMac.Foundation;
 
 
 namespace MouseGetStateAndIsMouseVisibleTester
 namespace MouseGetStateAndIsMouseVisibleTester
 {
 {
@@ -37,7 +37,7 @@ namespace MouseGetStateAndIsMouseVisibleTester
 			Window.AllowUserResizing = true;
 			Window.AllowUserResizing = true;
 
 
 			 // Subscribe to the game window's ClientSizeChanged event.
 			 // Subscribe to the game window's ClientSizeChanged event.
-			Window.ClientSizeChanged += new EventHandler( Window_ClientSizeChanged );
+			//Window.ClientSizeChanged += new EventHandler( Window_ClientSizeChanged );
         }
         }
 
 
     void Window_ClientSizeChanged( object sender, EventArgs e )
     void Window_ClientSizeChanged( object sender, EventArgs e )
@@ -105,7 +105,7 @@ namespace MouseGetStateAndIsMouseVisibleTester
         
         
         public String GetStyleMask()
         public String GetStyleMask()
         {
         {
-        	return this.Window.Window.StyleMask.ToString();
+        	return "not here"; //this.Window.Window.StyleMask.ToString();
         }//GetStyleMask
         }//GetStyleMask
 
 
 
 
@@ -138,7 +138,7 @@ namespace MouseGetStateAndIsMouseVisibleTester
         {
         {
         	if(bFullScreen) return;
         	if(bFullScreen) return;
         	
         	
-        		
+#if !LINUX        		
             int index;
             int index;
             int upperBound;
             int upperBound;
             float fScreenWidth, fScreenHeight, fNewX, fNewY, fWindowWidth, fWindowHeight, fTitleBarHeight;
             float fScreenWidth, fScreenHeight, fNewX, fNewY, fWindowWidth, fWindowHeight, fTitleBarHeight;
@@ -170,6 +170,7 @@ namespace MouseGetStateAndIsMouseVisibleTester
 			System.Drawing.SizeF sfSize = new System.Drawing.SizeF(pfSize);
 			System.Drawing.SizeF sfSize = new System.Drawing.SizeF(pfSize);
 			System.Drawing.RectangleF rectTemp = new System.Drawing.RectangleF(pfLocation, sfSize);
 			System.Drawing.RectangleF rectTemp = new System.Drawing.RectangleF(pfLocation, sfSize);
 			this.Window.Window.SetFrame(rectTemp, true);
 			this.Window.Window.SetFrame(rectTemp, true);
+#endif
         }//CenterWindow
         }//CenterWindow
     }
     }
 }
 }

+ 34 - 17
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Program.cs

@@ -1,42 +1,59 @@
-using MonoMac.AppKit;
-using MonoMac.Foundation;
-
+using System;
 
 
 namespace MouseGetStateAndIsMouseVisibleTester
 namespace MouseGetStateAndIsMouseVisibleTester
 {
 {
-	class Program
+	
+	static class Program
 	{
 	{
-		static void Main (string [] args)
+
+		private static Game1 game;	
+
+#if LINUX
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            game = new Game1();
+            game.Run();
+        }
+#else
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		static void Main (string[] args)
 		{
 		{
-			NSApplication.Init ();
+			MonoMac.AppKit.NSApplication.Init ();
 			
 			
-			using (var p = new NSAutoreleasePool ()) {
-				NSApplication.SharedApplication.Delegate = new AppDelegate();
-				NSApplication.Main(args);
+			using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
+				MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
+				MonoMac.AppKit.NSApplication.Main(args);
 			}
 			}
 		}
 		}
 	}
 	}
 	
 	
-	
-	class AppDelegate : NSApplicationDelegate
+	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
 	{
 	{
-		Game1 game; 
 		
 		
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
-		{			
+		{
 			using (game = new Game1()) {
 			using (game = new Game1()) {
 				game.Run ();
 				game.Run ();
 			}
 			}
 		}
 		}
 		
 		
-		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
+		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
 		{
 		{
 			return true;
 			return true;
 		}
 		}
 	}
 	}
-	
-	
-	
+
+
+#endif
+}
 
 
 }
 }
 
 

+ 6 - 3
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/TextManager.cs

@@ -30,7 +30,11 @@ namespace MouseGetStateAndIsMouseVisibleTester
         public override void Draw(GameTime gameTime)
         public override void Draw(GameTime gameTime)
         {
         {
             spriteBatch.DrawString(sfStandard, "LeftMouse = " + cG.mousestatus.LeftButton.ToString(), new Vector2(0, 50), Color.White);
             spriteBatch.DrawString(sfStandard, "LeftMouse = " + cG.mousestatus.LeftButton.ToString(), new Vector2(0, 50), Color.White);
-
+			
+#if LINUX
+			spriteBatch.DrawString(sfStandard, "MouseX = " + Mouse.GetState().X.ToString(), new Vector2(0, 100), Color.White);            
+            spriteBatch.DrawString(sfStandard, "MouseY = " + Mouse.GetState().Y.ToString(), new Vector2(0, 130), Color.White);
+#else			
 			try
 			try
 			{
 			{
 	            spriteBatch.DrawString(sfStandard, "MouseX = " + cG.Window.Window.MouseLocationOutsideOfEventStream.X.ToString(), new Vector2(0, 100), Color.White);
 	            spriteBatch.DrawString(sfStandard, "MouseX = " + cG.Window.Window.MouseLocationOutsideOfEventStream.X.ToString(), new Vector2(0, 100), Color.White);
@@ -40,9 +44,8 @@ namespace MouseGetStateAndIsMouseVisibleTester
 			{
 			{
 			
 			
 			}
 			}
-            
+#endif   
 
 
-            
             spriteBatch.DrawString(sfStandard, "Click here to Toggle Full Screen", new Vector2(0, 200), Color.White);
             spriteBatch.DrawString(sfStandard, "Click here to Toggle Full Screen", new Vector2(0, 200), Color.White);
             
             
             spriteBatch.DrawString(sfStandard, "Click here to center window if in windowed mode", new Vector2(0, 300), Color.White);
             spriteBatch.DrawString(sfStandard, "Click here to center window if in windowed mode", new Vector2(0, 300), Color.White);

+ 35 - 0
Tests/MonoGame.Tests.Linux/MonoGame.Tests.Linux.csproj

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{A7A781C1-D981-43C8-9950-ECA26F3F7826}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>MonoGame.Tests.Linux</RootNamespace>
+    <AssemblyName>MonoGame.Tests.Linux</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>

+ 32 - 0
Tests/MonoGame.Tests.Linux/MonoGame.Tests.Linux.sln

@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MouseGetStateAndIsMouseVisibleTester", "..\Linux\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj", "{6BC96721-9A69-4698-BF22-7BDB319FF381}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Linux", "..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Linux.csproj", "{35253CE1-C864-4CD3-8249-4D1319748E8F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.Linux", "..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Linux.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.ActiveCfg = Debug|x86
+		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.Build.0 = Debug|x86
+		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.ActiveCfg = Release|x86
+		{35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.Build.0 = Release|x86
+		{6BC96721-9A69-4698-BF22-7BDB319FF381}.Debug|x86.ActiveCfg = Debug|x86
+		{6BC96721-9A69-4698-BF22-7BDB319FF381}.Debug|x86.Build.0 = Debug|x86
+		{6BC96721-9A69-4698-BF22-7BDB319FF381}.Release|x86.ActiveCfg = Release|x86
+		{6BC96721-9A69-4698-BF22-7BDB319FF381}.Release|x86.Build.0 = Release|x86
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = ..\Linux\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj
+	EndGlobalSection
+EndGlobal