Browse Source

Great Samples reorganization, part 3

espes 13 years ago
parent
commit
3e205460c5
64 changed files with 500 additions and 263 deletions
  1. 4 2
      BouncingBox/MonoGame.Samples.BouncingBox.iOS.csproj
  2. 26 1
      BouncingBox/main.cs
  3. 1 1
      CatapaultWars/CatapaultGame.MacOS.csproj
  4. 1 1
      CatapaultWars/CatapultGame.cs
  5. 5 3
      CatapaultWars/MonoGame.Samples.CatapultWars.iOS.csproj
  6. 28 1
      CatapaultWars/Program.cs
  7. 1 1
      CatapaultWars/Screens/GameplayScreen.cs
  8. 9 9
      CatapaultWars/Screens/InstructionsScreen.cs
  9. 1 1
      CatapultNetWars/CatapultGame.cs
  10. 1 1
      CatapultNetWars/CatapultNetWars.MacOS.csproj
  11. 9 5
      CatapultNetWars/MonoGame.Samples.CatapultNetWars.iOS.csproj
  12. 28 3
      CatapultNetWars/Program.cs
  13. 1 1
      CatapultNetWars/Screens/GameplayScreen.cs
  14. 9 9
      CatapultNetWars/Screens/InstructionsScreen.cs
  15. 4 2
      ChaseAndEvade/MonoGame.Samples.ChaseAndEvade.iOS.csproj
  16. 46 2
      ChaseAndEvade/Program.cs
  17. 1 1
      CollisionSample/CollisionSample.csproj
  18. 1 1
      CollisionSample/Program.cs
  19. 1 1
      Colored3DCube/Colored3DCube.MacOS.csproj
  20. 1 1
      Colored3DCube/Program.cs
  21. 1 1
      GameStateManagement/Game.cs
  22. 5 2
      GameStateManagement/GameStateManagement.MacOS.csproj
  23. 1 1
      GameStateManagement/Program.cs
  24. 1 1
      HoneycombRush/HoneycombRush.MacOS.csproj
  25. 1 1
      HoneycombRush/HoneycombRush.cs
  26. 1 1
      HoneycombRush/Program.cs
  27. 1 1
      HoneycombRush/Screens/GameplayScreen.cs
  28. 1 1
      HoneycombRush/Screens/LevelOverScreen.cs
  29. 1 1
      HoneycombRush/Screens/LoadingAndInstructionScreen.cs
  30. 0 6
      Particle3DSample/Content/ParticlePixelShader.fsh
  31. 0 51
      Particle3DSample/Content/ParticlePixelShader.vsh
  32. 4 6
      Particle3DSample/Particle3DSample.MacOS.csproj
  33. 0 100
      Particle3DSample/ParticleEffect.cs
  34. 2 3
      Particle3DSample/ParticleSystem.cs
  35. BIN
      ParticleSample/Default.png
  36. 8 6
      ParticleSample/MonoGame.Samples.ParticleSample.iOS.csproj
  37. 84 1
      ParticleSample/Program.cs
  38. 1 1
      Peer2PeerSample/MonoGame.Samples.Peer2Peer.iOS.csproj
  39. 3 3
      Peer2PeerSample/PeerToPeerGame.cs
  40. 37 1
      Peer2PeerSample/Program.cs
  41. 4 2
      PerPixelCollisionSample/MonoGame.Samples.PerPixelCollision.iOS.csproj
  42. 2 1
      PerPixelCollisionSample/PerPixelCollisionSample.MacOS.csproj
  43. 25 2
      PerPixelCollisionSample/Program.cs
  44. 4 2
      RectangleCollisionSample/MonoGame.Samples.RectangleCollision.iOS.csproj
  45. 26 1
      RectangleCollisionSample/Program.cs
  46. 2 1
      RectangleCollisionSample/RectangleCollisionSample.MacOS.csproj
  47. 1 1
      RenderTarget2DSample/Game1.cs
  48. 8 4
      RenderTarget2DSample/MonoGame.Samples.RenderTarget2D.iOS.csproj
  49. 30 2
      RenderTarget2DSample/Program.cs
  50. 2 1
      RenderTarget2DSample/RenderTarget2DSample.MacOS.csproj
  51. BIN
      StateObjectWindows/Program.cs
  52. 1 1
      StateObjectWindows/StateObjectWindows.csproj
  53. 1 1
      StencilsCratersTutorial/Program.cs
  54. BIN
      TexturedQuad/Game1.cs
  55. BIN
      TexturedQuad/Program.cs
  56. 2 1
      TexturedQuad/TexturedQuad.MacOS.csproj
  57. 4 2
      TransformedCollisionSample/MonoGame.Samples.TransformedCollision.iOS.csproj
  58. 24 0
      TransformedCollisionSample/Program.cs
  59. 2 1
      TransformedCollisionSample/TransformedCollisionSample.MacOS.csproj
  60. BIN
      UseCustomVertex/Game1.cs
  61. 1 1
      UseCustomVertex/Program.cs
  62. 3 3
      UseCustomVertex/UseCustomVertex.MacOS.csproj
  63. 1 1
      VideoPlayer/MonoGame.Samples.VideoPlayer.iOS.csproj
  64. 27 0
      VideoPlayer/main.cs

+ 4 - 2
BouncingBox/MonoGame.Samples.BouncingBox.iOS.csproj

@@ -15,7 +15,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>IPHONE;DEBUG</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
@@ -33,13 +33,14 @@
     <MtouchI18n />
     <MtouchI18n />
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <AssemblyName>BouncingBox</AssemblyName>
     <AssemblyName>BouncingBox</AssemblyName>
+    <DefineConstants>IPHONE;</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>IPHONE;DEBUG</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
     <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
@@ -60,6 +61,7 @@
     <MtouchSdkVersion>4.0</MtouchSdkVersion>
     <MtouchSdkVersion>4.0</MtouchSdkVersion>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <AssemblyName>BouncingBox</AssemblyName>
     <AssemblyName>BouncingBox</AssemblyName>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugType>none</DebugType>
     <DebugType>none</DebugType>

+ 26 - 1
BouncingBox/main.cs

@@ -1,8 +1,14 @@
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 
 
 namespace Microsoft.Xna.Samples.BouncingBox
 namespace Microsoft.Xna.Samples.BouncingBox
 {
 {
+#if MONOMAC
 	class Program
 	class Program
 	{
 	{
 		static void Main (string[] args)
 		static void Main (string[] args)
@@ -35,5 +41,24 @@ namespace Microsoft.Xna.Samples.BouncingBox
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}	
+	}
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+		private Game1 game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new Game1();
+			game.Run();
+		}
+
+		static void Main (string [] args)
+		{
+			UIApplication.Main (args,null,"AppDelegate");
+		}
+	}
+#endif
 }
 }

