Browse Source

[WIP] Refactor 4: Commit for windows store version & fix bugs in WP version

1. Windows store version (PC) is ready.
2. Use MRU list to provide full access. Now any folder can be used to hold the game resource.
3. Optimize the configuration page.
louyihua 8 years ago
parent
commit
891255b290
61 changed files with 3245 additions and 366 deletions
  1. 1 0
      .gitignore
  2. 1 1
      util.c
  3. 15 26
      winrt/SDLPal.Common/WinRTIO.cpp
  4. 24 43
      winrt/SDLPal.Common/WinRTUtil.cpp
  5. 100 0
      winrt/SDLPal.Windows.sln
  6. 7 0
      winrt/SDLPal.Windows/App.xaml
  7. 125 0
      winrt/SDLPal.Windows/App.xaml.cpp
  8. 33 0
      winrt/SDLPal.Windows/App.xaml.h
  9. BIN
      winrt/SDLPal.Windows/Assets/Logo.scale-100.png
  10. BIN
      winrt/SDLPal.Windows/Assets/Logo.scale-140.png
  11. BIN
      winrt/SDLPal.Windows/Assets/Logo.scale-180.png
  12. BIN
      winrt/SDLPal.Windows/Assets/Logo.scale-80.png
  13. BIN
      winrt/SDLPal.Windows/Assets/SmallLogo.scale-100.png
  14. BIN
      winrt/SDLPal.Windows/Assets/SmallLogo.scale-140.png
  15. BIN
      winrt/SDLPal.Windows/Assets/SmallLogo.scale-180.png
  16. BIN
      winrt/SDLPal.Windows/Assets/SmallLogo.scale-80.png
  17. BIN
      winrt/SDLPal.Windows/Assets/SplashScreen.scale-100.png
  18. BIN
      winrt/SDLPal.Windows/Assets/SplashScreen.scale-140.png
  19. BIN
      winrt/SDLPal.Windows/Assets/SplashScreen.scale-180.png
  20. BIN
      winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-100.png
  21. BIN
      winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-140.png
  22. BIN
      winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-180.png
  23. BIN
      winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-80.png
  24. BIN
      winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-100.png
  25. BIN
      winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-140.png
  26. BIN
      winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-180.png
  27. BIN
      winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-80.png
  28. BIN
      winrt/SDLPal.Windows/Assets/StoreLogo.scale-100.png
  29. BIN
      winrt/SDLPal.Windows/Assets/StoreLogo.scale-140.png
  30. BIN
      winrt/SDLPal.Windows/Assets/StoreLogo.scale-180.png
  31. BIN
      winrt/SDLPal.Windows/Assets/WideLogo.scale-100.png
  32. BIN
      winrt/SDLPal.Windows/Assets/WideLogo.scale-140.png
  33. BIN
      winrt/SDLPal.Windows/Assets/WideLogo.scale-180.png
  34. BIN
      winrt/SDLPal.Windows/Assets/WideLogo.scale-80.png
  35. 63 0
      winrt/SDLPal.Windows/MainPage.xaml
  36. 184 0
      winrt/SDLPal.Windows/MainPage.xaml.cpp
  37. 35 0
      winrt/SDLPal.Windows/MainPage.xaml.h
  38. 46 0
      winrt/SDLPal.Windows/Package.appxmanifest
  39. 203 0
      winrt/SDLPal.Windows/SDLPal.Common.vcxproj
  40. 13 0
      winrt/SDLPal.Windows/SDLPal.Common.vcxproj.filters
  41. 401 0
      winrt/SDLPal.Windows/SDLPal.Core.vcxproj
  42. 643 0
      winrt/SDLPal.Windows/SDLPal.Core.vcxproj.filters
  43. 339 0
      winrt/SDLPal.Windows/SDLPal.vcxproj
  44. 136 0
      winrt/SDLPal.Windows/SDLPal.vcxproj.filters
  45. 258 0
      winrt/SDLPal.Windows/Strings/en/Resources.resw
  46. 258 0
      winrt/SDLPal.Windows/Strings/zh-hans/Resources.resw
  47. 258 0
      winrt/SDLPal.Windows/Strings/zh-hant/Resources.resw
  48. 6 0
      winrt/SDLPal.Windows/pch.cpp
  49. 11 0
      winrt/SDLPal.Windows/pch.h
  50. 1 10
      winrt/SDLPal.WindowsPhone.sln
  51. 2 21
      winrt/SDLPal.WindowsPhone/App.xaml.cpp
  52. 1 37
      winrt/SDLPal.WindowsPhone/MainPage.xaml
  53. 17 97
      winrt/SDLPal.WindowsPhone/MainPage.xaml.cpp
  54. 0 8
      winrt/SDLPal.WindowsPhone/MainPage.xaml.h
  55. 1 15
      winrt/SDLPal.WindowsPhone/Package.appxmanifest
  56. 4 4
      winrt/SDLPal.WindowsPhone/SDLPal.Common.vcxproj
  57. 4 4
      winrt/SDLPal.WindowsPhone/SDLPal.Core.vcxproj
  58. 16 16
      winrt/SDLPal.WindowsPhone/SDLPal.vcxproj
  59. 13 28
      winrt/SDLPal.WindowsPhone/Strings/en/Resources.resw
  60. 13 28
      winrt/SDLPal.WindowsPhone/Strings/zh-hans/Resources.resw
  61. 13 28
      winrt/SDLPal.WindowsPhone/Strings/zh-hant/Resources.resw

+ 1 - 0
.gitignore

@@ -22,6 +22,7 @@ bld/
 [Bb]in/
 [Oo]bj/
 Generated Files/
+BundleArtifacts/
 
 # Visual Studio 2015 cache/options directory
 .vs/

+ 1 - 1
util.c

