Browse Source

Merge branch 'master' of github.com:CartBlanche/MonoGame-Samples

dellis1972 13 years ago
parent
commit
799db4153d
52 changed files with 558 additions and 122 deletions
  1. 2 3
      Samples/MacOS/BackgroundThreadTester/Program.cs
  2. 3 4
      Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/AsteroidBeltAssault/Program.cs
  3. 3 4
      Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/FloodControl/Program.cs
  4. 3 4
      Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/GemstoneHunter/Program.cs
  5. 1 1
      Samples/MacOS/BouncingBox/main.cs
  6. 1 0
      Samples/MacOS/CatapultNetWars/Screens/GameplayScreen.cs
  7. 10 0
      Samples/MacOS/CatapultNetWars/Screens/PauseScreen.cs
  8. 3 3
      Samples/MacOS/ChaseAndEvade/Program.cs
  9. 3 4
      Samples/MacOS/Colored3DCube/Program.cs
  10. 2 2
      Samples/MacOS/Draw2D/main.cs
  11. 3 4
      Samples/MacOS/GameStateManagement/Game.cs
  12. 3 4
      Samples/MacOS/GooCursor/Program.cs
  13. 3 4
      Samples/MacOS/HoneycombRush/Program.cs
  14. 3 4
      Samples/MacOS/NetRumble/Program.cs
  15. 3 4
      Samples/MacOS/NetworkPrediction/Program.cs
  16. 3 4
      Samples/MacOS/Particle3DSample/Program.cs
  17. 3 5
      Samples/MacOS/RolePlayingGame/Program.cs
  18. 3 4
      Samples/MacOS/SpriteEffects/Program.cs
  19. 3 4
      Samples/MacOS/Tetris/Program.cs
  20. BIN
      Samples/MacOS/TexturedQuad/Program.cs
  21. 2 2
      Samples/MacOS/TiledSprites/main.cs
  22. 3 4
      Samples/MacOS/TransformedCollisionSample/Program.cs
  23. 3 4
      Samples/MacOS/UseCustomVertex/Program.cs
  24. 2 2
      Samples/MacOS/VideoPlayer/main.cs
  25. 2 4
      Samples/iOS/Aiming/Main.cs
  26. 25 0
      Samples/iOS/BouncingBox/Info.plist
  27. 2 4
      Samples/iOS/ChaseAndEvade/Main.cs
  28. 1 1
      Samples/iOS/GameComponents/Game1.cs
  29. 25 0
      Samples/iOS/GameComponents/Info.plist
  30. 1 1
      Samples/iOS/GameComponents/main.cs
  31. 25 0
      Samples/iOS/GameStateManagement/Info.plist
  32. 2 4
      Samples/iOS/GameStateManagement/Program.cs
  33. 2 3
      Samples/iOS/MonoGame.Samples.Primitives/Program.cs
  34. 25 0
      Samples/iOS/MultiTouch/Info.plist
  35. 2 4
      Samples/iOS/MultiTouch/Program.cs
  36. 2 4
      Samples/iOS/ParticleSample/Main.cs
  37. 2 3
      Samples/iOS/PerPixelCollision/Program.cs
  38. 2 3
      Samples/iOS/RectangleCollision/Program.cs
  39. 2 4
      Samples/iOS/RenderTarget2D/Main.cs
  40. 1 1
      Samples/iOS/RockRain/Game1.cs
  41. 25 0
      Samples/iOS/RockRain/Info.plist
  42. 2 4
      Samples/iOS/TouchGesture/Program.cs
  43. 2 3
      Samples/iOS/TransformedCollision/Program.cs
  44. 1 1
      Samples/iOS/VirtualGamePad/Game1.cs
  45. 25 0
      Samples/iOS/VirtualGamePad/Info.plist
  46. 2 4
      Samples/iOS/Waypoint/Main.cs
  47. BIN
      Tests/MacOS/TestImplicitOrdering/Content/fntStandard.xnb
  48. 172 0
      Tests/MacOS/TestImplicitOrdering/ImplicitOrderingGame.cs
  49. 16 0
      Tests/MacOS/TestImplicitOrdering/Info.plist
  50. 47 0
      Tests/MacOS/TestImplicitOrdering/Main.cs
  51. 69 0
      Tests/MacOS/TestImplicitOrdering/TestImplicitOrdering.csproj
  52. 8 0
      Tests/MonoGame.Tests.MacOS.sln