+ 1 - 1
CatapaultWars/CatapaultGame.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MACOS</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>

+ 1 - 1
CatapaultWars/CatapultGame.cs

@@ -49,7 +49,7 @@ namespace CatapultGame
             screenManager = new ScreenManager(this);
             screenManager = new ScreenManager(this);
             Components.Add(screenManager);
             Components.Add(screenManager);
 			IsMouseVisible = true;
 			IsMouseVisible = true;
-#if !WINDOWS && !XBOX && !MACOS
+#if !WINDOWS && !XBOX && !MONOMAC
             //Switch to full screen for best game experience
             //Switch to full screen for best game experience
             graphics.IsFullScreen = true;
             graphics.IsFullScreen = true;
 #endif
 #endif

+ 5 - 3
CatapaultWars/MonoGame.Samples.CatapultWars.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG; IOS</DefineConstants>
+    <DefineConstants>DEBUG; IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -65,7 +65,9 @@
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Xml.Linq" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.iOS.plist"><Link>Info.plist</Link></None>
+    <None Include="Info.iOS.plist">
+      <Link>Info.plist</Link>
+    </None>
     <None Include="Content\Fonts\HUDFont.xnb">
     <None Include="Content\Fonts\HUDFont.xnb">
       <Link>Content\Fonts\HUDFont.xnb</Link>
       <Link>Content\Fonts\HUDFont.xnb</Link>
     </None>
     </None>
@@ -140,7 +142,6 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Main.cs" />
     <Compile Include="CatapultGame.cs">
     <Compile Include="CatapultGame.cs">
       <Link>CatapultGame.cs</Link>
       <Link>CatapultGame.cs</Link>
     </Compile>
     </Compile>
@@ -201,6 +202,7 @@
     <Compile Include="Utility\AudioManager.cs">
     <Compile Include="Utility\AudioManager.cs">
       <Link>Utility\AudioManager.cs</Link>
       <Link>Utility\AudioManager.cs</Link>
     </Compile>
     </Compile>
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
   <ItemGroup>

+ 28 - 1
CatapaultWars/Program.cs

@@ -9,6 +9,12 @@
 
 
 #region Using Statements
 #region Using Statements
 using System;
 using System;
+
+#if IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
+
 #endregion
 #endregion
 
 
 namespace CatapultGame
 namespace CatapultGame
@@ -27,7 +33,7 @@ namespace CatapultGame
             }
             }
         }
         }
     }
     }
-#elif MACOS
+#elif MONOMAC
 
 
 
 
 	static class Program
 	static class Program
@@ -61,6 +67,27 @@ namespace CatapultGame
 			return true;
 			return true;
 		}
 		}
 	}
 	}
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+		private CatapultGame game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new CatapultGame();
+			game.Run();
+		}
+		
+		// This is the main entry point of the application.
+		static void Main (string[] args)
+		{
+			// if you want to use a different Application Delegate class from "AppDelegate"
+			// you can specify it here.
+			UIApplication.Main (args, null, "AppDelegate");
+		}
+	}
 #endif
 #endif
 
 
 }
 }

+ 1 - 1
CatapaultWars/Screens/GameplayScreen.cs

@@ -82,7 +82,7 @@ namespace CatapultGame
         public override void LoadContent()
         public override void LoadContent()
         {
         {
             base.LoadContent();
             base.LoadContent();
-#if ANDROID || IOS			
+#if ANDROID || IPHONE			
 			LoadAssets();
 			LoadAssets();
 #endif			
 #endif			
             // Start the game
             // Start the game

+ 9 - 9
CatapaultWars/Screens/InstructionsScreen.cs

@@ -19,12 +19,12 @@ using Microsoft.Xna.Framework;
 using GameStateManagement;
 using GameStateManagement;
 using Microsoft.Xna.Framework.Input.Touch;
 using Microsoft.Xna.Framework.Input.Touch;
 
 
-#if MACOS
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 #endif
 #endif
 
 
-#if IOS
+#if IPHONE
 using MonoTouch.UIKit;
 using MonoTouch.UIKit;
 using MonoTouch.Foundation;
 using MonoTouch.Foundation;
 #endif
 #endif
@@ -81,7 +81,7 @@ namespace CatapultGame
 		public override void HandleInput (InputState input)
 		public override void HandleInput (InputState input)
 		{
 		{
 			if (isLoading == true) {
 			if (isLoading == true) {
-#if ANDROID || IOS
+#if ANDROID || IPHONE
 				// Exit the screen and show the gameplay screen 
 				// Exit the screen and show the gameplay screen 
 					// with pre-loaded assets
 					// with pre-loaded assets
 				ExitScreen ();
 				ExitScreen ();
@@ -100,7 +100,7 @@ namespace CatapultGame
 				gameplayScreen.ScreenManager = ScreenManager;
 				gameplayScreen.ScreenManager = ScreenManager;
 
 
 				// Start loading the resources in additional thread
 				// Start loading the resources in additional thread
-#if MACOS
+#if MONOMAC
 				// create a new thread using BackgroundWorkerThread as method to execute
 				// create a new thread using BackgroundWorkerThread as method to execute
 				thread = new Thread (LoadAssetsWorkerThread as ThreadStart);
 				thread = new Thread (LoadAssetsWorkerThread as ThreadStart);
 #else
 #else
@@ -118,7 +118,7 @@ namespace CatapultGame
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen.ScreenManager = ScreenManager;
 					gameplayScreen.ScreenManager = ScreenManager;
 					
 					
-#if ANDROID || IOS	
+#if ANDROID || IPHONE	
 					isLoading = true;									
 					isLoading = true;									
 #else				
 #else				
 					// Start loading the resources in additional thread
 					// Start loading the resources in additional thread
@@ -136,22 +136,22 @@ namespace CatapultGame
 		void LoadAssetsWorkerThread ()
 		void LoadAssetsWorkerThread ()
 		{
 		{
 
 
-#if MACOS || IOS			
+#if MONOMAC || IPHONE			
 			// Create an Autorelease Pool or we will leak objects.
 			// Create an Autorelease Pool or we will leak objects.
 			using (var pool = new NSAutoreleasePool()) {
 			using (var pool = new NSAutoreleasePool()) {
 #else				
 #else				
 				
 				
 #endif				
 #endif				
 				// Make sure we invoke this on the Main Thread or OpenGL will throw an error
 				// Make sure we invoke this on the Main Thread or OpenGL will throw an error
-#if MACOS
+#if MONOMAC
 				MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
 				MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
 #endif
 #endif
-#if IOS
+#if IPHONE
 				var invokeOnMainThredObj = new NSObject();
 				var invokeOnMainThredObj = new NSObject();
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 #endif
 #endif
 					gameplayScreen.LoadAssets ();
 					gameplayScreen.LoadAssets ();
-#if MACOS || IOS						
+#if MONOMAC || IPHONE						
 				});
 				});
 					
 					
 			}				
 			}				

+ 1 - 1
CatapultNetWars/CatapultGame.cs

@@ -75,7 +75,7 @@ namespace CatapultGame
 			NetworkSession.InviteAccepted += (sender, e) => NetworkSessionComponent.InviteAccepted (screenManager, e);
 			NetworkSession.InviteAccepted += (sender, e) => NetworkSessionComponent.InviteAccepted (screenManager, e);
 
 
 			IsMouseVisible = true;
 			IsMouseVisible = true;
-#if !WINDOWS && !XBOX && !MACOS && !LINUX
+#if !WINDOWS && !XBOX && !MONOMAC && !LINUX
 			//Switch to full screen for best game experience
 			//Switch to full screen for best game experience
 			graphics.IsFullScreen = true;
 			graphics.IsFullScreen = true;
 #else
 #else

+ 1 - 1
CatapultNetWars/CatapultNetWars.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MACOS</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>

+ 9 - 5
CatapultNetWars/MonoGame.Samples.CatapultNetWars.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG;IOS</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -33,13 +33,14 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -55,6 +56,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />
@@ -65,7 +67,9 @@
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Xml.Linq" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.iOS.plist"><Link>Info.plist</Link></None>
+    <None Include="Info.iOS.plist">
+      <Link>Info.plist</Link>
+    </None>
     <None Include="Resources.resources">
     <None Include="Resources.resources">
       <Link>Resources.resources</Link>
       <Link>Resources.resources</Link>
     </None>
     </None>
@@ -74,7 +78,6 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Main.cs" />
     <Compile Include="CatapultGame.cs">
     <Compile Include="CatapultGame.cs">
       <Link>CatapultGame.cs</Link>
       <Link>CatapultGame.cs</Link>
     </Compile>
     </Compile>
@@ -177,6 +180,7 @@
     <Compile Include="Resources.Designer.cs">
     <Compile Include="Resources.Designer.cs">
       <Link>Resources.Designer.cs</Link>
       <Link>Resources.Designer.cs</Link>
     </Compile>
     </Compile>
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
   <ItemGroup>
@@ -305,7 +309,7 @@
     </Content>
     </Content>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\..\..\MonoGame.Framework\MonoGame.Framework.iOS.csproj">
+    <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.iOS.csproj">
       <Project>{DB8508BB-9849-4CC2-BC0F-8EB5DACB3C47}</Project>
       <Project>{DB8508BB-9849-4CC2-BC0F-8EB5DACB3C47}</Project>
       <Name>MonoGame.Framework.iOS</Name>
       <Name>MonoGame.Framework.iOS</Name>
     </ProjectReference>
     </ProjectReference>

+ 28 - 3
CatapultNetWars/Program.cs

@@ -9,6 +9,12 @@
 
 
 #region Using Statements
 #region Using Statements
 using System;
 using System;
+
+#if IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
+
 #endregion
 #endregion
 
 
 namespace CatapultGame
 namespace CatapultGame
@@ -27,9 +33,7 @@ namespace CatapultGame
             }
             }
         }
         }
     }
     }