@@ -424,7 +424,7 @@ UTIL_OpenRequiredFileForMode(
    {
 	   extern SDL_Window *gpWindow;
 	   SDL_MessageBoxButtonData buttons[2] = { { 0, 0, "Yes" }, { 0, 1, "No"} };
-	   SDL_MessageBoxData mbd = { SDL_MESSAGEBOX_ERROR, gpWindow, "FATAL ERROR", va("File not found: %s!\nLaunch setting dialog on next start?\n", lpszFileName), 2, buttons, NULL };
+	   SDL_MessageBoxData mbd = { SDL_MESSAGEBOX_ERROR, gpWindow, "FATAL ERROR", va("File open error(%d): %s%s!\nLaunch setting dialog on next start?\n", errno, gConfig.pszGamePath, lpszFileName), 2, buttons, NULL };
 	   int btnid;
 	   if (SDL_ShowMessageBox(&mbd, &btnid) == 0 && btnid == 0)
 	   {

+ 15 - 26
winrt/SDLPal.Common/WinRTIO.cpp

@@ -49,12 +49,23 @@ private:
 	CRITICAL_SECTION& m_cs;
 };
 
+class Event
+{
+public:
+	Event() : _eventHandle(CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS)) {}
+	~Event() { CloseHandle(_eventHandle); }
+
+	operator HANDLE() { return _eventHandle; }
+
+private:
+	HANDLE _eventHandle;
+};
+
 extern "C"
 errno_t WRT_fopen_s(WRT_FILE ** pFile, const char * _Filename, const char * _Mode)
 {
 	if (nullptr == _Filename || nullptr == _Mode || nullptr == pFile) return EINVAL;
 
-	HANDLE eventHandle = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);
 	std::wstring path;
 	Platform::String^ filename;
 	ConvertString(_Filename, path);
@@ -66,36 +77,15 @@ errno_t WRT_fopen_s(WRT_FILE ** pFile, const char * _Filename, const char * _Mod
 	while ((offset = path.find(L'/', offset)) != std::wstring::npos)
 		path[offset++] = L'\\';
 
-	Windows::Storage::StorageFolder^ folder;
+	Windows::Storage::StorageFolder^ folder = nullptr;
+	Event eventHandle;
 	try
 	{
 		folder = AWait(Windows::Storage::StorageFolder::GetFolderFromPathAsync(ref new Platform::String(path.c_str())), eventHandle);
 	}
 	catch (Platform::AccessDeniedException^)
 	{
-		//int index = path.length() - 1;
-		//if (_wcsnicmp(g_basefolder->Path->Begin(), path.c_str(), g_basefolder->Path->Length()) == 0)
-		//	folder = g_basefolder;
-		//else if (_wcsnicmp(g_savefolder->Path->Begin(), path.c_str(), g_savefolder->Path->Length()) == 0)
-		//	folder = g_savefolder;
-		//else
-			return EACCES;
-
-		if (path.length() > folder->Path->Length())
-		{
-			auto folder_length = folder->Path->Length();
-			if (path[folder_length] == L'\\') folder_length++;
-			try
-			{
-				for (auto next = path.find(L'\\', folder_length); next != std::wstring::npos; next = path.find(L'\\', (folder_length = next + 1)))
-					folder = AWait(folder->GetFolderAsync(ref new Platform::String(path.substr(folder_length, next - folder_length).c_str())), eventHandle);
-				folder = AWait(folder->GetFolderAsync(ref new Platform::String(path.substr(folder_length).c_str())), eventHandle);
-			}
-			catch (Platform::Exception^)
-			{
-				return EIO;
-			}
-		}
+		return EACCES;
 	}
 	catch (Platform::Exception^)
 	{
@@ -129,7 +119,6 @@ errno_t WRT_fopen_s(WRT_FILE ** pFile, const char * _Filename, const char * _Mod
 			}
 			ret = new WRT_FILE(AWait(file->OpenAsync(w ? Windows::Storage::FileAccessMode::ReadWrite : Windows::Storage::FileAccessMode::Read), eventHandle), r, w, b);
 		}
-		CloseHandle(eventHandle);
 	}
 	catch (Platform::Exception^)
 	{

+ 24 - 43
winrt/SDLPal.Common/WinRTUtil.cpp

@@ -12,7 +12,6 @@ extern "C" void TerminateOnError(const char *fmt, ...);
 #define PAL_PATH_NAME	"SDLPAL"
 
 static std::string g_savepath, g_basepath, g_configpath, g_screenshotpath;
-static Windows::Storage::StorageFolder ^g_basefolder, ^g_savefolder, ^g_configfolder, ^g_screenshotfolder;
 
 extern HANDLE g_eventHandle;
 
@@ -21,10 +20,13 @@ LPCSTR UTIL_BasePath(VOID)
 {
 	if (g_basepath.empty())
 	{
-		g_basefolder = Windows::Storage::ApplicationData::Current->LocalFolder;
-		auto localfolder = g_basefolder->Path;
-		if (localfolder->End()[-1] != L'\\') localfolder += "\\";
-		ConvertString(localfolder, g_basepath);
+		auto mru_list = Windows::Storage::AccessCache::StorageApplicationPermissions::MostRecentlyUsedList;
+		if (mru_list->Entries->Size > 0)
+		{
+			auto localfolder = mru_list->Entries->First()->Current.Metadata;
+			if (localfolder->End()[-1] != L'\\') localfolder += "\\";
+			ConvertString(localfolder, g_basepath);
+		}
 	}
 	return g_basepath.c_str();
 }
@@ -32,14 +34,7 @@ LPCSTR UTIL_BasePath(VOID)
 extern "C"
 LPCSTR UTIL_SavePath(VOID)
 {
-	if (g_savepath.empty())
-	{
-		g_savefolder = Windows::Storage::ApplicationData::Current->LocalFolder;
-		auto localfolder = g_savefolder->Path;
-		if (localfolder->End()[-1] != L'\\') localfolder += "\\";
-		ConvertString(localfolder, g_savepath);
-	}
-	return g_savepath.c_str();
+	return UTIL_BasePath();
 }
 
 extern "C"
@@ -47,8 +42,7 @@ LPCSTR UTIL_ConfigPath(VOID)
 {
 	if (g_configpath.empty())
 	{
-		g_configfolder = Windows::Storage::ApplicationData::Current->LocalFolder;
-		auto localfolder = g_configfolder->Path;
+		auto localfolder = Windows::Storage::ApplicationData::Current->LocalFolder->Path;
 		if (localfolder->End()[-1] != L'\\') localfolder += "\\";
 		ConvertString(localfolder, g_configpath);
 	}
@@ -58,31 +52,7 @@ LPCSTR UTIL_ConfigPath(VOID)
 extern "C"
 LPCSTR UTIL_ScreenShotPath(VOID)
 {
-	if (g_screenshotpath.empty())
-	{
-		Windows::Storage::StorageFolder^ folder = nullptr;
-
-		try { folder = AWait(Windows::Storage::KnownFolders::PicturesLibrary->GetFolderAsync("SDLPAL"), g_eventHandle); }
-		catch (Platform::Exception^) {}
-		if (folder == nullptr)
-		{
-			try { folder = AWait(Windows::Storage::KnownFolders::PicturesLibrary->CreateFolderAsync("SDLPAL"), g_eventHandle); }
-			catch (Platform::Exception^) {}
-		}
-		if (folder)
-		{
-			g_screenshotfolder = folder;
-			auto localfolder = g_screenshotfolder->Path;
-			if (localfolder->End()[-1] != L'\\') localfolder += "\\";
-			ConvertString(localfolder, g_screenshotpath);
-		}
-		else
-		{
-			g_screenshotpath = UTIL_SavePath();
-			g_screenshotfolder = g_savefolder;
-		}
-	}
-	return g_screenshotpath.c_str();
+	return UTIL_BasePath();
 }
 
 static BOOL UTIL_IsMobile(VOID)
@@ -100,8 +70,8 @@ BOOL UTIL_GetScreenSize(DWORD *pdwScreenWidth, DWORD *pdwScreenHeight)
 	IDXGIAdapter1* pAdapter = nullptr;
 	IDXGIOutput* pOutput = nullptr;
 	DWORD retval = FALSE;
-
-#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
+	
+#if (_WIN32_WINNT >= 0x0A00) && (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
 	if (!UTIL_IsMobile()) return FALSE;
 #endif
 
@@ -115,8 +85,13 @@ BOOL UTIL_GetScreenSize(DWORD *pdwScreenWidth, DWORD *pdwScreenHeight)
 
 	if (SUCCEEDED(pOutput->GetDesc(&desc)))
 	{
+#if (_WIN32_WINNT < 0x0A00) && (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
+		*pdwScreenWidth = (desc.DesktopCoordinates.right - desc.DesktopCoordinates.left);
+		*pdwScreenHeight = (desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top);
+#else
 		*pdwScreenWidth = (desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top);
 		*pdwScreenHeight = (desc.DesktopCoordinates.right - desc.DesktopCoordinates.left);
+#endif
 		retval = TRUE;
 	}
 
@@ -136,10 +111,15 @@ BOOL UTIL_TouchEnabled(VOID)
 
 #include "SDL.h"
 #include "SDL_endian.h"
+#include <setjmp.h>
+
+jmp_buf exit_jmp_buf;
 
 extern "C"
 INT UTIL_Platform_Init(int argc, char* argv[])
 {
+	if (setjmp(exit_jmp_buf) == 1) return -1;
+
 	SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeRight");
 	SDL_SetHint(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, "1");
 
@@ -149,5 +129,6 @@ INT UTIL_Platform_Init(int argc, char* argv[])
 extern "C"
 VOID UTIL_Platform_Quit(VOID)
 {
-	Windows::ApplicationModel::Core::CoreApplication::Exit();
+	//throw ref new Platform::Exception(0);
+	longjmp(exit_jmp_buf, 1);
 }

+ 100 - 0
winrt/SDLPal.Windows.sln

@@ -0,0 +1,100 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25123.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2-WinRT81", "..\SDL2\VisualC-WinRT\WinRT81_VS2013\SDL-WinRT81.vcxproj", "{C8DF6173-06A1-4F56-A9BC-2002596B30E9}"
+	ProjectSection(ProjectDependencies) = postProject
+		{30689076-D95B-4947-A05E-07843DA8C10B} = {30689076-D95B-4947-A05E-07843DA8C10B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPal.Common", "SDLPal.Windows\SDLPal.Common.vcxproj", "{30689076-D95B-4947-A05E-07843DA8C10B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPal.Core", "SDLPal.Windows\SDLPal.Core.vcxproj", "{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPal", "SDLPal.Windows\SDLPal.vcxproj", "{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53} = {0E07ED16-7084-4976-A65C-9CDB7BE8DC53}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|ARM = Debug|ARM
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|ARM = Release|ARM
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|ARM.ActiveCfg = Debug|ARM
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|ARM.Build.0 = Debug|ARM
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|x64.ActiveCfg = Debug|x64
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|x64.Build.0 = Debug|x64
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|x86.ActiveCfg = Debug|Win32
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Debug|x86.Build.0 = Debug|Win32
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|ARM.ActiveCfg = Release|ARM
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|ARM.Build.0 = Release|ARM
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|x64.ActiveCfg = Release|x64
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|x64.Build.0 = Release|x64
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|x86.ActiveCfg = Release|Win32
+		{C8DF6173-06A1-4F56-A9BC-2002596B30E9}.Release|x86.Build.0 = Release|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|ARM.ActiveCfg = Debug|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|ARM.Build.0 = Debug|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|ARM.Deploy.0 = Debug|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x64.ActiveCfg = Debug|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x64.Build.0 = Debug|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x64.Deploy.0 = Debug|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x86.ActiveCfg = Debug|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x86.Build.0 = Debug|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Debug|x86.Deploy.0 = Debug|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|ARM.ActiveCfg = Release|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|ARM.Build.0 = Release|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|ARM.Deploy.0 = Release|ARM
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x64.ActiveCfg = Release|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x64.Build.0 = Release|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x64.Deploy.0 = Release|x64
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x86.ActiveCfg = Release|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x86.Build.0 = Release|Win32
+		{30689076-D95B-4947-A05E-07843DA8C10B}.Release|x86.Deploy.0 = Release|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|ARM.ActiveCfg = Debug|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|ARM.Build.0 = Debug|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|ARM.Deploy.0 = Debug|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x64.ActiveCfg = Debug|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x64.Build.0 = Debug|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x64.Deploy.0 = Debug|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x86.ActiveCfg = Debug|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x86.Build.0 = Debug|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Debug|x86.Deploy.0 = Debug|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|ARM.ActiveCfg = Release|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|ARM.Build.0 = Release|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|ARM.Deploy.0 = Release|ARM
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x64.ActiveCfg = Release|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x64.Build.0 = Release|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x64.Deploy.0 = Release|x64
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x86.ActiveCfg = Release|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x86.Build.0 = Release|Win32
+		{0E07ED16-7084-4976-A65C-9CDB7BE8DC53}.Release|x86.Deploy.0 = Release|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|ARM.ActiveCfg = Debug|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|ARM.Build.0 = Debug|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|ARM.Deploy.0 = Debug|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x64.ActiveCfg = Debug|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x64.Build.0 = Debug|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x64.Deploy.0 = Debug|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x86.ActiveCfg = Debug|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x86.Build.0 = Debug|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Debug|x86.Deploy.0 = Debug|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|ARM.ActiveCfg = Release|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|ARM.Build.0 = Release|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|ARM.Deploy.0 = Release|ARM
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x64.ActiveCfg = Release|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x64.Build.0 = Release|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x64.Deploy.0 = Release|x64
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x86.ActiveCfg = Release|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x86.Build.0 = Release|Win32
+		{A01AFDD3-3E89-47B8-B341-D7A4E61D0E7D}.Release|x86.Deploy.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 7 - 0
winrt/SDLPal.Windows/App.xaml

@@ -0,0 +1,7 @@
+<Application
+    x:Class="SDLPal.App"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:local="using:SDLPal">
+
+</Application>

+ 125 - 0
winrt/SDLPal.Windows/App.xaml.cpp

@@ -0,0 +1,125 @@
+//
+// App.xaml.cpp
+// App 类的实现。
+//
+
+#include "pch.h"
+#include "MainPage.xaml.h"
+
+using namespace SDLPal;
+
+using namespace Platform;
+using namespace Windows::ApplicationModel;
+using namespace Windows::ApplicationModel::Activation;
+using namespace Windows::Foundation;
+using namespace Windows::Foundation::Collections;
+using namespace Windows::UI::Xaml;
+using namespace Windows::UI::Xaml::Controls;
+using namespace Windows::UI::Xaml::Controls::Primitives;
+using namespace Windows::UI::Xaml::Data;
+using namespace Windows::UI::Xaml::Input;
+using namespace Windows::UI::Xaml::Interop;
+using namespace Windows::UI::Xaml::Media;
+using namespace Windows::UI::Xaml::Navigation;
+
+// “空白应用程序”模板在 http://go.microsoft.com/fwlink/?LinkId=234227 上有介绍
+
+/// <summary>
+/// 初始化单一实例应用程序对象。这是执行的创作代码的第一行,
+/// 已执行,逻辑上等同于 main() 或 WinMain()。
+/// </summary>
+App::App()
+{
+	InitializeComponent();
+	Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+}
+
+/// <summary>
+/// 在最终用户正常启动应用程序时调用。	将在启动应用程序
+/// 将在启动应用程序以打开特定文件等情况下使用。
+/// </summary>
+/// <param name="e">有关启动请求和过程的详细信息。</param>
+void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e)
+{
+
+#if _DEBUG
+		// 调试时显示图形分析信息。
+		if (IsDebuggerPresent())
+		{
+			// 显示当前帧速率计数器
+			 DebugSettings->EnableFrameRateCounter = true;
+		}
+#endif
+
+	auto rootFrame = dynamic_cast<Frame^>(Window::Current->Content);
+
+	// 不要在窗口已包含内容时重复应用程序初始化,
+	// 只需确保窗口处于活动状态
+	if (rootFrame == nullptr)
+	{
+		// 创建一个 Frame 以用作导航上下文并将其与
+		// SuspensionManager 键关联
+		rootFrame = ref new Frame();
+
+		//设置默认语言
+		rootFrame->Language = Windows::Globalization::ApplicationLanguages::Languages->GetAt(0);
+
+		rootFrame->NavigationFailed += ref new Windows::UI::Xaml::Navigation::NavigationFailedEventHandler(this, &App::OnNavigationFailed);
+
+		if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
+		{
+			// TODO: 仅当适用时还原保存的会话状态,并安排
+			// 还原完成后的最终启动步骤
+
+		}
+
+		if (rootFrame->Content == nullptr)
+		{
+			// 当导航堆栈尚未还原时,导航到第一页,
+			// 并通过将所需信息作为导航参数传入来配置
+			// 参数
+			rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments);
+		}
+		// 将框架放在当前窗口中
+		Window::Current->Content = rootFrame;
+		// 确保当前窗口处于活动状态
+		Window::Current->Activate();
+	}
+	else
+	{
+		if (rootFrame->Content == nullptr)
+		{
+			// 当导航堆栈尚未还原时,导航到第一页,
+			// 并通过将所需信息作为导航参数传入来配置
+			// 参数
+			rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments);
+		}
+		// 确保当前窗口处于活动状态
+		Window::Current->Activate();
+	}
+}
+
+/// <summary>
+/// 在挂起应用程序执行时调用。	保存应用程序状态
+/// 无需知道应用程序会被终止还是会恢复,
+/// 并让内存内容保持不变。
+/// </summary>
+/// <param name="sender">挂起的请求的源。</param>
+/// <param name="e">有关挂起请求的详细信息。</param>
+void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
+{
+	(void) sender;	// 未使用的参数
+	(void) e;	// 未使用的参数
+
+	//TODO: 保存应用程序状态并停止任何后台活动
+}
+
+/// <summary>
+///导航到特定页失败时调用
+/// </summary>
+///<param name="sender">导航失败的框架</param>
+///<param name="e">有关导航失败的详细信息</param>
+void App::OnNavigationFailed(Platform::Object ^sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^e)
+{
+	throw ref new FailureException("Failed to load Page " + e->SourcePageType.Name);
+}

+ 33 - 0
winrt/SDLPal.Windows/App.xaml.h

@@ -0,0 +1,33 @@
+//
+// App.xaml.h
+// App 类的声明。
+//
+
+#pragma once
+
+#include "App.g.h"
+
+namespace SDLPal
+{
+	/// <summary>
+	/// 提供特定于应用程序的行为,以补充默认的应用程序类。
+	/// </summary>
+	ref class App sealed
+	{
+	protected:
+		virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override;
+
+	internal:
+		App();
+
+		void SetMainPage(Windows::UI::Xaml::Controls::Page^ page) { _main_page = page; }
+
+	private:
+		Windows::UI::Xaml::Controls::Page^ _main_page;
+
+		void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
+		void OnNavigationFailed(Platform::Object ^sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^e);
+	};
+}
+
+extern HANDLE g_eventHandle;

BIN
winrt/SDLPal.Windows/Assets/Logo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/Logo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/Logo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/Logo.scale-80.png


BIN
winrt/SDLPal.Windows/Assets/SmallLogo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/SmallLogo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/SmallLogo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/SmallLogo.scale-80.png


BIN
winrt/SDLPal.Windows/Assets/SplashScreen.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/SplashScreen.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/SplashScreen.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/Square310x310Logo.scale-80.png


BIN
winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/Square70x70Logo.scale-80.png


BIN
winrt/SDLPal.Windows/Assets/StoreLogo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/StoreLogo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/StoreLogo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/WideLogo.scale-100.png


BIN
winrt/SDLPal.Windows/Assets/WideLogo.scale-140.png


BIN
winrt/SDLPal.Windows/Assets/WideLogo.scale-180.png


BIN
winrt/SDLPal.Windows/Assets/WideLogo.scale-80.png


+ 63 - 0
winrt/SDLPal.Windows/MainPage.xaml

@@ -0,0 +1,63 @@
+<Page
+    x:Class="SDLPal.MainPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:local="using:SDLPal"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d">
+
+    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+        <ScrollViewer HorizontalScrollMode="Disabled">
+            <StackPanel VerticalAlignment="Top" Margin="10,0,10,0">
+                <TextBox x:Name="tbGamePath" x:Uid="GamePath" TextWrapping="Wrap" VerticalAlignment="Top" Header="游戏资源文件夹" IsReadOnly="True" PlaceholderText="游戏资源文件夹"/>
+                <Grid VerticalAlignment="Top">
+                    <Button x:Name="btnBrowseGame" x:Uid="ButtonBrowse" Content="浏览文件夹" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btnBrowse_Click" />
+                </Grid>
+                <ToggleSwitch x:Name="tsIsDOS" x:Uid="DOS" Header="游戏资源版本" OffContent="WIN95" OnContent="DOS" Toggled="tsIsDOS_Toggled" />
+                <ToggleSwitch x:Name="tsUseEmbedFont" x:Uid="EmbeddedFont" Header="游戏内嵌字体" OffContent="否" OnContent="是" />
+                <ToggleSwitch x:Name="tsLanguage" x:Uid="Language" Header="游戏资源语言" OffContent="繁体中文" OnContent="简体中文" />
+                <TextBox x:Name="tbMsgFile" x:Uid="MessageFile" Header="自定义语言文件名" TextWrapping="Wrap" VerticalAlignment="Top" PlaceholderText="自定义语言文件名"/>
+                <ToggleSwitch x:Name="tsTouchOverlay" x:Uid="TouchOverlay" Header="启用触屏辅助" OffContent="否" OnContent="是" />
+                <ToggleSwitch x:Name="tsKeepAspect" x:Uid="AspectRatio" Header="保持纵横比" OffContent="否" OnContent="是" />
+                <ToggleSwitch x:Name="tsStereo" x:Uid="Stereo" Header="立体声" OffContent="否" OnContent="是" />
+                <Slider x:Name="slVolume" x:Uid="Volume" Header="音量" TickPlacement="Inline" TickFrequency="10" />
+                <Slider x:Name="slQuality" x:Uid="Quality" Header="音频质量" Maximum="4" LargeChange="1" TickFrequency="1" />
+                <ComboBox x:Name="cbSampleRate" x:Uid="Samplerate" Header="音频输出采样率" PlaceholderText="音频输出采样率">
+                    <ComboBoxItem Content="11025"/>
+                    <ComboBoxItem Content="22050"/>
+                    <ComboBoxItem Content="44100"/>
+                </ComboBox>
+                <ComboBox x:Name="cbAudioBuffer" x:Uid="AudioBuffer" Header="音频缓冲区大小" PlaceholderText="音频缓冲区大小">
+                    <ComboBoxItem Content="512"/>
+                    <ComboBoxItem Content="1024"/>
+                    <ComboBoxItem Content="2048"/>
+                    <ComboBoxItem Content="4096"/>
+                </ComboBox>
+                <ComboBox x:Name="cbCD" x:Uid="CD" Header="CD 音轨格式" PlaceholderText="CD 音轨格式">
+                    <ComboBoxItem Content="MP3"/>
+                    <ComboBoxItem Content="OGG"/>
+                </ComboBox>
+                <ComboBox x:Name="cbBGM" x:Uid="BGM" Header="背景音乐格式" PlaceholderText="背景音乐格式" SelectionChanged="cbBGM_SelectionChanged">
+                    <ComboBoxItem Content="RIX"/>
+                    <ComboBoxItem Content="MP3"/>
+                    <ComboBoxItem Content="OGG"/>
+                </ComboBox>
+                <ComboBox x:Name="cbOPL" x:Uid="OPL" Header="OPL 模拟器" PlaceholderText="OPL 模拟器">
+                    <ComboBoxItem Content="DOSBOX"/>
+                    <ComboBoxItem Content="MAME"/>
+                </ComboBox>
+                <ComboBox x:Name="cbOPLSR" x:Uid="OPLSR" Header="OPL 模拟器采样率" PlaceholderText="OPL 模拟器采样率">
+                    <ComboBoxItem Content="12429"/>
+                    <ComboBoxItem Content="24858"/>
+                    <ComboBoxItem Content="49716"/>
+                </ComboBox>
+                <ToggleSwitch x:Name="tsSurroundOPL" x:Uid="SurroundOPL" Header="环绕声 OPL" OffContent="否" OnContent="是" />
+                <Grid VerticalAlignment="Top">
+                    <Button x:Name="btnReset" x:Uid="ButtonDefault" Content="默认设置" HorizontalAlignment="Left" Click="btnReset_Click" />
+                    <Button x:Name="btnFinish" x:Uid="ButtonFinish" Content="完成设置" HorizontalAlignment="Right" Click="btnFinish_Click" />
+                </Grid>
+            </StackPanel>
+        </ScrollViewer>
+    </Grid>
+</Page>

+ 184 - 0
winrt/SDLPal.Windows/MainPage.xaml.cpp

@@ -0,0 +1,184 @@
+//
+// MainPage.xaml.cpp
+// MainPage 类的实现。
+//
+
+#include "pch.h"
+#include "MainPage.xaml.h"
+#include "../SDLPal.Common/StringHelper.h"
+#include "../SDLPal.Common/AsyncHelper.h"
+#include "../../global.h"
+
+using namespace SDLPal;
+
+using namespace Platform;
+using namespace Windows::Foundation;
+using namespace Windows::Foundation::Collections;
+using namespace Windows::UI::Xaml;
+using namespace Windows::UI::Xaml::Controls;
+using namespace Windows::UI::Xaml::Controls::Primitives;
+using namespace Windows::UI::Xaml::Data;
+using namespace Windows::UI::Xaml::Input;
+using namespace Windows::UI::Xaml::Media;
+using namespace Windows::UI::Xaml::Navigation;
+
+// “空白页”项模板在 http://go.microsoft.com/fwlink/?LinkId=234238 上有介绍
+
+MainPage::MainPage()
+{
+	InitializeComponent();
+	static_cast<App^>(Application::Current)->SetMainPage(this);
+	LoadControlContents();
+}
+
+void SDLPal::MainPage::LoadControlContents()
+{
+	if (gConfig.pszGamePath) tbGamePath->Text = ConvertString(gConfig.pszGamePath);
+	if (gConfig.pszMsgFile) tbMsgFile->Text = ConvertString(gConfig.pszMsgFile);
+
+	tsLanguage->IsOn = (gConfig.uCodePage == CP_GBK);
+	tsIsDOS->IsOn = (gConfig.fIsWIN95 == FALSE);
+	tsUseEmbedFont->IsOn = (gConfig.fUseEmbeddedFonts == TRUE);
+	tsKeepAspect->IsOn = (gConfig.fKeepAspectRatio == TRUE);
+	tsStereo->IsOn = (gConfig.iAudioChannels == 2);
+	tsSurroundOPL->IsOn = (gConfig.fUseSurroundOPL == TRUE);
+	tsTouchOverlay->IsOn = (gConfig.fUseTouchOverlay == TRUE);
+
+	slVolume->Value = gConfig.iVolume;
+	slQuality->Value = gConfig.iResampleQuality;
+
+	cbCD->SelectedIndex = (gConfig.eCDType == MUSIC_MP3) ? 0 : 1;
+	if (gConfig.eMusicType == MUSIC_OGG)
+		cbBGM->SelectedIndex = 2;
+	else if (gConfig.eMusicType == MUSIC_MP3)
+		cbBGM->SelectedIndex = 1;
+	else
+		cbBGM->SelectedIndex = 0;
+	cbOPL->SelectedIndex = (int)gConfig.eOPLType;
+
+	if (gConfig.iSampleRate <= 11025)
+		cbSampleRate->SelectedIndex = 0;
+	else if (gConfig.iSampleRate <= 22050)
+		cbSampleRate->SelectedIndex = 1;
+	else
+		cbSampleRate->SelectedIndex = 2;
+
+	if (gConfig.wAudioBufferSize <= 512)
+		cbAudioBuffer->SelectedIndex = 0;
+	else if (gConfig.wAudioBufferSize == 1024)
+		cbAudioBuffer->SelectedIndex = 1;
+	else if (gConfig.wAudioBufferSize == 2048)
+		cbAudioBuffer->SelectedIndex = 2;
+	else
+		cbAudioBuffer->SelectedIndex = 3;
+
+	if (gConfig.iOPLSampleRate <= 12429)
+		cbOPLSR->SelectedIndex = 0;
+	else if (gConfig.iSampleRate <= 24858)
+		cbOPLSR->SelectedIndex = 1;
+	else
+		cbOPLSR->SelectedIndex = 2;
+
+	tsUseEmbedFont->Visibility = tsIsDOS->IsOn ? Windows::UI::Xaml::Visibility::Visible : Windows::UI::Xaml::Visibility::Collapsed;
+}
+
+void SDLPal::MainPage::SaveControlContents()
+{
+	std::wstring path;
+
+	if (gConfig.pszGamePath) free(gConfig.pszGamePath);
+	path.assign(tbGamePath->Text->Data());
+	if (path.back() != '\\') path.append(L"\\");
+	gConfig.pszGamePath = strdup(ConvertString(path).c_str());
+
+	if (gConfig.pszMsgFile) { free(gConfig.pszMsgFile); gConfig.pszMsgFile = NULL; }
+	gConfig.pszMsgFile = (tbMsgFile->Text->Length() > 0) ? strdup(ConvertString(tbMsgFile->Text).c_str()) : nullptr;
+
+	gConfig.fIsWIN95 = tsIsDOS->IsOn ? FALSE : TRUE;
+	gConfig.fUseEmbeddedFonts = tsUseEmbedFont->IsOn ? TRUE : FALSE;
+	gConfig.fKeepAspectRatio = tsKeepAspect->IsOn ? TRUE : FALSE;
+	gConfig.iAudioChannels = tsStereo->IsOn ? 2 : 1;
+	gConfig.fUseSurroundOPL = tsSurroundOPL->IsOn ? TRUE : FALSE;
+	gConfig.fUseTouchOverlay = tsTouchOverlay->IsOn ? TRUE : FALSE;
+
+	gConfig.iVolume = (int)slVolume->Value;
+	gConfig.iResampleQuality = (int)slQuality->Value;
+	gConfig.uCodePage = tsLanguage->IsOn ? CP_GBK : CP_BIG5;
+
+	gConfig.eCDType = (MUSICTYPE)(MUSIC_MP3 + cbCD->SelectedIndex);
+	gConfig.eMusicType = (cbBGM->SelectedIndex >= 1) ? (MUSICTYPE)(MUSIC_MP3 + cbBGM->SelectedIndex) : MUSIC_RIX;
+	gConfig.eOPLType = (OPLTYPE)cbOPL->SelectedIndex;
+
+	gConfig.iSampleRate = wcstoul(static_cast<Platform::String^>(static_cast<ComboBoxItem^>(cbSampleRate->SelectedItem)->Content)->Data(), nullptr, 10);
+	gConfig.iOPLSampleRate = wcstoul(static_cast<Platform::String^>(static_cast<ComboBoxItem^>(cbOPLSR->SelectedItem)->Content)->Data(), nullptr, 10);
+	gConfig.wAudioBufferSize = wcstoul(static_cast<Platform::String^>(static_cast<ComboBoxItem^>(cbAudioBuffer->SelectedItem)->Content)->Data(), nullptr, 10);
+}
+
+void SDLPal::MainPage::btnBrowse_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+	auto picker = ref new Windows::Storage::Pickers::FolderPicker();
+	picker->FileTypeFilter->Append("*");
+	concurrency::create_task(picker->PickSingleFolderAsync()).then([this](Windows::Storage::StorageFolder^ folder) {
+		Windows::Storage::AccessCache::StorageApplicationPermissions::MostRecentlyUsedList->Add(folder, folder->Path);
+		tbGamePath->Text = folder->Path;
+	});
+}
+
+void SDLPal::MainPage::tsIsDOS_Toggled(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+	if (tsIsDOS->IsOn)
+	{
+		tsLanguage->IsOn = false;
+		tsLanguage->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+		tsUseEmbedFont->Visibility = Windows::UI::Xaml::Visibility::Visible;
+	}
+	else
+	{
+		tsLanguage->IsOn = (gConfig.uCodePage == CP_GBK);
+		tsLanguage->Visibility = Windows::UI::Xaml::Visibility::Visible;
+		tsUseEmbedFont->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+	}
+}
+
+void SDLPal::MainPage::cbBGM_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
+{
+	auto visibility = (cbBGM->SelectedIndex == 0) ? Windows::UI::Xaml::Visibility::Visible : Windows::UI::Xaml::Visibility::Collapsed;
+	cbOPL->Visibility = visibility;
+	cbOPLSR->Visibility = visibility;
+	tsSurroundOPL->Visibility = visibility;
+}
+
+
+void SDLPal::MainPage::btnReset_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+	PAL_LoadConfig(FALSE);
+	LoadControlContents();
+}
+
+
+void SDLPal::MainPage::btnFinish_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+	auto loader = ref new Windows::ApplicationModel::Resources::ResourceLoader();
+	if (tbGamePath->Text->Length() > 0)
+	{
+		SaveControlContents();
+		auto handler = ref new Windows::UI::Popups::UICommandInvokedHandler(this, &MainPage::CloseUICommandHandler);
+		auto dlg = ref new Windows::UI::Popups::MessageDialog(loader->GetString("MBExitContent"));
+		dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBYes"), handler, safe_cast<Platform::Object^>(0)));
+		dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBNo"), handler, safe_cast<Platform::Object^>(1)));
+		dlg->ShowAsync();
+	}
+	else
+	{
+		(ref new Windows::UI::Popups::MessageDialog(loader->GetString("MBEmptyContent")))->ShowAsync();
+	}
+}
+
+void SDLPal::MainPage::CloseUICommandHandler(Windows::UI::Popups::IUICommand^ command)
+{
+	gConfig.fLaunchSetting = ((int)command->Id == 0);
+	PAL_SaveConfig();
+	for (int i = 0; i < 5; i++) m_buttons[i] = nullptr;
+	Application::Current->Exit();
+}
+

+ 35 - 0
winrt/SDLPal.Windows/MainPage.xaml.h

@@ -0,0 +1,35 @@
+//
+// MainPage.xaml.h
+// MainPage 类的声明。
+//
+
+#pragma once
+
+#include "MainPage.g.h"
+
+namespace SDLPal
+{
+	/// <summary>
+	/// 可用于自身或导航至 Frame 内部的空白页。
+	/// </summary>
+	public ref class MainPage sealed
+	{
+	public:
+		MainPage();
+
+	protected:
+		void LoadControlContents();
+		void SaveControlContents();
+
+	private:
+		Windows::UI::Xaml::Controls::Button^ m_buttons[5];
+
+		void CloseUICommandHandler(Windows::UI::Popups::IUICommand^ command);
+
+		void btnBrowse_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
+		void tsIsDOS_Toggled(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
+		void cbBGM_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
+		void btnReset_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
+		void btnFinish_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
+	};
+}

+ 46 - 0
winrt/SDLPal.Windows/Package.appxmanifest

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
+  <Identity Name="c84165f3-7148-4381-affb-84265925b7e8" Publisher="CN=LouYihua" Version="2.0.0.0" />
+  <Properties>
+    <DisplayName>SDLPal</DisplayName>
+    <PublisherDisplayName>SDLPal Team</PublisherDisplayName>
+    <Logo>Assets\StoreLogo.png</Logo>
+  </Properties>
+  <Prerequisites>
+    <OSMinVersion>6.3.0</OSMinVersion>
+    <OSMaxVersionTested>6.3.0</OSMaxVersionTested>
+  </Prerequisites>
+  <Resources>
+    <Resource Language="x-generate" />
+  </Resources>
+  <Applications>
+    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="SDLPal.App">
+      <m2:VisualElements DisplayName="SDLPal" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png" Description="SDL-based reimplementation of classic Chinese RPG &quot;Xian Jian Qi Xia Zhuan&quot;." ForegroundText="light" BackgroundColor="transparent">
+        <m2:DefaultTile Square70x70Logo="Assets\Square70x70Logo.png" Wide310x150Logo="Assets\WideLogo.png" Square310x310Logo="Assets\Square310x310Logo.png">
+        </m2:DefaultTile>
+        <m2:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="black" />
+      </m2:VisualElements>
+      <Extensions>
+        <Extension Category="windows.fileTypeAssociation">
+          <FileTypeAssociation Name="pal">
+            <SupportedFileTypes>
+              <FileType>.mkf</FileType>
+              <FileType>.dat</FileType>
+              <FileType>.msg</FileType>
+              <FileType>.cfg</FileType>
+              <FileType>.asc</FileType>
+              <FileType>.mp3</FileType>
+              <FileType>.ogg</FileType>
+              <FileType>.rpg</FileType>
+              <FileType>.bmp</FileType>
+            </SupportedFileTypes>
+          </FileTypeAssociation>
+        </Extension>
+      </Extensions>
+    </Application>
+  </Applications>
+  <Capabilities>
+    <Capability Name="removableStorage" />
+    <Capability Name="picturesLibrary" />
+  </Capabilities>
+</Package>

+ 203 - 0
winrt/SDLPal.Windows/SDLPal.Common.vcxproj

@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|ARM">
+      <Configuration>Debug</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|ARM">
+      <Configuration>Release</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\SDLPal.Common\AsyncHelper.h" />
+    <ClInclude Include="..\SDLPal.Common\StringHelper.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\SDLPal.Common\SDLPal.Common.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\SDLPal.Common\WinRTIO.cpp" />
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{30689076-d95b-4947-a05e-07843da8c10b}</ProjectGuid>
+    <Keyword>BlankApp</Keyword>
+    <RootNamespace>SDLPal_Common</RootNamespace>
+    <DefaultLanguage>zh-CN</DefaultLanguage>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+    <AppContainerApplication>true</AppContainerApplication>
+    <ApplicationType>Windows Store</ApplicationType>
+    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <PackageCertificateKeyFile>SDLPal.Common_TemporaryKey.pfx</PackageCertificateKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <Link>
+      <ModuleDefinitionFile>../SDLPal.Common/SDLPal.Common.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 13 - 0
winrt/SDLPal.Windows/SDLPal.Common.vcxproj.filters

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClInclude Include="..\SDLPal.Common\AsyncHelper.h" />
+    <ClInclude Include="..\SDLPal.Common\StringHelper.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\SDLPal.Common\SDLPal.Common.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\SDLPal.Common\WinRTIO.cpp" />
+  </ItemGroup>
+</Project>

+ 401 - 0
winrt/SDLPal.Windows/SDLPal.Core.vcxproj

@@ -0,0 +1,401 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|ARM">
+      <Configuration>Debug</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|ARM">
+      <Configuration>Release</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0e07ed16-7084-4976-a65c-9cdb7be8dc53}</ProjectGuid>
+    <Keyword>BlankApp</Keyword>
+    <RootNamespace>SDLPal_Core</RootNamespace>
+    <DefaultLanguage>zh-CN</DefaultLanguage>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+    <AppContainerApplication>true</AppContainerApplication>
+    <ApplicationType>Windows Store</ApplicationType>
+    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <PackageCertificateKeyFile>SDLPal.Core_TemporaryKey.pfx</PackageCertificateKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>
+      </DisableSpecificWarnings>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\..\liboggvorbis\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <CompileAsWinRT>false</CompileAsWinRT>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;__WINRT__=1;PAL_HAS_TOUCH=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\adplug\adlibemu.h" />
+    <ClInclude Include="..\..\adplug\binfile.h" />
+    <ClInclude Include="..\..\adplug\binio.h" />
+    <ClInclude Include="..\..\adplug\dbemuopl.h" />
+    <ClInclude Include="..\..\adplug\dbopl.h" />
+    <ClInclude Include="..\..\adplug\demuopl.h" />
+    <ClInclude Include="..\..\adplug\dosbox_opl.h" />
+    <ClInclude Include="..\..\adplug\emuopl.h" />
+    <ClInclude Include="..\..\adplug\fmopl.h" />
+    <ClInclude Include="..\..\adplug\fprovide.h" />
+    <ClInclude Include="..\..\adplug\opl.h" />
+    <ClInclude Include="..\..\adplug\player.h" />
+    <ClInclude Include="..\..\adplug\rix.h" />
+    <ClInclude Include="..\..\adplug\surroundopl.h" />
+    <ClInclude Include="..\..\ascii.h" />
+    <ClInclude Include="..\..\battle.h" />
+    <ClInclude Include="..\..\codepage.h" />
+    <ClInclude Include="..\..\common.h" />
+    <ClInclude Include="..\..\ending.h" />
+    <ClInclude Include="..\..\fight.h" />
+    <ClInclude Include="..\..\font.h" />
+    <ClInclude Include="..\..\fontglyph.h" />
+    <ClInclude Include="..\..\game.h" />
+    <ClInclude Include="..\..\getopt.h" />
+    <ClInclude Include="..\..\global.h" />
+    <ClInclude Include="..\..\input.h" />
+    <ClInclude Include="..\..\itemmenu.h" />
+    <ClInclude Include="..\..\libmad\bit.h" />
+    <ClInclude Include="..\..\libmad\decoder.h" />
+    <ClInclude Include="..\..\libmad\fixed.h" />
+    <ClInclude Include="..\..\libmad\frame.h" />
+    <ClInclude Include="..\..\libmad\huffman.h" />
+    <ClInclude Include="..\..\libmad\layer12.h" />
+    <ClInclude Include="..\..\libmad\layer3.h" />
+    <ClInclude Include="..\..\libmad\libmad_config.h" />
+    <ClInclude Include="..\..\libmad\libmad_global.h" />
+    <ClInclude Include="..\..\libmad\mad.h" />
+    <ClInclude Include="..\..\libmad\music_mad.h" />
+    <ClInclude Include="..\..\libmad\stream.h" />
+    <ClInclude Include="..\..\libmad\synth.h" />
+    <ClInclude Include="..\..\libmad\timer.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\config_types.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\ogg.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\os_types.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\codec.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\vorbisenc.h" />
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\vorbisfile.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\backends.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\bitrate.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\books\coupled\res_books_51.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\books\coupled\res_books_stereo.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\books\floor\floor_books.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\books\uncoupled\res_books_uncoupled.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\codebook.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\codec_internal.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\envelope.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\highlevel.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\lookup.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\lookup_data.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\lpc.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\lsp.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\masking.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\mdct.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\misc.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\floor_all.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_11.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_16.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_44.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_8.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_16.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44p51.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44u.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_8.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_11.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_16.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_22.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_32.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44p51.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44u.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_8.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_X.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\os.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\psy.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\registry.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\scales.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\smallft.h" />
+    <ClInclude Include="..\..\liboggvorbis\src\window.h" />
+    <ClInclude Include="..\..\magicmenu.h" />
+    <ClInclude Include="..\..\main.h" />
+    <ClInclude Include="..\..\map.h" />
+    <ClInclude Include="..\..\midi.h" />
+    <ClInclude Include="..\..\palcfg.h" />
+    <ClInclude Include="..\..\palcommon.h" />
+    <ClInclude Include="..\..\palette.h" />
+    <ClInclude Include="..\..\play.h" />
+    <ClInclude Include="..\..\players.h" />
+    <ClInclude Include="..\..\res.h" />
+    <ClInclude Include="..\..\resampler.h" />
+    <ClInclude Include="..\..\rngplay.h" />
+    <ClInclude Include="..\..\scene.h" />
+    <ClInclude Include="..\..\script.h" />
+    <ClInclude Include="..\..\sound.h" />
+    <ClInclude Include="..\..\text.h" />
+    <ClInclude Include="..\..\ui.h" />
+    <ClInclude Include="..\..\uibattle.h" />
+    <ClInclude Include="..\..\uigame.h" />
+    <ClInclude Include="..\..\util.h" />
+    <ClInclude Include="..\..\video.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\adplug\adlibemu.c" />
+    <ClCompile Include="..\..\adplug\binfile.cpp" />
+    <ClCompile Include="..\..\adplug\binio.cpp" />
+    <ClCompile Include="..\..\adplug\dbemuopl.cpp" />
+    <ClCompile Include="..\..\adplug\dbopl.cpp" />
+    <ClCompile Include="..\..\adplug\demuopl.cpp" />
+    <ClCompile Include="..\..\adplug\dosbox_opl.cpp" />
+    <ClCompile Include="..\..\adplug\emuopl.cpp" />
+    <ClCompile Include="..\..\adplug\fmopl.c" />
+    <ClCompile Include="..\..\adplug\fprovide.cpp" />
+    <ClCompile Include="..\..\adplug\player.cpp" />
+    <ClCompile Include="..\..\adplug\rix.cpp" />
+    <ClCompile Include="..\..\adplug\surroundopl.cpp" />
+    <ClCompile Include="..\..\battle.c" />
+    <ClCompile Include="..\..\ending.c" />
+    <ClCompile Include="..\..\fight.c" />
+    <ClCompile Include="..\..\font.c" />
+    <ClCompile Include="..\..\game.c" />
+    <ClCompile Include="..\..\getopt.c" />
+    <ClCompile Include="..\..\global.c" />
+    <ClCompile Include="..\..\input.c" />
+    <ClCompile Include="..\..\itemmenu.c" />
+    <ClCompile Include="..\..\libmad\bit.c" />
+    <ClCompile Include="..\..\libmad\decoder.c" />
+    <ClCompile Include="..\..\libmad\fixed.c" />
+    <ClCompile Include="..\..\libmad\frame.c" />
+    <ClCompile Include="..\..\libmad\huffman.c" />
+    <ClCompile Include="..\..\libmad\layer12.c" />
+    <ClCompile Include="..\..\libmad\layer3.c" />
+    <ClCompile Include="..\..\libmad\music_mad.c" />
+    <ClCompile Include="..\..\libmad\stream.c" />
+    <ClCompile Include="..\..\libmad\synth.c" />
+    <ClCompile Include="..\..\libmad\timer.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\analysis.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\bitrate.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\bitwise.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\block.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\codebook.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\envelope.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\floor0.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\floor1.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\framing.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\info.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\lookup.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\lpc.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\lsp.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\mapping0.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\mdct.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\psy.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\registry.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\res0.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\sharedbook.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\smallft.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\synthesis.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\vorbisenc.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\vorbisfile.c" />
+    <ClCompile Include="..\..\liboggvorbis\src\window.c" />
+    <ClCompile Include="..\..\magicmenu.c" />
+    <ClCompile Include="..\..\main.c" />
+    <ClCompile Include="..\..\map.c" />
+    <ClCompile Include="..\..\mp3play.c" />
+    <ClCompile Include="..\..\oggplay.c" />
+    <ClCompile Include="..\..\overlay.c" />
+    <ClCompile Include="..\..\palcfg.c" />
+    <ClCompile Include="..\..\palcommon.c" />
+    <ClCompile Include="..\..\palette.c" />
+    <ClCompile Include="..\..\play.c" />
+    <ClCompile Include="..\..\res.c" />
+    <ClCompile Include="..\..\resampler.c" />
+    <ClCompile Include="..\..\rixplay.cpp" />
+    <ClCompile Include="..\..\rngplay.c" />
+    <ClCompile Include="..\..\scene.c" />
+    <ClCompile Include="..\..\script.c" />
+    <ClCompile Include="..\..\sound.c" />
+    <ClCompile Include="..\..\text.c" />
+    <ClCompile Include="..\..\ui.c" />
+    <ClCompile Include="..\..\uibattle.c" />
+    <ClCompile Include="..\..\uigame.c" />
+    <ClCompile Include="..\..\util.c" />
+    <ClCompile Include="..\..\video.c" />
+    <ClCompile Include="..\..\yj1.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\libmad\D.dat" />
+    <None Include="..\libmad\imdct_s.dat" />
+    <None Include="..\libmad\qc_table.dat" />
+    <None Include="..\libmad\rq_table.dat" />
+    <None Include="..\libmad\sf_table.dat" />
+  </ItemGroup>
+</Project>

+ 643 - 0
winrt/SDLPal.Windows/SDLPal.Core.vcxproj.filters

@@ -0,0 +1,643 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{cf0f2e70-7c0e-4e1d-85fd-8badb4eebc16}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl</Extensions>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{84a9e657-cba5-4619-9c3c-06a6e248dc8e}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+    </Filter>
+    <Filter Include="adplug">
+      <UniqueIdentifier>{aa39a4b7-ac54-4518-940e-5a285e2e9222}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libmad">
+      <UniqueIdentifier>{539119ba-ede7-42c7-896b-b2cd0b578240}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis">
+      <UniqueIdentifier>{1bcf3edd-baa4-423c-a302-84887c368238}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\include">
+      <UniqueIdentifier>{3bc338dc-4bb7-43fc-8ce4-635e19568e01}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src">
+      <UniqueIdentifier>{9609cbfb-5117-433b-aeee-5e6ad2db3c34}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\include\ogg">
+      <UniqueIdentifier>{bc8567f3-e3c0-4240-b11d-ad1214a672b4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\include\vorbis">
+      <UniqueIdentifier>{971e64c5-7be1-4989-8367-b59f1e068482}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src\books">
+      <UniqueIdentifier>{b3b540b5-fe6b-4252-aec5-b35abe974b90}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src\modes">
+      <UniqueIdentifier>{2ff985b7-7dd0-4761-8667-a36ca949f734}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src\books\coupled">
+      <UniqueIdentifier>{3c9a9ae9-25b1-4afc-afcb-8a1cc6a64128}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src\books\floor">
+      <UniqueIdentifier>{8af59b90-c90e-4ca6-bf2d-eef8c0bdd4fd}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="liboggvorbis\src\books\uncoupled">
+      <UniqueIdentifier>{b966ba97-2cb8-40dd-9e3c-7c0d596770e4}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\adplug\binfile.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\binio.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\demuopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\dosbox_opl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\emuopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\fmopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\fprovide.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\opl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\player.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\rix.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\surroundopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\adlibemu.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\dbemuopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\adplug\dbopl.h">
+      <Filter>adplug</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\config_types.h">
+      <Filter>liboggvorbis\include\ogg</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\ogg.h">
+      <Filter>liboggvorbis\include\ogg</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\ogg\os_types.h">
+      <Filter>liboggvorbis\include\ogg</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\codec.h">
+      <Filter>liboggvorbis\include\vorbis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\vorbisenc.h">
+      <Filter>liboggvorbis\include\vorbis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\include\vorbis\vorbisfile.h">
+      <Filter>liboggvorbis\include\vorbis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\books\coupled\res_books_51.h">
+      <Filter>liboggvorbis\src\books\coupled</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\books\coupled\res_books_stereo.h">
+      <Filter>liboggvorbis\src\books\coupled</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\books\floor\floor_books.h">
+      <Filter>liboggvorbis\src\books\floor</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\books\uncoupled\res_books_uncoupled.h">
+      <Filter>liboggvorbis\src\books\uncoupled</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\floor_all.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_8.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_11.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_16.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\psych_44.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_8.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_16.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44p51.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\residue_44u.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_8.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_11.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_16.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_22.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_32.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44p51.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_44u.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\modes\setup_X.h">
+      <Filter>liboggvorbis\src\modes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\backends.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\bitrate.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\codebook.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\codec_internal.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\envelope.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\highlevel.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\lookup.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\lookup_data.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\lpc.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\lsp.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\masking.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\mdct.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\misc.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\os.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\psy.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\registry.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\scales.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\smallft.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\liboggvorbis\src\window.h">
+      <Filter>liboggvorbis\src</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\bit.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\decoder.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\fixed.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\frame.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\huffman.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\layer3.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\layer12.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\libmad_config.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\libmad_global.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\mad.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\music_mad.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\stream.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\synth.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\libmad\timer.h">
+      <Filter>libmad</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\ascii.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\battle.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\codepage.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\common.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\ending.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\fight.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\font.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\fontglyph.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\game.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\getopt.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\global.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\input.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\itemmenu.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\magicmenu.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\main.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\map.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\palcommon.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\palette.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\play.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\res.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\rngplay.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\scene.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\script.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\sound.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\text.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\ui.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\uibattle.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\uigame.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\util.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\video.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\midi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\players.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\resampler.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\palcfg.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\adplug\binfile.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\binio.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\dosbox_opl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\emuopl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\fmopl.c">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\fprovide.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\player.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\rix.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\surroundopl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\adlibemu.c">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\dbemuopl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\dbopl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\adplug\demuopl.cpp">
+      <Filter>adplug</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\analysis.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\bitrate.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\bitwise.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\block.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\codebook.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\envelope.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\floor0.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\floor1.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\framing.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\info.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\lookup.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\lpc.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\lsp.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\mapping0.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\mdct.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\psy.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\registry.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\res0.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\sharedbook.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\smallft.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\synthesis.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\vorbisenc.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\vorbisfile.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\liboggvorbis\src\window.c">
+      <Filter>liboggvorbis\src</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\bit.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\decoder.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\fixed.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\frame.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\huffman.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\layer3.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\layer12.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\music_mad.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\stream.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\synth.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\libmad\timer.c">
+      <Filter>libmad</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\battle.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\ending.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\fight.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\font.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\game.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\getopt.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\global.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\input.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\itemmenu.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\magicmenu.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\main.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\map.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\palcommon.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\palette.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\play.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\res.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\rixplay.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\rngplay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\scene.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\script.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\sound.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\text.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\ui.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\uibattle.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\uigame.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\util.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\video.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\yj1.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\mp3play.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\oggplay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\resampler.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\overlay.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\palcfg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\libmad\D.dat">
+      <Filter>libmad</Filter>
+    </None>
+    <None Include="..\libmad\imdct_s.dat">
+      <Filter>libmad</Filter>
+    </None>
+    <None Include="..\libmad\qc_table.dat">
+      <Filter>libmad</Filter>
+    </None>
+    <None Include="..\libmad\rq_table.dat">
+      <Filter>libmad</Filter>
+    </None>
+    <None Include="..\libmad\sf_table.dat">
+      <Filter>libmad</Filter>
+    </None>
+  </ItemGroup>
+</Project>

+ 339 - 0
winrt/SDLPal.Windows/SDLPal.vcxproj

@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|ARM">
+      <Configuration>Debug</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|ARM">
+      <Configuration>Release</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{a01afdd3-3e89-47b8-b341-d7a4e61d0e7d}</ProjectGuid>
+    <Keyword>BlankApp</Keyword>
+    <RootNamespace>SDLPal</RootNamespace>
+    <DefaultLanguage>en</DefaultLanguage>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+    <AppContainerApplication>true</AppContainerApplication>
+    <ApplicationType>Windows Store</ApplicationType>
+    <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <PackageCertificateKeyFile>SDLPal_TemporaryKey.pfx</PackageCertificateKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).Windows\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlibd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlibd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlibd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+      <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.Windows;$(OutDir)../SDLPal.Core.Windows</AdditionalLibraryDirectories>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="pch.h" />
+    <ClInclude Include="App.xaml.h">
+      <DependentUpon>App.xaml</DependentUpon>
+    </ClInclude>
+    <ClInclude Include="MainPage.xaml.h">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainPage.xaml">
+      <SubType>Designer</SubType>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <AppxManifest Include="Package.appxmanifest">
+      <SubType>Designer</SubType>
+    </AppxManifest>
+    <None Include="SDLPal_TemporaryKey.pfx" />
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="Assets\Logo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Logo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Logo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Logo.scale-80.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-80.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-80.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-80.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-100.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-140.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-180.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-80.png">
+      <DeploymentContent>true</DeploymentContent>
+    </Image>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="App.xaml.cpp">
+      <DependentUpon>App.xaml</DependentUpon>
+    </ClCompile>
+    <ClCompile Include="MainPage.xaml.cpp">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </ClCompile>
+    <ClCompile Include="pch.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="..\SDLPal.Common\SDLPal.cpp" />
+    <ClCompile Include="..\SDLPal.Common\WinRTUtil.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <PRIResource Include="Strings\en\Resources.resw" />
+    <PRIResource Include="Strings\zh-hans\Resources.resw" />
+    <PRIResource Include="Strings\zh-hant\Resources.resw" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\SDL2\VisualC-WinRT\WinRT81_VS2013\SDL-WinRT81.vcxproj">
+      <Project>{c8df6173-06a1-4f56-a9bc-2002596b30e9}</Project>
+    </ProjectReference>
+    <ProjectReference Include="SDLPal.Common.vcxproj">
+      <Project>{30689076-d95b-4947-a05e-07843da8c10b}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 136 - 0
winrt/SDLPal.Windows/SDLPal.vcxproj.filters

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="资产">
+      <UniqueIdentifier>db1211f4-0b9b-4055-804f-f318164cce96</UniqueIdentifier>
+      <Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>
+    </Filter>
+    <Filter Include="Strings">
+      <UniqueIdentifier>a01afdd3-3e89-47b8-b341-d7a4e61d0e7d</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Strings\en">
+      <UniqueIdentifier>{d96d3cba-8b44-4fa5-9631-340bd7fdb62d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Strings\zh-hans">
+      <UniqueIdentifier>{a56607bf-f7ef-4523-8980-3178ab86bea1}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Strings\zh-hant">
+      <UniqueIdentifier>{a19db27b-07fb-4370-b502-068e5ab9ec1d}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="App.xaml.cpp" />
+    <ClCompile Include="MainPage.xaml.cpp" />
+    <ClCompile Include="pch.cpp" />
+    <ClCompile Include="..\SDLPal.Common\SDLPal.cpp" />
+    <ClCompile Include="..\SDLPal.Common\WinRTUtil.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="pch.h" />
+    <ClInclude Include="App.xaml.h" />
+    <ClInclude Include="MainPage.xaml.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="Assets\Logo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Logo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\StoreLogo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-80.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square70x70Logo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Logo.scale-80.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Logo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-80.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SmallLogo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-80.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\WideLogo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-80.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-100.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-140.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\Square310x310Logo.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+    <Image Include="Assets\SplashScreen.scale-180.png">
+      <Filter>资产</Filter>
+    </Image>
+  </ItemGroup>
+  <ItemGroup>
+    <AppxManifest Include="Package.appxmanifest" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="SDLPal_TemporaryKey.pfx" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="MainPage.xaml" />
+  </ItemGroup>
+  <ItemGroup>
+    <PRIResource Include="Strings\en\Resources.resw">
+      <Filter>Strings\en</Filter>
+    </PRIResource>
+    <PRIResource Include="Strings\zh-hant\Resources.resw">
+      <Filter>Strings\zh-hant</Filter>
+    </PRIResource>
+    <PRIResource Include="Strings\zh-hans\Resources.resw">
+      <Filter>Strings\zh-hans</Filter>
+    </PRIResource>
+  </ItemGroup>
+</Project>

+ 258 - 0
winrt/SDLPal.Windows/Strings/en/Resources.resw

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="AspectRatio.Header" xml:space="preserve">
+    <value>Keep aspect ratio</value>
+  </data>
+  <data name="AspectRatio.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="AspectRatio.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="AudioBuffer.Header" xml:space="preserve">
+    <value>Audio buffer size</value>
+  </data>
+  <data name="AudioBuffer.PlaceholderText" xml:space="preserve">
+    <value>Audio buffer size</value>
+  </data>
+  <data name="BGM.Header" xml:space="preserve">
+    <value>Format of BGM</value>
+  </data>
+  <data name="BGM.PlaceholderText" xml:space="preserve">
+    <value>Format of BGM</value>
+  </data>
+  <data name="ButtonBrowse.Content" xml:space="preserve">
+    <value>Browse folder</value>
+  </data>
+  <data name="ButtonDefault.Content" xml:space="preserve">
+    <value>Default setting</value>
+  </data>
+  <data name="ButtonFinish.Content" xml:space="preserve">
+    <value>Finish setting</value>
+  </data>
+  <data name="CD.Header" xml:space="preserve">
+    <value>Format of CD track</value>
+  </data>
+  <data name="CD.PlaceholderText" xml:space="preserve">
+    <value>Format of CD track</value>
+  </data>
+  <data name="DOS.Header" xml:space="preserve">
+    <value>Game resource version</value>
+  </data>
+  <data name="DOS.OffContent" xml:space="preserve">
+    <value>WIN95</value>
+  </data>
+  <data name="DOS.OnContent" xml:space="preserve">
+    <value>DOS</value>
+  </data>
+  <data name="EmbeddedFont.Header" xml:space="preserve">
+    <value>Use the font within game resource</value>
+  </data>
+  <data name="EmbeddedFont.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="EmbeddedFont.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="GamePath.Header" xml:space="preserve">
+    <value>Folder of game resource</value>
+  </data>
+  <data name="GamePath.PlaceholderText" xml:space="preserve">
+    <value>Folder of game resource</value>
+  </data>
+  <data name="Language.Header" xml:space="preserve">
+    <value>Game resource language</value>
+  </data>
+  <data name="Language.OffContent" xml:space="preserve">
+    <value>Traditional Chinese</value>
+  </data>
+  <data name="Language.OnContent" xml:space="preserve">
+    <value>Simplified Chinese</value>
+  </data>
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>The game resource folder must be specified!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
+    <value>Launch the setting interface on next start?</value>
+  </data>
+  <data name="MBNo" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="MBYes" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="MessageFile.Header" xml:space="preserve">
+    <value>Customized message file</value>
+  </data>
+  <data name="MessageFile.PlaceholderText" xml:space="preserve">
+    <value>Customized message file</value>
+  </data>
+  <data name="OPL.Header" xml:space="preserve">
+    <value>Type of OPL simulator</value>
+  </data>
+  <data name="OPL.PlaceholderText" xml:space="preserve">
+    <value>Type of OPL simulator</value>
+  </data>
+  <data name="OPLSR.Header" xml:space="preserve">
+    <value>Sample rate of OPL simulator</value>
+  </data>
+  <data name="OPLSR.PlaceholderText" xml:space="preserve">
+    <value>Sample rate of OPL simulator</value>
+  </data>
+  <data name="Quality.Header" xml:space="preserve">
+    <value>Audio quality</value>
+  </data>
+  <data name="Samplerate.Header" xml:space="preserve">
+    <value>Sample rate of audio output</value>
+  </data>
+  <data name="Samplerate.PlaceholderText" xml:space="preserve">
+    <value>Sample rate of audio output</value>
+  </data>
+  <data name="Stereo.Header" xml:space="preserve">
+    <value>Stereo</value>
+  </data>
+  <data name="Stereo.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="Stereo.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="SurroundOPL.Header" xml:space="preserve">
+    <value>Use surround OPL</value>
+  </data>
+  <data name="SurroundOPL.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="SurroundOPL.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>Use touch overlay</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
+  <data name="Volume.Header" xml:space="preserve">
+    <value>Volume</value>
+  </data>
+</root>

+ 258 - 0
winrt/SDLPal.Windows/Strings/zh-hans/Resources.resw

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="AspectRatio.Header" xml:space="preserve">
+    <value>保持纵横比</value>
+  </data>
+  <data name="AspectRatio.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="AspectRatio.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="AudioBuffer.Header" xml:space="preserve">
+    <value>音频缓冲区大小</value>
+  </data>
+  <data name="AudioBuffer.PlaceholderText" xml:space="preserve">
+    <value>音频缓冲区大小</value>
+  </data>
+  <data name="BGM.Header" xml:space="preserve">
+    <value>背景音乐格式</value>
+  </data>
+  <data name="BGM.PlaceholderText" xml:space="preserve">
+    <value>背景音乐格式</value>
+  </data>
+  <data name="ButtonBrowse.Content" xml:space="preserve">
+    <value>浏览文件夹</value>
+  </data>
+  <data name="ButtonDefault.Content" xml:space="preserve">
+    <value>默认设置</value>
+  </data>
+  <data name="ButtonFinish.Content" xml:space="preserve">
+    <value>完成设置</value>
+  </data>
+  <data name="CD.Header" xml:space="preserve">
+    <value>CD 音轨格式</value>
+  </data>
+  <data name="CD.PlaceholderText" xml:space="preserve">
+    <value>CD 音轨格式</value>
+  </data>
+  <data name="DOS.Header" xml:space="preserve">
+    <value>游戏资源版本</value>
+  </data>
+  <data name="DOS.OffContent" xml:space="preserve">
+    <value>WIN95</value>
+  </data>
+  <data name="DOS.OnContent" xml:space="preserve">
+    <value>DOS</value>
+  </data>
+  <data name="EmbeddedFont.Header" xml:space="preserve">
+    <value>使用游戏资源内置字体</value>
+  </data>
+  <data name="EmbeddedFont.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="EmbeddedFont.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="GamePath.Header" xml:space="preserve">
+    <value>游戏资源文件夹</value>
+  </data>
+  <data name="GamePath.PlaceholderText" xml:space="preserve">
+    <value>游戏资源文件夹</value>
+  </data>
+  <data name="Language.Header" xml:space="preserve">
+    <value>游戏资源语言</value>
+  </data>
+  <data name="Language.OffContent" xml:space="preserve">
+    <value>繁体中文</value>
+  </data>
+  <data name="Language.OnContent" xml:space="preserve">
+    <value>简体中文</value>
+  </data>
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>必须指定游戏资源文件夹!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
+    <value>下次启动时要进入配置界面吗?</value>
+  </data>
+  <data name="MBNo" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="MBYes" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="MessageFile.Header" xml:space="preserve">
+    <value>自定义语言文件</value>
+  </data>
+  <data name="MessageFile.PlaceholderText" xml:space="preserve">
+    <value>自定义语言文件</value>
+  </data>
+  <data name="OPL.Header" xml:space="preserve">
+    <value>OPL 模拟器</value>
+  </data>
+  <data name="OPL.PlaceholderText" xml:space="preserve">
+    <value>OPL 模拟器</value>
+  </data>
+  <data name="OPLSR.Header" xml:space="preserve">
+    <value>OPL 模拟器采样率</value>
+  </data>
+  <data name="OPLSR.PlaceholderText" xml:space="preserve">
+    <value>OPL 模拟器采样率</value>
+  </data>
+  <data name="Quality.Header" xml:space="preserve">
+    <value>音频质量</value>
+  </data>
+  <data name="Samplerate.Header" xml:space="preserve">
+    <value>音频输出采样率</value>
+  </data>
+  <data name="Samplerate.PlaceholderText" xml:space="preserve">
+    <value>音频输出采样率</value>
+  </data>
+  <data name="Stereo.Header" xml:space="preserve">
+    <value>立体声</value>
+  </data>
+  <data name="Stereo.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="Stereo.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="SurroundOPL.Header" xml:space="preserve">
+    <value>环绕声 OPL</value>
+  </data>
+  <data name="SurroundOPL.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="SurroundOPL.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>启用触屏辅助</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="Volume.Header" xml:space="preserve">
+    <value>音量</value>
+  </data>
+</root>

+ 258 - 0
winrt/SDLPal.Windows/Strings/zh-hant/Resources.resw

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="AspectRatio.Header" xml:space="preserve">
+    <value>保持縱橫比</value>
+  </data>
+  <data name="AspectRatio.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="AspectRatio.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="AudioBuffer.Header" xml:space="preserve">
+    <value>音訊緩衝區大小</value>
+  </data>
+  <data name="AudioBuffer.PlaceholderText" xml:space="preserve">
+    <value>音訊緩衝區大小</value>
+  </data>
+  <data name="BGM.Header" xml:space="preserve">
+    <value>背景音樂格式</value>
+  </data>
+  <data name="BGM.PlaceholderText" xml:space="preserve">
+    <value>背景音樂格式</value>
+  </data>
+  <data name="ButtonBrowse.Content" xml:space="preserve">
+    <value>瀏覽資料夾</value>
+  </data>
+  <data name="ButtonDefault.Content" xml:space="preserve">
+    <value>默認設定</value>
+  </data>
+  <data name="ButtonFinish.Content" xml:space="preserve">
+    <value>完成設定</value>
+  </data>
+  <data name="CD.Header" xml:space="preserve">
+    <value>CD 音軌格式</value>
+  </data>
+  <data name="CD.PlaceholderText" xml:space="preserve">
+    <value>CD 音軌格式</value>
+  </data>
+  <data name="DOS.Header" xml:space="preserve">
+    <value>遊戲資源版本</value>
+  </data>
+  <data name="DOS.OffContent" xml:space="preserve">
+    <value>WIN95</value>
+  </data>
+  <data name="DOS.OnContent" xml:space="preserve">
+    <value>DOS</value>
+  </data>
+  <data name="EmbeddedFont.Header" xml:space="preserve">
+    <value>使用遊戲資源內置字體</value>
+  </data>
+  <data name="EmbeddedFont.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="EmbeddedFont.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="GamePath.Header" xml:space="preserve">
+    <value>遊戲資源檔夾</value>
+  </data>
+  <data name="GamePath.PlaceholderText" xml:space="preserve">
+    <value>遊戲資源檔夾</value>
+  </data>
+  <data name="Language.Header" xml:space="preserve">
+    <value>遊戲資源語言</value>
+  </data>
+  <data name="Language.OffContent" xml:space="preserve">
+    <value>繁體中文</value>
+  </data>
+  <data name="Language.OnContent" xml:space="preserve">
+    <value>簡體中文</value>
+  </data>
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>必須指定遊戲資源檔夾!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
+    <value>下次啟動時要進入設定介面嗎?</value>
+  </data>
+  <data name="MBNo" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="MBYes" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="MessageFile.Header" xml:space="preserve">
+    <value>自訂語言檔</value>
+  </data>
+  <data name="MessageFile.PlaceholderText" xml:space="preserve">
+    <value>自訂語言檔</value>
+  </data>
+  <data name="OPL.Header" xml:space="preserve">
+    <value>OPL 模擬器</value>
+  </data>
+  <data name="OPL.PlaceholderText" xml:space="preserve">
+    <value>OPL 模擬器</value>
+  </data>
+  <data name="OPLSR.Header" xml:space="preserve">
+    <value>OPL 模擬器取樣速率</value>
+  </data>
+  <data name="OPLSR.PlaceholderText" xml:space="preserve">
+    <value>OPL 模擬器取樣速率</value>
+  </data>
+  <data name="Quality.Header" xml:space="preserve">
+    <value>音訊品質</value>
+  </data>
+  <data name="Samplerate.Header" xml:space="preserve">
+    <value>音訊輸出取樣速率</value>
+  </data>
+  <data name="Samplerate.PlaceholderText" xml:space="preserve">
+    <value>音訊輸出取樣速率</value>
+  </data>
+  <data name="Stereo.Header" xml:space="preserve">
+    <value>立體聲</value>
+  </data>
+  <data name="Stereo.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="Stereo.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="SurroundOPL.Header" xml:space="preserve">
+    <value>環繞聲 OPL</value>
+  </data>
+  <data name="SurroundOPL.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="SurroundOPL.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>啟用觸屏輔助</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
+  <data name="Volume.Header" xml:space="preserve">
+    <value>音量</value>
+  </data>
+</root>

+ 6 - 0
winrt/SDLPal.Windows/pch.cpp

@@ -0,0 +1,6 @@
+//
+// pch.cpp
+// 包含标准头并生成预编译头。
+//
+
+#include "pch.h"

+ 11 - 0
winrt/SDLPal.Windows/pch.h

@@ -0,0 +1,11 @@
+//
+// pch.h
+// 标准系统包含文件的头。
+//
+
+#pragma once
+
+#include <collection.h>
+#include <ppltasks.h>
+
+#include "App.xaml.h"

+ 1 - 10
winrt/SDLPal.WindowsPhone.sln

@@ -13,6 +13,7 @@ EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPal", "SDLPal.WindowsPhone\SDLPal.vcxproj", "{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}"
 	ProjectSection(ProjectDependencies) = postProject
 		{35839F1B-8B1C-4858-91FA-807A693E703F} = {35839F1B-8B1C-4858-91FA-807A693E703F}
+		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB} = {704D3871-2E86-42EF-A607-CBCFB7A7EBAB}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPal.Common", "SDLPal.WindowsPhone\SDLPal.Common.vcxproj", "{35839F1B-8B1C-4858-91FA-807A693E703F}"
@@ -21,60 +22,50 @@ Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|ARM = Debug|ARM
 		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
 		Release|ARM = Release|ARM
 		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Debug|ARM.ActiveCfg = Debug|ARM
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Debug|ARM.Build.0 = Debug|ARM
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Debug|Win32.ActiveCfg = Debug|Win32
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Debug|Win32.Build.0 = Debug|Win32
-		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Debug|x64.ActiveCfg = Debug|Win32
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Release|ARM.ActiveCfg = Release|ARM
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Release|ARM.Build.0 = Release|ARM
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Release|Win32.ActiveCfg = Release|Win32
 		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Release|Win32.Build.0 = Release|Win32
-		{48FADC0E-964D-4DAB-BCED-372E0AD19577}.Release|x64.ActiveCfg = Release|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|ARM.ActiveCfg = Debug|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|ARM.Build.0 = Debug|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|ARM.Deploy.0 = Debug|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|Win32.ActiveCfg = Debug|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|Win32.Build.0 = Debug|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|Win32.Deploy.0 = Debug|Win32
-		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Debug|x64.ActiveCfg = Debug|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|ARM.ActiveCfg = Release|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|ARM.Build.0 = Release|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|ARM.Deploy.0 = Release|ARM
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|Win32.ActiveCfg = Release|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|Win32.Build.0 = Release|Win32
 		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|Win32.Deploy.0 = Release|Win32
-		{704D3871-2E86-42EF-A607-CBCFB7A7EBAB}.Release|x64.ActiveCfg = Release|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|ARM.ActiveCfg = Debug|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|ARM.Build.0 = Debug|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|ARM.Deploy.0 = Debug|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|Win32.ActiveCfg = Debug|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|Win32.Build.0 = Debug|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|Win32.Deploy.0 = Debug|Win32
-		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Debug|x64.ActiveCfg = Debug|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|ARM.ActiveCfg = Release|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|ARM.Build.0 = Release|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|ARM.Deploy.0 = Release|ARM
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|Win32.ActiveCfg = Release|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|Win32.Build.0 = Release|Win32
 		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|Win32.Deploy.0 = Release|Win32
-		{4C240E16-F6F6-4D60-B29B-7F7ACB4815D7}.Release|x64.ActiveCfg = Release|Win32
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Debug|ARM.ActiveCfg = Debug|ARM
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Debug|ARM.Build.0 = Debug|ARM
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Debug|Win32.ActiveCfg = Debug|Win32
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Debug|Win32.Build.0 = Debug|Win32
-		{35839F1B-8B1C-4858-91FA-807A693E703F}.Debug|x64.ActiveCfg = Debug|Win32
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Release|ARM.ActiveCfg = Release|ARM
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Release|ARM.Build.0 = Release|ARM
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Release|Win32.ActiveCfg = Release|Win32
 		{35839F1B-8B1C-4858-91FA-807A693E703F}.Release|Win32.Build.0 = Release|Win32
-		{35839F1B-8B1C-4858-91FA-807A693E703F}.Release|x64.ActiveCfg = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 2 - 21
winrt/SDLPal.WindowsPhone/App.xaml.cpp

@@ -128,29 +128,10 @@ void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e)
 
 void SDLPal::App::OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args)
 {
-	auto main_page = static_cast<MainPage^>(_main_page);
-	switch (args->Kind)
-	{
-	case ActivationKind::PickFolderContinuation:
+	if (args->Kind == ActivationKind::PickFolderContinuation)
 	{
 		auto folder = safe_cast<IFolderPickerContinuationEventArgs^>(args)->Folder;
-		if (folder) main_page->SetPath(folder);
-		break;
-	}
-	case ActivationKind::PickSaveFileContinuation:
-	{
-		auto save_args = safe_cast<IFileSavePickerContinuationEventArgs^>(args);
-		if (save_args->File && save_args->ContinuationData->HasKey("Slot"))
-			main_page->Export(save_args->File, safe_cast<Platform::String^>(save_args->ContinuationData->Lookup("Slot")));
-		break;
-	}
-	case ActivationKind::PickFileContinuation:
-	{
-		auto open_args = safe_cast<IFileOpenPickerContinuationEventArgs^>(args);
-		if (open_args->Files->Size > 0 && open_args->ContinuationData->HasKey("Slot"))
-			main_page->Import(open_args->Files->First()->Current, safe_cast<Platform::String^>(open_args->ContinuationData->Lookup("Slot")));
-		break;
-	}
+		if (folder) static_cast<MainPage^>(_main_page)->SetPath(folder);
 	}
 	Application::OnActivated(args);
 }

