Commits

André Schnabel committed ace82ce Draft

Adapted for WP7 submission

Comments (0)

Files changed (6)

XNAPlayground/XNAPlayground/GameThumbnail.png

Old
Old image
New
New image

XNAPlayground/XNAPlayground/MainGame.cs

 			TransformMatrix = Matrix.Identity;
 #if IOS
 			int actualW, actualH;
+
 			actualW = graphics.GraphicsDevice.DisplayMode.Width;
 			actualH = graphics.GraphicsDevice.DisplayMode.Height;
+
+			//actualW = graphics.GraphicsDevice.Viewport.Width;
+			//actualH = graphics.GraphicsDevice.Viewport.Height;
+
 			TransformMatrix *= Matrix.CreateScale(actualH / 800.0f, actualW / 480.0f, 1.0f);
 			Globals.ActualScrW = actualH;
 			Globals.ActualScrH = actualW;

XNAPlayground/XNAPlayground/Properties/AssemblyInfo.cs

 using System.Reflection;
+using System.Resources;
 using System.Runtime.InteropServices;
 
 // Allgemeine Informationen über eine Assembly werden über den folgenden 
 // Satz von Attributen kontrolliert. Ändern Sie diese Attributwerte, um die mit einer Assembly
 // verbundenen Informationen zu ändern.
-[assembly: AssemblyTitle("XNAPlayground")]
-[assembly: AssemblyProduct("XNAPlayground")]
+[assembly: AssemblyTitle("TinyWorld")]
+[assembly: AssemblyProduct("TinyWorld")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyCompany("")]
-[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyCopyright("Copyright ©  2012 Andre Schnabel")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
 //      Revision
 //
 [assembly: AssemblyVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguage("en-US")]

XNAPlayground/XNAPlayground/Utilities/SpriteCache.cs

 
 namespace XNAPlayground.Utilities {
 	internal class SpriteCache : IDisposable {
+		#if !IOS
 		private VertexBuffer vxBuf;
+#endif
 		private SpriteBatch sb;
 		private bool dirty = true;
 
 		private readonly List<PositionedSprite> posSprites = new List<PositionedSprite>();
 		private int primitiveCount;
 
+#if !IOS
 		public struct VxPosColTx : IVertexType {
 			public Vector2 Pos;
 			public Vector2 TxCrd;
 				get { return new VertexDeclaration(new[] {new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0), new VertexElement(16, VertexElementFormat.Vector3, VertexElementUsage.Color, 0)}); }
 			}
 		}
+#endif
 
 		public SpriteCache(GraphicsDevice graphicsDevice, bool compatMode) {
 			if(compatMode) {
 
 			const int maxVxCount = 2048;
 			//var vxDecl = new VertexDeclaration(new[] {new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0), new VertexElement(16, VertexElementFormat.Vector3, VertexElementUsage.Color, 0)});
+#if !IOS
 			vxBuf = new VertexBuffer(graphicsDevice, typeof(VxPosColTx), maxVxCount, BufferUsage.None);
+#endif
 		}
 
 		public void Add(Rectangle srcRect, float x, float y) {
 				return;
 			}
 
+#if !IOS
 			if(dirty) {
 				var vertices = new  VxPosColTx[posSprites.Count*6];
 				primitiveCount = posSprites.Count*2;
 
 			vxBuf.GraphicsDevice.SetVertexBuffer(vxBuf);
 			vxBuf.GraphicsDevice.DrawPrimitives(PrimitiveType.TriangleList, 0, primitiveCount);
+#endif
 		}
 
+#if !IOS
 		private static void GenVx(float u, float v, float x, float y, VxPosColTx[] vertices, ref int curIndex) {
 			vertices[curIndex++] = new VxPosColTx(new Vector2(x, y), new Vector2(u, v), new Vector3(1.0f, 1.0f, 1.0f));
 		}
+#endif
 
 		public void Clear() {
 			posSprites.Clear();
 
 		#region Implementation of IDisposable
 		public void Dispose() {
+#if !IOS
 			Utils.SafeDispose(ref vxBuf);
+#endif
 		}
 		#endregion
 	}

XNAPlayground/XNAPlayground/Windows Phone Kopie von XNAPlayground.csproj

     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>XNAPlayground</RootNamespace>
-    <AssemblyName>XNAPlayground</AssemblyName>
+    <AssemblyName>TinyWorld</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <TargetFrameworkProfile>Client</TargetFrameworkProfile>
     <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
     <XnaCrossPlatformGroupID>00b7f4ec-1116-4832-8637-2e18844e98ff</XnaCrossPlatformGroupID>
     <XnaOutputType>Game</XnaOutputType>
     <ApplicationIcon>Game.ico</ApplicationIcon>
-    <Thumbnail>GameThumbnail.png</Thumbnail>
+    <Thumbnail>PhoneGameThumb.png</Thumbnail>
     <PublishUrl>publish\</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Disk</InstallFrom>
     <SilverlightManifestTemplate Condition="$(XnaOutputType)=='Game'">Properties\AppManifest.xml</SilverlightManifestTemplate>
     <XnaWindowsPhoneManifestTemplate Condition="$(XnaOutputType)=='Game'">Properties\WMAppManifest.xml</XnaWindowsPhoneManifestTemplate>
     <TileImage Condition="$(XnaOutputType)=='Game'">Background.png</TileImage>
-    <TileTitle Condition="$(XnaOutputType)=='Game'">$(AssemblyName)</TileTitle>
+    <TileTitle Condition="$(XnaOutputType)=='Game'">TinyWorld</TileTitle>
     <SupportedCultures />
+    <GameStartupType>XNAPlayground.MainGame</GameStartupType>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Windows Phone' ">
     <OutputPath>bin\Windows Phone\Release</OutputPath>
     </None>
     <None Include="Properties\WMAppManifest.xml">
       <XnaPlatformSpecific>true</XnaPlatformSpecific>
+      <SubType>Designer</SubType>
     </None>
   </ItemGroup>
   <ItemGroup>

XNAPlaygroundTouch/XNAPlaygroundTouch.csproj

     <Content Include="Icons\TWLogo512.png" />
     <Content Include="Icons\TWLogo57.png" />
     <Content Include="Icons\TWLogo72.png" />
+    <Content Include="..\XNAPlayground\XNAPlaygroundContent\sprfont.spritefont">
+      <Link>Content\sprfont.spritefont</Link>
+    </Content>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Downloads\mono-MonoGame-56afa04\MonoGame.Framework\MonoGame.Framework.iOS.csproj">