-#elif MACOS
-
-
+#elif MONOMAC
 	static class Program
 	static class Program
 	{	
 	{	
 		/// <summary>
 		/// <summary>
@@ -60,6 +64,27 @@ namespace CatapultGame
 			return true;
 			return true;
 		}
 		}
 	}
 	}
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+		private CatapultGame game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new CatapultGame();
+			game.Run();
+		}
+		
+		// This is the main entry point of the application.
+		static void Main (string[] args)
+		{
+			// if you want to use a different Application Delegate class from "AppDelegate"
+			// you can specify it here.
+			UIApplication.Main (args, null, "AppDelegate");
+		}
+	}
 #endif
 #endif
 
 
 }
 }

+ 1 - 1
CatapultNetWars/Screens/GameplayScreen.cs

@@ -99,7 +99,7 @@ namespace CatapultGame
 		public override void LoadContent ()
 		public override void LoadContent ()
 		{
 		{
 			base.LoadContent ();
 			base.LoadContent ();
-#if ANDROID || IOS || LINUX || WINDOWS
+#if ANDROID || IPHONE || LINUX || WINDOWS
 			LoadAssets();
 			LoadAssets();
 #endif			
 #endif			
 			// Start the game
 			// Start the game

+ 9 - 9
CatapultNetWars/Screens/InstructionsScreen.cs

@@ -19,12 +19,12 @@ using Microsoft.Xna.Framework;
 using GameStateManagement;
 using GameStateManagement;
 using Microsoft.Xna.Framework.Input.Touch;
 using Microsoft.Xna.Framework.Input.Touch;
 
 
-#if MACOS
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 #endif
 #endif
 
 
-#if IOS
+#if IPHONE
 using MonoTouch.UIKit;
 using MonoTouch.UIKit;
 using MonoTouch.Foundation;
 using MonoTouch.Foundation;
 #endif
 #endif
@@ -84,7 +84,7 @@ namespace CatapultGame
 		{
 		{
 			if (isLoading == true)
 			if (isLoading == true)
             {
             {
-#if ANDROID || IOS || LINUX || WINDOWS
+#if ANDROID || IPHONE || LINUX || WINDOWS
                 // Exit the screen and show the gameplay screen 
                 // Exit the screen and show the gameplay screen 
 					// with pre-loaded assets
 					// with pre-loaded assets
 				ExitScreen ();
 				ExitScreen ();
@@ -104,7 +104,7 @@ namespace CatapultGame
 
 
                 // Start loading the resources in additional thread
                 // Start loading the resources in additional thread
 #if !LINUX && !WINDOWS
 #if !LINUX && !WINDOWS
-#if MACOS
+#if MONOMAC
 				// create a new thread using BackgroundWorkerThread as method to execute
 				// create a new thread using BackgroundWorkerThread as method to execute
 				thread = new Thread (LoadAssetsWorkerThread as ThreadStart);
 				thread = new Thread (LoadAssetsWorkerThread as ThreadStart);
 #else     
 #else     
@@ -124,7 +124,7 @@ namespace CatapultGame
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen = new GameplayScreen ();
 					gameplayScreen.ScreenManager = ScreenManager;
 					gameplayScreen.ScreenManager = ScreenManager;
 
 
-#if ANDROID || IOS	|| LINUX || WINDOWS
+#if ANDROID || IPHONE	|| LINUX || WINDOWS
                     isLoading = true;									
                     isLoading = true;									
 #else						
 #else						
 					// Start loading the resources in additional thread
 					// Start loading the resources in additional thread
@@ -142,22 +142,22 @@ namespace CatapultGame
 		{
 		{
 
 
 
 
-#if MACOS || IOS			
+#if MONOMAC || IPHONE			
 			// Create an Autorelease Pool or we will leak objects.
 			// Create an Autorelease Pool or we will leak objects.
 			using (var pool = new NSAutoreleasePool()) {
 			using (var pool = new NSAutoreleasePool()) {
 #else				
 #else				
 				
 				
 #endif
 #endif
 				// Make sure we invoke this on the Main Thread or OpenGL will throw an error
 				// Make sure we invoke this on the Main Thread or OpenGL will throw an error
-#if MACOS
+#if MONOMAC
 				MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
 				MonoMac.AppKit.NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
 #endif
 #endif
-#if IOS
+#if IPHONE
 				var invokeOnMainThredObj = new NSObject();
 				var invokeOnMainThredObj = new NSObject();
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 				invokeOnMainThredObj.InvokeOnMainThread(delegate {
 #endif
 #endif
 					gameplayScreen.LoadAssets ();
 					gameplayScreen.LoadAssets ();
-#if MACOS || IOS						
+#if MONOMAC || IPHONE						
 				});
 				});
 					
 					
 			}				
 			}				

+ 4 - 2
ChaseAndEvade/MonoGame.Samples.ChaseAndEvade.iOS.csproj

@@ -88,8 +88,8 @@
     <Reference Include="OpenTK" />
     <Reference Include="OpenTK" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Main.cs" />
     <Compile Include="ChaseAndEvadeGame.cs" />
     <Compile Include="ChaseAndEvadeGame.cs" />
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Folder Include="Content\" />
     <Folder Include="Content\" />
@@ -114,7 +114,9 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="GameThumbnail.png" />
     <None Include="GameThumbnail.png" />
-    <None Include="Info.iOS.plist"><Link>Info.plist</Link></None>
+    <None Include="Info.iOS.plist">
+      <Link>Info.plist</Link>
+    </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.iOS.csproj">
     <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.iOS.csproj">

+ 46 - 2
ChaseAndEvade/Program.cs

@@ -1,8 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 
 
 namespace ChaseAndEvade
 namespace ChaseAndEvade
 {
 {
+#if MONOMAC
 	class Program
 	class Program
 	{
 	{
 		static void Main (string[] args)
 		static void Main (string[] args)
@@ -24,16 +33,51 @@ namespace ChaseAndEvade
 
 
 	class AppDelegate : NSApplicationDelegate
 	class AppDelegate : NSApplicationDelegate
 	{
 	{
-        ChaseAndEvadeGame game;
+		ChaseAndEvadeGame game;
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
 		{
 		{
 			game = new ChaseAndEvadeGame();
 			game = new ChaseAndEvadeGame();
-		    game.Run();
+			game.Run();
 		}
 		}
 
 
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
 		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
 		{
 		{
 			return true;
 			return true;
 		}
 		}
+	}
+#elif IPHONE
+	[Register("AppDelegate")]
+	class Program : UIApplicationDelegate
+	{
+		ChaseAndEvadeGame game;
+		public override void FinishedLaunching(UIApplication app)
+		{
+			// Fun begins..
+			game = new ChaseAndEvadeGame();
+			game.Run();
+		}
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		static void Main(string[] args)
+		{
+			UIApplication.Main(args, null, "AppDelegate");
+		}
+	}	
+#else
+	/// <summary>
+	/// The main entry point for the application.
+	/// </summary>
+	static class Program
+	{
+		static void Main()
+		{
+			using (ChaseAndEvadeGame game = new ChaseAndEvadeGame())
+			{
+				game.Run();
+			}
+		}
 	}	
 	}	
+#endif
 }
 }

+ 1 - 1
CollisionSample/CollisionSample.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MAC</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>

+ 1 - 1
CollisionSample/Program.cs

@@ -26,7 +26,7 @@ namespace CollisionSample
         }
         }
     }
     }
 #endif
 #endif
-#if MAC
+#if MONOMAC
 
 
 	static class Program
 	static class Program
 	{	
 	{	

+ 1 - 1
Colored3DCube/Colored3DCube.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MAC</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>

+ 1 - 1
Colored3DCube/Program.cs

@@ -17,7 +17,7 @@ namespace Colored3DCube
         }
         }
     }
     }
 #endif
 #endif
-#if MAC
+#if MONOMAC
 
 
 	static class Program
 	static class Program
 	{	
 	{	

+ 1 - 1
GameStateManagement/Game.cs

@@ -12,7 +12,7 @@ using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Graphics;
 #endregion
 #endregion
 
 
-namespace Microsoft.Xna.Samples.GameStateManagement
+namespace GameStateManagement
 {
 {
     /// <summary>
     /// <summary>
     /// Sample showing how to manage different game states, with transitions
     /// Sample showing how to manage different game states, with transitions

+ 5 - 2
GameStateManagement/GameStateManagement.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />
@@ -38,7 +39,8 @@
     <Reference Include="MonoMac" />
     <Reference Include="MonoMac" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.plist"></None>
+    <None Include="Info.plist">
+    </None>
     <None Include="Background.png" />
     <None Include="Background.png" />
     <None Include="Game.ico" />
     <None Include="Game.ico" />
     <None Include="Content\background.png" />
     <None Include="Content\background.png" />
@@ -64,6 +66,7 @@
     <Compile Include="Screens\OptionsMenuScreen.cs" />
     <Compile Include="Screens\OptionsMenuScreen.cs" />
     <Compile Include="Screens\PauseMenuScreen.cs" />
     <Compile Include="Screens\PauseMenuScreen.cs" />
     <Compile Include="Screens\PlayerIndexEventArgs.cs" />
     <Compile Include="Screens\PlayerIndexEventArgs.cs" />
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
     <ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">

+ 1 - 1
GameStateManagement/Program.cs

@@ -9,7 +9,7 @@ using Microsoft.Xna.Framework.Media;
 #endif
 #endif
 #endregion
 #endregion
 
 
-namespace Microsoft.Xna.Samples.GameStateManagement
+namespace GameStateManagement
 {
 {
     #region Entry Point
     #region Entry Point
 #if IPHONE
 #if IPHONE

+ 1 - 1
HoneycombRush/HoneycombRush.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MAC</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>

+ 1 - 1
HoneycombRush/HoneycombRush.cs

@@ -56,7 +56,7 @@ namespace HoneycombRush
             graphics.IsFullScreen = true;
             graphics.IsFullScreen = true;
 
 
             screenManager = new ScreenManager(this, Vector2.One);
             screenManager = new ScreenManager(this, Vector2.One);
-#elif WINDOWS || MAC || LINUX
+#elif WINDOWS || MONOMAC || LINUX
             graphics.PreferredBackBufferHeight = 480;
             graphics.PreferredBackBufferHeight = 480;
             graphics.PreferredBackBufferWidth = 800;            
             graphics.PreferredBackBufferWidth = 800;            
 
 

+ 1 - 1
HoneycombRush/Program.cs

@@ -29,7 +29,7 @@ namespace HoneycombRush
             }
             }
         }
         }
     }
     }
-#elif MAC
+#elif MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>

+ 1 - 1
HoneycombRush/Screens/GameplayScreen.cs

@@ -20,7 +20,7 @@ using HoneycombRush.GameDebugTools;
 using Microsoft.Xna.Framework.Input.Touch;
 using Microsoft.Xna.Framework.Input.Touch;
 using System.Xml.Linq;
 using System.Xml.Linq;
 
 
-#if MAC
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 #endif
 #endif
 
 

+ 1 - 1
HoneycombRush/Screens/LevelOverScreen.cs

@@ -251,7 +251,7 @@ namespace HoneycombRush
             // If not already loading
             // If not already loading
             else if (!isLoading)
             else if (!isLoading)
             {
             {
-#if MAC			
+#if MONOMAC			
 		// Start loading the resources on main thread
 		// Start loading the resources on main thread
 		// If not then all sorts of errors happen for 
 		// If not then all sorts of errors happen for 
 		// AutoReleasPools and OpenGL does not handle 
 		// AutoReleasPools and OpenGL does not handle 

+ 1 - 1
HoneycombRush/Screens/LoadingAndInstructionScreen.cs

@@ -189,7 +189,7 @@ namespace HoneycombRush
         private void LoadResources()
         private void LoadResources()
         {
         {
 
 
-#if MAC		
+#if MONOMAC		
 		// Start loading the resources on main thread
 		// Start loading the resources on main thread
 		// If not then all sorts of errors happen for 
 		// If not then all sorts of errors happen for 
 		// AutoReleasPools and OpenGL does not handle 
 		// AutoReleasPools and OpenGL does not handle 

+ 0 - 6
Particle3DSample/Content/ParticlePixelShader.fsh

@@ -1,6 +0,0 @@
-uniform sampler2D Texture;
-
-void main()
-{
-	gl_FragColor = gl_Color * texture2D(Texture, gl_TexCoord[0].xy);
-}

+ 0 - 51
Particle3DSample/Content/ParticlePixelShader.vsh

@@ -1,51 +0,0 @@
-uniform sampler2D Texture;
-
-// Camera parameters.
-uniform mat4 View;
-uniform mat4 Projection;
-uniform vec2 ViewportScale;
-
-
-// The current time, in seconds.
-uniform float CurrentTime;
-
-
-// Parameters describing how the particles animate.
-uniform float Duration;
-uniform float DurationRandomness;
-uniform vec3 Gravity;
-uniform float EndVelocity;
-uniform vec4 MinColor;
-uniform vec4 MaxColor;
-
-
-// These float2 parameters describe the min and max of a range.
-// The actual value is chosen differently for each particle,
-// interpolating between x and y by some random amount.
-uniform vec2 RotateSpeed;
-uniform vec2 StartSize;
-uniform vec2 EndSize;
-
-void main()
-{
-	mat4 view = View;
-	mat4 projection = Projection;
-	vec2 viewportScale = ViewportScale;
-	
-	float currentTime = CurrentTime;
-	
-	float duration = Duration;
-	float durationRandomness = DurationRandomness;
-	vec3 gravity = Gravity;
-	float endVelocity = EndVelocity;
-	vec4 minColor = MinColor;
-	vec4 maxColor = MaxColor;
-	
-	vec2 rotateSpeed = RotateSpeed;
-	vec2 startSize = StartSize;
-	vec2 endSize = EndSize;
-	
-	gl_FrontColor = gl_Color;
-	gl_TexCoord[0] = gl_MultiTexCoord0;
-	gl_Position = ftransform();
-}

+ 4 - 6
Particle3DSample/Particle3DSample.MacOS.csproj

@@ -38,7 +38,10 @@
     <Reference Include="MonoMac" />
     <Reference Include="MonoMac" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.plist"></None>
+    <None Include="Info.plist">
+    </None>
+    <None Include="Content\Particle3DSampleContent.contentproj" />
+    <None Include="Content\ParticleEffect.fx" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
   <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
@@ -59,15 +62,12 @@
     <Compile Include="ParticleSystem.cs" />
     <Compile Include="ParticleSystem.cs" />
     <Compile Include="ParticleVertex.cs" />
     <Compile Include="ParticleVertex.cs" />
     <Compile Include="Projectile.cs" />
     <Compile Include="Projectile.cs" />
-    <Compile Include="ParticleEffect.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Content Include="Content\font.xnb" />
     <Content Include="Content\font.xnb" />
     <Content Include="Content\ExplosionSettings.xml" />
     <Content Include="Content\ExplosionSettings.xml" />
     <Content Include="Content\ExplosionSmokeSettings.xml" />
     <Content Include="Content\ExplosionSmokeSettings.xml" />
     <Content Include="Content\FireSettings.xml" />
     <Content Include="Content\FireSettings.xml" />
-    <Content Include="Content\Particle3DSampleContent.contentproj" />
-    <Content Include="Content\ParticleEffect.fx" />
     <Content Include="Content\ProjectileTrailSettings.xml" />
     <Content Include="Content\ProjectileTrailSettings.xml" />
     <Content Include="Content\SmokePlumeSettings.xml" />
     <Content Include="Content\SmokePlumeSettings.xml" />
     <Content Include="Content\checker.bmp" />
     <Content Include="Content\checker.bmp" />
@@ -89,8 +89,6 @@
     <Content Include="Content\ProjectileTrailSettings.xnb" />
     <Content Include="Content\ProjectileTrailSettings.xnb" />
     <Content Include="Content\smoke.xnb" />
     <Content Include="Content\smoke.xnb" />
     <Content Include="Content\SmokePlumeSettings.xnb" />
     <Content Include="Content\SmokePlumeSettings.xnb" />
-    <Content Include="Content\ParticlePixelShader.fsh" />
-    <Content Include="Content\ParticlePixelShader.vsh" />
     <Content Include="Content\explosion.xnb" />
     <Content Include="Content\explosion.xnb" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 0 - 100
Particle3DSample/ParticleEffect.cs

@@ -1,100 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework;
-
-using MonoMac.Foundation;
-using MonoMac.AppKit;
-
-namespace Particle3DSample
-{
-	public class ParticleEffect : Effect
-	{
-		public ParticleEffect (GraphicsDevice graphicsDevice) : base (graphicsDevice)
-		{
-			// We do not need this but here for test
-			LoadVertexShaderFromFile ("ParticlePixelShader.vsh");
-			LoadFragmentShaderFromFile ("ParticlePixelShader.fsh");
-			
-			DefineTechnique ("Particles", "P0", 0, 0);
-			CurrentTechnique = Techniques ["Particles"];
-		}
-
-		protected void LoadVertexShaderFromFile (string sourceFile)
-		{
-			var path = Path.Combine (NSBundle.MainBundle.ResourcePath, "Content");
-			sourceFile = Path.Combine (path, sourceFile);
-
-			// Load the source into a string
-			string shaderSource = LoadShaderSource (sourceFile);
-
-			CreateVertexShaderFromSource (shaderSource);				
-
-		}
-
-		protected void LoadFragmentShaderFromFile (string sourceFile)
-		{
-			var path = Path.Combine (NSBundle.MainBundle.ResourcePath, "Content");
-			sourceFile = Path.Combine (path, sourceFile);
-
-			// Load the source into a string
-			string shaderSource = LoadShaderSource (sourceFile);
-
-			CreateFragmentShaderFromSource (shaderSource);				
-
-		}
-		
-		// Load the source code of a GLSL program from the content
-		private string LoadShaderSource (string name)
-		{
-
-			StreamReader streamReader = new StreamReader (name);
-			string text = streamReader.ReadToEnd ();
-			streamReader.Close ();
-
-			return text;
-
-		}
-		
-//void main(void){	
-//	gl_TexCoord[0] = gl_MultiTexCoord0;	
-//	gl_TexCoord[1] = gl_MultiTexCoord1;		
-//	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 
-//}
-//
-//uniform sampler2D keke;
-//uniform sampler2D smee;
-//
-//void main (void){	
-//vec2 src = vec2(gl_TexCoord[0]);	
-//vec4 dest = texture2D(keke, src);		
-//vec2 src2 = vec2(gl_TexCoord[1]);	
-//vec4 dest2 = texture2D(smee, src2);			
-//gl_FragColor = 0.5 * (dest + dest2);  
-//}
-//
-//ARBShaderObjects.glUseProgramObjectARB(shader.getProgramID());		
-//int location = shader.getUniformLocation(shader.getProgramID(), "keke");
-//int location2 = shader.getUniformLocation(shader.getProgramID(), "smee");
-//ARBMultitexture.glActiveTextureARB(ARBMultitexture.GL_TEXTURE0_ARB);
-//GL11.glBindTexture(GL11.GL_TEXTURE_2D, TestEngine.cID);
-//GL11.glEnable(GL11.GL_TEXTURE_2D);
-//ARBShaderObjects.glUniform1iARB(location, 0);
-//ARBMultitexture.glActiveTextureARB(ARBMultitexture.GL_TEXTURE1_ARB);
-//GL11.glBindTexture(GL11.GL_TEXTURE_2D, sprite.getTextureID());
-//GL11.glEnable(GL11.GL_TEXTURE_2D);	
-//ARBShaderObjects.glUniform1iARB(location2, 1);
-//EngineFunc.translate(origin.x, origin.y);
-//EngineFunc.drawQuads(sprite.getPoints());		
-//ARBShaderObjects.glUseProgramObjectARB(0);		
-//ARBMultitexture.glActiveTextureARB(ARBMultitexture.GL_TEXTURE1_ARB);
-//GL11.glDisable(GL11.GL_TEXTURE_2D);		
-//ARBMultitexture.glActiveTextureARB(ARBMultitexture.GL_TEXTURE0_ARB);
-//GL11.glDisable(GL11.GL_TEXTURE_2D);
-		
-
-	}
-}
-

+ 2 - 3
Particle3DSample/ParticleSystem.cs

@@ -216,9 +216,8 @@ namespace Particle3DSample
 		/// </summary>
 		/// </summary>
 		void LoadParticleEffect ()
 		void LoadParticleEffect ()
 		{
 		{
-			//Effect effect = content.Load<Effect> ("ParticleEffect");
-			Effect effect = new ParticleEffect(GraphicsDevice);
-			
+			Effect effect = content.Load<Effect> ("ParticleEffect");
+
 			// If we have several particle systems, the content manager will return
 			// If we have several particle systems, the content manager will return
 			// a single shared effect instance to them all. But we want to preconfigure
 			// a single shared effect instance to them all. But we want to preconfigure
 			// the effect with parameters that are specific to this particular
 			// the effect with parameters that are specific to this particular

BIN
ParticleSample/Default.png


+ 8 - 6
ParticleSample/MonoGame.Samples.ParticleSample.iOS.csproj

@@ -33,7 +33,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
-    <DefineConstants>IPHONE</DefineConstants>
+    <DefineConstants>IPHONE;</DefineConstants>
     <MtouchI18n />
     <MtouchI18n />
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
@@ -43,7 +43,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG;IPHONE</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE;</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchDebug>true</MtouchDebug>
     <MtouchDebug>true</MtouchDebug>
@@ -60,7 +60,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
-    <DefineConstants>IPHONE</DefineConstants>
+    <DefineConstants>IPHONE;</DefineConstants>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
   </PropertyGroup>
   </PropertyGroup>
@@ -71,7 +71,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
     <MtouchI18n />
     <MtouchI18n />
-    <DefineConstants>IPHONE</DefineConstants>
+    <DefineConstants>IPHONE;</DefineConstants>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
   </PropertyGroup>
   </PropertyGroup>
@@ -89,13 +89,13 @@
     <Reference Include="OpenTK" />
     <Reference Include="OpenTK" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Main.cs" />
     <Compile Include="ExplosionParticleSystem.cs" />
     <Compile Include="ExplosionParticleSystem.cs" />
     <Compile Include="ExplosionSmokeParticleSystem.cs" />
     <Compile Include="ExplosionSmokeParticleSystem.cs" />
     <Compile Include="Particle.cs" />
     <Compile Include="Particle.cs" />
     <Compile Include="ParticleSampleGame.cs" />
     <Compile Include="ParticleSampleGame.cs" />
     <Compile Include="ParticleSystem.cs" />
     <Compile Include="ParticleSystem.cs" />
     <Compile Include="SmokePlumeParticleSystem.cs" />
     <Compile Include="SmokePlumeParticleSystem.cs" />
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Folder Include="Content\" />
     <Folder Include="Content\" />
@@ -111,7 +111,9 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="GameThumbnail.png" />
     <None Include="GameThumbnail.png" />
-    <None Include="Info.iOS.plist"><Link>Info.plist</Link></None>
+    <None Include="Info.iOS.plist">
+      <Link>Info.plist</Link>
+    </None>
     <None Include="Content\explosion.png" />
     <None Include="Content\explosion.png" />
     <None Include="Content\smoke.bmp" />
     <None Include="Content\smoke.bmp" />
   </ItemGroup>
   </ItemGroup>

+ 84 - 1
ParticleSample/Program.cs

@@ -1 +1,84 @@
-
using System;


namespace ParticleSample
{

	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
	{
		ParticleSampleGame game;
		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
		{

			game = new ParticleSampleGame();
			game.Run ();

		}
		
		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
		{
			return true;
		}
	}


}

+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+#if IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
+
+namespace ParticleSample
+{
+	#region Entry Point
+#if IPHONE
+	[Register("AppDelegate")]
+	class Program : UIApplicationDelegate
+	{
+		ParticleSampleGame game;
+		public override void FinishedLaunching(UIApplication app)
+		{
+			// Fun begins..
+			game = new ParticleSampleGame();
+			game.Run();
+		}
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		static void Main(string[] args)
+		{
+			UIApplication.Main(args, null, "AppDelegate");
+		}
+	}	
+#elif MONOMAC
+	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
+	{
+		ParticleSampleGame game;
+		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
+		{
+	
+			game = new ParticleSampleGame();
+			game.Run ();
+	
+		}
+		
+		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
+		{
+			return true;
+		}
+	}
+#else
+	/// <summary>
+	/// The main entry point for the application.
+	/// </summary>
+	static class Program
+	{
+		static void Main()
+		{
+			using (ParticleSampleGame game = new ParticleSampleGame())
+			{
+				game.Run();
+			}
+		}
+	}	
+#endif
+	#endregion
+}
+

+ 1 - 1
Peer2PeerSample/MonoGame.Samples.Peer2Peer.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG;IOS</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>

+ 3 - 3
Peer2PeerSample/PeerToPeerGame.cs

@@ -58,7 +58,7 @@ namespace PeerToPeer
 		{
 		{
 			graphics = new GraphicsDeviceManager (this);
 			graphics = new GraphicsDeviceManager (this);
 			
 			
-#if ANDROID || IOS
+#if ANDROID || IPHONE
             graphics.IsFullScreen = true;
             graphics.IsFullScreen = true;
 #else
 #else
 			graphics.PreferredBackBufferWidth = screenWidth;
 			graphics.PreferredBackBufferWidth = screenWidth;
@@ -81,7 +81,7 @@ namespace PeerToPeer
 
 
 			font = Content.Load<SpriteFont> ("Font");
 			font = Content.Load<SpriteFont> ("Font");
 
 
-#if ANDROID || IOS
+#if ANDROID || IPHONE
 			gamePadTexture = Content.Load<Texture2D>("gamepad.png");
 			gamePadTexture = Content.Load<Texture2D>("gamepad.png");
 			
 			
 			ThumbStickDefinition thumbStickLeft = new ThumbStickDefinition();
 			ThumbStickDefinition thumbStickLeft = new ThumbStickDefinition();
@@ -425,7 +425,7 @@ namespace PeerToPeer
                 }
                 }
 			}
 			}
 			
 			
-#if ANDROID || IOS
+#if ANDROID || IPHONE
 			GamePad.Draw(gameTime, spriteBatch);
 			GamePad.Draw(gameTime, spriteBatch);
 #endif
 #endif
 			
 			

+ 37 - 1
Peer2PeerSample/Program.cs

@@ -15,9 +15,14 @@ using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Input;
 using Microsoft.Xna.Framework.Input;
 using Microsoft.Xna.Framework.Net;
 using Microsoft.Xna.Framework.Net;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 
 
 #endregion
 #endregion
 
 
@@ -26,6 +31,7 @@ namespace PeerToPeer
 {
 {
 	
 	
 	#region Entry Point
 	#region Entry Point
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -56,7 +62,37 @@ namespace PeerToPeer
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}	
+	}
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+		private PeerToPeerGame game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new PeerToPeerGame();
+			game.Run();
+		}
+
+		static void Main (string [] args)
+		{
+			UIApplication.Main (args,null,"AppDelegate");
+		}
+	}
+#else
+	class Program
+	{
+		public static void Main(string[] args)
+		{
+			using ( PeerToPeer.PeerToPeerGame game = new  PeerToPeer.PeerToPeerGame())
+			{
+				game.Run();
+			}
+		}
+	}
+#endif
 	
 	
 	#endregion
 	#endregion
 }
 }

+ 4 - 2
PerPixelCollisionSample/MonoGame.Samples.PerPixelCollision.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
@@ -31,13 +31,14 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchDebug>true</MtouchDebug>
     <MtouchDebug>true</MtouchDebug>
@@ -52,6 +53,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 2 - 1
PerPixelCollisionSample/PerPixelCollisionSample.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 25 - 2
PerPixelCollisionSample/Program.cs

@@ -10,14 +10,19 @@
 #region Using Statements
 #region Using Statements
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 #endregion
 #endregion
 
 
 namespace PerPixelCollision
 namespace PerPixelCollision
 {
 {
-
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -48,5 +53,23 @@ namespace PerPixelCollision
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}			
+	}
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+        PerPixelCollisionGame game;
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new PerPixelCollisionGame();
+			game.Run ();
+		}
+
+		static void Main (string [] args)
+		{
+			UIApplication.Main (args,null,"AppDelegate");
+		}
+	}
+#endif
 }
 }