+ 1 - 37
winrt/SDLPal.WindowsPhone/MainPage.xaml

@@ -12,13 +12,13 @@
             <StackPanel VerticalAlignment="Top" Margin="10,0,10,0">
                 <TextBox x:Name="tbGamePath" x:Uid="GamePath" TextWrapping="Wrap" VerticalAlignment="Top" Header="游戏资源文件夹" IsReadOnly="True" PlaceholderText="游戏资源文件夹"/>
                 <Grid VerticalAlignment="Top">
-                    <Button x:Name="btnDefaultGame" x:Uid="ButtonRestore" Content="默认文件夹" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btnDefault_Click" />
                     <Button x:Name="btnBrowseGame" x:Uid="ButtonBrowse" Content="浏览文件夹" HorizontalAlignment="Right" VerticalAlignment="Top" Click="btnBrowse_Click" />
                 </Grid>
                 <ToggleSwitch x:Name="tsIsDOS" x:Uid="DOS" Header="游戏资源版本" OffContent="WIN95" OnContent="DOS" Toggled="tsIsDOS_Toggled" />
                 <ToggleSwitch x:Name="tsUseEmbedFont" x:Uid="EmbeddedFont" Header="游戏内嵌字体" OffContent="否" OnContent="是" />
                 <ToggleSwitch x:Name="tsLanguage" x:Uid="Language" Header="游戏资源语言" OffContent="繁体中文" OnContent="简体中文" />
                 <TextBox x:Name="tbMsgFile" x:Uid="MessageFile" Header="自定义语言文件名" TextWrapping="Wrap" VerticalAlignment="Top" PlaceholderText="自定义语言文件名"/>