+ 2 - 3
Samples/MacOS/BackgroundThreadTester/Program.cs

@@ -24,9 +24,8 @@ namespace BackgroundThreadTester
 		
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{			
-			using (game = new Game1()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/AsteroidBeltAssault/Program.cs

@@ -39,12 +39,11 @@ namespace Asteroid_Belt_Assault
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1 ()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/FloodControl/Program.cs

@@ -39,12 +39,11 @@ namespace Flood_Control
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1 ()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/BookSourceCode/XNAGameDevelopmentbyExampleCode/GemstoneHunter/Program.cs

@@ -39,12 +39,11 @@ namespace Gemstone_Hunter
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1 ()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 1 - 1
Samples/MacOS/BouncingBox/main.cs

@@ -28,7 +28,7 @@ namespace Microsoft.Xna.Samples.BouncingBox
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
 			game = new Game1 ();
-			game.Run ();
+			game.Run();
 		}
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 1 - 0
Samples/MacOS/CatapultNetWars/Screens/GameplayScreen.cs

@@ -162,6 +162,7 @@ namespace CatapultGame
 					playerTwo.Initialize ();
 					playerTwo.Name = "Player 2";
 					IsNetworking = false;
+					NetworkSession.Dispose();
 					NetworkSession = null;
 				}
 			} else {

+ 10 - 0
Samples/MacOS/CatapultNetWars/Screens/PauseScreen.cs

@@ -14,6 +14,7 @@ using System.Linq;
 using System.Text;
 using GameStateManagement;
 using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Net;
 #endregion
 
 namespace CatapultGame
@@ -108,6 +109,15 @@ namespace CatapultGame
         /// 
         protected override void OnCancel(PlayerIndex playerIndex)
         {
+		// Tear down our network session
+		NetworkSession session = ScreenManager.Game.Services.GetService (typeof(NetworkSession)) as NetworkSession;
+		if (session != null) {
+			if (session.AllGamers.Count == 1) {
+				session.EndGame();
+			}
+			session.Dispose();
+			ScreenManager.Game.Services.RemoveService(typeof(NetworkSession));
+		}
             AudioManager.StopSounds();
             ScreenManager.AddScreen(new MainMenuScreen(), null);
             ExitScreen();

+ 3 - 3
Samples/MacOS/ChaseAndEvade/Program.cs

@@ -24,11 +24,11 @@ namespace ChaseAndEvade
 
 	class AppDelegate : NSApplicationDelegate
 	{
+        ChaseAndEvadeGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (ChaseAndEvadeGame game = new ChaseAndEvadeGame ()) {
-				game.Run ();
-			}
+			game = new ChaseAndEvadeGame();
+		    game.Run();
 		}
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/Colored3DCube/Program.cs

@@ -37,12 +37,11 @@ namespace Colored3DCube
 	
 	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)

+ 2 - 2
Samples/MacOS/Draw2D/main.cs

@@ -27,8 +27,8 @@ namespace Microsoft.Xna.Samples.Draw2D
 
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			game = new Game1 ();
-			game.Run ();
+			game = new Game1();
+			game.Run();
 		}
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/GameStateManagement/Game.cs

@@ -122,12 +122,11 @@ namespace GameStateManagement
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		GameStateManagementGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (GameStateManagementGame game = new GameStateManagementGame ()) {
-				game.Run ();
-			}
+			game = new GameStateManagementGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/GooCursor/Program.cs

@@ -28,12 +28,11 @@ namespace GooCursor
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/HoneycombRush/Program.cs