+ 4 - 2
RectangleCollisionSample/MonoGame.Samples.RectangleCollision.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
@@ -31,13 +31,14 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchDebug>true</MtouchDebug>
     <MtouchDebug>true</MtouchDebug>
@@ -52,6 +53,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 26 - 1
RectangleCollisionSample/Program.cs

@@ -10,13 +10,20 @@
 #region Using Statements
 #region Using Statements
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
+
 #endregion
 #endregion
 
 
 namespace RectangleCollision
 namespace RectangleCollision
 {
 {
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -47,5 +54,23 @@ namespace RectangleCollision
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}		
+	}	
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+        RectangleCollisionGame game;
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new RectangleCollisionGame();
+			game.Run();
+		}
+
+		static void Main (string [] args)
+		{
+			UIApplication.Main (args,null,"AppDelegate");
+		}
+	}
+#endif
 }
 }

+ 2 - 1
RectangleCollisionSample/RectangleCollisionSample.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 1 - 1
RenderTarget2DSample/Game1.cs

@@ -55,7 +55,7 @@ namespace RenderTarget2DSample
 			// Create the GraphicsDeviceManager for our game.
 			// Create the GraphicsDeviceManager for our game.
 			graphics = new GraphicsDeviceManager (this);
 			graphics = new GraphicsDeviceManager (this);
 
 