+                <ToggleSwitch x:Name="tsTouchOverlay" x:Uid="TouchOverlay" Header="启用触屏辅助" OffContent="否" OnContent="是" />
                 <ToggleSwitch x:Name="tsKeepAspect" x:Uid="AspectRatio" Header="保持纵横比" OffContent="否" OnContent="是" />
                 <ToggleSwitch x:Name="tsStereo" x:Uid="Stereo" Header="立体声" OffContent="否" OnContent="是" />
                 <Slider x:Name="slVolume" x:Uid="Volume" Header="音量" TickPlacement="Inline" TickFrequency="10" />
@@ -57,42 +57,6 @@
                     <Button x:Name="btnReset" x:Uid="ButtonDefault" Content="默认设置" HorizontalAlignment="Left" Click="btnReset_Click" />
                     <Button x:Name="btnFinish" x:Uid="ButtonFinish" Content="完成设置" HorizontalAlignment="Right" Click="btnFinish_Click" />
                 </Grid>
-                <Border HorizontalAlignment="Stretch" BorderBrush="LightGray" BorderThickness="2" />
-                <Grid VerticalAlignment="Top">
-                    <TextBlock x:Uid="SaveSlot1" Text="进度一" HorizontalAlignment="Left" Margin="0,14" FontSize="24" />
-                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
-                        <Button x:Name="btnImport1" x:Uid="ButtonImport" Content="导入" Margin="0,0,10,0" Tag="1.rpg" Click="btnImport_Click" />
-                        <Button x:Name="btnExport1" x:Uid="ButtonExport" Content="导出" Margin="10,0,0,0" Tag="1.rpg" Click="btnExport_Click" />
-                    </StackPanel>
-                </Grid>
-                <Grid VerticalAlignment="Top">
-                    <TextBlock x:Uid="SaveSlot2" Text="进度二" HorizontalAlignment="Left" Margin="0,14" FontSize="24" />
-                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
-                        <Button x:Name="btnImport2" x:Uid="ButtonImport" Content="导入" Margin="0,0,10,0" Tag="2.rpg" Click="btnImport_Click" />
-                        <Button x:Name="btnExport2" x:Uid="ButtonExport" Content="导出" Margin="10,0,0,0" Tag="2.rpg" Click="btnExport_Click" />
-                    </StackPanel>
-                </Grid>
-                <Grid VerticalAlignment="Top">
-                    <TextBlock x:Uid="SaveSlot3" Text="进度三" HorizontalAlignment="Left" Margin="0,14" FontSize="24" />
-                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
-                        <Button x:Name="btnImport3" x:Uid="ButtonImport" Content="导入" Margin="0,0,10,0" Tag="3.rpg" Click="btnImport_Click" />
-                        <Button x:Name="btnExport3" x:Uid="ButtonExport" Content="导出" Margin="10,0,0,0" Tag="3.rpg" Click="btnExport_Click" />
-                    </StackPanel>
-                </Grid>
-                <Grid VerticalAlignment="Top">
-                    <TextBlock x:Uid="SaveSlot4" Text="进度四" HorizontalAlignment="Left" Margin="0,14" FontSize="24" />
-                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
-                        <Button x:Name="btnImport4" x:Uid="ButtonImport" Content="导入" Margin="0,0,10,0" Tag="4.rpg" Click="btnImport_Click" />
-                        <Button x:Name="btnExport4" x:Uid="ButtonExport" Content="导出" Margin="10,0,0,0" Tag="4.rpg" Click="btnExport_Click" />
-                    </StackPanel>
-                </Grid>
-                <Grid VerticalAlignment="Top">
-                    <TextBlock x:Uid="SaveSlot5" Text="进度五" HorizontalAlignment="Left" Margin="0,14" FontSize="24" />
-                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
-                        <Button x:Name="btnImport5" x:Uid="ButtonImport" Content="导入" Margin="0,0,10,0" Tag="5.rpg" Click="btnImport_Click" />
-                        <Button x:Name="btnExport5" x:Uid="ButtonExport" Content="导出" Margin="10,0,0,0" Tag="5.rpg" Click="btnExport_Click" />
-                    </StackPanel>
-                </Grid>
             </StackPanel>
         </ScrollViewer>
     </Grid>

