Index: projects/generate_vs100.vcxproj
===================================================================
--- projects/generate_vs100.vcxproj (revision 27153)
+++ projects/generate_vs100.vcxproj (working copy)
@@ -1,5 +1,5 @@
-
-
+
+
Debug
@@ -14,6 +14,7 @@
Utility
+ v120
@@ -39,4 +40,4 @@
-
+
\ No newline at end of file
Index: projects/langs_vs100.vcxproj
===================================================================
--- projects/langs_vs100.vcxproj (revision 27153)
+++ projects/langs_vs100.vcxproj (working copy)
@@ -1,5 +1,5 @@
-
-
+
+
Debug
@@ -16,6 +16,7 @@
Utility
false
+ v120
@@ -381,4 +382,4 @@
-
+
\ No newline at end of file
Index: projects/openttd_vs100.sln
===================================================================
--- projects/openttd_vs100.sln (revision 27153)
+++ projects/openttd_vs100.sln (working copy)
@@ -1,5 +1,7 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2013 for Windows Desktop
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs100.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}"
ProjectSection(ProjectDependencies) = postProject
{0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35}
@@ -29,14 +31,15 @@
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32
- {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32
+ {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Release|x64
+ {668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Release|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32
- {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64
- {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64
+ {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|Win32
+ {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|Win32
+ {668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Deploy.0 = Release|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32
Index: projects/openttd_vs100.vcxproj
===================================================================
--- projects/openttd_vs100.vcxproj (revision 27153)
+++ projects/openttd_vs100.vcxproj (working copy)
@@ -1,5 +1,5 @@
-
-
+
+
Debug
@@ -28,6 +28,7 @@
Application
false
Unicode
+ v120
Application
@@ -34,11 +35,13 @@
false
Unicode
true
+ v120
Application
false
Unicode
+ v120
Application
@@ -45,6 +48,7 @@
false
Unicode
true
+ v120
@@ -88,6 +92,10 @@
$(SolutionDir)..\objs\$(Platform)\$(Configuration)\
$(ProjectDir)..\bin
+
+ $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\OpenTTD\OpenTTD essentials\shared\include;
+ $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);C:\OpenTTD\OpenTTD essentials\win32\library;
+
.\Release/openttd.tlb
@@ -144,6 +152,7 @@
MachineX86
true
+ false
@@ -1290,4 +1299,4 @@
-
+
\ No newline at end of file
Index: projects/settingsgen_vs100.vcxproj
===================================================================
--- projects/settingsgen_vs100.vcxproj (revision 27153)
+++ projects/settingsgen_vs100.vcxproj (working copy)
@@ -1,5 +1,5 @@
-
+
Debug
@@ -15,6 +15,7 @@
Application
MultiByte
+ v120
Index: projects/strgen_vs100.vcxproj
===================================================================
--- projects/strgen_vs100.vcxproj (revision 27153)
+++ projects/strgen_vs100.vcxproj (working copy)
@@ -1,5 +1,5 @@
-
-
+
+
Debug
@@ -16,6 +16,7 @@
Application
false
MultiByte
+ v120
@@ -91,4 +92,4 @@
-
+
\ No newline at end of file
Index: src/saveload/company_sl.cpp
===================================================================
--- src/saveload/company_sl.cpp (revision 27153)
+++ src/saveload/company_sl.cpp (working copy)
@@ -180,6 +180,9 @@
if (IsLock(tile) && GetLockPart(tile) == LOCK_PART_MIDDLE) {
/* The middle tile specifies the owner of the lock. */
c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // the middle tile specifies the owner of the
+ if (GetWaterClass(tile) != WATER_CLASS_CANAL) {
+ c->infrastructure.water++;
+ }
break; // do not count the middle tile as canal
}
}
Index: src/water_cmd.cpp
===================================================================
--- src/water_cmd.cpp (revision 27153)
+++ src/water_cmd.cpp (working copy)
@@ -258,10 +258,14 @@
/* middle tile */
WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;
- ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- if (ret.Failed()) return ret;
- cost.AddCost(ret);
+ if (!IsWaterTile(tile)) {
+ ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
+ if (ret.Failed()) return ret;
+ cost.AddCost(ret);
+ cost.AddCost(_price[PR_BUILD_CANAL]);
+ }
+
/* lower tile */
WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;
@@ -298,6 +302,7 @@
if (c != NULL) {
/* Counts for the water. */
if (!IsWaterTile(tile - delta)) c->infrastructure.water++;
+ if (!IsWaterTile(tile)) c->infrastructure.water++;
if (!IsWaterTile(tile + delta)) c->infrastructure.water++;
/* Count for the lock itself. */
c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock is three tiles.
@@ -348,6 +353,9 @@
if (GetWaterClass(tile) == WATER_CLASS_RIVER) {
MakeRiver(tile, Random());
} else {
+ if (c != NULL) {
+ c->infrastructure.water--;
+ }
DoClearSquare(tile);
}
MakeWaterKeepingClass(tile + delta, GetTileOwner(tile + delta));
@@ -1276,8 +1284,14 @@
/* No need to dirty company windows here, we'll redraw the whole screen anyway. */
if (is_lock_middle) Company::Get(old_owner)->infrastructure.water -= 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.
+ if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {
+ Company::Get(old_owner)->infrastructure.water--;
+ }
if (new_owner != INVALID_OWNER) {
if (is_lock_middle) Company::Get(new_owner)->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock has three parts.
+ if (GetWaterClass(tile) == WATER_CLASS_CANAL && is_lock_middle) {
+ Company::Get(new_owner)->infrastructure.water++;
+ }
/* Only subtract from the old owner here if the new owner is valid,
* otherwise we clear ship depots and canal water below. */
if (GetWaterClass(tile) == WATER_CLASS_CANAL && !is_lock_middle) {