ghorsington há 4 anos atrás
pai
commit
7887fa3bfb
93 ficheiros alterados com 2373 adições e 851 exclusões
  1. 7 7
      Assembly-CSharp.sln
  2. 23 17
      Assembly-CSharp/Assembly-CSharp.csproj
  3. 52 47
      Assembly-CSharp/BaseKagManager.cs
  4. 1 1
      Assembly-CSharp/BasePhotoCustomObject.cs
  5. 1 1
      Assembly-CSharp/BasePhotoWindowManager.cs
  6. 16 9
      Assembly-CSharp/BigThumbnail.cs
  7. 31 15
      Assembly-CSharp/CMSystem.cs
  8. 1 2
      Assembly-CSharp/CameraMain.cs
  9. 84 22
      Assembly-CSharp/CharacterMgr.cs
  10. 4 4
      Assembly-CSharp/ControllerShortcutSettingData.cs
  11. 2 2
      Assembly-CSharp/DanceSetting.cs
  12. 3 3
      Assembly-CSharp/DeskCustomizeWindowManager.cs
  13. 2 3
      Assembly-CSharp/DeskManager.cs
  14. 2 2
      Assembly-CSharp/DummyVRCamera.cs
  15. 3 3
      Assembly-CSharp/DynamicBone.cs
  16. 1 1
      Assembly-CSharp/DynamicSkirtBone.cs
  17. 1 1
      Assembly-CSharp/EditMod.cs
  18. 1 1
      Assembly-CSharp/EmpireLifeModeManager.cs
  19. 1 1
      Assembly-CSharp/FaceWindow.cs
  20. 1 2
      Assembly-CSharp/Facility.cs
  21. 1 1
      Assembly-CSharp/FacilityManager.cs
  22. 20 8
      Assembly-CSharp/GameMain.cs
  23. 1 1
      Assembly-CSharp/GameModeManager.cs
  24. 2 2
      Assembly-CSharp/GameUty.cs
  25. 4 4
      Assembly-CSharp/HandSignShortcut.cs
  26. 1 1
      Assembly-CSharp/ICODES/STUDIO/WWebView/WWebViewSystem.cs
  27. 4 4
      Assembly-CSharp/ICODES/STUDIO/WWebView/WWebViewWin32.cs
  28. 1 2
      Assembly-CSharp/InfinityColorTextureCache.cs
  29. 7 7
      Assembly-CSharp/InvGameItem.cs
  30. 2 3
      Assembly-CSharp/Kasizuki/BigThumbnailKasizuki.cs
  31. 13 5
      Assembly-CSharp/Kasizuki/KasizukiManager.cs
  32. 21 21
      Assembly-CSharp/Leap/Unity/Graphing/RingBuffer.cs
  33. 50 48
      Assembly-CSharp/Maid.cs
  34. 54 6
      Assembly-CSharp/MaidManagementMain.cs
  35. 1 1
      Assembly-CSharp/MaidParts.cs
  36. 1 1
      Assembly-CSharp/MaidProp.cs
  37. 28 5
      Assembly-CSharp/MaidStatus/Status.cs
  38. 212 21
      Assembly-CSharp/MaidStatus/SubMaid.cs
  39. 1 1
      Assembly-CSharp/Menu.cs
  40. 1 1
      Assembly-CSharp/Misc.cs
  41. 1 1
      Assembly-CSharp/ModCompile.cs
  42. 27 26
      Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs
  43. 5 5
      Assembly-CSharp/OVRHaptics.cs
  44. 88 88
      Assembly-CSharp/OVRInput.cs
  45. 1 1
      Assembly-CSharp/OVRLipSyncContext.cs
  46. 2 2
      Assembly-CSharp/OVRLipSyncContextBase.cs
  47. 3 3
      Assembly-CSharp/OVRPlugin.cs
  48. 3 3
      Assembly-CSharp/OvrCamera.cs
  49. 26 26
      Assembly-CSharp/OvrControllerButtons.cs
  50. 1 2
      Assembly-CSharp/OvrHandCamera.cs
  51. 4 4
      Assembly-CSharp/OvrIK.cs
  52. 1 2
      Assembly-CSharp/OvrSelfShotCamera.cs
  53. 1 1
      Assembly-CSharp/PhotoFaceDataShortcutSetter.cs
  54. 1 1
      Assembly-CSharp/PhotoModeSaveAndLoad.cs
  55. 3 4
      Assembly-CSharp/PhotoWindowManager.cs
  56. 2 2
      Assembly-CSharp/PlacementWindow.cs
  57. 4 4
      Assembly-CSharp/PlayerStatus/Status.cs
  58. 0 2
      Assembly-CSharp/Properties/AssemblyInfo.cs
  59. 1 1
      Assembly-CSharp/RenderHeads/Media/AVProVideo/WindowsMediaPlayer.cs
  60. 1 1
      Assembly-CSharp/SceneEdit.cs
  61. 3 3
      Assembly-CSharp/SceneEditWindow/WindowManager.cs
  62. 1 1
      Assembly-CSharp/SceneNPCEdit/SaveData.cs
  63. 19 2
      Assembly-CSharp/ScriptManager.cs
  64. 267 0
      Assembly-CSharp/SerializeStorageManager.cs
  65. 8 8
      Assembly-CSharp/SteamVR.cs
  66. 2 2
      Assembly-CSharp/SteamVR_Controller.cs
  67. 8 8
      Assembly-CSharp/SteamVR_ControllerManager.cs
  68. 2 2
      Assembly-CSharp/SteamVR_LaserPointer.cs
  69. 3 3
      Assembly-CSharp/SteamVR_Render.cs
  70. 18 18
      Assembly-CSharp/SteamVR_RenderModel.cs
  71. 1 1
      Assembly-CSharp/SteamVR_Stats.cs
  72. 1 1
      Assembly-CSharp/SteamVR_TrackedController.cs
  73. 6 6
      Assembly-CSharp/SteamVR_Utils.cs
  74. 49 49
      Assembly-CSharp/TriLib/AssetLoader.cs
  75. 1 1
      Assembly-CSharp/TriLib/AssimpInterop.cs
  76. 1 1
      Assembly-CSharp/UICamera.cs
  77. 349 0
      Assembly-CSharp/UTJ/FbxExporter/FbxExporter.cs
  78. 111 0
      Assembly-CSharp/UTJ/FbxExporter/PinnedArray.cs
  79. 111 0
      Assembly-CSharp/UTJ/FbxExporter/PinnedArray2D.cs
  80. 237 0
      Assembly-CSharp/UTJ/FbxExporter/PinnedList.cs
  81. 58 0
      Assembly-CSharp/UTJ/FbxExporter/PinnedObject.cs
  82. 1 1
      Assembly-CSharp/VREventText.cs
  83. 2 2
      Assembly-CSharp/VRExternalFileLoader.cs
  84. 3 2
      Assembly-CSharp/VRPhotoMenu.cs
  85. 1 1
      Assembly-CSharp/WindowPartsFingerPreset.cs
  86. 3 3
      Assembly-CSharp/XOR32.cs
  87. 1 1
      Assembly-CSharp/YotogiManager.cs
  88. 1 1
      Assembly-CSharp/YotogiOldManager.cs
  89. 1 1
      Assembly-CSharp/YotogiOldSkillUnit.cs
  90. 1 1
      Assembly-CSharp/YotogiSkillListManager.cs
  91. 1 1
      Assembly-CSharp/YotogiSkillUnit.cs
  92. 3 3
      Assembly-CSharp/uGUIUtility.cs
  93. 262 262
      Assembly-CSharp/wf/CRC32.cs

+ 7 - 7
Assembly-CSharp.sln

@@ -1,9 +1,9 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28729.10
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{ADC99AE5-80B8-4837-90A4-0111B739A360}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{ADC99AE5-80B8-4837-90A4-0111B739A360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{ADC99AE5-80B8-4837-90A4-0111B739A360}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{ADC99AE5-80B8-4837-90A4-0111B739A360}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{ADC99AE5-80B8-4837-90A4-0111B739A360}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 23 - 17
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{ADC99AE5-80B8-4837-90A4-0111B739A360}</ProjectGuid>
+    <ProjectGuid>{2815CB53-56FE-4331-A6F6-B4F864C9A9B7}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -34,52 +34,52 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp-firstpass">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="Assembly-UnityScript-firstpass">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="FoveUnityPlugin">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
     </Reference>
     <Reference Include="Ionic.Zlib">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
     </Reference>
     <Reference Include="JsonFx.Json">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
     </Reference>
     <Reference Include="LeapCSharp.NET3.5">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
     </Reference>
     <Reference Include="System">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.dll</HintPath>
     </Reference>
     <Reference Include="System.Core">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
     </Reference>
     <Reference Include="System.Drawing">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine.UI">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
     </Reference>
     <Reference Include="Win32">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\Win32.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\Win32.dll</HintPath>
     </Reference>
     <Reference Include="zxing.unity">
-      <HintPath>A:\com3d2_up144\data\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
+      <HintPath>A:\com3d2_up147.1\data\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -1154,6 +1154,7 @@
     <Compile Include="ScrollViewScroll.cs" />
     <Compile Include="SelectButtonCtrl.cs" />
     <Compile Include="SelectMessage_UI.cs" />
+    <Compile Include="SerializeStorageManager.cs" />
     <Compile Include="SetColorOnSelection.cs" />
     <Compile Include="ShootCutInTex.cs" />
     <Compile Include="Shop.cs" />
@@ -1525,6 +1526,11 @@
     <Compile Include="UserEditAPI.cs" />
     <Compile Include="UserEditCtrl.cs" />
     <Compile Include="UserEditMgr.cs" />
+    <Compile Include="UTJ\FbxExporter\FbxExporter.cs" />
+    <Compile Include="UTJ\FbxExporter\PinnedArray.cs" />
+    <Compile Include="UTJ\FbxExporter\PinnedArray2D.cs" />
+    <Compile Include="UTJ\FbxExporter\PinnedList.cs" />
+    <Compile Include="UTJ\FbxExporter\PinnedObject.cs" />
     <Compile Include="UTY.cs" />
     <Compile Include="VelocityTracker.cs" />
     <Compile Include="ViveBaseStationHide.cs" />

+ 52 - 47
Assembly-CSharp/BaseKagManager.cs

@@ -3821,66 +3821,71 @@ public class BaseKagManager : IDisposable
 			}
 			NDebug.Assert(maid != null, data.drawName + "性格のメインキャラを探せませんでした");
 		}
-		else if (tag_data.IsValid("npc"))
+		else if (tag_data.IsValid("npc") || tag_data.IsValid("sub"))
 		{
-			string text = tag_data.GetTagProperty("npc").AsString();
-			if (SubMaid.Contains(text))
+			bool flag2 = false;
+			if (tag_data.IsValid("sub"))
 			{
-				NDebug.Assert(!flag, "npc指定の男は日対応です[" + text + "]");
-				maid = characterMgr.ActivateNpc(num);
-				NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
-				SubMaid.Data.CharacterStatus characterStatus = (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid) ? SubMaid.GetData(text).status : SubMaid.GetData(text).secondStatus;
-				if (characterStatus == null)
+				string b = tag_data.GetTagProperty("sub").AsString();
+				NDebug.Assert(!flag, "@charaactivateのsubタグはメイド専用です。man指定がされています。");
+				for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
 				{
-					characterStatus = SubMaid.GetData(text).status;
+					Maid stockMaid4 = characterMgr.GetStockMaid(m);
+					if (stockMaid4 != null && stockMaid4.status.heroineType == HeroineType.Sub && stockMaid4.status.subCharaData != null && stockMaid4.status.subCharaData.uniqueName == b)
+					{
+						characterMgr.SetActiveMaid(stockMaid4, num);
+						maid = stockMaid4;
+						flag2 = true;
+						break;
+					}
 				}
-				CharacterMgr.npcDatas[characterStatus.presetName].Apply(maid, false);
 			}
-			else
+			if (!flag2)
 			{
-				NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "キャラクタープリセット設定[" + text + "]の情報が見つかりませんでした");
-				if (!flag)
+				string text = (!tag_data.IsValid("sub")) ? tag_data.GetTagProperty("npc").AsString() : tag_data.GetTagProperty("sub").AsString();
+				if (SubMaid.Contains(text))
 				{
+					NDebug.Assert(!flag, "npc指定の男は日対応です[" + text + "]");
 					maid = characterMgr.ActivateNpc(num);
+					NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
+					SubMaid.Data.CharacterStatus characterStatus = (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid) ? SubMaid.GetData(text).status : SubMaid.GetData(text).secondStatus;
+					if (characterStatus == null)
+					{
+						characterStatus = SubMaid.GetData(text).status;
+					}
+					CharacterMgr.npcDatas[characterStatus.presetName].Apply(maid, false);
 				}
 				else
 				{
-					maid = characterMgr.GetMan(num);
-					NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
+					NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "キャラクタープリセット設定[" + text + "]の情報が見つかりませんでした");
+					if (!flag)
+					{
+						maid = characterMgr.ActivateNpc(num);
+					}
+					else
+					{
+						maid = characterMgr.GetMan(num);
+						NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
+					}
+					if (!flag)
+					{
+						NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
+					}
+					CharacterMgr.npcDatas[text].Apply(maid, false);
 				}
+				maid.gameObject.name = ((!flag) ? "Maid[" : "Man[") + num.ToString() + "]";
 				if (!flag)
 				{
-					NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
-				}
-				CharacterMgr.npcDatas[text].Apply(maid, false);
-			}
-			maid.gameObject.name = ((!flag) ? "Maid[" : "Man[") + num.ToString() + "]";
-			if (!flag)
-			{
-				GameObject gameObject = maid.gameObject;
-				string name = gameObject.name;
-				gameObject.name = string.Concat(new string[]
-				{
-					name,
-					" ",
-					maid.status.firstName,
-					" ",
-					maid.status.lastName
-				});
-			}
-		}
-		else if (tag_data.IsValid("sub"))
-		{
-			string b = tag_data.GetTagProperty("sub").AsString();
-			NDebug.Assert(!flag, "@charaactivateのsubタグはメイド専用です。man指定がされています。");
-			for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
-			{
-				Maid stockMaid4 = characterMgr.GetStockMaid(m);
-				if (stockMaid4 != null && stockMaid4.status.heroineType == HeroineType.Sub && stockMaid4.status.subCharaData != null && stockMaid4.status.subCharaData.uniqueName == b)
-				{
-					characterMgr.SetActiveMaid(stockMaid4, num);
-					maid = stockMaid4;
-					break;
+					GameObject gameObject = maid.gameObject;
+					string name = gameObject.name;
+					gameObject.name = string.Concat(new string[]
+					{
+						name,
+						" ",
+						maid.status.firstName,
+						" ",
+						maid.status.lastName
+					});
 				}
 			}
 		}
@@ -5497,7 +5502,7 @@ public class BaseKagManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_KAG");
-		binary.Write(1440);
+		binary.Write(1470);
 		byte[] array = this.kag_.Serialize();
 		int value = array.Length;
 		binary.Write(value);

+ 1 - 1
Assembly-CSharp/BasePhotoCustomObject.cs

@@ -173,7 +173,7 @@ public abstract class BasePhotoCustomObject : MonoBehaviour, IComparable<BasePho
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write("COM3D2_PHOTO_CUSTOM_OBJECT");
-				binaryWriter.Write(1440);
+				binaryWriter.Write(1470);
 				binaryWriter.Write(this.type.ToString());
 				binaryWriter.Write(this.scale_);
 				binaryWriter.Write(this.enabledTextureColor_);

+ 1 - 1
Assembly-CSharp/BasePhotoWindowManager.cs