+ 17 - 97
winrt/SDLPal.WindowsPhone/MainPage.xaml.cpp

@@ -28,58 +28,17 @@ MainPage::MainPage()
 	InitializeComponent();
 	static_cast<App^>(Application::Current)->SetMainPage(this);
 	LoadControlContents();
-
-	Windows::UI::Xaml::Controls::Button^ buttons[] = { btnExport1, btnExport2, btnExport3, btnExport4, btnExport5 };
-	for (int i = 0; i < 5; i++) m_buttons[i] = buttons[i];
-	CheckSaveSlots();
 }
 
 void SDLPal::MainPage::SetPath(Windows::Storage::StorageFolder^ folder)
 {
+	Windows::Storage::AccessCache::StorageApplicationPermissions::MostRecentlyUsedList->Add(folder, folder->Path);
 	tbGamePath->Text = folder->Path;
-	tbGamePath->Tag = folder;
-}
-
-void SDLPal::MainPage::Export(Windows::Storage::StorageFile^ file, Platform::String^ slot)
-{
-	auto src = AWait(Windows::Storage::ApplicationData::Current->LocalFolder->GetFileAsync(slot), g_eventHandle);
-	try
-	{
-		AWait(src->CopyAndReplaceAsync(file), g_eventHandle);
-	}
-	catch (Platform::Exception^ e)
-	{
-		(ref new Windows::UI::Popups::MessageDialog(e->Message))->ShowAsync();
-	}
-}
-
-void SDLPal::MainPage::Import(Windows::Storage::StorageFile^ file, Platform::String^ slot)
-{
-	try
-	{
-		AWait(file->CopyAsync(Windows::Storage::ApplicationData::Current->LocalFolder, slot, Windows::Storage::NameCollisionOption::ReplaceExisting), g_eventHandle);
-		m_buttons[_wtoi(slot->Data()) - 1]->IsEnabled = true;
-	}
-	catch (Platform::Exception^ e)
-	{
-		(ref new Windows::UI::Popups::MessageDialog(e->Message))->ShowAsync();
-	}
 }
 
 void SDLPal::MainPage::LoadControlContents()
 {
-	if (gConfig.pszGamePath)
-	{
-		tbGamePath->Text = ConvertString(gConfig.pszGamePath);
-		try { tbGamePath->Tag = AWait(Windows::Storage::StorageFolder::GetFolderFromPathAsync(tbGamePath->Text), g_eventHandle); }
-		catch (Platform::Exception^) {}
-	}
-	else
-	{
-		tbGamePath->Tag = Windows::Storage::ApplicationData::Current->LocalFolder;
-		tbGamePath->Text = Windows::Storage::ApplicationData::Current->LocalFolder->Path;
-	}
-
+	if (gConfig.pszGamePath) tbGamePath->Text = ConvertString(gConfig.pszGamePath);
 	if (gConfig.pszMsgFile) tbMsgFile->Text = ConvertString(gConfig.pszMsgFile);
 
 	tsLanguage->IsOn = (gConfig.uCodePage == CP_GBK);
@@ -88,6 +47,7 @@ void SDLPal::MainPage::LoadControlContents()
 	tsKeepAspect->IsOn = (gConfig.fKeepAspectRatio == TRUE);
 	tsStereo->IsOn = (gConfig.iAudioChannels == 2);
 	tsSurroundOPL->IsOn = (gConfig.fUseSurroundOPL == TRUE);
+	tsTouchOverlay->IsOn = (gConfig.fUseTouchOverlay == TRUE);
 
 	slVolume->Value = gConfig.iVolume;
 	slQuality->Value = gConfig.iResampleQuality;
@@ -144,6 +104,7 @@ void SDLPal::MainPage::SaveControlContents()
 	gConfig.fKeepAspectRatio = tsKeepAspect->IsOn ? TRUE : FALSE;
 	gConfig.iAudioChannels = tsStereo->IsOn ? 2 : 1;
 	gConfig.fUseSurroundOPL = tsSurroundOPL->IsOn ? TRUE : FALSE;
+	gConfig.fUseTouchOverlay = tsTouchOverlay->IsOn ? TRUE : FALSE;
 
 	gConfig.iVolume = (int)slVolume->Value;
 	gConfig.iResampleQuality = (int)slQuality->Value;
@@ -158,36 +119,12 @@ void SDLPal::MainPage::SaveControlContents()
 	gConfig.wAudioBufferSize = wcstoul(static_cast<Platform::String^>(static_cast<ComboBoxItem^>(cbAudioBuffer->SelectedItem)->Content)->Data(), nullptr, 10);
 }
 