-#if ANDROID || IOS
+#if ANDROID || IPHONE
             graphics.IsFullScreen = true;
             graphics.IsFullScreen = true;
 #else
 #else
 			graphics.PreferredBackBufferWidth = 800;
 			graphics.PreferredBackBufferWidth = 800;

+ 8 - 4
RenderTarget2DSample/MonoGame.Samples.RenderTarget2D.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
@@ -32,13 +32,14 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchDebug>true</MtouchDebug>
     <MtouchDebug>true</MtouchDebug>
@@ -54,6 +55,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />
@@ -62,7 +64,9 @@
     <Reference Include="monotouch" />
     <Reference Include="monotouch" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.iOS.plist"><Link>Info.plist</Link></None>
+    <None Include="Info.iOS.plist">
+      <Link>Info.plist</Link>
+    </None>
     <None Include="Background.png">
     <None Include="Background.png">
       <Link>Background.png</Link>
       <Link>Background.png</Link>
     </None>
     </None>
@@ -71,10 +75,10 @@
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Main.cs" />
     <Compile Include="Game1.cs">
     <Compile Include="Game1.cs">
       <Link>Game1.cs</Link>
       <Link>Game1.cs</Link>
     </Compile>
     </Compile>
+    <Compile Include="Program.cs" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
   <ItemGroup>