@@ -153,7 +153,7 @@ public abstract class BasePhotoWindowManager : MonoBehaviour
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write(this.save_header_uidata);
-				binaryWriter.Write(1440);
+				binaryWriter.Write(1470);
 				binaryWriter.Write(this.save_data_.Count);
 				foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair3 in this.save_data_)
 				{

+ 16 - 9
Assembly-CSharp/BigThumbnail.cs

@@ -4,6 +4,14 @@ using UnityEngine;
 
 public class BigThumbnail : MonoBehaviour
 {
+	public string ThumbnailDictionary
+	{
+		get
+		{
+			return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb");
+		}
+	}
+
 	public void Awake()
 	{
 		this.isEnabled = true;
@@ -111,20 +119,19 @@ public class BigThumbnail : MonoBehaviour
 
 	private void CheckCreateFrame()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = this.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
-			Directory.CreateDirectory(text);
+			Directory.CreateDirectory(thumbnailDictionary);
 		}
-		string path = text + "/frame_single.png";
+		string path = thumbnailDictionary + "/frame_single.png";
 		if (!File.Exists(path))
 		{
 			Texture2D texture2D = Resources.Load<Texture2D>("CharacterSelect/Atlas/DefaultFrame");
 			File.WriteAllBytes(path, texture2D.EncodeToPNG());
 			Resources.UnloadAsset(texture2D);
 		}
-		path = text + "/frame_back.png";
+		path = thumbnailDictionary + "/frame_back.png";
 		if (!File.Exists(path))
 		{
 			Texture2D texture2D2 = Resources.Load<Texture2D>("CharacterSelect/Atlas/DefaultFrameBack");
@@ -136,8 +143,8 @@ public class BigThumbnail : MonoBehaviour
 	private void LoadFrameAndBG()
 	{
 		this.CheckCreateFrame();
-		string str = UTY.gameProjectPath + "\\Thumb";
-		string f_strFileName = str + "/frame_back.png";
+		string thumbnailDictionary = this.ThumbnailDictionary;
+		string f_strFileName = thumbnailDictionary + "/frame_back.png";
 		if (this.bg_sprite_.sprite2D == null)
 		{
 			Texture2D texture2D = UTY.LoadTexture(f_strFileName);
@@ -153,7 +160,7 @@ public class BigThumbnail : MonoBehaviour
 		}
 		if (this.frame_sprite_.sprite2D == null)
 		{
-			f_strFileName = str + "/frame_single.png";
+			f_strFileName = thumbnailDictionary + "/frame_single.png";
 			Texture2D texture2D2 = UTY.LoadTexture(f_strFileName);
 			if (texture2D2 != null)
 			{

+ 31 - 15
Assembly-CSharp/CMSystem.cs

@@ -855,7 +855,7 @@ public class CMSystem
 	{
 		XElement xelement = new XElement("Config", new object[]
 		{
-			new XAttribute("Version", 1440),
+			new XAttribute("Version", 1470),
 			new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
 			new XElement("Screen", new object[]
 			{
@@ -952,14 +952,14 @@ public class CMSystem
 			new XComment("CM3D2 Config"),
 			xelement
 		});
-		string text = UTY.gameProjectPath + "\\";
+		string text = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
 		if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
 		{
-			text += "config.xml";
+			text = Path.Combine(text, "config.xml");
 		}
 		else
 		{
-			text += "config_ovr.xml";
+			text = Path.Combine(text, "config_ovr.xml");
 		}
 		xdocument.Save(text);
 		return true;
@@ -967,14 +967,14 @@ public class CMSystem
 
 	public bool LoadIni()
 	{
-		string text = UTY.gameProjectPath + "\\";
+		string text = GameMain.Instance.SerializeStorageManager.StoreDirectoryPath;
 		if (!GameMain.Instance.VRMode || GameMain.Instance.VRDummyMode)
 		{
-			text += "config.xml";
+			text = Path.Combine(text, "config.xml");
 		}
 		else
 		{
-			text += "config_ovr.xml";
+			text = Path.Combine(text, "config_ovr.xml");
 		}
 		if (File.Exists(text))
 		{
@@ -1185,6 +1185,7 @@ public class CMSystem
 		this.ConfigSystemApply();
 		this.ConfigScreenApply();
 		GameMain.Instance.SoundMgr.Apply();
+		NInput.InputUseLegacyAxisMode = GameMain.Instance.CMSystem.SConfig.InputUseLegacyAxisMode;
 		return true;
 	}
 
@@ -1203,7 +1204,7 @@ public class CMSystem
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_SYSTEM2");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		binaryWriter.Write(this.m_dicEditColorPresetData.Count);
 		foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
 		{
@@ -1221,21 +1222,21 @@ public class CMSystem
 			binaryWriter.Write(keyValuePair3.Key);
 			binaryWriter.Write(keyValuePair3.Value);
 		}
-		File.WriteAllBytes(UTY.gameProjectPath + "\\system.dat", memoryStream.ToArray());
+		File.WriteAllBytes(Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat"), memoryStream.ToArray());
 		memoryStream.Dispose();
 		memoryStream = null;
 	}
 
 	public bool LoadSystem()
 	{
-		string path = UTY.gameProjectPath + "\\system.dat";
-		if (File.Exists(path))
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "system.dat");
+		if (File.Exists(text))
 		{
 			try
 			{
 				this.m_dicEditColorPresetData.Clear();
 				this.m_SystemVers.Clear();
-				using (FileStream fileStream = new FileStream(UTY.gameProjectPath + "\\system.dat", FileMode.Open))
+				using (FileStream fileStream = new FileStream(text, FileMode.Open))
 				{
 					BinaryReader binaryReader = new BinaryReader(fileStream);
 					string a = binaryReader.ReadString();
@@ -1268,7 +1269,7 @@ public class CMSystem
 			}
 			catch (Exception ex)
 			{
-				Debug.LogError("system.datの読み込みに失敗しました\n" + ex.Message);
+				Debug.LogError(text + "の読み込みに失敗しました\n" + ex.Message);
 			}
 			return true;
 		}
@@ -1895,9 +1896,21 @@ public class CMSystem
 			}
 		}
 
+		public bool InputUseLegacyAxisMode
+		{
+			get
+			{
+				return this.inputUseLegacyAxisMode;
+			}
+			set
+			{
+				this.inputUseLegacyAxisMode = value;
+			}
+		}
+
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1440;
+			this.m_nVersion = 1470;
 		}
 
 		public void OnAfterDeserialize()
@@ -1905,7 +1918,7 @@ public class CMSystem
 		}
 
 		[SerializeField]
-		private int m_nVersion = 1440;
+		private int m_nVersion = 1470;
 
 		[SerializeField]
 		private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";
@@ -1982,6 +1995,9 @@ public class CMSystem
 		[SerializeField]
 		private bool m_bPrivateModeSettingHEventEnabled = true;
 
+		[SerializeField]
+		private bool inputUseLegacyAxisMode;
+
 		public enum OVR_MOVE_TYPE
 		{
 			WARP_DRAW_STEPROT,

+ 1 - 2
Assembly-CSharp/CameraMain.cs

@@ -1042,8 +1042,7 @@ public class CameraMain : MonoBehaviour
 
 	private string GetTimeFileName()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "ScreenShot";
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "ScreenShot");
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 84 - 22
Assembly-CSharp/CharacterMgr.cs

@@ -27,6 +27,14 @@ public class CharacterMgr : MonoBehaviour
 		}
 	}
 
+	public string PresetDirectory
+	{
+		get
+		{
+			return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Preset");
+		}
+	}
+
 	public GameObject CharacterAll
 	{
 		get
@@ -991,7 +999,7 @@ public class CharacterMgr : MonoBehaviour
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		string result = string.Empty;
 		binaryWriter.Write("CM3D2_PRESET_S");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		binaryWriter.Write((char)presset_type);
 		maid.SerializePropLowCapacity(binaryWriter);
 		maid.SerializeMultiColor(binaryWriter);
@@ -1008,7 +1016,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1033,13 +1041,12 @@ public class CharacterMgr : MonoBehaviour
 		});
 		text = UTY.FileNameEscape(text);
 		text += ".preset";
-		string str = UTY.gameProjectPath + "\\";
-		string text2 = str + "Preset";
-		if (!Directory.Exists(text2))
+		string presetDirectory = this.PresetDirectory;
+		if (!Directory.Exists(presetDirectory))
 		{
-			Directory.CreateDirectory(text2);
+			Directory.CreateDirectory(presetDirectory);
 		}
-		File.WriteAllBytes(text2 + "\\" + text, memoryStream.ToArray());
+		File.WriteAllBytes(presetDirectory + "\\" + text, memoryStream.ToArray());
 		memoryStream.Dispose();
 		preset.texThum = texture2D;
 		preset.strFileName = text;
@@ -1054,7 +1061,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1088,13 +1095,12 @@ public class CharacterMgr : MonoBehaviour
 		});
 		text = UTY.FileNameEscape(text);
 		text += ".png";
-		string str = UTY.gameProjectPath + "\\";
-		string text2 = str + "Preset";
-		if (!Directory.Exists(text2))
+		string presetDirectory = this.PresetDirectory;
+		if (!Directory.Exists(presetDirectory))
 		{
-			Directory.CreateDirectory(text2);
+			Directory.CreateDirectory(presetDirectory);
 		}
-		File.WriteAllBytes(text2 + "\\" + text, bytes);
+		File.WriteAllBytes(presetDirectory + "\\" + text, bytes);
 	}
 
 	public static CharacterMgr.Preset LoadePresetLowCapacityData(string data_text)
@@ -1188,9 +1194,8 @@ public class CharacterMgr : MonoBehaviour
 	{
 		try
 		{
-			string str = UTY.gameProjectPath + "\\";
-			string str2 = str + "Preset";
-			string text = str2 + "\\" + f_pre.strFileName;
+			string presetDirectory = this.PresetDirectory;
+			string text = presetDirectory + "\\" + f_pre.strFileName;
 			if (File.Exists(text))
 			{
 				File.Delete(text);
@@ -1209,13 +1214,12 @@ public class CharacterMgr : MonoBehaviour
 	public List<CharacterMgr.Preset> PresetListLoad()
 	{
 		List<CharacterMgr.Preset> list = new List<CharacterMgr.Preset>();
-		string str = UTY.gameProjectPath + "\\";
-		string path = str + "Preset";
-		if (!Directory.Exists(path))
+		string presetDirectory = this.PresetDirectory;
+		if (!Directory.Exists(presetDirectory))
 		{
-			Directory.CreateDirectory(path);
+			Directory.CreateDirectory(presetDirectory);
 		}
-		foreach (string f_strFileName in Directory.GetFiles(path, "*.preset"))
+		foreach (string f_strFileName in Directory.GetFiles(presetDirectory, "*.preset"))
 		{
 			CharacterMgr.Preset item = this.PresetLoad(f_strFileName);
 			list.Add(item);
@@ -1318,7 +1322,7 @@ public class CharacterMgr : MonoBehaviour
 	public bool Serialize(BinaryWriter bwWrite)
 	{
 		bwWrite.Write("CM3D2_CHR_MGR");
-		bwWrite.Write(1440);
+		bwWrite.Write(1470);
 		this.m_PlayerStatus.Serialize(bwWrite);
 		bwWrite.Write(this.m_listStockMan.Count);
 		for (int i = 0; i < this.m_listStockMan.Count; i++)
@@ -1411,6 +1415,62 @@ public class CharacterMgr : MonoBehaviour
 		return true;
 	}
 
+	public bool SerializeAddition(BinaryWriter writer)
+	{
+		if (this.subMaidBackupStatusList == null)
+		{
+			this.subMaidBackupStatusList = new List<SubMaid.BackupStatus>();
+		}
+		byte[] array = new byte[0];
+		MemoryStream memoryStream = new MemoryStream();
+		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
+		int count = this.subMaidBackupStatusList.Count;
+		binaryWriter.Write(count);
+		for (int i = 0; i < this.subMaidBackupStatusList.Count; i++)
+		{
+			binaryWriter.Write(JsonUtility.ToJson(this.subMaidBackupStatusList[i]));
+			if (this.subMaidBackupStatusList[i].iconBinary == null)
+			{
+				this.subMaidBackupStatusList[i].iconBinary = new byte[0];
+			}
+			if (this.subMaidBackupStatusList[i].presetBinary == null)
+			{
+				this.subMaidBackupStatusList[i].presetBinary = new byte[0];
+			}
+			binaryWriter.Write(this.subMaidBackupStatusList[i].iconBinary.Length);
+			binaryWriter.Write(this.subMaidBackupStatusList[i].iconBinary);
+			binaryWriter.Write(this.subMaidBackupStatusList[i].presetBinary.Length);
+			binaryWriter.Write(this.subMaidBackupStatusList[i].presetBinary);
+		}
+		array = Utility.ZlibCompresss(memoryStream.ToArray());
+		writer.Write(array.Length);
+		writer.Write(array);
+		return true;
+	}
+
+	public bool DeserializeAddition(BinaryReader reader)
+	{
+		int count = reader.ReadInt32();
+		byte[] buffer = Utility.ZlibUncompress(reader.ReadBytes(count));
+		BinaryReader binaryReader = new BinaryReader(new MemoryStream(buffer));
+		if (this.subMaidBackupStatusList == null)
+		{
+			this.subMaidBackupStatusList = new List<SubMaid.BackupStatus>();
+		}
+		this.subMaidBackupStatusList.Clear();
+		int num = binaryReader.ReadInt32();
+		for (int i = 0; i < num; i++)
+		{
+			SubMaid.BackupStatus backupStatus = JsonUtility.FromJson<SubMaid.BackupStatus>(binaryReader.ReadString());
+			int count2 = binaryReader.ReadInt32();
+			backupStatus.iconBinary = binaryReader.ReadBytes(count2);
+			count2 = binaryReader.ReadInt32();
+			backupStatus.presetBinary = binaryReader.ReadBytes(count2);
+			this.subMaidBackupStatusList.Add(backupStatus);
+		}
+		return true;
+	}
+
 	public const int MaidStockMax = 999;
 
 	public const int ActiveMaidSlotCount = 18;
@@ -1421,6 +1481,8 @@ public class CharacterMgr : MonoBehaviour
 
 	private static bool m_bEditMode;
 
+	public List<SubMaid.BackupStatus> subMaidBackupStatusList = new List<SubMaid.BackupStatus>();
+
 	private GameObject m_goCharacter;
 
 	private GameObject m_goActive;

+ 4 - 4
Assembly-CSharp/ControllerShortcutSettingData.cs

@@ -33,7 +33,7 @@ public static class ControllerShortcutSettingData
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1440;
+			this.m_nVersion = 1470;
 		}
 
 		public void OnAfterDeserialize()
@@ -43,7 +43,7 @@ public static class ControllerShortcutSettingData
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = UTY.gameProjectPath + "\\OvrControllerShortcutConfig.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "OvrControllerShortcutConfig.json");
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -58,7 +58,7 @@ public static class ControllerShortcutSettingData
 
 		public ControllerShortcutSettingData.OvrControllerShortcutConfig ReadAndSet()
 		{
-			string path = UTY.gameProjectPath + "\\OvrControllerShortcutConfig.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "OvrControllerShortcutConfig.json");
 			if (!File.Exists(path))
 			{
 				this.CreateDefaultData();
@@ -261,7 +261,7 @@ public static class ControllerShortcutSettingData
 		private const string CONF_NAME = "OvrControllerShortcutConfig.json";
 
 		[SerializeField]
-		private int m_nVersion = 1440;
+		private int m_nVersion = 1470;
 
 		[SerializeField]
 		private bool IsDirectShortcutMode = true;

+ 2 - 2
Assembly-CSharp/DanceSetting.cs

@@ -73,7 +73,7 @@ public class DanceSetting : MonoBehaviour
 					}
 				}
 			};
-			string text = UTY.gameProjectPath + "\\dance_setting_br.dat";
+			string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "dance_setting_br.dat");
 			DanceSetting.m_IsFileExist = File.Exists(text);
 			if (DanceSetting.m_IsFileExist)
 			{
@@ -322,7 +322,7 @@ public class DanceSetting : MonoBehaviour
 
 	private void OnDestroy()
 	{
-		using (FileStream fileStream = new FileStream(UTY.gameProjectPath + "\\dance_setting_br.dat", FileMode.Create, FileAccess.Write))
+		using (FileStream fileStream = new FileStream(Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "dance_setting_br.dat"), FileMode.Create, FileAccess.Write))
 		{
 			BinaryFormatter binaryFormatter = new BinaryFormatter();
 			binaryFormatter.Serialize(fileStream, "@Dance_Setting");

+ 3 - 3
Assembly-CSharp/DeskCustomizeWindowManager.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using UnityEngine;
 
 public class DeskCustomizeWindowManager : BasePhotoWindowManager
@@ -33,9 +34,8 @@ public class DeskCustomizeWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			string str = UTY.gameProjectPath + "\\";
-			string str2 = str + "SaveData";
-			return str2 + "/CustomizeUISetting.save";
+			string str = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "SaveData");
+			return str + "/CustomizeUISetting.save";
 		}
 	}
 

+ 2 - 3
Assembly-CSharp/DeskManager.cs

@@ -143,7 +143,7 @@ internal class DeskManager
 	public static void SerializeSingleSaveData(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_DeskCustomize");
-		binary.Write(1440);
+		binary.Write(1470);
 		binary.Write(DeskManager.item_inst_data_.Count);
 		for (int i = 0; i < DeskManager.item_inst_data_.Count; i++)
 		{
@@ -154,8 +154,7 @@ internal class DeskManager
 
 	public static void Deserialize()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "SaveData";
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "SaveData");
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 2 - 2
Assembly-CSharp/DummyVRCamera.cs

@@ -315,7 +315,7 @@ public class DummyVRCamera : OvrCamera
 		}
 		if (this.m_DummyHand != null)
 		{
-			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0u);
+			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0U);
 		}
 		if (this.m_BloomOVR != null)
 		{
@@ -434,7 +434,7 @@ public class DummyVRCamera : OvrCamera
 			{
 				this.m_trBaseHead.Rotate(new Vector3(0f, 1f, 0f), 90f * base.RotSpeedAccel * Time.deltaTime, Space.World);
 			}
-			if (!base.IsUIShow && !this.m_bSlideMoving && 0f <= Input.mousePosition.x && Input.mousePosition.x < (float)Screen.width && 0f <= Input.mousePosition.y && Input.mousePosition.y < (float)Screen.height && Cursor.lockState == CursorLockMode.Locked && !Cursor.visible && !base.IsFadeOut())
+			if (!base.IsUIShow && !this.m_bSlideMoving && 0f <= Input.mousePosition.x && Input.mousePosition.x < (float)Screen.width && 0f <= Input.mousePosition.y && Input.mousePosition.y < (float)Screen.height && (NInput.InputUseLegacyAxisMode || (Cursor.lockState == CursorLockMode.Locked && !Cursor.visible)) && !base.IsFadeOut())
 			{
 				this.m_vHeadRotTarget.x = this.m_vHeadRotTarget.x - NInput.GetAxis("Mouse Y") * this.m_fHeadRotSpeed * base.RotMouseSpeedAccel;
 				this.m_vHeadRotTarget.y = this.m_vHeadRotTarget.y + NInput.GetAxis("Mouse X") * this.m_fHeadRotSpeed * base.RotMouseSpeedAccel;

+ 3 - 3
Assembly-CSharp/DynamicBone.cs

@@ -30,7 +30,7 @@ public class DynamicBone : MonoBehaviour
 			return false;
 		};
 		f_bw.Write("CM3D21_PHY");
-		f_bw.Write(1440);
+		f_bw.Write(1470);
 		if (this.m_Root == null)
 		{
 			NDebug.MessageBox("エラー", "×物理ルートボーンが設定されていません。");
@@ -94,7 +94,7 @@ public class DynamicBone : MonoBehaviour
 	public bool SerializeWriteCollider(BinaryWriter f_bw, string f_strFileName)
 	{
 		f_bw.Write("CM3D21_COL");
-		f_bw.Write(1440);
+		f_bw.Write(1470);
 		if (this.m_Colliders == null || this.m_Colliders.Count == 0)
 		{
 			NDebug.MessageBox("エラー", "×物理Collidersは空です。");
@@ -110,7 +110,7 @@ public class DynamicBone : MonoBehaviour
 			else
 			{
 				f_bw.Write(this.m_Colliders[i].TypeName);
-				this.m_Colliders[i].Serialize(f_bw, 1440);
+				this.m_Colliders[i].Serialize(f_bw, 1470);
 			}
 		}
 		this.m_ColliderFileName = f_strFileName;

+ 1 - 1
Assembly-CSharp/DynamicSkirtBone.cs

@@ -18,7 +18,7 @@ public class DynamicSkirtBone : MonoBehaviour
 	public bool SerializeWrite(BinaryWriter f_bw)
 	{
 		f_bw.Write("CM3D21_PSK");
-		f_bw.Write(1440);
+		f_bw.Write(1470);
 		f_bw.Write(this.m_fPanierRadius);
 		this.SerializeWriteAnimationCurve(f_bw, this.m_PanierRadiusDistrib);
 		int num = (this.m_PanierRadiusDistribGroup == null) ? 0 : this.m_PanierRadiusDistribGroup.Length;

+ 1 - 1
Assembly-CSharp/EditMod.cs

@@ -303,7 +303,7 @@ public class EditMod : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MOD");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		binaryWriter.Write(value);
 		binaryWriter.Write(text2.ToLower());
 		binaryWriter.Write(value2);

+ 1 - 1
Assembly-CSharp/EmpireLifeModeManager.cs

@@ -477,7 +477,7 @@ public class EmpireLifeModeManager : MonoBehaviour
 	public bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_LIFE_MODE_MGR");
-		brWrite.Write(1440);
+		brWrite.Write(1470);
 		brWrite.Write("2");
 		DataArray<int, byte> saveDataScenarioExecuteCountArray = this.m_SaveDataScenarioExecuteCountArray;
 		if (EmpireLifeModeManager.<>f__mg$cache1 == null)

+ 1 - 1
Assembly-CSharp/FaceWindow.cs

@@ -176,7 +176,7 @@ public class FaceWindow : BaseMaidPhotoWindow
 			if (keyValuePair.Value == check_box)
 			{
 				maidStoreData[keyValuePair.Key] = check_box.check.ToString();
-				foreach (string array4 in array3)
+				foreach (string[] array4 in array3)
 				{
 					if (0 <= Array.IndexOf<string>(array4, keyValuePair.Key))
 					{

+ 1 - 2
Assembly-CSharp/Facility.cs

@@ -585,8 +585,7 @@ public class Facility : MonoBehaviour
 
 	public static string GetFacilityEditCostumeThumbnailPath()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		return str + "Thumb\\";
+		return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb") + "\\";
 	}
 
 	public string GetFacilityEditCostumeThumbnailName()

+ 1 - 1
Assembly-CSharp/FacilityManager.cs

@@ -657,7 +657,7 @@ public class FacilityManager : MonoBehaviour
 		Stopwatch stopwatch = new Stopwatch();
 		stopwatch.Start();
 		brWrite.Write("CM3D21_FACILITY_MGR");
-		brWrite.Write(1440);
+		brWrite.Write(1470);
 		brWrite.Write("5");
 		int num = 0;
 		for (int i = 0; i < this.m_FacilityArray.Count; i++)

+ 20 - 8
Assembly-CSharp/GameMain.cs

@@ -74,6 +74,8 @@ public class GameMain : MonoSingleton<GameMain>
 		}
 	}
 
+	public SerializeStorageManager SerializeStorageManager { get; private set; }
+
 	public ScriptManager ScriptMgr
 	{
 		get
@@ -391,6 +393,7 @@ public class GameMain : MonoSingleton<GameMain>
 		NDebug.Assert(transform2 != null, "__GameMain__の子にCameraが居ません。");
 		transform2.position = Vector3.zero;
 		GameUty.DeviceInitialize();
+		this.SerializeStorageManager = new SerializeStorageManager();
 		this.m_System = new CMSystem();
 		GameUty.Init();
 		this.m_SoundMgr = base.gameObject.AddComponent<SoundMgr>().GetComponent<SoundMgr>();
@@ -679,7 +682,7 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.strComment = f_strComment;
 		serializeHeader.productTypeID = (int)Product.type;
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		this.SerializeWriteHeader(binaryWriter, serializeHeader);
 		binaryWriter.Write("bookmark_kk_01");
 		GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryWriter);
@@ -718,8 +721,9 @@ public class GameMain : MonoSingleton<GameMain>
 		CasinoDataMgr.Instance.Serialize(binaryWriter);
 		VsDanceDataMgr.Instance.Serialize(binaryWriter);
 		SaveData.Serialize(binaryWriter);
-		binaryWriter.Write(1001);
+		binaryWriter.Write(1002);
 		PrivateModeMgr.Instance.Serialize(binaryWriter);
+		this.m_CharacterMgr.SerializeAddition(binaryWriter);
 		string path = this.MakeSavePathFileName(f_nSaveNo);
 		File.WriteAllBytes(path, memoryStream.ToArray());
 		memoryStream.Close();
@@ -742,8 +746,7 @@ public class GameMain : MonoSingleton<GameMain>
 
 	public string MakeSavePathFileName(int f_nSaveNo)
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "SaveData";
+		string text = Path.Combine(this.SerializeStorageManager.StoreDirectoryPath, "SaveData");
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -799,7 +802,7 @@ public class GameMain : MonoSingleton<GameMain>
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		this.SerializeWriteHeader(binaryWriter, saveDataHeader);
 		binaryWriter.Write(array, (int)saveDataHeader.lHeaderSize, (int)((long)array.Length - saveDataHeader.lHeaderSize));
 		File.WriteAllBytes(path, memoryStream.ToArray());
@@ -1106,6 +1109,10 @@ public class GameMain : MonoSingleton<GameMain>
 			{
 				PrivateModeMgr.Instance.Deserialize(binaryReader, num);
 			}
+			if (num3 >= 1002)
+			{
+				this.m_CharacterMgr.DeserializeAddition(binaryReader);
+			}
 			binaryReader.Close();
 			binaryReader = null;
 		}
@@ -1186,8 +1193,7 @@ public class GameMain : MonoSingleton<GameMain>
 
 	public void UpdateSaveDataDay()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string path = str + "SaveData";
+		string path = Path.Combine(this.SerializeStorageManager.StoreDirectoryPath, "SaveData");
 		int num = -1;
 		if (Directory.Exists(path))
 		{
@@ -1327,8 +1333,14 @@ public class GameMain : MonoSingleton<GameMain>
 		}
 	}
 
+	private void OnApplicationFocus(bool focus)
+	{
+		NInput.ResetFocus();
+	}
+
 	private void Update()
 	{
+		NInput.SelfUpdate();
 		if (GameMain.Instance.VRMode)
 		{
 			NInput.SelfUpdateVR();
@@ -1387,7 +1399,7 @@ public class GameMain : MonoSingleton<GameMain>
 		Product.OnApplicationQuit();
 	}
 
-	private const int SaveDataVersion = 1001;
+	private const int SaveDataVersion = 1002;
 
 	private static GameMain m_objInstance;
 

+ 1 - 1
Assembly-CSharp/GameModeManager.cs

@@ -32,7 +32,7 @@ public static class GameModeManager
 	public static bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_GAME_MODE_MGR");
-		brWrite.Write(1440);
+		brWrite.Write(1470);
 		brWrite.Write(1);
 		brWrite.Write((int)GameModeManager.m_NowGameModeType);
 		return true;

+ 2 - 2
Assembly-CSharp/GameUty.cs

@@ -1404,14 +1404,14 @@ public class GameUty
 
 	public static string GetBuildVersionText()
 	{
-		int num = 1440;
+		int num = 1470;
 		return (num >= 1000) ? ((float)num / 1000f).ToString("F2") : ((float)num / 100f).ToString("F2");
 	}
 
 	public static string GetGameVersionText()
 	{
 		string text = "COM3D2x64.exe";
-		int num = 1440;
+		int num = 1470;
 		string path = UTY.gameProjectPath + "\\update.lst";
 		string[] array = new string[0];
 		if (File.Exists(path))

+ 4 - 4
Assembly-CSharp/HandSignShortcut.cs

@@ -506,7 +506,7 @@ public class HandSignShortcut : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1440;
+			this.m_nVersion = 1470;
 		}
 
 		public void OnAfterDeserialize()
@@ -516,7 +516,7 @@ public class HandSignShortcut : MonoBehaviour
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = UTY.gameProjectPath + "\\MaidFingerDataList.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "MaidFingerDataList.json");
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -531,7 +531,7 @@ public class HandSignShortcut : MonoBehaviour
 
 		public HandSignShortcut.Serializer ReadAndSet()
 		{
-			string path = UTY.gameProjectPath + "\\MaidFingerDataList.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "MaidFingerDataList.json");
 			if (!File.Exists(path))
 			{
 				this.CreateDefaultData();
@@ -815,7 +815,7 @@ public class HandSignShortcut : MonoBehaviour
 		private const string CONF_NAME = "MaidFingerDataList.json";
 
 		[SerializeField]
-		private int m_nVersion = 1440;
+		private int m_nVersion = 1470;
 
 		[SerializeField]
 		private List<HandSignShortcut.MaidFingerData> MaidFingerDataList = new List<HandSignShortcut.MaidFingerData>();

+ 1 - 1
Assembly-CSharp/ICODES/STUDIO/WWebView/WWebViewSystem.cs

@@ -13,7 +13,7 @@ namespace ICODES.STUDIO.WWebView
 
 		private void InitializeWinPlayer()
 		{
-			WWebViewWin32.ModifyStyle(WWebViewWin32.FindUnityPlayerWindow(), 0L, 33554432L, 0u);
+			WWebViewWin32.ModifyStyle(WWebViewWin32.FindUnityPlayerWindow(), 0L, 33554432L, 0U);
 			WWebViewWin32.SubclassWindow();
 			base.StartCoroutine("DispatchMessage");
 		}

+ 4 - 4
Assembly-CSharp/ICODES/STUDIO/WWebView/WWebViewWin32.cs

@@ -151,9 +151,9 @@ namespace ICODES.STUDIO.WWebView
 				return false;
 			}
 			User32.SetWindowLong(window, -16, intPtr);
-			if (flags != 0u)
+			if (flags != 0U)
 			{
-				User32.SetWindowPos(window, IntPtr.Zero, 0, 0, 0, 0, 23u | flags);
+				User32.SetWindowPos(window, IntPtr.Zero, 0, 0, 0, 0, 23U | flags);
 			}
 			return true;
 		}
@@ -195,7 +195,7 @@ namespace ICODES.STUDIO.WWebView
 						}
 					}
 				}
-				intPtr = User32.GetWindow(intPtr, 2u);
+				intPtr = User32.GetWindow(intPtr, 2U);
 			}
 			return IntPtr.Zero;
 		}
@@ -230,7 +230,7 @@ namespace ICODES.STUDIO.WWebView
 		{
 			bool flag = false;
 			IntPtr result = IntPtr.Zero;
-			if (message == 16u)
+			if (message == 16U)
 			{
 				flag = WWebViewWin32.OnClose(window, message, wparam, lparam, ref result);
 			}

+ 1 - 2
Assembly-CSharp/InfinityColorTextureCache.cs

@@ -229,8 +229,7 @@ public class InfinityColorTextureCache
 
 	public static string GetTimeFileName()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "ScreenShot/_tmp";
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "ScreenShot") + "/_tmp";
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 7 - 7
Assembly-CSharp/InvGameItem.cs

@@ -121,25 +121,25 @@ public class InvGameItem
 				result = new Color(1f, 1f, 1f);
 				break;
 			case InvGameItem.Quality.Polished:
-				result = NGUIMath.HexToColor(3774856959u);
+				result = NGUIMath.HexToColor(3774856959U);
 				break;
 			case InvGameItem.Quality.Improved:
-				result = NGUIMath.HexToColor(2480359935u);
+				result = NGUIMath.HexToColor(2480359935U);
 				break;
 			case InvGameItem.Quality.Crafted:
-				result = NGUIMath.HexToColor(1325334783u);
+				result = NGUIMath.HexToColor(1325334783U);
 				break;
 			case InvGameItem.Quality.Superior:
-				result = NGUIMath.HexToColor(12255231u);
+				result = NGUIMath.HexToColor(12255231U);
 				break;
 			case InvGameItem.Quality.Enchanted:
-				result = NGUIMath.HexToColor(1937178111u);
+				result = NGUIMath.HexToColor(1937178111U);
 				break;
 			case InvGameItem.Quality.Epic:
-				result = NGUIMath.HexToColor(2516647935u);
+				result = NGUIMath.HexToColor(2516647935U);
 				break;
 			case InvGameItem.Quality.Legendary:
-				result = NGUIMath.HexToColor(4287627519u);
+				result = NGUIMath.HexToColor(4287627519U);
 				break;
 			}
 			return result;

+ 2 - 3
Assembly-CSharp/Kasizuki/BigThumbnailKasizuki.cs

