1
0
Fork 0

(svn r14266) [0.6] -Backport from trunk:

- Fix: Desyncs after deleting a waypoint because of explicit destructor call instead of using operator delete (r14265)
- Fix: Crash when the AI tries to find the depot of an airport that doesn't have a depot [FS#2190] (r13999)
- Fix: MSVC cannot handle changed files in the prebuild event, so make the version determination a separate subproject [FS#2004] (r13998)
- Fix: The dedicated console removed any character that was not a printable ASCII character instead. Now it allows UTF8 formated strings too [FS#2189] (r13992)
- Fix: Resetting construction stage counter reset more than it should (r13981)
- Fix: Wrong tooltip for the industry directory's list [FS#2178] (r13917)
release/0.6
rubidium 2008-09-07 21:26:26 +00:00
parent 0222967c41
commit c9d52ddeff
15 changed files with 126 additions and 54 deletions

View File

@ -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

View File

@ -33,8 +33,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -145,8 +143,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -243,8 +239,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -356,8 +350,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -33,8 +33,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -145,8 +143,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -243,8 +239,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -356,8 +350,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -4,6 +4,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs90.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_vs90.vcproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
@ -13,6 +14,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs90.vcproj"
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1} = {A133A442-BD0A-4ADE-B117-AD7545E4BDD1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs90.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

View File

@ -34,8 +34,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -144,8 +142,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -241,8 +237,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -353,8 +347,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -34,8 +34,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -144,8 +142,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -241,8 +237,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -353,8 +347,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCCustomBuildTool"

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="version"
ProjectGUID="{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
RootNamespace="version"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\src\rev.cpp.in"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="version"
ProjectGUID="{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
RootNamespace="version"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
Description="Determining version number"
CommandLine="&quot;$(InputDir)/determineversion.vbs&quot;"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\src\rev.cpp.in"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -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 */

View File

@ -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},

View File

@ -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);
}
/**

View File

@ -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}

View File

@ -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
}

View File

@ -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;
}
}

View File

@ -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)