-void SDLPal::MainPage::CheckSaveSlots()
-{
-	static Platform::String^ slots[] = { "1.rpg", "2.rpg", "3.rpg", "4.rpg", "5.rpg" };
-	auto folder = Windows::Storage::ApplicationData::Current->LocalFolder;
-	for (int i = 0; i < 5; i++)
-	{
-		try
-		{
-			AWait(folder->GetFileAsync(slots[i]), g_eventHandle);
-			m_buttons[i]->IsEnabled = true;
-		}
-		catch (Platform::Exception^)
-		{
-			m_buttons[i]->IsEnabled = false;
-		}
-	}
-}
-
 void SDLPal::MainPage::btnBrowse_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
 {
 	auto picker = ref new Windows::Storage::Pickers::FolderPicker();
 	picker->PickFolderAndContinue();
 }
 
-void SDLPal::MainPage::btnDefault_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-	tbGamePath->Tag = Windows::Storage::ApplicationData::Current->LocalFolder;
-	tbGamePath->Text = Windows::Storage::ApplicationData::Current->LocalFolder->Path;
-}
-
 void SDLPal::MainPage::tsIsDOS_Toggled(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
 {
 	if (tsIsDOS->IsOn)
@@ -221,43 +158,26 @@ void SDLPal::MainPage::btnReset_Click(Platform::Object^ sender, Windows::UI::Xam
 
 
 void SDLPal::MainPage::btnFinish_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-	SaveControlContents();
-	auto loader = ref new Windows::ApplicationModel::Resources::ResourceLoader();
-	auto handler = ref new Windows::UI::Popups::UICommandInvokedHandler(this, &MainPage::CloseUICommandHandler);
-	auto dlg = ref new Windows::UI::Popups::MessageDialog(loader->GetString("MBContent"));
-	dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBYes"), handler, safe_cast<Platform::Object^>(0)));
-	dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBNo"), handler, safe_cast<Platform::Object^>(1)));
-	dlg->ShowAsync();
-}
-
-void SDLPal::MainPage::btnImport_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
 {
 	auto loader = ref new Windows::ApplicationModel::Resources::ResourceLoader();
-	auto picker = ref new Windows::Storage::Pickers::FileOpenPicker();
-	picker->SettingsIdentifier = safe_cast<Platform::String^>(static_cast<Windows::UI::Xaml::Controls::Button^>(sender)->Tag);
-	picker->ContinuationData->Insert("Slot", picker->SettingsIdentifier);
-	picker->FileTypeFilter->Append(".rpg");
-	picker->PickSingleFileAndContinue();
-}
-
-
-void SDLPal::MainPage::btnExport_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-	auto loader = ref new Windows::ApplicationModel::Resources::ResourceLoader();
-	auto picker = ref new Windows::Storage::Pickers::FileSavePicker();
-	picker->FileTypeChoices->Insert(loader->GetString("SaveSlotType"), ref new Platform::Collections::Vector<Platform::String^>(1, { ".rpg" }));
-	picker->SettingsIdentifier = safe_cast<Platform::String^>(static_cast<Windows::UI::Xaml::Controls::Button^>(sender)->Tag);
-	picker->SuggestedFileName = picker->SettingsIdentifier;
-	picker->DefaultFileExtension = ".rpg";
-	picker->ContinuationData->Insert("Slot", picker->SettingsIdentifier);
-	picker->PickSaveFileAndContinue();
+	if (tbGamePath->Text->Length() > 0)
+	{
+		SaveControlContents();
+		auto handler = ref new Windows::UI::Popups::UICommandInvokedHandler(this, &MainPage::CloseUICommandHandler);
+		auto dlg = ref new Windows::UI::Popups::MessageDialog(loader->GetString("MBExitContent"));
+		dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBYes"), handler, safe_cast<Platform::Object^>(0)));
+		dlg->Commands->Append(ref new Windows::UI::Popups::UICommand(loader->GetString("MBNo"), handler, safe_cast<Platform::Object^>(1)));
+		dlg->ShowAsync();
+	}
+	else
+	{
+		(ref new Windows::UI::Popups::MessageDialog(loader->GetString("MBEmptyContent")))->ShowAsync();
+	}
 }
 
 void SDLPal::MainPage::CloseUICommandHandler(Windows::UI::Popups::IUICommand^ command)
 {
 	gConfig.fLaunchSetting = ((int)command->Id == 0);
 	PAL_SaveConfig();
-	for (int i = 0; i < 5; i++) m_buttons[i] = nullptr;
 	Application::Current->Exit();
 }

+ 0 - 8
winrt/SDLPal.WindowsPhone/MainPage.xaml.h

@@ -18,26 +18,18 @@ namespace SDLPal
 		MainPage();
 
 		void SetPath(Windows::Storage::StorageFolder^ folder);
-		void Export(Windows::Storage::StorageFile^ file, Platform::String^ slot);
-		void Import(Windows::Storage::StorageFile^ file, Platform::String^ slot);
 
 	protected:
 		void LoadControlContents();
 		void SaveControlContents();
-		void CheckSaveSlots();
 
 	private:
-		Windows::UI::Xaml::Controls::Button^ m_buttons[5];
-
 		void CloseUICommandHandler(Windows::UI::Popups::IUICommand^ command);
 
 		void btnBrowse_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
-		void btnDefault_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 		void tsIsDOS_Toggled(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 		void cbBGM_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
 		void btnReset_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 		void btnFinish_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
-		void btnImport_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
-		void btnExport_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
 	};
 }