@@ -105,8 +105,7 @@ namespace Kasizuki
 
 		private void CheckCreateFrame()
 		{
-			string str = UTY.gameProjectPath + "\\";
-			string text = str + "Thumb";
+			string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb");
 			if (!Directory.Exists(text))
 			{
 				Directory.CreateDirectory(text);
@@ -130,7 +129,7 @@ namespace Kasizuki
 		private void LoadFrameAndBG()
 		{
 			this.CheckCreateFrame();
-			string str = UTY.gameProjectPath + "\\Thumb";
+			string str = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb");
 			string f_strFileName = str + "/frame_back.png";
 			if (this.m_BGSprite.sprite2D == null)
 			{

+ 13 - 5
Assembly-CSharp/Kasizuki/KasizukiManager.cs

@@ -57,6 +57,14 @@ namespace Kasizuki
 			}
 		}
 
+		public static string ThumbnailDictionary
+		{
+			get
+			{
+				return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb");
+			}
+		}
+
 		private void Awake()
 		{
 		}
@@ -864,7 +872,7 @@ namespace Kasizuki
 		public void Serialize(BinaryWriter bw)
 		{
 			bw.Write("COM3D2_KASIZUKI");
-			bw.Write(1440);
+			bw.Write(1470);
 			this.SerializeOriginHeader(bw);
 			foreach (KeyValuePair<int, KasizukiManager.SaveData> keyValuePair in this.m_SaveDataArray)
 			{
@@ -1041,7 +1049,7 @@ namespace Kasizuki
 		public static Texture2D GetMaidThumbnail(Maid maid)
 		{
 			Texture2D result = null;
-			string text = UTY.gameProjectPath + "\\Thumb\\";
+			string text = KasizukiManager.ThumbnailDictionary + "\\";
 			if (!Directory.Exists(text))
 			{
 				Directory.CreateDirectory(text);
@@ -1065,7 +1073,7 @@ namespace Kasizuki
 
 		public static bool IsExistMaidThumbnail(Maid maid)
 		{
-			string text = UTY.gameProjectPath + "\\Thumb\\";
+			string text = KasizukiManager.ThumbnailDictionary + "\\";
 			if (!Directory.Exists(text))
 			{
 				return false;
@@ -1082,7 +1090,7 @@ namespace Kasizuki
 
 		private static void FixMaidThumbnails()
 		{
-			string text = UTY.gameProjectPath + "\\Thumb\\";
+			string text = KasizukiManager.ThumbnailDictionary + "\\";
 			if (!Directory.Exists(text))
 			{
 				return;
@@ -1131,7 +1139,7 @@ namespace Kasizuki
 
 		private static void DeleteTmpMaidThumnails()
 		{
-			string text = UTY.gameProjectPath + "\\Thumb\\";
+			string text = KasizukiManager.ThumbnailDictionary + "\\";
 			if (!Directory.Exists(text))
 			{
 				return;

+ 21 - 21
Assembly-CSharp/Leap/Unity/Graphing/RingBuffer.cs

@@ -18,8 +18,8 @@ namespace Leap.Unity.Graphing
 			}
 			this._array = new T[num];
 			this.recalculateIndexMask();
-			this._front = 0u;
-			this._count = 0u;
+			this._front = 0U;
+			this._count = 0U;
 		}
 
 		public int Count
@@ -32,26 +32,26 @@ namespace Leap.Unity.Graphing
 
 		public void Clear()
 		{
-			if (this._count != 0u)
+			if (this._count != 0U)
 			{
 				Array.Clear(this._array, 0, this._array.Length);
-				this._front = 0u;
-				this._count = 0u;
+				this._front = 0U;
+				this._count = 0U;
 			}
 		}
 
 		public void PushBack(T t)
 		{
 			this.doubleCapacityIfFull();
-			this._count += 1u;
+			this._count += 1U;
 			this._array[(int)((UIntPtr)this.getBackIndex())] = t;
 		}
 
 		public void PushFront(T t)
 		{
 			this.doubleCapacityIfFull();
-			this._count += 1u;
-			this._front = (this._front - 1u & this._indexMask);
+			this._count += 1U;
+			this._front = (this._front - 1U & this._indexMask);
 			this._array[(int)((UIntPtr)this._front)] = t;
 		}
 
@@ -59,15 +59,15 @@ namespace Leap.Unity.Graphing
 		{
 			this.checkForEmpty("pop back");
 			this._array[(int)((UIntPtr)this.getBackIndex())] = default(T);
-			this._count -= 1u;
+			this._count -= 1U;
 		}
 
 		public void PopFront()
 		{
 			this.checkForEmpty("pop front");
 			this._array[(int)((UIntPtr)this._front)] = default(T);
-			this._count -= 1u;
-			this._front = (this._front + 1u & this._indexMask);
+			this._count -= 1U;
+			this._front = (this._front + 1U & this._indexMask);
 		}
 
 		public void PopBack(out T back)
@@ -76,7 +76,7 @@ namespace Leap.Unity.Graphing
 			uint backIndex = this.getBackIndex();
 			back = this._array[(int)((UIntPtr)backIndex)];
 			this._array[(int)((UIntPtr)backIndex)] = default(T);
-			this._count -= 1u;
+			this._count -= 1U;
 		}
 
 		public void PopFront(out T front)
@@ -84,8 +84,8 @@ namespace Leap.Unity.Graphing
 			this.checkForEmpty("pop front");
 			front = this._array[(int)((UIntPtr)this._front)];
 			this._array[(int)((UIntPtr)this._front)] = default(T);
-			this._front = (this._front + 1u & this._indexMask);
-			this._count -= 1u;
+			this._front = (this._front + 1U & this._indexMask);
+			this._count -= 1U;
 		}
 
 		public T Front
@@ -134,15 +134,15 @@ namespace Leap.Unity.Graphing
 		{
 			string str = "[";
 			uint backIndex = this.getBackIndex();
-			uint num = 0u;
+			uint num = 0U;
 			while ((ulong)num < (ulong)((long)this._array.Length))
 			{
 				bool flag;
-				if (this._count == 0u)
+				if (this._count == 0U)
 				{
 					flag = true;
 				}
-				else if (this._count == 1u)
+				else if (this._count == 1U)
 				{
 					flag = (num != this._front);
 				}
@@ -180,14 +180,14 @@ namespace Leap.Unity.Graphing
 					text += " ";
 				}
 				str += text;
-				num += 1u;
+				num += 1U;
 			}
 			return str + "]";
 		}
 
 		private uint getBackIndex()
 		{
-			return this._front + this._count - 1u & this._indexMask;
+			return this._front + this._count - 1U & this._indexMask;
 		}
 
 		private uint getIndex(uint index)
@@ -211,7 +211,7 @@ namespace Leap.Unity.Graphing
 					Array.Copy(this._array, (long)((ulong)this._front), array, 0L, (long)((ulong)num));
 					Array.Copy(this._array, 0L, array, (long)((ulong)num), (long)((ulong)(this._count - num)));
 				}
-				this._front = 0u;
+				this._front = 0U;
 				this._array = array;
 				this.recalculateIndexMask();
 			}
@@ -239,7 +239,7 @@ namespace Leap.Unity.Graphing
 
 		private void checkForEmpty(string actionName)
 		{
-			if (this._count == 0u)
+			if (this._count == 0U)
 			{
 				throw new InvalidOperationException("Cannot " + actionName + " because the RingBuffer is empty.");
 			}

+ 50 - 48
Assembly-CSharp/Maid.cs

@@ -112,6 +112,14 @@ public class Maid : MonoBehaviour
 		}
 	}
 
+	public static string ThumbnailDictionary
+	{
+		get
+		{
+			return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "Thumb");
+		}
+	}
+
 	public static void UpdateMaidRanking()
 	{
 		if (!GameMain.Instance.CharacterMgr.status.isAvailableRanking)
@@ -1378,7 +1386,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeProp(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP_LIST");
-		f_bwWrite.Write(1440);
+		f_bwWrite.Write(1470);
 		f_bwWrite.Write(this.m_dicMaidProp.Count);
 		int num = 0;
 		foreach (KeyValuePair<string, MaidProp> keyValuePair in this.m_dicMaidProp)
@@ -1412,7 +1420,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeMisc(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_MISC");
-		f_bwWrite.Write(1440);
+		f_bwWrite.Write(1470);
 		f_bwWrite.Write(this.m_nActiveSlotNo);
 		if (this.m_texIcon != null)
 		{
@@ -1437,7 +1445,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeBody(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_BODY");
-		f_bwWrite.Write(1440);
+		f_bwWrite.Write(1470);
 		return true;
 	}
 
@@ -1499,7 +1507,7 @@ public class Maid : MonoBehaviour
 			string text = GameMain.Instance.CMSystem.CM3D2Path + "\\Thumb\\" + this.status.guid + ".png";
 			if (File.Exists(text))
 			{
-				string text2 = UTY.gameProjectPath + "\\Thumb\\" + this.status.guid + ".png";
+				string text2 = Path.Combine(Maid.ThumbnailDictionary, this.status.guid + ".png");
 				if (!File.Exists(text2))
 				{
 					File.Copy(text, text2);
@@ -1846,8 +1854,7 @@ public class Maid : MonoBehaviour
 		{
 			texture2D = component.ShotThumCardOriginal();
 		}
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
+		string text = Maid.ThumbnailDictionary;
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);
@@ -1859,19 +1866,18 @@ public class Maid : MonoBehaviour
 
 	public void SetThumCard(Texture2D tex)
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = Maid.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
-			Directory.CreateDirectory(text);
+			Directory.CreateDirectory(thumbnailDictionary);
 		}
 		string f_strFileName = string.Empty;
 		this.m_strThumCardTime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
-		f_strFileName = text + "/_tmp_thum_" + this.status.guid + ".png";
+		f_strFileName = thumbnailDictionary + "/_tmp_thum_" + this.status.guid + ".png";
 		UTY.SaveImage(tex, f_strFileName);
 		UnityEngine.Object.Destroy(tex);
 		Texture2D thumIcon = this.GetThumIcon();
-		f_strFileName = text + "/icon_thum_" + this.status.guid + ".png";
+		f_strFileName = thumbnailDictionary + "/icon_thum_" + this.status.guid + ".png";
 		UTY.SaveImage(thumIcon, f_strFileName);
 	}
 
@@ -1888,23 +1894,22 @@ public class Maid : MonoBehaviour
 	public Texture2D GetThumCard()
 	{
 		Texture2D result = null;
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = Maid.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
-			Directory.CreateDirectory(text);
+			Directory.CreateDirectory(thumbnailDictionary);
 		}
-		string text2 = text + "/_tmp_thum_" + this.status.guid + ".png";
-		if (File.Exists(text2))
+		string text = thumbnailDictionary + "/_tmp_thum_" + this.status.guid + ".png";
+		if (File.Exists(text))
 		{
-			result = UTY.LoadTexture(text2);
+			result = UTY.LoadTexture(text);
 		}
 		else
 		{
-			text2 = text + "/" + this.status.guid + ".png";
-			if (File.Exists(text2))
+			text = thumbnailDictionary + "/" + this.status.guid + ".png";
+			if (File.Exists(text))
 			{
-				result = UTY.LoadTexture(text2);
+				result = UTY.LoadTexture(text);
 			}
 		}
 		return result;
@@ -1912,36 +1917,35 @@ public class Maid : MonoBehaviour
 
 	public static void DeletedTmpThumCards()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = Maid.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
 			return;
 		}
-		string[] files = Directory.GetFiles(text, "*", SearchOption.TopDirectoryOnly);
+		string[] files = Directory.GetFiles(thumbnailDictionary, "*", SearchOption.TopDirectoryOnly);
 		for (int i = 0; i < files.Length; i++)
 		{
-			string text2 = text + "\\";
-			int num = files[i].IndexOf(text2);
+			string text = thumbnailDictionary + "\\";
+			int num = files[i].IndexOf(text);
 			if (num != 0)
 			{
 				files[i] = string.Empty;
 			}
 			else
 			{
-				string text3 = string.Empty;
+				string text2 = string.Empty;
 				try
 				{
-					text3 = files[i].Substring(text2.Length, files[i].Length - text2.Length);
+					text2 = files[i].Substring(text.Length, files[i].Length - text.Length);
 				}
 				catch
 				{
 				}
-				if (string.IsNullOrEmpty(text3))
+				if (string.IsNullOrEmpty(text2))
 				{
 					files[i] = string.Empty;
 				}
-				else if (0 > text3.IndexOf(".png") || text3.IndexOf("_tmp_thum_") != 0)
+				else if (0 > text2.IndexOf(".png") || text2.IndexOf("_tmp_thum_") != 0)
 				{
 					files[i] = string.Empty;
 				}
@@ -1964,25 +1968,24 @@ public class Maid : MonoBehaviour
 
 	private void FixThumCard()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = Maid.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
 			return;
 		}
-		string text2 = text + "/_tmp_thum_" + this.status.guid + ".png";
-		if (!File.Exists(text2))
+		string text = thumbnailDictionary + "/_tmp_thum_" + this.status.guid + ".png";
+		if (!File.Exists(text))
 		{
 			return;
 		}
-		string text3 = text + "/" + this.status.guid + ".png";
+		string text2 = thumbnailDictionary + "/" + this.status.guid + ".png";
 		try
 		{
-			if (File.Exists(text3))
+			if (File.Exists(text2))
 			{
-				File.Delete(text3);
+				File.Delete(text2);
 			}
-			File.Move(text2, text3);
+			File.Move(text, text2);
 		}
 		catch
 		{
@@ -1991,25 +1994,24 @@ public class Maid : MonoBehaviour
 
 	private void CheckOldThumCard()
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "Thumb";
-		if (!Directory.Exists(text))
+		string thumbnailDictionary = Maid.ThumbnailDictionary;
+		if (!Directory.Exists(thumbnailDictionary))
 		{
 			return;
 		}
-		string text2 = string.Concat(new string[]
+		string text = string.Concat(new string[]
 		{
-			text,
+			thumbnailDictionary,
 			"/",
 			this.status.guid,
 			this.m_strThumCardTime,
 			".png"
 		});
-		if (!File.Exists(text2))
+		if (!File.Exists(text))
 		{
 			return;
 		}
-		File.Move(text2, text + "/" + this.status.guid + ".png");
+		File.Move(text, thumbnailDictionary + "/" + this.status.guid + ".png");
 	}
 
 	public void ProcSSParam()

+ 54 - 6
Assembly-CSharp/MaidManagementMain.cs

@@ -201,6 +201,10 @@ public class MaidManagementMain : WfScreenChildren
 			this.button_dic_["クラス変更"].isEnabled = false;
 			this.button_dic_["解雇"].isEnabled = false;
 			this.button_dic_["夜伽スキル"].isEnabled = false;
+			if (0 <= this.select_maid_.status.subCharaData.status.rehireEventId && Product.isJapan)
+			{
+				this.button_dic_["解雇"].isEnabled = true;
+			}
 			this.VisibleClassChangePanel(false);
 			this.VisibleYotogiSkillList(false);
 			if (this.status_panel_.activeSelf)
@@ -271,8 +275,13 @@ public class MaidManagementMain : WfScreenChildren
 		else if (text == "解雇" && this.select_maid_ != null && 2 <= this.chara_mgr_.GetStockMaidCount() && !this.select_maid_.status.leader)
 		{
 			int banishmentPrice = this.select_maid_.status.banishmentPrice;
-			string text2 = LocalizationManager.GetTranslation("Dialog/メイド管理/{0}を解雇しますか?資金 +{1}CR", true, 0, true, false, null, null);
-			text2 = string.Format(text2, this.select_maid_.status.charaName.GetFullName(" "), Utility.ConvertMoneyText(banishmentPrice));
+			string text2 = LocalizationManager.GetTranslation("Dialog/メイド管理/{0}を解雇しますか?", true, 0, true, false, null, null);
+			text2 = string.Format(text2, this.select_maid_.status.charaName.GetFullName(" "));
+			if (banishmentPrice > 0)
+			{
+				text2 = LocalizationManager.GetTranslation("Dialog/メイド管理/{0}を解雇しますか?資金 +{1}CR", true, 0, true, false, null, null);
+				text2 = string.Format(text2, this.select_maid_.status.charaName.GetFullName(" "), Utility.ConvertMoneyText(banishmentPrice));
+			}
 			GameMain.Instance.SysDlg.Show(text2, SystemDialog.TYPE.OK_CANCEL, new SystemDialog.OnClick(this.BanishmentMaid), null);
 		}
 		else
@@ -513,20 +522,59 @@ public class MaidManagementMain : WfScreenChildren
 
 	public void BanishmentMaid()
 	{
+		if (this.select_maid_.status.heroineType == HeroineType.Sub && this.select_maid_.status.subCharaData != null)
+		{
+			SubMaid.BackupStatus backupStatus = SubMaid.BackupStatus.CreateInstance(this.select_maid_);
+			int num = -1;
+			for (int i = 0; i < GameMain.Instance.CharacterMgr.subMaidBackupStatusList.Count; i++)
+			{
+				SubMaid.BackupStatus backupStatus2 = GameMain.Instance.CharacterMgr.subMaidBackupStatusList[i];
+				if (backupStatus2.subCharaUniqueName == backupStatus.subCharaUniqueName)
+				{
+					num = i;
+					break;
+				}
+			}
+			if (num != -1)
+			{
+				backupStatus.subCharaUniqueName.Remove(num);
+			}
+			GameMain.Instance.CharacterMgr.subMaidBackupStatusList.Add(backupStatus);
+			ScenarioData scenarioData = GameMain.Instance.ScenarioSelectMgr.GetScenarioData(this.select_maid_.status.subCharaData.status.rehireEventId);
+			if (scenarioData == null)
+			{
+				GameMain.Instance.SysDlg.Show("解雇 error\n再雇用シナリオ " + this.select_maid_.status.subCharaData.status.rehireEventId + " not fund.", SystemDialog.TYPE.OK, null, null);
+				return;
+			}
+			foreach (KeyValuePair<ScenarioData.PlayableCondition, ScenarioData.PlayableData> keyValuePair in scenarioData.m_PlayableData)
+			{
+				ScenarioData.PlayableData value = keyValuePair.Value;
+				if (value.Condition == ScenarioData.PlayableCondition.シナリオ)
+				{
+					if (value.StringData.IndexOf("シナリオフラグ") >= 0)
+					{
+						GameMain.Instance.CharacterMgr.status.SetFlag(value.StringData.Split(new char[]
+						{
+							':'
+						})[1], 1);
+					}
+				}
+			}
+		}
 		string text = LocalizationManager.GetTranslation("Dialog/メイド管理/{0}を解雇しました", true, 0, true, false, null, null);
 		text = string.Format(text, this.select_maid_.status.charaName.GetFullName(" "));
 		int banishmentPrice = this.select_maid_.status.banishmentPrice;
 		GameMain.Instance.CharacterMgr.status.money += (long)banishmentPrice;
-		int i;
-		for (i = 0; i < this.chara_mgr_.GetStockMaidCount(); i++)
+		int j;
+		for (j = 0; j < this.chara_mgr_.GetStockMaidCount(); j++)
 		{
-			if (this.chara_mgr_.GetStockMaid(i) == this.select_maid_)
+			if (this.chara_mgr_.GetStockMaid(j) == this.select_maid_)
 			{
 				break;
 			}
 		}
 		this.chara_select_mgr_.RemoveMaidPlate(this.select_maid_);
-		this.chara_mgr_.BanishmentMaid(i);
+		this.chara_mgr_.BanishmentMaid(j);
 		this.button_dic_["雇用"].isEnabled = (this.GetMaidNumber() < 999);
 		this.button_dic_["移籍"].isEnabled = (GameMain.Instance.CharacterMgr.status.isAvailableTransfer && this.GetMaidNumber() < 999);
 		GameMain.Instance.SysDlg.Show(text, SystemDialog.TYPE.OK, null, null);

+ 1 - 1
Assembly-CSharp/MaidParts.cs

@@ -37,7 +37,7 @@ public class MaidParts : MonoBehaviour
 	public unsafe bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MULTI_COL");
-		f_bwWrite.Write(1440);
+		f_bwWrite.Write(1470);
 		f_bwWrite.Write(this.m_aryPartsColor.Length);
 		for (int i = 0; i < this.m_aryPartsColor.Length; i++)
 		{

+ 1 - 1
Assembly-CSharp/MaidProp.cs

@@ -8,7 +8,7 @@ public class MaidProp
 	public bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP");
-		f_bwWrite.Write(1440);
+		f_bwWrite.Write(1470);
 		f_bwWrite.Write(this.idx);
 		f_bwWrite.Write(this.name);
 		f_bwWrite.Write(this.type);

+ 28 - 5
Assembly-CSharp/MaidStatus/Status.cs

@@ -837,7 +837,7 @@ namespace MaidStatus
 		{
 			get
 			{
-				return 10000;
+				return (this.subCharaData == null) ? 10000 : 0;
 			}
 		}
 
@@ -1161,6 +1161,19 @@ namespace MaidStatus
 			}
 		}
 
+		public void SetWorkData(Dictionary<int, WorkData> src)
+		{
+			this.workDatas_.Clear();
+			if (src == null)
+			{
+				return;
+			}
+			foreach (KeyValuePair<int, WorkData> keyValuePair in src)
+			{
+				this.workDatas_.Add(keyValuePair.Key, keyValuePair.Value);
+			}
+		}
+
 		public void AddWorkDataPlayCount(int id, int addPlayCount)
 		{
 			if (!this.workDatas_.ContainsKey(id))
@@ -1214,6 +1227,11 @@ namespace MaidStatus
 			return this.flags_.ContainsKey(flagName) && this.flags_.Remove(flagName);
 		}
 
+		public void RemoveFlagAll()
+		{
+			this.flags_.Clear();
+		}
+
 		public void SetEventEndFlag(int id, bool value)
 		{
 			if (this.eventEndFlags_.ContainsKey(id))
@@ -1239,6 +1257,11 @@ namespace MaidStatus
 			return this.eventEndFlags_.ContainsKey(id) && this.eventEndFlags_[id];
 		}
 
+		public void RemoveEventEndFlagAll()
+		{
+			this.eventEndFlags_.Clear();
+		}
+
 		public BonusStatus GetBonusStatusAsFeatureAndPropensitys()
 		{
 			BonusStatus result = new BonusStatus();
@@ -1332,7 +1355,7 @@ namespace MaidStatus
 		{
 			this.SetFlag("__1330_specialrelation__", (int)this.specialRelation);
 			binary.Write("CM3D2_MAID_STATUS");
-			binary.Write(1440);
+			binary.Write(1470);
 			binary.Write(this.guid);
 			binary.Write(this.creationTime);
 			binary.Write((short)this.heroineType);
@@ -1445,7 +1468,7 @@ namespace MaidStatus
 			binary.Write((short)this.additionalRelation_);
 			binary.Write(this.nickName_);
 			binary.Write(this.age);
-			binary.Write(2177629204u);
+			binary.Write(2177629204U);
 		}
 
 		public void Deserialize(BinaryReader binary)
@@ -1706,7 +1729,7 @@ namespace MaidStatus
 			}
 			this.RemoveFlag("__1330_specialrelation__");
 			uint num9 = binary.ReadUInt32();
-			NDebug.Assert(2177629204u == num9, "メイドパラメータのロードに失敗しました");
+			NDebug.Assert(2177629204U == num9, "メイドパラメータのロードに失敗しました");
 			if (num <= 1050)
 			{
 				YotogiClass.Data data = YotogiClass.GetData("Kokuhakuplay");
@@ -1966,7 +1989,7 @@ namespace MaidStatus
 
 		public const int NullID = -2147483648;
 
-		private const uint SaveDataCheckCode = 2177629204u;
+		private const uint SaveDataCheckCode = 2177629204U;
 
 		public HeroineType heroineType;
 

+ 212 - 21
Assembly-CSharp/MaidStatus/SubMaid.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Text;
 using I2.Loc;
 using UnityEngine;
 using wf;
@@ -198,7 +199,7 @@ namespace MaidStatus
 				status.playCountYotogi = characterStatus.playCountYotogi;
 			}
 
-			public void ApplyPreset(Maid maid, bool refSecondStatus)
+			public void ApplyPreset(Maid maid, bool refSecondStatus, bool setThumCard)
 			{
 				if (maid == null)
 				{
@@ -234,33 +235,36 @@ namespace MaidStatus
 						"]が見つかりません"
 					}));
 				}
-				if (!string.IsNullOrEmpty(characterStatus.thumbnailFileName))
+				if (setThumCard)
 				{
-					Texture2D texture2D3 = ImportCM.CreateTexture(characterStatus.thumbnailFileName);
-					if (texture2D3.format == TextureFormat.DXT1 || texture2D3.format == TextureFormat.DXT5)
+					if (!string.IsNullOrEmpty(characterStatus.thumbnailFileName))
 					{
-						Texture2D texture2D4 = new Texture2D(texture2D3.width, texture2D3.height, TextureFormat.ARGB32, false);
-						texture2D4.SetPixels(texture2D3.GetPixels());
-						texture2D4.Apply();
-						UnityEngine.Object.Destroy(texture2D3);
-						maid.SetThumCard(texture2D4);
+						Texture2D texture2D3 = ImportCM.CreateTexture(characterStatus.thumbnailFileName);
+						if (texture2D3.format == TextureFormat.DXT1 || texture2D3.format == TextureFormat.DXT5)
+						{
+							Texture2D texture2D4 = new Texture2D(texture2D3.width, texture2D3.height, TextureFormat.ARGB32, false);
+							texture2D4.SetPixels(texture2D3.GetPixels());
+							texture2D4.Apply();
+							UnityEngine.Object.Destroy(texture2D3);
+							maid.SetThumCard(texture2D4);
+						}
+						else
+						{
+							maid.SetThumCard(texture2D3);
+						}
 					}
 					else
 					{
-						maid.SetThumCard(texture2D3);
+						Debug.LogError(string.Concat(new string[]
+						{
+							"サブメイド[",
+							characterStatus.firstName,
+							"]のアイコンファイル[",
+							characterStatus.thumbnailFileName,
+							"]が見つかりません"
+						}));
 					}
 				}
-				else
-				{
-					Debug.LogError(string.Concat(new string[]
-					{
-						"サブメイド[",
-						characterStatus.firstName,
-						"]のアイコンファイル[",
-						characterStatus.thumbnailFileName,
-						"]が見つかりません"
-					}));
-				}
 			}
 
 			public readonly int id;
@@ -328,6 +332,14 @@ namespace MaidStatus
 					this.hentai = basicCsv.GetCellAsInteger(num++, lineY);
 					this.housi = basicCsv.GetCellAsInteger(num++, lineY);
 					this.playCountYotogi = basicCsv.GetCellAsInteger(num++, lineY);
+					if (basicCsv.GetCellAsString(num++, 0) == "合計値")
+					{
+						this.rehireEventId = -1;
+					}
+					else
+					{
+						this.rehireEventId = ((!basicCsv.IsCellToExistData(num - 1, lineY)) ? -1 : basicCsv.GetCellAsInteger(num - 1, lineY));
+					}
 				}
 
 				public string lastNameTerm
@@ -437,6 +449,185 @@ namespace MaidStatus
 				public readonly int housi;
 
 				public readonly int playCountYotogi;
+
+				public readonly int rehireEventId;
+			}
+		}
+
+		[Serializable]
+		public class BackupStatus : ISerializationCallbackReceiver
+		{
+			private BackupStatus()
+			{
+			}
+
+			public static SubMaid.BackupStatus CreateInstance(Maid maid)
+			{
+				Status status = maid.status;
+				SubMaid.BackupStatus backupStatus = new SubMaid.BackupStatus();
+				backupStatus.subCharaUniqueName = status.subCharaData.uniqueName;
+				backupStatus.lastName = status.lastName;
+				backupStatus.firstName = status.firstName;
+				backupStatus.employmentDay = status.employmentDay;
+				backupStatus.relation = status.relation;
+				backupStatus.additionalRelation = status.additionalRelation;
+				backupStatus.seikeiken = status.seikeiken;
+				backupStatus.likability = status.likability;
+				backupStatus.playCountNightWork = status.playCountNightWork;
+				backupStatus.sexPlayNumberOfPeople = status.sexPlayNumberOfPeople;
+				backupStatus.sales = status.sales;
+				backupStatus.totalSales = status.totalSales;
+				backupStatus.totalEvaluations = status.totalEvaluations;
+				backupStatus.evaluation = status.evaluation;
+				int[] keyArray = status.workDatas.GetKeyArray();
+				MaidStatus.WorkData[] valueArray = status.workDatas.GetValueArray();
+				backupStatus.workData = new SubMaid.BackupStatus.WorkData[valueArray.Length];
+				for (int i = 0; i < valueArray.Length; i++)
+				{
+					backupStatus.workData[i] = new SubMaid.BackupStatus.WorkData();
+					backupStatus.workData[i].key = keyArray[i];
+					backupStatus.workData[i].id = valueArray[i].id;
+					backupStatus.workData[i].playCount = valueArray[i].playCount;
+					backupStatus.workData[i].level = valueArray[i].level;
+				}
+				backupStatus.maidFlagsKey = status.flags.GetKeyArray();
+				backupStatus.maidFlagsValue = status.flags.GetValueArray();
+				backupStatus.eventEndFlagsKey = status.eventEndFlags.GetKeyArray();
+				backupStatus.eventEndFlagsValue = status.eventEndFlags.GetValueArray();
+				backupStatus.iconBinary = maid.GetThumIcon().EncodeToPNG();
+				backupStatus.presetBinary = GameMain.Instance.CharacterMgr.PresetSaveNotWriteFile(maid, CharacterMgr.PresetType.All);
+				return backupStatus;
+			}
+
+			public void Apply(Status status)
+			{
+				status.lastName = this.lastName;
+				status.firstName = this.firstName;
+				status.employmentDay = this.employmentDay;
+				status.additionalRelation = this.additionalRelation;
+				status.relation = this.relation;
+				status.seikeiken = this.seikeiken;
+				status.likability = this.likability;
+				status.playCountNightWork = this.playCountNightWork;
+				status.sexPlayNumberOfPeople = this.sexPlayNumberOfPeople;
+				status.sales = this.sales;
+				status.totalSales = this.totalSales;
+				status.totalEvaluations = this.totalEvaluations;
+				status.evaluation = this.evaluation;
+				Dictionary<int, MaidStatus.WorkData> dictionary = new Dictionary<int, MaidStatus.WorkData>();
+				foreach (SubMaid.BackupStatus.WorkData workData in this.workData)
+				{
+					MaidStatus.WorkData workData2 = new MaidStatus.WorkData();
+					workData2.id = workData.id;
+					workData2.level = workData.level;
+					workData2.playCount = workData.playCount;
+					dictionary.Add(workData.key, workData2);
+				}
+				status.SetWorkData(dictionary);
+				status.RemoveFlagAll();
+				for (int j = 0; j < this.maidFlagsKey.Length; j++)
+				{
+					status.SetFlag(this.maidFlagsKey[j], this.maidFlagsValue[j]);
+				}
+				status.RemoveEventEndFlagAll();
+				for (int k = 0; k < this.eventEndFlagsKey.Length; k++)
+				{
+					status.SetEventEndFlag(this.eventEndFlagsKey[k], this.eventEndFlagsValue[k]);
+				}
+				if (this.iconBinary != null && this.iconBinary.Length > 0)
+				{
+					Texture2D texture2D = new Texture2D(4, 4, TextureFormat.ARGB32, false);
+					texture2D.LoadImage(this.iconBinary);
+					status.maid.SetThumIcon(texture2D);
+				}
+				if (this.presetBinary != null && this.presetBinary.Length > 0)
+				{
+					using (BinaryReader binaryReader = new BinaryReader(new MemoryStream(this.presetBinary), Encoding.UTF8))
+					{
+						CharacterMgr.Preset f_prest = GameMain.Instance.CharacterMgr.PresetLoad(binaryReader, string.Empty);
+						GameMain.Instance.CharacterMgr.PresetSet(status.maid, f_prest);
+					}
+				}
+			}
+
+			public void OnBeforeSerialize()
+			{
+				this.version = 1000;
+			}
+
+			public void OnAfterDeserialize()
+			{
+			}
+
+			private const int FixVersion = 1000;
+
+			public int version = 1000;
+
+			public string subCharaUniqueName;
+
+			public string lastName;
+
+			public string firstName;
+
+			public int employmentDay;
+
+			public Relation relation;
+
+			private AdditionalRelation additionalRelation;
+
+			public Seikeiken seikeiken;
+
+			public int likability;
+
+			public int playCountNightWork;
+
+			public int sexPlayNumberOfPeople;
+
+			public long sales;
+
+			public long totalSales;
+
+			public long totalEvaluations;
+
+			public int evaluation;
+
+			public SubMaid.BackupStatus.WorkData[] workData;
+
+			public string[] maidFlagsKey;
+
+			public int[] maidFlagsValue;
+
+			public int[] eventEndFlagsKey;
+
+			public bool[] eventEndFlagsValue;
+
+			[NonSerialized]
+			public byte[] iconBinary;
+
+			[NonSerialized]
+			public byte[] presetBinary;
+
+			[Serializable]
+			public class WorkData : ISerializationCallbackReceiver
+			{
+				public void OnBeforeSerialize()
+				{
+					this.version = 1000;
+				}
+
+				public void OnAfterDeserialize()
+				{
+				}
+
+				public int version = 1000;
+
+				public int key;
+
+				public int id;
+
+				public uint playCount;
+
+				public int level;
 			}
 		}
 	}

