Browse Source

Ported Marblets SK to Andoid. Once touches are working properly it should be playable.

Dominique Louis 14 years ago
parent
commit
8c5758f170

+ 26 - 0
StarterKits/Android/Marblets/Activity1.cs

@@ -0,0 +1,26 @@
+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+
+namespace Marblets
+{
+	[Activity (Label = "Marblets", MainLauncher = true)]
+	public class Activity1 : Activity
+	{
+		protected override void OnCreate (Bundle bundle)
+		{
+			base.OnCreate (bundle);
+
+			MarbletsGame g = new MarbletsGame(this);
+            SetContentView(g.Window);
+            g.Run();
+		}
+	}
+}
+
+

+ 188 - 0
StarterKits/Android/Marblets/Marblets.csproj

@@ -0,0 +1,188 @@
+<?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>{88DEE869-EC4A-484E-AEB5-7F844C2054AB}</ProjectGuid>
+    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <RootNamespace>Marblets</RootNamespace>
+    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+    <AndroidResgenClass>Resource</AndroidResgenClass>
+    <AndroidApplication>True</AndroidApplication>
+    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+    <AssemblyName>Marblets</AssemblyName>
+    <TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;ANDROID</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <AndroidLinkMode>None</AndroidLinkMode>
+  </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>
+    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="Mono.Android" />
+    <Reference Include="OpenTK" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Activity1.cs" />
+    <Compile Include="Resources\Resource.designer.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\iOS\Marblets\Font.cs">
+      <Link>Font.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\GameBoard.cs">
+      <Link>GameBoard.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\GamePadHelper.cs">
+      <Link>GamePadHelper.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\GamePads.cs">
+      <Link>GamePads.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\GameScreen.cs">
+      <Link>GameScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\InputHelper.cs">
+      <Link>InputHelper.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\Marble.cs">
+      <Link>Marble.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\MarbletsGame.cs">
+      <Link>MarbletsGame.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\RelativeSprite.cs">
+      <Link>RelativeSprite.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\Screen.cs">
+      <Link>Screen.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\Settings.cs">
+      <Link>Settings.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\Sound.cs">
+      <Link>Sound.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\TitleScreen.cs">
+      <Link>TitleScreen.cs</Link>
+    </Compile>
+    <Compile Include="..\iOS\Marblets\TutorialGameBoard.cs">
+      <Link>TutorialGameBoard.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\AboutResources.txt" />
+    <None Include="Assets\AboutAssets.txt" />
+    <None Include="..\iOS\Marblets\Default.png">
+      <Link>Default.png</Link>
+    </None>
+    <None Include="..\iOS\Marblets\GameThumbnail.png">
+      <Link>GameThumbnail.png</Link>
+    </None>
+    <None Include="..\iOS\Marblets\marblets.ico">
+      <Link>marblets.ico</Link>
+    </None>
+    <None Include="..\iOS\Marblets\settings.xml">
+      <Link>settings.xml</Link>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidResource Include="Resources\layout\Main.axml" />
+    <AndroidResource Include="Resources\values\Strings.xml" />
+    <AndroidResource Include="Resources\drawable\Icon.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Android.csproj">
+      <Project>{BA9476CF-99BA-4D03-92F2-73D2C5E58883}</Project>
+      <Name>MonoGame.Framework.Android</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\clear_4.wav">
+      <Link>Assets\Content\Audio\Wav\clear_4.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\clear_bonus.wav">
+      <Link>Assets\Content\Audio\Wav\clear_bonus.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\clear_illegal.wav">
+      <Link>Assets\Content\Audio\Wav\clear_illegal.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\drop1.wav">
+      <Link>Assets\Content\Audio\Wav\drop1.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\drop2.wav">
+      <Link>Assets\Content\Audio\Wav\drop2.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\IntroMus.wav">
+      <Link>Assets\Content\Audio\Wav\IntroMus.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\MusLoop_Temp1.wav">
+      <Link>Assets\Content\Audio\Wav\MusLoop_Temp1.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\navigate_1.wav">
+      <Link>Assets\Content\Audio\Wav\navigate_1.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\start_1.wav">
+      <Link>Assets\Content\Audio\Wav\start_1.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Audio\Wav\start_3.wav">
+      <Link>Assets\Content\Audio\Wav\start_3.wav</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\game_over_frame.png">
+      <Link>Assets\Content\Textures\game_over_frame.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble.png">
+      <Link>Assets\Content\Textures\marble.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble_burst.png">
+      <Link>Assets\Content\Textures\marble_burst.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble_cursor.png">
+      <Link>Assets\Content\Textures\marble_cursor.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble_glow_1ring.png">
+      <Link>Assets\Content\Textures\marble_glow_1ring.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble_glow_2rings.png">
+      <Link>Assets\Content\Textures\marble_glow_2rings.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\marble_tex1.png">
+      <Link>Assets\Content\Textures\marble_tex1.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\numbers_large.png">
+      <Link>Assets\Content\Textures\numbers_large.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\numbers_small.png">
+      <Link>Assets\Content\Textures\numbers_small.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\play_frame.png">
+      <Link>Assets\Content\Textures\play_frame.png</Link>
+    </AndroidAsset>
+    <AndroidAsset Include="..\iOS\Marblets\Content\Textures\title_frame.png">
+      <Link>Assets\Content\Textures\title_frame.png</Link>
+    </AndroidAsset>
+  </ItemGroup>
+</Project>

+ 27 - 0
StarterKits/Android/Marblets/Properties/AssemblyInfo.cs

@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes. 
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Marblets")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Savage Software Solutions Ltd.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly, 
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

+ 59 - 0
StarterKits/Android/Marblets/Resources/Resource.designer.cs

@@ -0,0 +1,59 @@
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 4.0.30319.1
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------
+
+namespace Marblets
+{
+	
+	
+	public partial class Resource
+	{
+		
+		public partial class Attribute
+		{
+			
+			private Attribute()
+			{
+			}
+		}
+		
+		public partial class Drawable
+		{
+			
+			// aapt resource value: 0x7f020000
+			public const int Icon = 2130837504;
+			
+			private Drawable()
+			{
+			}
+		}
+		
+		public partial class Layout
+		{
+			
+			// aapt resource value: 0x7f030000
+			public const int Main = 2130903040;
+			
+			private Layout()
+			{
+			}
+		}
+		
+		public partial class String
+		{
+			
+			// aapt resource value: 0x7f040000
+			public const int app_name = 2130968576;
+			
+			private String()
+			{
+			}
+		}
+	}
+}

BIN
StarterKits/Android/Marblets/Resources/drawable/Icon.png


+ 8 - 0
StarterKits/Android/Marblets/Resources/layout/Main.axml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+</LinearLayout>
+

+ 4 - 0
StarterKits/Android/Marblets/Resources/values/Strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+	<string name="app_name">Marblets</string>
+</resources>