@@ -48,12 +48,11 @@ namespace HoneycombRush
 	
 	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
 	{
-		
+		HoneycombRush game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (HoneycombRush game = new HoneycombRush()){
-				game.Run();
-			}
+			game = new HoneycombRush();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)

+ 3 - 4
Samples/MacOS/NetRumble/Program.cs

@@ -82,12 +82,11 @@ namespace NetRumble
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		NetRumbleGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (NetRumbleGame game = new NetRumbleGame ()) {
-				game.Run ();
-			}
+			game = new NetRumbleGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/NetworkPrediction/Program.cs

@@ -82,12 +82,11 @@ namespace NetworkPrediction
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		NetworkPredictionGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (NetworkPredictionGame game = new NetworkPredictionGame ()) {
-				game.Run ();
-			}
+			game = new NetworkPredictionGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/Particle3DSample/Program.cs

@@ -23,12 +23,11 @@ namespace Particle3DSample
 
 	class AppDelegate : NSApplicationDelegate
 	{
-
+        Particle3DSampleGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Particle3DSampleGame game = new Particle3DSampleGame ()) {
-				game.Run ();
-			}
+			game = new Particle3DSampleGame();
+			game.Run();
 		}
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 5
Samples/MacOS/RolePlayingGame/Program.cs

@@ -82,13 +82,11 @@ namespace RolePlaying
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		RolePlayingGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (RolePlayingGame game = new RolePlayingGame())
-			{
-				game.Run();
-			}
+			game = new RolePlayingGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/SpriteEffects/Program.cs

@@ -23,12 +23,11 @@ namespace SpriteEffects
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		SpriteEffectsGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (SpriteEffectsGame game = new SpriteEffectsGame ()) {
-				game.Run ();
-			}
+			game = new SpriteEffectsGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/Tetris/Program.cs

@@ -23,12 +23,11 @@ namespace Tetris
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		Engine game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Engine game = new Engine ()) {
-				game.Run ();
-			}
+			game = new Engine();
+		    game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

BIN
Samples/MacOS/TexturedQuad/Program.cs


+ 2 - 2
Samples/MacOS/TiledSprites/main.cs

@@ -22,8 +22,8 @@ namespace TiledSprites
 		
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			game = new TiledSpritesSample ();
-			game.Run ();
+			game = new TiledSpritesSample();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/TransformedCollisionSample/Program.cs

@@ -35,12 +35,11 @@ namespace TransformedCollision
 	
 	class AppDelegate : NSApplicationDelegate
 	{
-		
+		TransformedCollisionGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (TransformedCollisionGame game = new TransformedCollisionGame()) {
-				game.Run ();
-			}
+			game = new TransformedCollisionGame();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 3 - 4
Samples/MacOS/UseCustomVertex/Program.cs

@@ -46,12 +46,11 @@ namespace UseCustomVertexWindows
 	
 	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
 	{
-		
+		Game1 game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			using (Game1 game = new Game1()) {
-				game.Run ();
-			}
+			game = new Game1();
+			game.Run();
 		}
 		
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)

+ 2 - 2
Samples/MacOS/VideoPlayer/main.cs

@@ -27,8 +27,8 @@ namespace MonoGame.Samples.VideoPlayer
 
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
-			game = new Game1 ();
-			game.Run ();
+			game = new Game1();
+			game.Run();
 		}
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)

+ 2 - 4
Samples/iOS/Aiming/Main.cs

@@ -15,10 +15,8 @@ namespace Aiming
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (AimingGame game = new AimingGame())
-            {
-                game.Run();
-            }
+            AimingGame game = new AimingGame();
+            game.Run();
         }
 
         /// <summary>

+ 25 - 0
Samples/iOS/BouncingBox/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>monogameicon.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.BouncingBox</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 2 - 4
Samples/iOS/ChaseAndEvade/Main.cs

@@ -15,10 +15,8 @@ namespace ChaseAndEvade
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (ChaseAndEvadeGame game = new ChaseAndEvadeGame())
-            {
-                game.Run();
-            }
+            ChaseAndEvadeGame game = new ChaseAndEvadeGame();
+            game.Run();
         }
 
         /// <summary>