+ 1 - 1
Assembly-CSharp/Menu.cs

@@ -924,7 +924,7 @@ public class Menu : MonoBehaviour
 			Directory.CreateDirectory(text);
 		}
 		StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
-		streamWriter.WriteLine("出力バージョン\t" + 1440);
+		streamWriter.WriteLine("出力バージョン\t" + 1470);
 		streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
 		try
 		{

+ 1 - 1
Assembly-CSharp/Misc.cs

@@ -2,7 +2,7 @@
 
 public class Misc
 {
-	public const int GAME_VERSION = 1440;
+	public const int GAME_VERSION = 1470;
 
 	public const string GAME_DATA_PATH = "GameData";
 

+ 1 - 1
Assembly-CSharp/ModCompile.cs

@@ -604,7 +604,7 @@ public class ModCompile : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MESH");
-		binaryWriter.Write(1440);
+		binaryWriter.Write(1470);
 		string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(f_strMqoFile);
 		binaryWriter.Write(fileNameWithoutExtension);
 		binaryWriter.Write(exObjIn2.strName);

+ 27 - 26
Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs

@@ -41,6 +41,14 @@ namespace MyRoomCustom
 			}
 		}
 
+		private static string MyRoomDirectory
+		{
+			get
+			{
+				return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "MyRoom");
+			}
+		}
+
 		private float cameraFOV
 		{
 			set
@@ -158,8 +166,7 @@ namespace MyRoomCustom
 
 		public CreativeRoomManager.CreativeRoomHeader Save(int number)
 		{
-			string text = UTY.gameProjectPath + "\\";
-			text += "MyRoom\\";
+			string text = CreativeRoomManager.MyRoomDirectory + "\\";
 			string text2 = "Room_";
 			text2 += number.ToString("000");
 			text2 += ".room";
@@ -208,8 +215,7 @@ namespace MyRoomCustom
 
 		public void Load(int number)
 		{
-			string text = UTY.gameProjectPath + "\\";
-			text += "MyRoom\\";
+			string text = CreativeRoomManager.MyRoomDirectory + "\\";
 			if (!Directory.Exists(text))
 			{
 				Directory.CreateDirectory(text);
@@ -265,8 +271,7 @@ namespace MyRoomCustom
 
 		public CreativeRoomManager.CreativeRoomHeader GetSaveDataHeader(string number)
 		{
-			string str = UTY.gameProjectPath + "\\";
-			str += "MyRoom\\";
+			string str = CreativeRoomManager.MyRoomDirectory + "\\";
 			string text = "Room_" + number;
 			if (File.Exists(str + text + ".save"))
 			{
@@ -322,8 +327,7 @@ namespace MyRoomCustom
 			{
 				return;
 			}
-			string str = UTY.gameProjectPath + "\\";
-			str += "MyRoom\\";
+			string str = CreativeRoomManager.MyRoomDirectory + "\\";
 			string path = str + "Room_" + number + ".room";
 			FileStream fileStream = new FileStream(path, FileMode.Open);
 			byte[] array = new byte[fileStream.Length];
@@ -417,11 +421,10 @@ namespace MyRoomCustom
 				if (CreativeRoomManager.m_CachedSaveDataDic == null)
 				{
 					CreativeRoomManager.m_CachedSaveDataDic = new StringDictionary();
-					string text = UTY.gameProjectPath + "\\";
-					text += "MyRoom\\";
-					if (Directory.Exists(text))
+					string path = CreativeRoomManager.MyRoomDirectory + "\\";
+					if (Directory.Exists(path))
 					{
-						string[] files = Directory.GetFiles(text, "*.room");
+						string[] files = Directory.GetFiles(path, "*.room");
 						for (int i = 0; i < files.Length; i++)
 						{
 							CreativeRoomManager.CreativeRoomHeader creativeRoomHeader;
@@ -442,32 +445,31 @@ namespace MyRoomCustom
 				CreativeRoomManager.m_CachedSaveDataDic.Clear();
 			}
 			CreativeRoomManager.m_CachedSaveDataDic = new StringDictionary();
-			string text = UTY.gameProjectPath + "\\";
-			text += "MyRoom\\";
+			string path = CreativeRoomManager.MyRoomDirectory + "\\";
 			Dictionary<string, string> dictionary = null;
-			if (Directory.Exists(text))
+			if (Directory.Exists(path))
 			{
 				dictionary = new Dictionary<string, string>();
-				string[] files = Directory.GetFiles(text, "*.room");
+				string[] files = Directory.GetFiles(path, "*.room");
 				for (int i = 0; i < files.Length; i++)
 				{
 					CreativeRoomManager.CreativeRoomHeader creativeRoomHeader;
 					CreativeRoomManager.DeserializeHeader(files[i], out creativeRoomHeader);
-					string text2 = string.Empty;
+					string text = string.Empty;
 					if (string.IsNullOrEmpty(creativeRoomHeader.comment))
 					{
-						text2 = "自室カスタム" + i.ToString("000");
+						text = "自室カスタム" + i.ToString("000");
 					}
 					else
 					{
 						int num = 10;
-						text2 = creativeRoomHeader.comment;
-						if (text2.Length > num)
+						text = creativeRoomHeader.comment;
+						if (text.Length > num)
 						{
-							text2 = text2.Substring(0, num - 1) + "…";
+							text = text.Substring(0, num - 1) + "…";
 						}
 					}
-					dictionary.Add(creativeRoomHeader.guid, text2);
+					dictionary.Add(creativeRoomHeader.guid, text);
 					CreativeRoomManager.m_CachedSaveDataDic[creativeRoomHeader.guid] = files[i];
 				}
 			}
@@ -476,12 +478,11 @@ namespace MyRoomCustom
 
 		private static void UpdateSaveDataGUID()
 		{
-			string text = UTY.gameProjectPath + "\\";
-			text += "MyRoom\\";
-			if (Directory.Exists(text))
+			string path = CreativeRoomManager.MyRoomDirectory + "\\";
+			if (Directory.Exists(path))
 			{
 				SortedDictionary<string, KeyValuePair<FileInfo, CreativeRoomManager.CreativeRoomHeader>> sortedDictionary = new SortedDictionary<string, KeyValuePair<FileInfo, CreativeRoomManager.CreativeRoomHeader>>();
-				string[] files = Directory.GetFiles(text, "*.room");
+				string[] files = Directory.GetFiles(path, "*.room");
 				for (int i = 0; i < files.Length; i++)
 				{
 					CreativeRoomManager.CreativeRoomHeader creativeRoomHeader;

+ 5 - 5
Assembly-CSharp/OVRHaptics.cs

@@ -10,13 +10,13 @@ public static class OVRHaptics
 		OVRHaptics.Config.Load();
 		OVRHaptics.m_outputs = new OVRHaptics.OVRHapticsOutput[]
 		{
-			new OVRHaptics.OVRHapticsOutput(1u),
-			new OVRHaptics.OVRHapticsOutput(2u)
+			new OVRHaptics.OVRHapticsOutput(1U),
+			new OVRHaptics.OVRHapticsOutput(2U)
 		};
 		OVRHaptics.Channels = new OVRHaptics.OVRHapticsChannel[]
 		{
-			OVRHaptics.LeftChannel = new OVRHaptics.OVRHapticsChannel(0u),
-			OVRHaptics.RightChannel = new OVRHaptics.OVRHapticsChannel(1u)
+			OVRHaptics.LeftChannel = new OVRHaptics.OVRHapticsChannel(0U),
+			OVRHaptics.RightChannel = new OVRHaptics.OVRHapticsChannel(1U)
 		};
 	}
 
@@ -58,7 +58,7 @@ public static class OVRHaptics
 
 		public static void Load()
 		{
-			OVRPlugin.HapticsDesc controllerHapticsDesc = OVRPlugin.GetControllerHapticsDesc(2u);
+			OVRPlugin.HapticsDesc controllerHapticsDesc = OVRPlugin.GetControllerHapticsDesc(2U);
 			OVRHaptics.Config.SampleRateHz = controllerHapticsDesc.SampleRateHz;
 			OVRHaptics.Config.SampleSizeInBytes = controllerHapticsDesc.SampleSizeInBytes;
 			OVRHaptics.Config.MinimumSafeSamplesQueued = controllerHapticsDesc.MinimumSafeSamplesQueued;

+ 88 - 88
Assembly-CSharp/OVRInput.cs

@@ -186,7 +186,7 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u)
+				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U)
 				{
 					return true;
 				}
@@ -218,11 +218,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0u)
+				if ((ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) == 0u)
+				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) == 0U)
 				{
 					result = true;
 				}
@@ -254,11 +254,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u)
+				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) == 0u && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0u)
+				if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) == 0U && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0U)
 				{
 					result = true;
 				}
@@ -289,7 +289,7 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U)
 				{
 					return true;
 				}
@@ -321,11 +321,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0u)
+				if ((ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) == 0u)
+				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) == 0U)
 				{
 					result = true;
 				}
@@ -357,11 +357,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) == 0u && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) == 0U && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0U)
 				{
 					result = true;
 				}
@@ -392,7 +392,7 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U)
 				{
 					return true;
 				}
@@ -424,11 +424,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0u)
+				if ((ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) == 0u)
+				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) == 0U)
 				{
 					result = true;
 				}
@@ -460,11 +460,11 @@ public static class OVRInput
 			if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
 			{
 				OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
-				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U)
 				{
 					return false;
 				}
-				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) == 0u && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0u)
+				if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) == 0U && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0U)
 				{
 					result = true;
 				}
@@ -862,51 +862,51 @@ public static class OVRInput
 			OVRPlugin.ControllerState controllerState = OVRPlugin.GetControllerState((uint)this.controllerType);
 			if (controllerState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 268435456u;
+				controllerState.Buttons |= 268435456U;
 			}
 			if (controllerState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 536870912u;
+				controllerState.Buttons |= 536870912U;
 			}
 			if (controllerState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 16u;
+				controllerState.Buttons |= 16U;
 			}
 			if (controllerState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 32u;
+				controllerState.Buttons |= 32U;
 			}
 			if (controllerState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 64u;
+				controllerState.Buttons |= 64U;
 			}
 			if (controllerState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 128u;
+				controllerState.Buttons |= 128U;
 			}
 			if (controllerState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 67108864u;
+				controllerState.Buttons |= 67108864U;
 			}
 			if (controllerState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 134217728u;
+				controllerState.Buttons |= 134217728U;
 			}
 			if (controllerState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 4096u;
+				controllerState.Buttons |= 4096U;
 			}
 			if (controllerState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 8192u;
+				controllerState.Buttons |= 8192U;
 			}
 			if (controllerState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 16384u;
+				controllerState.Buttons |= 16384U;
 			}
 			if (controllerState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				controllerState.Buttons |= 32768u;
+				controllerState.Buttons |= 32768U;
 			}
 			this.previousState = this.currentState;
 			this.currentState = controllerState;
@@ -1786,63 +1786,63 @@ public static class OVRInput
 			bool flag = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_Update();
 			if (flag)
 			{
-				currentState.ConnectedControllers = 16u;
+				currentState.ConnectedControllers = 16U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(0))
 			{
-				currentState.Buttons |= 1u;
+				currentState.Buttons |= 1U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(1))
 			{
-				currentState.Buttons |= 2u;
+				currentState.Buttons |= 2U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(2))
 			{
-				currentState.Buttons |= 256u;
+				currentState.Buttons |= 256U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(3))
 			{
-				currentState.Buttons |= 512u;
+				currentState.Buttons |= 512U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(4))
 			{
-				currentState.Buttons |= 65536u;
+				currentState.Buttons |= 65536U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(5))
 			{
-				currentState.Buttons |= 131072u;
+				currentState.Buttons |= 131072U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(6))
 			{
-				currentState.Buttons |= 262144u;
+				currentState.Buttons |= 262144U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(7))
 			{
-				currentState.Buttons |= 524288u;
+				currentState.Buttons |= 524288U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(8))
 			{
-				currentState.Buttons |= 1048576u;
+				currentState.Buttons |= 1048576U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(9))
 			{
-				currentState.Buttons |= 2097152u;
+				currentState.Buttons |= 2097152U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(10))
 			{
-				currentState.Buttons |= 1024u;
+				currentState.Buttons |= 1024U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(11))
 			{
-				currentState.Buttons |= 4u;
+				currentState.Buttons |= 4U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(12))
 			{
-				currentState.Buttons |= 2048u;
+				currentState.Buttons |= 2048U;
 			}
 			if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(13))
 			{
-				currentState.Buttons |= 8u;
+				currentState.Buttons |= 8U;
 			}
 			currentState.LThumbstick.x = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(0);
 			currentState.LThumbstick.y = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(1);
@@ -1852,51 +1852,51 @@ public static class OVRInput
 			currentState.RIndexTrigger = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(5);
 			if (currentState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 268435456u;
+				currentState.Buttons |= 268435456U;
 			}
 			if (currentState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 536870912u;
+				currentState.Buttons |= 536870912U;
 			}
 			if (currentState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 16u;
+				currentState.Buttons |= 16U;
 			}
 			if (currentState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 32u;
+				currentState.Buttons |= 32U;
 			}
 			if (currentState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 64u;
+				currentState.Buttons |= 64U;
 			}
 			if (currentState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 128u;
+				currentState.Buttons |= 128U;
 			}
 			if (currentState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 67108864u;
+				currentState.Buttons |= 67108864U;
 			}
 			if (currentState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 134217728u;
+				currentState.Buttons |= 134217728U;
 			}
 			if (currentState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 4096u;
+				currentState.Buttons |= 4096U;
 			}
 			if (currentState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 8192u;
+				currentState.Buttons |= 8192U;
 			}
 			if (currentState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 16384u;
+				currentState.Buttons |= 16384U;
 			}
 			if (currentState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 32768u;
+				currentState.Buttons |= 32768U;
 			}
 			this.previousState = this.currentState;
 			this.currentState = currentState;
@@ -2075,46 +2075,46 @@ public static class OVRInput
 				return OVRInput.Controller.None;
 			}
 			OVRPlugin.ControllerState currentState = default(OVRPlugin.ControllerState);
-			currentState.ConnectedControllers = 16u;
+			currentState.ConnectedControllers = 16U;
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.A))
 			{
-				currentState.Buttons |= 1u;
+				currentState.Buttons |= 1U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.B))
 			{
-				currentState.Buttons |= 2u;
+				currentState.Buttons |= 2U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.X))
 			{
-				currentState.Buttons |= 256u;
+				currentState.Buttons |= 256U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Y))
 			{
-				currentState.Buttons |= 512u;
+				currentState.Buttons |= 512U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Start))
 			{
-				currentState.Buttons |= 1048576u;
+				currentState.Buttons |= 1048576U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Back) || Input.GetKey(KeyCode.Escape))
 			{
-				currentState.Buttons |= 2097152u;
+				currentState.Buttons |= 2097152U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.LThumbstick))
 			{
-				currentState.Buttons |= 1024u;
+				currentState.Buttons |= 1024U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.RThumbstick))
 			{
-				currentState.Buttons |= 4u;
+				currentState.Buttons |= 4U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.LShoulder))
 			{
-				currentState.Buttons |= 2048u;
+				currentState.Buttons |= 2048U;
 			}
 			if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.RShoulder))
 			{
-				currentState.Buttons |= 8u;
+				currentState.Buttons |= 8U;
 			}
 			currentState.LThumbstick.x = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.LThumbstickX);
 			currentState.LThumbstick.y = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.LThumbstickY);
@@ -2124,69 +2124,69 @@ public static class OVRInput
 			currentState.RIndexTrigger = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.RIndexTrigger);
 			if (currentState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 268435456u;
+				currentState.Buttons |= 268435456U;
 			}
 			if (currentState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 536870912u;
+				currentState.Buttons |= 536870912U;
 			}
 			if (currentState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 16u;
+				currentState.Buttons |= 16U;
 			}
 			if (currentState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 32u;
+				currentState.Buttons |= 32U;
 			}
 			if (currentState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 64u;
+				currentState.Buttons |= 64U;
 			}
 			if (currentState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 128u;
+				currentState.Buttons |= 128U;
 			}
 			if (currentState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 67108864u;
+				currentState.Buttons |= 67108864U;
 			}
 			if (currentState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 134217728u;
+				currentState.Buttons |= 134217728U;
 			}
 			if (currentState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 4096u;
+				currentState.Buttons |= 4096U;
 			}
 			if (currentState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 8192u;
+				currentState.Buttons |= 8192U;
 			}
 			if (currentState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 16384u;
+				currentState.Buttons |= 16384U;
 			}
 			if (currentState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 32768u;
+				currentState.Buttons |= 32768U;
 			}
 			float axisRaw = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.DpadX);
 			float axisRaw2 = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.DpadY);
 			if (axisRaw <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 262144u;
+				currentState.Buttons |= 262144U;
 			}
 			if (axisRaw >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 524288u;
+				currentState.Buttons |= 524288U;
 			}
 			if (axisRaw2 <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 131072u;
+				currentState.Buttons |= 131072U;
 			}
 			if (axisRaw2 >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
 			{
-				currentState.Buttons |= 65536u;
+				currentState.Buttons |= 65536U;
 			}
 			this.previousState = this.currentState;
 			this.currentState = currentState;
@@ -2333,7 +2333,7 @@ public static class OVRInput
 			OVRPlugin.ControllerState currentState = default(OVRPlugin.ControllerState);
 			if (Input.mousePresent)
 			{
-				currentState.ConnectedControllers = 134217728u;
+				currentState.ConnectedControllers = 134217728U;
 			}
 			if (Input.GetMouseButtonDown(0))
 			{
@@ -2345,7 +2345,7 @@ public static class OVRInput
 				Vector3 vector = this.moveAmountMouse;
 				if (vector.magnitude < this.minMovMagnitudeMouse)
 				{
-					currentState.Buttons |= 1u;
+					currentState.Buttons |= 1U;
 				}
 				else
 				{
@@ -2354,26 +2354,26 @@ public static class OVRInput
 					{
 						if (vector.x > 0f)
 						{
-							currentState.Buttons |= 524288u;
+							currentState.Buttons |= 524288U;
 						}
 						else
 						{
-							currentState.Buttons |= 262144u;
+							currentState.Buttons |= 262144U;
 						}
 					}
 					else if (vector.y > 0f)
 					{
-						currentState.Buttons |= 131072u;
+						currentState.Buttons |= 131072U;
 					}
 					else
 					{
-						currentState.Buttons |= 65536u;
+						currentState.Buttons |= 65536U;
 					}
 				}
 			}
 			if (Input.GetKey(KeyCode.Escape))
 			{
-				currentState.Buttons |= 2u;
+				currentState.Buttons |= 2U;
 			}
 			this.previousState = this.currentState;
 			this.currentState = currentState;

+ 1 - 1
Assembly-CSharp/OVRLipSyncContext.cs

@@ -28,7 +28,7 @@ public class OVRLipSyncContext : OVRLipSyncContextBase
 		}
 		lock (this)
 		{
-			if (base.Context != 0u)
+			if (base.Context != 0U)
 			{
 				OVRLipSync.Flags flags = OVRLipSync.Flags.None;
 				if (this.delayCompensate)

+ 2 - 2
Assembly-CSharp/OVRLipSyncContextBase.cs

@@ -36,7 +36,7 @@ public class OVRLipSyncContextBase : MonoBehaviour
 		}
 		lock (this)
 		{
-			if (this.context == 0u && OVRLipSync.CreateContext(ref this.context, this.provider) != OVRLipSync.Result.Success)
+			if (this.context == 0U && OVRLipSync.CreateContext(ref this.context, this.provider) != OVRLipSync.Result.Success)
 			{
 				Debug.Log("OVRPhonemeContext.Start ERROR: Could not create Phoneme context.");
 			}
@@ -47,7 +47,7 @@ public class OVRLipSyncContextBase : MonoBehaviour
 	{
 		lock (this)
 		{
-			if (this.context != 0u && OVRLipSync.DestroyContext(this.context) != OVRLipSync.Result.Success)
+			if (this.context != 0U && OVRLipSync.DestroyContext(this.context) != OVRLipSync.Result.Success)
 			{
 				Debug.Log("OVRPhonemeContext.OnDestroy ERROR: Could not delete Phoneme context.");
 			}

+ 3 - 3
Assembly-CSharp/OVRPlugin.cs

@@ -481,14 +481,14 @@ internal static class OVRPlugin
 	{
 		if (OVRPlugin.version >= OVRPlugin.OVRP_1_6_0.version)
 		{
-			uint num = 0u;
+			uint num = 0U;
 			if (onTop)
 			{
-				num |= 1u;
+				num |= 1U;
 			}
 			if (headLocked)
 			{
-				num |= 2u;
+				num |= 2U;
 			}
 			if (shape == OVRPlugin.OverlayShape.Cylinder || shape == OVRPlugin.OverlayShape.Cubemap)
 			{

+ 3 - 3
Assembly-CSharp/OvrCamera.cs

@@ -823,7 +823,7 @@ public class OvrCamera : CameraMain
 		this.m_unDummyHandVisibleFlag |= (uint)f_hand;
 		if (this.m_DummyHand != null)
 		{
-			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0u);
+			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0U);
 			this.m_DummyHand.Grab = f_bGrab;
 			this.m_DummyHand.transform.position = f_vWorldPos;
 		}
@@ -834,7 +834,7 @@ public class OvrCamera : CameraMain
 		this.m_unDummyHandVisibleFlag &= (uint)(~(uint)f_hand);
 		if (this.m_DummyHand != null)
 		{
-			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0u);
+			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0U);
 		}
 	}
 
@@ -902,7 +902,7 @@ public class OvrCamera : CameraMain
 		}
 		if (this.m_DummyHand != null)
 		{
-			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0u);
+			this.m_DummyHand.Show = (this.m_unDummyHandVisibleFlag != 0U);
 		}
 		if (this.m_BloomOVR != null)
 		{

+ 26 - 26
Assembly-CSharp/OvrControllerButtons.cs

@@ -107,60 +107,60 @@ public class OvrControllerButtons : AVRControllerButtons
 	private uint[,] m_aryBtn2RealOvr = new uint[,]
 	{
 		{
-			512u,
-			2u
+			512U,
+			2U
 		},
 		{
-			256u,
-			1u
+			256U,
+			1U
 		},
 		{
-			1024u,
-			4u
+			1024U,
+			4U
 		},
 		{
-			536870912u,
-			134217728u
+			536870912U,
+			134217728U
 		},
 		{
-			1048576u,
-			1048576u
+			1048576U,
+			1048576U
 		},
 		{
-			268435456u,
-			67108864u
+			268435456U,
+			67108864U
 		},
 		{
-			1024u,
-			4u
+			1024U,
+			4U
 		},
 		{
-			536870912u,
-			134217728u
+			536870912U,
+			134217728U
 		}
 	};
 
 	private uint[,] m_aryTouch2RealOvr = new uint[,]
 	{
 		{
-			4096u,
-			16u
+			4096U,
+			16U
 		},
 		{
-			1024u,
-			4u
+			1024U,
+			4U
 		},
 		{
-			2048u,
-			8u
+			2048U,
+			8U
 		},
 		{
-			512u,
-			2u
+			512U,
+			2U
 		},
 		{
-			256u,
-			1u
+			256U,
+			1U
 		}
 	};
 

+ 1 - 2
Assembly-CSharp/OvrHandCamera.cs

@@ -98,8 +98,7 @@ public class OvrHandCamera : MonoBehaviour
 
 	private string GetTimeFileName(bool f_bThum = false)
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "ScreenShot";
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "ScreenShot");
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 4 - 4
Assembly-CSharp/OvrIK.cs