+ 1 - 15
winrt/SDLPal.WindowsPhone/Package.appxmanifest

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
-  <Identity Name="ac4bf6d5-bbea-4be4-a7d8-4a404f7ee2af" Publisher="CN=LouYihua" Version="2.0.0.0" />
+  <Identity Name="ac4bf6d5-bbea-4be4-a7d8-4a404f7ee2af" Publisher="CN=LouYihua" Version="2.0.0.1" />
   <mp:PhoneIdentity PhoneProductId="ac4bf6d5-bbea-4be4-a7d8-4a404f7ee2af" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
   <Properties>
     <DisplayName>SDLPal</DisplayName>
@@ -37,20 +37,6 @@
             </SupportedFileTypes>
           </FileTypeAssociation>
         </Extension>
-        <Extension Category="windows.fileSavePicker">
-          <FileSavePicker>
-            <SupportedFileTypes>
-              <FileType>.rpg</FileType>
-            </SupportedFileTypes>
-          </FileSavePicker>
-        </Extension>
-        <Extension Category="windows.fileOpenPicker">
-          <FileOpenPicker>
-            <SupportedFileTypes>
-              <FileType>.rpg</FileType>
-            </SupportedFileTypes>
-          </FileOpenPicker>
-        </Extension>
       </Extensions>
     </Application>
   </Applications>