+ 30 - 2
RenderTarget2DSample/Program.cs

@@ -1,9 +1,15 @@
-
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 
 
 namespace RenderTarget2DSample
 namespace RenderTarget2DSample
 {
 {
+	#region Entry Point
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -36,6 +42,28 @@ namespace RenderTarget2DSample
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-	}		
+	}	
+#elif IPHONE
+    [Register("AppDelegate")]
+    class Program : UIApplicationDelegate
+    {
+        Game1 game;
+        public override void FinishedLaunching(UIApplication app)
+        {
+            // Fun begins..
+            game = new Game1();
+            game.Run();
+        }
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        static void Main(string[] args)
+        {
+            UIApplication.Main(args, null, "AppDelegate");
+        }
+    }
+#endif
+    #endregion
 }
 }
 
 

+ 2 - 1
RenderTarget2DSample/RenderTarget2DSample.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

BIN
StateObjectWindows/Program.cs


+ 1 - 1
StateObjectWindows/StateObjectWindows.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MAC</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>

+ 1 - 1
StencilsCratersTutorial/Program.cs

@@ -17,7 +17,7 @@ namespace StencilCratersTutorial
         }
         }
     }
     }
 #endif
 #endif
-#if MAC
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>

BIN
TexturedQuad/Game1.cs


