Added support for FNA
This commit is contained in:
parent
62241e8f94
commit
f38980e4e6
@ -1,4 +1,4 @@
|
|||||||
// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439
|
// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439
|
||||||
// WindowsPhoneSpeedyBlupi.Def
|
// WindowsPhoneSpeedyBlupi.Def
|
||||||
|
|
||||||
using static WindowsPhoneSpeedyBlupi.EnvClasses;
|
using static WindowsPhoneSpeedyBlupi.EnvClasses;
|
||||||
|
2
Game1.cs
2
Game1.cs
@ -112,7 +112,9 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
if (Env.IMPL.isNotKNI() && !TouchPanel.GetCapabilities().IsConnected)
|
if (Env.IMPL.isNotKNI() && !TouchPanel.GetCapabilities().IsConnected)
|
||||||
{
|
{
|
||||||
this.IsMouseVisible = true;
|
this.IsMouseVisible = true;
|
||||||
|
#if !FNA
|
||||||
Mouse.SetCursor(MouseCursor.Arrow);
|
Mouse.SetCursor(MouseCursor.Arrow);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
graphics = new GraphicsDeviceManager(this);
|
graphics = new GraphicsDeviceManager(this);
|
||||||
|
@ -186,7 +186,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the point of the cente of the pad on the screen.
|
/// Returns the point of the center of the pad on the screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private TinyPoint PadCenter
|
private TinyPoint PadCenter
|
||||||
{
|
{
|
||||||
|
18
Worlds.cs
18
Worlds.cs
@ -66,7 +66,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return text.Split("\n");
|
return text.Split('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetWorldFilename(int gamer, int rank)
|
private static string GetWorldFilename(int gamer, int rank)
|
||||||
@ -79,7 +79,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
Debug.WriteLine("ReadGameData");
|
Debug.WriteLine("ReadGameData");
|
||||||
|
|
||||||
#if !(KNI && WEB)
|
#if !(KNI && WEB)
|
||||||
IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication();
|
IsolatedStorageFile userStoreForApplication = getUserStoreForApplication();
|
||||||
if (userStoreForApplication.FileExists(GameDataFilename))
|
if (userStoreForApplication.FileExists(GameDataFilename))
|
||||||
{
|
{
|
||||||
IsolatedStorageFileStream isolatedStorageFileStream = null;
|
IsolatedStorageFileStream isolatedStorageFileStream = null;
|
||||||
@ -120,7 +120,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
|
|
||||||
#if !(KNI && WEB)
|
#if !(KNI && WEB)
|
||||||
|
|
||||||
IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication();
|
IsolatedStorageFile userStoreForApplication = getUserStoreForApplication();
|
||||||
IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Create);
|
IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Create);
|
||||||
if (isolatedStorageFileStream != null)
|
if (isolatedStorageFileStream != null)
|
||||||
{
|
{
|
||||||
@ -138,7 +138,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
|
|
||||||
#if !KNI
|
#if !KNI
|
||||||
|
|
||||||
IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication();
|
IsolatedStorageFile userStoreForApplication = getUserStoreForApplication();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userStoreForApplication.DeleteFile(CurrentGameFilename);
|
userStoreForApplication.DeleteFile(CurrentGameFilename);
|
||||||
@ -157,7 +157,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
{
|
{
|
||||||
Debug.WriteLine("ReadCurrentGame");
|
Debug.WriteLine("ReadCurrentGame");
|
||||||
#if !(KNI && WEB)
|
#if !(KNI && WEB)
|
||||||
IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication();
|
IsolatedStorageFile userStoreForApplication = getUserStoreForApplication();
|
||||||
if (userStoreForApplication.FileExists(CurrentGameFilename))
|
if (userStoreForApplication.FileExists(CurrentGameFilename))
|
||||||
{
|
{
|
||||||
IsolatedStorageFileStream isolatedStorageFileStream = null;
|
IsolatedStorageFileStream isolatedStorageFileStream = null;
|
||||||
@ -188,7 +188,7 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
{
|
{
|
||||||
Debug.WriteLine("WriteCurrentGame");
|
Debug.WriteLine("WriteCurrentGame");
|
||||||
#if !(KNI && WEB)
|
#if !(KNI && WEB)
|
||||||
IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication();
|
IsolatedStorageFile userStoreForApplication = getUserStoreForApplication();
|
||||||
IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(CurrentGameFilename, FileMode.Create);
|
IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(CurrentGameFilename, FileMode.Create);
|
||||||
if (isolatedStorageFileStream != null)
|
if (isolatedStorageFileStream != null)
|
||||||
{
|
{
|
||||||
@ -200,6 +200,12 @@ namespace WindowsPhoneSpeedyBlupi
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IsolatedStorageFile getUserStoreForApplication() {
|
||||||
|
if(Env.IMPL.isFNA()) {
|
||||||
|
return IsolatedStorageFile.GetUserStoreForAssembly();
|
||||||
|
}
|
||||||
|
return IsolatedStorageFile.GetUserStoreForApplication();
|
||||||
|
}
|
||||||
public static void GetIntArrayField(string[] lines, string section, int rank, string name, int[] array)
|
public static void GetIntArrayField(string[] lines, string section, int rank, string name, int[] array)
|
||||||
{
|
{
|
||||||
foreach (string text in lines)
|
foreach (string text in lines)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user