Permalink
Browse files

Merge pull request #15 from urkle/Linux-SampleFixes

A bunch of linux fixes to the samples - THANKS
  • Loading branch information...
2 parents d91a664 + 7c144e2 commit 354804365d5d36fb76fcf45698218c0f5b5d5d24 @CartBlanche CartBlanche committed May 18, 2012
@@ -1,12 +1,14 @@
using System;
+#if MONOMAC
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+#endif
namespace Asteroid_Belt_Assault
{
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
static class Program
{
/// <summary>
@@ -20,7 +22,7 @@ static void Main(string[] args)
}
}
}
-#else
+#elif MONOMAC
static class Program
{
/// <summary>
@@ -51,6 +53,8 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
return true;
}
}
+#else
+#error Unknown platform
#endif
}
@@ -1,12 +1,14 @@
using System;
+#if MONOMAC
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+#endif
namespace Flood_Control
{
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
static class Program
{
/// <summary>
@@ -20,7 +22,7 @@ static void Main(string[] args)
}
}
}
-#else
+#elif MONOMAC
static class Program
{
/// <summary>
@@ -51,6 +53,8 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
return true;
}
}
+#else
+#error Unknown platform
#endif
}
@@ -45,6 +45,10 @@
<Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
<Name>MonoGame.Framework.Linux</Name>
</ProjectReference>
+ <ProjectReference Include="TileEngine\Tile Engine.Linux.csproj">
+ <Project>{521972FD-1A9B-4CFD-A435-EB2224985131}</Project>
+ <Name>Tile Engine.Linux</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
@@ -1,12 +1,14 @@
using System;
+#if MONOMAC
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+#endif
namespace Gemstone_Hunter
{
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
static class Program
{
/// <summary>
@@ -20,7 +22,7 @@ static void Main(string[] args)
}
}
}
-#else
+#elif MONOMAC
static class Program
{
/// <summary>
@@ -50,7 +52,9 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
{
return true;
}
- }
+ }
+#else
+#error Unknown platform
#endif
}
@@ -35,16 +35,16 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
- <Compile Include="..\Camera.cs">
+ <Compile Include="Camera.cs">
<Link>Camera.cs</Link>
</Compile>
- <Compile Include="..\MapSquare.cs">
+ <Compile Include="MapSquare.cs">
<Link>MapSquare.cs</Link>
</Compile>
- <Compile Include="..\MyClass.cs">
+ <Compile Include="MyClass.cs">
<Link>MyClass.cs</Link>
</Compile>
- <Compile Include="..\TileMap.cs">
+ <Compile Include="TileMap.cs">
<Link>TileMap.cs</Link>
</Compile>
</ItemGroup>
@@ -1,12 +1,14 @@
using System;
+#if MONOMAC
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+#endif
namespace Robot_Rampage
{
-#if WINDOWS || XBOX
+#if WINDOWS || XBOX || LINUX
static class Program
{
/// <summary>
@@ -20,7 +22,7 @@ static void Main(string[] args)
}
}
}
-#else
+#elif MONOMAC
static class Program
{
/// <summary>
@@ -52,6 +54,8 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
return true;
}
}
+#else
+#error Unknown platform
#endif
}
@@ -446,7 +446,7 @@ private void UpdateAimAccordingToShotStrength()
var aimAnimation = animations["Aim"];
int frameToDisplay =
Convert.ToInt32(aimAnimation.FrameCount * ShotStrength);
- aimAnimation.FrameIndex = frameToDisplay;
+ aimAnimation.FrameIndex = Math.Min(aimAnimation.FrameCount, frameToDisplay);
}
/// <summary>
Oops, something went wrong.

0 comments on commit 3548043

Please sign in to comment.