BIN
TexturedQuad/Program.cs


+ 2 - 1
TexturedQuad/TexturedQuad.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;MAC</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 4 - 2
TransformedCollisionSample/MonoGame.Samples.TransformedCollision.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
@@ -31,13 +31,14 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchLink>None</MtouchLink>
     <MtouchLink>None</MtouchLink>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhone\Debug</OutputPath>
     <OutputPath>bin\iPhone\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchDebug>true</MtouchDebug>
     <MtouchDebug>true</MtouchDebug>
@@ -52,6 +53,7 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <CodesignKey>iPhone Developer</CodesignKey>
+    <DefineConstants>IPHONE</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

+ 24 - 0
TransformedCollisionSample/Program.cs

@@ -10,13 +10,19 @@
 #region Using Statements
 #region Using Statements
 using System;
 using System;
 
 
+#if MONOMAC
 using MonoMac.Foundation;
 using MonoMac.Foundation;
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.ObjCRuntime;
 using MonoMac.ObjCRuntime;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 #endregion
 #endregion
 
 
 namespace TransformedCollision
 namespace TransformedCollision
 {
 {
+#if MONOMAC
 	static class Program
 	static class Program
 	{
 	{
 		/// <summary>
 		/// <summary>
@@ -47,4 +53,22 @@ namespace TransformedCollision
 			return true;
 			return true;
 		}
 		}
 	}	
 	}	