@@ -1568,7 +1568,7 @@ public class OvrIK : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1440;
+			this.m_nVersion = 1470;
 		}
 
 		public void OnAfterDeserialize()
@@ -1578,7 +1578,7 @@ public class OvrIK : MonoBehaviour
 		public bool Write()
 		{
 			string contents = JsonUtility.ToJson(this, true);
-			string path = UTY.gameProjectPath + "\\OvrIK.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "OvrIK.json");
 			try
 			{
 				File.WriteAllText(path, contents);
@@ -1593,7 +1593,7 @@ public class OvrIK : MonoBehaviour
 
 		public OvrIK.OvrIkConfig Read()
 		{
-			string path = UTY.gameProjectPath + "\\OvrIK.json";
+			string path = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "OvrIK.json");
 			if (!File.Exists(path))
 			{
 				this.Write();
@@ -1628,7 +1628,7 @@ public class OvrIK : MonoBehaviour
 		private const string CONF_NAME = "OvrIK.json";
 
 		[SerializeField]
-		private int m_nVersion = 1440;
+		private int m_nVersion = 1470;
 
 		[SerializeField]
 		private float solver_locomotion_weight = 1f;

+ 1 - 2
Assembly-CSharp/OvrSelfShotCamera.cs

@@ -123,8 +123,7 @@ public class OvrSelfShotCamera : MonoBehaviour
 
 	private string GetTimeFileName(bool f_bThum = false)
 	{
-		string str = UTY.gameProjectPath + "\\";
-		string text = str + "ScreenShot";
+		string text = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "ScreenShot");
 		if (!Directory.Exists(text))
 		{
 			Directory.CreateDirectory(text);

+ 1 - 1
Assembly-CSharp/PhotoFaceDataShortcutSetter.cs

@@ -325,7 +325,7 @@ public class PhotoFaceDataShortcutSetter : MonoBehaviour
 		{
 			if (keyValuePair.Value == check_box)
 			{
-				foreach (string array4 in array3)
+				foreach (string[] array4 in array3)
 				{
 					if (0 <= Array.IndexOf<string>(array4, keyValuePair.Key))
 					{

+ 1 - 1
Assembly-CSharp/PhotoModeSaveAndLoad.cs

@@ -450,7 +450,7 @@ public class PhotoModeSaveAndLoad : MonoBehaviour
 	private XElement CreateCommonData(string title, string comment)
 	{
 		string value = DateTime.ParseExact(DateTime.Now.ToString("yyyyMMddHHmmss"), "yyyyMMddHHmmss", null).ToString("yyyy.MM.dd HH:mm");
-		XElement xelement = new XElement("GameVersion", 1440);
+		XElement xelement = new XElement("GameVersion", 1470);
 		XElement xelement2 = new XElement("SaveTime", value);
 		XElement xelement3 = new XElement("Title", title);
 		XElement xelement4 = new XElement("Comment", comment);

+ 3 - 4
Assembly-CSharp/PhotoWindowManager.cs

@@ -74,7 +74,7 @@ public class PhotoWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			return UTY.gameProjectPath + "\\PhotoModeData\\";
+			return Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "PhotoModeData\\");
 		}
 	}
 
@@ -649,9 +649,8 @@ public class PhotoWindowManager : BasePhotoWindowManager
 	{
 		get
 		{
-			string str = UTY.gameProjectPath + "\\";
-			string str2 = str + "PhotoModeData/SaveData";
-			return str2 + "/PhotoModeUISetting.save";
+			string str = Path.Combine(PhotoWindowManager.path_photo_folder, "SaveData");
+			return str + "/PhotoModeUISetting.save";
 		}
 	}
 

+ 2 - 2
Assembly-CSharp/PlacementWindow.cs

@@ -466,7 +466,7 @@ public class PlacementWindow : BaseMaidPhotoWindow
 			return;
 		}
 		List<PlacementWindow.MaidSlotData> list = new List<PlacementWindow.MaidSlotData>();
-		uint num = 0u;
+		uint num = 0U;
 		for (int i = 0; i < this.active_maid_list_.Count; i++)
 		{
 			if (this.active_maid_list_[i].maid == maid)
@@ -505,7 +505,7 @@ public class PlacementWindow : BaseMaidPhotoWindow
 			maid.AllProcPropSeqStart();
 			PlacementWindow.MaidSlotData maidSlotData = new PlacementWindow.MaidSlotData();
 			maidSlotData.maid = maid;
-			maidSlotData.sort_no = num + 1u;
+			maidSlotData.sort_no = num + 1U;
 			maidSlotData.slot_no = k;
 			this.new_load_maid_data_list_.Add(maidSlotData);
 			break;

+ 4 - 4
Assembly-CSharp/PlayerStatus/Status.cs

@@ -831,7 +831,7 @@ namespace PlayerStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_PLAYER_STATUS");
-			binary.Write(1440);
+			binary.Write(1470);
 			binary.Write(this.playerName_);
 			binary.Write(this.days_);
 			binary.Write(this.totalPurchasePrice_);
@@ -896,7 +896,7 @@ namespace PlayerStatus
 			{
 				binary.Write(value3);
 			}
-			binary.Write(3830248615u);
+			binary.Write(3830248615U);
 		}
 
 		public void Deserialize(BinaryReader binary)
@@ -1000,7 +1000,7 @@ namespace PlayerStatus
 				this.yotogiClassOpenFlags.Add(item3);
 			}
 			uint num8 = binary.ReadUInt32();
-			NDebug.Assert(3830248615u == num8, "プレイヤーパラメータのロードに失敗しました");
+			NDebug.Assert(3830248615U == num8, "プレイヤーパラメータのロードに失敗しました");
 			foreach (string key6 in Status.flagLockPartsItems)
 			{
 				if (!this.havePartsItems_.ContainsKey(key6))
@@ -1102,7 +1102,7 @@ namespace PlayerStatus
 
 		public const int ClubGradeMax = 5;
 
-		private const uint SaveDataCheckCode = 3830248615u;
+		private const uint SaveDataCheckCode = 3830248615U;
 
 		private static HashSet<string> flagLockPartsItems;
 

+ 0 - 2
Assembly-CSharp/Properties/AssemblyInfo.cs

@@ -6,6 +6,4 @@ using System.Security;
 using System.Security.Permissions;
 
 [assembly: AssemblyVersion("0.0.0.0")]
-[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
-[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
 [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]

+ 1 - 1
Assembly-CSharp/RenderHeads/Media/AVProVideo/WindowsMediaPlayer.cs

@@ -85,7 +85,7 @@ namespace RenderHeads.Media.AVProVideo
 		public override bool OpenVideoFromFile(string path, long offset, string httpHeaderJson)
 		{
 			this.CloseVideo();
-			uint numFilters = 0u;
+			uint numFilters = 0U;
 			IntPtr[] array = null;
 			if (this._preferredFilters != null && this._preferredFilters.Count > 0)
 			{

+ 1 - 1
Assembly-CSharp/SceneEdit.cs

@@ -3495,7 +3495,7 @@ public class SceneEdit : MonoBehaviour
 					"プリティ"
 				}
 			};
-			foreach (string array3 in array)
+			foreach (string[] array3 in array)
 			{
 				text = text.Replace(array3[0], array3[1]);
 			}

+ 3 - 3
Assembly-CSharp/SceneEditWindow/WindowManager.cs

@@ -1,4 +1,5 @@
 using System;
+using System.IO;
 using UnityEngine;
 
 namespace SceneEditWindow
@@ -10,9 +11,8 @@ namespace SceneEditWindow
 		{
 			get
 			{
-				string str = UTY.gameProjectPath + "\\";
-				string str2 = str + "SaveData";
-				return str2 + "/EditUI.save";
+				string str = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "SaveData");
+				return str + "/EditUI.save";
 			}
 		}
 

+ 1 - 1
Assembly-CSharp/SceneNPCEdit/SaveData.cs

@@ -10,7 +10,7 @@ namespace SceneNPCEdit
 		public static void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_NPCEDIT");
-			binary.Write(1440);
+			binary.Write(1470);
 			binary.Write(SaveData.presetData.Count);
 			foreach (KeyValuePair<int, byte[]> keyValuePair in SaveData.presetData)
 			{

+ 19 - 2
Assembly-CSharp/ScriptManager.cs

@@ -1201,8 +1201,25 @@ public class ScriptManager : IDisposable
 			if (!flag)
 			{
 				maid = characterMgr.AddStockMaid();
+				List<SubMaid.BackupStatus> subMaidBackupStatusList = GameMain.Instance.CharacterMgr.subMaidBackupStatusList;
+				int index = -1;
+				SubMaid.BackupStatus backupStatus = null;
+				for (int j = 0; j < subMaidBackupStatusList.Count; j++)
+				{
+					if (subMaidBackupStatusList[j].subCharaUniqueName == data.uniqueName)
+					{
+						index = j;
+						backupStatus = subMaidBackupStatusList[j];
+						break;
+					}
+				}
 				data.ApplyStatus(maid.status, characterMgr.status.lockUserDraftMaid);
-				data.ApplyPreset(maid, characterMgr.status.lockUserDraftMaid);
+				data.ApplyPreset(maid, characterMgr.status.lockUserDraftMaid, backupStatus == null);
+				if (backupStatus != null)
+				{
+					backupStatus.Apply(maid.status);
+					subMaidBackupStatusList.RemoveAt(index);
+				}
 			}
 		}
 		else
@@ -3336,7 +3353,7 @@ public class ScriptManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_SCRIPT");
-		binary.Write(1440);
+		binary.Write(1470);
 		this.adv_kag_.Serialize(binary);
 	}
 

+ 267 - 0
Assembly-CSharp/SerializeStorageManager.cs

@@ -0,0 +1,267 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+
+public class SerializeStorageManager
+{
+	public SerializeStorageManager()
+	{
+		if (File.Exists(this.ConfigFilePath))
+		{
+			try
+			{
+				this.config = JsonUtility.FromJson<SerializeStorageManager.Config>(File.ReadAllText(this.ConfigFilePath));
+			}
+			catch
+			{
+			}
+		}
+		if (this.config.locationType != SerializeStorageManager.Config.LocationType.Normal)
+		{
+			try
+			{
+				if (!Directory.Exists(this.GetStoreDirectoryPath(this.config.locationType)))
+				{
+					Directory.CreateDirectory(this.GetStoreDirectoryPath(this.config.locationType));
+				}
+			}
+			catch (Exception exception)
+			{
+				Debug.LogException(exception);
+			}
+		}
+		this.StartSerializeStorageMigrationSequence();
+	}
+
+	private string ConfigFilePath
+	{
+		get
+		{
+			return Path.Combine(UTY.gameProjectPath, "serialize_storage_config.cfg");
+		}
+	}
+
+	public string StoreDirectoryPath
+	{
+		get
+		{
+			return this.GetStoreDirectoryPath(this.config.locationType);
+		}
+	}
+
+	public void StartSerializeStorageMigrationSequence()
+	{
+		if (this.config.locationType == SerializeStorageManager.Config.LocationType.Normal)
+		{
+			return;
+		}
+		List<string> list = new List<string>(new string[]
+		{
+			"config.xml",
+			"dance_setting_br.dat",
+			"system.dat",
+			"OvrControllerShortcutConfig.json",
+			"MaidFingerDataList.json",
+			"OvrIK.json"
+		});
+		List<string> list2 = new List<string>(new string[]
+		{
+			"Thumb",
+			"ScreenShot",
+			"SaveData",
+			"Preset",
+			"PhotoModeData",
+			"MyRoom"
+		});
+		string storeDirectoryPath = this.GetStoreDirectoryPath(this.config.locationType);
+		string storeDirectoryPath2 = this.GetStoreDirectoryPath(SerializeStorageManager.Config.LocationType.Normal);
+		bool flag = Directory.Exists(Path.Combine(storeDirectoryPath2, "SaveData"));
+		bool flag2 = false;
+		bool flag3 = false;
+		foreach (string path in list)
+		{
+			string path2 = Path.Combine(storeDirectoryPath2, path);
+			string path3 = Path.Combine(storeDirectoryPath, path);
+			if (File.Exists(path2))
+			{
+				flag3 |= true;
+			}
+			if (Directory.Exists(path3))
+			{
+				flag2 |= true;
+			}
+		}
+		foreach (string path4 in list2)
+		{
+			string path5 = Path.Combine(storeDirectoryPath2, path4);
+			string path6 = Path.Combine(storeDirectoryPath, path4);
+			if (Directory.Exists(path5))
+			{
+				flag3 |= true;
+			}
+			if (File.Exists(path6))
+			{
+				flag2 |= true;
+			}
+		}
+		List<KeyValuePair<string, string>> list3 = new List<KeyValuePair<string, string>>();
+		List<KeyValuePair<string, string>> list4 = new List<KeyValuePair<string, string>>();
+		if (flag3)
+		{
+			if (flag)
+			{
+				NDebug.MessageBox(string.Empty, "Your save data will be transferred automatically.\nThe new save data location is:\n" + storeDirectoryPath);
+			}
+			if (!flag2)
+			{
+				string text = Path.Combine(this.GetStoreDirectoryPath(SerializeStorageManager.Config.LocationType.Normal), "BackupData_" + DateTime.Now.ToString("yyyyMMddHHmmss"));
+				if (!Directory.Exists(storeDirectoryPath))
+				{
+					Directory.CreateDirectory(storeDirectoryPath);
+				}
+				if (!Directory.Exists(text))
+				{
+					Directory.CreateDirectory(text);
+				}
+				foreach (string path7 in list)
+				{
+					string text2 = Path.Combine(storeDirectoryPath2, path7);
+					string text3 = Path.Combine(storeDirectoryPath, path7);
+					if (File.Exists(text2) && !Directory.Exists(text3))
+					{
+						if (!File.Exists(text3))
+						{
+							File.Copy(text2, text3);
+						}
+						else
+						{
+							Debug.LogWarning("StartSerializeStorageMigrationSequence\ndestPath:" + text3 + "には既にファイルが存在するためコピーに失敗しました" + text2);
+						}
+						list3.Add(new KeyValuePair<string, string>(text2, Path.Combine(text, path7)));
+					}
+				}
+				foreach (string path8 in list2)
+				{
+					string text4 = Path.Combine(storeDirectoryPath2, path8);
+					string text5 = Path.Combine(storeDirectoryPath, path8);
+					if (Directory.Exists(text4) && !File.Exists(text5))
+					{
+						SerializeStorageManager.DirectoryCopy(text4, text5, true);
+						list4.Add(new KeyValuePair<string, string>(text4, Path.Combine(text, path8)));
+					}
+				}
+				foreach (KeyValuePair<string, string> keyValuePair in list3)
+				{
+					File.Move(keyValuePair.Key, keyValuePair.Value);
+				}
+				foreach (KeyValuePair<string, string> keyValuePair2 in list4)
+				{
+					Directory.Move(keyValuePair2.Key, keyValuePair2.Value);
+				}
+				if (flag)
+				{
+					NDebug.MessageBox(string.Empty, "Transfer complete.");
+				}
+			}
+			else if (flag)
+			{
+				NDebug.MessageBox(string.Empty, storeDirectoryPath + "There is already existing data here, so your save data cannot be transferred.");
+			}
+		}
+	}
+
+	public void SaveConfigFile()
+	{
+		File.WriteAllText(this.ConfigFilePath, JsonUtility.ToJson(this.config));
+	}
+
+	private string GetStoreDirectoryPath(SerializeStorageManager.Config.LocationType type)
+	{
+		if (type == SerializeStorageManager.Config.LocationType.Document)
+		{
+			return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "KISS\\COM3D2\\");
+		}
+		return UTY.gameProjectPath + "\\";
+	}
+
+	private static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs)
+	{
+		DirectoryInfo directoryInfo = new DirectoryInfo(sourceDirName);
+		if (!directoryInfo.Exists)
+		{
+			throw new DirectoryNotFoundException("Source directory does not exist or could not be found: " + sourceDirName);
+		}
+		DirectoryInfo[] directories = directoryInfo.GetDirectories();
+		if (!Directory.Exists(destDirName))
+		{
+			Directory.CreateDirectory(destDirName);
+		}
+		FileInfo[] files = directoryInfo.GetFiles();
+		foreach (FileInfo fileInfo in files)
+		{
+			string text = Path.Combine(destDirName, fileInfo.Name);
+			if (!File.Exists(text))
+			{
+				fileInfo.CopyTo(text, false);
+			}
+			else
+			{
+				Debug.LogWarning("DirectoryCopy\ndestPath:" + text + "には既にファイルが存在するためコピーに失敗しました" + fileInfo.FullName);
+			}
+		}
+		if (copySubDirs)
+		{
+			foreach (DirectoryInfo directoryInfo2 in directories)
+			{
+				string destDirName2 = Path.Combine(destDirName, directoryInfo2.Name);
+				SerializeStorageManager.DirectoryCopy(directoryInfo2.FullName, destDirName2, copySubDirs);
+			}
+		}
+	}
+
+	private const string ConfigFileName = "serialize_storage_config.cfg";
+
+	private SerializeStorageManager.Config config = new SerializeStorageManager.Config();
+
+	[Serializable]
+	private class Config : ISerializationCallbackReceiver
+	{
+		public void OnBeforeSerialize()
+		{
+			this.version = 1000;
+			this.locationTypeText = this.locationType.ToString();
+		}
+
+		public void OnAfterDeserialize()
+		{
+			this.locationType = SerializeStorageManager.Config.LocationType.Normal;
+			try
+			{
+				if (!string.IsNullOrEmpty(this.locationTypeText))
+				{
+					this.locationType = (SerializeStorageManager.Config.LocationType)Enum.Parse(typeof(SerializeStorageManager.Config.LocationType), this.locationTypeText, true);
+				}
+			}
+			catch
+			{
+			}
+		}
+
+		private const int FixVersion = 1000;
+
+		public int version = 1000;
+
+		[NonSerialized]
+		public SerializeStorageManager.Config.LocationType locationType;
+
+		[SerializeField]
+		public string locationTypeText;
+
+		public enum LocationType
+		{
+			Normal,
+			Document
+		}
+	}
+}

+ 8 - 8
Assembly-CSharp/SteamVR.cs

@@ -12,8 +12,8 @@ public class SteamVR : IDisposable
 		Debug.Log("Connected to " + this.hmd_TrackingSystemName + ":" + this.hmd_SerialNumber);
 		this.compositor = OpenVR.Compositor;
 		this.overlay = OpenVR.Overlay;
-		uint num = 0u;
-		uint num2 = 0u;
+		uint num = 0U;
+		uint num2 = 0U;
 		this.hmd.GetRecommendedRenderTargetSize(ref num, ref num2);
 		this.sceneWidth = num;
 		this.sceneHeight = num2;
@@ -256,8 +256,8 @@ public class SteamVR : IDisposable
 	public string GetTrackedDeviceString(uint deviceId)
 	{
 		ETrackedPropertyError etrackedPropertyError = ETrackedPropertyError.TrackedProp_Success;
-		uint stringTrackedDeviceProperty = this.hmd.GetStringTrackedDeviceProperty(deviceId, ETrackedDeviceProperty.Prop_AttachedDeviceId_String, null, 0u, ref etrackedPropertyError);
-		if (stringTrackedDeviceProperty > 1u)
+		uint stringTrackedDeviceProperty = this.hmd.GetStringTrackedDeviceProperty(deviceId, ETrackedDeviceProperty.Prop_AttachedDeviceId_String, null, 0U, ref etrackedPropertyError);
+		if (stringTrackedDeviceProperty > 1U)
 		{
 			StringBuilder stringBuilder = new StringBuilder((int)stringTrackedDeviceProperty);
 			this.hmd.GetStringTrackedDeviceProperty(deviceId, ETrackedDeviceProperty.Prop_AttachedDeviceId_String, stringBuilder, stringTrackedDeviceProperty, ref etrackedPropertyError);
@@ -269,11 +269,11 @@ public class SteamVR : IDisposable
 	private string GetStringProperty(ETrackedDeviceProperty prop)
 	{
 		ETrackedPropertyError etrackedPropertyError = ETrackedPropertyError.TrackedProp_Success;
-		uint stringTrackedDeviceProperty = this.hmd.GetStringTrackedDeviceProperty(0u, prop, null, 0u, ref etrackedPropertyError);
-		if (stringTrackedDeviceProperty > 1u)
+		uint stringTrackedDeviceProperty = this.hmd.GetStringTrackedDeviceProperty(0U, prop, null, 0U, ref etrackedPropertyError);
+		if (stringTrackedDeviceProperty > 1U)
 		{
 			StringBuilder stringBuilder = new StringBuilder((int)stringTrackedDeviceProperty);
-			this.hmd.GetStringTrackedDeviceProperty(0u, prop, stringBuilder, stringTrackedDeviceProperty, ref etrackedPropertyError);
+			this.hmd.GetStringTrackedDeviceProperty(0U, prop, stringBuilder, stringTrackedDeviceProperty, ref etrackedPropertyError);
 			return stringBuilder.ToString();
 		}
 		return (etrackedPropertyError == ETrackedPropertyError.TrackedProp_Success) ? "<unknown>" : etrackedPropertyError.ToString();
@@ -282,7 +282,7 @@ public class SteamVR : IDisposable
 	private float GetFloatProperty(ETrackedDeviceProperty prop)
 	{
 		ETrackedPropertyError etrackedPropertyError = ETrackedPropertyError.TrackedProp_Success;
-		return this.hmd.GetFloatTrackedDeviceProperty(0u, prop, ref etrackedPropertyError);
+		return this.hmd.GetFloatTrackedDeviceProperty(0U, prop, ref etrackedPropertyError);
 	}
 
 	private void OnInitializing(params object[] args)

+ 2 - 2
Assembly-CSharp/SteamVR_Controller.cs

@@ -9,11 +9,11 @@ public class SteamVR_Controller
 		if (SteamVR_Controller.devices == null)
 		{
 			SteamVR_Controller.devices = new SteamVR_Controller.Device[16];
-			uint num = 0u;
+			uint num = 0U;
 			while ((ulong)num < (ulong)((long)SteamVR_Controller.devices.Length))
 			{
 				SteamVR_Controller.devices[(int)((UIntPtr)num)] = new SteamVR_Controller.Device(num);
-				num += 1u;
+				num += 1U;
 			}
 		}
 		return SteamVR_Controller.devices[deviceIndex];

+ 8 - 8
Assembly-CSharp/SteamVR_ControllerManager.cs

@@ -105,7 +105,7 @@ public class SteamVR_ControllerManager : MonoBehaviour
 
 	private void SetTrackedDeviceIndex(int objectIndex, uint trackedDeviceIndex)
 	{
-		if (trackedDeviceIndex != 4294967295u)
+		if (trackedDeviceIndex != 4294967295U)
 		{
 			for (int i = 0; i < this.objects.Length; i++)
 			{
@@ -126,7 +126,7 @@ public class SteamVR_ControllerManager : MonoBehaviour
 			GameObject gameObject2 = this.objects[objectIndex];
 			if (gameObject2 != null)
 			{
-				if (trackedDeviceIndex == 4294967295u)
+				if (trackedDeviceIndex == 4294967295U)
 				{
 					gameObject2.SetActive(false);
 				}
@@ -174,9 +174,9 @@ public class SteamVR_ControllerManager : MonoBehaviour
 			this.leftIndex = system.GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole.LeftHand);
 			this.rightIndex = system.GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole.RightHand);
 		}
-		if (this.leftIndex == 4294967295u && this.rightIndex == 4294967295u)
+		if (this.leftIndex == 4294967295U && this.rightIndex == 4294967295U)
 		{
-			uint num = 0u;
+			uint num = 0U;
 			while ((ulong)num < (ulong)((long)this.connected.Length))
 			{
 				if (this.connected[(int)((UIntPtr)num)])
@@ -184,16 +184,16 @@ public class SteamVR_ControllerManager : MonoBehaviour
 					this.SetTrackedDeviceIndex(i++, num);
 					break;
 				}
-				num += 1u;
+				num += 1U;
 			}
 		}
 		else
 		{
 			this.SetTrackedDeviceIndex(i++, ((ulong)this.rightIndex >= (ulong)((long)this.connected.Length) || !this.connected[(int)((UIntPtr)this.rightIndex)]) ? uint.MaxValue : this.rightIndex);
 			this.SetTrackedDeviceIndex(i++, ((ulong)this.leftIndex >= (ulong)((long)this.connected.Length) || !this.connected[(int)((UIntPtr)this.leftIndex)]) ? uint.MaxValue : this.leftIndex);
-			if (this.leftIndex != 4294967295u && this.rightIndex != 4294967295u)
+			if (this.leftIndex != 4294967295U && this.rightIndex != 4294967295U)
 			{
-				uint num2 = 0u;
+				uint num2 = 0U;
 				while ((ulong)num2 < (ulong)((long)this.connected.Length))
 				{
 					if (i >= this.objects.Length)
@@ -207,7 +207,7 @@ public class SteamVR_ControllerManager : MonoBehaviour
 							this.SetTrackedDeviceIndex(i++, num2);
 						}
 					}
-					num2 += 1u;
+					num2 += 1U;
 				}
 			}
 		}

+ 2 - 2
Assembly-CSharp/SteamVR_LaserPointer.cs

@@ -74,7 +74,7 @@ public class SteamVR_LaserPointer : MonoBehaviour
 				e.controllerIndex = component.controllerIndex;
 			}
 			e.distance = 0f;
-			e.flags = 0u;
+			e.flags = 0U;
 			e.target = this.previousContact;
 			this.OnPointerOut(e);
 			this.previousContact = null;
@@ -87,7 +87,7 @@ public class SteamVR_LaserPointer : MonoBehaviour
 				e2.controllerIndex = component.controllerIndex;
 			}
 			e2.distance = raycastHit.distance;
-			e2.flags = 0u;
+			e2.flags = 0U;
 			e2.target = raycastHit.transform;
 			this.OnPointerIn(e2);
 			this.previousContact = raycastHit.transform;

+ 3 - 3
Assembly-CSharp/SteamVR_Render.cs

@@ -302,7 +302,7 @@ public class SteamVR_Render : MonoBehaviour
 							});
 						}
 					}
