Loading

Paste #pslxvnpmw

  1. Index: projects/generate_vs100.vcxproj
  2. ===================================================================
  3. --- projects/generate_vs100.vcxproj (revision 27153)
  4. +++ projects/generate_vs100.vcxproj (working copy)
  5. @@ -1,5 +1,5 @@
  6. -<?xml version="1.0" encoding="utf-8"?>
  7. -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  8. +<?xml version="1.0" encoding="utf-8"?>
  9. +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  10.    <ItemGroup Label="ProjectConfigurations">
  11.      <ProjectConfiguration Include="Debug|Win32">
  12.        <Configuration>Debug</Configuration>
  13. @@ -14,6 +14,7 @@
  14.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  15.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  16.      <ConfigurationType>Utility</ConfigurationType>
  17. +    <PlatformToolset>v120</PlatformToolset>
  18.    </PropertyGroup>
  19.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  20.    <ImportGroup Label="ExtensionSettings">
  21. @@ -39,4 +40,4 @@
  22.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  23.    <ImportGroup Label="ExtensionTargets">
  24.    </ImportGroup>
  25. -</Project>
  26. +</Project>
  27. \ No newline at end of file
  28. Index: projects/langs_vs100.vcxproj
  29. ===================================================================
  30. --- projects/langs_vs100.vcxproj    (revision 27153)
  31. +++ projects/langs_vs100.vcxproj    (working copy)
  32. @@ -1,5 +1,5 @@
  33. -<?xml version="1.0" encoding="utf-8"?>
  34. -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  35. +<?xml version="1.0" encoding="utf-8"?>
  36. +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  37.    <ItemGroup Label="ProjectConfigurations">
  38.      <ProjectConfiguration Include="Debug|Win32">
  39.        <Configuration>Debug</Configuration>
  40. @@ -16,6 +16,7 @@
  41.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  42.      <ConfigurationType>Utility</ConfigurationType>
  43.      <UseOfMfc>false</UseOfMfc>
  44. +    <PlatformToolset>v120</PlatformToolset>
  45.    </PropertyGroup>
  46.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  47.    <ImportGroup Label="ExtensionSettings">
  48. @@ -381,4 +382,4 @@
  49.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  50.    <ImportGroup Label="ExtensionTargets">
  51.    </ImportGroup>
  52. -</Project>
  53. +</Project>
  54. \ No newline at end of file
  55. Index: projects/openttd_vs100.sln
  56. ===================================================================
  57. --- projects/openttd_vs100.sln  (revision 27153)
  58. +++ projects/openttd_vs100.sln  (working copy)
  59. @@ -1,5 +1,7 @@
  60. -Microsoft Visual Studio Solution File, Format Version 11.00
  61. -# Visual C++ Express 2010
  62. +Microsoft Visual Studio Solution File, Format Version 12.00
  63. +# Visual Studio Express 2013 for Windows Desktop
  64. +VisualStudioVersion = 12.0.31101.0
  65. +MinimumVisualStudioVersion = 10.0.40219.1
  66.  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs100.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}"
  67.     ProjectSection(ProjectDependencies) = postProject
  68.         {0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35}
  69. @@ -29,14 +31,15 @@
  70.         Release|x64 = Release|x64
  71.     EndGlobalSection
  72.     GlobalSection(ProjectConfigurationPlatforms) = postSolution
  73. -       {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32
  74. -       {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32
  75. +       {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Release|x64
  76. +       {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Release|x64
  77.         {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64
  78.         {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64
  79.         {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32
  80.         {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32
  81. -       {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64
  82. -       {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64
  83. +       {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|Win32
  84. +       {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|Win32
  85. +       {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Deploy.0 = Release|Win32
  86.         {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32
  87.         {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32
  88.         {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32
  89. Index: projects/openttd_vs100.vcxproj
  90. ===================================================================
  91. --- projects/openttd_vs100.vcxproj  (revision 27153)
  92. +++ projects/openttd_vs100.vcxproj  (working copy)
  93. @@ -1,5 +1,5 @@
  94. -<?xml version="1.0" encoding="utf-8"?>
  95. -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  96. +<?xml version="1.0" encoding="utf-8"?>
  97. +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  98.    <ItemGroup Label="ProjectConfigurations">
  99.      <ProjectConfiguration Include="Debug|Win32">
  100.        <Configuration>Debug</Configuration>
  101. @@ -28,6 +28,7 @@
  102.      <ConfigurationType>Application</ConfigurationType>
  103.      <UseOfMfc>false</UseOfMfc>
  104.      <CharacterSet>Unicode</CharacterSet>
  105. +    <PlatformToolset>v120</PlatformToolset>
  106.    </PropertyGroup>
  107.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
  108.      <ConfigurationType>Application</ConfigurationType>
  109. @@ -34,11 +35,13 @@
  110.      <UseOfMfc>false</UseOfMfc>
  111.      <CharacterSet>Unicode</CharacterSet>
  112.      <WholeProgramOptimization>true</WholeProgramOptimization>
  113. +    <PlatformToolset>v120</PlatformToolset>
  114.    </PropertyGroup>
  115.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
  116.      <ConfigurationType>Application</ConfigurationType>
  117.      <UseOfMfc>false</UseOfMfc>
  118.      <CharacterSet>Unicode</CharacterSet>
  119. +    <PlatformToolset>v120</PlatformToolset>
  120.    </PropertyGroup>
  121.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
  122.      <ConfigurationType>Application</ConfigurationType>
  123. @@ -45,6 +48,7 @@
  124.      <UseOfMfc>false</UseOfMfc>
  125.      <CharacterSet>Unicode</CharacterSet>
  126.      <WholeProgramOptimization>true</WholeProgramOptimization>
  127. +    <PlatformToolset>v120</PlatformToolset>
  128.    </PropertyGroup>
  129.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  130.    <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
  131. @@ -88,6 +92,10 @@
  132.      <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
  133.      <LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin</LocalDebuggerWorkingDirectory>
  134.    </PropertyGroup>
  135. +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  136. +    <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);C:\OpenTTD\OpenTTD essentials\shared\include;</IncludePath>
  137. +    <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);C:\OpenTTD\OpenTTD essentials\win32\library;</LibraryPath>
  138. +  </PropertyGroup>
  139.    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  140.      <Midl>
  141.        <TypeLibraryName>.\Release/openttd.tlb</TypeLibraryName>
  142. @@ -144,6 +152,7 @@
  143.        </DataExecutionPrevention>
  144.        <TargetMachine>MachineX86</TargetMachine>
  145.        <EnableCOMDATFolding>true</EnableCOMDATFolding>
  146. +      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
  147.      </Link>
  148.    </ItemDefinitionGroup>
  149.    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  150. @@ -1290,4 +1299,4 @@
  151.      </ProjectReference>
  152.    </ItemGroup>
  153.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  154. -</Project>
  155. +</Project>
  156. \ No newline at end of file
  157. Index: projects/settingsgen_vs100.vcxproj
  158. ===================================================================
  159. --- projects/settingsgen_vs100.vcxproj  (revision 27153)
  160. +++ projects/settingsgen_vs100.vcxproj  (working copy)
  161. @@ -1,5 +1,5 @@
  162.  <?xml version="1.0" encoding="utf-8"?>
  163. -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  164. +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  165.    <ItemGroup Label="ProjectConfigurations">
  166.      <ProjectConfiguration Include="Debug|Win32">
  167.        <Configuration>Debug</Configuration>
  168. @@ -15,6 +15,7 @@
  169.    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  170.      <ConfigurationType>Application</ConfigurationType>
  171.      <CharacterSet>MultiByte</CharacterSet>
  172. +    <PlatformToolset>v120</PlatformToolset>
  173.    </PropertyGroup>
  174.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  175.    <ImportGroup Label="ExtensionSettings">
  176. Index: projects/strgen_vs100.vcxproj
  177. ===================================================================
  178. --- projects/strgen_vs100.vcxproj   (revision 27153)
  179. +++ projects/strgen_vs100.vcxproj   (working copy)
  180. @@ -1,5 +1,5 @@
  181. -<?xml version="1.0" encoding="utf-8"?>
  182. -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  183. +<?xml version="1.0" encoding="utf-8"?>
  184. +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  185.    <ItemGroup Label="ProjectConfigurations">
  186.      <ProjectConfiguration Include="Debug|Win32">
  187.        <Configuration>Debug</Configuration>
  188. @@ -16,6 +16,7 @@
  189.      <ConfigurationType>Application</ConfigurationType>
  190.      <UseOfMfc>false</UseOfMfc>
  191.      <CharacterSet>MultiByte</CharacterSet>
  192. +    <PlatformToolset>v120</PlatformToolset>
  193.    </PropertyGroup>
  194.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  195.    <ImportGroup Label="ExtensionSettings">
  196. @@ -91,4 +92,4 @@
  197.    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  198.    <ImportGroup Label="ExtensionTargets">
  199.    </ImportGroup>
  200. -</Project>
  201. +</Project>
  202. \ No newline at end of file
  203. Index: src/saveload/company_sl.cpp
  204. ===================================================================
  205. --- src/saveload/company_sl.cpp (revision 27153)
  206. +++ src/saveload/company_sl.cpp (working copy)
  207. @@ -180,6 +180,9 @@
  208.                         if (IsLock(tile) && GetLockPart(tile) == LOCK_PART_MIDDLE) {
  209.                             /* The middle tile specifies the owner of the lock. */
  210.                             c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // the middle tile specifies the owner of the
  211. +                           if (GetWaterClass(tile) != WATER_CLASS_CANAL) {
  212. +                               c->infrastructure.water++;
  213. +                           }
  214.                             break; // do not count the middle tile as canal
  215.                         }
  216.                     }
  217. Index: src/water_cmd.cpp
  218. ===================================================================
  219. --- src/water_cmd.cpp   (revision 27153)
  220. +++ src/water_cmd.cpp   (working copy)
  221. @@ -258,10 +258,14 @@
  222.  
  223.     /* middle tile */
  224.     WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
  225. -   ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  226. -   if (ret.Failed()) return ret;
  227. -   cost.AddCost(ret);
  228.  
  229. +   if (!IsWaterTile(tile)) {
  230. +       ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  231. +       if (ret.Failed()) return ret;
  232. +       cost.AddCost(ret);
  233. +       cost.AddCost(_price[PR_BUILD_CANAL]);
  234. +   }
  235. +
  236.     /* lower tile */
  237.     WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;
  238.  
  239. @@ -298,6 +302,7 @@
  240.         if (c != NULL) {
  241.             /* Counts for the water. */
  242.             if (!IsWaterTile(tile - delta)) c->infrastructure.water++;
  243. +           if (!IsWaterTile(tile)) c->infrastructure.water++;
  244.             if (!IsWaterTile(tile + delta)) c->infrastructure.water++;
  245.             /* Count for the lock itself. */
  246.             c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock is three tiles.
  247. @@ -348,6 +353,9 @@
  248.         if (GetWaterClass(tile) == WATER_CLASS_RIVER) {
  249.             MakeRiver(tile, Random());
  250.         } else {
  251. +           if (c != NULL) {
  252. +               c->infrastructure.water--;
  253. +           }
  254.             DoClearSquare(tile);
  255.         }
  256.         MakeWaterKeepingClass(tile + delta, GetTileOwner(tile + delta));
  257. @@ -1276,8 +1284,14 @@
  258.  
  259.     /* No need to dirty company windows here, we'll redraw the whole screen anyway. */
  260.     if (is_lock_middle) Company::Get(old_owner)->infrastructure.water -= 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.
  261. +   if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {
  262. +       Company::Get(old_owner)->infrastructure.water--;
  263. +   }
  264.     if (new_owner != INVALID_OWNER) {
  265.         if (is_lock_middle) Company::Get(new_owner)->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.
  266. +       if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {
  267. +           Company::Get(new_owner)->infrastructure.water++;
  268. +       }
  269.         /* Only subtract from the old owner here if the new owner is valid,
  270.          * otherwise we clear ship depots and canal water below. */
  271.         if (GetWaterClass(tile) == WATER_CLASS_CANAL && !is_lock_middle) {

Comments