Commits

André Schnabel committed d74af6f Draft

Made some ifdefs to make it work on the mac again

Comments (0)

Files changed (5)

XNAPlayground/XNAPlayground/Map/GameMap.cs

 		public static void LoadMapInfos() {
 			MapInfo[] infos = MapInfos;
 
+#if IOS
 			var store = IsolatedStorageFile.GetUserStoreForApplication();
+#endif
 
 			for(int i = 0; i < infos.Length; i++) {
 				infos[i] = new MapInfo(false, 0);
 			}
 
 			int counter = 0;
+#if IOS
 			if(store.FileExists(SaveFilename)) {
 				var strm = new IsolatedStorageFileStream(SaveFilename, FileMode.Open, store);
 				var reader = new StreamReader(strm);
+				string fstr = reader.ReadToEnd();
+#else
+			if(File.Exists(SaveFilename)) {
+				string fstr = File.ReadAllText(SaveFilename);
+#endif
 
-				string fstr = reader.ReadToEnd(); //File.ReadAllText(SaveFilename);
 				string[] lines = fstr.Split('\n');
 				foreach(string line in lines) {
 					if(counter >= infos.Length) break;
 					counter++;
 				}
 
+#if IOS
 				reader.Dispose();
 				strm.Dispose();
 			}
 
 			store.Dispose();
+#else
+			}
+#endif
+
 		}
 
 		public static void SaveMapInfos() {
-
+#if IOS
 			var store = IsolatedStorageFile.GetUserStoreForApplication();
-
 			var strm = new IsolatedStorageFileStream(SaveFilename, FileMode.Create, store);
 			var writer = new StreamWriter(strm);
+#endif
 
 			var mapInfoStr = "";
 			foreach(MapInfo info in MapInfos) {
 				mapInfoStr += info.TicksNeeded;
 				mapInfoStr += "\n";
 			}
-
-			//File.WriteAllText(SaveFilename, mapInfoStr);
+#if IOS
 			writer.Write(mapInfoStr);
-
 			writer.Dispose();
 			strm.Dispose();
+			store.Dispose();
+#else
+			File.WriteAllText(SaveFilename, mapInfoStr);
+#endif
 
-			store.Dispose();
 		}
 	}
 }

XNAPlaygroundMac/XNAPlaygroundMac.csproj

   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
   <ItemGroup>
-    <ProjectReference Include="..\..\..\..\Downloads\MonoGame-2.5.0.0\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
-      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
-      <Name>MonoGame.Framework.MacOS</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
     <Folder Include="XNAPlayground\" />
     <Folder Include="Content\" />
   </ItemGroup>
     </Content>
     <Content Include="Content\sprfont.xnb" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\Downloads\mono-MonoGame-56afa04\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+      <Name>MonoGame.Framework.MacOS</Name>
+    </ProjectReference>
+  </ItemGroup>
 </Project>

XNAPlaygroundMac/XNAPlaygroundMac.sln

 # Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNAPlaygroundMac", "XNAPlaygroundMac.csproj", "{98CB7AE2-ADCA-4158-A425-9C388C991808}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\..\..\Downloads\MonoGame-2.5.0.0\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\..\..\Downloads\mono-MonoGame-56afa04\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\..\..\Downloads\MonoGame-2.5.0.0\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\..\..\Downloads\mono-MonoGame-56afa04\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

XNAPlaygroundTouch/Info.plist

 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+	<key>CFBundleDisplayName</key>
+	<string>TinyWorldLD23</string>
+	<key>CFBundleIconFiles</key>
+	<array>
+		<string>Icons/TWLogo57.png</string>
+		<string>Icons/TWLogo114.png</string>
+		<string>Icons/TWLogo72.png</string>
+		<string>Icons/TWLogo144.png</string>
+	</array>
+	<key>CFBundleIdentifier</key>
+	<string>com.andreschnabel.tinyworld</string>
+	<key>CFBundleVersion</key>
+	<string>0.1</string>
 	<key>MinimumOSVersion</key>
-	<string>3.2</string>
+	<string>5.0</string>
 	<key>UIDeviceFamily</key>
 	<array>
 		<integer>1</integer>

XNAPlaygroundTouch/XNAPlaygroundTouch.csproj

     <MtouchProfiling>true</MtouchProfiling>
     <MtouchLink>None</MtouchLink>
     <MtouchI18n />
+    <MtouchArch>ARMv7</MtouchArch>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
     <DebugType>none</DebugType>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Developer</CodesignKey>
     <DefineConstants>IOS</DefineConstants>
+    <MtouchUseLlvm>true</MtouchUseLlvm>
+    <MtouchArch>ARMv6_ARMv7</MtouchArch>
+    <MtouchUseSGen>true</MtouchUseSGen>
+    <IpaPackageName />
+    <CrashReportingApiKey />
+    <MtouchLink>Full</MtouchLink>
+    <MtouchI18n />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
     <DebugType>none</DebugType>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <CodesignKey>iPhone Distribution</CodesignKey>
+    <MtouchUseLlvm>true</MtouchUseLlvm>
+    <MtouchArch>ARMv7</MtouchArch>
+    <MtouchUseSGen>true</MtouchUseSGen>
+    <IpaPackageName />
+    <CrashReportingApiKey />
+    <MtouchLink>Full</MtouchLink>
+    <MtouchI18n />
+    <DefineConstants>IOS</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
   <ItemGroup>
     <Folder Include="XNAPlayground\" />
     <Folder Include="Content\" />
+    <Folder Include="Icons\" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="..\XNAPlayground\XNAPlaygroundContent\sheetimg.png">
     <Content Include="..\XNAPlayground\XNAPlaygroundContent\swrrll.wav">
       <Link>Content\swrrll.wav</Link>
     </Content>
+    <Content Include="Icons\TWLogo114.png" />
+    <Content Include="Icons\TWLogo144.png" />
+    <Content Include="Icons\TWLogo512.png" />
+    <Content Include="Icons\TWLogo57.png" />
+    <Content Include="Icons\TWLogo72.png" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\Downloads\mono-MonoGame-56afa04\MonoGame.Framework\MonoGame.Framework.iOS.csproj">