+ 1 - 1
Samples/iOS/GameComponents/Game1.cs

@@ -83,7 +83,7 @@ namespace Microsoft.Xna.Samples.GameComponents
 			if ((Mouse.GetState().X != 0) || (Mouse.GetState().Y != 0))
 			{
 				AddSprite();
-				Mouse.SetPosition(0,0);
+				//Mouse.SetPosition(0,0);
 			}
             base.Update(gameTime);
         }

+ 25 - 0
Samples/iOS/GameComponents/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>monogameicon.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.GameComponents</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 1 - 1
Samples/iOS/GameComponents/main.cs

@@ -16,7 +16,7 @@ namespace Microsoft.Xna.Samples.GameComponents
 		{
 			// Fun begins..
 			game = new Game1();
-			game.Run();			
+			game.Run();
 		}
 		
 		static void Main (string [] args)

+ 25 - 0
Samples/iOS/GameStateManagement/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>GameThumbnail.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.GameStateManagement</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 2 - 4
Samples/iOS/GameStateManagement/Program.cs

@@ -19,10 +19,8 @@ namespace Microsoft.Xna.Samples.GameStateManagement
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (GameStateManagementGame game = new GameStateManagementGame())
-            {
-                game.Run();
-            }
+            GameStateManagementGame game = new GameStateManagementGame();
+            game.Run();
         }
 
         /// <summary>

+ 2 - 3
Samples/iOS/MonoGame.Samples.Primitives/Program.cs

@@ -12,9 +12,8 @@ namespace PrimitivesSample
 		public override void FinishedLaunching (UIApplication app)
 		{
 			// Fun begins..
-			using (PrimitivesSampleGame game = new PrimitivesSampleGame()) {
-				game.Run ();
-			}
+			PrimitivesSampleGame game = new PrimitivesSampleGame();
+			game.Run ();
 		}
 
 		static void Main (string [] args)

+ 25 - 0
Samples/iOS/MultiTouch/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>GameThumbnail.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.MultiTouch</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 2 - 4
Samples/iOS/MultiTouch/Program.cs

@@ -14,10 +14,8 @@ namespace Microsoft.Xna.Samples.MultiTouch
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (Game1 game = new Game1())
-            {
-                game.Run();
-            }
+            Game1 game = new Game1();
+            game.Run();
         }
 
         /// <summary>

+ 2 - 4
Samples/iOS/ParticleSample/Main.cs

@@ -15,10 +15,8 @@ namespace ParticleSample
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (ParticleSampleGame game = new ParticleSampleGame())
-            {
-                game.Run();
-            }
+            ParticleSampleGame game = new ParticleSampleGame();
+            game.Run();
         }
 
         /// <summary>

+ 2 - 3
Samples/iOS/PerPixelCollision/Program.cs

@@ -12,9 +12,8 @@ namespace PerPixelCollision
 		public override void FinishedLaunching (UIApplication app)
 		{
 			// Fun begins..
-			using (PerPixelCollisionGame game = new PerPixelCollisionGame()) {
-				game.Run ();
-			}
+			PerPixelCollisionGame game = new PerPixelCollisionGame();
+			game.Run ();
 		}
 
 		static void Main (string [] args)

+ 2 - 3
Samples/iOS/RectangleCollision/Program.cs

@@ -12,9 +12,8 @@ namespace RectangleCollision
 		public override void FinishedLaunching (UIApplication app)
 		{
 			// Fun begins..
-			using (RectangleCollisionGame game = new RectangleCollisionGame()) {
-				game.Run ();
-			}
+			RectangleCollisionGame game = new RectangleCollisionGame();
+			game.Run();
 		}
 
 		static void Main (string [] args)

+ 2 - 4
Samples/iOS/RenderTarget2D/Main.cs

@@ -13,10 +13,8 @@ namespace RenderTarget2DSample
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (Game1 game = new Game1())
-            {
-                game.Run();
-            }
+            Game1 game = new Game1();
+            game.Run();
         }
 
         /// <summary>