+#elif IPHONE
+	[Register ("AppDelegate")]
+	class Program : UIApplicationDelegate 
+	{
+        TransformedCollisionGame game;
+		public override void FinishedLaunching (UIApplication app)
+		{
+			// Fun begins..
+			game = new TransformedCollisionGame();
+			game.Run ();
+		}
+
+		static void Main (string [] args)
+		{
+			UIApplication.Main (args,null,"AppDelegate");
+		}
+	}
+#endif
 }
 }

+ 2 - 1
TransformedCollisionSample/TransformedCollisionSample.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG</DefineConstants>
+    <DefineConstants>DEBUG;MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -28,6 +28,7 @@
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
+    <DefineConstants>MONOMAC</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System" />

BIN
UseCustomVertex/Game1.cs


+ 1 - 1
UseCustomVertex/Program.cs

@@ -26,7 +26,7 @@ namespace UseCustomVertexWindows
         }
         }
     }
     }
 #endif
 #endif
-#if MAC
+#if MONOMAC
 
 
 	static class Program
 	static class Program
 	{	
 	{	

+ 3 - 3
UseCustomVertex/UseCustomVertex.MacOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug</OutputPath>
     <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG; MAC</DefineConstants>
+    <DefineConstants>DEBUG; MONOMAC</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <PlatformTarget>x86</PlatformTarget>
     <PlatformTarget>x86</PlatformTarget>
@@ -40,7 +40,8 @@
     <Reference Include="MonoMac" />
     <Reference Include="MonoMac" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="Info.plist"></None>
+    <None Include="Info.plist">
+    </None>
     <None Include="App.config" />
     <None Include="App.config" />
     <None Include="Game.ico" />
     <None Include="Game.ico" />
     <None Include="GameThumbnail.png" />
     <None Include="GameThumbnail.png" />
@@ -66,7 +67,6 @@
     <Folder Include="Content\" />
     <Folder Include="Content\" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Content Include="Content\XNA_pow2.jpg" />
     <Content Include="Content\Glass2.png" />
     <Content Include="Content\Glass2.png" />
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 1
VideoPlayer/MonoGame.Samples.VideoPlayer.iOS.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG;IOS</DefineConstants>
+    <DefineConstants>DEBUG;IPHONE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>

+ 27 - 0
VideoPlayer/main.cs

@@ -1,8 +1,14 @@
+#if MONOMAC
 using MonoMac.AppKit;
 using MonoMac.AppKit;
 using MonoMac.Foundation;
 using MonoMac.Foundation;
+#elif IPHONE
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+#endif
 
 
 namespace MonoGame.Samples.VideoPlayer
 namespace MonoGame.Samples.VideoPlayer
 {
 {
+#if MONOMAC
 	class Program
 	class Program
 	{
 	{
 		static void Main (string[] args)
 		static void Main (string[] args)
@@ -36,4 +42,25 @@ namespace MonoGame.Samples.VideoPlayer
 			return true;
 			return true;
 		}
 		}
 	}	
 	}	
+#elif IPHONE
+	[Register("AppDelegate")]
+	class Program : UIApplicationDelegate
+	{
+		private Game1 game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			game = new Game1 ();
+			game.Run ();
+		}
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		static void Main (string[] args)
+		{
+			UIApplication.Main (args, null, "AppDelegate");
+		}
+	}
+#endif
 }
 }