+ 4 - 4
winrt/SDLPal.WindowsPhone/SDLPal.Common.vcxproj

@@ -70,24 +70,27 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
     <IgnoreImportLibrary>false</IgnoreImportLibrary>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <SDLCheck>true</SDLCheck>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Common.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -100,7 +103,6 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <SDLCheck>true</SDLCheck>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Common.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -113,7 +115,6 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <SDLCheck>true</SDLCheck>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Common.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -126,7 +127,6 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <SDLCheck>true</SDLCheck>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Common.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>

+ 4 - 4
winrt/SDLPal.WindowsPhone/SDLPal.Core.vcxproj

@@ -64,18 +64,22 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -85,7 +89,6 @@
       <CompileAsWinRT>false</CompileAsWinRT>
       <DisableSpecificWarnings>
       </DisableSpecificWarnings>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Core.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
@@ -101,7 +104,6 @@
       <CompileAsWinRT>false</CompileAsWinRT>
       <DisableSpecificWarnings>
       </DisableSpecificWarnings>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Core.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
@@ -117,7 +119,6 @@
       <CompileAsWinRT>false</CompileAsWinRT>
       <DisableSpecificWarnings>
       </DisableSpecificWarnings>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Core.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
@@ -133,7 +134,6 @@
       <CompileAsWinRT>false</CompileAsWinRT>
       <DisableSpecificWarnings>
       </DisableSpecificWarnings>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Core.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
       <GenerateWindowsMetadata>false</GenerateWindowsMetadata>

+ 16 - 16
winrt/SDLPal.WindowsPhone/SDLPal.vcxproj

@@ -69,34 +69,40 @@
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Label="UserMacros">
+    <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
+    <AppxBundlePlatforms>arm</AppxBundlePlatforms>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
     <IncludePath>..\..\SDL2\include;$(IncludePath)</IncludePath>
     <IntDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName).WindowsPhone\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
     <ClCompile>
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
       <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Main.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>vccorlibd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common;$(OutDir)../SDLPal.Core</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.WindowsPhone;$(OutDir)../SDLPal.Core.WindowsPhone</AdditionalLibraryDirectories>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
@@ -104,12 +110,11 @@
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
       <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Main.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common;$(OutDir)../SDLPal.Core</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.WindowsPhone;$(OutDir)../SDLPal.Core.WindowsPhone</AdditionalLibraryDirectories>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -117,12 +122,11 @@
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
       <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Main.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlibd.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>vccorlibd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common;$(OutDir)../SDLPal.Core</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.WindowsPhone;$(OutDir)../SDLPal.Core.WindowsPhone</AdditionalLibraryDirectories>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -130,12 +134,11 @@
       <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
       <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
       <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).Main.pdb</ProgramDataBaseFileName>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.common.lib;sdlpal.core.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dxgi.lib;dxguid.lib;sdlpal.core.lib;sdlpal.common.lib;vccorlib.lib;msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common;$(OutDir)../SDLPal.Core</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>$(OutDir)../SDLPal.Common.WindowsPhone;$(OutDir)../SDLPal.Core.WindowsPhone</AdditionalLibraryDirectories>
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
@@ -212,9 +215,6 @@
     <ProjectReference Include="..\SDLPal.WindowsPhone\SDLPal.Common.vcxproj">
       <Project>{35839f1b-8b1c-4858-91fa-807a693e703f}</Project>
     </ProjectReference>
-    <ProjectReference Include="SDLPal.Core.vcxproj">
-      <Project>{704d3871-2e86-42ef-a607-cbcfb7a7ebab}</Project>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <ApplicationDefinition Include="App.xaml">

+ 13 - 28
winrt/SDLPal.WindowsPhone/Strings/en/Resources.resw

@@ -144,18 +144,9 @@
   <data name="ButtonDefault.Content" xml:space="preserve">
     <value>Default setting</value>
   </data>
-  <data name="ButtonExport.Content" xml:space="preserve">
-    <value>Export</value>
-  </data>
   <data name="ButtonFinish.Content" xml:space="preserve">
     <value>Finish setting</value>
   </data>
-  <data name="ButtonImport.Content" xml:space="preserve">
-    <value>Import</value>
-  </data>
-  <data name="ButtonRestore.Content" xml:space="preserve">
-    <value>Default folder</value>
-  </data>
   <data name="CD.Header" xml:space="preserve">
     <value>Format of CD track</value>
   </data>
@@ -195,7 +186,10 @@
   <data name="Language.OnContent" xml:space="preserve">
     <value>Simplified Chinese</value>
   </data>
-  <data name="MBContent" xml:space="preserve">
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>The game resource folder must be specified!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
     <value>Launch the setting interface on next start?</value>
   </data>
   <data name="MBNo" xml:space="preserve">
@@ -231,24 +225,6 @@
   <data name="Samplerate.PlaceholderText" xml:space="preserve">
     <value>Sample rate of audio output</value>
   </data>
-  <data name="SaveSlot1.Text" xml:space="preserve">
-    <value>Save slot 1</value>
-  </data>
-  <data name="SaveSlot2.Text" xml:space="preserve">
-    <value>Save slot 2</value>
-  </data>
-  <data name="SaveSlot3.Text" xml:space="preserve">
-    <value>Save slot 3</value>
-  </data>
-  <data name="SaveSlot4.Text" xml:space="preserve">
-    <value>Save slot 4</value>
-  </data>
-  <data name="SaveSlot5.Text" xml:space="preserve">
-    <value>Save slot 5</value>
-  </data>
-  <data name="SaveSlotType" xml:space="preserve">
-    <value>Save slot file</value>
-  </data>
   <data name="Stereo.Header" xml:space="preserve">
     <value>Stereo</value>
   </data>
@@ -267,6 +243,15 @@
   <data name="SurroundOPL.OnContent" xml:space="preserve">
     <value>Yes</value>
   </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>Use touch overlay</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>No</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>Yes</value>
+  </data>
   <data name="Volume.Header" xml:space="preserve">
     <value>Volume</value>
   </data>

+ 13 - 28
winrt/SDLPal.WindowsPhone/Strings/zh-hans/Resources.resw

@@ -144,18 +144,9 @@
   <data name="ButtonDefault.Content" xml:space="preserve">
     <value>默认设置</value>
   </data>
-  <data name="ButtonExport.Content" xml:space="preserve">
-    <value>导出</value>
-  </data>
   <data name="ButtonFinish.Content" xml:space="preserve">
     <value>完成设置</value>
   </data>
-  <data name="ButtonImport.Content" xml:space="preserve">
-    <value>导入</value>
-  </data>
-  <data name="ButtonRestore.Content" xml:space="preserve">
-    <value>默认文件夹</value>
-  </data>
   <data name="CD.Header" xml:space="preserve">
     <value>CD 音轨格式</value>
   </data>
@@ -195,7 +186,10 @@
   <data name="Language.OnContent" xml:space="preserve">
     <value>简体中文</value>
   </data>
-  <data name="MBContent" xml:space="preserve">
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>必须指定游戏资源文件夹!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
     <value>下次启动时要进入配置界面吗?</value>
   </data>
   <data name="MBNo" xml:space="preserve">
@@ -231,24 +225,6 @@
   <data name="Samplerate.PlaceholderText" xml:space="preserve">
     <value>音频输出采样率</value>
   </data>
-  <data name="SaveSlot1.Text" xml:space="preserve">
-    <value>进度一</value>
-  </data>
-  <data name="SaveSlot2.Text" xml:space="preserve">
-    <value>进度二</value>
-  </data>
-  <data name="SaveSlot3.Text" xml:space="preserve">
-    <value>进度三</value>
-  </data>
-  <data name="SaveSlot4.Text" xml:space="preserve">
-    <value>进度四</value>
-  </data>
-  <data name="SaveSlot5.Text" xml:space="preserve">
-    <value>进度五</value>
-  </data>
-  <data name="SaveSlotType" xml:space="preserve">
-    <value>存档文件夹</value>
-  </data>
   <data name="Stereo.Header" xml:space="preserve">
     <value>立体声</value>
   </data>
@@ -267,6 +243,15 @@
   <data name="SurroundOPL.OnContent" xml:space="preserve">
     <value>是</value>
   </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>启用触屏辅助</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
   <data name="Volume.Header" xml:space="preserve">
     <value>音量</value>
   </data>

+ 13 - 28
winrt/SDLPal.WindowsPhone/Strings/zh-hant/Resources.resw

@@ -144,18 +144,9 @@
   <data name="ButtonDefault.Content" xml:space="preserve">
     <value>默認設定</value>
   </data>
-  <data name="ButtonExport.Content" xml:space="preserve">
-    <value>導出</value>
-  </data>
   <data name="ButtonFinish.Content" xml:space="preserve">
     <value>完成設定</value>
   </data>
-  <data name="ButtonImport.Content" xml:space="preserve">
-    <value>導入</value>
-  </data>
-  <data name="ButtonRestore.Content" xml:space="preserve">
-    <value>預設資料夾</value>
-  </data>
   <data name="CD.Header" xml:space="preserve">
     <value>CD 音軌格式</value>
   </data>
@@ -195,7 +186,10 @@
   <data name="Language.OnContent" xml:space="preserve">
     <value>簡體中文</value>
   </data>
-  <data name="MBContent" xml:space="preserve">
+  <data name="MBEmptyContent" xml:space="preserve">
+    <value>必須指定遊戲資源檔夾!</value>
+  </data>
+  <data name="MBExitContent" xml:space="preserve">
     <value>下次啟動時要進入設定介面嗎?</value>
   </data>
   <data name="MBNo" xml:space="preserve">
@@ -231,24 +225,6 @@
   <data name="Samplerate.PlaceholderText" xml:space="preserve">
     <value>音訊輸出取樣速率</value>
   </data>
-  <data name="SaveSlot1.Text" xml:space="preserve">
-    <value>進度一</value>
-  </data>
-  <data name="SaveSlot2.Text" xml:space="preserve">
-    <value>進度二</value>
-  </data>
-  <data name="SaveSlot3.Text" xml:space="preserve">
-    <value>進度三</value>
-  </data>
-  <data name="SaveSlot4.Text" xml:space="preserve">
-    <value>進度四</value>
-  </data>
-  <data name="SaveSlot5.Text" xml:space="preserve">
-    <value>進度五</value>
-  </data>
-  <data name="SaveSlotType" xml:space="preserve">
-    <value>進度檔</value>
-  </data>
   <data name="Stereo.Header" xml:space="preserve">
     <value>立體聲</value>
   </data>
@@ -267,6 +243,15 @@
   <data name="SurroundOPL.OnContent" xml:space="preserve">
     <value>是</value>
   </data>
+  <data name="TouchOverlay.Header" xml:space="preserve">
+    <value>啟用觸屏輔助</value>
+  </data>
+  <data name="TouchOverlay.OffContent" xml:space="preserve">
+    <value>否</value>
+  </data>
+  <data name="TouchOverlay.OnContent" xml:space="preserve">
+    <value>是</value>
+  </data>
   <data name="Volume.Header" xml:space="preserve">
     <value>音量</value>
   </data>