+ 1 - 1
Samples/iOS/RockRain/Game1.cs

@@ -209,7 +209,7 @@ namespace RockRainIphone
         {
             if (startScene.MenuSelected)
             {
-				Mouse.SetPosition(0,0);
+				//Mouse.SetPosition(0,0);
                 audio.MenuSelect.Play();
                 switch (startScene.SelectedMenuIndex)
                 {

+ 25 - 0
Samples/iOS/RockRain/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>GameThumbnail.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.RockRain</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 2 - 4
Samples/iOS/TouchGesture/Program.cs

@@ -23,10 +23,8 @@ namespace TouchGestureSample
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (Game1 game = new Game1())
-            {
-                game.Run();
-            }
+            Game1 game = new Game1();
+            game.Run();
         }
 
         /// <summary>

+ 2 - 3
Samples/iOS/TransformedCollision/Program.cs

@@ -12,9 +12,8 @@ namespace TransformedCollision
 		public override void FinishedLaunching (UIApplication app)
 		{
 			// Fun begins..
-			using (TransformedCollisionGame game = new TransformedCollisionGame()) {
-				game.Run ();
-			}
+			TransformedCollisionGame game = new TransformedCollisionGame();
+			game.Run ();
 		}
 
 		static void Main (string [] args)

+ 1 - 1
Samples/iOS/VirtualGamePad/Game1.cs

@@ -42,7 +42,7 @@ namespace Microsoft.Xna.Samples.VirtualGamePad
             // TODO: Add your initialization logic here
 
 			// Set the initial mouse position
-			Mouse.SetPosition(160,240);
+			//Mouse.SetPosition(160,240);
 			
             base.Initialize();
         }

+ 25 - 0
Samples/iOS/VirtualGamePad/Info.plist

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDisplayName</key>
+	<string>ChaseAndEvade</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>monogameicon.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>project.MonoGame.VirtualGamePad</string>
+	<key>MinimumOSVersion</key>
+	<string>3.1</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<integer>1</integer>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+	</array>
+</dict>
+</plist>

+ 2 - 4
Samples/iOS/Waypoint/Main.cs

@@ -15,10 +15,8 @@ namespace Waypoint
         public override void FinishedLaunching(UIApplication app)
         {
             // Fun begins..
-            using (WaypointSample game = new WaypointSample())
-            {
-                game.Run();
-            }
+            WaypointSample game = new WaypointSample();
+            game.Run();
         }
 
         /// <summary>

BIN
Tests/MacOS/TestImplicitOrdering/Content/fntStandard.xnb


+ 172 - 0
Tests/MacOS/TestImplicitOrdering/ImplicitOrderingGame.cs

@@ -0,0 +1,172 @@
+using System;
+using System.Collections.Generic;
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace TestImplicitOrdering
+{
+    public class ImplicitOrderingGame : Game
+    {
+        private SpriteBatch _spriteBatch;
+        private SpriteFont _font;
+
+        public ImplicitOrderingGame()
+        {
+            Content.RootDirectory = "Content";
+            new GraphicsDeviceManager(this);
+        }
+
+        private const int NumberOfBatches = 3;
+        private const int ItemsPerBatch = 3;
+        private int _batchNumber = 0;
+
+        private List<TestUpdateable> _updateables = new List<TestUpdateable>();
+        private List<TestUpdateable> _updateablesInUpdateOrder = new List<TestUpdateable>();
+        private bool _updateablesOrderedCorrectly;
+
+        private List<TestDrawable> _drawables = new List<TestDrawable>();
+        private List<TestDrawable> _drawablesInDrawOrder = new List<TestDrawable>();
+        private bool _drawablesOrderedCorrectly;
+
+
+        protected override void LoadContent()
+        {
+            base.LoadContent();
+
+            _spriteBatch = new SpriteBatch(GraphicsDevice);
+            _font = Content.Load<SpriteFont>("fntStandard");
+        }
+
+        protected override void UnloadContent()
+        {
+            base.UnloadContent();
+            _font = null;
+        }
+
+        protected override void Update(GameTime gameTime)
+        {
+            if (_batchNumber < NumberOfBatches &&
+                gameTime.TotalGameTime >= TimeSpan.FromSeconds(_batchNumber))
+            {
+                for (int i = 0; i < ItemsPerBatch; ++i)
+                {
+                    var updateable = new TestUpdateable(this);
+                    _updateables.Add(updateable);
+                    Components.Add(updateable);
+
+                    var drawable = new TestDrawable(this);
+                    _drawables.Add(drawable);
+                    Components.Add(drawable);
+                }
+
+                _batchNumber++;
+            }
+
+
+            base.Update(gameTime);
+            _updateablesOrderedCorrectly = ListsEqual(_updateables, _updateablesInUpdateOrder);
+            _updateablesInUpdateOrder.Clear();
+        }
+
+        protected override void Draw(GameTime gameTime)
+        {
+            GraphicsDevice.Clear(Color.CornflowerBlue);
+
+            base.Draw(gameTime);
+            _drawablesOrderedCorrectly = ListsEqual(_drawables, _drawablesInDrawOrder);
+            _drawablesInDrawOrder.Clear();
+
+            _spriteBatch.Begin();
+            DrawStatusString(
+                string.Format("{0} updateables", _updateables.Count),
+                1, _updateablesOrderedCorrectly);
+            DrawStatusString(
+                string.Format("{0} drawables", _drawables.Count),
+                0, _drawablesOrderedCorrectly);
+            _spriteBatch.End();
+        }
+
+        private void DrawStatusString(string item, int linesFromBottom, bool isCorrect)
+        {
+            var position = new Vector2(
+                10, GraphicsDevice.Viewport.Height - ((1 + linesFromBottom) * _font.LineSpacing));
+            if (isCorrect)
+                _spriteBatch.DrawString(_font, item + " correctly ordered!", position, Color.Lime);
+            else
+                _spriteBatch.DrawString(_font, item + " incorrectly ordered.", position, Color.Red);
+        }
+
+        private bool ListsEqual<T>(IList<T> a, IList<T> b)
+        {
+            if (a.Count != b.Count)
+                return false;
+
+            var equalityComparer = EqualityComparer<T>.Default;
+            for (int i = 0; i < a.Count; ++i)
+                if (!equalityComparer.Equals(a[i], b[i]))
+                    return false;
+            return true;
+        }
+
+        private class TestUpdateable : GameComponent
+        {
+            public TestUpdateable(Game game) : base(game) { }
+
+            public override void Update(GameTime gameTime)
+            {
+                base.Update(gameTime);
+
+                var game = (ImplicitOrderingGame)Game;
+                game._updateablesInUpdateOrder.Add(this);
+            }
+        }
+
+        private class TestDrawable : DrawableGameComponent
+        {
+            private static int InstanceCount = 0;
+            private static readonly Color[] Colors = new Color[]
+            {
+                Color.White, Color.Red, Color.Orange, Color.Yellow, Color.Green,
+                Color.Blue, Color.Indigo, Color.Violet, Color.Black
+            };
+
+            private int _number;
+            private Color _color;
+            public TestDrawable(Game game) : base(game)
+            {
+                _number = ++InstanceCount;
+                _color = Colors[_number % Colors.Length];
+            }
+
+            private SpriteBatch _spriteBatch;
+            protected override void LoadContent()
+            {
+                base.LoadContent();
+                _spriteBatch = new SpriteBatch(Game.GraphicsDevice);
+            }
+
+            protected override void UnloadContent()
+            {
+                base.UnloadContent();
+
+                _spriteBatch.Dispose();
+                _spriteBatch = null;
+            }
+
+            public override void Draw(GameTime gameTime)
+            {
+                var game = (ImplicitOrderingGame)Game;
+
+                game._drawablesInDrawOrder.Add(this);
+
+                float halfEx = game._font.MeasureString("x").X / 2;
+                var position = new Vector2(_number * halfEx, 0);
+
+                _spriteBatch.Begin();
+                _spriteBatch.DrawString(game._font, _number.ToString(), position, _color);
+                _spriteBatch.End();
+            }
+        }
+    }
+}

+ 16 - 0
Tests/MacOS/TestImplicitOrdering/Info.plist

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.TestImplicitOrdering</string>
+	<key>CFBundleName</key>
+	<string>TestImplicitOrdering</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>10.6</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 47 - 0
Tests/MacOS/TestImplicitOrdering/Main.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Drawing;
+
+using MonoMac.Foundation;
+using MonoMac.AppKit;
+using MonoMac.ObjCRuntime;
+
+namespace TestImplicitOrdering
+{
+    class MainClass
+    {
+        static void Main(string[] args)
+        {
+            NSApplication.Init();
+            using (var pool = new NSAutoreleasePool())
+            {
+                NSApplication.SharedApplication.Delegate = new AppDelegate();
+                NSApplication.Main(args);
+            }
+        }
+    }
+
+    class AppDelegate : NSApplicationDelegate
+    {
+        private ImplicitOrderingGame _game;
+        public override void DidFinishLaunching(NSNotification notification)
+        {
+            _game = new ImplicitOrderingGame();
+            _game.Run();
+        }
+
+        public override void WillTerminate(NSNotification notification)
+        {
+            if (_game != null)
+            {
+                _game.Dispose();
+                _game = null;
+            }
+        }
+
+        public override bool ApplicationShouldTerminateAfterLastWindowClosed(NSApplication sender)
+        {
+            return true;
+        }
+    }
+}
+

+ 69 - 0
Tests/MacOS/TestImplicitOrdering/TestImplicitOrdering.csproj

@@ -0,0 +1,69 @@
+<?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>{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}</ProjectGuid>
+    <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>TestImplicitOrdering</RootNamespace>
+    <AssemblyName>TestImplicitOrdering</AssemblyName>
+  </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>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="MonoMac" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Main.cs" />
+    <Compile Include="ImplicitOrderingGame.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+      <Name>MonoGame.Framework.MacOS</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj">
+      <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
+      <Name>Lidgren.Network.MacOS</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Content\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Content\fntStandard.xnb">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 8 - 0
Tests/MonoGame.Tests.MacOS.sln

@@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoundTest_MacOS", "MacOS\So
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoundTest2_MacOs", "MacOS\SoundTest2\SoundTest2_MacOs\SoundTest2_MacOs.csproj", "{79A32C2C-0F38-4ADE-88D1-F8502C520570}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestImplicitOrdering", "MacOS\TestImplicitOrdering\TestImplicitOrdering.csproj", "{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|x86 = Debug|x86
@@ -64,6 +66,12 @@ Global
 		{51147863-7B4E-4467-A5FA-986259EB686F}.Distribution|Any CPU.Build.0 = Debug|x86
 		{51147863-7B4E-4467-A5FA-986259EB686F}.Release|x86.ActiveCfg = Release|x86
 		{51147863-7B4E-4467-A5FA-986259EB686F}.Release|x86.Build.0 = Release|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Debug|x86.ActiveCfg = Debug|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Debug|x86.Build.0 = Debug|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Distribution|Any CPU.ActiveCfg = Debug|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Distribution|Any CPU.Build.0 = Debug|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Release|x86.ActiveCfg = Release|x86
+		{573AC418-8A76-4C5B-A7FE-5AC0A4C32BA1}.Release|x86.Build.0 = Release|x86
 		{79A32C2C-0F38-4ADE-88D1-F8502C520570}.Debug|x86.ActiveCfg = Debug|x86
 		{79A32C2C-0F38-4ADE-88D1-F8502C520570}.Debug|x86.Build.0 = Debug|x86
 		{79A32C2C-0F38-4ADE-88D1-F8502C520570}.Distribution|Any CPU.ActiveCfg = Debug|x86