-					else if (vrevent_t.data.process.pid == 0u)
+					else if (vrevent_t.data.process.pid == 0U)
 					{
 						SteamVR_Utils.Event.Send("input_focus", new object[]
 						{
@@ -310,7 +310,7 @@ public class SteamVR_Render : MonoBehaviour
 						});
 					}
 				}
-				else if (vrevent_t.data.process.oldPid == 0u)
+				else if (vrevent_t.data.process.oldPid == 0U)
 				{
 					SteamVR_Utils.Event.Send("input_focus", new object[]
 					{
@@ -330,7 +330,7 @@ public class SteamVR_Render : MonoBehaviour
 			{
 				Compositor_FrameTiming compositor_FrameTiming = default(Compositor_FrameTiming);
 				compositor_FrameTiming.m_nSize = (uint)Marshal.SizeOf(typeof(Compositor_FrameTiming));
-				instance.compositor.GetFrameTiming(ref compositor_FrameTiming, 0u);
+				instance.compositor.GetFrameTiming(ref compositor_FrameTiming, 0U);
 				Time.fixedDeltaTime = Time.timeScale / instance.hmd_DisplayFrequency;
 				Time.maximumDeltaTime = Time.fixedDeltaTime * compositor_FrameTiming.m_nNumFramePresents;
 			}

+ 18 - 18
Assembly-CSharp/SteamVR_RenderModel.cs

@@ -56,8 +56,8 @@ public class SteamVR_RenderModel : MonoBehaviour
 			return;
 		}
 		ETrackedPropertyError etrackedPropertyError = ETrackedPropertyError.TrackedProp_Success;
-		uint stringTrackedDeviceProperty = system.GetStringTrackedDeviceProperty((uint)this.index, ETrackedDeviceProperty.Prop_RenderModelName_String, null, 0u, ref etrackedPropertyError);
-		if (stringTrackedDeviceProperty <= 1u)
+		uint stringTrackedDeviceProperty = system.GetStringTrackedDeviceProperty((uint)this.index, ETrackedDeviceProperty.Prop_RenderModelName_String, null, 0U, ref etrackedPropertyError);
+		if (stringTrackedDeviceProperty <= 1U)
 		{
 			Debug.LogError("Failed to get render model name for tracked object " + this.index);
 			return;
@@ -87,23 +87,23 @@ public class SteamVR_RenderModel : MonoBehaviour
 			}
 			uint count = renderModels.GetComponentCount(renderModelName);
 			string[] renderModelNames;
-			if (count > 0u)
+			if (count > 0U)
 			{
 				renderModelNames = new string[count];
 				int num = 0;
 				while ((long)num < (long)((ulong)count))
 				{
-					uint num2 = renderModels.GetComponentName(renderModelName, (uint)num, null, 0u);
-					if (num2 != 0u)
+					uint num2 = renderModels.GetComponentName(renderModelName, (uint)num, null, 0U);
+					if (num2 != 0U)
 					{
 						StringBuilder stringBuilder = new StringBuilder((int)num2);
-						if (renderModels.GetComponentName(renderModelName, (uint)num, stringBuilder, num2) != 0u)
+						if (renderModels.GetComponentName(renderModelName, (uint)num, stringBuilder, num2) != 0U)
 						{
-							num2 = renderModels.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), null, 0u);
-							if (num2 != 0u)
+							num2 = renderModels.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), null, 0U);
+							if (num2 != 0U)
 							{
 								StringBuilder stringBuilder2 = new StringBuilder((int)num2);
-								if (renderModels.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), stringBuilder2, num2) != 0u)
+								if (renderModels.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), stringBuilder2, num2) != 0U)
 								{
 									string text = stringBuilder2.ToString();
 									SteamVR_RenderModel.RenderModel renderModel = SteamVR_RenderModel.models[text] as SteamVR_RenderModel.RenderModel;
@@ -254,7 +254,7 @@ public class SteamVR_RenderModel : MonoBehaviour
 			array3[num] = new Vector2(renderModel_Vertex_t.rfTextureCoord0, renderModel_Vertex_t.rfTextureCoord1);
 			num++;
 		}
-		int num2 = (int)(renderModel_t.unTriangleCount * 3u);
+		int num2 = (int)(renderModel_t.unTriangleCount * 3U);
 		short[] array4 = new short[num2];
 		Marshal.Copy(renderModel_t.rIndexData, array4, 0, array4.Length);
 		int[] array5 = new int[num2];
@@ -393,18 +393,18 @@ public class SteamVR_RenderModel : MonoBehaviour
 			return false;
 		}
 		uint componentCount = instance.GetComponentCount(renderModelName);
-		if (componentCount == 0u)
+		if (componentCount == 0U)
 		{
 			return false;
 		}
 		int num = 0;
 		while ((long)num < (long)((ulong)componentCount))
 		{
-			uint num2 = instance.GetComponentName(renderModelName, (uint)num, null, 0u);
-			if (num2 != 0u)
+			uint num2 = instance.GetComponentName(renderModelName, (uint)num, null, 0U);
+			if (num2 != 0U)
 			{
 				StringBuilder stringBuilder = new StringBuilder((int)num2);
-				if (instance.GetComponentName(renderModelName, (uint)num, stringBuilder, num2) != 0u)
+				if (instance.GetComponentName(renderModelName, (uint)num, stringBuilder, num2) != 0U)
 				{
 					transform = this.FindComponent(stringBuilder.ToString());
 					if (transform != null)
@@ -426,11 +426,11 @@ public class SteamVR_RenderModel : MonoBehaviour
 					transform.localPosition = Vector3.zero;
 					transform.localRotation = Quaternion.identity;
 					transform.localScale = Vector3.one;
-					num2 = instance.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), null, 0u);
-					if (num2 != 0u)
+					num2 = instance.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), null, 0U);
+					if (num2 != 0U)
 					{
 						StringBuilder stringBuilder2 = new StringBuilder((int)num2);
-						if (instance.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), stringBuilder2, num2) != 0u)
+						if (instance.GetComponentRenderModelName(renderModelName, stringBuilder.ToString(), stringBuilder2, num2) != 0U)
 						{
 							SteamVR_RenderModel.RenderModel renderModel = SteamVR_RenderModel.models[stringBuilder2] as SteamVR_RenderModel.RenderModel;
 							if (renderModel == null || renderModel.mesh == null)
@@ -522,7 +522,7 @@ public class SteamVR_RenderModel : MonoBehaviour
 						transform2.position = transform.TransformPoint(rigidTransform2.pos);
 						transform2.rotation = transform.rotation * rigidTransform2.rot;
 					}
-					bool flag = (renderModel_ComponentState_t.uProperties & 2u) != 0u;
+					bool flag = (renderModel_ComponentState_t.uProperties & 2U) != 0U;
 					if (flag != child.gameObject.activeSelf)
 					{
 						child.gameObject.SetActive(flag);

+ 1 - 1
Assembly-CSharp/SteamVR_Stats.cs

@@ -34,7 +34,7 @@ public class SteamVR_Stats : MonoBehaviour
 				{
 					Compositor_FrameTiming compositor_FrameTiming = default(Compositor_FrameTiming);
 					compositor_FrameTiming.m_nSize = (uint)Marshal.SizeOf(typeof(Compositor_FrameTiming));
-					compositor.GetFrameTiming(ref compositor_FrameTiming, 0u);
+					compositor.GetFrameTiming(ref compositor_FrameTiming, 0U);
 					double flSystemTimeInSeconds = compositor_FrameTiming.m_flSystemTimeInSeconds;
 					if (flSystemTimeInSeconds > this.lastUpdate)
 					{

+ 1 - 1
Assembly-CSharp/SteamVR_TrackedController.cs

@@ -44,7 +44,7 @@ public class SteamVR_TrackedController : MonoBehaviour
 		{
 			base.gameObject.AddComponent<SteamVR_TrackedObject>();
 		}
-		if (this.controllerIndex != 0u)
+		if (this.controllerIndex != 0U)
 		{
 			base.GetComponent<SteamVR_TrackedObject>().index = (SteamVR_TrackedObject.EIndex)this.controllerIndex;
 			if (base.GetComponent<SteamVR_RenderModel>() != null)

+ 6 - 6
Assembly-CSharp/SteamVR_Utils.cs

@@ -117,21 +117,21 @@ public static class SteamVR_Utils
 
 	public static Mesh CreateHiddenAreaMesh(HiddenAreaMesh_t src, VRTextureBounds_t bounds)
 	{
-		if (src.unTriangleCount == 0u)
+		if (src.unTriangleCount == 0U)
 		{
 			return null;
 		}
-		float[] array = new float[src.unTriangleCount * 3u * 2u];
+		float[] array = new float[src.unTriangleCount * 3U * 2U];
 		Marshal.Copy(src.pVertexData, array, 0, array.Length);
-		Vector3[] array2 = new Vector3[src.unTriangleCount * 3u + 12u];
-		int[] array3 = new int[src.unTriangleCount * 3u + 24u];
+		Vector3[] array2 = new Vector3[src.unTriangleCount * 3U + 12U];
+		int[] array3 = new int[src.unTriangleCount * 3U + 24U];
 		float num = 2f * bounds.uMin - 1f;
 		float num2 = 2f * bounds.uMax - 1f;
 		float num3 = 2f * bounds.vMin - 1f;
 		float num4 = 2f * bounds.vMax - 1f;
 		int num5 = 0;
 		int num6 = 0;
-		while ((long)num5 < (long)((ulong)(src.unTriangleCount * 3u)))
+		while ((long)num5 < (long)((ulong)(src.unTriangleCount * 3U)))
 		{
 			float x = SteamVR_Utils.Lerp(num, num2, array[num6++]);
 			float y = SteamVR_Utils.Lerp(num3, num4, array[num6++]);
@@ -139,7 +139,7 @@ public static class SteamVR_Utils
 			array3[num5] = num5;
 			num5++;
 		}
-		int num7 = (int)(src.unTriangleCount * 3u);
+		int num7 = (int)(src.unTriangleCount * 3U);
 		int num8 = num7;
 		array2[num8++] = new Vector3(-1f, -1f, 0f);
 		array2[num8++] = new Vector3(num, -1f, 0f);

+ 49 - 49
Assembly-CSharp/TriLib/AssetLoader.cs

@@ -418,7 +418,7 @@ namespace TriLib
 				return;
 			}
 			uint num = AssimpInterop.aiScene_GetMetadataCount(scene);
-			uint num2 = 0u;
+			uint num2 = 0U;
 			while (num2 < num)
 			{
 				string metadataKey = AssimpInterop.aiScene_GetMetadataKey(scene, num2);
@@ -451,7 +451,7 @@ namespace TriLib
 				}
 				IL_D1:
 				this.OnMetadataProcessed(metadataType, num2, metadataKey, metadataValue);
-				num2 += 1u;
+				num2 += 1U;
 				continue;
 				IL_C3:
 				metadataValue = AssimpInterop.aiScene_GetMetadataStringValue(scene, num2);
@@ -462,7 +462,7 @@ namespace TriLib
 		private void BuildMeshes(IntPtr scene, AssetLoaderOptions options)
 		{
 			uint num = AssimpInterop.aiScene_GetNumMeshes(scene);
-			for (uint num2 = 0u; num2 < num; num2 += 1u)
+			for (uint num2 = 0U; num2 < num; num2 += 1U)
 			{
 				IntPtr ptrMesh = AssimpInterop.aiScene_GetMesh(scene, num2);
 				uint num3 = AssimpInterop.aiMesh_VertexCount(ptrMesh);
@@ -482,36 +482,36 @@ namespace TriLib
 					array4 = new Vector4[num3];
 				}
 				Vector2[] array5 = null;
-				bool flag3 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 0u);
+				bool flag3 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 0U);
 				if (flag3)
 				{
 					array5 = new Vector2[num3];
 				}
 				Vector2[] array6 = null;
-				bool flag4 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 1u);
+				bool flag4 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 1U);
 				if (flag4)
 				{
 					array6 = new Vector2[num3];
 				}
 				Vector2[] array7 = null;
-				bool flag5 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 2u);
+				bool flag5 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 2U);
 				if (flag5)
 				{
 					array7 = new Vector2[num3];
 				}
 				Vector2[] array8 = null;
-				bool flag6 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 3u);
+				bool flag6 = AssimpInterop.aiMesh_HasTextureCoords(ptrMesh, 3U);
 				if (flag6)
 				{
 					array8 = new Vector2[num3];
 				}
 				Color[] array9 = null;
-				bool flag7 = AssimpInterop.aiMesh_HasVertexColors(ptrMesh, 0u);
+				bool flag7 = AssimpInterop.aiMesh_HasVertexColors(ptrMesh, 0U);
 				if (flag7)
 				{
 					array9 = new Color[num3];
 				}
-				for (uint num4 = 0u; num4 < num3; num4 += 1u)
+				for (uint num4 = 0U; num4 < num3; num4 += 1U)
 				{
 					array[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetVertex(ptrMesh, num4);
 					if (flag)
@@ -525,23 +525,23 @@ namespace TriLib
 					}
 					if (flag3)
 					{
-						array5[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 0u, num4);
+						array5[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 0U, num4);
 					}
 					if (flag4)
 					{
-						array6[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 1u, num4);
+						array6[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 1U, num4);
 					}
 					if (flag5)
 					{
-						array7[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 2u, num4);
+						array7[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 2U, num4);
 					}
 					if (flag6)
 					{
-						array8[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 3u, num4);
+						array8[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetTextureCoord(ptrMesh, 3U, num4);
 					}
 					if (flag7)
 					{
-						array9[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetVertexColor(ptrMesh, 0u, num4);
+						array9[(int)((UIntPtr)num4)] = AssimpInterop.aiMesh_GetVertexColor(ptrMesh, 0U, num4);
 					}
 				}
 				string text = AssimpInterop.aiMesh_GetName(ptrMesh);
@@ -581,18 +581,18 @@ namespace TriLib
 				if (AssimpInterop.aiMesh_HasFaces(ptrMesh))
 				{
 					uint num5 = AssimpInterop.aiMesh_GetNumFaces(ptrMesh);
-					int[] array10 = new int[num5 * 3u];
-					for (uint num6 = 0u; num6 < num5; num6 += 1u)
+					int[] array10 = new int[num5 * 3U];
+					for (uint num6 = 0U; num6 < num5; num6 += 1U)
 					{
 						IntPtr ptrFace = AssimpInterop.aiMesh_GetFace(ptrMesh, num6);
 						uint num7 = AssimpInterop.aiFace_GetNumIndices(ptrFace);
-						if (num7 > 3u)
+						if (num7 > 3U)
 						{
 							throw new UnityException("More than three face indices is not supported. Please enable \"Triangulate\" in your \"AssetLoaderOptions\" \"PostProcessSteps\" field");
 						}
-						for (uint num8 = 0u; num8 < num7; num8 += 1u)
+						for (uint num8 = 0U; num8 < num7; num8 += 1U)
 						{
-							array10[(int)((UIntPtr)(num6 * 3u + num8))] = (int)AssimpInterop.aiFace_GetIndex(ptrFace, num8);
+							array10[(int)((UIntPtr)(num6 * 3U + num8))] = (int)AssimpInterop.aiFace_GetIndex(ptrFace, num8);
 						}
 					}
 					mesh.SetIndices(array10, MeshTopology.Triangles, 0);
@@ -611,7 +611,7 @@ namespace TriLib
 
 		private static void BuildCameras(GameObject wrapperGameObject, IntPtr scene, AssetLoaderOptions options)
 		{
-			for (uint num = 0u; num < AssimpInterop.aiScene_GetNumCameras(scene); num += 1u)
+			for (uint num = 0U; num < AssimpInterop.aiScene_GetNumCameras(scene); num += 1U)
 			{
 				IntPtr ptrCamera = AssimpInterop.aiScene_GetCamera(scene, num);
 				string name = AssimpInterop.aiCamera_GetName(ptrCamera);
@@ -641,7 +641,7 @@ namespace TriLib
 			}
 			string basePath = string.IsNullOrEmpty(options.TexturesPathOverride) ? text : options.TexturesPathOverride;
 			List<Material> list = options.MaterialsOverride ?? new List<Material>();
-			for (uint num = 0u; num < AssimpInterop.aiScene_GetNumMaterials(scene); num += 1u)
+			for (uint num = 0U; num < AssimpInterop.aiScene_GetNumMaterials(scene); num += 1U)
 			{
 				IntPtr ptrMat = AssimpInterop.aiScene_GetMaterial(scene, num);
 				bool isOverriden;
@@ -685,9 +685,9 @@ namespace TriLib
 					float num7;
 					uint num8;
 					uint num9;
-					if (num4 > 0u && AssimpInterop.aiMaterial_GetTextureDiffuse(ptrMat, 0u, out text3, out num5, out num6, out num7, out num8, out num9))
+					if (num4 > 0U && AssimpInterop.aiMaterial_GetTextureDiffuse(ptrMat, 0U, out text3, out num5, out num6, out num7, out num8, out num9))
 					{
-						TextureWrapMode textureWrapMode2 = (num9 != 1u) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
+						TextureWrapMode textureWrapMode2 = (num9 != 1U) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
 						string text4 = StringUtils.GenerateUniqueName(text3);
 						bool applyAlphaMaterials = options.ApplyAlphaMaterials;
 						if (this.OnTexturePreLoad == null)
@@ -710,16 +710,16 @@ namespace TriLib
 					{
 						if (options.UseCutoutMaterials)
 						{
-							material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0u)) ? AssetLoader._standardBaseCutoutMaterial : AssetLoader._standardSpecularCutoutMaterial);
+							material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0U)) ? AssetLoader._standardBaseCutoutMaterial : AssetLoader._standardSpecularCutoutMaterial);
 						}
 						else
 						{
-							material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0u)) ? AssetLoader._standardBaseAlphaMaterial : AssetLoader._standardSpecularAlphaMaterial);
+							material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0U)) ? AssetLoader._standardBaseAlphaMaterial : AssetLoader._standardSpecularAlphaMaterial);
 						}
 					}
 					else
 					{
-						material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0u)) ? AssetLoader._standardBaseMaterial : AssetLoader._standardSpecularMaterial);
+						material = new Material((!options.UseStandardSpecularMaterial || (!flag3 && num10 <= 0U)) ? AssetLoader._standardBaseMaterial : AssetLoader._standardSpecularMaterial);
 					}
 					material.name = name;
 					if (!flag2)
@@ -771,9 +771,9 @@ namespace TriLib
 					float num14;
 					uint num15;
 					uint num16;
