ghorsington před 5 roky
rodič
revize
b638249320

+ 5 - 5
Assembly-CSharp.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
 VisualStudioVersion = 15.0.26228.4
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{1D4C8962-DCA3-4002-B801-78843BB56CC9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{1D4C8962-DCA3-4002-B801-78843BB56CC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{1D4C8962-DCA3-4002-B801-78843BB56CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{1D4C8962-DCA3-4002-B801-78843BB56CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{1D4C8962-DCA3-4002-B801-78843BB56CC9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 16 - 16
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{1D4C8962-DCA3-4002-B801-78843BB56CC9}</ProjectGuid>
+    <ProjectGuid>{18AAF8C2-7D67-4E77-8C73-6B5AF6C5C7A0}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -34,49 +34,49 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp-firstpass">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="Assembly-UnityScript-firstpass">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="FoveUnityPlugin">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
     </Reference>
     <Reference Include="Ionic.Zlib">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
     </Reference>
     <Reference Include="JsonFx.Json">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
     </Reference>
     <Reference Include="LeapCSharp.NET3.5">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
     </Reference>
     <Reference Include="System">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.dll</HintPath>
     </Reference>
     <Reference Include="System.Core">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
     </Reference>
     <Reference Include="System.Drawing">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine.UI">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
     </Reference>
     <Reference Include="zxing.unity">
-      <HintPath>A:\Gams\COM3D2\COM3D2\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>

+ 56 - 22
Assembly-CSharp/GameMain.cs

@@ -851,35 +851,64 @@ public class GameMain : MonoSingleton<GameMain>
 				int num = binaryReader.ReadInt32();
 				binaryWriter.Write(num);
 				this.SerializeWriteHeader(binaryWriter, this.DeserializeReadHeader(binaryReader, num));
-				if (!this.TryBinaryReadString(binaryReader.BaseStream, (string str) => str == "bookmark_kk_01"))
+				GameMain.BinaryBookmark binaryBookmark;
+				if (this.TryBinaryReadString(binaryReader.BaseStream, (string str) => str == "bookmark_kk_01"))
 				{
-					NDebug.MessageBox("傅きセーブ", "元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
-					UnityEngine.Debug.LogWarning("[GameMain.SerializeKasizukiOnly]\u3000元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
-					binaryReader.Close();
-					return false;
+					binaryBookmark = new GameMain.BinaryBookmark(binaryReader);
 				}
-				GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryReader);
-				if (!this.TryBinaryReadString(binaryReader.BaseStream, (string str) => str == "bookmark_kk_02"))
+				else
 				{
-					NDebug.MessageBox("傅きセーブ", "元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
-					UnityEngine.Debug.LogWarning("[GameMain.SerializeKasizukiOnly]\u3000元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
-					binaryReader.Close();
-					return false;
+					if (num >= 1280)
+					{
+						NDebug.MessageBox("傅きセーブ", "元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
+						UnityEngine.Debug.LogWarning("[GameMain.SerializeKasizukiOnly]\u3000元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
+						binaryReader.Close();
+						return false;
+					}
+					long offset = (long)("bookmark_kk_01".Length + 1 - 4);
+					binaryReader.BaseStream.Seek(offset, SeekOrigin.Current);
+					int num2 = binaryReader.ReadInt32();
+					binaryReader.BaseStream.Seek(-4L, SeekOrigin.Current);
+					binaryBookmark = new GameMain.BinaryBookmark(binaryReader);
+					binaryBookmark.bookmark_value = (long)num2;
+				}
+				GameMain.BinaryBookmark binaryBookmark2;
+				if (this.TryBinaryReadString(binaryReader.BaseStream, (string str) => str == "bookmark_kk_02"))
+				{
+					binaryBookmark2 = new GameMain.BinaryBookmark(binaryReader);
+				}
+				else
+				{
+					if (num >= 1280)
+					{
+						NDebug.MessageBox("傅きセーブ", "元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
+						UnityEngine.Debug.LogWarning("[GameMain.SerializeKasizukiOnly]\u3000元セーブデータのしおり取得に失敗しました。古いセーブデータかもしれません。");
+						binaryReader.Close();
+						return false;
+					}
+					long offset2 = (long)("bookmark_kk_02".Length + 1);
+					binaryReader.BaseStream.Seek(offset2, SeekOrigin.Current);
+					int num3 = binaryReader.ReadInt32();
+					binaryReader.BaseStream.Seek(-4L, SeekOrigin.Current);
+					binaryBookmark2 = new GameMain.BinaryBookmark(binaryReader);
+					binaryBookmark2.bookmark_value = (long)num3;
 				}
-				GameMain.BinaryBookmark binaryBookmark2 = new GameMain.BinaryBookmark(binaryReader);
 				binaryWriter.Write("bookmark_kk_01");
 				GameMain.BinaryBookmark binaryBookmark3 = new GameMain.BinaryBookmark(binaryWriter);
 				binaryWriter.Write("bookmark_kk_02");
 				GameMain.BinaryBookmark binaryBookmark4 = new GameMain.BinaryBookmark(binaryWriter);
 				binaryReader.BaseStream.Seek(binaryBookmark.bookmark_write_position, SeekOrigin.Begin);
-				binaryWriter.BaseStream.Seek(binaryBookmark.bookmark_write_position, SeekOrigin.Begin);
-				binaryWriter.Write(binaryReader.ReadBytes((int)binaryBookmark.bookmark_value + 8));
+				binaryWriter.BaseStream.Seek(binaryBookmark3.bookmark_write_position, SeekOrigin.Begin);
+				long num4 = (long)(8 + ("bookmark_kk_02".Length + 1) + 8);
+				binaryReader.BaseStream.Seek(num4, SeekOrigin.Current);
+				binaryWriter.BaseStream.Seek(num4, SeekOrigin.Current);
+				binaryWriter.Write(binaryReader.ReadBytes((int)binaryBookmark.bookmark_value + 8 - (int)num4));
 				binaryBookmark3.WriteBinaryLength(binaryWriter);
 				this.KasizukiMgr.Serialize(binaryWriter);
 				binaryBookmark4.WriteBinaryLength(binaryWriter);
-				long num2 = binaryBookmark2.bookmark_value + binaryBookmark2.bookmark_write_position + 8L;
-				binaryReader.BaseStream.Seek(num2, SeekOrigin.Begin);
-				binaryWriter.Write(binaryReader.ReadBytes((int)binaryReader.BaseStream.Length - (int)num2));
+				long num5 = binaryBookmark2.bookmark_value + binaryBookmark2.bookmark_write_position + 8L;
+				binaryReader.BaseStream.Seek(num5, SeekOrigin.Begin);
+				binaryWriter.Write(binaryReader.ReadBytes((int)binaryReader.BaseStream.Length - (int)num5));
 				binaryReader.Close();
 				File.WriteAllBytes(path, memoryStream.ToArray());
 			}
@@ -938,17 +967,19 @@ public class GameMain : MonoSingleton<GameMain>
 		{
 			GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryReader);
 		}
-		else
+		else if (num < 1280)
 		{
-			UnityEngine.Debug.Log("[GameMain.Deserialize()]\u3000しおりの取得に失敗しました。\u3000古いセーブデータかもしれないです。");
+			long offset = (long)("bookmark_kk_01".Length + 1 + 8 - 4);
+			binaryReader.BaseStream.Seek(offset, SeekOrigin.Current);
 		}
 		if (this.TryBinaryReadString(binaryReader.BaseStream, (string str) => str == "bookmark_kk_02"))
 		{
 			GameMain.BinaryBookmark binaryBookmark2 = new GameMain.BinaryBookmark(binaryReader);
 		}
-		else
+		else if (num < 1280)
 		{
-			UnityEngine.Debug.Log("[GameMain.Deserialize()]\u3000しおりの取得に失敗しました。\u3000古いセーブデータかもしれないです。");
+			long offset2 = (long)("bookmark_kk_02".Length + 1 + 8);
+			binaryReader.BaseStream.Seek(offset2, SeekOrigin.Current);
 		}
 		bool flag = false;
 		if (215 < num)
@@ -1088,7 +1119,10 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.strPlayerName = brRead.ReadString();
 		serializeHeader.nMaidNum = brRead.ReadInt32();
 		serializeHeader.strComment = brRead.ReadString();
-		if (1280 <= gameVersion)
+		long position = brRead.BaseStream.Position;
+		byte b = brRead.ReadByte();
+		brRead.BaseStream.Seek(position, SeekOrigin.Begin);
+		if (b != 14)
 		{
 			serializeHeader.productTypeID = brRead.ReadInt32();
 		}