Update openttd to 1.7.0-RC1

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2017-03-12 16:41:12 +03:00
parent ecdb1590ab
commit 3433ae02f4
262 changed files with 5052 additions and 3913 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: misc_gui.cpp 27588 2016-05-29 18:56:42Z frosch $ */
/* $Id: misc_gui.cpp 27781 2017-03-11 21:02:32Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -162,6 +162,7 @@ public:
td.airport_class = STR_NULL;
td.airport_name = STR_NULL;
td.airport_tile_name = STR_NULL;
td.railtype = STR_NULL;
td.rail_speed = 0;
td.road_speed = 0;
@@ -272,6 +273,13 @@ public:
line_nr++;
}
/* Rail type name */
if (td.railtype != STR_NULL) {
SetDParam(0, td.railtype);
GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_RAIL_TYPE, lastof(this->landinfo_data[line_nr]));
line_nr++;
}
/* Rail speed limit */
if (td.rail_speed != 0) {
SetDParam(0, td.rail_speed);
@@ -432,6 +440,7 @@ static const char * const _credits[] = {
" Mike Ragsdale - OpenTTD installer",
" Christian Rosentreter (tokai) - MorphOS / AmigaOS port",
" Richard Kempton (richK) - additional airports, initial TGP implementation",
" HvS - titlegame",
"",
" Alberto Demichelis - Squirrel scripting language \xC2\xA9 2003-2008",
" L. Peter Deutsch - MD5 implementation \xC2\xA9 1999, 2000, 2002",
@@ -672,8 +681,8 @@ struct TooltipsWindow : public Window
/* Correctly position the tooltip position, watch out for window and cursor size
* Clamp value to below main toolbar and above statusbar. If tooltip would
* go below window, flip it so it is shown above the cursor */
pt.y = Clamp(_cursor.pos.y + _cursor.size.y + _cursor.offs.y + 5, scr_top, scr_bot);
if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.offs.y - 5, scr_bot) - sm_height;
pt.y = Clamp(_cursor.pos.y + _cursor.total_size.y + _cursor.total_offs.y + 5, scr_top, scr_bot);
if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.total_offs.y - 5, scr_bot) - sm_height;
pt.x = sm_width >= _screen.width ? 0 : Clamp(_cursor.pos.x - (sm_width >> 1), 0, _screen.width - sm_width);
return pt;