-					if (num11 > 0u && AssimpInterop.aiMaterial_GetTextureEmissive(ptrMat, 0u, out text5, out num12, out num13, out num14, out num15, out num16))
+					if (num11 > 0U && AssimpInterop.aiMaterial_GetTextureEmissive(ptrMat, 0U, out text5, out num12, out num13, out num14, out num15, out num16))
 					{
-						TextureWrapMode textureWrapMode3 = (num16 != 1u) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
+						TextureWrapMode textureWrapMode3 = (num16 != 1U) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
 						string name3 = StringUtils.GenerateUniqueName(text5);
 						bool flag9 = false;
 						if (this.OnTexturePreLoad != null)
@@ -813,9 +813,9 @@ namespace TriLib
 					float num19;
 					uint num20;
 					uint num21;
-					if (num10 > 0u && AssimpInterop.aiMaterial_GetTextureSpecular(ptrMat, 0u, out text6, out num17, out num18, out num19, out num20, out num21))
+					if (num10 > 0U && AssimpInterop.aiMaterial_GetTextureSpecular(ptrMat, 0U, out text6, out num17, out num18, out num19, out num20, out num21))
 					{
-						TextureWrapMode textureWrapMode4 = (num21 != 1u) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
+						TextureWrapMode textureWrapMode4 = (num21 != 1U) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
 						string name4 = StringUtils.GenerateUniqueName(text6);
 						bool flag12 = false;
 						if (this.OnTexturePreLoad != null)
@@ -841,9 +841,9 @@ namespace TriLib
 					float num25;
 					uint num26;
 					uint num27;
-					if (num22 > 0u && AssimpInterop.aiMaterial_GetTextureNormals(ptrMat, 0u, out text7, out num23, out num24, out num25, out num26, out num27))
+					if (num22 > 0U && AssimpInterop.aiMaterial_GetTextureNormals(ptrMat, 0U, out text7, out num23, out num24, out num25, out num26, out num27))
 					{
-						TextureWrapMode textureWrapMode5 = (num27 != 1u) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
+						TextureWrapMode textureWrapMode5 = (num27 != 1U) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
 						string name5 = StringUtils.GenerateUniqueName(text7);
 						bool flag14 = false;
 						if (this.OnTexturePreLoad != null)
@@ -864,9 +864,9 @@ namespace TriLib
 					float num31;
 					uint num32;
 					uint num33;
-					if (num28 > 0u && AssimpInterop.aiMaterial_GetTextureHeight(ptrMat, 0u, out text8, out num29, out num30, out num31, out num32, out num33))
+					if (num28 > 0U && AssimpInterop.aiMaterial_GetTextureHeight(ptrMat, 0U, out text8, out num29, out num30, out num31, out num32, out num33))
 					{
-						TextureWrapMode textureWrapMode6 = (num33 != 1u) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
+						TextureWrapMode textureWrapMode6 = (num33 != 1U) ? TextureWrapMode.Repeat : TextureWrapMode.Clamp;
 						string name6 = StringUtils.GenerateUniqueName(text8);
 						bool flag16 = false;
 						if (this.OnTexturePreLoad != null)
@@ -947,7 +947,7 @@ namespace TriLib
 		private void BuildBones(IntPtr scene)
 		{
 			uint num = AssimpInterop.aiScene_GetNumMeshes(scene);
-			for (uint num2 = 0u; num2 < num; num2 += 1u)
+			for (uint num2 = 0U; num2 < num; num2 += 1U)
 			{
 				MeshData meshData = this._meshData[(int)((UIntPtr)num2)];
 				IntPtr ptrMesh = AssimpInterop.aiScene_GetMesh(scene, num2);
@@ -960,7 +960,7 @@ namespace TriLib
 					Transform[] array2 = new Transform[num4];
 					BoneWeight[] array3 = new BoneWeight[num3];
 					int[] array4 = new int[num3];
-					for (uint num5 = 0u; num5 < num4; num5 += 1u)
+					for (uint num5 = 0U; num5 < num4; num5 += 1U)
 					{
 						IntPtr ptrBone = AssimpInterop.aiMesh_GetBone(ptrMesh, num5);
 						string key = AssimpInterop.aiBone_GetName(ptrBone);
@@ -973,7 +973,7 @@ namespace TriLib
 							Matrix4x4 matrix4x = AssimpInterop.aiBone_GetOffsetMatrix(ptrBone);
 							array[(int)((UIntPtr)num5)] = matrix4x;
 							uint num6 = AssimpInterop.aiBone_GetNumWeights(ptrBone);
-							for (uint num7 = 0u; num7 < num6; num7 += 1u)
+							for (uint num7 = 0U; num7 < num6; num7 += 1U)
 							{
 								IntPtr ptrVweight = AssimpInterop.aiBone_GetWeights(ptrBone, num7);
 								float num8 = AssimpInterop.aiVertexWeight_GetWeight(ptrVweight);
@@ -1037,7 +1037,7 @@ namespace TriLib
 		{
 			uint num = AssimpInterop.aiScene_GetNumAnimations(scene);
 			AnimationClip[] array = new AnimationClip[num];
-			for (uint num2 = 0u; num2 < num; num2 += 1u)
+			for (uint num2 = 0U; num2 < num; num2 += 1U)
 			{
 				IntPtr ptrAnimation = AssimpInterop.aiScene_GetAnimation(scene, num2);
 				float num3 = AssimpInterop.aiAnimation_GetTicksPerSecond(ptrAnimation);
@@ -1055,7 +1055,7 @@ namespace TriLib
 				float num4 = AssimpInterop.aiAnimation_GetDuraction(ptrAnimation);
 				float animationLength = num4 / num3;
 				uint num5 = AssimpInterop.aiAnimation_GetNumChannels(ptrAnimation);
-				for (uint num6 = 0u; num6 < num5; num6 += 1u)
+				for (uint num6 = 0U; num6 < num5; num6 += 1U)
 				{
 					IntPtr ptrNodeAnim = AssimpInterop.aiAnimation_GetAnimationChannel(ptrAnimation, num6);
 					string text2 = AssimpInterop.aiNodeAnim_GetNodeName(ptrNodeAnim);
@@ -1065,13 +1065,13 @@ namespace TriLib
 						{
 							NodeData nodeData = this._nodeDataDictionary[text2];
 							uint num7 = AssimpInterop.aiNodeAnim_GetNumRotationKeys(ptrNodeAnim);
-							if (num7 > 0u)
+							if (num7 > 0U)
 							{
 								AnimationCurve animationCurve = new AnimationCurve();
 								AnimationCurve animationCurve2 = new AnimationCurve();
 								AnimationCurve animationCurve3 = new AnimationCurve();
 								AnimationCurve animationCurve4 = new AnimationCurve();
-								for (uint num8 = 0u; num8 < num7; num8 += 1u)
+								for (uint num8 = 0U; num8 < num7; num8 += 1U)
 								{
 									IntPtr ptrQuatKey = AssimpInterop.aiNodeAnim_GetRotationKey(ptrNodeAnim, num8);
 									float time = AssimpInterop.aiQuatKey_GetTime(ptrQuatKey) / num3;
@@ -1087,12 +1087,12 @@ namespace TriLib
 								animationClip.SetCurve(nodeData.Path, typeof(Transform), "localRotation.w", AssetLoader.FixCurve(animationLength, animationCurve4));
 							}
 							uint num9 = AssimpInterop.aiNodeAnim_GetNumPositionKeys(ptrNodeAnim);
-							if (num9 > 0u)
+							if (num9 > 0U)
 							{
 								AnimationCurve animationCurve5 = new AnimationCurve();
 								AnimationCurve animationCurve6 = new AnimationCurve();
 								AnimationCurve animationCurve7 = new AnimationCurve();
-								for (uint num10 = 0u; num10 < num9; num10 += 1u)
+								for (uint num10 = 0U; num10 < num9; num10 += 1U)
 								{
 									IntPtr ptrVectorKey = AssimpInterop.aiNodeAnim_GetPositionKey(ptrNodeAnim, num10);
 									float time2 = AssimpInterop.aiVectorKey_GetTime(ptrVectorKey) / num3;
@@ -1106,12 +1106,12 @@ namespace TriLib
 								animationClip.SetCurve(nodeData.Path, typeof(Transform), "localPosition.z", AssetLoader.FixCurve(animationLength, animationCurve7));
 							}
 							uint num11 = AssimpInterop.aiNodeAnim_GetNumScalingKeys(ptrNodeAnim);
-							if (num11 > 0u)
+							if (num11 > 0U)
 							{
 								AnimationCurve animationCurve8 = new AnimationCurve();
 								AnimationCurve animationCurve9 = new AnimationCurve();
 								AnimationCurve animationCurve10 = new AnimationCurve();
-								for (uint num12 = 0u; num12 < num11; num12 += 1u)
+								for (uint num12 = 0U; num12 < num11; num12 += 1U)
 								{
 									IntPtr ptrVectorKey2 = AssimpInterop.aiNodeAnim_GetScalingKey(ptrNodeAnim, num12);
 									float time3 = AssimpInterop.aiVectorKey_GetTime(ptrVectorKey2) / num3;
@@ -1209,9 +1209,9 @@ namespace TriLib
 			IntPtr node = nodeData.Node;
 			uint num = AssimpInterop.aiNode_GetNumMeshes(node);
 			bool flag = AssimpInterop.aiScene_HasMeshes(scene);
-			if (num > 0u && flag)
+			if (num > 0U && flag)
 			{
-				for (uint num2 = 0u; num2 < num; num2 += 1u)
+				for (uint num2 = 0U; num2 < num; num2 += 1U)
 				{
 					uint num3 = AssimpInterop.aiNode_GetMeshIndex(node, num2);
 					IntPtr ptrMesh = AssimpInterop.aiScene_GetMesh(scene, num3);
@@ -1267,9 +1267,9 @@ namespace TriLib
 			nodeData.GameObject = gameObject;
 			this._nodeDataDictionary.Add(nodeData.Name, nodeData);
 			uint num5 = AssimpInterop.aiNode_GetNumChildren(node);
-			if (num5 > 0u)
+			if (num5 > 0U)
 			{
-				for (uint num6 = 0u; num6 < num5; num6 += 1u)
+				for (uint num6 = 0U; num6 < num5; num6 += 1U)
 				{
 					IntPtr intPtr = AssimpInterop.aiNode_GetChildren(node, num6);
 					int id = this._nodeId++;

+ 1 - 1
Assembly-CSharp/TriLib/AssimpInterop.cs

@@ -1483,7 +1483,7 @@ namespace TriLib
 
 		private static GCHandle GetNewUIntBuffer(out uint value)
 		{
-			value = 0u;
+			value = 0U;
 			return AssimpInterop.LockGc(value);
 		}
 

+ 1 - 1
Assembly-CSharp/UICamera.cs

@@ -1783,7 +1783,7 @@ public class UICamera : MonoBehaviour
 		UICamera.mHits = new BetterList<UICamera.DepthEntry>();
 		UICamera.m2DPlane = new Plane(Vector3.back, 0f);
 		UICamera.mNotifying = false;
-		UICamera.m_unInputEnableFlag = 0u;
+		UICamera.m_unInputEnableFlag = 0U;
 		UICamera.InputEnable = true;
 		UICamera.mUsingTouchEvents = true;
 	}

+ 349 - 0
Assembly-CSharp/UTJ/FbxExporter/FbxExporter.cs

@@ -0,0 +1,349 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using UnityEngine;
+
+namespace UTJ.FbxExporter
+{
+	public class FbxExporter
+	{
+		public FbxExporter(FbxExporter.ExportOptions opt)
+		{
+			this.m_opt = opt;
+		}
+
+		~FbxExporter()
+		{
+			this.Release();
+		}
+
+		public void Release()
+		{
+			FbxExporter.fbxeReleaseContext(this.m_ctx);
+			this.m_ctx = FbxExporter.Context.Null;
+		}
+
+		public bool CreateScene(string name)
+		{
+			this.Release();
+			if (!this.m_ctx)
+			{
+				this.m_ctx = FbxExporter.fbxeCreateContext(ref this.m_opt);
+			}
+			this.m_nodes = new Dictionary<Transform, FbxExporter.Node>();
+			return FbxExporter.fbxeCreateScene(this.m_ctx, name);
+		}
+
+		public void AddNode(GameObject go)
+		{
+			if (go)
+			{
+				this.FindOrCreateNodeTree(go.GetComponent<Transform>(), new Action<Transform, FbxExporter.Node>(this.ProcessNode));
+			}
+		}
+
+		public bool WriteAsync(string path, FbxExporter.Format format)
+		{
+			return FbxExporter.fbxeWriteAsync(this.m_ctx, path, format);
+		}
+
+		public bool IsFinished()
+		{
+			return FbxExporter.fbxeIsFinished(this.m_ctx);
+		}
+
+		private void ProcessNode(Transform trans, FbxExporter.Node node)
+		{
+			MeshRenderer component = trans.GetComponent<MeshRenderer>();
+			SkinnedMeshRenderer component2 = trans.GetComponent<SkinnedMeshRenderer>();
+			Terrain component3 = trans.GetComponent<Terrain>();
+			if (component3)
+			{
+				this.AddTerrain(node, component3);
+			}
+			else if (component2)
+			{
+				this.AddSkinnedMesh(node, component2);
+			}
+			else if (component)
+			{
+				this.AddMesh(node, component);
+			}
+		}
+
+		private FbxExporter.Node FindOrCreateNodeTree(Transform trans, Action<Transform, FbxExporter.Node> act)
+		{
+			if (!trans)
+			{
+				return FbxExporter.Node.Null;
+			}
+			if (this.m_nodes.ContainsKey(trans))
+			{
+				return this.m_nodes[trans];
+			}
+			FbxExporter.Node parent = trans.parent ? this.FindOrCreateNodeTree(trans.parent, act) : FbxExporter.fbxeGetRootNode(this.m_ctx);
+			FbxExporter.Node node = FbxExporter.fbxeCreateNode(this.m_ctx, parent, trans.name);
+			if (this.m_opt.transform)
+			{
+				FbxExporter.fbxeSetTRS(this.m_ctx, node, trans.localPosition, trans.localRotation, trans.localScale);
+			}
+			this.m_nodes.Add(trans, node);
+			if (act != null)
+			{
+				act(trans, node);
+			}
+			return node;
+		}
+
+		private bool AddMesh(FbxExporter.Node node, Mesh mesh)
+		{
+			if (!mesh || mesh.vertexCount == 0)
+			{
+				return false;
+			}
+			if (!mesh.isReadable)
+			{
+				Debug.LogWarning("Mesh " + mesh.name + " is not readable and be ignored.");
+				return false;
+			}
+			FbxExporter.Topology topology = FbxExporter.Topology.Triangles;
+			PinnedArray<int> pinnedArray = new PinnedArray<int>(mesh.triangles, false);
+			PinnedArray<Vector3> pinnedArray2 = new PinnedArray<Vector3>(mesh.vertices, false);
+			PinnedArray<Vector3> pinnedArray3 = new PinnedArray<Vector3>(mesh.normals, false);
+			if (pinnedArray3.Length == 0)
+			{
+				pinnedArray3 = null;
+			}
+			PinnedArray<Vector4> pinnedArray4 = new PinnedArray<Vector4>(mesh.tangents, false);
+			if (pinnedArray4.Length == 0)
+			{
+				pinnedArray4 = null;
+			}
+			PinnedArray<Vector2> pinnedArray5 = new PinnedArray<Vector2>(mesh.uv, false);
+			if (pinnedArray5.Length == 0)
+			{
+				pinnedArray5 = null;
+			}
+			PinnedArray<Color> pinnedArray6 = new PinnedArray<Color>(mesh.colors, false);
+			if (pinnedArray6.Length == 0)
+			{
+				pinnedArray6 = null;
+			}
+			FbxExporter.fbxeAddMesh(this.m_ctx, node, pinnedArray2.Length, pinnedArray2, pinnedArray3, pinnedArray4, pinnedArray5, pinnedArray6);
+			FbxExporter.fbxeAddMeshSubmesh(this.m_ctx, node, topology, pinnedArray.Length, pinnedArray, -1);
+			int blendShapeCount = mesh.blendShapeCount;
+			if (blendShapeCount > 0)
+			{
+				PinnedArray<Vector3> v = new PinnedArray<Vector3>(mesh.vertexCount);
+				PinnedArray<Vector3> v2 = new PinnedArray<Vector3>(mesh.vertexCount);
+				PinnedArray<Vector3> v3 = new PinnedArray<Vector3>(mesh.vertexCount);
+				for (int i = 0; i < blendShapeCount; i++)
+				{
+					string blendShapeName = mesh.GetBlendShapeName(i);
+					int blendShapeFrameCount = mesh.GetBlendShapeFrameCount(i);
+					for (int j = 0; j < blendShapeFrameCount; j++)
+					{
+						float blendShapeFrameWeight = mesh.GetBlendShapeFrameWeight(i, j);
+						mesh.GetBlendShapeFrameVertices(i, j, v, v2, v3);
+						FbxExporter.fbxeAddMeshBlendShape(this.m_ctx, node, blendShapeName, blendShapeFrameWeight, v, v2, v3);
+					}
+				}
+			}
+			return true;
+		}
+
+		private bool AddMesh(FbxExporter.Node node, MeshRenderer mr)
+		{
+			MeshFilter component = mr.gameObject.GetComponent<MeshFilter>();
+			return component && this.AddMesh(node, component.sharedMesh);
+		}
+
+		private bool AddSkinnedMesh(FbxExporter.Node node, SkinnedMeshRenderer smr)
+		{
+			Mesh sharedMesh = smr.sharedMesh;
+			if (!this.AddMesh(node, sharedMesh))
+			{
+				return false;
+			}
+			Transform[] bones = smr.bones;
+			PinnedArray<FbxExporter.Node> pinnedArray = new PinnedArray<FbxExporter.Node>(bones.Length);
+			for (int i = 0; i < bones.Length; i++)
+			{
+				pinnedArray[i] = this.FindOrCreateNodeTree(bones[i], new Action<Transform, FbxExporter.Node>(this.ProcessNode));
+			}
+			PinnedArray<BoneWeight> v = new PinnedArray<BoneWeight>(sharedMesh.boneWeights, false);
+			PinnedArray<Matrix4x4> v2 = new PinnedArray<Matrix4x4>(sharedMesh.bindposes, false);
+			FbxExporter.fbxeAddMeshSkin(this.m_ctx, node, v, pinnedArray.Length, pinnedArray, v2);
+			return true;
+		}
+
+		private bool AddTerrain(FbxExporter.Node node, Terrain terrain)
+		{
+			TerrainData terrainData = terrain.terrainData;
+			int heightmapWidth = terrainData.heightmapWidth;
+			int heightmapHeight = terrainData.heightmapHeight;
+			float[,] heights = terrainData.GetHeights(0, 0, heightmapWidth, heightmapHeight);
+			int size = heightmapWidth * heightmapHeight;
+			int size2 = (heightmapWidth - 1) * (heightmapHeight - 1) * 2 * 3;
+			PinnedArray<Vector3> pinnedArray = new PinnedArray<Vector3>(size);
+			PinnedArray<Vector3> v = new PinnedArray<Vector3>(size);
+			PinnedArray<Vector2> v2 = new PinnedArray<Vector2>(size);
+			PinnedArray<int> pinnedArray2 = new PinnedArray<int>(size2);
+			FbxExporter.fbxeGenerateTerrainMesh(heights, heightmapWidth, heightmapHeight, terrainData.size, pinnedArray, v, v2, pinnedArray2);
+			FbxExporter.Topology topology = FbxExporter.Topology.Triangles;
+			FbxExporter.fbxeAddMesh(this.m_ctx, node, pinnedArray.Length, pinnedArray, v, IntPtr.Zero, v2, IntPtr.Zero);
+			FbxExporter.fbxeAddMeshSubmesh(this.m_ctx, node, topology, pinnedArray2.Length, pinnedArray2, -1);
+			return true;
+		}
+
+		[DllImport("FbxExporterCore")]
+		private static extern FbxExporter.Context fbxeCreateContext(ref FbxExporter.ExportOptions opt);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeReleaseContext(FbxExporter.Context ctx);
+
+		[DllImport("FbxExporterCore")]
+		private static extern bool fbxeCreateScene(FbxExporter.Context ctx, string name);
+
+		[DllImport("FbxExporterCore")]
+		private static extern bool fbxeWriteAsync(FbxExporter.Context ctx, string path, FbxExporter.Format format);
+
+		[DllImport("FbxExporterCore")]
+		private static extern bool fbxeIsFinished(FbxExporter.Context ctx);
+
+		[DllImport("FbxExporterCore")]
+		private static extern FbxExporter.Node fbxeGetRootNode(FbxExporter.Context ctx);
+
+		[DllImport("FbxExporterCore")]
+		private static extern FbxExporter.Node fbxeFindNodeByName(FbxExporter.Context ctx, string name);
+
+		[DllImport("FbxExporterCore")]
+		private static extern FbxExporter.Node fbxeCreateNode(FbxExporter.Context ctx, FbxExporter.Node parent, string name);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeSetTRS(FbxExporter.Context ctx, FbxExporter.Node node, Vector3 t, Quaternion r, Vector3 s);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeAddMesh(FbxExporter.Context ctx, FbxExporter.Node node, int num_vertices, IntPtr points, IntPtr normals, IntPtr tangents, IntPtr uv, IntPtr colors);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeAddMeshSubmesh(FbxExporter.Context ctx, FbxExporter.Node node, FbxExporter.Topology topology, int num_indices, IntPtr indices, int material);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeAddMeshSkin(FbxExporter.Context ctx, FbxExporter.Node node, IntPtr weights, int num_bones, IntPtr bones, IntPtr bindposes);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeAddMeshBlendShape(FbxExporter.Context ctx, FbxExporter.Node node, string name, float weight, IntPtr deltaPoints, IntPtr deltaNormals, IntPtr deltaTangents);
+
+		[DllImport("FbxExporterCore")]
+		private static extern void fbxeGenerateTerrainMesh(float[,] heightmap, int width, int height, Vector3 size, IntPtr dst_vertices, IntPtr dst_normals, IntPtr dst_uv, IntPtr dst_indices);
+
+		private FbxExporter.ExportOptions m_opt = FbxExporter.ExportOptions.defaultValue;
+
+		private FbxExporter.Context m_ctx;
+
+		private Dictionary<Transform, FbxExporter.Node> m_nodes;
+
+		public struct Context
+		{
+			public static FbxExporter.Context Null
+			{
+				get
+				{
+					FbxExporter.Context result;
+					result.ptr = IntPtr.Zero;
+					return result;
+				}
+			}
+
+			public static implicit operator bool(FbxExporter.Context v)
+			{
+				return v.ptr != IntPtr.Zero;
+			}
+
+			public IntPtr ptr;
+		}
+
+		public struct Node
+		{
+			public static FbxExporter.Node Null
+			{
+				get
+				{
+					FbxExporter.Node result;
+					result.ptr = IntPtr.Zero;
+					return result;
+				}
+			}
+
+			public static implicit operator bool(FbxExporter.Node v)
+			{
+				return v.ptr != IntPtr.Zero;
+			}
+
+			public IntPtr ptr;
+		}
+
+		public enum Format
+		{
+			FbxBinary,
+			FbxAscii,
+			FbxEncrypted,
+			Obj
+		}
+
+		public enum SystemUnit
+		{
+			Millimeter,
+			Centimeter,
+			Decimeter,
+			Meter,
+			Kilometer
+		}
+
+		public enum Topology
+		{
+			Points,
+			Lines,
+			Triangles,
+			Quads
+		}
+
+		public struct ExportOptions
+		{
+			public static FbxExporter.ExportOptions defaultValue
+			{
+				get
+				{
+					return new FbxExporter.ExportOptions
+					{
+						flip_handedness = true,
+						flip_faces = true,
+						quadify = true,
+						quadify_full_search = false,
+						quadify_threshold_angle = 20f,
+						scale_factor = 1f,
+						system_unit = FbxExporter.SystemUnit.Meter,
+						transform = true
+					};
+				}
+			}
+
+			public bool flip_handedness;
+
+			public bool flip_faces;
+
+			public bool quadify;
+
+			public bool quadify_full_search;
+
+			public float quadify_threshold_angle;
+
+			public float scale_factor;
+
+			public FbxExporter.SystemUnit system_unit;
+
+			public bool transform;
+		}
+	}
+}

+ 111 - 0
Assembly-CSharp/UTJ/FbxExporter/PinnedArray.cs

@@ -0,0 +1,111 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace UTJ.FbxExporter
+{
+	public class PinnedArray<T> : IDisposable, IEnumerable<T>, IEnumerable
+	{
+		public PinnedArray(int size = 0)
+		{
+			this.m_data = new T[size];
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public PinnedArray(T[] data, bool clone = false)
+		{
+			this.m_data = ((!clone) ? data : ((T[])data.Clone()));
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public int Length
+		{
+			get
+			{
+				return this.m_data.Length;
+			}
+		}
+
+		public T this[int i]
+		{
+			get
+			{
+				return this.m_data[i];
+			}
+			set
+			{
+				this.m_data[i] = value;
+			}
+		}
+
+		public T[] Array
+		{
+			get
+			{
+				return this.m_data;
+			}
+		}
+
+		public IntPtr Pointer
+		{
+			get
+			{
+				return (this.m_data.Length != 0) ? this.m_gch.AddrOfPinnedObject() : IntPtr.Zero;
+			}
+		}
+
+		public PinnedArray<T> Clone()
+		{
+			return new PinnedArray<T>((T[])this.m_data.Clone(), false);
+		}
+
+		public bool Assign(T[] source)
+		{
+			if (source != null && this.m_data.Length == source.Length)
+			{
+				System.Array.Copy(source, this.m_data, this.m_data.Length);
+				return true;
+			}
+			return false;
+		}
+
+		public void Dispose()
+		{
+			this.Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected virtual void Dispose(bool disposing)
+		{
+			if (disposing && this.m_gch.IsAllocated)
+			{
+				this.m_gch.Free();
+			}
+		}
+
+		public IEnumerator<T> GetEnumerator()
+		{
+			return (IEnumerator<T>)this.m_data.GetEnumerator();
+		}
+
+		IEnumerator IEnumerable.GetEnumerator()
+		{
+			return this.GetEnumerator();
+		}
+
+		public static implicit operator IntPtr(PinnedArray<T> v)
+		{
+			return (v != null) ? v.Pointer : IntPtr.Zero;
+		}
+
+		public static implicit operator T[](PinnedArray<T> v)
+		{
+			return (v != null) ? v.Array : null;
+		}
+
+		private T[] m_data;
+
+		private GCHandle m_gch;
+	}
+}

+ 111 - 0
Assembly-CSharp/UTJ/FbxExporter/PinnedArray2D.cs

@@ -0,0 +1,111 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace UTJ.FbxExporter
+{
+	public class PinnedArray2D<T> : IDisposable, IEnumerable<T>, IEnumerable
+	{
+		public PinnedArray2D(int x, int y)
+		{
+			this.m_data = new T[x, y];
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public PinnedArray2D(T[,] data, bool clone = false)
+		{
+			this.m_data = ((!clone) ? data : ((T[,])data.Clone()));
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public int Length
+		{
+			get
+			{
+				return this.m_data.Length;
+			}
+		}
+
+		public T this[int x, int y]
+		{
+			get
+			{
+				return this.m_data[x, y];
+			}
+			set
+			{
+				this.m_data[x, y] = value;
+			}
+		}
+
+		public T[,] Array
+		{
+			get
+			{
+				return this.m_data;
+			}
+		}
+
+		public IntPtr Pointer
+		{
+			get
+			{
+				return (this.m_data.Length != 0) ? this.m_gch.AddrOfPinnedObject() : IntPtr.Zero;
+			}
+		}
+
+		public PinnedArray2D<T> Clone()
+		{
+			return new PinnedArray2D<T>((T[,])this.m_data.Clone(), false);
+		}
+
+		public bool Assign(T[,] source)
+		{
+			if (source != null && this.m_data.Length == source.Length)
+			{
+				System.Array.Copy(source, this.m_data, this.m_data.Length);
+				return true;
+			}
+			return false;
+		}
+
+		public void Dispose()
+		{
+			this.Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected virtual void Dispose(bool disposing)
+		{
+			if (disposing && this.m_gch.IsAllocated)
+			{
+				this.m_gch.Free();
+			}
+		}
+
+		public IEnumerator<T> GetEnumerator()
+		{
+			return (IEnumerator<T>)this.m_data.GetEnumerator();
+		}
+
+		IEnumerator IEnumerable.GetEnumerator()
+		{
+			return this.GetEnumerator();
+		}
+
+		public static implicit operator IntPtr(PinnedArray2D<T> v)
+		{
+			return (v != null) ? v.Pointer : IntPtr.Zero;
+		}
+
+		public static implicit operator T[,](PinnedArray2D<T> v)
+		{
+			return (v != null) ? v.Array : null;
+		}
+
+		private T[,] m_data;
+
+		private GCHandle m_gch;
+	}
+}

+ 237 - 0
Assembly-CSharp/UTJ/FbxExporter/PinnedList.cs

@@ -0,0 +1,237 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace UTJ.FbxExporter
+{
+	public class PinnedList<T> : IDisposable, IEnumerable<T>, IEnumerable
+	{
+		public PinnedList(int size = 0)
+		{
+			this.m_data = new T[size];
+			this.m_list = PinnedList<T>.ListCreateIntrusive(this.m_data);
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public PinnedList(T[] data, bool clone = false)
+		{
+			this.m_data = ((!clone) ? data : ((T[])data.Clone()));
+			this.m_list = PinnedList<T>.ListCreateIntrusive(this.m_data);
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public PinnedList(List<T> data, bool clone = false)
+		{
+			this.m_list = ((!clone) ? data : new List<T>(data));
+			this.m_data = PinnedList<T>.ListGetInternalArray(this.m_list);
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public static T[] ListGetInternalArray(List<T> list)
+		{
+			PinnedList<T>.Caster caster = default(PinnedList<T>.Caster);
+			caster.list = list;
+			return caster.data.items;
+		}
+
+		public static List<T> ListCreateIntrusive(T[] data)
+		{
+			List<T> list = new List<T>();
+			PinnedList<T>.Caster caster = default(PinnedList<T>.Caster);
+			caster.list = list;
+			caster.data.items = data;
+			caster.data.size = data.Length;
+			return list;
+		}
+
+		public static void ListSetCount(List<T> list, int count)
+		{
+			PinnedList<T>.Caster caster = default(PinnedList<T>.Caster);
+			caster.list = list;
+			caster.data.size = count;
+		}
+
+		public int Capacity
+		{
+			get
+			{
+				return this.m_data.Length;
+			}
+		}
+
+		public int Count
+		{
+			get
+			{
+				return this.m_list.Count;
+			}
+		}
+
+		public T this[int i]
+		{
+			get
+			{
+				return this.m_data[i];
+			}
+			set
+			{
+				this.m_data[i] = value;
+			}
+		}
+
+		public T[] Array
+		{
+			get
+			{
+				return this.m_data;
+			}
+		}
+
+		public List<T> List
+		{
+			get
+			{
+				return this.m_list;
+			}
+		}
+
+		public IntPtr Pointer
+		{
+			get
+			{
+				return (this.Count != 0) ? this.m_gch.AddrOfPinnedObject() : IntPtr.Zero;
+			}
+		}
+
+		public void LockList(Action<List<T>> body)
+		{
+			if (this.m_gch.IsAllocated)
+			{
+				this.m_gch.Free();
+			}
+			body(this.m_list);
+			this.m_data = PinnedList<T>.ListGetInternalArray(this.m_list);
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public void Resize(int size)
+		{
+			if (size > this.m_data.Length)
+			{
+				this.LockList(delegate(List<T> l)
+				{
+					l.Capacity = size;
+				});
+			}
+			PinnedList<T>.ListSetCount(this.m_list, size);
+		}
+
+		public void ResizeDiscard(int size)
+		{
+			if (size > this.m_data.Length)
+			{
+				if (this.m_gch.IsAllocated)
+				{
+					this.m_gch.Free();
+				}
+				this.m_data = new T[size];
+				this.m_list = PinnedList<T>.ListCreateIntrusive(this.m_data);
+				this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+			}
+			else
+			{
+				PinnedList<T>.ListSetCount(this.m_list, size);
+			}
+		}
+
+		public void Clear()
+		{
+			if (this.m_data.Length > 0)
+			{
+				PinnedList<T>.ListSetCount(this.m_list, 0);
+			}
+		}
+
+		public PinnedList<T> Clone()
+		{
+			return new PinnedList<T>(this.m_list, true);
+		}
+
+		public void Assign(T[] source)
+		{
+			this.ResizeDiscard(source.Length);
+			System.Array.Copy(source, this.m_data, source.Length);
+		}
+
+		public void Assign(List<T> sourceList)
+		{
+			T[] sourceArray = PinnedList<T>.ListGetInternalArray(sourceList);
+			int count = sourceList.Count;
+			this.ResizeDiscard(count);
+			System.Array.Copy(sourceArray, this.m_data, count);
+		}
+
+		public void Dispose()
+		{
+			this.Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected virtual void Dispose(bool disposing)
+		{
+			if (disposing && this.m_gch.IsAllocated)
+			{
+				this.m_gch.Free();
+			}
+		}
+
+		public IEnumerator<T> GetEnumerator()
+		{
+			return (IEnumerator<T>)this.m_data.GetEnumerator();
+		}
+
+		IEnumerator IEnumerable.GetEnumerator()
+		{
+			return this.GetEnumerator();
+		}
+
+		public static implicit operator IntPtr(PinnedList<T> v)
+		{
+			return (v != null) ? v.Pointer : IntPtr.Zero;
+		}
+
+		public static implicit operator T[](PinnedList<T> v)
+		{
+			return (v != null) ? v.Array : null;
+		}
+
+		public static implicit operator List<T>(PinnedList<T> v)
+		{
+			return (v != null) ? v.List : null;
+		}
+
+		private List<T> m_list;
+
+		private T[] m_data;
+
+		private GCHandle m_gch;
+
+		private class ListData
+		{
+			public T[] items;
+
+			public int size;
+		}
+
+		[StructLayout(LayoutKind.Explicit)]
+		private struct Caster
+		{
+			[FieldOffset(0)]
+			public List<T> list;
+
+			[FieldOffset(0)]
+			public PinnedList<T>.ListData data;
+		}
+	}
+}

+ 58 - 0
Assembly-CSharp/UTJ/FbxExporter/PinnedObject.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace UTJ.FbxExporter
+{
+	public class PinnedObject<T> : IDisposable
+	{
+		public PinnedObject(T data)
+		{
+			this.m_data = data;
+			this.m_gch = GCHandle.Alloc(this.m_data, GCHandleType.Pinned);
+		}
+
+		public T Object
+		{
+			get
+			{
+				return this.m_data;
+			}
+		}
+
+		public IntPtr Pointer
+		{
+			get
+			{
+				return this.m_gch.AddrOfPinnedObject();
+			}
+		}
+
+		public void Dispose()
+		{
+			this.Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		protected virtual void Dispose(bool disposing)
+		{
+			if (disposing && this.m_gch.IsAllocated)
+			{
+				this.m_gch.Free();
+			}
+		}
+
+		public static implicit operator IntPtr(PinnedObject<T> v)
+		{
+			return v.Pointer;
+		}
+
+		public static implicit operator T(PinnedObject<T> v)
+		{
+			return v.Object;
+		}
+
+		private T m_data;
+
+		private GCHandle m_gch;
+	}
+}

+ 1 - 1
Assembly-CSharp/VREventText.cs

@@ -48,7 +48,7 @@ public class VREventText : MonoBehaviour
 
 	private void UpdateEnableText()
 	{
-		bool flag = this.m_unTypeFlag != 0u;
+		bool flag = this.m_unTypeFlag != 0U;
 		if (this.m_bEnable != flag)
 		{
 			this.m_txEventName.gameObject.SetActive(flag);

+ 2 - 2
Assembly-CSharp/VRExternalFileLoader.cs

@@ -124,7 +124,7 @@ public class VRExternalFileLoader : MonoBehaviour
 		if (tex2D)
 		{
 			Rect rect = new Rect(0f, 0f, (float)tex2D.width, (float)tex2D.height);
-			element.imageThumbnail.sprite = Sprite.Create(tex2D, rect, Vector2.zero, 100f, 0u, SpriteMeshType.FullRect);
+			element.imageThumbnail.sprite = Sprite.Create(tex2D, rect, Vector2.zero, 100f, 0U, SpriteMeshType.FullRect);
 		}
 		yield return null;
 		float tim = info.GetDurationMs();
@@ -586,7 +586,7 @@ public class VRExternalFileLoader : MonoBehaviour
 				if (texture2D)
 				{
 					Rect rect = new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height);
-					element.imageThumbnail.sprite = Sprite.Create(texture2D, rect, Vector2.zero, 100f, 0u, SpriteMeshType.FullRect);
+					element.imageThumbnail.sprite = Sprite.Create(texture2D, rect, Vector2.zero, 100f, 0U, SpriteMeshType.FullRect);
 				}
 			}
 			float num2 = info.GetDurationMs();

+ 3 - 2
Assembly-CSharp/VRPhotoMenu.cs

@@ -30,7 +30,8 @@ public class VRPhotoMenu : MonoBehaviour
 
 	public void Refresh()
 	{
-		this.m_ScreenShotPath = UTY.gameProjectPath + "\\ScreenShot\\VRPhotoThumb\\";
+		this.m_ScreenShotPath = Path.Combine(GameMain.Instance.SerializeStorageManager.StoreDirectoryPath, "ScreenShot");
+		this.m_ScreenShotPath = Path.Combine(this.m_ScreenShotPath, "VRPhotoThumb\\");
 		string screenShotPath = this.m_ScreenShotPath;
 		DirectoryInfo directoryInfo = new DirectoryInfo(screenShotPath);
 		if (!directoryInfo.Exists)
@@ -120,7 +121,7 @@ public class VRPhotoMenu : MonoBehaviour
 			trans.localEulerAngles = Vector3.forward * 90f;
 			trans.localScale = Vector3.one;
 		}
-		this.m_ImagePhoto.sprite = Sprite.Create(tex, new Rect(0f, 0f, (float)tex.width, (float)tex.height), Vector2.one * 0.5f, 1f, 0u, SpriteMeshType.FullRect);
+		this.m_ImagePhoto.sprite = Sprite.Create(tex, new Rect(0f, 0f, (float)tex.width, (float)tex.height), Vector2.one * 0.5f, 1f, 0U, SpriteMeshType.FullRect);
 		callback(www);
 		yield break;
 	}

+ 1 - 1
Assembly-CSharp/WindowPartsFingerPreset.cs

@@ -182,7 +182,7 @@ public class WindowPartsFingerPreset : MonoBehaviour
 	{
 		WindowPartsFingerBlend.Type blendType = tareget_blend.BlendType;
 		FingerBlend.BaseFinger baseFingerClass = tareget_blend.GetBaseFingerClass(tareget_blend.mgr.select_maid, blendType);
-		XElement xelement = new XElement("GameVersion", 1440);
+		XElement xelement = new XElement("GameVersion", 1470);
 		XElement xelement2 = new XElement("RightData", blendType == WindowPartsFingerBlend.Type.RightArm || blendType == WindowPartsFingerBlend.Type.RightLeg);
 		XElement xelement3 = new XElement("BinaryData", Convert.ToBase64String(baseFingerClass.GetBinary()));
 		XNode[] contents = new XNode[]

+ 3 - 3
Assembly-CSharp/XOR32.cs

@@ -18,9 +18,9 @@ public class XOR32
 
 	private uint x;
 
-	private uint y = 362436069u;
+	private uint y = 362436069U;
 
-	private uint z = 521288629u;
+	private uint z = 521288629U;
 
-	private uint w = 88675123u;
+	private uint w = 88675123U;
 }

+ 1 - 1
Assembly-CSharp/YotogiManager.cs

@@ -563,7 +563,7 @@ public class YotogiManager : WfScreenManager
 				if (this.play_skill_array[i].is_play && this.maid_.status.yotogiSkill.datas.ContainsKey(base_data.id))
 				{
 					YotogiSkillData yotogiSkillData = this.maid_.status.yotogiSkill.Get(base_data.id);
-					yotogiSkillData.playCount += 1u;
+					yotogiSkillData.playCount += 1U;
 					yotogiSkillData.expSystem.AddExp(this.play_skill_array[i].exp);
 					string flagName = "夜伽_カテゴリー_実行回数_" + base_data.category.ToString();
 					int flag = this.maid_.status.GetFlag(flagName);

+ 1 - 1
Assembly-CSharp/YotogiOldManager.cs

@@ -398,7 +398,7 @@ public class YotogiOldManager : WfScreenManager
 			{
 				if (this.play_skill_array[i].is_play)
 				{
-					this.play_skill_array[i].skill_pair.param.playCount += 1u;
+					this.play_skill_array[i].skill_pair.param.playCount += 1U;
 					this.play_skill_array[i].skill_pair.param.expSystem.AddExp(this.play_skill_array[i].exp);
 					string flagName = "夜伽_カテゴリー_実行回数_" + base_data.category.ToString();
 					this.maid_.status.OldStatus.AddFlag(flagName, 1);

+ 1 - 1
Assembly-CSharp/YotogiOldSkillUnit.cs

@@ -28,7 +28,7 @@ public class YotogiOldSkillUnit : MonoBehaviour
 		this.acquired_experience_obj.GetComponent<UILabel>().text = this.skill_data_.add_yotogi_class_exp.ToString();
 		this.cost_of_hp_obj.GetComponent<UILabel>().text = this.skill_data_.exec_need_hp.ToString();
 		this.icon_.SetSkillData(this.skill_data_);
-		if (0u < this.param_data_.playCount)
+		if (0U < this.param_data_.playCount)
 		{
 			UTY.GetChildObject(base.gameObject, "IconNew", false).SetActive(false);
 		}

+ 1 - 1
Assembly-CSharp/YotogiSkillListManager.cs

@@ -317,7 +317,7 @@ public class YotogiSkillListManager : MonoBehaviour
 		{
 			spriteName = "cm3d2_edit_profile_yotogiskill_sign_sankaku";
 		}
-		if (maid.status.yotogiSkill.Contains(skillId) && maid.status.yotogiSkill.Get(skillId).playCount == 0u)
+		if (maid.status.yotogiSkill.Contains(skillId) && maid.status.yotogiSkill.Get(skillId).playCount == 0U)
 		{
 			spriteName = "cm3d2_edit_profile_yotogiskill_sign_batu";
 		}

+ 1 - 1
Assembly-CSharp/YotogiSkillUnit.cs

@@ -99,7 +99,7 @@ public class YotogiSkillUnit : MonoBehaviour
 			}
 		}
 		this.icon_.SetSkillData(this.skill_data_);
-		if (this.param_data_ == null || 0u < this.param_data_.playCount)
+		if (this.param_data_ == null || 0U < this.param_data_.playCount)
 		{
 			this.new_icon_.gameObject.SetActive(false);
 		}

+ 3 - 3
Assembly-CSharp/uGUIUtility.cs

@@ -120,11 +120,11 @@ public static class uGUIUtility
 		Sprite sprite2;
 		if (!sprite.hasBorder)
 		{
-			sprite2 = Sprite.Create(texture2D, rect, Vector2.one * 0.5f, 100f, 0u, SpriteMeshType.FullRect);
+			sprite2 = Sprite.Create(texture2D, rect, Vector2.one * 0.5f, 100f, 0U, SpriteMeshType.FullRect);
 		}
 		else
 		{
-			sprite2 = Sprite.Create(texture2D, rect, Vector2.one * 0.5f, 100f, 0u, SpriteMeshType.FullRect, new Vector4((float)sprite.borderLeft, (float)sprite.borderBottom, (float)sprite.borderRight, (float)sprite.borderTop));
+			sprite2 = Sprite.Create(texture2D, rect, Vector2.one * 0.5f, 100f, 0U, SpriteMeshType.FullRect, new Vector4((float)sprite.borderLeft, (float)sprite.borderBottom, (float)sprite.borderRight, (float)sprite.borderTop));
 		}
 		sprite2.name = resourceName;
 		return sprite2;
@@ -132,7 +132,7 @@ public static class uGUIUtility
 
 	public static Sprite CreateSprite(Texture2D tex)
 	{
-		return Sprite.Create(tex, new Rect(0f, 0f, (float)tex.width, (float)tex.height), Vector2.one * 0.5f, 100f, 0u, SpriteMeshType.FullRect);
+		return Sprite.Create(tex, new Rect(0f, 0f, (float)tex.width, (float)tex.height), Vector2.one * 0.5f, 100f, 0U, SpriteMeshType.FullRect);
 	}
 
 	private static EventSystem eventSystem;

+ 262 - 262
Assembly-CSharp/wf/CRC32.cs

@@ -23,7 +23,7 @@ namespace wf
 			uint num = CRC32.MaskValue;
 			for (int i = 0; i < bytes.Length; i++)
 			{
-				byte b = (byte)((num & 255u) ^ (uint)bytes[i]);
+				byte b = (byte)((num & 255U) ^ (uint)bytes[i]);
 				num = (num >> 8 ^ CRC32.Crc32tabel[(int)b]);
 			}
 			return ~num;
@@ -33,7 +33,7 @@ namespace wf
 		{
 			while (--cbSize >= 0)
 			{
-				this.result = (CRC32.Crc32tabel[(int)((UIntPtr)((this.result ^ (uint)array[ibStart++]) & 255u))] ^ this.result >> 8);
+				this.result = (CRC32.Crc32tabel[(int)((UIntPtr)((this.result ^ (uint)array[ibStart++]) & 255U))] ^ this.result >> 8);
 			}
 		}
 
@@ -42,272 +42,272 @@ namespace wf
 			this.result ^= CRC32.MaskValue;
 			this.HashValue = new byte[]
 			{
-				(byte)(this.result >> 24 & 255u),
-				(byte)(this.result >> 16 & 255u),
-				(byte)(this.result >> 8 & 255u),
-				(byte)(this.result & 255u)
+				(byte)(this.result >> 24 & 255U),
+				(byte)(this.result >> 16 & 255U),
+				(byte)(this.result >> 8 & 255U),
+				(byte)(this.result & 255U)
 			};
 			return this.HashValue;
 		}
 
 		private static readonly uint[] Crc32tabel = new uint[]
 		{
-			0u,
-			1996959894u,
-			3993919788u,
-			2567524794u,
-			124634137u,
-			1886057615u,
-			3915621685u,
-			2657392035u,
-			249268274u,
-			2044508324u,
-			3772115230u,
-			2547177864u,
-			162941995u,
-			2125561021u,
-			3887607047u,
-			2428444049u,
-			498536548u,
-			1789927666u,
-			4089016648u,
-			2227061214u,
-			450548861u,
-			1843258603u,
-			4107580753u,
-			2211677639u,
-			325883990u,
-			1684777152u,
-			4251122042u,
-			2321926636u,
-			335633487u,
-			1661365465u,
-			4195302755u,
-			2366115317u,
-			997073096u,
-			1281953886u,
-			3579855332u,
-			2724688242u,
-			1006888145u,
-			1258607687u,
-			3524101629u,
-			2768942443u,
-			901097722u,
-			1119000684u,
-			3686517206u,
-			2898065728u,
-			853044451u,
-			1172266101u,
-			3705015759u,
-			2882616665u,
-			651767980u,
-			1373503546u,
-			3369554304u,
-			3218104598u,
-			565507253u,
-			1454621731u,
-			3485111705u,
-			3099436303u,
-			671266974u,
-			1594198024u,
-			3322730930u,
-			2970347812u,
-			795835527u,
-			1483230225u,
-			3244367275u,
-			3060149565u,
-			1994146192u,
-			31158534u,
-			2563907772u,
-			4023717930u,
-			1907459465u,
-			112637215u,
-			2680153253u,
-			3904427059u,
-			2013776290u,
-			251722036u,
-			2517215374u,
-			3775830040u,
-			2137656763u,
-			141376813u,
-			2439277719u,
-			3865271297u,
-			1802195444u,
-			476864866u,
-			2238001368u,
-			4066508878u,
-			1812370925u,
-			453092731u,
-			2181625025u,
-			4111451223u,
-			1706088902u,
-			314042704u,
-			2344532202u,
-			4240017532u,
-			1658658271u,
-			366619977u,
-			2362670323u,
-			4224994405u,
-			1303535960u,
-			984961486u,
-			2747007092u,
-			3569037538u,
-			1256170817u,
-			1037604311u,
-			2765210733u,
-			3554079995u,
-			1131014506u,
-			879679996u,
-			2909243462u,
-			3663771856u,
-			1141124467u,
-			855842277u,
-			2852801631u,
-			3708648649u,
-			1342533948u,
-			654459306u,
-			3188396048u,
-			3373015174u,
-			1466479909u,
-			544179635u,
-			3110523913u,
-			3462522015u,
-			1591671054u,
-			702138776u,
-			2966460450u,
-			3352799412u,
-			1504918807u,
-			783551873u,
-			3082640443u,
-			3233442989u,
-			3988292384u,
-			2596254646u,
-			62317068u,
-			1957810842u,
-			3939845945u,
-			2647816111u,
-			81470997u,
-			1943803523u,
-			3814918930u,
-			2489596804u,
-			225274430u,
-			2053790376u,
-			3826175755u,
-			2466906013u,
-			167816743u,
-			2097651377u,
-			4027552580u,
-			2265490386u,
-			503444072u,
-			1762050814u,
-			4150417245u,
-			2154129355u,
-			426522225u,
-			1852507879u,
-			4275313526u,
-			2312317920u,
-			282753626u,
-			1742555852u,
-			4189708143u,
-			2394877945u,
-			397917763u,
-			1622183637u,
-			3604390888u,
-			2714866558u,
-			953729732u,
-			1340076626u,
-			3518719985u,
-			2797360999u,
-			1068828381u,
-			1219638859u,
-			3624741850u,
-			2936675148u,
-			906185462u,
-			1090812512u,
-			3747672003u,
-			2825379669u,
-			829329135u,
-			1181335161u,
-			3412177804u,
-			3160834842u,
-			628085408u,
-			1382605366u,
-			3423369109u,
-			3138078467u,
-			570562233u,
-			1426400815u,
-			3317316542u,
-			2998733608u,
-			733239954u,
-			1555261956u,
-			3268935591u,
-			3050360625u,
-			752459403u,
-			1541320221u,
-			2607071920u,
-			3965973030u,
-			1969922972u,
-			40735498u,
-			2617837225u,
-			3943577151u,
-			1913087877u,
-			83908371u,
-			2512341634u,
-			3803740692u,
-			2075208622u,
-			213261112u,
-			2463272603u,
-			3855990285u,
-			2094854071u,
-			198958881u,
-			2262029012u,
-			4057260610u,
-			1759359992u,
-			534414190u,
-			2176718541u,
-			4139329115u,
-			1873836001u,
-			414664567u,
-			2282248934u,
-			4279200368u,
-			1711684554u,
-			285281116u,
-			2405801727u,
-			4167216745u,
-			1634467795u,
-			376229701u,
-			2685067896u,
-			3608007406u,
-			1308918612u,
-			956543938u,
-			2808555105u,
-			3495958263u,
-			1231636301u,
-			1047427035u,
-			2932959818u,
-			3654703836u,
-			1088359270u,
-			936918000u,
-			2847714899u,
-			3736837829u,
-			1202900863u,
-			817233897u,
-			3183342108u,
-			3401237130u,
-			1404277552u,
-			615818150u,
-			3134207493u,
-			3453421203u,
-			1423857449u,
-			601450431u,
-			3009837614u,
-			3294710456u,
-			1567103746u,
-			711928724u,
-			3020668471u,
-			3272380065u,
-			1510334235u,
-			755167117u
+			0U,
+			1996959894U,
+			3993919788U,
+			2567524794U,
+			124634137U,
+			1886057615U,
+			3915621685U,
+			2657392035U,
+			249268274U,
+			2044508324U,
+			3772115230U,
+			2547177864U,
+			162941995U,
+			2125561021U,
+			3887607047U,
+			2428444049U,
+			498536548U,
+			1789927666U,
+			4089016648U,
+			2227061214U,
+			450548861U,
+			1843258603U,
+			4107580753U,
+			2211677639U,
+			325883990U,
+			1684777152U,
+			4251122042U,
+			2321926636U,
+			335633487U,
+			1661365465U,
+			4195302755U,
+			2366115317U,
+			997073096U,
+			1281953886U,
+			3579855332U,
+			2724688242U,
+			1006888145U,
+			1258607687U,
+			3524101629U,
+			2768942443U,
+			901097722U,
+			1119000684U,
+			3686517206U,
+			2898065728U,
+			853044451U,
+			1172266101U,
+			3705015759U,
+			2882616665U,
+			651767980U,
+			1373503546U,
+			3369554304U,
+			3218104598U,
+			565507253U,
+			1454621731U,
+			3485111705U,
+			3099436303U,
+			671266974U,
+			1594198024U,
+			3322730930U,
+			2970347812U,
+			795835527U,
+			1483230225U,
+			3244367275U,
+			3060149565U,
+			1994146192U,
+			31158534U,
+			2563907772U,
+			4023717930U,
+			1907459465U,
+			112637215U,
+			2680153253U,
+			3904427059U,
+			2013776290U,
+			251722036U,
+			2517215374U,
+			3775830040U,
+			2137656763U,
+			141376813U,
+			2439277719U,
+			3865271297U,
+			1802195444U,
+			476864866U,
+			2238001368U,
+			4066508878U,
+			1812370925U,
+			453092731U,
+			2181625025U,
+			4111451223U,
+			1706088902U,
+			314042704U,
+			2344532202U,
+			4240017532U,
+			1658658271U,
+			366619977U,
+			2362670323U,
+			4224994405U,
+			1303535960U,
+			984961486U,
+			2747007092U,
+			3569037538U,
+			1256170817U,
+			1037604311U,
+			2765210733U,
+			3554079995U,
+			1131014506U,
+			879679996U,
+			2909243462U,
+			3663771856U,
+			1141124467U,
+			855842277U,
+			2852801631U,
+			3708648649U,
+			1342533948U,
+			654459306U,
+			3188396048U,
+			3373015174U,
+			1466479909U,
+			544179635U,
+			3110523913U,
+			3462522015U,
+			1591671054U,
+			702138776U,
+			2966460450U,
+			3352799412U,
+			1504918807U,
+			783551873U,
+			3082640443U,
+			3233442989U,
+			3988292384U,
+			2596254646U,
+			62317068U,
+			1957810842U,
+			3939845945U,
+			2647816111U,
+			81470997U,
+			1943803523U,
+			3814918930U,
+			2489596804U,
+			225274430U,
+			2053790376U,
+			3826175755U,
+			2466906013U,
+			167816743U,
+			2097651377U,
+			4027552580U,
+			2265490386U,
+			503444072U,
+			1762050814U,
+			4150417245U,
+			2154129355U,
+			426522225U,
+			1852507879U,
+			4275313526U,
+			2312317920U,
+			282753626U,
+			1742555852U,
+			4189708143U,
+			2394877945U,
+			397917763U,
+			1622183637U,
+			3604390888U,
+			2714866558U,
+			953729732U,
+			1340076626U,
+			3518719985U,
+			2797360999U,
+			1068828381U,
+			1219638859U,
+			3624741850U,
+			2936675148U,
+			906185462U,
+			1090812512U,
+			3747672003U,
+			2825379669U,
+			829329135U,
+			1181335161U,
+			3412177804U,
+			3160834842U,
+			628085408U,
+			1382605366U,
+			3423369109U,
+			3138078467U,
+			570562233U,
+			1426400815U,
+			3317316542U,
+			2998733608U,
+			733239954U,
+			1555261956U,
+			3268935591U,
+			3050360625U,
+			752459403U,
+			1541320221U,
+			2607071920U,
+			3965973030U,
+			1969922972U,
+			40735498U,
+			2617837225U,
+			3943577151U,
+			1913087877U,
+			83908371U,
+			2512341634U,
+			3803740692U,
+			2075208622U,
+			213261112U,
+			2463272603U,
+			3855990285U,
+			2094854071U,
+			198958881U,
+			2262029012U,
+			4057260610U,
+			1759359992U,
+			534414190U,
+			2176718541U,
+			4139329115U,
+			1873836001U,
+			414664567U,
+			2282248934U,
+			4279200368U,
+			1711684554U,
+			285281116U,
+			2405801727U,
+			4167216745U,
+			1634467795U,
+			376229701U,
+			2685067896U,
+			3608007406U,
+			1308918612U,
+			956543938U,
+			2808555105U,
+			3495958263U,
+			1231636301U,
+			1047427035U,
+			2932959818U,
+			3654703836U,
+			1088359270U,
+			936918000U,
+			2847714899U,
+			3736837829U,
+			1202900863U,
+			817233897U,
+			3183342108U,
+			3401237130U,
+			1404277552U,
+			615818150U,
+			3134207493U,
+			3453421203U,
+			1423857449U,
+			601450431U,
+			3009837614U,
+			3294710456U,
+			1567103746U,
+			711928724U,
+			3020668471U,
+			3272380065U,
+			1510334235U,
+			755167117U
 		};
 
 		private static readonly uint MaskValue = uint.MaxValue;