Skip to content

Commit

Permalink
Fixes PSM Samples to point to CompiledContent folder. Added Flocking …
Browse files Browse the repository at this point in the history
…demo to PSM solution. Fix Draw2D to use logo.xnb
  • Loading branch information
Dominique Louis authored and Dominique Louis committed Apr 21, 2013
1 parent 61f6e7b commit 8afe2e2
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Aiming/Aiming.PSMobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
<Folder Include="Content\" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\cat.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Textures\cat.xnb">
<Link>Content\cat.xnb</Link>
</Content>
<Content Include="Content\spotlight.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Textures\spotlight.xnb">
<Link>Content\spotlight.xnb</Link>
</Content>
</ItemGroup>
<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions ChaseAndEvade/ChaseAndEvade.PSMobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
<Folder Include="Content\" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\cat.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Textures\cat.xnb">
<Link>Content\cat.xnb</Link>
</Content>
<Content Include="Content\mouse.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Textures\mouse.xnb">
<Link>Content\mouse.xnb</Link>
</Content>
<Content Include="Content\tank.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Textures\tank.xnb">
<Link>Content\tank.xnb</Link>
</Content>
<Content Include="Content\Arial.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="..\CompiledContent\Android\Content\Fonts\Arial.xnb">
<Link>Content\Arial.xnb</Link>
</Content>
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions Draw2D/Draw2D.PSMobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<Folder Include="Content\" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\monogameicon48x48.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\CompiledContent\Android\Content\Fonts\Font.xnb">
<Link>Content\Font.xnb</Link>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion Draw2D/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected override void LoadContent ()
spriteBatch = new SpriteBatch (GraphicsDevice);

// TODO: use this.Content to load your game content here
texture = Content.Load<Texture2D> ("monogameicon48x48");
texture = Content.Load<Texture2D> ("logo");
font = Content.Load<SpriteFont> ("Font");

fps = new FPSCounterComponent (this,spriteBatch,font);
Expand Down
90 changes: 90 additions & 0 deletions Flocking/Flocking.PSMobile.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}</ProjectGuid>
<ProjectTypeGuids>{69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>Flocking.PSMobile</RootNamespace>
<AssemblyName>Flocking.PSMobile</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;PSM</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Sce.PlayStation.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Flock.cs" />
<Compile Include="FlockingSample.cs" />
<Compile Include="InputState.cs" />
<Compile Include="Main.cs" />
<Compile Include="Animals\Animal.cs" />
<Compile Include="Animals\Bird.cs" />
<Compile Include="Animals\Cat.cs" />
<Compile Include="Behaviors\AlignBehavior.cs" />
<Compile Include="Behaviors\Behavior.cs" />
<Compile Include="Behaviors\Behaviors.cs" />
<Compile Include="Behaviors\CohesionBehavior.cs" />
<Compile Include="Behaviors\FleeBehavior.cs" />
<Compile Include="Behaviors\SeparationBehavior.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PsmMetadata Include="app.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Sce\Sce.Psm.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\..\MonoGame.Framework\MonoGame.Framework.PSMobile.csproj">
<Project>{EA26E76F-FDFE-4A8C-B5A3-C3B5761E28F9}</Project>
<Name>MonoGame.Framework.PSMobile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Content\" />
</ItemGroup>
<ItemGroup>
<Content Include="..\CompiledContent\Android\Content\Textures\cat.xnb">
<Link>Content\cat.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Textures\logo.xnb">
<Link>Content\logo.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Textures\mouse.xnb">
<Link>Content\mouse.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Fonts\HUDFont.xnb">
<Link>Content\HUDFont.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Textures\xboxControllerButtonB.xnb">
<Link>Content\xboxControllerButtonB.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Textures\xboxControllerButtonX.xnb">
<Link>Content\xboxControllerButtonX.xnb</Link>
</Content>
<Content Include="..\CompiledContent\Android\Content\Textures\xboxControllerButtonY.xnb">
<Link>Content\xboxControllerButtonY.xnb</Link>
</Content>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Flocking/FlockingSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ protected override void Draw(GameTime gameTime)
DrawBar(barSeparationDistance, flockParams.SeparationDistance / 100f,
"Separation Distance:", gameTime, selectionNum == 1);

#if WINDOWS_PHONE || IOS
#if WINDOWS_PHONE || IOS || PSM
DrawButton(buttonResetDistance, "Reset Distance");
DrawButton(buttonResetFlock, "Reset Flock");
DrawButton(buttonToggleCat, "Add/Remove Cat");
Expand Down
58 changes: 57 additions & 1 deletion Flocking/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,51 @@
using System.Collections.Generic;
using System.Linq;

#if MONOMAC
using MonoMac.AppKit;
using MonoMac.Foundation;
#elif IPHONE
using MonoTouch.Foundation;
using MonoTouch.UIKit;
#endif

namespace Flocking
{
#if MONOMAC
class Program
{
static void Main (string[] args)
{
NSApplication.Init ();

using (var p = new NSAutoreleasePool ()) {
NSApplication.SharedApplication.Delegate = new AppDelegate ();

// Set our Application Icon
NSImage appIcon = NSImage.ImageNamed ("monogameicon.png");
NSApplication.SharedApplication.ApplicationIconImage = appIcon;

NSApplication.Main (args);
}
}
}

class AppDelegate : NSApplicationDelegate
{
private FlockingSample game;

public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
{
game = new FlockingSample();
game.Run();
}

public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
{
return true;
}
}
#elif IPHONE
[Register("AppDelegate")]
class Program : UIApplicationDelegate
{
Expand All @@ -27,7 +67,23 @@ static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
}
#else
static class Program
{
private static FlockingSample game;

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
game = new FlockingSample();
game.Run();
}
}
#endif
}


10 changes: 10 additions & 0 deletions Flocking/app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<application project_name="*" version="1.00" default_locale="en-US">
<runtime_config>
<memory managed_heap_size="32768" resource_heap_size="65536" />
</runtime_config>
<feature_list>
<feature value="GamePad" />
<feature value="Touch" />
</feature_list>
</application>
6 changes: 6 additions & 0 deletions MonoGame.Samples.PSMobile.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaseAndEvade.PSMobile", "C
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Draw2D.PSMobile", "Draw2D\Draw2D.PSMobile.csproj", "{D46978DF-F83C-45A1-80CA-A9B578607B77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flocking.PSMobile", "Flocking\Flocking.PSMobile.csproj", "{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -37,6 +39,10 @@ Global
{EA26E76F-FDFE-4A8C-B5A3-C3B5761E28F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA26E76F-FDFE-4A8C-B5A3-C3B5761E28F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA26E76F-FDFE-4A8C-B5A3-C3B5761E28F9}.Release|Any CPU.Build.0 = Release|Any CPU
{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0B32BB5-1E28-453B-B4D6-BEC0E159DFB1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Aiming\Aiming.PSMobile.csproj
Expand Down

0 comments on commit 8afe2e2

Please sign in to comment.