diff --git a/projects/openttd_vs80.sln b/projects/openttd_vs80.sln
index 2eae8e5f61..a11b420957 100644
--- a/projects/openttd_vs80.sln
+++ b/projects/openttd_vs80.sln
@@ -4,6 +4,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs80.vcp
ProjectSection(ProjectDependencies) = postProject
{0F066B23-18DF-4284-8265-F4A5E7E3B966} = {0F066B23-18DF-4284-8265-F4A5E7E3B966}
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC} = {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs80.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
@@ -13,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs80.vcproj"
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs80.vcproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -45,6 +48,14 @@ Global
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32
+ {1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 4d40e3f7ec..25575eb5f2 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -33,8 +33,6 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/version_vs90.vcproj b/projects/version_vs90.vcproj
new file mode 100644
index 0000000000..c0bfbbeaea
--- /dev/null
+++ b/projects/version_vs90.vcproj
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index a4aa44d1ad..56c7944d20 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -3599,6 +3599,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
veh = AiChooseAircraftToBuild(p->player_money, forbidden);
if (veh == INVALID_ENGINE) return;
+ if (GetStationByTile(tile)->Airport()->nof_depots == 0) return;
/* XXX - Have the AI pick the hangar terminal in an airport. Eg get airport-type
* and offset to the FIRST depot because the AI picks the st->xy tile */
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 4a4e543059..87b1aa756c 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -705,7 +705,7 @@ static const Widget _industry_directory_widgets[] = {
{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 201, 300, 14, 25, STR_SORT_BY_PRODUCTION, STR_SORT_ORDER_TIP}, // IDW_SORTBYPROD
{ WWT_PUSHTXTBTN, RESIZE_NONE, 13, 301, 400, 14, 25, STR_SORT_BY_TRANSPORTED, STR_SORT_ORDER_TIP}, // IDW_SORTBYTRANSPORT
{ WWT_PANEL, RESIZE_NONE, 13, 401, 495, 14, 25, 0x0, STR_NULL}, // IDW_SPACER
-{ WWT_PANEL, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_200A_TOWN_NAMES_CLICK_ON_NAME}, // IDW_INDUSRTY_LIST
+{ WWT_PANEL, RESIZE_BOTTOM, 13, 0, 495, 26, 189, 0x0, STR_INDUSTRYDIR_LIST_CAPTION}, // IDW_INDUSRTY_LIST
{ WWT_SCROLLBAR, RESIZE_BOTTOM, 13, 496, 507, 14, 177, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST}, // IDW_SCROLLBAR
{ WWT_RESIZEBOX, RESIZE_TB, 13, 496, 507, 178, 189, 0x0, STR_RESIZE_BUTTON}, // IDW_RESIZE
{ WIDGETS_END},
diff --git a/src/industry_map.h b/src/industry_map.h
index 77cab89209..25bf288986 100644
--- a/src/industry_map.h
+++ b/src/industry_map.h
@@ -206,7 +206,8 @@ static inline void SetIndustryConstructionCounter(TileIndex tile, byte value)
static inline void ResetIndustryConstructionStage(TileIndex tile)
{
assert(IsTileType(tile, MP_INDUSTRY));
- _m[tile].m1 = 0;
+ SB(_m[tile].m1, 0, 4, 0);
+ SB(_m[tile].m1, 7, 1, 0);
}
/**
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 1ec12f120a..19b4e355de 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1331,6 +1331,7 @@ STR_INDUSTRYDIR_CAPTION :{WHITE}Industri
STR_INDUSTRYDIR_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}){YELLOW} ({COMMA}% transported)
STR_INDUSTRYDIR_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}/{CARGO}){YELLOW} ({COMMA}%/{COMMA}% transported)
STR_INDUSTRYDIR_ITEM_NOPROD :{ORANGE}{INDUSTRY}
+STR_INDUSTRYDIR_LIST_CAPTION :{BLACK}Industry names - click on name to centre view on industry
STR_INDUSTRY_TOO_CLOSE :{WHITE}...too close to another industry
@@ -1893,7 +1894,7 @@ STR_3053_CENTER_MAIN_VIEW_ON_STATION :{BLACK}Centre m
STR_3054_SHOW_STATION_RATINGS :{BLACK}Show station ratings
STR_3055_CHANGE_NAME_OF_STATION :{BLACK}Change name of station
STR_3056_SHOW_LIST_OF_ACCEPTED_CARGO :{BLACK}Show list of accepted cargo
-STR_3057_STATION_NAMES_CLICK_ON :{BLACK}Station names - click on name to centre main view on station
+STR_3057_STATION_NAMES_CLICK_ON :{BLACK}Station names - click on name to centre view on station
STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT :{BLACK}Select size/type of airport
STR_305C_0 :{STATION} {STATIONFEATURES}
STR_STATION_SIGN_TINY :{TINYFONT}{STATION}
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index df15663d87..2b5028791a 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -227,21 +227,16 @@ static void DedicatedHandleKeyInput()
SetEvent(_hWaitForInputHandling);
#endif
- /* XXX - strtok() does not 'forget' \n\r if it is the first character! */
- strtok(input_line, "\r\n"); // Forget about the final \n (or \r)
- { /* Remove any special control characters */
- uint i;
- for (i = 0; i < lengthof(input_line); i++) {
- if (input_line[i] == '\n' || input_line[i] == '\r') // cut missed beginning '\0'
- input_line[i] = '\0';
-
- if (input_line[i] == '\0')
- break;
-
- if (!IsInsideMM(input_line[i], ' ', 256))
- input_line[i] = ' ';
+ /* strtok() does not 'forget' \r\n if the string starts with it,
+ * so we have to manually remove that! */
+ strtok(input_line, "\r\n");
+ for (char *c = input_line; *c != '\0'; c++) {
+ if (*c == '\n' || *c == '\r' || c == lastof(input_line)) {
+ *c = '\0';
+ break;
}
}
+ str_validate(input_line);
IConsoleCmdExec(input_line); // execute command
}
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index e0ecb22d61..635d1218fd 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -283,7 +283,7 @@ void WaypointsDailyLoop()
/* Check if we need to delete a waypoint */
FOR_ALL_WAYPOINTS(wp) {
- if (wp->deleted != 0 && --wp->deleted == 0) DeleteWaypoint(wp);
+ if (wp->deleted != 0 && --wp->deleted == 0) delete wp;
}
}
diff --git a/src/waypoint.h b/src/waypoint.h
index c995dca0d9..83038299b9 100644
--- a/src/waypoint.h
+++ b/src/waypoint.h
@@ -40,11 +40,6 @@ static inline bool IsValidWaypointID(WaypointID index)
return index < GetWaypointPoolSize() && GetWaypoint(index)->IsValid();
}
-static inline void DeleteWaypoint(Waypoint *wp)
-{
- wp->~Waypoint();
-}
-
#define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1U < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1U) : NULL) if (wp->IsValid())
#define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0)