(svn r9004) [cpp_gui] -Sync with trunk (r8900..r9003) cpp_gui
authorKUDr
Sun, 04 Mar 2007 04:25:36 +0000
branchcpp_gui
changeset 6285 187e3ef04cc9
parent 6284 45d0233e7d79
child 6286 6e8eec87fa9d
(svn r9004) [cpp_gui] -Sync with trunk (r8900..r9003)
COPYING
changelog.txt
config.lib
docs/landscape.html
docs/landscape_grid.html
docs/openttd.6
known-bugs.txt
os/debian/README.Debian
os/debian/changelog
os/debian/control
os/debian/copyright
os/debian/po/POTFILES.in
os/debian/po/ca.po
os/debian/po/templates.pot
os/debian/postinst
os/debian/postrm
os/debian/templates
os/win32/installer/CDFinder.ini
os/win32/installer/cdfinder.ini
os/win32/installer/gpl.txt
os/win32/installer/install.nsi
os/win32/installer/notice.ini
projects/generate
projects/openttd.vcproj
projects/openttd_vs80.vcproj
readme.txt
source.list
src/aircraft_cmd.cpp
src/aircraft_gui.cpp
src/airport.h
src/airport_movement.h
src/bridge.h
src/bridge_gui.cpp
src/bridge_map.h
src/build_vehicle_gui.cpp
src/clear_cmd.cpp
src/debug.h
src/depot.h
src/depot_gui.cpp
src/economy.cpp
src/elrail.cpp
src/engine.cpp
src/engine.h
src/engine_gui.cpp
src/fileio.cpp
src/fileio.h
src/fios.cpp
src/fios.h
src/fontcache.cpp
src/functions.h
src/genworld.cpp
src/genworld.h
src/genworld_gui.cpp
src/gfx.cpp
src/gfx.h
src/gfxinit.cpp
src/gfxinit.h
src/graph_gui.cpp
src/gui.h
src/hal.h
src/heightmap.cpp
src/heightmap.h
src/helpers.cpp
src/helpers.hpp
src/industry.h
src/industry_cmd.cpp
src/industry_gui.cpp
src/industry_map.h
src/intro_gui.cpp
src/landscape.cpp
src/lang/american.txt
src/lang/brazilian_portuguese.txt
src/lang/bulgarian.txt
src/lang/catalan.txt
src/lang/czech.txt
src/lang/danish.txt
src/lang/dutch.txt
src/lang/english.txt
src/lang/esperanto.txt
src/lang/estonian.txt
src/lang/finnish.txt
src/lang/french.txt
src/lang/galician.txt
src/lang/german.txt
src/lang/hungarian.txt
src/lang/icelandic.txt
src/lang/italian.txt
src/lang/japanese.txt
src/lang/korean.txt
src/lang/lithuanian.txt
src/lang/norwegian_bokmal.txt
src/lang/norwegian_nynorsk.txt
src/lang/polish.txt
src/lang/portuguese.txt
src/lang/romanian.txt
src/lang/russian.txt
src/lang/simplified_chinese.txt
src/lang/slovak.txt
src/lang/slovenian.txt
src/lang/spanish.txt
src/lang/swedish.txt
src/lang/traditional_chinese.txt
src/lang/turkish.txt
src/lang/ukrainian.txt
src/lang/unfinished/afrikaans.txt
src/lang/unfinished/croatian.txt
src/lang/unfinished/latvian.txt
src/livery.h
src/lzoconf.h
src/macros.h
src/main_gui.cpp
src/map.cpp
src/map.h
src/md5.cpp
src/md5.h
src/mersenne.cpp
src/minilzo.cpp
src/minilzo.h
src/misc.cpp
src/misc_cmd.cpp
src/misc_gui.cpp
src/mixer.cpp
src/mixer.h
src/music.cpp
src/music.h
src/music_gui.cpp
src/network/network.cpp
src/network/network.h
src/network/network_server.cpp
src/network/network_udp.cpp
src/newgrf.cpp
src/newgrf_config.cpp
src/newgrf_engine.cpp
src/newgrf_gui.cpp
src/news.h
src/news_gui.cpp
src/openttd.cpp
src/os_timer.cpp
src/pathfind.cpp
src/player.h
src/player_face.h
src/player_gui.cpp
src/players.cpp
src/rail.cpp
src/rail.h
src/rail_cmd.cpp
src/rail_gui.cpp
src/rail_map.h
src/road_cmd.cpp
src/road_map.h
src/roadveh_cmd.cpp
src/roadveh_gui.cpp
src/saveload.cpp
src/ship_cmd.cpp
src/ship_gui.cpp
src/station.h
src/station_cmd.cpp
src/station_gui.cpp
src/stdafx.h
src/string.h
src/strings.cpp
src/table/engines.h
src/town_cmd.cpp
src/train_cmd.cpp
src/train_gui.cpp
src/unmovable_cmd.cpp
src/vehicle.cpp
src/vehicle.h
src/video/cocoa_v.mm
src/video/win32_v.cpp
src/water_cmd.cpp
src/water_map.h
src/waypoint.h
src/win32.cpp
src/win64.asm
src/window.h
src/yapf/yapf_common.cpp
--- a/COPYING	Sat Mar 03 20:33:32 2007 +0000
+++ b/COPYING	Sun Mar 04 04:25:36 2007 +0000
@@ -1,12 +1,12 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-			    Preamble
+                            Preamble
 
   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -15,7 +15,7 @@
 General Public License applies to most of the Free Software
 Foundation's software and to any other program whose authors commit to
 using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
+
+                    GNU GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
   0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@
     License.  (Exception: if the Program itself is interactive but
     does not normally print such an announcement, your work based on
     the Program is not required to print an announcement.)
-
+
 These requirements apply to the modified work as a whole.  If
 identifiable sections of that work are not derived from the Program,
 and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@
 access to copy the source code from the same place counts as
 distribution of the source code, even though third parties are not
 compelled to copy the source along with the object code.
-
+
   4. You may not copy, modify, sublicense, or distribute the Program
 except as expressly provided under this License.  Any attempt
 otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@
 
 This section is intended to make thoroughly clear what is believed to
 be a consequence of the rest of this License.
-
+
   8. If the distribution and/or use of the Program is restricted in
 certain countries either by patents or by copyrighted interfaces, the
 original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@
 of preserving the free status of all derivatives of our free software and
 of promoting the sharing and reuse of software generally.
 
-			    NO WARRANTY
+                            NO WARRANTY
 
   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
@@ -277,9 +277,9 @@
 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -303,10 +303,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 Also add information on how to contact you by electronic and paper mail.
 
@@ -336,5 +335,5 @@
 This General Public License does not permit incorporating your program into
 proprietary programs.  If your program is a subroutine library, you may
 consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
+library.  If this is what you want to do, use the GNU Lesser General
 Public License instead of this License.
--- a/changelog.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/changelog.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -1,33 +1,34 @@
+0.5.0 (2007-02-27)
+------------------------------------------------------------------------
+- Feature: Add the ability to load newer TTDP games (the tile information for coasts has changed) (r8738)
+- Feature: Selecting "end of orders" and deleting will delete all the vehicle's orders (shared mode unchanged) (r8685)
+- Codechange: Call GetFirstVehicleInChain only for trains thus increasing performance in large games (r8744)
+- Fix: Possible crashes, problems with aircraft and airport removal (r8921)
+- Fix: Do not show the 'edit sign' window for spectators (r8808)
+- Fix: Adhere order types for ship order insertion to determine destination type (r8802)
+- Fix: It was possible to take over buoys by building a station next to them (r8794)
+- Fix: Cloning unaware of articulated locomotives that could refit without refitting the front unit (r8777)
+- Fix: Loading times for overhanging trains are miscomputed (r8709)
+
+
 0.5.0-RC5 (2007-02-08)
 ------------------------------------------------------------------------
-- Feature: requery gameservers that did not respond to their first query (r8520, r8542)
-- Feature: check for NewGRF compatability before actually downloading the map from a game server when connecting from the command prompt and internal console (r8459, r8461)
-- Feature: logging of the IP address and port of invalid/illegal UDP packets (r8490)
+- Feature: Requery gameservers that did not respond to their first query (r8520, r8542)
+- Feature: Logging of the IP address and port of invalid/illegal UDP packets (r8490)
+- Codechange: Replace missing sprites with a red question mark (r8634)
 - Codechange: Add Korean, Simplified Chinese and Traditional Chinese languages as an official translation (r8286, r8324, r8616)
 - Codechange: Increase the size of the sound/video/music-drivers to 32 bytes (instead of 16) so their actual parameters can be passed. Sound has for example bufsize' and 'hz' (r8497)
 - Codechange: Be more strict about language generation and fail any languages not having the mandatory ##name, ##ownname and ##isocode pragma's (r8253)
-- Codechange: Rename the 'New <vehtype>' button of the global vehicle lists to 'Available <vehtype>' as it is a view-only list, not one from which you can purchase (rolling) stock. (r8420, r8421)
-- Codechange: replace missing sprites with a red question mark (8634)
-- Regression: Help window was empty for UNICODE builds (r8239)
-- Regression: When the latest news was deleted, the news queue wrapped back to the oldest item, showing all news again (r8409)
-- Regression: ShowLastNewsMessage could show an out-of-bounds news item because it did not checked if a previous item actually existed the first time it is called (forced news is INVALID_NEWS) [FS#573] (r8409)
-- Fix: deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared (r8294)
-- Fix: GenerateVehicleSortList()/CmdMassStartStopVehicle() tried to put a TileIndex into an uint16 (r8296)
-- Fix: [YAPF] Assert when buoy is placed on NE or NW map edge (r8540)
-- Fix: a road vehicle that is very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel (r8609)
+- Fix: Draw canal edges under buoys that are in a canal (r8635)
+- Fix: Buoys on canal tiles do not flood anymore (r8620)
+- Fix: Store the ownership of a water tile in the buoy tile and set the ownership of the water tile when the buoy is removed. Prevents certain abuses (r8619)
+- Fix: When the currently selected player in the performance details window is no longer active, choose the first active player instead of the first player as that may also be inactive  [FS#582] (r8612)
+- Fix: Road vehicle very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel (r8609)
+- Fix: Bridges do not get destroyed when the bridge head gets flooded and there is a vehicle on the bridge [FS#564] (r8593)
 - Fix: Road Vehicles now can obtain a slot even if the station is very spread out [FS#577] (r8536)
-- Fix: bridges do not get destroyed when the bridge head gets flooded and there is a vehicle on the bridge [FS#564] (r8593)
-- Fix: you were unable to build roads in the scenario editor when there is no town 0, even though there are other towns (r8608)
-- Fix: store the ownership of a water tile in the buoy tile and set the ownership of the water tile when the buoy is removed. This solves the issue of removing ownership from canal tiles thus making is possible for other players to remove the canal tile (r8619)
-- Fix: buoys on canal tiles do not flood anymore (r8620)
-- Fix: Put the output of -h to stdout and not to stderr (through ShowInfo) (r8240)
-- Fix: use ShowInfo over fprintf(stderr, as Windows doesn't always have a stderr visible/available (r8315)
-- Fix: return value from clamp was ignored (r8273)
-- Fix: When the currently selected player in the performance details window is no longer active, choose the first active player instead of the first player as that may also be inactive  [FS#582] (r8612)
-- Fix: segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar (r8533)
-- Fix: [OSX] freetype and fontconfig detection (r8500)
-- Fix: draw canal edges under buoys that are in a canal (8635)
-- Fix: CTRL-clicking on a hangar in the order list segfaulted as hangars are part of a station instead of real depots (8637)
+- Fix: Segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar (r8533)
+- Fix: Deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared (r8294)
+
 
 0.5.0-RC4 (2007-01-18)
 ------------------------------------------------------------------------
--- a/config.lib	Sat Mar 03 20:33:32 2007 +0000
+++ b/config.lib	Sun Mar 04 04:25:36 2007 +0000
@@ -671,6 +671,13 @@
 	if [ "$os" = "CYGWIN" ] || [ "$os" = "MINGW" ]; then
 		LDFLAGS="$LDFLAGS -Wl,--subsystem,windows"
 		LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
+		# GCC 4.0+ complains about that we break strict-aliasing.
+		#  On most places we don't see how to fix it, and it doesn't
+		#  break anything. So disable strict-aliasing to make the
+		#  compiler all happy.
+		if [ $cc_version -ge 40 ]; then
+			CFLAGS="$CFLAGS -fno-strict-aliasing"
+		fi
 	fi
 
 	if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ]; then
@@ -790,6 +797,12 @@
 
 	if [ "$with_direct_music" != "0" ]; then
 		CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT"
+		# GCC 4.0+ doesn't like the DirectX includes (gives tons of
+		#  warnings on it we won't be able to fix). For now just
+		#  suppress those warnings.
+		if [ $cc_version -ge 40 ]; then
+			CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
+		fi
 	fi
 
 	if [ -n "$libtimidity" ]; then
--- a/docs/landscape.html	Sat Mar 03 20:33:32 2007 +0000
+++ b/docs/landscape.html	Sun Mar 04 04:25:36 2007 +0000
@@ -11,339 +11,1164 @@
 <body>
 
  <h3><a name="Landscape">Landscape</a></h3>
- <p>Seven attributes (counting &quot;type_height&quot;) hold the informations about a tile.<BR>
+ <p>Seven attributes (counting &quot;<span style="font-weight: bold;">type_height</span>&quot;) hold the informations about a tile.<BR>
   These attributes are referred to as
   "<span style="font-weight: bold;">type_height</span>",
   "<span style="font-weight: bold;">m1</span>", "<span style="font-weight: bold;">m2</span>",
   "<span style="font-weight: bold;">m3</span>", "<span style="font-weight: bold;">m4</span>",
   "<span style="font-weight: bold;">m5</span>" and "<span style="font-weight: bold;">m6</span>".<BR>
   The most important value is the class of a tile, stored in the upper 4 bits
-  of the type_height array. The lower 4 bits are used to encode the height and
-  slope data.<BR>
+  of the <span style="font-weight: bold;">type_height</span> attribute. The lower 4 bits are used to encode the height and
+  slope data.
+ </p>
+
+ Special Attribute : <span style="font-weight: bold;">m6</span>. There are 4 bits of it that are used accross multiple tile classes<br>
+ <ul>
+  <li>
+   <a name = "bridge_direction">
+   Bits 7..6 :
+   <table border="1">
+    <tr bgcolor="#CCCCCC"><td colspan="2">Presence and direction of bridge above,<br>for tiles that support this.</td></tr>
+    <tr><td><tt>00</tt>&nbsp; </td><td>no bridge</td></tr>
+    <tr><td><tt>01</tt>&nbsp; </td><td>Axis X (North-East)</td></tr>
+    <tr><td><tt>02</tt>&nbsp; </td><td>Axis Y (South-West)</td></tr>
+   </table>
+  </li>
+  <li>
+   <a name = "tropic_zone">
+   Bits 1..0 :
+   <table border="1">
+    <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate.<br>It contains the definition of the two available zones</td></tr>
+    <tr><td><tt>00</tt>&nbsp; </td><td>invalid zone</td></tr>
+    <tr><td><tt>01</tt>&nbsp; </td><td>desert</td></tr>
+    <tr><td><tt>02</tt>&nbsp; </td><td>rain forest</td></tr>
+   </table>
+   In any other climate, those 2 bits are free of use.
+  </li>
+ </ul>
+ <p>
   For a graphical representation of the tile-layout have a look at
   <a href="landscape_grid.html">Landscape grid</a> page.
  </p>
 
- <p>The <a name="OwnershipInfo">owner of a tile</a>, as frequently associated with attribute m1,
+  The <a name="OwnershipInfo">owner of a tile</a>, as frequently associated with attribute m1,
   can be either players (human or AI) or "Game entities".
   They are identified using:
-  <table>
+  <table border="1">
    <tr><td><tt>00</tt>&nbsp; </td><td align=left>current player</td></tr>
    <tr><td><tt>01..08</tt>&nbsp; </td><td align=left>AI or network players</td></tr>
    <tr><td><tt>0F</tt>&nbsp; </td><td align=left>a town owns the tile</td></tr>
    <tr><td><tt>10</tt>&nbsp; </td><td align=left>nobody owns the tile</td></tr>
    <tr><td><tt>11</tt>&nbsp; </td><td align=left>"water" owns the tile</td></tr>
    <tr><td><tt>FF</tt>&nbsp; </td><td align=left>spectator in MP or in scenario editor</td></tr>
-  </table></p>
+  </table>
 
  <p>OTTD's class-specific periodic tile processing routine is called once every +256 ticks for each tile.</p>
 
  <table border=1 cellpadding=3>
-  <tr><th align=left>Class</th><th align=left>Meaning & details of encoding</th></tr>
-
+  <tr bgcolor="#0099FF">
+   <th align=left><font color="#FFFFFF">Class</font></th>
+   <th align=left><font color="#FFFFFF">Meaning & details of encoding</font></th>
+  </tr>
+  <tr bgcolor="#CCCCCC">
+   <td align=left><strong><a name="Class0"><tt> 0 </tt></a></strong></td>
+   <td align=left>&nbsp;<strong>Ground </strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class0"><tt> 0 </tt></a></td>
+   <td valign=top nowrap>&nbsp;</td>
    <td>
     <ul>
-     <li>m5 bits 4..0: tile type:
-      <table>
-       <tr><td nowrap valign=top><tt>00</tt>&nbsp; </td><td align=left>bare land</td></tr>
-       <tr><td nowrap valign=top><tt>01</tt>&nbsp; </td><td align=left>1/3 grass</td></tr>
-       <tr><td nowrap valign=top><tt>02</tt>&nbsp; </td><td align=left>2/3 grass</td></tr>
-       <tr><td nowrap valign=top><tt>03</tt>&nbsp; </td><td align=left>full grass</td></tr>
-       <tr><td nowrap valign=top><tt>07</tt>&nbsp; </td><td align=left>rough land</td></tr>
-       <tr><td nowrap valign=top><tt>0B</tt>&nbsp; </td><td align=left>rocks</td></tr>
-       <tr><td nowrap valign=top><tt>0F</tt>&nbsp; </td><td align=left>fields; type of fields in m3 bits 3..0 (legal values: 0 through 9)<br>
-            m2: Index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed</td></tr>
-       <tr><td nowrap valign=top><tt>10</tt>&nbsp; </td><td align=left>1/4 snow</td></tr>
-       <tr><td nowrap valign=top><tt>11</tt>&nbsp; </td><td align=left>2/4 snow</td></tr>
-       <tr><td nowrap valign=top><tt>12</tt>&nbsp; </td><td align=left>3/4 snow</td></tr>
-       <tr><td nowrap valign=top><tt>13</tt>&nbsp; </td><td align=left>full snow</td></tr>
-       <tr><td nowrap valign=top><tt>15</tt>&nbsp; </td><td align=left>partial desert</td></tr>
-       <tr><td nowrap valign=top><tt>17</tt>&nbsp; </td><td align=left>full desert</td></tr>
-      </table>
-     </li>
+     <li>m1: <a href="#OwnershipInfo">owner</a> of the tile (normally <tt>10</tt>)</li>
+     <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
+     <li>m4 bits 4..2: same as 7..5, but for the SE border</li>
      <li>m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
          other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<BR>
          on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).<BR>
-         For snow and desert, these bits are not used, tile is updated on every periodic processing.
+         For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
+     <li>m5 bits 4..0: tile type:
+      <table>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>&nbsp; </td>
+        <td align=left>bare land</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>01</tt>&nbsp; </td>
+        <td align=left>1/3 grass</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>02</tt>&nbsp; </td>
+        <td align=left>2/3 grass</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>03</tt>&nbsp; </td>
+        <td align=left>full grass</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>07</tt>&nbsp; </td>
+        <td align=left>rough land</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0B</tt>&nbsp; </td>
+        <td align=left>rocks</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0F</tt>&nbsp; </td>
+        <td align=left>fields; type of fields in m3 bits 3..0 (legal values: 0 through 9)<br>
+             m2: Index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>10</tt>&nbsp; </td>
+        <td align=left>1/4 snow</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>11</tt>&nbsp; </td>
+        <td align=left>2/4 snow</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>12</tt>&nbsp; </td>
+        <td align=left>3/4 snow</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>13</tt>&nbsp; </td>
+        <td align=left>full snow</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>15</tt>&nbsp; </td>
+        <td align=left>partial desert</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>17</tt>&nbsp; </td>
+        <td align=left>full desert</td>
+       </tr>
+      </table>
      </li>
-     <li>m1: <a href="#OwnershipInfo">owner</a> of the tile (normally <tt>10</tt>)</li>
-     <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none); bits 4..2: same for the SE border</li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class1"><tt> 1</tt></a></strong></td>
+   <td><strong>Railway tracks</strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class1"><tt> 1 </tt></a></td>
+   <td valign=top nowrap>&nbsp;</td>
    <td>
     <ul>
      <li>m5 bit 7 clear: railway track
       <ul>
-       <li>m5 bits 0..5: track layout: bit set = track present:
+       <li>m1: <a href="#OwnershipInfo">owner</a> of the track</li>
+       <li>m3 bits 3..0 = <a name="TrackType">track type</a>:
         <table>
-         <tr><td nowrap valign=top>bit 0: </td><td align=left>in the X direction</td></tr>
-         <tr><td nowrap valign=top>bit 1: </td><td align=left>in the Y direction</td></tr>
-         <tr><td nowrap valign=top>bit 2: </td><td align=left>in the north corner (direction W-E)</td></tr>
-         <tr><td nowrap valign=top>bit 3: </td><td align=left>in the south corner (direction W-E)</td></tr>
-         <tr><td nowrap valign=top>bit 4: </td><td align=left>in the west corner (direction N-S)</td></tr>
-         <tr><td nowrap valign=top>bit 5: </td><td align=left>in the east corner (direction N-S)</td></tr>
+         <tr>
+          <td><tt>0</tt>&nbsp; </td>
+          <td>conventional railway</td>
+         </tr>
+
+         <tr>
+          <td><tt>1</tt>&nbsp; </td>
+          <td>electrified railway</td>
+         </tr>
+
+         <tr>
+          <td><tt>2</tt>&nbsp; </td>
+          <td>monorail</td>
+         </tr>
+
+         <tr>
+          <td><tt>3</tt>&nbsp; </td>
+          <td>maglev</td>
+         </tr>
         </table>
        </li>
-       <li>m5 bit 6 set = with signals:
-        <ul>
-         <li>m3 bits 7..4: bit set = signal present:
-          <ul>
-           <li>For track in the X direction:
-            <table>
-             <tr><td nowrap valign=top>bit 6: </td><td align=left>signal in the SW direction</td></tr>
-             <tr><td nowrap valign=top>bit 7: </td><td align=left>signal in the NE direction</td></tr>
-            </table>
-           </li>
-           <li>For track in the Y direction:
-            <table>
-             <tr><td nowrap valign=top>bit 6: </td><td align=left>signal in the NW direction</td></tr>
-             <tr><td nowrap valign=top>bit 7: </td><td align=left>signal in the SE direction</td></tr>
-            </table>
-           </li>
-           <li>For tracks in the W-E direction:
-            <table>
-             <tr><td nowrap valign=top>bit 4: </td><td align=left>signal in the W direction on the track in the S corner</td></tr>
-             <tr><td nowrap valign=top>bit 5: </td><td align=left>signal in the E direction on the track in the S corner</td></tr>
-             <tr><td nowrap valign=top>bit 6: </td><td align=left>signal in the W direction on the track in the N corner</td></tr>
-             <tr><td nowrap valign=top>bit 7: </td><td align=left>signal in the E direction on the track in the N corner</td></tr>
-            </table>
-           </li>
-           <li>For tracks in the N-S direction:
-            <table>
-             <tr><td nowrap valign=top>bit 4: </td><td align=left>signal in the S direction on the track in the E corner</td></tr>
-             <tr><td nowrap valign=top>bit 5: </td><td align=left>signal in the N direction on the track in the E corner</td></tr>
-             <tr><td nowrap valign=top>bit 6: </td><td align=left>signal in the S direction on the track in the W corner</td></tr>
-             <tr><td nowrap valign=top>bit 7: </td><td align=left>signal in the N direction on the track in the W corner</td></tr>
-            </table>
-           </li>
-          </ul>
-         </li>
-         <li>m2 bits 7..4: bit clear = signal shows red; same bits as in m3</li>
-         <li>OpenTTD bits in m4:
-          <table>
-           <tr><td nowrap valign=top>bits 1..0: </td><td align=left>type of signal:</td></tr>
-           <tr><td nowrap valign=top><tt>00</tt>: </td><td align=left>normal signals</td></tr>
-           <tr><td nowrap valign=top><tt>01</tt>: </td><td align=left>pre-signals</td></tr>
-           <tr><td nowrap valign=top><tt>10</tt>: </td><td align=left>exit-signals</td></tr>
-           <tr><td nowrap valign=top><tt>11</tt>: </td><td align=left>combo-signals</td></tr>
-           <tr><td nowrap valign=top>bit 2: </td><td align=left>set = semaphore signals, clear = light signals</td></tr>
-          </table>
-         </li>
-        </ul>
-       </li>
-       <li>m1: <a href="#OwnershipInfo">owner</a> of the track</li>
-       <li>m2 bits 0..3:
+       <li>m4 bits 3..0:
         <table>
-         <tr><td nowrap valign=top><tt>0</tt>&nbsp; </td><td align=left>on bare land</td></tr>
-         <tr><td nowrap valign=top><tt>1</tt>&nbsp; </td><td align=left>on grass, no fences</td></tr>
-         <tr><td nowrap valign=top><tt>2</tt>&nbsp; </td><td align=left>fence on the NW side</td></tr>
-         <tr><td nowrap valign=top><tt>3</tt>&nbsp; </td><td align=left>fence on the SE side</td></tr>
-         <tr><td nowrap valign=top><tt>4</tt>&nbsp; </td><td align=left>fences on the NW and SE sides</td></tr>
-         <tr><td nowrap valign=top><tt>5</tt>&nbsp; </td><td align=left>fence on the NE side</td></tr>
-         <tr><td nowrap valign=top><tt>6</tt>&nbsp; </td><td align=left>fence on the SW side</td></tr>
-         <tr><td nowrap valign=top><tt>7</tt>&nbsp; </td><td align=left>fences on the NE and SW sides</td></tr>
-         <tr><td nowrap valign=top><tt>8</tt>&nbsp; </td><td align=left>fence on the E side (track in the W corner)</td></tr>
-         <tr><td nowrap valign=top><tt>9</tt>&nbsp; </td><td align=left>fence on the W side (track in the E corner)</td></tr>
-         <tr><td nowrap valign=top><tt>A</tt>&nbsp; </td><td align=left>fence on the S side (track in the N corner)</td></tr>
-         <tr><td nowrap valign=top><tt>B</tt>&nbsp; </td><td align=left>fence on the N side (track in the S corner)</td></tr>
-         <tr><td nowrap valign=top><tt>C</tt>&nbsp; </td><td align=left>on snow or desert</td></tr>
+         <tr>
+          <td nowrap valign=top><tt>0</tt>&nbsp; </td>
+          <td align=left>on bare land</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>1</tt>&nbsp; </td>
+          <td align=left>on grass, no fences</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>2</tt>&nbsp; </td>
+          <td align=left>fence on the NW side</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>3</tt>&nbsp; </td>
+          <td align=left>fence on the SE side</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>4</tt>&nbsp; </td>
+          <td align=left>fences on the NW and SE sides</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>5</tt>&nbsp; </td>
+          <td align=left>fence on the NE side</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>6</tt>&nbsp; </td>
+          <td align=left>fence on the SW side</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>7</tt>&nbsp; </td>
+          <td align=left>fences on the NE and SW sides</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>8</tt>&nbsp; </td>
+          <td align=left>fence on the E side (track in the W corner)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>9</tt>&nbsp; </td>
+          <td align=left>fence on the W side (track in the E corner)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>A</tt>&nbsp; </td>
+          <td align=left>fence on the S side (track in the N corner)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>B</tt>&nbsp; </td>
+          <td align=left>fence on the N side (track in the S corner)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>C</tt>&nbsp; </td>
+          <td align=left>on snow or desert</td>
+         </tr>
         </table>
        </li>
-       <li>m3 bits 0..3 = <a name="TrackType">track type</a>:
+       <li>m5 bits 5..0: track layout: bit set = track present:
         <table>
-         <tr><td><tt>0</tt>&nbsp; </td><td>conventional railway</td></tr>
-         <tr><td><tt>1</tt>&nbsp; </td><td>electrified railway</td></tr>
-         <tr><td><tt>2</tt>&nbsp; </td><td>monorail</td></tr>
-         <tr><td><tt>3</tt>&nbsp; </td><td>maglev</td></tr>
+         <tr>
+          <td nowrap valign=top>bit 0: </td>
+          <td align=left>in the X direction</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top>bit 1: </td>
+          <td align=left>in the Y direction</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top>bit 2: </td>
+          <td align=left>in the north corner (direction W-E)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top>bit 3: </td>
+          <td align=left>in the south corner (direction W-E)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top>bit 4: </td>
+          <td align=left>in the west corner (direction N-S)</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top>bit 5: </td>
+          <td align=left>in the east corner (direction N-S)</td>
+         </tr>
         </table>
        </li>
       </ul>
      </li>
-     <li>m5 bits 7 and 6 set: railway depot / checkpoints
+     <li>m5 bit 7 set: railway depot / checkpoints
       <ul>
+       <li>m1: <a href="#OwnershipInfo">owner</a> of the depot / checkpoint</li>
+       <li>m2: For waypoints, index into the array of waypoints.</li>
+       <li>m3 bits 3..0 = <a href="#TrackType">track type</a></li>
+       <li>m4 bits 3..0 = ground type, as per m4 bits 3..0 for railway tiles.</li>
        <li>m5 value C0..C3: railway depot
         <table>
-         <tr><td colspan=2>m5 bits 1..0</td></tr>
-         <tr><td colspan=2>direction: exit towards:</td></tr>
-         <tr><td><tt>00</tt>&nbsp; </td><td>NE</td></tr>
-         <tr><td><tt>01</tt>&nbsp; </td><td>SE</td></tr>
-         <tr><td><tt>02</tt>&nbsp; </td><td>SW</td></tr>
-         <tr><td><tt>03</tt>&nbsp; </td><td>NW</td></tr>
+         <tr>
+          <td colspan=2>m5 bits 1..0</td>
+         </tr>
+
+         <tr>
+          <td colspan=2>direction: exit towards:</td>
+         </tr>
+
+         <tr>
+          <td><tt>00</tt>&nbsp; </td>
+          <td>NE</td>
+         </tr>
+
+         <tr>
+          <td><tt>01</tt>&nbsp; </td>
+          <td>SE</td>
+         </tr>
+
+         <tr>
+          <td><tt>02</tt>&nbsp; </td>
+          <td>SW</td>
+         </tr>
+
+         <tr>
+          <td><tt>03</tt>&nbsp; </td>
+          <td>NW</td>
+         </tr>
         </table>
        </li>
-       <li>m5 value C4..C5: checkpoint
+       <li>m5 value 80..81: checkpoint
         <table>
-         <tr><td colspan=2>bit 0</td></tr>
-         <tr><td>clear</td><td>in X direction</td></tr>
-         <tr><td>set</td><td>in Y direction</td></tr>
+         <tr>
+          <td colspan=2>bit 0</td>
+         </tr>
+
+         <tr>
+          <td>clear</td>
+          <td>in X direction</td>
+         </tr>
+
+         <tr>
+          <td>set</td>
+          <td>in Y direction</td>
+         </tr>
         </table>
        </li>
-       <li>m1: <a href="#OwnershipInfo">owner</a> of the depot / checkpoint</li>
-       <li>m2: For waypoints, index into the array of waypoints.</li>
-       <li>m3 bits 0..3 = <a href="#TrackType">track type</a></li>
-       <li>m4 bits 0..3 = ground type, as per m2 bits 0..3 for railway tiles.</li>
+      </ul>
+    </li>
+    <li>m5 bit 6 set = with signals:
+     <ul>
+      <li>m2 bits 7..4: bit clear = signal shows red; same bits as in m3</li>
+      <li>m2 bit 2: set = semaphore signals, clear = light signals </li>
+      <li>m2 bits 1..0 : type of signal
+       <table>
+         <tr>
+          <td nowrap="nowrap" valign="top"><tt>00</tt>: </td>
+          <td align="left">normal signals</td>
+         </tr>
+
+         <tr>
+          <td nowrap="nowrap" valign="top"><tt>01</tt>: </td>
+          <td align="left">pre-signals</td>
+         </tr>
+
+         <tr>
+          <td nowrap="nowrap" valign="top"><tt>10</tt>: </td>
+          <td align="left">exit-signals</td>
+         </tr>
+
+         <tr>
+          <td nowrap="nowrap" valign="top"><tt>11</tt>: </td>
+          <td align="left">combo-signals</td>
+         </tr>
+        </table>
+       </li>
+
+       <li>m3 bits 7..4: bit set = signal present:
+        <ul>
+         <li>For track in the X direction:
+          <table>
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 6: </td>
+            <td align="left">signal in the SW direction</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 7: </td>
+            <td align="left">signal in the NE direction</td>
+           </tr>
+          </table>
+         </li>
+
+         <li>For track in the Y direction:
+          <table>
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 6: </td>
+            <td align="left">signal in the NW direction</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 7: </td>
+            <td align="left">signal in the SE direction</td>
+           </tr>
+          </table>
+         </li>
+
+         <li>For tracks in the W-E direction:
+          <table>
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 4: </td>
+            <td align="left">signal in the W direction on the track in the S corner</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 5: </td>
+            <td align="left">signal in the E direction on the track in the S corner</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 6: </td>
+            <td align="left">signal in the W direction on the track in the N corner</td>
+           </tr>
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 7: </td>
+            <td align="left">signal in the E direction on the track in the N corner</td>
+           </tr>
+          </table>
+         </li>
+
+         <li>For tracks in the N-S direction:
+          <table>
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 4: </td>
+            <td align="left">signal in the S direction on the track in the E corner</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 5: </td>
+            <td align="left">signal in the N direction on the track in the E corner</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 6: </td>
+            <td align="left">signal in the S direction on the track in the W corner</td>
+           </tr>
+
+           <tr>
+            <td nowrap="nowrap" valign="top">bit 7: </td>
+            <td align="left">signal in the N direction on the track in the W corner</td>
+           </tr>
+          </table>
+         </li>
+        </ul>
+       </li>
       </ul>
      </li>
-    </ul>
-   </td>
-  </tr>
-
-  <tr>
-   <td valign=top nowrap><a name="Class2"><tt> 2 </tt></a></td>
-   <td>
-   <ul>
-    <li>m5 bits 7..4 clear: road
-     <ul>
-      <li>m5 bits 3..0: road layout: bit set = road piece present:
-       <table>
-        <tr><td nowrap valign=top>bit 0: </td><td align=left>NW piece</td></tr>
-        <tr><td nowrap valign=top>bit 1: </td><td align=left>SW piece</td></tr>
-        <tr><td nowrap valign=top>bit 2: </td><td align=left>SE piece</td></tr>
-        <tr><td nowrap valign=top>bit 3: </td><td align=left>NE piece</td></tr>
-       </table>
-      </li>
-      <li>m1: <a href="#OwnershipInfo">owner</a> of the road</li>
-      <li>m2: Index into the array of towns, 0 for non-town roads</li>
-      <li>m4 bits 0..3: counter for the roadworks</li>
-      <li>m4 bits 4..6:
-       <table>
-        <tr><td><tt>0</tt>&nbsp; </td><td>on bare land</td></tr>
-        <tr><td><tt>1</tt>&nbsp; </td><td>on grass</td></tr>
-        <tr><td><tt>2</tt>&nbsp; </td><td>paved</td></tr>
-        <tr><td><tt>3</tt>&nbsp; </td><td>with streetlights</td></tr>
-        <tr><td><tt>5</tt>&nbsp; </td><td>tree-lined</td></tr>
-        <tr><td><tt>6</tt>&nbsp; </td><td>on grass with road works</td></tr>
-        <tr><td><tt>7</tt>&nbsp; </td><td>paved with road works</td></tr>
-       </table>
-      </li>
-      <li>m4 bit 7 set = on snow or desert</li>
-     </ul>
-    </li>
-    <li>m5 bit 4 set, bits 7..5 clear: level crossing
-     <ul>
-      <li>m5 bit 3: clear - road in the X direction, set - road in the Y direction (railway track always perpendicular)</li>
-      <li>m5 bit 2: set if crossing lights are on</li>
-      <li>m1: <a href="#OwnershipInfo">owner</a> of the railway track</li>
-      <li>m2: Index into the array of towns, 0 for non-town roads</li>
-      <li>m3 bits 0..7: <a href="#OwnershipInfo">owner</a> of the road</li>
-      <li>m4 bits 3..0: <a href="#TrackType">track type</a></li>
-      <li>m4 bits 4..6: <tt>0</tt> - on bare land, <tt>1</tt> - on grass, <tt>2</tt> or higher - paved</li>
-      <li>m4 bit 7 set = on snow or desert</li>
-     </ul>
-    </li>
-    <li>m5 bit 5 set: road depot
-      <ul>
-       <li>m5 bits 3..0 - direction: exit towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
-       <li>m1: <a href="#OwnershipInfo">owner</a> of the depot</li>
-       <li>m4 bit 7 set = on snow or desert (not displayed, but set internally)</li>
-      </ul>
-     </li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class2"><tt> 2</tt></a></strong></td>
+   <td><strong>Roads</strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class3"><tt> 3 </tt></a></td>
-   <td>Town building
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
+    <ul>
+     <li>m5 bits 7..4 clear: road
+      <ul>
+       <li>m1: <a href="#OwnershipInfo">owner</a> of the road</li>
+       <li>m2: Index into the array of towns, 0 for non-town roads</li>
+       <li>m3 bit 7 set = on snow or desert</li>
+       <li>m3 bits 6..4:
+        <table>
+         <tr>
+          <td><tt>0</tt>&nbsp; </td>
+          <td>on bare land</td>
+         </tr>
+         <tr>
+          <td><tt>1</tt>&nbsp; </td>
+          <td>on grass</td>
+         </tr>
+         <tr>
+          <td><tt>2</tt>&nbsp; </td>
+          <td>paved</td>
+         </tr>
+         <tr>
+          <td><tt>3</tt>&nbsp; </td>
+          <td>with streetlights</td>
+         </tr>
+         <tr>
+          <td><tt>5</tt>&nbsp; </td>
+          <td>tree-lined</td>
+         </tr>
+         <tr>
+          <td><tt>6</tt>&nbsp; </td>
+          <td>on grass with road works</td>
+         </tr>
+         <tr>
+          <td><tt>7</tt>&nbsp; </td>
+          <td>paved with road works</td>
+         </tr>
+        </table>
+       </li>
+       <li>m3 bits 3..0: counter for the roadworks</li>
+       <li>m5 bits 3..0: road layout: bit set = road piece present:
+        <table>
+         <tr>
+          <td nowrap valign=top>bit 0: </td>
+          <td align=left>NW piece</td>
+         </tr>
+         <tr>
+          <td nowrap valign=top>bit 1: </td>
+          <td align=left>SW piece</td>
+         </tr>
+         <tr>
+          <td nowrap valign=top>bit 2: </td>
+          <td align=left>SE piece</td>
+         </tr>
+         <tr>
+          <td nowrap valign=top>bit 3: </td>
+          <td align=left>NE piece</td>
+         </tr>
+        </table>
+       </li>
+      </ul>
+     </li>
+     <li>m5 bit 5 set: road depot
+      <ul>
+       <li>m1: <a href="#OwnershipInfo">owner</a> of the depot</li>
+       <li>m3 bit 7 set = on snow or desert (not displayed, but set internally)</li>
+       <li>m5 bits 3..0 - direction: exit towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
+      </ul>
+     </li>
+     <li>m5 bit 4 set, bits 7..5 clear: level crossing
+      <ul>
+       <li>m1: <a href="#OwnershipInfo">owner</a> of the railway track</li>
+       <li>m2: Index into the array of towns, 0 for non-town roads</li>
+       <li>m3 bit 7 set = on snow or desert</li>
+       <li>m3 bits 6..4: <tt>0</tt> - on bare land, <tt>1</tt> - on grass, <tt>2</tt> or higher - paved</li>
+       <li>m3 bits 3..0: <a href="#TrackType">track type</a></li>
+       <li>m4: <a href="#OwnershipInfo">owner</a> of the road</li>
+       <li>m5 bit 3: clear - road in the X direction, set - road in the Y direction (railway track always perpendicular)</li>
+       <li>m5 bit 2: set if crossing lights are on</li>
+      </ul>
+     </li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
+    </ul>
+   </td>
+  </tr>
+
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class3"><tt> 3</tt></a></strong></td>
+   <td><strong>Town building </strong></td>
+  </tr>
+  <tr>
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
     <ul>
      <li>m2: Index into the array of towns</li>
+     <li>m3 bits 7..6: stage of construction (<tt>3</tt> = completed)</li>
      <li>m4: <a name="HouseTypes">town building type</a>:<br>
       <small>Note: In the climate list, 'sub-arctic' means below the snow line, and 'snow' means above the snow line in the sub-arctic climate.</small>
       <table>
-       <tr><th align=left>Type&nbsp;</th><th align=left>Size&nbsp;</th><th align=left>Climates&nbsp;</th><th align=left>Description</th></tr>
-       <tr><td nowrap valign=top><tt>00</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>01</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>office block</td></tr>
-       <tr><td nowrap valign=top><tt>02</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>small block of flats</td></tr>
-       <tr><td nowrap valign=top><tt>03</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>church</td></tr>
-       <tr><td nowrap valign=top><tt>04</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-arctic, sub-tropical</td><td align=left>large office block</td></tr>
-       <tr><td nowrap valign=top><tt>05</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>large office block</td></tr>
-       <tr><td nowrap valign=top><tt>06</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>town houses</td></tr>
-       <tr><td nowrap valign=top><tt>07</tt>..<tt>08</tt>&nbsp; </td><td>1&times;2</td><td>temperate</td><td align=left>hotel</td></tr>
-       <tr><td nowrap valign=top><tt>09</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-arctic, sub-tropical&nbsp;&nbsp;</td><td align=left>statue</td></tr>
-       <tr><td nowrap valign=top><tt>0A</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-arctic, sub-tropical</td><td align=left>fountain</td></tr>
-       <tr><td nowrap valign=top><tt>0B</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>park (with a pond)</td></tr>
-       <tr><td nowrap valign=top><tt>0C</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>park (with an alley)</td></tr>
-       <tr><td nowrap valign=top><tt>0D</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>office block</td></tr>
-       <tr><td nowrap valign=top><tt>0E</tt>..<tt>10</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>various types of shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>11</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-arctic, sub-tropical</td><td align=left>modern office building</td></tr>
-       <tr><td nowrap valign=top><tt>12</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>warehouse</td></tr>
-       <tr><td nowrap valign=top><tt>13</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>office block (with spiral stairway on the side)</td></tr>
-       <tr><td nowrap valign=top><tt>14</tt>..<tt>17</tt>&nbsp; </td><td>2&times;2</td><td>temperate</td><td align=left>stadium</td></tr>
-       <tr><td nowrap valign=top><tt>18</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>old houses</td></tr>
-       <tr><td nowrap valign=top><tt>19</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>cottages</td></tr>
-       <tr><td nowrap valign=top><tt>1A</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>1B</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>1C</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>1D</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>1E</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-tropical</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>1F</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>theatre</td></tr>
-       <tr><td nowrap valign=top><tt>20</tt>..<tt>23</tt>&nbsp; </td><td>2&times;2</td><td>temperate, sub-arctic, sub-tropical</td><td align=left>stadium (modern style)</td></tr>
-       <tr><td nowrap valign=top><tt>24</tt>&nbsp; </td><td>1&times;1</td><td>temperate, sub-arctic, sub-tropical</td><td align=left>offices (the modern 'vertical tube' style)</td></tr>
-       <tr><td nowrap valign=top><tt>25</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>26</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>27</tt>&nbsp; </td><td>1&times;1</td><td>temperate</td><td align=left>cinema</td></tr>
-       <tr><td nowrap valign=top><tt>28</tt>..<tt>2B</tt>&nbsp; </td><td>2&times;2</td><td>temperate</td><td align=left>shopping mall</td></tr>
-       <tr><td nowrap valign=top><tt>2C</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>2D</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>2E</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>2F</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>30</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>31</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>32</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic, sub-tropical</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>33</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>34</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>35</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>36</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic, sub-tropical</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>37</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>38</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>39</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>3A</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>3B</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>3C</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>church</td></tr>
-       <tr><td nowrap valign=top><tt>3D</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>church</td></tr>
-       <tr><td nowrap valign=top><tt>3E</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>3F</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>40</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>41</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>42</tt>..<tt>43</tt>&nbsp; </td><td>1&times;2</td><td>sub-arctic</td><td align=left>hotel</td></tr>
-       <tr><td nowrap valign=top><tt>44</tt>..<tt>45</tt>&nbsp; </td><td>1&times;2</td><td>snow</td><td align=left>hotel</td></tr>
-       <tr><td nowrap valign=top><tt>46</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic, sub-tropical</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>47</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>48</tt>&nbsp; </td><td>1&times;1</td><td>sub-arctic</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>49</tt>&nbsp; </td><td>1&times;1</td><td>snow</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>4A</tt>..<tt>4B</tt>&nbsp; </td><td>2&times;1</td><td>sub-arctic</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>4C</tt>..<tt>4D</tt>&nbsp; </td><td>2&times;1</td><td>snow</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>4E</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>houses (with a tree in a corner)</td></tr>
-       <tr><td nowrap valign=top><tt>4F</tt>, <tt>50</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>houses</td></tr>
-       <tr><td nowrap valign=top><tt>51</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>houses (suburb-type)</td></tr>
-       <tr><td nowrap valign=top><tt>52</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>53</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>church</td></tr>
-       <tr><td nowrap valign=top><tt>54</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>houses (with two trees in front)</td></tr>
-       <tr><td nowrap valign=top><tt>55</tt>, <tt>56</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>57</tt>..<tt>58</tt>&nbsp; </td><td>2&times;1</td><td>sub-tropical</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>59</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>flats</td></tr>
-       <tr><td nowrap valign=top><tt>5A</tt>&nbsp; </td><td>1&times;1</td><td>sub-tropical</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>5B</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>church</td></tr>
-       <tr><td nowrap valign=top><tt>5C</tt>..<tt>61</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>various types of toyland houses</td></tr>
-       <tr><td nowrap valign=top><tt>62</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>63</tt>..<tt>64</tt>&nbsp; </td><td>1&times;2</td><td>toyland</td><td align=left>houses ('shoe' style)</td></tr>
-       <tr><td nowrap valign=top><tt>65</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>66</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>igloo</td></tr>
-       <tr><td nowrap valign=top><tt>67</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>tepees</td></tr>
-       <tr><td nowrap valign=top><tt>68</tt>, <tt>69</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>shops and offices</td></tr>
-       <tr><td nowrap valign=top><tt>6A</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>tall office block</td></tr>
-       <tr><td nowrap valign=top><tt>6B</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>statue</td></tr>
-       <tr><td nowrap valign=top><tt>6C</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>teapot-house</td></tr>
-       <tr><td nowrap valign=top><tt>6D</tt>&nbsp; </td><td>1&times;1</td><td>toyland</td><td align=left>piggy-bank</td></tr>
+       <tr>
+        <th align=left>Type&nbsp;</th>
+        <th align=left>Size&nbsp;</th>
+        <th align=left>Climates&nbsp;</th>
+        <th align=left>Description</th>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>00</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>01</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>02</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>small block of flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>03</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>church</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>04</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-arctic, sub-tropical</td>
+        <td align=left>large office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>05</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>large office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>06</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>town houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>07</tt>..<tt>08</tt>&nbsp; </td>
+        <td>1&times;2</td>
+        <td>temperate</td>
+        <td align=left>hotel</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>09</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-arctic, sub-tropical&nbsp;&nbsp;</td>
+        <td align=left>statue</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0A</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-arctic, sub-tropical</td>
+        <td align=left>fountain</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0B</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>park (with a pond)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0C</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>park (with an alley)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0D</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0E</tt>..<tt>10</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>various types of shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>11</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-arctic, sub-tropical</td>
+        <td align=left>modern office building</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>12</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>warehouse</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>13</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>office block (with spiral stairway on the side)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>14</tt>..<tt>17</tt>&nbsp; </td>
+        <td>2&times;2</td>
+        <td>temperate</td>
+        <td align=left>stadium</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>18</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>old houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>19</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>cottages</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1A</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1B</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1C</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1D</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1E</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-tropical</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1F</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>theatre</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>20</tt>..<tt>23</tt>&nbsp; </td>
+        <td>2&times;2</td>
+        <td>temperate, sub-arctic, sub-tropical</td>
+        <td align=left>stadium (modern style)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>24</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate, sub-arctic, sub-tropical</td>
+        <td align=left>offices (the modern 'vertical tube' style)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>25</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>26</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>27</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>temperate</td>
+        <td align=left>cinema</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>28</tt>..<tt>2B</tt>&nbsp; </td>
+        <td>2&times;2</td>
+        <td>temperate</td>
+        <td align=left>shopping mall</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2C</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2D</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2E</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2F</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>30</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>31</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>32</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic, sub-tropical</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>33</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>34</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>35</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>36</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic, sub-tropical</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>37</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>38</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>39</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3A</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3B</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3C</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>church</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3D</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>church</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3E</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3F</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>40</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>41</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>42</tt>..<tt>43</tt>&nbsp; </td>
+        <td>1&times;2</td>
+        <td>sub-arctic</td>
+        <td align=left>hotel</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>44</tt>..<tt>45</tt>&nbsp; </td>
+        <td>1&times;2</td>
+        <td>snow</td>
+        <td align=left>hotel</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>46</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic, sub-tropical</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>47</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>48</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>49</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>snow</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4A</tt>..<tt>4B</tt>&nbsp; </td>
+        <td>2&times;1</td>
+        <td>sub-arctic</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4C</tt>..<tt>4D</tt>&nbsp; </td>
+        <td>2&times;1</td>
+        <td>snow</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4E</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>houses (with a tree in a corner)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4F</tt>, <tt>50</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>51</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>houses (suburb-type)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>52</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>53</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>church</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>54</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>houses (with two trees in front)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>55</tt>, <tt>56</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>57</tt>..<tt>58</tt>&nbsp; </td>
+        <td>2&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>59</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>flats</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>5A</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>sub-tropical</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>5B</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>church</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>5C</tt>..<tt>61</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>various types of toyland houses</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>62</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>63</tt>..<tt>64</tt>&nbsp; </td>
+        <td>1&times;2</td>
+        <td>toyland</td>
+        <td align=left>houses ('shoe' style)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>65</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>66</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>igloo</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>67</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>tepees</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>68</tt>, <tt>69</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>shops and offices</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>6A</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>tall office block</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>6B</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>statue</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>6C</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>teapot-house</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>6D</tt>&nbsp; </td>
+        <td>1&times;1</td>
+        <td>toyland</td>
+        <td align=left>piggy-bank</td>
+       </tr>
       </table>
      </li>
-     <li>m3 bits 7..6: stage of construction (<tt>3</tt> = completed)</li>
      <li>m5 bits 2..0: construction counter, for buildings under construction incremented on every periodic tile processing<br>
          On wraparound the stage of construction in m3 is increased
      </li>
@@ -356,71 +1181,179 @@
            One 'normal' floor has a height of 6 lift positions.</li>
       </ul>
      </li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class4"><tt> 4 </tt></a></strong></td>
+   <td><strong>Trees </strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class4"><tt> 4 </tt></a></td>
-   <td>Trees
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
     <ul>
-     <li>m5 bits 7..6: number of trees minus one</li>
-     <li>m5 bits 2..0: growth status: <tt>0</tt>..<tt>2</tt> - one of trees is growing, <tt>3</tt> - all trees are fully grown, <tt>4</tt>..<tt>6</tt> - one of trees is withering</li>
+     <li>m1: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
+     <li>m2 bits 5..4:
+      <table>
+
+       <tr>
+        <td nowrap valign=top><tt>0</tt>&nbsp; </td>
+        <td align=left>on grass</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1</tt>&nbsp; </td>
+        <td align=left>on rough land</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2</tt>&nbsp; </td>
+        <td align=left>on snow or desert; m2 bits 7..6 - amount of snow or desert (for desert always set to 3 in TTD)</td>
+       </tr>
+      </table>
+     </li>
+     <li>m2 bits 3..0: update counter, incremented on every periodic processing.<br>
+          on wraparound the growth status is updated (or, if it's <tt>3</tt>, a random action is taken)</li>
      <li>m3 bits 7..0: type of trees:
       <table>
-       <tr><td nowrap valign=top><tt>00</tt>..<tt>0B</tt>&nbsp; </td><td align=left>temperate climate trees</td></tr>
-       <tr><td nowrap valign=top><tt>0C</tt>..<tt>13</tt>&nbsp; </td><td align=left>sub-arctic climate trees</td></tr>
-       <tr><td nowrap valign=top><tt>14</tt>..<tt>1A</tt>&nbsp; </td><td align=left>rainforest trees</td></tr>
-       <tr><td nowrap valign=top><tt>1B</tt> </td><td align=left>cactus plants</td></tr>
-       <tr><td nowrap valign=top><tt>1C</tt>..<tt>1F</tt>&nbsp; </td><td align=left>sub-tropical climate, non-rainforest, non-desert trees</td></tr>
-       <tr><td nowrap valign=top><tt>20</tt>..<tt>28</tt>&nbsp; </td><td align=left>toyland trees</td></tr>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>..<tt>0B</tt>&nbsp; </td>
+        <td align=left>temperate climate trees</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0C</tt>..<tt>13</tt>&nbsp; </td>
+        <td align=left>sub-arctic climate trees</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>14</tt>..<tt>1A</tt>&nbsp; </td>
+        <td align=left>rainforest trees</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1B</tt> </td>
+        <td align=left>cactus plants</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1C</tt>..<tt>1F</tt>&nbsp; </td>
+        <td align=left>sub-tropical climate, non-rainforest, non-desert trees</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>20</tt>..<tt>28</tt>&nbsp; </td>
+        <td align=left>toyland trees</td>
+       </tr>
       </table>
       <small>Note: the actually displayed set of trees depends on both type and number of trees</small>
      </li>
      <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
      <li>m4 bits 4..2: type of hedge on the SE border of the tile (1 through 6, or 0=none)</li>
-     <li>m2 bits 5..4:
-      <table>
-       <tr><td nowrap valign=top><tt>0</tt>&nbsp; </td><td align=left>on grass</td></tr>
-       <tr><td nowrap valign=top><tt>1</tt>&nbsp; </td><td align=left>on rough land</td></tr>
-       <tr><td nowrap valign=top><tt>2</tt>&nbsp; </td><td align=left>on snow or desert; m2 bits 7..6 - amount of snow or desert (for desert always set to 3 in TTD)</td></tr>
+     <li>m5 bits 7..6: number of trees minus one</li>
+     <li>m5 bits 2..0: growth status:
+      <table border="0">
+       <tr>
+        <td><tt>0</tt>..<tt>2</tt>&nbsp;</td>
+        <td>one of trees is growing&nbsp;</td>
+       </tr>
+       <tr>
+        <td><tt>3</tt>&nbsp;</td>
+        <td>all trees are fully grown&nbsp;</td>
+       </tr>
+       <tr>
+        <td><tt>4</tt>..<tt>6</tt>&nbsp;</td>
+        <td>one of trees is withering&nbsp;</td>
+       </tr>
       </table>
      </li>
-     <li>m2 bits 3..0: update counter, incremented on every periodic processing.<br>
-         on wraparound the growth status is updated (or, if it's <tt>3</tt>, a random action is taken)</li>
-     <li>m1: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
- <tr>
-  <td valign=top nowrap><a name="Class5"><tt> 5 </tt></a></td>
-  <td>Station tile
-   <ul>
-    <li>m5: tile type:
-     <table>
-      <tr>
-       <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td><td align=left>railway station
-        <table>
-         <tr><td><tt>00</tt>..<tt>01</tt>&nbsp; </td><td align=left>open platform</td></tr>
-         <tr><td><tt>02</tt>..<tt>03</tt>&nbsp; </td><td align=left>open platform with station building</td></tr>
-         <tr><td><tt>04</tt>....<tt>07</tt>&nbsp; </td><td align=left>roofed platform</td></tr>
-         <tr><td colspan=2>bit 0: clear = in X direction, set = in Y direction</td></tr>
-        </table>
-       </td>
-      </tr>
-      <tr><td nowrap valign=top><tt>08</tt>..<tt>33</tt>&nbsp; </td><td align=left>large airport
-       <table>
-        <tr><td nowrap valign=top><tt>0B</tt>&nbsp; </td><td align=left>pad 1</td></tr>
-        <tr><td nowrap valign=top><tt>16</tt>..<tt>19</tt>&nbsp; </td><td align=left>runway middle</td></tr>
-        <tr><td nowrap valign=top><tt>1A</tt>&nbsp; </td><td align=left>runway ending</td></tr>
-        <tr><td nowrap valign=top><tt>1C</tt>&nbsp; </td><td align=left>control tower</td></tr>
-        <tr><td nowrap valign=top><tt>20</tt>&nbsp; </td><td align=left>hangar</td></tr>
-        <tr><td nowrap valign=top><tt>21</tt>&nbsp; </td><td align=left>pad 3</td></tr>
-        <tr><td nowrap valign=top><tt>22</tt>&nbsp; </td><td align=left>pad 2</td></tr>
-        <tr><td nowrap valign=top><tt>27</tt>..<tt>32</tt>&nbsp; </td><td align=left>radar (animated)</td></tr>
-        <tr><td nowrap valign=top><tt>33</tt>&nbsp; </td><td align=left>transmitter</td></tr>
-        <tr><td colspan=2>The initial layout of a large airport is (rows in Y direction, columns in X direction):
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class5"><tt> 5</tt></a></strong></td>
+   <td><strong>Station tiles</strong></td>
+  </tr>
+  <tr>
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
+    <ul>
+     <li>m1: <a href="#OwnershipInfo">owner</a> of the station</li>
+     <li>m2: index into the array of stations</li>
+     <li>m3 bits 7..4: persistent random data for newstations</li>
+     <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway stations, must be 0 for all the other stations</li>
+     <li>m4: custom station id; 0 means standard graphics</li>
+     <li>m5: tile type:
+      <table>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td>
+        <td align=left>railway station
+         <table>
+          <tr>
+           <td><tt>00</tt>..<tt>01</tt>&nbsp; </td>
+           <td align=left>open platform</td>
+          </tr>
+          <tr>
+           <td><tt>02</tt>..<tt>03</tt>&nbsp; </td>
+           <td align=left>open platform with station building</td>
+          </tr>
+          <tr>
+           <td><tt>04</tt>....<tt>07</tt>&nbsp; </td>
+           <td align=left>roofed platform</td>
+          </tr>
+          <tr>
+           <td colspan=2>bit 0: clear = in X direction, set = in Y direction</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>08</tt>..<tt>33</tt>&nbsp; </td>
+        <td align=left>large airport
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>0B</tt>&nbsp; </td>
+           <td align=left>pad 1</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>16</tt>..<tt>19</tt>&nbsp; </td>
+           <td align=left>runway middle</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>1A</tt>&nbsp; </td>
+           <td align=left>runway ending</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>1C</tt>&nbsp; </td>
+           <td align=left>control tower</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>20</tt>&nbsp; </td>
+           <td align=left>hangar</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>21</tt>&nbsp; </td>
+           <td align=left>pad 3</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>22</tt>&nbsp; </td>
+           <td align=left>pad 2</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>27</tt>..<tt>32</tt>&nbsp; </td>
+           <td align=left>radar (animated)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>33</tt>&nbsp; </td>
+           <td align=left>transmitter</td>
+          </tr>
+          <tr>
+           <td colspan=2>The initial layout of a large airport is (rows in Y direction, columns in X direction):
 <pre>
 1F 1B 1E 33 26 1A
 09 24 0B 0C 0D 16
@@ -429,225 +1362,281 @@
 09 08 14 13 12 19
 20 0A 15 1C 27 1A
 </pre>
-       </table>
-      </td></tr>
+           </td>
+          </tr>
+         </table>
+        </td>
+       </tr>
 
-      <tr><td nowrap valign=top><tt>34</tt>..<tt>41</tt>&nbsp; </td><td align=left>small airport
-       <table>
-        <tr><td nowrap valign=top><tt>3A</tt>..<tt>3D</tt>&nbsp; </td><td align=left>field with the wind meter (animated)</td></tr>
-        <tr><td nowrap valign=top><tt>3E</tt>&nbsp; </td><td align=left>runway south ending</td></tr>
-        <tr><td nowrap valign=top><tt>3F</tt>&nbsp; </td><td align=left>runway middle</td></tr>
-        <tr><td nowrap valign=top><tt>40</tt>&nbsp; </td><td align=left>runway north ending</td></tr>
-        <tr><td nowrap valign=top><tt>41</tt>&nbsp; </td><td align=left>hangar</td></tr>
-        <tr><td colspan=2>The initial layout of a small airport is (rows in Y direction, columns in X direction):
+       <tr>
+        <td nowrap valign=top><tt>34</tt>..<tt>41</tt>&nbsp; </td>
+        <td align=left>small airport
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>3A</tt>..<tt>3D</tt>&nbsp; </td>
+           <td align=left>field with the wind meter (animated)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>3E</tt>&nbsp; </td>
+           <td align=left>runway south ending</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>3F</tt>&nbsp; </td>
+           <td align=left>runway middle</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>40</tt>&nbsp; </td>
+           <td align=left>runway north ending</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>41</tt>&nbsp; </td>
+           <td align=left>hangar</td>
+          </tr>
+          <tr>
+           <td colspan=2>The initial layout of a small airport is (rows in Y direction, columns in X direction):
 <pre>
 36 3A 40
 35 39 3F
 34 38 3F
 41 37 3E
 </pre>
-       </table>
-      </td></tr>
+           </td>
+          </tr>
+         </table>
+        </td>
+       </tr>
 
-      <tr><td nowrap valign=top><tt>42</tt> </td><td align=left>heliport</td></tr>
-      <tr><td nowrap valign=top><tt>43</tt>..<tt>46</tt>&nbsp; </td><td align=left>
-       lorry loading area : exit towards:
-       <table>
-        <tr><td><tt>43</tt>&nbsp; </td><td align=left>NE</td></tr>
-        <tr><td><tt>44</tt>&nbsp; </td><td align=left>SE</td></tr>
-        <tr><td><tt>45</tt>&nbsp; </td><td align=left>SW</td></tr>
-        <tr><td><tt>46</tt>&nbsp; </td><td align=left>NW</td></tr>
-       </table>
-      </td></tr>
-      <tr><td nowrap valign=top><tt>47</tt>..<tt>4A</tt>&nbsp; </td><td align=left>
-       bus station : exit towards:
-       <table>
-        <tr><td><tt>47</tt>&nbsp; </td><td align=left>NE</td></tr>
-        <tr><td><tt>48</tt>&nbsp; </td><td align=left>SE</td></tr>
-        <tr><td><tt>49</tt>&nbsp; </td><td align=left>SW</td></tr>
-        <tr><td><tt>4A</tt>&nbsp; </td><td align=left>NW</td></tr>
-       </table>
-      </td></tr>
-      <tr><td nowrap valign=top><tt>4B</tt> </td><td align=left>oilfield</td></tr>
-      <tr><td nowrap valign=top><tt>4C</tt>..<tt>51</tt>&nbsp; </td><td align=left>ship dock
-       <table>
-        <tr><td><tt>4C</tt>&nbsp; </td><td align=left>SW coast part</td></tr>
-        <tr><td><tt>4D</tt>&nbsp; </td><td align=left>NW coast part</td></tr>
-        <tr><td><tt>4E</tt>&nbsp; </td><td align=left>NE coast part</td></tr>
-        <tr><td><tt>4F</tt>&nbsp; </td><td align=left>SE coast part</td></tr>
-        <tr><td><tt>50</tt>&nbsp; </td><td align=left>X direction water part</td></tr>
-        <tr><td><tt>51</tt>&nbsp; </td><td align=left>Y direction water part</td></tr>
-       </table>
-      </td></tr>
-      <tr><td nowrap valign=top><tt>52</tt> </td><td align=left>buoy</td></tr>
-      <tr><td nowrap valign=top><tt>53</tt>..<tt>A7</tt>&nbsp; </td><td align=left>used by RichK's larger airports</td></tr>
-     </table>
-    </li>
-    <li>m1: <a href="#OwnershipInfo">owner</a> of the station</li>
-    <li>m2: index into the array of stations</li>
-    <li>m3 bits 0..3: <a href="#TrackType">track type</a> for railway stations, must be 0 for all the other stations</li>
-    <li>m3 bits 4..7: persistent random data for newstations</li>
-    <li>m4: custom station id; 0 means standard graphics</li>
-    <li>m6 bit 3: 1 when a drive through road stop is built over a town owned road, otherwise 0</li>
-   </ul>
-   </td>
-  </tr>
+       <tr>
+        <td nowrap valign=top><tt>42</tt> </td>
+        <td align=left>heliport</td>
+       </tr>
+       <tr>
+        <td nowrap valign=top><tt>43</tt>..<tt>46</tt>&nbsp; </td>
+        <td align=left>lorry loading area : exit towards:
+         <table>
+          <tr>
+           <td><tt>43</tt>&nbsp; </td>
+           <td align=left>NE</td>
+          </tr>
+          <tr>
+           <td><tt>44</tt>&nbsp; </td>
+           <td align=left>SE</td>
+          </tr>
+          <tr>
+           <td><tt>45</tt>&nbsp; </td>
+           <td align=left>SW</td>
+          </tr>
+          <tr>
+           <td><tt>46</tt>&nbsp; </td>
+           <td align=left>NW</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
 
-  <tr>
-   <td valign=top nowrap><a name="Class6"><tt> 6 </tt></a></td>
-   <td>
-    <ul>
-     <li>m5: tile type:
-      <table>
-       <tr><td nowrap valign=top><tt>00</tt>&nbsp; </td><td align=left>water</td></tr>
-       <tr><td nowrap valign=top><tt>01</tt>&nbsp; </td><td align=left>coast or riverbank</td></tr>
-       <tr><td nowrap valign=top><tt>10</tt>..<tt>1B</tt>&nbsp; </td><td align=left>canal locks
-        <table>
-         <tr><td nowrap valign=top><tt>10</tt>&nbsp; </td><td align=left>middle part, (SW-NE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>11</tt>&nbsp; </td><td align=left>middle part, (NW-SE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>12</tt>&nbsp; </td><td align=left>middle part, (NE-SW direction)</td></tr>
-         <tr><td nowrap valign=top><tt>13</tt>&nbsp; </td><td align=left>middle part, (SE-NW direction)</td></tr>
-         <tr><td nowrap valign=top><tt>14</tt>&nbsp; </td><td align=left>lower part, (SW-NE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>15</tt>&nbsp; </td><td align=left>lower part, (NW-SE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>16</tt>&nbsp; </td><td align=left>lower part, (NE-SW direction)</td></tr>
-         <tr><td nowrap valign=top><tt>17</tt>&nbsp; </td><td align=left>lower part, (SE-NW direction)</td></tr>
-         <tr><td nowrap valign=top><tt>18</tt>&nbsp; </td><td align=left>upper part, (SW-NE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>19</tt>&nbsp; </td><td align=left>upper part, (NW-SE direction)</td></tr>
-         <tr><td nowrap valign=top><tt>1A</tt>&nbsp; </td><td align=left>upper part, (NE-SW direction)</td></tr>
-         <tr><td nowrap valign=top><tt>1B</tt>&nbsp; </td><td align=left>upper part, (SE-NW direction)</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>80</tt>..<tt>83</tt>&nbsp; </td><td align=left>ship depots
-        <table>
-         <tr><td nowrap valign=top><tt>80</tt>&nbsp; </td><td align=left>ship depot, NE part (X direction)</td></tr>
-          <tr><td nowrap valign=top><tt>81</tt>&nbsp; </td><td align=left>ship depot, SW part (X direction)</td></tr>
-          <tr><td nowrap valign=top><tt>82</tt>&nbsp; </td><td align=left>ship depot, NW part (Y direction)</td></tr>
-         <tr><td nowrap valign=top><tt>83</tt>&nbsp; </td><td align=left>ship depot, SE part (Y direction)</td></tr>
-        </table>
-       </td></tr>
+       <tr>
+        <td nowrap valign=top><tt>47</tt>..<tt>4A</tt>&nbsp; </td>
+        <td align=left>bus station : exit towards:
+         <table>
+          <tr>
+           <td><tt>47</tt>&nbsp; </td>
+           <td align=left>NE</td>
+          </tr>
+          <tr>
+           <td><tt>48</tt>&nbsp; </td>
+           <td align=left>SE</td>
+          </tr>
+          <tr>
+           <td><tt>49</tt>&nbsp; </td>
+           <td align=left>SW</td>
+          </tr>
+          <tr>
+           <td><tt>4A</tt>&nbsp; </td>
+           <td align=left>NW</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4B</tt> </td>
+        <td align=left>oilfield</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>4C</tt>..<tt>51</tt>&nbsp; </td>
+        <td align=left>ship dock
+         <table>
+          <tr>
+           <td><tt>4C</tt>&nbsp; </td>
+           <td align=left>SW coast part</td>
+          </tr>
+          <tr>
+           <td><tt>4D</tt>&nbsp; </td>
+           <td align=left>NW coast part</td>
+          </tr>
+          <tr>
+           <td><tt>4E</tt>&nbsp; </td>
+           <td align=left>NE coast part</td>
+          </tr>
+          <tr>
+           <td><tt>4F</tt>&nbsp; </td>
+           <td align=left>SE coast part</td>
+          </tr>
+          <tr>
+           <td><tt>50</tt>&nbsp; </td>
+           <td align=left>X direction water part</td>
+          </tr>
+          <tr>
+           <td><tt>51</tt>&nbsp; </td>
+           <td align=left>Y direction water part</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+       <tr>
+        <td nowrap valign=top><tt>52</tt> </td>
+        <td align=left>buoy</td>
+       </tr>
+       <tr>
+        <td nowrap valign=top><tt>53</tt>..<tt>A7</tt>&nbsp; </td>
+        <td align=left>used by RichK's larger airports</td>
+       </tr>
       </table>
      </li>
-     <li>m1: <a href="#OwnershipInfo">owner</a> (for water and coasts normally <tt>11</tt>)</li>
+     <li>m6 bit 3: 1 when a drive through road stop is built over a town owned road, otherwise 0</li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class6"><tt> 6 </tt></a></strong></td>
+   <td><strong>Water</strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class7"><tt> 7 </tt></a></td>
-   <td>Void
-    <p>Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,<br>
-       so as to protect several algorithms from the consequences of a wraparound at the edges.
-    </p>
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
+    <ul>
+     <li>m1: <a href="#OwnershipInfo">owner</a> (for water and coasts normally <tt>11</tt>)</li>
+     <li>m5: tile type:
+      <table>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>&nbsp; </td>
+        <td align=left>water</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>01</tt>&nbsp; </td>
+        <td align=left>coast or riverbank</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>10</tt>..<tt>1B</tt>&nbsp; </td>
+        <td align=left>canal locks
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>10</tt>&nbsp; </td>
+           <td align=left>middle part, (SW-NE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>11</tt>&nbsp; </td>
+           <td align=left>middle part, (NW-SE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>12</tt>&nbsp; </td>
+           <td align=left>middle part, (NE-SW direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>13</tt>&nbsp; </td>
+           <td align=left>middle part, (SE-NW direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>14</tt>&nbsp; </td>
+           <td align=left>lower part, (SW-NE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>15</tt>&nbsp; </td>
+           <td align=left>lower part, (NW-SE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>16</tt>&nbsp; </td>
+           <td align=left>lower part, (NE-SW direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>17</tt>&nbsp; </td>
+           <td align=left>lower part, (SE-NW direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>18</tt>&nbsp; </td>
+           <td align=left>upper part, (SW-NE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>19</tt>&nbsp; </td>
+           <td align=left>upper part, (NW-SE direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>1A</tt>&nbsp; </td>
+           <td align=left>upper part, (NE-SW direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>1B</tt>&nbsp; </td>
+           <td align=left>upper part, (SE-NW direction)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>80</tt>..<tt>83</tt>&nbsp; </td>
+        <td align=left>ship depots
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>80</tt>&nbsp; </td>
+           <td align=left>ship depot, NE part (X direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>81</tt>&nbsp; </td>
+           <td align=left>ship depot, SW part (X direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>82</tt>&nbsp; </td>
+           <td align=left>ship depot, NW part (Y direction)</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>83</tt>&nbsp; </td>
+           <td align=left>ship depot, SE part (Y direction)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+      </table>
+     </li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
+    </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class7"><tt> 7 </tt></a></strong></td>
+   <td><strong>Void </strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class8"><tt> 8 </tt></a></td>
-   <td>Industry tile
+   <td valign=top nowrap>&nbsp;</td>
+   <td>Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,<br>
+       so as to protect several algorithms from the consequences of a wraparound at the edges.
+   </td>
+  </tr>
+
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class8"><tt> 8</tt></a></strong></td>
+   <td><strong>Industry tile </strong></td>
+  </tr>
+  <tr>
+   <td valign=top nowrap>&nbsp;</td>
+   <td>
     <ul>
-     <li>m5: type:<br>
-      <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
-      <table>
-       <tr><td nowrap valign=top><tt>00</tt>..<tt>06</tt>&nbsp; </td><td align=left>coal mine
-        <table>
-         <tr><td nowrap valign=top><tt>00</tt>&nbsp; </td><td align=left>wheel tower when not animated</td></tr>
-         <tr><td nowrap valign=top><tt>01</tt>&nbsp; </td><td align=left>wheel tower when animated<br>animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>07</tt>..<tt>0A</tt>&nbsp; </td><td align=left>power station
-        <table>
-         <tr><td nowrap valign=top><tt>08</tt>&nbsp; </td><td align=left>chimney</td></tr>
-         <tr><td nowrap valign=top><tt>0A</tt>&nbsp; </td><td align=left>transformer; animation progress in m3(valid range <tt>0</tt>..<tt>7</tt>)</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>0B</tt>..<tt>0F</tt>&nbsp; </td><td align=left>sawmill</td></tr>
-       <tr><td nowrap valign=top><tt>10</tt>..<tt>11</tt>&nbsp; </td><td align=left>forest
-        <table>
-         <tr><td nowrap valign=top><tt>11</tt>&nbsp; </td><td align=left>trees cut down</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>12</tt>..<tt>17</tt>&nbsp; </td><td align=left>oil refinery</td></tr>
-       <tr><td nowrap valign=top><tt>18</tt>..<tt>1C</tt>&nbsp; </td><td align=left>oil rig</td></tr>
-       <tr><td nowrap valign=top><tt>1D</tt>..<tt>20</tt>&nbsp; </td><td align=left>oil wells
-        <table>
-         <tr><td nowrap valign=top><tt>1D</tt>&nbsp; </td><td align=left>not animated</td></tr>
-         <tr><td nowrap valign=top><tt>1E</tt>..<tt>20</tt>&nbsp; </td><td align=left>various stages of animation; progress of animation in m3</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>21</tt>..<tt>26</tt>&nbsp; </td><td align=left>farm</td></tr>
-       <tr><td nowrap valign=top><tt>27</tt>..<tt>2A</tt>&nbsp; </td><td align=left>factory (temperate climate)</td></tr>
-       <tr><td nowrap valign=top><tt>2B</tt>..<tt>2E</tt>&nbsp; </td><td align=left>printing works</td></tr>
-       <tr><td nowrap valign=top><tt>2F</tt>..<tt>33</tt>&nbsp; </td><td align=left>copper ore mine
-        <table>
-         <tr><td nowrap valign=top><tt>2F</tt>&nbsp; </td><td align=left>wheel tower when not animated</td></tr>
-         <tr><td nowrap valign=top><tt>30</tt>&nbsp; </td><td align=left>wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td></tr>
-         <tr><td nowrap valign=top><tt>31</tt>&nbsp; </td><td align=left>chimney</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>34</tt>..<tt>39</tt>&nbsp; </td><td align=left>steel mill</td></tr>
-       <tr><td nowrap valign=top><tt>3A</tt>..<tt>3B</tt>&nbsp; </td><td align=left>bank (temperate climate)</td></tr>
-       <tr><td nowrap valign=top><tt>3C</tt>..<tt>3F</tt>&nbsp; </td><td align=left>food processing plant</td></tr>
-       <tr><td nowrap valign=top><tt>40</tt>..<tt>47</tt>&nbsp; </td><td align=left>paper mill</td></tr>
-       <tr><td nowrap valign=top><tt>48</tt>..<tt>58</tt>&nbsp; </td><td align=left>gold mine
-        <table>
-         <tr><td nowrap valign=top><tt>4F</tt>&nbsp; </td><td align=left>wheel tower when not animated</td></tr>
-         <tr><td nowrap valign=top><tt>58</tt>&nbsp; </td><td align=left>wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>59</tt>..<tt>5A</tt>&nbsp; </td><td align=left>bank (sub-arctic or sub-tropical climate)</td></tr>
-       <tr><td nowrap valign=top><tt>5B</tt>..<tt>63</tt>&nbsp; </td><td align=left>diamond mine</td></tr>
-       <tr><td nowrap valign=top><tt>64</tt>..<tt>73</tt>&nbsp; </td><td align=left>iron ore mine</td></tr>
-       <tr><td nowrap valign=top><tt>74</tt></td><td align=left>fruit plantation</td></tr>
-       <tr><td nowrap valign=top><tt>75</tt></td><td align=left>rubber plantation</td></tr>
-       <tr><td nowrap valign=top><tt>76</tt>..<tt>77</tt>&nbsp; </td><td align=left>water supply</td></tr>
-       <tr><td nowrap valign=top><tt>78</tt></td><td align=left>water tower</td></tr>
-       <tr><td nowrap valign=top><tt>79</tt>..<tt>7C</tt>&nbsp; </td><td align=left>factory (sub-tropical climate)</td></tr>
-       <tr><td nowrap valign=top><tt>7D</tt>..<tt>80</tt>&nbsp; </td><td align=left>lumber mill</td></tr>
-       <tr><td nowrap valign=top><tt>81</tt>..<tt>82</tt>&nbsp; </td><td align=left>candyfloss forest
-        <table>
-         <tr><td nowrap valign=top><tt>82</tt>&nbsp; </td><td align=left>candyfloss 'trees' cut down</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>83</tt>..<tt>86</tt>&nbsp; </td><td align=left>sweet factory</td></tr>
-       <tr><td nowrap valign=top><tt>87</tt>..<tt>88</tt>&nbsp; </td><td align=left>battery farm
-        <table>
-         <tr><td nowrap valign=top><tt>88</tt>&nbsp; </td><td align=left>batteries 'reaped'</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>89</tt></td><td align=left>cola wells</td></tr>
-       <tr><td nowrap valign=top><tt>8A</tt>..<tt>8D</tt>&nbsp; </td><td align=left>toy shop</td></tr>
-       <tr><td nowrap valign=top><tt>8E</tt>..<tt>93</tt>&nbsp; </td><td align=left>toy factory
-        <table>
-         <tr><td nowrap valign=top><tt>8F</tt>&nbsp; </td>
-         <td align=left>Animated part; animation state in m3 (valid range <tt>00</tt>..<tt>31</tt>)<br>
-                        Tile animation is started (m4 zeroed) on the periodic processing.<br>
-                        While the animation is in progress, m4 holds the number
-                        of animation cycles that have already taken place.<br>
-                        when this number reaches 8 the animation is stopped.
-         </td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>94</tt>..<tt>9B</tt>&nbsp; </td><td align=left>plastic fountains (various stages of cyclic animation)</td></tr>
-       <tr><td nowrap valign=top><tt>9C</tt>..<tt>9F</tt>&nbsp; </td><td align=left>fizzy drink factory</td></tr>
-       <tr><td nowrap valign=top><tt>A0</tt>..<tt>A3</tt>&nbsp; </td><td align=left>bubble generator
-        <table>
-         <tr><td nowrap valign=top><tt>A1</tt>&nbsp; </td><td align=left>generators</td></tr>
-         <tr><td nowrap valign=top><tt>A2</tt>&nbsp; </td><td align=left>bubble capture facility; animation state in m3 (valid range <tt>00</tt>..<tt>27</tt>)</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>A4</tt>..<tt>A6</tt>&nbsp; </td><td align=left>toffee quarry
-        <table>
-         <tr><td nowrap valign=top><tt>A5</tt>&nbsp; </td><td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>45</tt>)</td></tr>
-        </table>
-       </td></tr>
-       <tr><td nowrap valign=top><tt>A7</tt>..<tt>AE</tt>&nbsp; </td><td align=left>sugar mine
-        <table>
-         <tr><td nowrap valign=top><tt>AE</tt>&nbsp; </td><td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>5F</tt>)</td></tr>
-        </table>
-       </td></tr>
-       <tr><td colspan=2>&nbsp;</td></tr> <!-- spacer -->
-      </table></li>
-     <li>m2: index into the array of industries</li>
      <li>m1 bit 7: clear = under construction
       <ul>
        <li>m1 bits 4..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
@@ -655,71 +1644,466 @@
            the meaning is different for some animated tiles which are never under construction (types <tt>01</tt>, <tt>1E</tt>..<tt>20</tt>, <tt>30</tt>, <tt>58</tt>; see above)</li>
       </ul>
      </li>
+     <li>m2: index into the array of industries</li>
+     <li>m5: type:<br>
+      <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
+
+      <table>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>..<tt>06</tt>&nbsp; </td>
+        <td align=left>coal mine
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>00</tt>&nbsp; </td>
+           <td align=left>wheel tower when not animated</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>01</tt>&nbsp; </td>
+           <td align=left>wheel tower when animated<br>
+            animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>07</tt>..<tt>0A</tt>&nbsp; </td>
+        <td align=left>power station
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>08</tt>&nbsp; </td>
+           <td align=left>chimney</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>0A</tt>&nbsp; </td>
+           <td align=left>transformer; animation progress in m3(valid range <tt>0</tt>..<tt>7</tt>)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>0B</tt>..<tt>0F</tt>&nbsp; </td>
+        <td align=left>sawmill</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>10</tt>..<tt>11</tt>&nbsp; </td>
+        <td align=left>forest
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>11</tt>&nbsp; </td>
+           <td align=left>trees cut down</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>12</tt>..<tt>17</tt>&nbsp; </td>
+        <td align=left>oil refinery</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>18</tt>..<tt>1C</tt>&nbsp; </td>
+        <td align=left>oil rig</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>1D</tt>..<tt>20</tt>&nbsp; </td>
+        <td align=left>oil wells
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>1D</tt>&nbsp; </td>
+           <td align=left>not animated</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>1E</tt>..<tt>20</tt>&nbsp; </td>
+           <td align=left>various stages of animation; progress of animation in m3</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>21</tt>..<tt>26</tt>&nbsp; </td>
+        <td align=left>farm</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>27</tt>..<tt>2A</tt>&nbsp; </td>
+        <td align=left>factory (temperate climate)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2B</tt>..<tt>2E</tt>&nbsp; </td>
+        <td align=left>printing works</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>2F</tt>..<tt>33</tt>&nbsp; </td>
+        <td align=left>copper ore mine
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>2F</tt>&nbsp; </td>
+           <td align=left>wheel tower when not animated</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>30</tt>&nbsp; </td>
+           <td align=left>wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>31</tt>&nbsp; </td>
+           <td align=left>chimney</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>34</tt>..<tt>39</tt>&nbsp; </td>
+        <td align=left>steel mill</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3A</tt>..<tt>3B</tt>&nbsp; </td>
+        <td align=left>bank (temperate climate)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>3C</tt>..<tt>3F</tt>&nbsp; </td>
+        <td align=left>food processing plant</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>40</tt>..<tt>47</tt>&nbsp; </td>
+        <td align=left>paper mill</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>48</tt>..<tt>58</tt>&nbsp; </td>
+        <td align=left>gold mine
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>4F</tt>&nbsp; </td>
+           <td align=left>wheel tower when not animated</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>58</tt>&nbsp; </td>
+           <td align=left>wheel tower when animated; animation state in m3 bits 5..0; m3 bit 6 set = sound already generated</td>
+          </tr>
+         </table></td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>59</tt>..<tt>5A</tt>&nbsp; </td>
+        <td align=left>bank (sub-arctic or sub-tropical climate)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>5B</tt>..<tt>63</tt>&nbsp; </td>
+        <td align=left>diamond mine</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>64</tt>..<tt>73</tt>&nbsp; </td>
+        <td align=left>iron ore mine</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>74</tt></td>
+        <td align=left>fruit plantation</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>75</tt></td>
+        <td align=left>rubber plantation</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>76</tt>..<tt>77</tt>&nbsp; </td>
+        <td align=left>water supply</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>78</tt></td>
+        <td align=left>water tower</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>79</tt>..<tt>7C</tt>&nbsp; </td>
+        <td align=left>factory (sub-tropical climate)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>7D</tt>..<tt>80</tt>&nbsp; </td>
+        <td align=left>lumber mill</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>81</tt>..<tt>82</tt>&nbsp; </td>
+        <td align=left>candyfloss forest
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>82</tt>&nbsp; </td>
+           <td align=left>candyfloss 'trees' cut down</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>83</tt>..<tt>86</tt>&nbsp; </td>
+        <td align=left>sweet factory</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>87</tt>..<tt>88</tt>&nbsp; </td>
+        <td align=left>battery farm
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>88</tt>&nbsp; </td>
+           <td align=left>batteries 'reaped'</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>89</tt></td>
+        <td align=left>cola wells</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>8A</tt>..<tt>8D</tt>&nbsp; </td>
+        <td align=left>toy shop</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>8E</tt>..<tt>93</tt>&nbsp; </td>
+        <td align=left>toy factory
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>8F</tt>&nbsp; </td>
+           <td align=left>Animated part; animation state in m3 (valid range <tt>00</tt>..<tt>31</tt>)<br>
+                        Tile animation is started (m4 zeroed) on the periodic processing.<br>
+                        While the animation is in progress, m4 holds the number
+                        of animation cycles that have already taken place.<br>
+                        when this number reaches 8 the animation is stopped.</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>94</tt>..<tt>9B</tt>&nbsp; </td>
+        <td align=left>plastic fountains (various stages of cyclic animation)</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>9C</tt>..<tt>9F</tt>&nbsp; </td>
+        <td align=left>fizzy drink factory</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>A0</tt>..<tt>A3</tt>&nbsp; </td>
+        <td align=left>bubble generator
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>A1</tt>&nbsp; </td>
+           <td align=left>generators</td>
+          </tr>
+          <tr>
+           <td nowrap valign=top><tt>A2</tt>&nbsp; </td>
+           <td align=left>bubble capture facility; animation state in m3 (valid range <tt>00</tt>..<tt>27</tt>)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>A4</tt>..<tt>A6</tt>&nbsp; </td>
+        <td align=left>toffee quarry
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>A5</tt>&nbsp; </td>
+           <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>45</tt>)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>A7</tt>..<tt>AE</tt>&nbsp; </td>
+        <td align=left>sugar mine
+         <table>
+          <tr>
+           <td nowrap valign=top><tt>AE</tt>&nbsp; </td>
+           <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>5F</tt>)</td>
+          </tr>
+         </table>
+        </td>
+       </tr>
+      </table>
+     </li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="Class9"><tt> 9</tt></a></strong></td>
+   <td><strong>Tunnel / bridge</strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="Class9"><tt> 9 </tt></a></td>
+   <td valign=top nowrap>&nbsp;</td>
    <td>
     <ul>
      <li>m5 bits 7..4 clear: tunnel entrance/exit
       <ul>
-       <li>m5 bits 3..2: <tt>0</tt> - railway tunnel, <tt>1</tt> - road tunnel</li>
-       <li>m5 bits 1..0 - direction: entrance towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
        <li>m1: <a href="#OwnershipInfo">owner</a> of the tunnel</li>
        <li>m3 bits 3..0 = <a href="#TrackType">track type</a> for railway tunnel, must be 0 for road tunnel</li>
        <li>m4 bit 7 set = on snow or desert</li>
+       <li>m5 bits 3..2: <tt>0</tt> - railway tunnel, <tt>1</tt> - road tunnel</li>
+       <li>m5 bits 1..0 - direction: entrance towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
       </ul>
      </li>
      <li>m5 bit 7 set: bridge ramp
       <ul>
        <li>m1: <a href="#OwnershipInfo">owner</a> of the bridge</li>
-       <li>m3 bits 3..0 = <a href="#TrackType">type of track</a> on the bridge, must be 0 for road bridge</li>
-       <li>m5 bits 3..2: <tt>0</tt> - railway bridge, <tt>1</tt> - road bridge</li>
-       <li>m5 bit 0..1: DiagDirection onto the bridge</li>
        <li>m2 bits 7..4: <a name="BridgeType">bridge type</a>:
         <table>
-         <tr><th align=left>Type&nbsp;</th><th align=left>Max. speed (mph)&nbsp;</th><th align=left>Description</th></tr>
-         <tr><td nowrap valign=top><tt>0</tt>&nbsp; </td><td align=center>20</td><td align=left>wooden</td></tr>
-         <tr><td nowrap valign=top><tt>1</tt>&nbsp; </td><td align=center>30</td><td align=left>concrete</td></tr>
-         <tr><td nowrap valign=top><tt>2</tt>&nbsp; </td><td align=center>40</td><td align=left>girder, steel</td></tr>
-         <tr><td nowrap valign=top><tt>3</tt>&nbsp; </td><td align=center>50</td><td align=left>suspension, concrete</td></tr>
-         <tr><td nowrap valign=top><tt>4</tt>&nbsp; </td><td align=center>60</td><td align=left>suspension, steel</td></tr>
-         <tr><td nowrap valign=top><tt>5</tt>&nbsp; </td><td align=center>70</td><td align=left>suspension, steel</td></tr>
-         <tr><td nowrap valign=top><tt>6</tt>&nbsp; </td><td align=center>100</td><td align=left>cantilever, steel</td></tr>
-         <tr><td nowrap valign=top><tt>7</tt>&nbsp; </td><td align=center>130</td><td align=left>cantilever, steel</td></tr>
-         <tr><td nowrap valign=top><tt>8</tt>&nbsp; </td><td align=center>150</td><td align=left>cantilever, steel</td></tr>
-         <tr><td nowrap valign=top><tt>9</tt>&nbsp; </td><td align=center>160</td><td align=left>girder, steel</td></tr>
-         <tr><td nowrap valign=top><tt>A</tt>&nbsp; </td><td align=center>200</td><td align=left>tubular, steel</td></tr>
+         <tr>
+          <th align=left>Type&nbsp;</th>
+          <th align=left>Max. speed (mph)&nbsp;</th>
+          <th align=left>Description</th>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>0</tt>&nbsp; </td>
+          <td align=center>20</td>
+          <td align=left>wooden</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>1</tt>&nbsp; </td>
+          <td align=center>30</td>
+          <td align=left>concrete</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>2</tt>&nbsp; </td>
+          <td align=center>40</td>
+          <td align=left>girder, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>3</tt>&nbsp; </td>
+          <td align=center>50</td>
+          <td align=left>suspension, concrete</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>4</tt>&nbsp; </td>
+          <td align=center>60</td>
+          <td align=left>suspension, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>5</tt>&nbsp; </td>
+          <td align=center>70</td>
+          <td align=left>suspension, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>6</tt>&nbsp; </td>
+          <td align=center>100</td>
+          <td align=left>cantilever, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>7</tt>&nbsp; </td>
+          <td align=center>130</td>
+          <td align=left>cantilever, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>8</tt>&nbsp; </td>
+          <td align=center>150</td>
+          <td align=left>cantilever, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>9</tt>&nbsp; </td>
+          <td align=center>160</td>
+          <td align=left>girder, steel</td>
+         </tr>
+
+         <tr>
+          <td nowrap valign=top><tt>A</tt>&nbsp; </td>
+          <td align=center>200</td>
+          <td align=left>tubular, steel</td>
+         </tr>
         </table>
        </li>
+       <li>m3 bits 3..0 = <a href="#TrackType">type of track</a> on the bridge, must be 0 for road bridge</li>
        <li>m4 bit 7 set = on snow or desert</li>
+       <li>m5 bits 3..2: <tt>0</tt> - railway bridge, <tt>1</tt> - road bridge</li>
+       <li>m5 bits 1..0: DiagDirection onto the bridge</li>
       </ul>
-     <li>
+     </li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
 
+  <tr bgcolor="#CCCCCC">
+   <td valign=top nowrap><strong><a name="ClassA"><tt> A</tt></a></strong></td>
+   <td><strong><tt>Unmovables</tt></strong></td>
+  </tr>
   <tr>
-   <td valign=top nowrap><a name="ClassA"><tt> A </tt></a></td>
+   <td valign=top nowrap>&nbsp;</td>
    <td>
     <ul>
+     <li>m1: <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
      <li>m5: tile type:
       <table>
-       <tr><td nowrap valign=top><tt>00</tt>&nbsp; </td><td align=left>transmitter</td></tr>
-       <tr><td nowrap valign=top><tt>01</tt>&nbsp; </td><td align=left>lighthouse</td></tr>
-       <tr><td nowrap valign=top><tt>02</tt>&nbsp; </td><td align=left>company statue</td></tr>
-       <tr><td nowrap valign=top><tt>03</tt>&nbsp; </td><td align=left>company-owned land</td></tr>
-       <tr><td nowrap valign=top><tt>80</tt>..<tt>93</tt>&nbsp; </td><td align=left>company headquarters (5 sets of 4 tiles each, updated quarterly depending on the company performance)</td></tr>
+       <tr>
+        <td nowrap valign=top><tt>00</tt>&nbsp; </td>
+        <td align=left>transmitter</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>01</tt>&nbsp; </td>
+        <td align=left>lighthouse</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>02</tt>&nbsp; </td>
+        <td align=left>company statue</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>03</tt>&nbsp; </td>
+        <td align=left>company-owned land</td>
+       </tr>
+
+       <tr>
+        <td nowrap valign=top><tt>80</tt>..<tt>93</tt>&nbsp; </td>
+        <td align=left>company headquarters (5 sets of 4 tiles each, updated quarterly depending on the company performance)</td>
+       </tr>
       </table>
      </li>
-     <li>m1: <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
+     <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
+     <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
     </ul>
    </td>
   </tr>
-
-  <tr><td colspan=2>Classes <tt>B</tt> through <tt>F</tt> are reserved. The presence of a tile in one of the reserved classes will crash OTTD.</td></tr>
+  <tr>
+   <td colspan=2>Classes <tt>B</tt> through <tt>F</tt> are reserved. The presence
+      of a tile in one of the reserved classes will crash OTTD.</td>
+  </tr>
  </table>
 
 
--- a/docs/landscape_grid.html	Sat Mar 03 20:33:32 2007 +0000
+++ b/docs/landscape_grid.html	Sun Mar 04 04:25:36 2007 +0000
@@ -135,8 +135,8 @@
       <td class="bits">-inherit-</td>
       <td class="bits">-inherit-</td>
       <td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
+      <td class="bits">X<span class="free">OOO OOOO</span></td>
       <td class="bits"><span class="free">OOOO OOOO</span></td>
-      <td class="bits">X<span class="free">OOO OOOO</span></td>
       <td class="bits">XXXX XXXX</td>
       <td class="bits">XX<span class="free">OO OO</span>XX</td>
     </tr>
--- a/docs/openttd.6	Sat Mar 03 20:33:32 2007 +0000
+++ b/docs/openttd.6	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
 .\" Please adjust this date whenever revising the manpage.
-.Dd February 8, 2007
+.Dd February 27, 2007
 .Dt OPENTTD 6
 .Sh NAME
 .Nm openttd
@@ -11,14 +11,14 @@
 .Op Fl G Ar seed
 .Op Fl d Ar [level | cat=lvl[, ...]]
 .Op Fl g Ar [savegame]
-.Op Fl n Ar [host[#player][:port]]
+.Op Fl n Ar host[:port][#player]
 .Op Fl r Ar widthxheight
 .Op Fl t Ar date
 .Op Fl m Ar driver
 .Op Fl s Ar driver
 .Op Fl v Ar driver
 .Sh OPTIONS
-.Bl -tag -width ".Fl n Ar host[#player][:port]"
+.Bl -tag -width ".Fl n Ar host[:port][#player]"
 .It Fl D
 Start a dedicated server
 .It Fl G Ar seed
@@ -45,9 +45,7 @@
 .It Fl m Ar driver
 Set the music driver, see
 .Fl h
-.It Fl n
-Start a network server
-.It Fl n Ar host[#player][:port]
+.It Fl n Ar host[:port][#player]
 Join a network game, optionally specify player to play as and port to connect to
 .It Fl r Ar widthxheight
 Set the resolution
--- a/known-bugs.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/known-bugs.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -21,30 +21,24 @@
 
 -601	airports can't get flooded when they have planes in them
 -599	reloaded game lost company passwords
--596	Cloning Maglev in UKRS forgets Mail refit
 -595	Sort by max cargo rating does not sort correctly
 -594	terraforming wipes out canals
 -591	Autorenew fails under certain conditions
--585	Huge losses with transfer
 -583	Fatal fault or crash during startup
 -578	No loading at my industrial centre
 -574	Open TTD overiding Power Warnings
 -571	Problems with vehicle purchase lists with NewGRFs
--569	'Game Load Failed' when trying to open scenarios
 -559	Front-/Rear-facing engines don't line up with each other
 -553	Autorenew doesn't warn when replacement isn't available
 -546	[0.5.0 RC3] Inflation overflow
--542	Assertion with Vehicle list
 -540	Planes vanished when offered exclusive
 -539	Trains can cash the same cargo multiple times
 -529	newairport's sprite issue
 -522	overflow on vehicle costs
--519	Bridge building results in 'missing' pieces
 -508	Destroying trees and replanting => raised rating
 -502	OSX can incorrectly print "dbg: [sl] Cannot open savegame 'data/opntitle.dat' for saving/loading."
 -501	Mouse pointer gets hidden, when draging out of window and back again. Only affects Wacom etc.
 -494	Get free money abusing a stock bug
--489	[0.5.0rc1] Sound choppy on Vista
 -474	Overtaking car doesn't hit the against-riding car.
 -459	Merging is buggy
 -458	Crash when changing Resolution on Mac OS X (x86)
@@ -52,7 +46,6 @@
 -442	Alt-tab behaviour flawed whilst full screen (win32)
 -441	Transparent stuff
 -435	Assertion window doesn't show when in fullscreen on Mac OS X
--431	failure to autorenew (core/GUI desync)
 -423	Improved loading causes high CPU use with long trains
 -410	Openttd in dedicated mode don't run without data files
 -404	Cargo never delivered to station after bribe and before first pickup
@@ -64,7 +57,7 @@
 -339	Crash in Quicktime when exiting game
 -299	disable 90 deg turns patch - AI builds 90 deg turns
 -290	NPF - no path to depot from tunnel
--282	layers do not clear loans as soon as they could
+-282	AI Players do not clear loans as soon as they could
 -274	Autoclean ignores any share holdings
 -265	Subsidy awarded detection bug
 -259	AIs start unnamed companies that do nothing
@@ -72,7 +65,6 @@
 -202	2 Locomotives in 1 Train - Selling one results in Age of the other one Being 0
 -193	Inconsistent directory usage on Mac OS X
 -165	vehicle length not taken into account
--163	Cargo: Station destroyed / High payment
 -153	Language crash with app renaming OSX
 -119	Clipping problems with vehicles on slopes
 -115	inactive logins do not get auto kicked
@@ -105,7 +97,6 @@
 -1382782	Loan interest calculated 'wrong'
 -1201284	permanent hilight in a depot
 -1185852	Scrollbars get arbitrarily small
--1184634	Replace vehicles window bug
 -1160732	little bug with transparency
 -1117731	Editor-StartingDate
 -1108046	game freezes
@@ -113,7 +104,6 @@
 -1084620	Minor bug considering buses/trucks
 -1034310	color mauve in diagrams
 -1030661	It's possible to build a tunnel under oil wells
-- 993516	Canal + bouy -> wrong graphics.
 - 987891	Large UFO destruction bug
 - 987883	Aircraft landing/taking off
 - 987880	company league table updating
--- a/os/debian/README.Debian	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/README.Debian	Sun Mar 04 04:25:36 2007 +0000
@@ -23,10 +23,10 @@
 	mixing. My VIA AC97 device cannot do hardware mixing, for example.
 
 -Scenarios
-	There are a few scenarios included in this release. When you start openttd
-	it will look for scenarios in ~/.openttd/scenario, while the premade
-	scenarios are in /usr/share/games/openttd/data/scenario. You have two
-	options to use the scenarios.
+	There are a few scenarios included in this release. When you start
+	openttd it will look for scenarios in ~/.openttd/scenario, while the
+	premade scenarios are in /usr/share/games/openttd/data/scenario. You
+	have two options to use the scenarios.
 	* Navigate to /usr/share/games/openttd/data/scenario within openttd.
 	* Copy scenarios from /usr/share/games/openttd/data/scenario to
 	  ~/.openttd/scenario. We are looking into a better solution for this.
--- a/os/debian/changelog	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/changelog	Sun Mar 04 04:25:36 2007 +0000
@@ -2,7 +2,52 @@
 
   * Unreleased SVN version. Versioned to allow normal upgrades to released versions.
 
- -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 21 Dec 2006 14:54:35 +0100
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 26 Feb 2007 21:07:05 +0100
+
+openttd (0.5.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 26 Feb 2007 21:07:05 +0100
+
+openttd (0.5.0~rc5-1) unstable; urgency=low
+
+  [ Matthijs Kooijman ]
+  * New upstream release
+  * Compile with freetype and fontconfig support.
+
+  [ Jordi Mallach ]
+  * Convert debconf templates to podebconf.
+  * Add a Catalan translation.
+  * Minor packaging cleanups.
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 12 Feb 2007 09:25:41 +0100
+
+openttd (0.5.0~rc4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 18 Jan 2007 21:17:28 +0100
+
+openttd (0.5.0~rc3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 18 Jan 2007 20:21:04 +0100
+
+openttd (0.5.0~rc2-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed fix for empty scenarios dir, openttd Makefile now properly handles
+    this.
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Sun, 31 Dec 2006 12:24:37 +0100
+
+openttd (0.5.0~rc1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Fri, 22 Dec 2006 11:03:46 +0100
 
 openttd (0.4.8-1) unstable; urgency=low
 
--- a/os/debian/control	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/control	Sun Mar 04 04:25:36 2007 +0000
@@ -2,7 +2,8 @@
 Section: contrib/games
 Priority: optional
 Maintainer: Matthijs Kooijman <m.kooijman@student.utwente.nl>
-Build-Depends: debhelper (>= 4.0.0), dpatch, libsdl-dev, zlib1g-dev, libpng-dev
+Uploaders: Jordi Mallach <jordi@debian.org>
+Build-Depends: debhelper (>= 4.0.0), dpatch, libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev
 Standards-Version: 3.7.2
 
 Package: openttd
--- a/os/debian/copyright	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/copyright	Sun Mar 04 04:25:36 2007 +0000
@@ -1,9 +1,9 @@
-This package was debianized by Matthijs Kooijman <m.kooijman@student.utwente.nl> on
-Wed, 15 Sep 2004 00:24:01 +0200.
+This package was debianized by Matthijs Kooijman <m.kooijman@student.utwente.nl>
+on Wed, 15 Sep 2004 00:24:01 +0200.
 
 It was downloaded from http://sourceforge.net/projects/openttd
 
-Upstream Author: Ludvig Strigeus (ludde) and many others
+Upstream author: Ludvig Strigeus (ludde) and many others.
 
 License:
 
@@ -19,7 +19,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this package; if not, write to the Free Software
-	 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 On Debian systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/os/debian/po/POTFILES.in	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,1 @@
+[type: gettext/rfc822deb] templates
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/os/debian/po/ca.po	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,35 @@
+# Catalan translation of openttd's Debconf templates.
+# Copyright © 2007 Software in the Public Interest
+# This file is distributed under the same license as the openttd package.
+# Jordi Mallach <jordi@debian.org>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openttd 0.5.0-1\n"
+"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
+"POT-Creation-Date: 2007-02-01 12:25+0100\n"
+"PO-Revision-Date: 2007-02-01 12:16+0100\n"
+"Last-Translator: Jordi Mallach <jordi@debian.org>\n"
+"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "You need to install data files"
+msgstr "Heu d'instal·lar els fitxers de dades"
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"OpenTTD needs the data files from the original TTD game to run. You should "
+"install these data files before you can play the game. See README.Debian for "
+"more details on which files need to be copied where."
+msgstr ""
+"OpenTTD necessita els fitxers de dades del joc TTD original per a funcionar. "
+"Haureu d'instal·lar aquests fitxers de dades abans de poder jugar al joc. "
+"Llegiu el document README.Debian per a obtindre més detalls sobre quins "
+"fitxers s'han de copiar i a quina ubicació."
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/os/debian/po/templates.pot	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
+"POT-Creation-Date: 2007-02-01 12:25+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "You need to install data files"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"OpenTTD needs the data files from the original TTD game to run. You should "
+"install these data files before you can play the game. See README.Debian for "
+"more details on which files need to be copied where."
+msgstr ""
--- a/os/debian/postinst	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/postinst	Sun Mar 04 04:25:36 2007 +0000
@@ -1,44 +1,8 @@
 #! /bin/sh
-# postinst script for openttd
-#
-# see: dh_installdeb(1)
 
 set -e
 
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
 . /usr/share/debconf/confmodule
 
-case "$1" in
-    configure)
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
 #DEBHELPER#
-
-exit 0
-
-
--- a/os/debian/postrm	Sat Mar 03 20:33:32 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#! /bin/sh
-# postrm script for openttd
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-       purge|remove)
-       	;;
-       
-       upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-
-
-        ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
--- a/os/debian/templates	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/debian/templates	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 Template: openttd/datafiles
 Type: note
-Description: You need to install data files
- OpenTTD needs the datafiles from the original TTD game to run. You should
- install these datafiles before you can play the game. See README.Debian for
- more details on which files need to be copied where.
+_Description: You need to install data files
+ OpenTTD needs the data files from the original TTD game to run. You should
+ install these data files before you can play the game. See README.Debian
+ for more details on which files need to be copied where.
--- a/os/win32/installer/CDFinder.ini	Sat Mar 03 20:33:32 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-; Ini file generated by the HM NIS Edit IO designer.
-[Settings]
-NumFields=3
-
-[Field 1]
-Type=Groupbox
-Text=Transport Tycoon Deluxe Installation location
-Left=0
-Right=288
-Top=68
-Bottom=100
-
-[Field 2]
-Type=DirRequest
-Left=4
-Right=282
-Top=80
-Bottom=92
-
-[Field 3]
-Type=Label
-Left=13
-Right=278
-Top=6
-Bottom=64
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/os/win32/installer/cdfinder.ini	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,26 @@
+; Ini file generated by the HM NIS Edit IO designer.
+[Settings]
+NumFields=3
+
+[Field 1]
+Type=Groupbox
+Text=Transport Tycoon Deluxe Installation location
+Left=6
+Right=294
+Top=68
+Bottom=100
+
+[Field 2]
+Type=DirRequest
+Left=10
+Right=290
+Top=80
+Bottom=92
+
+[Field 3]
+Type=Label
+Left=17
+Right=282
+Top=6
+Bottom=64
+
--- a/os/win32/installer/gpl.txt	Sat Mar 03 20:33:32 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
--- a/os/win32/installer/install.nsi	Sat Mar 03 20:33:32 2007 +0000
+++ b/os/win32/installer/install.nsi	Sun Mar 04 04:25:36 2007 +0000
@@ -1,10 +1,13 @@
-; Define your application name
-!define APPNAME "OpenTTD"
-!define APPNAMEANDVERSION "OpenTTD 0.5.0.0"
-!define APPVERSION "0.5.0.0"
-!define INSTALLERVERSION 27 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
-!define MUI_ICON "..\..\..\openttd.ico"
-!define MUI_UNICON "..\..\..\openttd.ico"
+!define APPNAME "OpenTTD"   ; Define application name
+!define APPVERSION "0.5.0"  ; Define application version
+!define INSTALLERVERSION 28 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
+
+!define APPURLLINK "http://www.openttd.org"
+!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
+!define APPVERSIONINTERNAL "${APPVERSION}.0" ; Needs to be of the format X.X.X.X
+
+!define MUI_ICON "..\..\..\media\openttd.ico"
+!define MUI_UNICON "..\..\..\media\openttd.ico"
 !define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
 !define MUI_HEADERIMAGE
 !define MUI_HEADERIMAGE_BITMAP "top.bmp"
@@ -14,7 +17,7 @@
 
 ; Version Info
 Var AddWinPrePopulate
-VIProductVersion "${APPVERSION}"
+VIProductVersion "${APPVERSIONINTERNAL}"
 VIAddVersionKey "ProductName" "OpenTTD Installer"
 VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}"
 VIAddVersionKey "CompanyName" "OpenTTD Developers"
@@ -44,18 +47,17 @@
 !define MUI_ABORTWARNING
 
 !insertmacro MUI_PAGE_WELCOME
-LicenseForceSelection radiobuttons "I &accept this Agreement" "I &do not accept this agreement"
 
+!define MUI_LICENSEPAGE_RADIOBUTTONS
+!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT "I &accept this agreement"
+!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "I &do not accept this agreement"
 !insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING"
 
-;--------------------------------
-; Rest of pages
 !insertmacro MUI_PAGE_COMPONENTS
 
-
-;--------------------------------
-; New custom page for finding CD
-Page custom SelectCD SelectCD2 ": TTD folder"
+;---------------------------------
+; Custom page for finding TTDLX CD
+Page custom SelectCDEnter SelectCDExit ": TTD folder"
 
 !insertmacro MUI_PAGE_DIRECTORY
 
@@ -69,9 +71,13 @@
 
 !insertmacro MUI_PAGE_INSTFILES
 
-!define MUI_FINISHPAGE_RUN "$INSTDIR\OpenTTD.exe"
-!define MUI_FINISHPAGE_LINK "Visit OpenTTD's homepage"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://www.openttd.org/"
+;-----------------------------------------------------
+; New custom page to show UNICODE and MSLU information
+Page custom ShowWarningsPage
+
+!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe"
+!define MUI_FINISHPAGE_LINK "Visit the OpenTTD site for latest news, FAQs and downloads"
+!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}"
 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
@@ -84,64 +90,67 @@
 !insertmacro MUI_LANGUAGE "English"
 !insertmacro MUI_RESERVEFILE_LANGDLL
 
-;--------------------------------
-; Sections
+;--------------------------------------------------------------
+; (Core) OpenTTD install section. Copies all internal game data
 Section "!OpenTTD" Section1
-
-	; Set Section properties
+	; Overwrite files by default, but don't complain on failure
 	SetOverwrite try
 
 	; Make savegame folder
 	SetOutPath "$INSTDIR\save"
-	; define root variable relative to installer
+	; Define root variable relative to installer
 	!define PATH_ROOT "..\..\..\"
 
 	; Copy language files
-  SetOutPath "$INSTDIR\lang\"
-  File ${PATH_ROOT}lang\*.lng
-  File ${PATH_ROOT}lang\english.txt
+	SetOutPath "$INSTDIR\lang\"
+	File ${PATH_ROOT}bin\lang\*.lng
+	File ${PATH_ROOT}src\lang\english.txt
 
 	; Copy data files
 	SetOutPath "$INSTDIR\data\"
-	File ${PATH_ROOT}data\*.grf
-	File ${PATH_ROOT}data\opntitle.dat
-  ; Copy scenario files
+	File ${PATH_ROOT}bin\data\*.grf
+	File ${PATH_ROOT}bin\data\opntitle.dat
+	; Copy scenario files (don't choke if they don't exist)
 	SetOutPath "$INSTDIR\scenario\"
-  File ${PATH_ROOT}scenario\*.scn
+	File /nonfatal ${PATH_ROOT}bin\scenario\*.scn
+
+	; Copy heightmap files (don't choke if they don't exist)
+	SetOutPath "$INSTDIR\scenario\heightmap\"
+	File /nonfatal ${PATH_ROOT}bin\scenario\heightmap\*.*
 
 	; Copy the rest of the stuff
 	SetOutPath "$INSTDIR\"
 
-	;Copy text files
-  File ${PATH_ROOT}changelog.txt
-  File ${PATH_ROOT}COPYING
-  File ${PATH_ROOT}readme.txt
-  File ${PATH_ROOT}known-bugs.txt
+	; Copy text files
+	File ${PATH_ROOT}changelog.txt
+	File ${PATH_ROOT}COPYING
+	File ${PATH_ROOT}readme.txt
+	File ${PATH_ROOT}known-bugs.txt
 
 	; Copy executable
-	File /oname=OpenTTD.exe        ${PATH_ROOT}Release\openttd.exe
-	File ${PATH_ROOT}strgen\Debug\strgen.exe
+	File /oname=openttd.exe ${PATH_ROOT}objs\Win32\Release\openttd.exe
+	File ${PATH_ROOT}objs\strgen\strgen.exe
 
 
-  ; Delete old files from the main dir. they are now placed in data/ and lang/
+	; Delete old files from the main dir. they are now placed in data/ and lang/
 	Delete "$INSTDIR\*.lng"
 	Delete "$INSTDIR\*.grf"
 	Delete "$INSTDIR\sample.cat"
 	Delete "$INSTDIR\ttd.exe"
 
 
-	;Creates the Registry Entries
-	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit http://www.openttd.org"
+	; Create the Registry Entries
+	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit ${APPURLLINK}"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayIcon" "$INSTDIR\openttd.exe,0"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayName" "OpenTTD ${APPVERSION}"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" "${APPVERSION}"
-	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "http://www.openttd.org"
+	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "${APPURLLINK}"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" "$INSTDIR"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Publisher" "OpenTTD"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" "$SHORTCUTS"
 	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" "$INSTDIR\uninstall.exe"
-	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "http://www.openttd.org"
-	;This key sets the Version DWORD that patches will check against
+	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "${APPURLLINK}"
+	; This key sets the Version DWORD that new installers will check against
 	WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" ${INSTALLERVERSION}
 
 	!insertmacro MUI_STARTMENU_WRITE_BEGIN "OpenTTD"
@@ -155,13 +164,15 @@
 	!insertmacro MUI_STARTMENU_WRITE_END
 SectionEnd
 
+;----------------------------------------------------------------------------------
+; TTDLX files install section. Copies all needed TTDLX files from CD or install dir
 Section "Copy Game Graphics" Section2
-	; Include files from CD
-	;Let's copy the files from the CD
+	; Let's copy the files with size approximation
 	SetOutPath "$INSTDIR\gm"
-	CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\gm\"
+	CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\gm\" 1028
 	SetOutPath "$INSTDIR\data\"
 	CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\data\sample.cat" 1566
+	; Copy Windows files
 	CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\data\trg1r.grf" 2365
 	CopyFiles "$CDDRIVE\trgcr.grf" "$INSTDIR\data\trgcr.grf" 260
 	CopyFiles "$CDDRIVE\trghr.grf" "$INSTDIR\data\trghr.grf" 400
@@ -176,7 +187,8 @@
 	SetOutPath "$INSTDIR\"
 SectionEnd
 
-;----------------------
+;-------------------------------------------
+; Install the uninstaller (option is hidden)
 Section -FinishSection
 	WriteUninstaller "$INSTDIR\uninstall.exe"
 SectionEnd
@@ -184,28 +196,35 @@
 ; Modern install component descriptions
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
 	!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "OpenTTD is a fully functional clone of TTD and is very playable."
-	!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics. Requires TTD for Windows."
+	!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics. Requires TTD (for Windows)."
 !insertmacro MUI_FUNCTION_DESCRIPTION_END
 
-;!undef SHORTCUTS
-;Uninstall section
-
-Section Uninstall
-	MessageBox MB_YESNOCANCEL|MB_ICONQUESTION "Would you like to remove the Saved Game Folders located at '$INSTDIR\Save?'  If you choose Yes, your Saved Games will be removed." IDYES RemoveSavedGames IDNO NoRemoveSavedGames
+;-----------------------------------------------
+; Uninstall section, deletes all installed files
+Section "Uninstall"
+	MessageBox MB_YESNO|MB_ICONQUESTION \
+		"Remove the save game folders located at $\"$INSTDIR\save?$\"$\n \
+		If you choose Yes, your saved games will be deleted." \
+		IDYES RemoveSavedGames IDNO NoRemoveSavedGames
 	RemoveSavedGames:
-		Delete "$INSTDIR\Save\AutoSave\*"
-		RMDir "$INSTDIR\Save\AutoSave"
-		Delete "$INSTDIR\Save\*"
-		RMDir "$INSTDIR\Save"
+		Delete "$INSTDIR\save\autosave\*"
+		RMDir "$INSTDIR\save\autosave"
+		Delete "$INSTDIR\save\*"
+		RMDir "$INSTDIR\save"
 	NoRemoveSavedGames:
 
-	MessageBox MB_YESNOCANCEL|MB_ICONQUESTION "Would you like to remove the Scenario Folders located at '$INSTDIR\Scenario?'  If you choose Yes, your Scenarios will be removed." IDYES RemoveScen IDNO NoRemoveScen
+	MessageBox MB_YESNO|MB_ICONQUESTION \
+		"Remove the scenario folders located at $\"$INSTDIR\scenario?$\"$\n \
+		If you choose Yes, your scenarios will be deleted." \
+		IDYES RemoveScen IDNO NoRemoveScen
 	RemoveScen:
-		Delete "$INSTDIR\Scenario\*"
-		RMDir "$INSTDIR\Scenario"
+		Delete "$INSTDIR\scenario\heightmap*"
+		RMDir "$INSTDIR\scenario\heightmap"
+		Delete "$INSTDIR\scenario\*"
+		RMDir "$INSTDIR\scenario"
 	NoRemoveScen:
 
-	;Remove from registry...
+	; Remove from registry...
 	!insertmacro MUI_STARTMENU_GETFOLDER "OpenTTD" $SHORTCUTS
 	ReadRegStr $SHORTCUTS HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder"
 
@@ -238,13 +257,20 @@
 
 	; Data files
 	Delete "$INSTDIR\data\opntitle.dat"
+
+	Delete "$INSTDIR\data\2ccmap.grf"
+	Delete "$INSTDIR\data\airports.grf"
+	Delete "$INSTDIR\data\autorail.grf"
+	Delete "$INSTDIR\data\canalsw.grf"
+	Delete "$INSTDIR\data\dosdummy.grf"
+	Delete "$INSTDIR\data\elrailsw.grf"
 	Delete "$INSTDIR\data\nsignalsw.grf"
 	Delete "$INSTDIR\data\openttd.grf"
-	Delete "$INSTDIR\data\canalsw.grf"
+	Delete "$INSTDIR\data\roadstops.grf"
 	Delete "$INSTDIR\data\trkfoundw.grf"
-	Delete "$INSTDIR\data\autorail.grf"
-	Delete "$INSTDIR\data\dosdummy.grf"
+
 	Delete "$INSTDIR\data\sample.cat"
+	; Windows Data files
 	Delete "$INSTDIR\data\trg1r.grf"
 	Delete "$INSTDIR\data\trghr.grf"
 	Delete "$INSTDIR\data\trgtr.grf"
@@ -257,10 +283,10 @@
 	Delete "$INSTDIR\data\trgc.grf"
 	Delete "$INSTDIR\data\trgi.grf"
 
-	;Music
+	; Music
 	Delete "$INSTDIR\gm\*.gm"
 
-	;Language files
+	; Language files
 	Delete "$INSTDIR\lang\*.lng"
 	Delete "$INSTDIR\lang\english.txt"
 
@@ -271,104 +297,148 @@
 	RMDir "$INSTDIR\lang"
 	RMDir "$INSTDIR\data"
 	RMDir "$INSTDIR"
+
 SectionEnd
 
-Function SelectCD
+;------------------------------------------------------------
+; Custom page function to find the TTDLX CD/install location
+Function SelectCDEnter
 	SectionGetFlags ${Section2} $0
 	IntOp $1 $0 & 0x80 ; bit 7 set by upgrade, no need to copy files
-	IntCmp $1 1 DoneCD ;upgrade doesn't need copy files
+	IntCmp $1 1 DoneCD ; Upgrade doesn't need copy files
 
 	IntOp $0 $0 & 1
 	IntCmp $0 1 NoAbort
-		Abort
+	Abort
 NoAbort:
 
 	GetTempFileName $R0
 	!insertmacro MUI_HEADER_TEXT "Locate TTD" "Setup needs the location of Transport Tycoon Deluxe in order to continue."
-	File /oname=$R0 CDFinder.ini
+	!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "CDFinder.ini" "CDFinder"
+
 	ClearErrors
-	;Now, let's populate $CDDRIVE
-	ReadRegStr $CDDRIVE HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath"
+	; Now, let's populate $CDDRIVE
+	ReadRegStr $R0 HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath"
 	IfErrors NoTTD
-	StrCpy $AddWinPrePopulate "Setup has detected your TTD folder.  Don't change the folder.  Simply press Next."
+	StrCmp $CDDRIVE "" 0 Populated
+	StrCpy $CDDRIVE $R0
+Populated:
+	StrCpy $AddWinPrePopulate "Setup has detected your TTD folder. Don't change the folder. Simply press Next."
 	Goto TruFinish
 NoTTD:
-	StrCpy $CDDRIVE ""
-	StrCpy $AddWinPrePopulate "Setup couldn't find TTD.  Please enter the path where the graphics files from TTD are stored and press Next to continue."
+	StrCpy $AddWinPrePopulate "Setup couldn't find TTD. Please enter the path where the graphics files from TTD are stored and press Next to continue."
 TruFinish:
 	ClearErrors
-	WriteINIStr $R0 "Field 2" "State" $CDDRIVE
-	WriteINIStr $R0 "Field 3" "Text" $AddWinPrePopulate
+	!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 2" "State" $CDDRIVE          ; TTDLX path
+	!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 3" "Text" $AddWinPrePopulate ; Caption
 DoneCD:
-	InstallOptions::dialog $R0
-	Pop $R1
+	; Initialize the dialog *AFTER* we've changed the text otherwise we won't see the changes
+	!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "CDFinder"
+	!insertmacro MUI_INSTALLOPTIONS_SHOW
 FunctionEnd
 
-; Exit from page function
-Function SelectCD2
-	ReadINIStr $CDDRIVE $R0 "Field 2" "State"
-	IfFileExists $CDDRIVE\trg1r.grf "" NoCD
-	IfFileExists $CDDRIVE\sample.cat "" NoCD
-	IfFileExists $CDDRIVE\trgir.grf hasCD ""
+;----------------------------------------------------------------
+; Custom page function when 'next' is selected for the TTDLX path
+Function SelectCDExit
+	!insertmacro MUI_INSTALLOPTIONS_READ $CDDRIVE "CDFinder" "Field 2" "State"
+	; If trg1r.grf does not exist at the path, retry with DOS version
+	IfFileExists $CDDRIVE\trg1r.grf "" DosCD
+	IfFileExists $CDDRIVE\trgir.grf "" NoCD
+	IfFileExists $CDDRIVE\sample.cat hasCD NoCD
+DosCD:
+	IfFileExists $CDDRIVE\TRG1.GRF "" NoCD
+	IfFileExists $CDDRIVE\TRGI.GRF "" NoCD
+	IfFileExists $CDDRIVE\SAMPLE.CAT hasCD NoCD
 NoCD:
-  MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe Location!"
-  Abort
+	MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe Location!"
+	Abort
 hasCD:
 FunctionEnd
 
+;---------------------------------------------------------------------
+; Custom page function to show notices for running OpenTTD
+; We have extracted this custom page as Notice in the .onInit function
+Function ShowWarningsPage
+	!insertmacro MUI_HEADER_TEXT "Installation Complete" "Important notices for OpenTTD usage."
+	!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "notice.ini" "Notice"
+	!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "Notice"
+
+	Call GetWindowsVersion
+	Pop $R0
+
+	; Hide the MSLU text if the installer is not run on Win9x systems
+	StrCmp $R0 "winnt" 0 Win9x
+	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 1" "HWND" ; MSLU groupbox
+	ShowWindow $R1 0
+	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 2" "HWND" ; MSLU text
+	ShowWindow $R1 0
+	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 3" "HWND" ; MSLU link
+	ShowWindow $R1 0
+Win9x:
+	ClearErrors
+	!insertmacro MUI_INSTALLOPTIONS_SHOW
+FunctionEnd
+
+;-------------------------------------------------------------------------------
+; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack
+Function GetWindowsVersion
+	ClearErrors
+	StrCpy $R0 "winnt"
+
+	ReadRegStr $R1 HKLM "SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion" CurrentVersion
+	IfErrors 0 WinNT
+	StrCpy $R0 "win9x"
+WinNT:
+	ClearErrors
+	Push $R0
+FunctionEnd
 
 Var OLDVERSION
 Var UninstallString
 
+;-----------------------------------------------------------------------------------
+; NSIS Initialize function, determin if we are going to install/upgrade or uninstall
 Function .onInit
 	StrCpy $SHORTCUTS "OpenTTD"
 
 	SectionSetFlags 0 17
 
-	;Want to have a splash BMP?  Uncomment these lines - CAREFUL WITH FILE SIZE
-
-;	        # the plugins dir is automatically deleted when the installer exits
-;        InitPluginsDir
-;				File /oname=$PLUGINSDIR\splash.bmp "C:\Documents and Settings\Administrator\My Documents\My Pictures\OpenTTD Splash.bmp"
-;        #optional
-;        #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
-;
-;        ;MessageBox MB_OK "Fading"
-;
-;       advsplash::show 3000 600 400 -1 $PLUGINSDIR\splash
-;
-;      Pop $0          ; $0 has '1' if the user closed the splash screen early,
-;                        ; '0' if everything closed normal, and '-1' if some error occured.
-;End Splash Area
-		;Starts Setup - let's look for an older version of OpenTTD
+	; Starts Setup - let's look for an older version of OpenTTD
 	ReadRegDWORD $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version"
 
 	IfErrors ShowWelcomeMessage ShowUpgradeMessage
 ShowWelcomeMessage:
 	ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version"
-	;In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry)
+	; In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry)
 	IfErrors FinishCallback
 
 ShowUpgradeMessage:
 	IntCmp ${INSTALLERVERSION} $R8 VersionsAreEqual InstallerIsOlder  WelcomeToSetup
 WelcomeToSetup:
-	;An older version was found.  Let's let the user know there's an upgrade that will take plce.
+	; An older version was found.  Let's let the user know there's an upgrade that will take place.
 	ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion"
-	;Gets the older version then displays it in a message box
-	MessageBox MB_OK|MB_ICONINFORMATION "Welcome to ${APPNAMEANDVERSION} Setup.$\n$\nThis will allow you to upgrade from version $OLDVERSION."
+	; Gets the older version then displays it in a message box
+	MessageBox MB_OK|MB_ICONINFORMATION \
+		"Welcome to ${APPNAMEANDVERSION} Setup.$\n \
+		This will allow you to upgrade from version $OLDVERSION."
 	SectionSetFlags ${Section2} 0x80 ; set bit 7
 	Goto FinishCallback
 
 VersionsAreEqual:
 	ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString"
 	IfFileExists "$UninstallString" "" FinishCallback
-	MessageBox MB_YESNO|MB_ICONQUESTION "Setup detected ${APPNAMEANDVERSION} on your system. That's the version this program will install.$\n$\nAre you trying to uninstall it?" IDYES DoUninstall IDNO FinishCallback
-DoUninstall: ;You have the same version as this installer.  This allows you to uninstall.
+	MessageBox MB_YESNO|MB_ICONQUESTION \
+		"Setup detected ${APPNAMEANDVERSION} on your system. That's the version this program will install.$\n \
+		Are you trying to uninstall it?" \
+		IDYES DoUninstall IDNO FinishCallback
+DoUninstall: ; You have the same version as this installer.  This allows you to uninstall.
 	Exec "$UninstallString"
 	Quit
 
 InstallerIsOlder:
-	MessageBox MB_OK|MB_ICONSTOP "You have a newer version of ${APPNAME}.$\n$\nSetup will now exit."
+	MessageBox MB_OK|MB_ICONSTOP \
+		"You have a newer version of ${APPNAME}.$\n \
+		Setup will now exit."
 	Quit
 
 FinishCallback:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/os/win32/installer/notice.ini	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,54 @@
+; Ini file generated by the HM NIS Edit IO designer.
+[Settings]
+NumFields=6
+
+[Field 1]
+Type=Groupbox
+Text=Notice for Windows 9x/ME users!
+Left=8
+Right=292
+Top=80
+Bottom=138
+
+[Field 2]
+Type=Label
+Text=OpenTTD will not work without the Microsoft Layer for Unicode installed.\r\nDue to licensing issues we cannot bundle this file with the installer. Please download MSLU from the Microsoft website and extract UnicoWS.dll to the same directory as the openttd executabe.
+Left=13
+Right=284
+Top=91
+Bottom=127
+
+[Field 3]
+Type=Link
+Text=Microsoft Layer for Unicode
+State=http://www.microsoft.com/downloads/details.aspx?FamilyId=73BA7BD7-ED06-4F0D-80A4-2A7EEAEE17E2&displaylang=en
+Left=197
+Right=284
+Top=127
+Bottom=135
+
+[Field 4]
+Type=Groupbox
+Text=UNICODE support
+Left=8
+Right=292
+Top=0
+Bottom=75
+
+[Field 5]
+Type=Label
+Text=This version of OpenTTD has support for UNICODE, allowing users to use non-ASCII character sets such as Russian or Japanese.\r\nSelecting such a language will result in an unusable and garbled interface. You will need to specify a font that has support for these characters in openttd.cfg, or alternatively use an appropiate grf file.\r\n\r\nFor more information please refer to the readme or the wiki.
+Left=13
+Right=284
+Top=9
+Bottom=65
+
+[Field 6]
+Type=Link
+Text=OpenTTD wiki
+Left=238
+Right=284
+Top=64
+Bottom=72
+State=http://wiki.openttd.org/index.php/Unicode
+
--- a/projects/generate	Sat Mar 03 20:33:32 2007 +0000
+++ b/projects/generate	Sun Mar 04 04:25:36 2007 +0000
@@ -130,27 +130,33 @@
 generate() {
 	echo "Generating $2..."
 	# Everything above the !!FILES!! marker
-	RES="`cat \"$ROOT_DIR/projects/$2\".in | tr '\r' '\n' | awk '
+	cat "$ROOT_DIR/projects/$2".in | tr '\r' '\n' | awk '
 		/^$/ { next }
 		/!!FILES!!/ { stop = 1; }
 		{
 			if (stop == 0) { print $0 }
 		}
-	' > \"$ROOT_DIR/projects/$2\"`"
+	' > "$ROOT_DIR/projects/$2"
 
 	# The files-list
-	if [ "$3" = "msvc2003" ]; then
-		echo "$1" | sed 's@\&#x0D;\&#x0A;@\n@' >> "$ROOT_DIR/projects/$2"
-	else
-		echo "$1" | sed '
-			s@Filter="">@>@;
-			s@^\([	]*\)\([^	<].*[^/]\)>$@\1\2\n\1>@g;
-			s@^	\([	]*\)\([^	<].*\)/>$@	\1\2\n\1/>@g;
-		' >> "$ROOT_DIR/projects/$2"
-	fi
+	echo "$1" | awk -v type="$3" '
+		/&#x0D;&#x0A;/ {
+			if (type == "msvc2003") gsub("&#x0D;&#x0A;", "\n", $0);
+		}
+		/Filter="">/ {
+			if (type == "msvc2005") gsub("Filter=\"\">", ">", $0);
+		}
+		/"\/>/ {
+			if (type == "msvc2005") gsub("/>", "\n" substr($0, 1, index($0, $1) - 2) "/>", $0);
+		}
+		/">/ {
+			if (type == "msvc2005") gsub(">", "\n" substr($0, 1, index($0, $1) - 1) ">", $0);
+		}
+		{ print $0 }
+	' >> "$ROOT_DIR/projects/$2"
 
 	# Everything below the !!FILES!! marker
-	RES="`cat \"$ROOT_DIR/projects/$2\".in | tr '\r' '\n' | awk '
+	cat "$ROOT_DIR/projects/$2".in | tr '\r' '\n' | awk '
 		BEGIN { stop = 1; }
 		/^$/ { next }
 		/!!FILES!!/ { stop = 2; }
@@ -158,7 +164,7 @@
 			if (stop == 0) { print $0 }
 			if (stop == 2) { stop = 0 }
 		}
-	' >> \"$ROOT_DIR/projects/$2\"`"
+	' >> "$ROOT_DIR/projects/$2"
 }
 
 load_main_data "$ROOT_DIR/source.list" openttd
--- a/projects/openttd.vcproj	Sat Mar 03 20:33:32 2007 +0000
+++ b/projects/openttd.vcproj	Sun Mar 04 04:25:36 2007 +0000
@@ -555,6 +555,9 @@
 				RelativePath=".\..\src\player.h">
 			</File>
 			<File
+				RelativePath=".\..\src\player_face.h">
+			</File>
+			<File
 				RelativePath=".\..\src\queue.h">
 			</File>
 			<File
--- a/projects/openttd_vs80.vcproj	Sat Mar 03 20:33:32 2007 +0000
+++ b/projects/openttd_vs80.vcproj	Sun Mar 04 04:25:36 2007 +0000
@@ -968,6 +968,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\player_face.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\queue.h"
 				>
 			</File>
--- a/readme.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/readme.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 OpenTTD README
-Last updated:    2007-02-08
-Release version: 0.5.0-RC5
+Last updated:    2007-02-27
+Release version: 0.5.0
 ------------------------------------------------------------------------
 
 
--- a/source.list	Sat Mar 03 20:33:32 2007 +0000
+++ b/source.list	Sun Mar 04 04:25:36 2007 +0000
@@ -152,6 +152,7 @@
 openttd.h
 pathfind.h
 player.h
+player_face.h
 queue.h
 rail.h
 road_cmd.h
--- a/src/aircraft_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/aircraft_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -390,6 +390,9 @@
 		v->random_bits = VehicleRandomBits();
 		u->random_bits = VehicleRandomBits();
 
+		v->vehicle_flags = 0;
+		if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SETBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
+
 		VehiclePositionChanged(v);
 		VehiclePositionChanged(u);
 
@@ -859,21 +862,35 @@
 	}
 }
 
-/** Special velocities for aircraft
+/**
+ * Special velocities for aircraft
  */
 enum AircraftSpeedLimits {
-	SPEED_LIMIT_NONE   =  0,  ///< No environmental speed limit. Speed limit is type dependent
-	SPEED_LIMIT_TAXI   = 12,  ///< Maximum speed of an aircraft while taxiing
-	SPEED_LIMIT_BROKEN = 27,  ///< Maximum speed of an aircraft that is broken
+	SPEED_LIMIT_TAXI     =     50,  ///< Maximum speed of an aircraft while taxiing
+	SPEED_LIMIT_APPROACH =    230,  ///< Maximum speed of an aircraft on finals
+	SPEED_LIMIT_BROKEN   =    320,  ///< Maximum speed of an aircraft that is broken
+	SPEED_LIMIT_HOLD     =    425,  ///< Maximum speed of an aircraft that flies the holding pattern
+	SPEED_LIMIT_NONE     = 0xFFFF   ///< No environmental speed limit. Speed limit is type dependent
 };
 
-static bool UpdateAircraftSpeed(Vehicle *v, uint speed_limit)
+/**
+ * Sets the new speed for an aircraft
+ * @param v The vehicle for which the speed should be obtained
+ * @param speed_limit The maximum speed the vehicle may have.
+ * @param hard_limit If true, the limit is directly enforced, otherwise the plane is slowed down gradually
+ * @return The number of position updates needed within the tick
+ */
+static int UpdateAircraftSpeed(Vehicle *v, uint speed_limit = SPEED_LIMIT_NONE, bool hard_limit = true)
 {
-	uint spd = v->acceleration * 2;
+	uint spd = v->acceleration * 16;
 	byte t;
 
+	speed_limit = min(speed_limit, v->max_speed);
+
 	v->subspeed = (t=v->subspeed) + (byte)spd;
-	if (speed_limit == SPEED_LIMIT_NONE) speed_limit = v->max_speed;
+
+	if (!hard_limit && v->cur_speed > speed_limit) speed_limit = v->cur_speed - (v->cur_speed / 48);
+
 	spd = min(v->cur_speed + (spd >> 8) + (v->subspeed < t), speed_limit);
 
 	/* adjust speed for broken vehicles */
@@ -888,13 +905,9 @@
 
 	if (!(v->direction & 1)) spd = spd * 3 / 4;
 
-	if (spd == 0) return false;
-
-	if ((byte)++spd == 0) return true;
-
-	v->progress = (t = v->progress) - (byte)spd;
-
-	return t < v->progress;
+	spd += v->progress;
+	v->progress = (byte)spd;
+	return spd >> 8;
 }
 
 /**
@@ -919,20 +932,28 @@
 		case DIR_NE:
 		case DIR_E:
 		case DIR_SE:
-			base_altitude += 15;
+			base_altitude += 10;
 			break;
 
 		default: break;
 	}
 
 	/* Make faster planes fly higher so that they can overtake slower ones */
-	base_altitude += min(30 * (v->max_speed / 37), 90);
+	base_altitude += min(20 * (v->max_speed / 200), 90);
 
 	return base_altitude;
 }
 
+/**
+ * Controls the movement of an aircraft. This function actually moves the vehicle
+ * on the map and takes care of minor things like sound playback.
+ * @todo    De-mystify the cur_speed values for helicopter rotors.
+ * @param v The vehicle that is moved. Must be the first vehicle of the chain
+ * @return  Whether the position requested by the State Machine has been reached
+ */
 static bool AircraftController(Vehicle *v)
 {
+	int count;
 	const Station *st = GetStation(v->u.air.targetairport);
 
 	/* prevent going to 0,0 if airport is deleted. */
@@ -955,7 +976,8 @@
 			if (--u->cur_speed == 32) SndPlayVehicleFx(SND_18_HELICOPTER, v);
 		} else {
 			u->cur_speed = 32;
-			if (UpdateAircraftSpeed(v, SPEED_LIMIT_NONE)) {
+			count = UpdateAircraftSpeed(v);
+			if (count > 0) {
 				v->tile = 0;
 
 				/* Reached altitude? */
@@ -963,7 +985,7 @@
 					v->cur_speed = 0;
 					return true;
 				}
-				SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos+1);
+				SetAircraftPosition(v, v->x_pos, v->y_pos, min(v->z_pos + count, 184));
 			}
 		}
 		return false;
@@ -971,7 +993,8 @@
 
 	/* Helicopter landing. */
 	if (amd->flag & AMED_HELI_LOWER) {
-		if (UpdateAircraftSpeed(v, SPEED_LIMIT_NONE)) {
+		count = UpdateAircraftSpeed(v);
+		if (count > 0) {
 			if (st->airport_tile == 0) {
 				/* FIXME - AircraftController -> if station no longer exists, do not land
 				 * helicopter will circle until sign disappears, then go to next order
@@ -985,7 +1008,7 @@
 			v->tile = st->airport_tile;
 
 			/* Find altitude of landing position. */
-			uint z = GetSlopeZ(x, y) + 1 + afc->delta_z;
+			int z = GetSlopeZ(x, y) + 1 + afc->delta_z;
 
 			if (z == v->z_pos) {
 				Vehicle *u = v->next->next;
@@ -994,9 +1017,9 @@
 				if (u->cur_speed >= 80) return true;
 				u->cur_speed += 4;
 			} else if (v->z_pos > z) {
-				SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos-1);
+				SetAircraftPosition(v, v->x_pos, v->y_pos, max(v->z_pos - count, z));
 			} else {
-				SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos+1);
+				SetAircraftPosition(v, v->x_pos, v->y_pos, min(v->z_pos + count, z));
 			}
 		}
 		return false;
@@ -1006,8 +1029,7 @@
 	uint dist = myabs(x + amd->x - v->x_pos) +  myabs(y + amd->y - v->y_pos);
 
 	/* Need exact position? */
-	if (!(amd->flag & AMED_EXACTPOS) && dist <= (amd->flag & AMED_SLOWTURN ? 8U : 4U))
-		return true;
+	if (!(amd->flag & AMED_EXACTPOS) && dist <= (amd->flag & AMED_SLOWTURN ? 8U : 4U)) return true;
 
 	/* At final pos? */
 	if (dist == 0) {
@@ -1029,71 +1051,82 @@
 		return false;
 	}
 
-	if (!UpdateAircraftSpeed(v, ((amd->flag & AMED_NOSPDCLAMP) == 0) ? SPEED_LIMIT_TAXI : SPEED_LIMIT_NONE)) return false;
+	uint speed_limit = SPEED_LIMIT_TAXI;
+	bool hard_limit = true;
+
+	if (amd->flag & AMED_NOSPDCLAMP)   speed_limit = SPEED_LIMIT_NONE;
+	if (amd->flag & AMED_HOLD)       { speed_limit = SPEED_LIMIT_HOLD;     hard_limit = false; }
+	if (amd->flag & AMED_LAND)       { speed_limit = SPEED_LIMIT_APPROACH; hard_limit = false; }
+	if (amd->flag & AMED_BRAKE)      { speed_limit = SPEED_LIMIT_TAXI;     hard_limit = false; }
+
+	count = UpdateAircraftSpeed(v, speed_limit, hard_limit);
+	if (count == 0) return false;
 
 	if (v->load_unload_time_rem != 0) v->load_unload_time_rem--;
 
-	/* Turn. Do it slowly if in the air. */
-	Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y);
-	if (newdir != v->direction) {
-		if (amd->flag & AMED_SLOWTURN) {
-			if (v->load_unload_time_rem == 0) v->load_unload_time_rem = 8;
-			v->direction = newdir;
-		} else {
-			v->cur_speed >>= 1;
+	do {
+		/* Turn. Do it slowly if in the air. */
+		Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y);
+		if (newdir != v->direction) {
 			v->direction = newdir;
-		}
-	}
-
-	/* Move vehicle. */
-	GetNewVehiclePosResult gp = GetNewVehiclePos(v);
-	v->tile = gp.new_tile;
-
-	/* If vehicle is in the air, use tile coordinate 0. */
-	if (amd->flag & (AMED_TAKEOFF | AMED_SLOWTURN | AMED_LAND)) v->tile = 0;
-
-	/* Adjust Z for land or takeoff? */
-	uint z = v->z_pos;
-
-	if (amd->flag & AMED_TAKEOFF) {
-		z = min(z + 2, GetAircraftFlyingAltitude(v));
-	}
-
-	if (amd->flag & AMED_LAND) {
-		if (st->airport_tile == 0) {
-			v->u.air.state = FLYING;
-			AircraftNextAirportPos_and_Order(v);
-			/* get aircraft back on running altitude */
-			SetAircraftPosition(v, gp.x, gp.y, GetAircraftFlyingAltitude(v));
-			return false;
+			if (amd->flag & AMED_SLOWTURN) {
+				if (v->load_unload_time_rem == 0) v->load_unload_time_rem = 8;
+			} else {
+				v->cur_speed >>= 1;
+			}
 		}
 
-		uint curz = GetSlopeZ(x, y) + 1;
-
-		if (curz > z) {
-			z++;
-		} else {
-			int t = max(1U, dist - 4);
+		/* Move vehicle. */
+		GetNewVehiclePosResult gp = GetNewVehiclePos(v);
+		v->tile = gp.new_tile;
+		/* If vehicle is in the air, use tile coordinate 0. */
+		// if (amd->flag & (AMED_TAKEOFF | AMED_SLOWTURN | AMED_LAND)) v->tile = 0;
 
-			z -= ((z - curz) + t - 1) / t;
-			if (z < curz) z = curz;
-		}
-	}
+		/* Adjust Z for land or takeoff? */
+		uint z = v->z_pos;
 
-	/* We've landed. Decrase speed when we're reaching end of runway. */
-	if (amd->flag & AMED_BRAKE) {
-		uint curz = GetSlopeZ(x, y) + 1;
-
-		if (z > curz) {
-			z--;
-		} else if (z < curz) {
-			z++;
+		if (amd->flag & AMED_TAKEOFF) {
+			z = min(z + 2, GetAircraftFlyingAltitude(v));
 		}
 
-		if (dist < 64 && v->cur_speed > 12) v->cur_speed -= 4;
-	}
+		if ((amd->flag & AMED_HOLD) && (z > 150)) z--;
 
-	SetAircraftPosition(v, gp.x, gp.y, z);
+		if (amd->flag & AMED_LAND) {
+			if (st->airport_tile == 0) {
+				/* Airport has been removed, abort the landing procedure */
+				v->u.air.state = FLYING;
+				AircraftNextAirportPos_and_Order(v);
+				/* get aircraft back on running altitude */
+				SetAircraftPosition(v, gp.x, gp.y, GetAircraftFlyingAltitude(v));
+				continue;
+			}
+
+			uint curz = GetSlopeZ(x, y) + 1;
+
+			if (curz > z) {
+				z++;
+			} else {
+				int t = max(1U, dist - 4);
+
+				z -= ((z - curz) + t - 1) / t;
+				if (z < curz) z = curz;
+			}
+		}
+
+		/* We've landed. Decrase speed when we're reaching end of runway. */
+		if (amd->flag & AMED_BRAKE) {
+			uint curz = GetSlopeZ(x, y) + 1;
+
+			if (z > curz) {
+				z--;
+			} else if (z < curz) {
+				z++;
+			}
+
+		}
+
+		SetAircraftPosition(v, gp.x, gp.y, z);
+	} while (--count != 0);
 	return false;
 }
 
@@ -1215,14 +1248,39 @@
 
 	const Order *order = GetVehicleOrder(v, v->cur_order_index);
 
-	if (order == NULL) {
-		v->current_order.type = OT_NOTHING;
-		v->current_order.flags = 0;
+	if (order == NULL|| (order->type == OT_DUMMY && !CheckForValidOrders(v))) {
+		/*
+		 * We do not have an order. This can be divided into two cases:
+		 * 1) we are heading to an invalid station. In this case we must
+		 *    find another airport to go to. If there is nowhere to go,
+		 *    we will destroy the aircraft as it otherwise will enter
+		 *    the holding pattern for the first airport, which can cause
+		 *    the plane to go into an undefined state when building an
+		 *    airport with the same StationID.
+		 * 2) we are (still) heading to a (still) valid airport, then we
+		 *    can continue going there. This can happen when you are
+		 *    changing the aircraft's orders while in-flight or in for
+		 *    example a depot. However, when we have a current order to
+		 *    go to a depot, we have to keep that order so the aircraft
+		 *    actually stops.
+		 */
+		const Station *st = GetStation(v->u.air.targetairport);
+		if (!st->IsValid() || st->airport_tile == 0) {
+			int32 ret;
+			PlayerID old_player = _current_player;
+
+			_current_player = v->owner;
+			ret = DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR);
+			_current_player = old_player;
+
+			if (CmdFailed(ret)) CrashAirplane(v);
+		} else if (v->current_order.type != OT_GOTO_DEPOT) {
+			v->current_order.type = OT_NOTHING;
+			v->current_order.flags = 0;
+		}
 		return;
 	}
 
-	if (order->type == OT_DUMMY && !CheckForValidOrders(v)) CrashAirplane(v);
-
 	if (order->type  == v->current_order.type  &&
 			order->flags == v->current_order.flags &&
 			order->dest  == v->current_order.dest)
@@ -1259,7 +1317,7 @@
 
 			if (CanFillVehicle(v) && (
 						v->current_order.flags & OF_FULL_LOAD ||
-						(_patches.gradual_loading && !HASBIT(v->load_status, LS_LOADING_FINISHED))
+						(_patches.gradual_loading && !HASBIT(v->vehicle_flags, VF_LOADING_FINISHED))
 					)) {
 				SET_EXPENSES_TYPE(EXPENSES_AIRCRAFT_INC);
 				if (LoadUnloadVehicle(v, false)) {
@@ -2039,7 +2097,7 @@
 
 	AgeAircraftCargo(v);
 
-	for (uint i = 0; i != 6; i++) {
+	for (uint i = 0; i != 2; i++) {
 		AircraftEventHandler(v, i);
 		if (v->type != VEH_Aircraft) // In case it was deleted
 			break;
--- a/src/aircraft_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/aircraft_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -84,7 +84,7 @@
 
 		/* Draw max speed */
 		{
-			SetDParam(0, v->max_speed * 128 / 10);
+			SetDParam(0, v->max_speed * 10 / 16);
 			DrawString(2, 25, STR_A00E_MAX_SPEED, 0);
 		}
 
@@ -106,7 +106,13 @@
 		{
 			SetDParam(0, v->service_interval);
 			SetDParam(1, v->date_of_last_service);
-			DrawString(13, 103, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
+			DrawString(13, 115, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
+		}
+
+		/* Draw Transfer credits text */
+		{
+			SetDParam(0, v->cargo_feeder_share);
+			DrawString(60, 101, STR_FEEDER_CARGO_VALUE, 0);
 		}
 
 		DrawAircraftImage(v, 3, 57, INVALID_VEHICLE);
@@ -187,15 +193,15 @@
 {    WWT_CAPTION,   RESIZE_NONE,    14,    11,   349,     0,    13, STR_A00C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS },
 { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   350,   389,     0,    13, STR_01AA_NAME,    STR_A032_NAME_AIRCRAFT },
 {      WWT_PANEL,   RESIZE_NONE,    14,     0,   389,    14,    55, 0x0,              STR_NULL },
-{      WWT_PANEL,   RESIZE_NONE,    14,     0,   389,    56,   101, 0x0,              STR_NULL },
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   102,   107, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL },
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   108,   113, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL },
-{      WWT_PANEL,   RESIZE_NONE,    14,    11,   389,   102,   113, 0x0,              STR_NULL },
+{      WWT_PANEL,   RESIZE_NONE,    14,     0,   389,    56,   113, 0x0,              STR_NULL },
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   114,   119, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL },
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   120,   125, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL },
+{      WWT_PANEL,   RESIZE_NONE,    14,    11,   389,   114,   125, 0x0,              STR_NULL },
 {   WIDGETS_END},
 };
 
 static const WindowDesc _aircraft_details_desc = {
-	WDP_AUTO, WDP_AUTO, 390, 114,
+	WDP_AUTO, WDP_AUTO, 390, 126,
 	WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 	_aircraft_details_widgets,
@@ -263,14 +269,14 @@
 			switch (v->current_order.type) {
 			case OT_GOTO_STATION: {
 				SetDParam(0, v->current_order.dest);
-				SetDParam(1, v->cur_speed * 8);
+				SetDParam(1, v->cur_speed * 10 / 16);
 				str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
 			} break;
 
 			case OT_GOTO_DEPOT: {
 				/* Aircrafts always go to a station, even if you say depot */
 				SetDParam(0, v->current_order.dest);
-				SetDParam(1, v->cur_speed * 8);
+				SetDParam(1, v->cur_speed * 10 / 16);
 				if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
 					str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed;
 				} else {
@@ -285,7 +291,7 @@
 			default:
 				if (v->num_orders == 0) {
 					str = STR_NO_ORDERS + _patches.vehicle_speed;
-					SetDParam(0, v->cur_speed * 8);
+					SetDParam(0, v->cur_speed * 10 / 16);
 				} else {
 					str = STR_EMPTY;
 				}
--- a/src/airport.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/airport.h	Sun Mar 04 04:25:36 2007 +0000
@@ -36,6 +36,7 @@
 	AMED_BRAKE      = 1 << 5,
 	AMED_HELI_RAISE = 1 << 6,
 	AMED_HELI_LOWER = 1 << 7,
+	AMED_HOLD       = 1 << 8
 };
 
 /* Movement States on Airports (headings target) */
@@ -114,7 +115,7 @@
 typedef struct AirportMovingData {
 	int16 x;
 	int16 y;
-	byte flag;
+	uint16 flag;
 	DirectionByte direction;
 } AirportMovingData;
 
--- a/src/airport_movement.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/airport_movement.h	Sun Mar 04 04:25:36 2007 +0000
@@ -86,7 +86,7 @@
 };
 
 // City Airport (large) 6x6
-static const AirportMovingData _airport_moving_data_town[25] = {
+static const AirportMovingData _airport_moving_data_town[] = {
 	{   85,    3, AMED_EXACTPOS,                   {DIR_SE} }, // 00 In Hangar
 	{   85,   27, 0,                               {DIR_N} }, // 01 Taxi to right outside depot
 	{   26,   41, AMED_EXACTPOS,                   {DIR_SW} }, // 02 Terminal 1
@@ -100,18 +100,23 @@
 	{   89,   85, AMED_EXACTPOS,                   {DIR_NE} }, // 10 Taxi to start of runway (takeoff)
 	{    3,   85, AMED_NOSPDCLAMP,                 {DIR_N} }, // 11 Accelerate to end of runway
 	{  -79,   85, AMED_NOSPDCLAMP | AMED_TAKEOFF,  {DIR_N} }, // 12 Take off
-	{  177,   85, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 13 Fly to landing position in air
-	{   89,   85, AMED_NOSPDCLAMP | AMED_LAND,     {DIR_N} }, // 14 Going down for land
-	{    3,   85, AMED_NOSPDCLAMP | AMED_BRAKE,    {DIR_N} }, // 15 Just landed, brake until end of runway
-	{   20,   87, 0,                               {DIR_N} }, // 16 Just landed, turn around and taxi 1 square
+	{  177,   87, AMED_HOLD       | AMED_SLOWTURN, {DIR_N} }, // 13 Fly to landing position in air
+	{   89,   87, AMED_HOLD       | AMED_LAND,     {DIR_N} }, // 14 Going down for land
+	{   20,   87, AMED_NOSPDCLAMP | AMED_BRAKE,    {DIR_N} }, // 15 Just landed, brake until end of runway
+	{   20,   87, 0,                               {DIR_N} }, // 16 Just landed, turn around and taxi 1 square /* NOT USED */
 	{   36,   71, 0,                               {DIR_N} }, // 17 Taxi from runway to crossing
-	{  -31,  193, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 18 Fly around waiting for a landing spot (north-east)
-	{    1,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 19 Fly around waiting for a landing spot (north-west)
-	{  257,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 20 Fly around waiting for a landing spot (south-west)
-	{  273,   49, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 21 Fly around waiting for a landing spot (south)
+	{  160,   87, AMED_HOLD       | AMED_SLOWTURN, {DIR_N} }, // 18 Fly around waiting for a landing spot (north-east)
+	{  140,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 19 Final approach fix
+	{  257,    1, AMED_HOLD       | AMED_SLOWTURN, {DIR_N} }, // 20 Fly around waiting for a landing spot (south-west)
+	{  273,   49, AMED_HOLD       | AMED_SLOWTURN, {DIR_N} }, // 21 Fly around waiting for a landing spot (south)
 	{   44,   63, AMED_HELI_RAISE,                 {DIR_N} }, // 22 Helicopter takeoff
 	{   28,   74, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 23 In position above landing spot helicopter
 	{   28,   74, AMED_HELI_LOWER,                 {DIR_N} }, // 24 Helicopter landing
+	{  145,    1, AMED_HOLD       | AMED_SLOWTURN, {DIR_N} }, // 25 Fly around waiting for a landing spot (north-west)
+	{  -32,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 26 Initial approach fix (north)
+	{  300,  -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 27 Initial approach fix (south)
+	{  140,  -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 28 Intermediadate Approach fix (south), IAF (west)
+	{  -32,  120, AMED_NOSPDCLAMP | AMED_SLOWTURN, {DIR_N} }, // 29 Initial approach fix (east)
 };
 
 // Metropolitan Airport (metropolitan) - 2 runways
@@ -458,7 +463,7 @@
 
 static const TileIndexDiffC _airport_depots_city[] = { { 5, 0 } };
 static const byte _airport_terminal_city[] = { 1, 3 };
-static const byte _airport_entries_city[] = {19, 19, 19, 19};
+static const byte _airport_entries_city[] = {26, 29, 27, 28};
 static const AirportFTAbuildup _airport_fta_city[] = {
 	{  0, HANGAR, NOTHING_block, 1 }, { 0, TAKEOFF, OUT_WAY_block, 1 }, { 0, 0, 0, 1 },
 	{  1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, 0, 0, 7 }, // for all else, go to 7
@@ -477,11 +482,11 @@
 	// landing
 	{ 13, FLYING, NOTHING_block, 18 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 23 },
 	{ 14, LANDING, RUNWAY_IN_OUT_block, 15 },
-	{ 15, 0, RUNWAY_IN_OUT_block, 16 },
-	{ 16, 0, RUNWAY_IN_OUT_block, 17 },
+	{ 15, 0, RUNWAY_IN_OUT_block, 17 },
+	{ 16, 0, RUNWAY_IN_OUT_block, 17 }, /* not used, left for compatibility */
 	{ 17, ENDLANDING, IN_WAY_block, 7 },
 	// In Air
-	{ 18, 0, NOTHING_block, 19 },
+	{ 18, 0, NOTHING_block, 25 },
 	{ 19, 0, NOTHING_block, 20 },
 	{ 20, 0, NOTHING_block, 21 },
 	{ 21, 0, NOTHING_block, 13 },
@@ -489,6 +494,11 @@
 	{ 22, HELITAKEOFF, NOTHING_block, 0 },
 	{ 23, HELILANDING, IN_WAY_block, 24 },
 	{ 24, HELIENDLANDING, IN_WAY_block, 17 },
+	{ 25, 0, NOTHING_block, 20},
+	{ 26, 0, NOTHING_block, 19},
+	{ 27, 0, NOTHING_block, 28},
+	{ 28, 0, NOTHING_block, 19},
+	{ 29, 0, NOTHING_block, 26},
 	{ MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
 };
 
--- a/src/bridge.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/bridge.h	Sun Mar 04 04:25:36 2007 +0000
@@ -35,4 +35,6 @@
 	return &_bridge[i];
 }
 
+void DrawBridgeMiddle(const TileInfo* ti);
+
 #endif /* BRIDGE_H */
--- a/src/bridge_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/bridge_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -41,40 +41,38 @@
 static void BuildBridgeWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		uint i;
-
-		w->DrawWidgets();
-
-		for (i = 0; i < 4 && i + w->vscroll.pos < _bridgedata.count; i++) {
-			const Bridge *b = &_bridge[_bridgedata.indexes[i + w->vscroll.pos]];
+		case WE_PAINT:
+			w->DrawWidgets();
 
-			SetDParam(2, _bridgedata.costs[i + w->vscroll.pos]);
-			SetDParam(1, b->speed * 10 / 16);
-			SetDParam(0, b->material);
-			DrawSprite(b->sprite, b->pal, 3, 15 + i * 22);
+			for (uint i = 0; i < 4 && i + w->vscroll.pos < _bridgedata.count; i++) {
+				const Bridge *b = &_bridge[_bridgedata.indexes[i + w->vscroll.pos]];
 
-			DrawString(44, 15 + i * 22 , STR_500D, 0);
-		}
-	} break;
+				SetDParam(2, _bridgedata.costs[i + w->vscroll.pos]);
+				SetDParam(1, b->speed * 10 / 16);
+				SetDParam(0, b->material);
+				DrawSprite(b->sprite, b->pal, 3, 15 + i * 22);
 
-	case WE_KEYPRESS: {
-		uint i = e->we.keypress.keycode - '1';
-		if (i < 9 && i < _bridgedata.count) {
-			e->we.keypress.cont = false;
-			BuildBridge(w, i);
+				DrawString(44, 15 + i * 22 , STR_500D, 0);
+			}
+			break;
+
+		case WE_KEYPRESS: {
+			uint i = e->we.keypress.keycode - '1';
+			if (i < 9 && i < _bridgedata.count) {
+				e->we.keypress.cont = false;
+				BuildBridge(w, i);
+			}
+
+			break;
 		}
 
-		break;
-	}
-
-	case WE_CLICK:
-		if (e->we.click.widget == 2) {
-			uint ind = ((int)e->we.click.pt.y - 14) / 22;
-			if (ind < 4 && (ind += w->vscroll.pos) < _bridgedata.count)
-				BuildBridge(w, ind);
-		}
-		break;
+		case WE_CLICK:
+			if (e->we.click.widget == 2) {
+				uint ind = ((int)e->we.click.pt.y - 14) / 22;
+				if (ind < 4 && (ind += w->vscroll.pos) < _bridgedata.count)
+					BuildBridge(w, ind);
+			}
+			break;
 	}
 }
 
@@ -134,12 +132,11 @@
 		errmsg = _error_message;
 	} else {
 		// check which bridges can be built
-		int bridge_len;         // length of the middle parts of the bridge
-		int tot_bridgedata_len; // total length of bridge
-
 		// get absolute bridge length
-		bridge_len = GetBridgeLength(start, end);
-		tot_bridgedata_len = bridge_len + 2;
+		// length of the middle parts of the bridge
+		int bridge_len = GetBridgeLength(start, end);
+		// total length of bridge
+		int tot_bridgedata_len = bridge_len + 2;
 
 		tot_bridgedata_len = CalcBridgeLenCostFactor(tot_bridgedata_len);
 
--- a/src/bridge_map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/bridge_map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -13,9 +13,6 @@
 #include "tile.h"
 
 
-void DrawBridgeMiddle(const TileInfo* ti); // XXX
-
-
 static inline bool IsBridge(TileIndex t)
 {
 	assert(IsTileType(t, MP_TUNNELBRIDGE));
--- a/src/build_vehicle_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/build_vehicle_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -494,7 +494,7 @@
 
 	/* Purchase cost - Max speed */
 	SetDParam(0, avi->base_cost * (_price.aircraft_base>>3)>>5);
-	SetDParam(1, avi->max_speed * 8);
+	SetDParam(1, avi->max_speed * 10 / 16);
 	DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0);
 	y += 10;
 
--- a/src/clear_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/clear_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -15,6 +15,7 @@
 #include "command.h"
 #include "tunnel_map.h"
 #include "bridge_map.h"
+#include "bridge.h"
 #include "variables.h"
 #include "table/sprites.h"
 #include "unmovable_map.h"
--- a/src/debug.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/debug.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file debug.h */
+
 #ifndef DEBUG_H
 #define DEBUG_H
 
@@ -91,7 +93,7 @@
 	#define OTTD_PRINTF64 "ll"
 #endif
 
-// Used for profiling
+/* Used for profiling */
 #define TIC() {\
 	extern uint64 _rdtsc(void);\
 	uint64 _xxx_ = _rdtsc();\
--- a/src/depot.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/depot.h	Sun Mar 04 04:25:36 2007 +0000
@@ -9,6 +9,9 @@
 #include "oldpool.h"
 #include "tile.h"
 #include "variables.h"
+#include "road_map.h"
+#include "rail_map.h"
+#include "water_map.h"
 
 struct Depot {
 	TileIndex xy;
@@ -68,16 +71,16 @@
 {
 	switch (type) {
 		case TRANSPORT_RAIL:
-			return IsTileType(tile, MP_RAILWAY) && (_m[tile].m5 & 0xFC) == 0xC0;
+			return IsTileType(tile, MP_RAILWAY) && GetRailTileType(tile)  == RAIL_TILE_DEPOT;
 
 		case TRANSPORT_ROAD:
-			return IsTileType(tile, MP_STREET) && (_m[tile].m5 & 0xF0) == 0x20;
+			return IsTileType(tile, MP_STREET)  && GetRoadTileType(tile)  == ROAD_TILE_DEPOT;
 
 		case TRANSPORT_WATER:
-			return IsTileType(tile, MP_WATER) && (_m[tile].m5 & ~3) == 0x80;
+			return IsTileType(tile, MP_WATER)   && GetWaterTileType(tile) == WATER_TILE_DEPOT;
 
 		default:
-			assert(0);
+			NOT_REACHED();
 			return false;
 	}
 }
--- a/src/depot_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/depot_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-/** depot_gui.cpp */
+/** @file depot_gui.cpp */
 
 #include "stdafx.h"
 #include "openttd.h"
--- a/src/economy.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/economy.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -36,6 +36,7 @@
 #include "unmovable.h"
 #include "date.h"
 #include "cargotype.h"
+#include "player_face.h"
 
 /* Score info */
 const ScoreInfo _score_info[] = {
@@ -1330,13 +1331,15 @@
 int LoadUnloadVehicle(Vehicle *v, bool just_arrived)
 {
 	int profit = 0;
-	int v_profit = 0; //virtual profit for feeder systems
-	int v_profit_total = 0;
+	int total_veh_profit = 0;      // accumulates the profit across the vehicle chain (used by trains)
+	int32 route_profit = 0;        // the grand total amount for the route. A-D of transfer chain A-B-C-D
+	int virtual_profit = 0;        // virtual profit of one vehicle element for feeder systems
+	int virtual_profit_total = 0;  // virtual profit for entire vehicle chain
+	int total_cargo_feeder_share = 0;  // the feeder cash amount for the goods being loaded/unloaded in this load step
+
 	int unloading_time = 20;
 	Vehicle *u = v;
 	int result = 0;
-	StationID last_visited;
-	Station *st;
 	int t;
 	uint count, cap;
 	PlayerID old_player;
@@ -1352,13 +1355,15 @@
 	 * there is nothing left to load. It's easier to clear this if the
 	 * conditions haven't been met than attempting to check them all before
 	 * enabling though. */
-	SETBIT(v->load_status, LS_LOADING_FINISHED);
+	SETBIT(v->vehicle_flags, VF_LOADING_FINISHED);
 
 	old_player = _current_player;
 	_current_player = v->owner;
 
-	last_visited = v->last_station_visited;
-	st = GetStation(last_visited);
+	StationID last_visited = v->last_station_visited;
+	Station *st = GetStation(last_visited);
+
+	int all_vehicles_cargo_feeder_share = v->cargo_feeder_share; // used to hold transfer value of complete vehicle chain - used by trains
 
 	for (; v != NULL; v = v->next) {
 		GoodsEntry* ge;
@@ -1371,42 +1376,60 @@
 		if (v->cargo_cap == 0) continue;
 
 		/* If the vehicle has just arrived, set it to unload. */
-		if (just_arrived) SETBIT(v->load_status, LS_CARGO_UNLOADING);
+		if (just_arrived) SETBIT(v->vehicle_flags, VF_CARGO_UNLOADING);
 
 		ge = &st->goods[v->cargo_type];
 		count = GB(ge->waiting_acceptance, 0, 12);
 
 		/* unload? */
-		if (v->cargo_count != 0 && HASBIT(v->load_status, LS_CARGO_UNLOADING)) {
+		if (v->cargo_count != 0 && HASBIT(v->vehicle_flags, VF_CARGO_UNLOADING)) {
 			uint16 amount_unloaded = _patches.gradual_loading ? min(v->cargo_count, load_amount) : v->cargo_count;
 
-			CLRBIT(u->load_status, LS_LOADING_FINISHED);
+			CLRBIT(u->vehicle_flags, VF_LOADING_FINISHED);
 
 			if (v->cargo_source != last_visited && ge->waiting_acceptance & 0x8000 && !(u->current_order.flags & OF_TRANSFER)) {
 				/* deliver goods to the station */
 				st->time_since_unload = 0;
 
 				unloading_time += v->cargo_count; // TTDBUG: bug in original TTD
+
+				/* handle end of route payment */
 				if (just_arrived && v->cargo_paid_for < v->cargo_count) {
 					profit += DeliverGoods(v->cargo_count - v->cargo_paid_for, v->cargo_type, v->cargo_source, last_visited, v->cargo_source_xy, v->cargo_days);
 					v->cargo_paid_for = v->cargo_count;
+					route_profit = profit;       // display amount paid for final route delivery, A-D of a chain A-B-C-D
+					total_veh_profit = profit - all_vehicles_cargo_feeder_share;  // whole vehicle is not payed for transfers picked up earlier
+					total_cargo_feeder_share = -all_vehicles_cargo_feeder_share;  // total of transfer fees in vehicle chain needs to be zero at end of unload
+					v->cargo_feeder_share = 0;   // clear transfer cost per vehicle
 				}
 				result |= 1;
 				v->cargo_count -= amount_unloaded;
 				v->cargo_paid_for -= min(amount_unloaded, v->cargo_paid_for);
 				if (_patches.gradual_loading) continue;
+
 			} else if (u->current_order.flags & (OF_UNLOAD | OF_TRANSFER)) {
+
 				/* unload goods and let it wait at the station */
 				st->time_since_unload = 0;
+
+				/* handle transfer */
 				if (just_arrived && (u->current_order.flags & OF_TRANSFER) && v->cargo_paid_for < v->cargo_count) {
-					v_profit = GetTransportedGoodsIncome(
+					virtual_profit = GetTransportedGoodsIncome(
 						v->cargo_count - v->cargo_paid_for,
-						DistanceManhattan(v->cargo_source_xy, GetStation(last_visited)->xy),
+						/* pay transfer vehicle for only the part of transfer it has done: ie. cargo_loaded_at_xy to here */
+						DistanceManhattan(v->cargo_loaded_at_xy, GetStation(last_visited)->xy),
 						v->cargo_days,
-						v->cargo_type) * 3 / 2;
+						v->cargo_type);
 
-					v_profit_total += v_profit;
-					v->cargo_paid_for = v->cargo_count;
+					ge->feeder_profit += v->cargo_feeder_share;         // transfer cargo transfer fees to station
+					total_cargo_feeder_share -= v->cargo_feeder_share;  // accumulate deduction of feeder shares
+					v->cargo_feeder_share = 0;                          // clear transfer cost
+
+					/* keep total of cargo unloaded (pending) for accurate cargoshare calculation on load */
+					SB(ge->unload_pending, 0, 12, GB(ge->unload_pending, 0, 12) + v->cargo_count);
+
+					virtual_profit_total += virtual_profit;   // accumulate transfer profits for whole vehicle
+					v->cargo_paid_for = v->cargo_count;       // record how much of the cargo has been paid for to eliminate double counting
 				}
 
 				unloading_time += v->cargo_count;
@@ -1428,9 +1451,13 @@
 				/* Update amount of waiting cargo */
 				SB(ge->waiting_acceptance, 0, 12, min(amount_unloaded + t, 0xFFF));
 
+				/* if there is not enough to unload from pending, ensure it does not go -ve
+				 * else deduct amount actually unloaded from unload_pending */
+				SB(ge->unload_pending, 0, 12, max(GB(ge->unload_pending, 0, 12) - amount_unloaded, 0U));
+
 				if (u->current_order.flags & OF_TRANSFER) {
-					ge->feeder_profit += v_profit;
-					u->profit_this_year += v_profit;
+					ge->feeder_profit += virtual_profit;
+					u->profit_this_year += virtual_profit;
 				}
 				result |= 2;
 				v->cargo_count -= amount_unloaded;
@@ -1442,8 +1469,8 @@
 		}
 
 		/* The vehicle must have been unloaded because it is either empty, or
-		 * the UNLOADING bit is already clear in v->load_status. */
-		CLRBIT(v->load_status, LS_CARGO_UNLOADING);
+		 * the UNLOADING bit is already clear in v->vehicle_flags. */
+		CLRBIT(v->vehicle_flags, VF_CARGO_UNLOADING);
 
 		/* We cannot have paid for more cargo than there is on board. */
 		assert(v->cargo_paid_for <= v->cargo_count);
@@ -1467,8 +1494,6 @@
 		 * has capacity for it, load it on the vehicle. */
 		if (count != 0 &&
 				(cap = v->cargo_cap - v->cargo_count) != 0) {
-			int cargoshare;
-			int feeder_profit_share;
 
 			if (v->cargo_count == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO);
 
@@ -1488,12 +1513,21 @@
 
 			if (cap > count) cap = count;
 			if (_patches.gradual_loading) cap = min(cap, load_amount);
-			if (cap < count) CLRBIT(u->load_status, LS_LOADING_FINISHED);
-			cargoshare = cap * 10000 / ge->waiting_acceptance;
-			feeder_profit_share = ge->feeder_profit * cargoshare / 10000;
+			if (cap < count) CLRBIT(u->vehicle_flags, VF_LOADING_FINISHED);
+
+			/* cargoshare is proportioned by the amount due to unload
+			 * Otherwise, with gradual loading, 100% of credits would be taken immediately,
+			 * even if the cargo volume represents a tiny percent of the whole.
+			 * ge->unload_pending holds the amount that has been credited, but has not yet been unloaded.
+			 */
+			int cargoshare = cap * 10000 / (ge->waiting_acceptance + ge->unload_pending);
+			int feeder_profit_share = ge->feeder_profit * cargoshare / 10000;
 			v->cargo_count += cap;
 			ge->waiting_acceptance -= cap;
-			u->profit_this_year -= feeder_profit_share;
+
+			total_cargo_feeder_share += feeder_profit_share;    // store cost for later payment when cargo unloaded
+			v->cargo_loaded_at_xy = st->xy;                     // retains location of where the cargo was picked up for intermediate payments
+
 			ge->feeder_profit -= feeder_profit_share;
 			unloading_time += cap;
 			st->time_since_load = 0;
@@ -1509,13 +1543,17 @@
 
 	v = u;
 
+	/* Ensure a negative total is only applied to the vehicle if there is value to reduce. */
+	if (!((v->cargo_feeder_share == 0) && (total_cargo_feeder_share < 0)))
+		v->cargo_feeder_share += total_cargo_feeder_share;
+
 	if (_patches.gradual_loading) {
 		/* The time it takes to load one 'slice' of cargo or passengers depends
 		 * on the vehicle type - the values here are those found in TTDPatch */
 		uint gradual_loading_wait_time[] = { 40, 20, 10, 20 };
 
 		unloading_time = gradual_loading_wait_time[v->type];
-		if (HASBIT(v->load_status, LS_LOADING_FINISHED)) {
+		if (HASBIT(v->vehicle_flags, VF_LOADING_FINISHED)) {
 			if (anything_loaded) {
 				unloading_time += 20;
 			} else {
@@ -1524,8 +1562,8 @@
 		}
 	}
 
-	if (v_profit_total > 0) {
-		ShowFeederIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, v_profit_total);
+	if (virtual_profit_total > 0) {
+		ShowFeederIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, virtual_profit_total);
 	}
 
 	if (v->type == VEH_Train) {
@@ -1549,15 +1587,15 @@
 
 		if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited);
 
-		if (profit != 0) {
-			v->profit_this_year += profit;
-			SubtractMoneyFromPlayer(-profit);
+		if (route_profit != 0) {
+			v->profit_this_year += total_veh_profit;
+			SubtractMoneyFromPlayer(-route_profit);
 
 			if (IsLocalPlayer() && !PlayVehicleSound(v, VSE_LOAD_UNLOAD)) {
 				SndPlayVehicleFx(SND_14_CASHTILL, v);
 			}
 
-			ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, -profit);
+			ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, -total_veh_profit);
 		}
 	}
 
--- a/src/elrail.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/elrail.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -81,8 +81,8 @@
 			switch (GetRailTileType(t)) {
 				case RAIL_TILE_NORMAL: case RAIL_TILE_SIGNALS:
 					return GetTrackBits(t);
-				case RAIL_TILE_DEPOT_WAYPOINT:
-					if (GetRailTileSubtype(t) == RAIL_SUBTYPE_WAYPOINT) return GetRailWaypointBits(t);
+				case RAIL_TILE_WAYPOINT:
+					return GetRailWaypointBits(t);
 				default:
 					return TRACK_BIT_NONE;
 			}
@@ -103,7 +103,7 @@
 
 		case MP_STREET:
 			if (GetRoadTileType(t) != ROAD_TILE_CROSSING) return TRACK_BIT_NONE;
-			if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return TRACK_BIT_NONE;
+			if (GetRailType(t) != RAILTYPE_ELECTRIC) return TRACK_BIT_NONE;
 			return GetCrossingRailBits(t);
 
 		case MP_STATION:
--- a/src/engine.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/engine.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -28,12 +28,6 @@
 RoadVehicleInfo _road_vehicle_info[NUM_ROAD_ENGINES];
 
 enum {
-	ENGINE_AVAILABLE   = 1,
-	ENGINE_INTRODUCING = 2,
-	ENGINE_PREVIEWING  = 4,
-};
-
-enum {
 	YEAR_ENGINE_AGING_STOPS = 2050,
 };
 
@@ -224,10 +218,10 @@
 	for (i = 0; i != lengthof(_engines); i++) {
 		Engine *e = &_engines[i];
 
-		if (e->flags & ENGINE_INTRODUCING) {
-			if (e->flags & ENGINE_PREVIEWING) {
+		if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) {
+			if (e->flags & ENGINE_OFFER_WINDOW_OPEN) {
 				if (e->preview_player != 0xFF && !--e->preview_wait) {
-					e->flags &= ~ENGINE_PREVIEWING;
+					e->flags &= ~ENGINE_OFFER_WINDOW_OPEN;
 					DeleteWindowById(WC_ENGINE_PREVIEW, i);
 					e->preview_player++;
 				}
@@ -243,7 +237,7 @@
 					/* XXX - TTDBUG: TTD has a bug here ???? */
 					AcceptEnginePreview(i, best_player);
 				} else {
-					e->flags |= ENGINE_PREVIEWING;
+					e->flags |= ENGINE_OFFER_WINDOW_OPEN;
 					e->preview_wait = 20;
 					if (IsInteractivePlayer(best_player)) ShowEnginePreviewWindow(i);
 				}
@@ -285,7 +279,7 @@
 
 	/* In case the player didn't build the vehicle during the intro period,
 	 * prevent that player from getting future intro periods for a while. */
-	if (e->flags & ENGINE_INTRODUCING) {
+	if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) {
 		FOR_ALL_PLAYERS(p) {
 			uint block_preview = p->block_preview;
 
@@ -307,7 +301,7 @@
 		}
 	}
 
-	e->flags = (e->flags & ~ENGINE_INTRODUCING) | ENGINE_AVAILABLE;
+	e->flags = (e->flags & ~ENGINE_EXCLUSIVE_PREVIEW) | ENGINE_AVAILABLE;
 	AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type);
 
 	/* Now available for all players */
@@ -323,15 +317,8 @@
 		FOR_ALL_PLAYERS(p) {
 			if (p->is_active) SETBIT(p->avail_railtypes, railtype);
 		}
-
-		AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_TRAINAVAIL), 0, 0);
-	} else if (index < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES) {
-		AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_ROADAVAIL), 0, 0);
-	} else if (index < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES) {
-		AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_SHIPAVAIL), 0, 0);
-	} else {
-		AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_AIRCRAFTAVAIL), 0, 0);
 	}
+	AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0);
 }
 
 void EnginesMonthlyLoop(void)
@@ -349,9 +336,9 @@
 			if (!(e->flags & ENGINE_AVAILABLE) && _date >= (e->intro_date + 365)) {
 				/* Introduce it to all players */
 				NewVehicleAvailable(e);
-			} else if (!(e->flags & (ENGINE_AVAILABLE|ENGINE_INTRODUCING)) && _date >= e->intro_date) {
+			} else if (!(e->flags & (ENGINE_AVAILABLE|ENGINE_EXCLUSIVE_PREVIEW)) && _date >= e->intro_date) {
 				/* Introduction date has passed.. show introducing dialog to one player. */
-				e->flags |= ENGINE_INTRODUCING;
+				e->flags |= ENGINE_EXCLUSIVE_PREVIEW;
 
 				/* Do not introduce new rail wagons */
 				if (!IsWagon(e - _engines))
--- a/src/engine.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/engine.h	Sun Mar 04 04:25:36 2007 +0000
@@ -68,7 +68,7 @@
 	byte subtype;
 	SoundFxByte sfx;
 	byte acceleration;
-	byte max_speed;
+	uint16 max_speed;
 	byte mail_capacity;
 	uint16 passenger_capacity;
 } AircraftVehicleInfo;
@@ -124,6 +124,15 @@
 	EF_RAIL_IS_MU = 2, ///< Rail vehicle is a multiple-unit (DMU/EMU)
 };
 
+/**
+ * Engine.flags is a bitmask, with the following values.
+ */
+enum {
+	ENGINE_AVAILABLE         = 1, ///< This vehicle is available to everyone.
+	ENGINE_EXCLUSIVE_PREVIEW = 2, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a player.
+	ENGINE_OFFER_WINDOW_OPEN = 4, ///< The exclusive offer window is currently open for a player.
+};
+
 enum {
 	NUM_VEHICLE_TYPES = 6
 };
--- a/src/engine_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/engine_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -20,23 +20,20 @@
 
 static StringID GetEngineCategoryName(EngineID engine)
 {
-	if (engine < NUM_TRAIN_ENGINES) {
-		switch (RailVehInfo(engine)->railtype) {
-			case RAILTYPE_RAIL:     return STR_8102_RAILROAD_LOCOMOTIVE;
-			case RAILTYPE_ELECTRIC: return STR_8102_RAILROAD_LOCOMOTIVE;
-			case RAILTYPE_MONO:     return STR_8106_MONORAIL_LOCOMOTIVE;
-			case RAILTYPE_MAGLEV:   return STR_8107_MAGLEV_LOCOMOTIVE;
-			default: NOT_REACHED();
-		}
+	switch (GetEngine(engine)->type) {
+		default: NOT_REACHED();
+		case VEH_Road:              return STR_8103_ROAD_VEHICLE;
+		case VEH_Aircraft:          return STR_8104_AIRCRAFT;
+		case VEH_Ship:              return STR_8105_SHIP;
+		case VEH_Train:
+			switch (RailVehInfo(engine)->railtype) {
+				default: NOT_REACHED();
+				case RAILTYPE_RAIL:     return STR_8102_RAILROAD_LOCOMOTIVE;
+				case RAILTYPE_ELECTRIC: return STR_8102_RAILROAD_LOCOMOTIVE;
+				case RAILTYPE_MONO:     return STR_8106_MONORAIL_LOCOMOTIVE;
+				case RAILTYPE_MAGLEV:   return STR_8107_MAGLEV_LOCOMOTIVE;
+			}
 	}
-
-	if (engine < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES)
-		return STR_8103_ROAD_VEHICLE;
-
-	if (engine < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES)
-		return STR_8105_SHIP;
-
-	return STR_8104_AIRCRAFT;
 }
 
 static const OldWidget _engine_preview_widgets[] = {
@@ -62,10 +59,10 @@
 static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw);
 
 static const DrawEngineInfo _draw_engine_list[4] = {
-	{DrawTrainEngine,DrawTrainEngineInfo},
-	{DrawRoadVehEngine,DrawRoadVehEngineInfo},
-	{DrawShipEngine,DrawShipEngineInfo},
-	{DrawAircraftEngine,DrawAircraftEngineInfo},
+	{ DrawTrainEngine,    DrawTrainEngineInfo    },
+	{ DrawRoadVehEngine,  DrawRoadVehEngineInfo  },
+	{ DrawShipEngine,     DrawShipEngineInfo     },
+	{ DrawAircraftEngine, DrawAircraftEngineInfo },
 };
 
 static void EnginePreviewWndProc(BaseWindow *w, WindowEvent *e)
@@ -83,10 +80,7 @@
 
 		DrawStringCentered(w->Width() >> 1, 80, GetCustomEngineName(engine), 0x10);
 
-		(dei = _draw_engine_list,engine < NUM_TRAIN_ENGINES) ||
-		(dei++,engine < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES) ||
-		(dei++,engine < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES + NUM_SHIP_ENGINES) ||
-		(dei++, true);
+		dei = &_draw_engine_list[GetEngine(engine)->type];
 
 		width = w->Width();
 		dei->engine_proc(width >> 1, 100, engine, 0);
@@ -142,41 +136,11 @@
 	DrawStringMultiCenter(x, y, STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER, maxw);
 }
 
-void DrawNewsNewTrainAvail(BaseWindow *w)
-{
-	int width = w->Width();
-	EngineID engine;
-
-	DrawNewsBorder(w);
-
-	engine = WP(w,news_d).ni->string_id;
-	SetDParam(0, GetEngineCategoryName(engine));
-	DrawStringMultiCenter(width >> 1, 20, STR_8859_NEW_NOW_AVAILABLE, width - 2);
-
-	GfxFillRect(25, 56, width - 25, w->Height() - 2, 10);
-
-	SetDParam(0, GetCustomEngineName(engine));
-	DrawStringMultiCenter(width >> 1, 57, STR_885A, width - 2);
-
-	DrawTrainEngine(width >> 1, 88, engine, 0);
-	GfxFillRect(25, 56, width - 56, 112, PALETTE_TO_STRUCT_GREY | (1 << USE_COLORTABLE));
-	DrawTrainEngineInfo(engine, width >> 1, 129, width - 52);
-}
-
-StringID GetNewsStringNewTrainAvail(const NewsItem *ni)
-{
-	EngineID engine = ni->string_id;
-	SetDParam(0, STR_8859_NEW_NOW_AVAILABLE);
-	SetDParam(1, GetEngineCategoryName(engine));
-	SetDParam(2, GetCustomEngineName(engine));
-	return STR_02B6;
-}
-
 static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw)
 {
 	const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
 	SetDParam(0, (_price.aircraft_base >> 3) * avi->base_cost >> 5);
-	SetDParam(1, avi->max_speed * 8);
+	SetDParam(1, avi->max_speed);
 	SetDParam(2, avi->passenger_capacity);
 	SetDParam(3, avi->mail_capacity);
 	SetDParam(4, avi->running_cost * _price.aircraft_running >> 8);
@@ -184,34 +148,6 @@
 	DrawStringMultiCenter(x, y, STR_A02E_COST_MAX_SPEED_CAPACITY, maxw);
 }
 
-void DrawNewsNewAircraftAvail(BaseWindow *w)
-{
-	int width = w->Width();
-	EngineID engine;
-
-	DrawNewsBorder(w);
-
-	engine = WP(w,news_d).ni->string_id;
-
-	DrawStringMultiCenter(width >> 1, 20, STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE, width - 2);
-	GfxFillRect(25, 56, width - 25, w->Height() - 2, 10);
-
-	SetDParam(0, GetCustomEngineName(engine));
-	DrawStringMultiCenter(width >> 1, 57, STR_A02D, width - 2);
-
-	DrawAircraftEngine(width >> 1, 93, engine, 0);
-	GfxFillRect(25, 56, width - 56, 110, PALETTE_TO_STRUCT_GREY | (1 << USE_COLORTABLE));
-	DrawAircraftEngineInfo(engine, width >> 1, 131, width - 52);
-}
-
-StringID GetNewsStringNewAircraftAvail(const NewsItem *ni)
-{
-	EngineID engine = ni->string_id;
-	SetDParam(0, STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE);
-	SetDParam(1, GetCustomEngineName(engine));
-	return STR_02B6;
-}
-
 static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw)
 {
 	const RoadVehicleInfo *rvi = RoadVehInfo(engine);
@@ -225,33 +161,6 @@
 	DrawStringMultiCenter(x, y, STR_902A_COST_SPEED_RUNNING_COST, maxw);
 }
 
-void DrawNewsNewRoadVehAvail(BaseWindow *w)
-{
-	int width = w->Width();
-	EngineID engine;
-
-	DrawNewsBorder(w);
-
-	engine = WP(w,news_d).ni->string_id;
-	DrawStringMultiCenter(width >> 1, 20, STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE, width - 2);
-	GfxFillRect(25, 56, width - 25, w->Height() - 2, 10);
-
-	SetDParam(0, GetCustomEngineName(engine));
-	DrawStringMultiCenter(width >> 1, 57, STR_9029, width - 2);
-
-	DrawRoadVehEngine(width >> 1, 88, engine, 0);
-	GfxFillRect(25, 56, width - 56, 112, PALETTE_TO_STRUCT_GREY | (1 << USE_COLORTABLE));
-	DrawRoadVehEngineInfo(engine, width >> 1, 129, width - 52);
-}
-
-StringID GetNewsStringNewRoadVehAvail(const NewsItem *ni)
-{
-	EngineID engine = ni->string_id;
-	SetDParam(0, STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE);
-	SetDParam(1, GetCustomEngineName(engine));
-	return STR_02B6;
-}
-
 static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw)
 {
 	const ShipVehicleInfo *svi = ShipVehInfo(engine);
@@ -263,30 +172,31 @@
 	DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw);
 }
 
-void DrawNewsNewShipAvail(BaseWindow *w)
+
+StringID GetNewsStringNewVehicleAvail(const NewsItem *ni)
 {
-	int width = w->Width();
-	EngineID engine;
+	EngineID engine = ni->string_id;
+	SetDParam(0, GetEngineCategoryName(engine));
+	SetDParam(1, GetCustomEngineName(engine));
+	return STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE;
+}
 
+void DrawNewsNewVehicleAvail(BaseWindow *w)
+{
 	DrawNewsBorder(w);
 
-	engine = WP(w,news_d).ni->string_id;
+	EngineID engine = WP(w, news_d).ni->string_id;
+	const DrawEngineInfo *dei = &_draw_engine_list[GetEngine(engine)->type];
 
-	DrawStringMultiCenter(width >> 1, 20, STR_982C_NEW_SHIP_NOW_AVAILABLE, width - 2);
-	GfxFillRect(25, 56, width - 25, w->Height() - 2, 10);
+	SetDParam(0, GetEngineCategoryName(engine));
+	DrawStringMultiCenter(w->Width() >> 1, 20, STR_NEW_VEHICLE_NOW_AVAILABLE, w->Width() - 2);
+
+	GfxFillRect(25, 56, w->Width() - 25, w->Height() - 2, 10);
 
 	SetDParam(0, GetCustomEngineName(engine));
-	DrawStringMultiCenter(width >> 1, 57, STR_982D, width - 2);
-
-	DrawShipEngine(width >> 1, 93, engine, 0);
-	GfxFillRect(25, 56, width - 56, 110, PALETTE_TO_STRUCT_GREY | (1 << USE_COLORTABLE));
-	DrawShipEngineInfo(engine, width >> 1, 131, width - 52);
-}
+	DrawStringMultiCenter(w->Width() >> 1, 57, STR_NEW_VEHICLE_TYPE, w->Width() - 2);
 
-StringID GetNewsStringNewShipAvail(const NewsItem *ni)
-{
-	EngineID engine = ni->string_id;
-	SetDParam(0, STR_982C_NEW_SHIP_NOW_AVAILABLE);
-	SetDParam(1, GetCustomEngineName(engine));
-	return STR_02B6;
+	dei->engine_proc(w->Width() >> 1, 88, engine, 0);
+	GfxFillRect(25, 56, w->Width() - 56, 112, PALETTE_TO_STRUCT_GREY | (1 << USE_COLORTABLE));
+	dei->info_proc(engine, w->Width() >> 1, 129, w->Width() - 52);
 }
--- a/src/fileio.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/fileio.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file fileio.cpp Standard In/Out file operations */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "fileio.h"
@@ -31,7 +33,7 @@
 
 static Fio _fio;
 
-// Get current position in file
+/* Get current position in file */
 uint32 FioGetPos(void)
 {
 	return _fio.pos + (_fio.buffer - _fio.buffer_start) - FIO_BUFFER_SIZE;
@@ -57,7 +59,7 @@
 }
 #endif /* LIMITED_FDS */
 
-// Seek to a file and a position
+/* Seek to a file and a position */
 void FioSeekToFile(uint32 pos)
 {
 	FILE *f;
@@ -177,7 +179,7 @@
 		f = fopen(buf, "rb");
 
 #if defined SECOND_DATA_DIR
-		// tries in the 2nd data directory
+		/* tries in the 2nd data directory */
 		if (f == NULL) {
 			snprintf(buf, lengthof(buf), "%s%s", _paths.second_data_dir, filename);
 			strtolower(buf + strlen(_paths.second_data_dir) - 1);
--- a/src/fileio.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/fileio.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file fileio.h Declarations for Standard In/Out file operations */
+
 #ifndef FILEIO_H
 #define FILEIO_H
 
--- a/src/fios.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/fios.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -404,7 +404,7 @@
 	return FIOS_TYPE_INVALID;
 }
 
-// Get a list of Heightmaps
+/* Get a list of Heightmaps */
 FiosItem *FiosGetHeightmapList(int mode)
 {
 	static char *_fios_hmap_path = NULL;
--- a/src/fios.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/fios.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file fios.h Declarations for savegames operations */
+
 #ifndef FIOS_H
 #define FIOS_H
 
@@ -26,27 +28,27 @@
 };
 
 /* Variables to display file lists */
-extern FiosItem *_fios_list; // defined in misc_gui.c
-extern int _fios_num;        // defined in fios.c, read_only version of _fios_count
-extern int _saveload_mode;   // defined in misc_gui.c
+extern FiosItem *_fios_list; ///< defined in misc_gui.cpp
+extern int _fios_num;        ///< defined in fios.cpp, read_only version of _fios_count
+extern int _saveload_mode;   ///< defined in misc_gui.cpp
 
-// Get a list of savegames
+/* Get a list of savegames */
 FiosItem *FiosGetSavegameList(int mode);
-// Get a list of scenarios
+/* Get a list of scenarios */
 FiosItem *FiosGetScenarioList(int mode);
-// Get a list of Heightmaps
+/* Get a list of Heightmaps */
 FiosItem *FiosGetHeightmapList(int mode);
-// Free the list of savegames
+/* Free the list of savegames */
 void FiosFreeSavegameList(void);
-// Browse to. Returns a filename w/path if we reached a file.
+/* Browse to. Returns a filename w/path if we reached a file. */
 char *FiosBrowseTo(const FiosItem *item);
-// Return path, free space and stringID
+/* Return path, free space and stringID */
 StringID FiosGetDescText(const char **path, uint32 *total_free);
-// Delete a name
+/* Delete a name */
 bool FiosDelete(const char *name);
-// Make a filename from a name
+/* Make a filename from a name */
 void FiosMakeSavegameName(char *buf, const char *name, size_t size);
-// Allocate a new FiosItem
+/* Allocate a new FiosItem */
 FiosItem *FiosAlloc(void);
 
 int CDECL compare_FiosItems(const void *a, const void *b);
@@ -57,10 +59,10 @@
 typedef struct DIR DIR;
 
 typedef struct dirent { // XXX - only d_name implemented
-	wchar_t *d_name; /* name of found file */
+	wchar_t *d_name; // name of found file
 	/* little hack which will point to parent DIR struct which will
 	 * save us a call to GetFileAttributes if we want information
-	 * about the file (for example in function fio_bla */
+	 * about the file (for example in function fio_bla) */
 	DIR *dir;
 } dirent;
 
--- a/src/fontcache.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/fontcache.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file fontcache.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "functions.h"
--- a/src/functions.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/functions.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file functions.h */
+
 #ifndef FUNCTIONS_H
 #define FUNCTIONS_H
 
@@ -34,17 +36,17 @@
 }
 
 
-/* clear_land.c */
+/* clear_land.cpp */
 void DrawHillyLandTile(const TileInfo *ti);
 void DrawClearLandTile(const TileInfo *ti, byte set);
 void DrawClearLandFence(const TileInfo *ti);
 void TileLoopClearHelper(TileIndex tile);
 
-/* water_land.c */
+/* water_land.cpp */
 void DrawShipDepotSprite(int x, int y, int image);
 void TileLoop_Water(TileIndex tile);
 
-/* players.c */
+/* players.cpp */
 bool CheckPlayerHasMoney(int32 cost);
 void SubtractMoneyFromPlayer(int32 cost);
 void SubtractMoneyFromPlayerFract(PlayerID player, int32 cost);
@@ -57,7 +59,7 @@
 void CDECL ShowInfoF(const char *str, ...);
 void NORETURN CDECL error(const char *str, ...);
 
-/* openttd.c */
+/* openttd.cpp */
 
 /**************
  * Warning: DO NOT enable this unless you understand what it does
@@ -101,13 +103,10 @@
 static inline TileIndex RandomTile(void) { return TILE_MASK(Random()); }
 
 
-uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */
+uint32 InteractiveRandom(void); // Used for random sequences that are not the same on the other end of the multiplayer link
 uint InteractiveRandomRange(uint max);
 
-/* facedraw.c */
-void DrawPlayerFace(uint32 face, int color, int x, int y);
-
-/* texteff.c */
+/* texteff.cpp */
 void MoveAllTextEffects(void);
 void AddTextEffect(StringID msg, int x, int y, uint16 duration);
 void InitTextEffects(void);
@@ -123,23 +122,23 @@
 void AnimateAnimatedTiles(void);
 void InitializeAnimatedTiles(void);
 
-/* tunnelbridge_cmd.c */
+/* tunnelbridge_cmd.cpp */
 bool CheckBridge_Stuff(byte bridge_type, uint bridge_len);
 uint32 GetBridgeLength(TileIndex begin, TileIndex end);
 int CalcBridgeLenCostFactor(int x);
 
-/* misc_cmd.c */
+/* misc_cmd.cpp */
 void PlaceTreesRandomly(void);
 
 void InitializeLandscapeVariables(bool only_constants);
 
-/* misc.c */
+/* misc.cpp */
 bool IsCustomName(StringID id);
 void DeleteName(StringID id);
 char *GetName(char *buff, StringID id, const char* last);
 
-// AllocateNameUnique also tests if the name used is not used anywere else
-//  and if it is used, it returns an error.
+/* AllocateNameUnique also tests if the name used is not used anywere else
+ * and if it is used, it returns an error. */
 #define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true)
 #define AllocateName(name, skip) RealAllocateName(name, skip, false)
 StringID RealAllocateName(const char *name, byte skip, bool check_double);
@@ -203,7 +202,7 @@
 };
 void ShowSaveLoadDialog(int mode);
 
-// callback from drivers that is called if the game size changes dynamically
+/* callback from drivers that is called if the game size changes dynamically */
 void GameSizeChanged(void);
 bool FileExists(const char *filename);
 bool ReadLanguagePack(int index);
--- a/src/genworld.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/genworld.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file genworld.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "functions.h"
@@ -87,10 +89,10 @@
 	SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, 0, WC_MAIN_WINDOW, 0);
 
 	IncreaseGeneratingWorldProgress(GWP_MAP_INIT);
-	// Must start economy early because of the costs.
+	/* Must start economy early because of the costs. */
 	StartupEconomy();
 
-	// Don't generate landscape items when in the scenario editor.
+	/* Don't generate landscape items when in the scenario editor. */
 	if (_gw.mode == GW_EMPTY) {
 		SetGeneratingWorldProgress(GWP_UNMOVABLE, 1);
 
@@ -103,7 +105,7 @@
 		GenerateLandscape(_gw.mode);
 		GenerateClearTile();
 
-		// only generate towns, tree and industries in newgame mode.
+		/* only generate towns, tree and industries in newgame mode. */
 		if (_game_mode != GM_EDITOR) {
 			GenerateTowns();
 			GenerateIndustries();
@@ -112,7 +114,7 @@
 		}
 	}
 
-	// These are probably pointless when inside the scenario editor.
+	/* These are probably pointless when inside the scenario editor. */
 	SetGeneratingWorldProgress(GWP_GAME_INIT, 3);
 	StartupPlayers();
 	IncreaseGeneratingWorldProgress(GWP_GAME_INIT);
@@ -121,7 +123,7 @@
 	StartupDisasters();
 	_generating_world = false;
 
-	// No need to run the tile loop in the scenario editor.
+	/* No need to run the tile loop in the scenario editor. */
 	if (_gw.mode != GW_EMPTY) {
 		uint i;
 
@@ -230,7 +232,7 @@
 
 /**
  * Generate a world.
- * @param mode The mode of world generation (@see GenerateWorldModes).
+ * @param mode The mode of world generation (see GenerateWorldModes).
  * @param size_x The X-size of the map.
  * @param size_y The Y-size of the map.
  */
--- a/src/genworld.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/genworld.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file genworld.h */
+
 #ifndef GENWORLD_H
 #define GENWORLD_H
 
@@ -18,28 +20,28 @@
  * Otherwise you will get inconsistent behaviour.
  */
 enum {
-	LG_ORIGINAL     = 0,  //! The original landscape generator
-	LG_TERRAGENESIS = 1,  //! TerraGenesis Perlin landscape generator
+	LG_ORIGINAL     = 0,  ///< The original landscape generator
+	LG_TERRAGENESIS = 1,  ///< TerraGenesis Perlin landscape generator
 
-	GENERATE_NEW_SEED = (uint)-1, //! Create a new random seed
+	GENERATE_NEW_SEED = (uint)-1, ///< Create a new random seed
 };
 
 typedef void gw_done_proc(void);
 typedef void gw_abort_proc(void);
 
 typedef struct gw_info {
-	bool active;           //! Is generating world active
-	bool abort;            //! Whether to abort the thread ASAP
-	bool wait_for_draw;    //! Are we waiting on a draw event
-	bool quit_thread;      //! Do we want to quit the active thread
-	bool threaded;         //! Whether we run _GenerateWorld threaded
-	int mode;              //! What mode are we making a world in
-	PlayerID lp;               //! The local_player before generating
-	uint size_x;           //! X-size of the map
-	uint size_y;           //! Y-size of the map
-	gw_done_proc *proc;    //! Proc that is called when done (can be NULL)
-	gw_abort_proc *abortp; //! Proc that is called when aborting (can be NULL)
-	OTTDThread *thread;    //! The thread we are in (can be NULL)
+	bool active;           ///< Is generating world active
+	bool abort;            ///< Whether to abort the thread ASAP
+	bool wait_for_draw;    ///< Are we waiting on a draw event
+	bool quit_thread;      ///< Do we want to quit the active thread
+	bool threaded;         ///< Whether we run _GenerateWorld threaded
+	int mode;              ///< What mode are we making a world in
+	PlayerID lp;           ///< The local_player before generating
+	uint size_x;           ///< X-size of the map
+	uint size_y;           ///< Y-size of the map
+	gw_done_proc *proc;    ///< Proc that is called when done (can be NULL)
+	gw_abort_proc *abortp; ///< Proc that is called when aborting (can be NULL)
+	OTTDThread *thread;    ///< The thread we are in (can be NULL)
 } gw_info;
 
 #ifdef TEMPORARY_OTTDTHREAD_DEFINITION
@@ -48,16 +50,16 @@
 #endif
 
 typedef enum gwp_classes {
-	GWP_MAP_INIT,    /* Initialize/allocate the map, start economy */
-	GWP_LANDSCAPE,   /* Create the landscape */
-	GWP_ROUGH_ROCKY, /* Make rough and rocky areas */
-	GWP_TOWN,        /* Generate towns */
-	GWP_INDUSTRY,    /* Generate industries */
-	GWP_UNMOVABLE,   /* Generate unmovables (radio tower, light houses) */
-	GWP_TREE,        /* Generate trees */
-	GWP_GAME_INIT,   /* Initialize the game */
-	GWP_RUNTILELOOP, /* Runs the tile loop 1280 times to make snow etc */
-	GWP_GAME_START,  /* Really prepare to start the game */
+	GWP_MAP_INIT,    ///< Initialize/allocate the map, start economy
+	GWP_LANDSCAPE,   ///< Create the landscape
+	GWP_ROUGH_ROCKY, ///< Make rough and rocky areas
+	GWP_TOWN,        ///< Generate towns
+	GWP_INDUSTRY,    ///< Generate industries
+	GWP_UNMOVABLE,   ///< Generate unmovables (radio tower, light houses)
+	GWP_TREE,        ///< Generate trees
+	GWP_GAME_INIT,   ///< Initialize the game
+	GWP_RUNTILELOOP, ///< Runs the tile loop 1280 times to make snow etc
+	GWP_GAME_START,  ///< Really prepare to start the game
 	GWP_CLASS_COUNT
 } gwp_class;
 
@@ -71,7 +73,7 @@
 	return _gw.active;
 }
 
-/* genworld.c */
+/* genworld.cpp */
 void SetGeneratingWorldPaintStatus(bool status);
 bool IsGeneratingWorldReadyForPaint(void);
 bool IsGenerateWorldThreaded(void);
@@ -83,7 +85,7 @@
 bool IsGeneratingWorldAborted(void);
 void HandleGeneratingWorldAbortion(void);
 
-/* genworld_gui.c */
+/* genworld_gui.cpp */
 void SetGeneratingWorldProgress(gwp_class cls, uint total);
 void IncreaseGeneratingWorldProgress(gwp_class cls);
 void PrepareGenerateWorldProgress(void);
--- a/src/genworld_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/genworld_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file genworld_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "heightmap.h"
@@ -398,7 +400,7 @@
 			w->ShowDropDownMenu(tree_placer, _patches_newgame.tree_placer, GLAND_TREE_PULLDOWN, 0, 0);
 			break;
 		case GLAND_LANDSCAPE_TEXT: case GLAND_LANDSCAPE_PULLDOWN: // Landscape generator OR Heightmap rotation
-		/*case GLAND_HEIGHTMAP_ROTATION_TEXT: case GLAND_HEIGHTMAP_ROTATION_PULLDOWN:*/
+		/* case GLAND_HEIGHTMAP_ROTATION_TEXT: case GLAND_HEIGHTMAP_ROTATION_PULLDOWN:*/
 			if (mode == GLWP_HEIGHTMAP) {
 				w->ShowDropDownMenu(rotation, _patches_newgame.heightmap_rotation, GLAND_HEIGHTMAP_ROTATION_PULLDOWN, 0, 0);
 			} else {
@@ -449,7 +451,7 @@
 				DoCommandP(0, 3, _opt_newgame.diff.number_industries, NULL, CMD_CHANGE_DIFFICULTY_LEVEL);
 				break;
 			case GLAND_LANDSCAPE_PULLDOWN:
-			/*case GLAND_HEIGHTMAP_PULLDOWN: */
+			/* case GLAND_HEIGHTMAP_PULLDOWN: */
 				if (mode == GLWP_HEIGHTMAP) {
 					_patches_newgame.heightmap_rotation = e->we.dropdown.index;
 				} else {
--- a/src/gfx.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/gfx.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file gfx.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "functions.h"
@@ -21,11 +23,11 @@
 bool _dbg_screen_rect;
 #endif
 
-byte _dirkeys;        // 1 = left, 2 = up, 4 = right, 8 = down
+byte _dirkeys;        ///< 1 = left, 2 = up, 4 = right, 8 = down
 bool _fullscreen;
 CursorVars _cursor;
-bool _ctrl_pressed;   // Is Ctrl pressed?
-bool _shift_pressed;  // Is Shift pressed?
+bool _ctrl_pressed;   ///< Is Ctrl pressed?
+bool _shift_pressed;  ///< Is Shift pressed?
 byte _fast_forward;
 bool _left_button_down;
 bool _left_button_clicked;
@@ -88,16 +90,16 @@
 	p = _screen.pitch;
 
 	if (yo > 0) {
-		// Calculate pointers
+		/*Calculate pointers */
 		dst = _screen.dst_ptr + (top + height - 1) * p + left;
 		src = dst - yo * p;
 
-		// Decrease height and increase top
+		/* Decrease height and increase top */
 		top += yo;
 		height -= yo;
 		assert(height > 0);
 
-		// Adjust left & width
+		/* Adjust left & width */
 		if (xo >= 0) {
 			dst += xo;
 			left += xo;
@@ -113,15 +115,15 @@
 			dst -= p;
 		}
 	} else {
-		// Calculate pointers
+		/* Calculate pointers */
 		dst = _screen.dst_ptr + top * p + left;
 		src = dst - yo * p;
 
-		// Decrese height. (yo is <=0).
+		/* Decrese height. (yo is <=0). */
 		height += yo;
 		assert(height > 0);
 
-		// Adjust left & width
+		/* Adjust left & width */
 		if (xo >= 0) {
 			dst += xo;
 			left += xo;
@@ -131,15 +133,15 @@
 			width += xo;
 		}
 
-		// the y-displacement may be 0 therefore we have to use memmove,
-		// because source and destination may overlap
+		/* the y-displacement may be 0 therefore we have to use memmove,
+		 * because source and destination may overlap */
 		for (ht = height; ht > 0; --ht) {
 			memmove(dst, src, width);
 			src += p;
 			dst += p;
 		}
 	}
-	// This part of the screen is now dirty.
+	/* This part of the screen is now dirty. */
 	_video_driver->make_dirty(left, top, width, height);
 }
 
@@ -212,7 +214,7 @@
 	int stepy;
 	int frac;
 
-	// Check clipping first
+	/* Check clipping first */
 	{
 		DrawPixelInfo *dpi = _cur_dpi;
 		int t;
@@ -292,7 +294,7 @@
 			w += GetCharacterWidth(size, c);
 
 			if (w >= maxw) {
-				// string got too big... insert dotdotdot
+				/* string got too big... insert dotdotdot */
 				ddd_pos[0] = ddd_pos[1] = ddd_pos[2] = '.';
 				ddd_pos[3] = 0;
 				return ddd_w;
@@ -309,7 +311,7 @@
 			}
 		}
 
-		// Remember the last position where three dots fit.
+		/* Remember the last position where three dots fit. */
 		if (w + ddd < maxw) {
 			ddd_w = w + ddd;
 			ddd_pos = str;
@@ -1544,7 +1546,7 @@
 	d = &_cur_palette[217];
 	memcpy(old_val, d, c * sizeof(*old_val));
 
-	// Dark blue water
+	/* Dark blue water */
 	s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
 	j = EXTR(320, 5);
 	for (i = 0; i != 5; i++) {
@@ -1553,7 +1555,7 @@
 		if (j == 5) j = 0;
 	}
 
-	// Glittery water
+	/* Glittery water */
 	s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
 	j = EXTR(128, 15);
 	for (i = 0; i != 5; i++) {
@@ -1570,7 +1572,7 @@
 		if (j == 5) j = 0;
 	}
 
-	// Oil refinery fire animation
+	/* Oil refinery fire animation */
 	s = ev->oil_ref;
 	j = EXTR2(512, 7);
 	for (i = 0; i != 7; i++) {
@@ -1579,7 +1581,7 @@
 		if (j == 7) j = 0;
 	}
 
-	// Radio tower blinking
+	/* Radio tower blinking */
 	{
 		byte i = (_timer_counter >> 1) & 0x7F;
 		byte v;
@@ -1602,7 +1604,7 @@
 		d++;
 	}
 
-	// Handle lighthouse and stadium animation
+	/* Handle lighthouse and stadium animation */
 	s = ev->lighthouse;
 	j = EXTR(256, 4);
 	for (i = 0; i != 4; i++) {
@@ -1611,9 +1613,9 @@
 		if (j == 4) j = 0;
 	}
 
-	// Animate water for old DOS graphics
+	/* Animate water for old DOS graphics */
 	if (_use_dos_palette) {
-		// Dark blue water DOS
+		/* Dark blue water DOS */
 		s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
 		j = EXTR(320, 5);
 		for (i = 0; i != 5; i++) {
@@ -1622,7 +1624,7 @@
 			if (j == 5) j = 0;
 		}
 
-		// Glittery water DOS
+		/* Glittery water DOS */
 		s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
 		j = EXTR(128, 15);
 		for (i = 0; i != 5; i++) {
@@ -1670,11 +1672,11 @@
 
 void ScreenSizeChanged(void)
 {
-	// check the dirty rect
+	/* check the dirty rect */
 	if (_invalid_rect.right >= _screen.width) _invalid_rect.right = _screen.width;
 	if (_invalid_rect.bottom >= _screen.height) _invalid_rect.bottom = _screen.height;
 
-	// screen size changed and the old bitmap is invalid now, so we don't want to undraw it
+	/* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */
 	_cursor.visible = false;
 }
 
@@ -1701,7 +1703,7 @@
 	/* Redraw mouse cursor but only when it's inside the window */
 	if (!_cursor.in_window) return;
 
-	// Don't draw the mouse cursor if it's already drawn
+	/* Don't draw the mouse cursor if it's already drawn */
 	if (_cursor.visible) {
 		if (!_cursor.dirty) return;
 		UndrawMouseCursor();
@@ -1731,13 +1733,13 @@
 
 	assert(w * h < (int)sizeof(_cursor_backup));
 
-	// Make backup of stuff below cursor
+	/* Make backup of stuff below cursor */
 	memcpy_pitch(
 		_cursor_backup,
 		_screen.dst_ptr + _cursor.draw_pos.x + _cursor.draw_pos.y * _screen.pitch,
 		_cursor.draw_size.x, _cursor.draw_size.y, _screen.pitch, _cursor.draw_size.x);
 
-	// Draw cursor on screen
+	/* Draw cursor on screen */
 	_cur_dpi = &_screen;
 	DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x, _cursor.pos.y);
 
@@ -1806,14 +1808,14 @@
 				byte *p = b;
 				int h2;
 
-				// First try coalescing downwards
+				/* First try coalescing downwards */
 				do {
 					*p = 0;
 					p += DIRTY_BYTES_PER_LINE;
 					bottom += 8;
 				} while (bottom != h && *p != 0);
 
-				// Try coalescing to the right too.
+				/* Try coalescing to the right too. */
 				h2 = (bottom - y) >> 3;
 				assert(h2 > 0);
 				p = b;
@@ -1821,14 +1823,14 @@
 				while (right != w) {
 					byte *p2 = ++p;
 					int h = h2;
-					// Check if a full line of dirty flags is set.
+					/* Check if a full line of dirty flags is set. */
 					do {
 						if (!*p2) goto no_more_coalesc;
 						p2 += DIRTY_BYTES_PER_LINE;
 					} while (--h != 0);
 
-					// Wohoo, can combine it one step to the right!
-					// Do that, and clear the bits.
+					/* Wohoo, can combine it one step to the right!
+					 * Do that, and clear the bits. */
 					right += 64;
 
 					h = h2;
@@ -2005,9 +2007,9 @@
 
 void SetMouseCursor(SpriteID sprite, SpriteID pal)
 {
-	// Turn off animation
+	/* Turn off animation */
 	_cursor.animate_timeout = 0;
-	// Set cursor
+	/* Set cursor */
 	SetCursorSprite(sprite, pal);
 }
 
--- a/src/gfx.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/gfx.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file gfx.h */
+
 #ifndef GFX_H
 #define GFX_H
 
@@ -11,7 +13,7 @@
 	WKC_ALT   = 0x2000,
 	WKC_META  = 0x1000,
 
-	// Special ones
+	/* Special ones */
 	WKC_NONE        =  0,
 	WKC_ESC         =  1,
 	WKC_BACKSPACE   =  2,
@@ -23,17 +25,17 @@
 	WKC_END         =  7,
 	WKC_HOME        =  8,
 
-	// Arrow keys
+	/* Arrow keys */
 	WKC_LEFT        =  9,
 	WKC_UP          = 10,
 	WKC_RIGHT       = 11,
 	WKC_DOWN        = 12,
 
-	// Return & tab
+	/* Return & tab */
 	WKC_RETURN      = 13,
 	WKC_TAB         = 14,
 
-	// Numerical keyboard
+	/* Numerical keyboard */
 	WKC_NUM_0       = 16,
 	WKC_NUM_1       = 17,
 	WKC_NUM_2       = 18,
@@ -51,10 +53,10 @@
 	WKC_NUM_ENTER   = 30,
 	WKC_NUM_DECIMAL = 31,
 
-	// Space
+	/* Space */
 	WKC_SPACE       = 32,
 
-	// Function keys
+	/* Function keys */
 	WKC_F1          = 33,
 	WKC_F2          = 34,
 	WKC_F3          = 35,
@@ -68,15 +70,15 @@
 	WKC_F11         = 43,
 	WKC_F12         = 44,
 
-	// backquote is the key left of "1"
-	// we only store this key here, no matter what character is really mapped to it
-	// on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °)
+	/* backquote is the key left of "1"
+	 * we only store this key here, no matter what character is really mapped to it
+	 * on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °) */
 	WKC_BACKQUOTE   = 45,
 	WKC_PAUSE       = 46,
 
-	// 0-9 are mapped to 48-57
-	// A-Z are mapped to 65-90
-	// a-z are mapped to 97-122
+	/* 0-9 are mapped to 48-57
+	 * A-Z are mapped to 65-90
+	 * a-z are mapped to 97-122 */
 };
 
 enum GameModes {
@@ -135,11 +137,11 @@
 
 
 
-extern byte _dirkeys;        // 1 = left, 2 = up, 4 = right, 8 = down
+extern byte _dirkeys;        ///< 1 = left, 2 = up, 4 = right, 8 = down
 extern bool _fullscreen;
 extern CursorVars _cursor;
-extern bool _ctrl_pressed;   // Is Ctrl pressed?
-extern bool _shift_pressed;  // Is Shift pressed?
+extern bool _ctrl_pressed;   ///< Is Ctrl pressed?
+extern bool _shift_pressed;  ///< Is Shift pressed?
 extern byte _fast_forward;
 
 extern bool _left_button_down;
@@ -165,7 +167,7 @@
 void CSleep(int milliseconds);
 void UpdateWindows(void);
 
-uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */
+uint32 InteractiveRandom(void); //< Used for random sequences that are not the same on the other end of the multiplayer link
 uint InteractiveRandomRange(uint max);
 void DrawTextMessage(void);
 void DrawMouseCursor(void);
@@ -189,8 +191,8 @@
 void GfxScroll(int left, int top, int width, int height, int xo, int yo);
 
 
-// XXX doesn't really belong here, but the only
-// consumers always use it in conjunction with DoDrawString()
+/* XXX doesn't really belong here, but the only
+ * consumers always use it in conjunction with DoDrawString() */
 #define UPARROW   "\xEE\x8A\x80"
 #define DOWNARROW "\xEE\x8A\xAA"
 
@@ -228,7 +230,7 @@
 
 bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height);
 
-/* window.c */
+/* window.cpp */
 void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
 
 void SetMouseCursor(CursorID cursor);
@@ -242,7 +244,7 @@
 void SortResolutions(int count);
 void ToggleFullScreen(bool fs);
 
-/* gfx.c */
+/* gfx.cpp */
 #define ASCII_LETTERSTART 32
 extern FontSize _cur_fontsize;
 
@@ -288,7 +290,7 @@
 VARDEF bool _use_dos_palette;
 
 typedef enum StringColorFlags {
-	IS_PALETTE_COLOR = 0x100, // color value is already a real palette color index, not an index of a StringColor
+	IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor
 } StringColorFlags;
 
 
--- a/src/gfxinit.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/gfxinit.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file gfxinit.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "debug.h"
@@ -17,13 +19,13 @@
 #include <string.h>
 
 typedef struct MD5File {
-	const char * filename;     // filename
-	md5_byte_t hash[16]; // md5 sum of the file
+	const char * filename;     ///< filename
+	md5_byte_t hash[16];       ///< md5 sum of the file
 } MD5File;
 
 typedef struct FileList {
-	MD5File basic[4];     // grf files that always have to be loaded
-	MD5File landscape[3]; // landscape specific grf files
+	MD5File basic[4];          ///< grf files that always have to be loaded
+	MD5File landscape[3];      ///< landscape specific grf files
 } FileList;
 
 enum {
@@ -110,7 +112,7 @@
 	FILE *f;
 	char buf[MAX_PATH];
 
-	// open file
+	/* open file */
 	snprintf(buf, lengthof(buf), "%s%s", _paths.data_dir, file.filename);
 	f = fopen(buf, "rb");
 
@@ -163,7 +165,7 @@
 void CheckExternalFiles(void)
 {
 	uint i;
-	// count of files from this version
+	/* count of files from this version */
 	uint dos = 0;
 	uint win = 0;
 
@@ -202,58 +204,58 @@
 
 
 static const SpriteID trg1idx[] = {
-	   0,    1, // Mouse cursor, ZZZ
+	   0,    1, ///< Mouse cursor, ZZZ
 /* Medium font */
-	   2,   92, // ' ' till 'z'
+	   2,   92, ///< ' ' till 'z'
 	SKIP,   36,
-	 160,  160, // Move ¾ to the correct position
-	  98,   98, // Up arrow
+	 160,  160, ///< Move ¾ to the correct position
+	  98,   98, ///< Up arrow
 	 131,  133,
-	SKIP,    1, // skip currency sign
+	SKIP,    1, ///< skip currency sign
 	 135,  135,
 	SKIP,    1,
 	 137,  137,
 	SKIP,    1,
 	 139,  139,
-	 140,  140, // TODO Down arrow
+	 140,  140, ///< @todo Down arrow
 	 141,  141,
-	 142,  142, // TODO Check mark
-	 143,  143, // TODO Cross
+	 142,  142, ///< @todo Check mark
+	 143,  143, ///< @todo Cross
 	 144,  144,
-	 145,  145, // TODO Right arrow
+	 145,  145, ///< @todo Right arrow
 	 146,  149,
-	 118,  122, // Transport markers
+	 118,  122, ///< Transport markers
 	SKIP,    2,
 	 157,  157,
-	 114,  115, // Small up/down arrows
+	 114,  115, ///< Small up/down arrows
 	SKIP,    1,
 	 161,  225,
 /* Small font */
-	 226,  316, // ' ' till 'z'
+	 226,  316, ///< ' ' till 'z'
 	SKIP,   36,
-	 384,  384, // Move ¾ to the correct position
-	 322,  322, // Up arrow
+	 384,  384, ///< Move ¾ to the correct position
+	 322,  322, ///< Up arrow
 	 355,  357,
-	SKIP,    1, // skip currency sign
+	SKIP,    1, ///< skip currency sign
 	 359,  359,
 	SKIP,    1,
 	 361,  361,
 	SKIP,    1,
 	 363,  363,
-	 364,  364, // TODO Down arrow
+	 364,  364, ////< @todo Down arrow
 	 365,  366,
 	SKIP,    1,
 	 368,  368,
-	 369,  369, // TODO Right arrow
+	 369,  369, ///< @todo Right arrow
 	 370,  373,
 	SKIP,    7,
 	 381,  381,
 	SKIP,    3,
 	 385,  449,
 /* Big font */
-	 450,  540, // ' ' till 'z'
+	 450,  540, ///< ' ' till 'z'
 	SKIP,   36,
-	 608,  608, // Move ¾ to the correct position
+	 608,  608, ///< Move ¾ to the correct position
 	SKIP,    1,
 	 579,  581,
 	SKIP,    1,
@@ -288,51 +290,51 @@
  * a maximum use of sprite slots. */
 static const SpriteID _openttd_grf_indexes[] = {
 	SPR_IMG_AUTORAIL, SPR_CURSOR_WAYPOINT, // icons etc
-	134, 134,  // euro symbol medium size
-	582, 582,  // euro symbol large size
-	358, 358,  // euro symbol tiny
+	134, 134,  ///< euro symbol medium size
+	582, 582,  ///<  euro symbol large size
+	358, 358,  ///<  euro symbol tiny
 	SPR_CURSOR_CANAL, SPR_IMG_FASTFORWARD, // more icons
-	648, 648, // nordic char: æ
-	616, 616, // nordic char: Æ
-	666, 666, // nordic char: ø
-	634, 634, // nordic char: Ø
+	648, 648, ///<  nordic char: æ
+	616, 616, ///<  nordic char: Æ
+	666, 666, ///<  nordic char: ø
+	634, 634, ///<  nordic char: Ø
 	SPR_PIN_UP, SPR_CURSOR_CLONE_TRAIN, // more icons
-	382, 383, // ¼ ½ tiny
-	158, 159, // ¼ ½ medium
-	606, 607, // ¼ ½ large
-	360, 360, // ¦ tiny
-	362, 362, // ¨ tiny
-	136, 136, // ¦ medium
-	138, 138, // ¨ medium
-	584, 584, // ¦ large
-	586, 586, // ¨ large
-	626, 626, // Ð large
-	658, 658, // ð large
-	374, 374, // ´ tiny
-	378, 378, // ¸ tiny
-	150, 150, // ´ medium
-	154, 154, // ¸ medium
-	598, 598, // ´ large
-	602, 602, // ¸ large
-	640, 640, // Þ large
-	672, 672, // þ large
-	380, 380, // º tiny
-	156, 156, // º medium
-	604, 604, // º large
-	317, 320, // { | } ~ tiny
-	 93,  96, // { | } ~ medium
-	541, 544, // { | } ~ large
+	382, 383, ///<  ¼ ½ tiny
+	158, 159, ///<  ¼ ½ medium
+	606, 607, ///<  ¼ ½ large
+	360, 360, ///<  ¦ tiny
+	362, 362, ///<  ¨ tiny
+	136, 136, ///<  ¦ medium
+	138, 138, ///<  ¨ medium
+	584, 584, ///<  ¦ large
+	586, 586, ///<  ¨ large
+	626, 626, ///<  Ð large
+	658, 658, ///<  ð large
+	374, 374, ///<  ´ tiny
+	378, 378, ///<  ¸ tiny
+	150, 150, ///<  ´ medium
+	154, 154, ///<  ¸ medium
+	598, 598, ///<  ´ large
+	602, 602, ///<  ¸ large
+	640, 640, ///<  Þ large
+	672, 672, ///<  þ large
+	380, 380, ///<  º tiny
+	156, 156, ///<  º medium
+	604, 604, ///<  º large
+	317, 320, ///<  { | } ~ tiny
+	 93,  96, ///<  { | } ~ medium
+	541, 544, ///<  { | } ~ large
 	SPR_HOUSE_ICON, SPR_HOUSE_ICON,
-	585, 585, // § large
-	587, 587, // © large
-	592, 592, // ® large
-	594, 597, // ° ± ² ³ large
-	633, 633, // × large
-	665, 665, // ÷ large
+	585, 585, ///<  § large
+	587, 587, ///<  © large
+	592, 592, ///<  ® large
+	594, 597, ///<  ° ± ² ³ large
+	633, 633, ///<  × large
+	665, 665, ///<  ÷ large
 	SPR_SELL_TRAIN, SPR_SHARED_ORDERS_ICON,
-	377, 377, // · small
-	153, 153, // · medium
-	601, 601, // · large
+	377, 377, ///<  · small
+	153, 153, ///<  · medium
+	601, 601, ///<  · large
 	SPR_WARNING_SIGN, SPR_WARNING_SIGN,
 	END
 };
--- a/src/gfxinit.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/gfxinit.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file gfxinit.h */
+
 #ifndef GFXINIT_H
 #define GFXINIT_H
 
--- a/src/graph_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/graph_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file graph_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "table/strings.h"
@@ -28,13 +30,13 @@
 	GRAPH_AXIS_LABEL_COLOUR = 16,
 	GRAPH_AXIS_LINE_COLOUR  = 215,
 
-	GRAPH_X_POSITION_BEGINNING  = 44,  // Start the graph 44 pixels from gw->left
-	GRAPH_X_POSITION_SEPARATION = 22,  // There are 22 pixels between each X value
+	GRAPH_X_POSITION_BEGINNING  = 44,  ///< Start the graph 44 pixels from gw->left
+	GRAPH_X_POSITION_SEPARATION = 22,  ///< There are 22 pixels between each X value
 
-	/* How many horizontal lines to draw. 9 is convenient as that means the
-	 * distance between them is the height of the graph / 8, which is the same
+	GRAPH_NUM_LINES_Y = 9, ///< How many horizontal lines to draw.
+	/* 9 is convenient as that means the distance between them is the height of the graph / 8,
+	 * which is the same
 	 * as height >> 3. */
-	GRAPH_NUM_LINES_Y = 9,
 };
 
 /* Apparently these don't play well with enums. */
@@ -42,7 +44,7 @@
 static const uint  INVALID_DATAPOINT_POS = UINT_MAX;  // Used to determine if the previous point was drawn.
 
 typedef struct GraphDrawer {
-	uint excluded_data; // bitmask of the datasets that shouldn't be displayed.
+	uint excluded_data; ///< bitmask of the datasets that shouldn't be displayed.
 	byte num_dataset;
 	byte num_on_x_axis;
 	bool has_negative_values;
@@ -58,18 +60,18 @@
 	uint16 x_values_start;
 	uint16 x_values_increment;
 
-	int left, top;  // Where to start drawing the graph, in pixels.
-	uint height;    // The height of the graph in pixels.
+	int left, top;  ///< Where to start drawing the graph, in pixels.
+	uint height;    ///< The height of the graph in pixels.
 	StringID format_str_y_axis;
 	byte colors[GRAPH_MAX_DATASETS];
-	int64 cost[GRAPH_MAX_DATASETS][24]; // last 2 years
+	int64 cost[GRAPH_MAX_DATASETS][24]; ///< last 2 years
 } GraphDrawer;
 
 static void DrawGraph(const GraphDrawer *gw)
 {
-	uint x, y;            // Reused whenever x and y coordinates are needed.
-	int64 highest_value;  // Highest value to be drawn.
-	int x_axis_offset;    // Distance from the top of the graph to the x axis.
+	uint x, y;            ///< Reused whenever x and y coordinates are needed.
+	int64 highest_value;  ///< Highest value to be drawn.
+	int x_axis_offset;    ///< Distance from the top of the graph to the x axis.
 
 	/* the colors and cost array of GraphDrawer must accomodate
 	 * both values for cargo and players. So if any are higher, quit */
@@ -244,40 +246,42 @@
 
 static void GraphLegendWndProc(BaseWindow *w, WindowEvent *e)
 {
-	const Player* p;
-
 	switch (e->event) {
-	case WE_CREATE: {
-		uint i;
-		for (i = 3; i < w->widget_count; i++) {
-			if (!HASBIT(_legend_excluded_players, i - 3)) w->LowerWidget(i);
+		case WE_CREATE: {
+			for (uint i = 3; i < w->widget_count; i++) {
+				if (!HASBIT(_legend_excluded_players, i - 3)) w->LowerWidget(i);
+			}
+			break;
 		}
-		break;
-	}
 
-	case WE_PAINT:
-		FOR_ALL_PLAYERS(p) {
-			if (!p->is_active) {
+		case WE_PAINT: {
+			const Player *p;
+
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) continue;
+
 				SETBIT(_legend_excluded_players, p->index);
 				w->RaiseWidget(p->index + 3);
 			}
-		}
-		w->DrawWidgets();
-
-		FOR_ALL_PLAYERS(p) {
-			if (!p->is_active) continue;
-
-			DrawPlayerIcon(p->index, 4, 18+p->index*12);
 
-			SetDParam(0, p->name_1);
-			SetDParam(1, p->name_2);
-			SetDParam(2, GetPlayerNameString(p->index, 3));
-			DrawString(21, 17 + p->index * 12, STR_7021, HASBIT(_legend_excluded_players, p->index) ? 0x10 : 0xC);
+			w->DrawWidgets();
+
+			FOR_ALL_PLAYERS(p) {
+				if (!p->is_active) continue;
+
+				DrawPlayerIcon(p->index, 4, 18+p->index*12);
+
+				SetDParam(0, p->name_1);
+				SetDParam(1, p->name_2);
+				SetDParam(2, GetPlayerNameString(p->index, 3));
+				DrawString(21, 17 + p->index * 12, STR_7021, HASBIT(_legend_excluded_players, p->index) ? 0x10 : 0xC);
+			}
+			break;
 		}
-		break;
 
-	case WE_CLICK:
-		if (IS_INT_INSIDE(e->we.click.widget, 3, 11)) {
+		case WE_CLICK:
+			if (!IS_INT_INSIDE(e->we.click.widget, 3, 11)) return;
+
 			TOGGLEBIT(_legend_excluded_players, e->we.click.widget - 3);
 			w->ToggleWidgetLoweredState(e->we.click.widget);
 			w->SetDirty();
@@ -286,8 +290,7 @@
 			InvalidateWindow(WC_DELIVERED_CARGO, 0);
 			InvalidateWindow(WC_PERFORMANCE_HISTORY, 0);
 			InvalidateWindow(WC_COMPANY_VALUE, 0);
-		}
-		break;
+			break;
 	}
 }
 
@@ -330,7 +333,7 @@
 	byte nums;
 	int mo,yr;
 
-	// Exclude the players which aren't valid
+	/* Exclude the players which aren't valid */
 	FOR_ALL_PLAYERS(p) {
 		if (!p->is_active) SETBIT(excluded_players, p->index);
 	}
@@ -339,11 +342,11 @@
 
 	nums = 0;
 	FOR_ALL_PLAYERS(p) {
-		if (p->is_active) nums = max(nums,p->num_valid_stat_ent);
+		if (p->is_active) nums = max(nums, p->num_valid_stat_ent);
 	}
-	gd->num_on_x_axis = min(nums,24);
+	gd->num_on_x_axis = min(nums, 24);
 
-	mo = (_cur_month/3-nums)*3;
+	mo = (_cur_month / 3 - nums) * 3;
 	yr = _cur_year;
 	while (mo < 0) {
 		yr--;
@@ -357,42 +360,42 @@
 static void OperatingProfitWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		GraphDrawer gd;
-		const Player* p;
-		int i,j;
-		int numd;
-
-		w->DrawWidgets();
+		case WE_PAINT: {
+			GraphDrawer gd;
+			const Player* p;
 
-		gd.left = 2;
-		gd.top = 18;
-		gd.height = 136;
-		gd.has_negative_values = true;
-		gd.format_str_y_axis = STR_CURRCOMPACT;
-
-		SetupGraphDrawerForPlayers(&gd);
+			w->DrawWidgets();
 
-		numd = 0;
-		FOR_ALL_PLAYERS(p) {
-			if (p->is_active) {
-				gd.colors[numd] = _colour_gradient[p->player_color][6];
-				for (j = gd.num_on_x_axis, i = 0; --j >= 0;) {
-					gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : (p->old_economy[j].income + p->old_economy[j].expenses);
-					i++;
+			gd.left = 2;
+			gd.top = 18;
+			gd.height = 136;
+			gd.has_negative_values = true;
+			gd.format_str_y_axis = STR_CURRCOMPACT;
+
+			SetupGraphDrawerForPlayers(&gd);
+
+			int numd = 0;
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) {
+					gd.colors[numd] = _colour_gradient[p->player_color][6];
+					for (int j = gd.num_on_x_axis, i = 0; --j >= 0;) {
+						gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : (p->old_economy[j].income + p->old_economy[j].expenses);
+						i++;
+					}
 				}
+				numd++;
 			}
-			numd++;
+
+			gd.num_dataset = numd;
+
+			DrawGraph(&gd);
+			break;
 		}
 
-		gd.num_dataset = numd;
-
-		DrawGraph(&gd);
-	}	break;
-	case WE_CLICK:
-		if (e->we.click.widget == 2) /* Clicked on Legend */
-			ShowGraphLegend();
-		break;
+		case WE_CLICK:
+			/* Clicked on legend? */
+			if (e->we.click.widget == 2) ShowGraphLegend();
+			break;
 	}
 }
 
@@ -428,43 +431,40 @@
 static void IncomeGraphWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		GraphDrawer gd;
-		const Player* p;
-		int i,j;
-		int numd;
-
-		w->DrawWidgets();
+		case WE_PAINT: {
+			GraphDrawer gd;
+			const Player* p;
 
-		gd.left = 2;
-		gd.top = 18;
-		gd.height = 104;
-		gd.has_negative_values = false;
-		gd.format_str_y_axis = STR_CURRCOMPACT;
-		SetupGraphDrawerForPlayers(&gd);
+			w->DrawWidgets();
 
-		numd = 0;
-		FOR_ALL_PLAYERS(p) {
-			if (p->is_active) {
-				gd.colors[numd] = _colour_gradient[p->player_color][6];
-				for (j = gd.num_on_x_axis, i = 0; --j >= 0;) {
-					gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].income;
-					i++;
+			gd.left = 2;
+			gd.top = 18;
+			gd.height = 104;
+			gd.has_negative_values = false;
+			gd.format_str_y_axis = STR_CURRCOMPACT;
+			SetupGraphDrawerForPlayers(&gd);
+
+			int numd = 0;
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) {
+					gd.colors[numd] = _colour_gradient[p->player_color][6];
+					for (int j = gd.num_on_x_axis, i = 0; --j >= 0;) {
+						gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].income;
+						i++;
+					}
 				}
+				numd++;
 			}
-			numd++;
+
+			gd.num_dataset = numd;
+
+			DrawGraph(&gd);
+			break;
 		}
 
-		gd.num_dataset = numd;
-
-		DrawGraph(&gd);
-		break;
-	}
-
-	case WE_CLICK:
-		if (e->we.click.widget == 2)
-			ShowGraphLegend();
-		break;
+		case WE_CLICK:
+			if (e->we.click.widget == 2) ShowGraphLegend();
+			break;
 	}
 }
 
@@ -498,43 +498,40 @@
 static void DeliveredCargoGraphWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		GraphDrawer gd;
-		const Player* p;
-		int i,j;
-		int numd;
-
-		w->DrawWidgets();
+		case WE_PAINT: {
+			GraphDrawer gd;
+			const Player* p;
 
-		gd.left = 2;
-		gd.top = 18;
-		gd.height = 104;
-		gd.has_negative_values = false;
-		gd.format_str_y_axis = STR_7024;
-		SetupGraphDrawerForPlayers(&gd);
+			w->DrawWidgets();
 
-		numd = 0;
-		FOR_ALL_PLAYERS(p) {
-			if (p->is_active) {
-				gd.colors[numd] = _colour_gradient[p->player_color][6];
-				for (j = gd.num_on_x_axis, i = 0; --j >= 0;) {
-					gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].delivered_cargo;
-					i++;
+			gd.left = 2;
+			gd.top = 18;
+			gd.height = 104;
+			gd.has_negative_values = false;
+			gd.format_str_y_axis = STR_7024;
+			SetupGraphDrawerForPlayers(&gd);
+
+			int numd = 0;
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) {
+					gd.colors[numd] = _colour_gradient[p->player_color][6];
+					for (int j = gd.num_on_x_axis, i = 0; --j >= 0;) {
+						gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].delivered_cargo;
+						i++;
+					}
 				}
+				numd++;
 			}
-			numd++;
+
+			gd.num_dataset = numd;
+
+			DrawGraph(&gd);
+			break;
 		}
 
-		gd.num_dataset = numd;
-
-		DrawGraph(&gd);
-		break;
-	}
-
-	case WE_CLICK:
-		if (e->we.click.widget == 2)
-			ShowGraphLegend();
-		break;
+		case WE_CLICK:
+			if (e->we.click.widget == 2) ShowGraphLegend();
+			break;
 	}
 }
 
@@ -568,45 +565,41 @@
 static void PerformanceHistoryWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		GraphDrawer gd;
-		const Player* p;
-		int i,j;
-		int numd;
-
-		w->DrawWidgets();
+		case WE_PAINT: {
+			GraphDrawer gd;
+			const Player* p;
 
-		gd.left = 2;
-		gd.top = 18;
-		gd.height = 200;
-		gd.has_negative_values = false;
-		gd.format_str_y_axis = STR_7024;
-		SetupGraphDrawerForPlayers(&gd);
+			w->DrawWidgets();
 
-		numd = 0;
-		FOR_ALL_PLAYERS(p) {
-			if (p->is_active) {
-				gd.colors[numd] = _colour_gradient[p->player_color][6];
-				for (j = gd.num_on_x_axis, i = 0; --j >= 0;) {
-					gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].performance_history;
-					i++;
+			gd.left = 2;
+			gd.top = 18;
+			gd.height = 200;
+			gd.has_negative_values = false;
+			gd.format_str_y_axis = STR_7024;
+			SetupGraphDrawerForPlayers(&gd);
+
+			int numd = 0;
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) {
+					gd.colors[numd] = _colour_gradient[p->player_color][6];
+					for (int j = gd.num_on_x_axis, i = 0; --j >= 0;) {
+						gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].performance_history;
+						i++;
+					}
 				}
+				numd++;
 			}
-			numd++;
+
+			gd.num_dataset = numd;
+
+			DrawGraph(&gd);
+			break;
 		}
 
-		gd.num_dataset = numd;
-
-		DrawGraph(&gd);
-		break;
-	}
-
-	case WE_CLICK:
-		if (e->we.click.widget == 2)
-			ShowGraphLegend();
-		if (e->we.click.widget == 3)
-			ShowPerformanceRatingDetail();
-		break;
+		case WE_CLICK:
+			if (e->we.click.widget == 2) ShowGraphLegend();
+			if (e->we.click.widget == 3) ShowPerformanceRatingDetail();
+			break;
 	}
 }
 
@@ -641,43 +634,40 @@
 static void CompanyValueGraphWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT: {
-		GraphDrawer gd;
-		const Player* p;
-		int i,j;
-		int numd;
-
-		w->DrawWidgets();
+		case WE_PAINT: {
+			GraphDrawer gd;
+			const Player* p;
 
-		gd.left = 2;
-		gd.top = 18;
-		gd.height = 200;
-		gd.has_negative_values = false;
-		gd.format_str_y_axis = STR_CURRCOMPACT;
-		SetupGraphDrawerForPlayers(&gd);
+			w->DrawWidgets();
 
-		numd = 0;
-		FOR_ALL_PLAYERS(p) {
-			if (p->is_active) {
-				gd.colors[numd] = _colour_gradient[p->player_color][6];
-				for (j = gd.num_on_x_axis, i = 0; --j >= 0;) {
-					gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].company_value;
-					i++;
+			gd.left = 2;
+			gd.top = 18;
+			gd.height = 200;
+			gd.has_negative_values = false;
+			gd.format_str_y_axis = STR_CURRCOMPACT;
+			SetupGraphDrawerForPlayers(&gd);
+
+			int numd = 0;
+			FOR_ALL_PLAYERS(p) {
+				if (p->is_active) {
+					gd.colors[numd] = _colour_gradient[p->player_color][6];
+					for (int j = gd.num_on_x_axis, i = 0; --j >= 0;) {
+						gd.cost[numd][i] = (j >= p->num_valid_stat_ent) ? INVALID_DATAPOINT : p->old_economy[j].company_value;
+						i++;
+					}
 				}
+				numd++;
 			}
-			numd++;
+
+			gd.num_dataset = numd;
+
+			DrawGraph(&gd);
+			break;
 		}
 
-		gd.num_dataset = numd;
-
-		DrawGraph(&gd);
-		break;
-	}
-
-	case WE_CLICK:
-		if (e->we.click.widget == 2)
-			ShowGraphLegend();
-		break;
+		case WE_CLICK:
+			if (e->we.click.widget == 2) ShowGraphLegend();
+			break;
 	}
 }
 
@@ -711,97 +701,83 @@
 static void CargoPaymentRatesWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_CREATE: {
-		uint i;
-		for (i = 3; i < w->widget_count; i++) {
-			if (!HASBIT(_legend_excluded_cargo, i - 3)) w->LowerWidget(i);
-		}
-		break;
-	}
-
-	case WE_PAINT: {
-		int j, x, y;
-		CargoID i;
-		GraphDrawer gd;
-
-		w->DrawWidgets();
-
-		x = 495;
-		y = 24;
+		case WE_PAINT: {
+			GraphDrawer gd;
 
-		gd.excluded_data = _legend_excluded_cargo;
-		gd.left = 2;
-		gd.top = 24;
-		gd.height = 104;
-		gd.has_negative_values = false;
-		gd.format_str_y_axis = STR_CURRCOMPACT;
-		gd.num_dataset = NUM_CARGO;
-		gd.num_on_x_axis = 20;
-		gd.num_vert_lines = 20;
-		gd.month = 0xFF;
-		gd.x_values_start     = 10;
-		gd.x_values_increment = 10;
+			w->DrawWidgets();
 
-		for (i = 0; i != NUM_CARGO; i++) {
-			/* Since the buttons have no text, no images,
-			 * both the text and the colored box have to be manually painted.
-			 * clk_dif will move one pixel down and one pixel to the right
-			 * when the button is clicked */
-			byte clk_dif = w->IsWidgetLowered(i + 3) ? 1 : 0;
-			const CargoSpec *cs = GetCargo(i);
+			int x = 495;
+			int y = 24;
 
-			GfxFillRect(x + clk_dif, y + clk_dif, x + 8 + clk_dif, y + 5 + clk_dif, 0);
-			GfxFillRect(x + 1 + clk_dif, y + 1 + clk_dif, x + 7 + clk_dif, y + 4 + clk_dif, cs->legend_colour);
-			SetDParam(0, cs->name != 0 ? cs->name : (StringID)STR_EMPTY);
-			DrawString(x + 14 + clk_dif, y + clk_dif, STR_7065, 0);
-			y += 8;
-			gd.colors[i] = cs->legend_colour;
-			for (j = 0; j != 20; j++) {
-				gd.cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 6 + 6, i);
+			gd.excluded_data = _legend_excluded_cargo;
+			gd.left = 2;
+			gd.top = 24;
+			gd.height = w->Height() - 38;
+			gd.has_negative_values = false;
+			gd.format_str_y_axis = STR_CURRCOMPACT;
+			gd.num_on_x_axis = 20;
+			gd.num_vert_lines = 20;
+			gd.month = 0xFF;
+			gd.x_values_start     = 10;
+			gd.x_values_increment = 10;
+
+			uint i = 0;
+			for (CargoID c = 0; c != NUM_CARGO; c++) {
+				const CargoSpec *cs = GetCargo(c);
+				if (!cs->IsValid()) continue;
+
+				/* Only draw labels for widgets that exist. If the widget doesn't
+				 * exist then the local player has used the climate cheat or
+				 * changed the NewGRF configuration with this window open. */
+				if (i + 3 < w->widget_count) {
+					/* Since the buttons have no text, no images,
+					 * both the text and the colored box have to be manually painted.
+					 * clk_dif will move one pixel down and one pixel to the right
+					 * when the button is clicked */
+					byte clk_dif = w->IsWidgetLowered(i + 3) ? 1 : 0;
+
+					GfxFillRect(x + clk_dif, y + clk_dif, x + 8 + clk_dif, y + 5 + clk_dif, 0);
+					GfxFillRect(x + 1 + clk_dif, y + 1 + clk_dif, x + 7 + clk_dif, y + 4 + clk_dif, cs->legend_colour);
+					SetDParam(0, cs->name);
+					DrawString(x + 14 + clk_dif, y + clk_dif, STR_7065, 0);
+					y += 8;
+				}
+
+				gd.colors[i] = cs->legend_colour;
+				for (uint j = 0; j != 20; j++) {
+					gd.cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 6 + 6, c);
+				}
+
+				i++;
 			}
+			gd.num_dataset = i;
+
+			DrawGraph(&gd);
+
+			DrawString(2 + 46, 24 + gd.height + 7, STR_7062_DAYS_IN_TRANSIT, 0);
+			DrawString(2 + 84, 24 - 9, STR_7063_PAYMENT_FOR_DELIVERING, 0);
+			break;
 		}
 
-		DrawGraph(&gd);
-
-		DrawString(2 + 46, 24 + gd.height + 7, STR_7062_DAYS_IN_TRANSIT, 0);
-		DrawString(2 + 84, 24 - 9, STR_7063_PAYMENT_FOR_DELIVERING, 0);
-	} break;
-
-	case WE_CLICK: {
-		switch (e->we.click.widget) {
-		case 3: case 4: case 5: case 6:
-		case 7: case 8: case 9: case 10:
-		case 11: case 12: case 13: case 14:
-			TOGGLEBIT(_legend_excluded_cargo, e->we.click.widget - 3);
-			w->ToggleWidgetLoweredState(e->we.click.widget);
-			w->SetDirty();
+		case WE_CLICK:
+			if (e->we.click.widget >= 3) {
+				TOGGLEBIT(_legend_excluded_cargo, e->we.click.widget - 3);
+				w->ToggleWidgetLoweredState(e->we.click.widget);
+				w->SetDirty();
+			}
 			break;
-		}
-	} break;
 	}
 }
 
 static const OldWidget _cargo_payment_rates_widgets[] = {
 {   WWT_CLOSEBOX,   RESIZE_NONE,    14,     0,    10,     0,    13, STR_00C5,                     STR_018B_CLOSE_WINDOW},
 {    WWT_CAPTION,   RESIZE_NONE,    14,    11,   567,     0,    13, STR_7061_CARGO_PAYMENT_RATES, STR_018C_WINDOW_TITLE_DRAG_THIS},
-{      WWT_PANEL,   RESIZE_NONE,    14,     0,   567,    14,   141, 0x0,                          STR_NULL},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    24,    31, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    32,    39, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    40,    47, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    48,    55, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    56,    63, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    64,    71, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    72,    79, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    80,    87, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    88,    95, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,    96,   103, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,   104,   111, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
-{      WWT_PANEL,   RESIZE_NONE,    12,   493,   562,   112,   119, 0x0,                          STR_7064_TOGGLE_GRAPH_FOR_CARGO},
+{      WWT_PANEL, RESIZE_BOTTOM,    14,     0,   567,    14,    45, 0x0,                          STR_NULL},
 {   WIDGETS_END},
 };
 
 static const WindowDesc _cargo_payment_rates_desc = {
-	WDP_AUTO, WDP_AUTO, 568, 142,
+	WDP_AUTO, WDP_AUTO, 568, 46,
 	WC_PAYMENT_RATES, WC_NONE,
 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 	_cargo_payment_rates_widgets,
@@ -811,7 +787,39 @@
 
 void ShowCargoPaymentRates(void)
 {
-	BaseWindow::AllocateFront(&_cargo_payment_rates_desc, 0);
+	BaseWindow *w = BaseWindow::AllocateFront(&_cargo_payment_rates_desc, 0);
+	if (w == NULL) return;
+
+	/* Count the number of active cargo types */
+	uint num_active = 0;
+	for (CargoID c = 0; c != NUM_CARGO; c++) {
+		if (GetCargo(c)->IsValid()) num_active++;
+	}
+
+	/* Resize the window to fit the cargo types */
+	w->Resize(0, num_active * 8);
+
+	/* Add widgets for each cargo type */
+	w->widget_count = 3 + num_active;
+	w->widget = ReallocT(w->widget, w->widget_count);
+
+	/* Set the properties of each widget */
+	for (uint i = 0; i != num_active; i++) {
+		OldWidget *wi = &w->widget[3 + i];
+		wi->type     = WWT_PANEL;
+		wi->m_display_flags = RESIZE_NONE;
+		wi->color    = 12;
+		wi->left     = 493;
+		wi->right    = 562;
+		wi->top      = 24 + i * 8;
+		wi->bottom   = wi->top + 7;
+		wi->data     = 0;
+		wi->tooltips = STR_7064_TOGGLE_GRAPH_FOR_CARGO;
+
+		if (!HASBIT(_legend_excluded_cargo, i)) w->LowerWidget(i + 3);
+	}
+
+	w->SetDirty();
 }
 
 /************************/
@@ -856,17 +864,15 @@
 		case WE_PAINT: {
 			const Player* plist[MAX_PLAYERS];
 			const Player* p;
-			uint pl_num;
-			uint i;
 
 			w->DrawWidgets();
 
-			pl_num = 0;
+			uint pl_num = 0;
 			FOR_ALL_PLAYERS(p) if (p->is_active) plist[pl_num++] = p;
 
 			qsort((void*)plist, pl_num, sizeof(*plist), PerfHistComp);
 
-			for (i = 0; i != pl_num; i++) {
+			for (uint i = 0; i != pl_num; i++) {
 				p = plist[i];
 				SetDParam(0, i + STR_01AC_1ST);
 				SetDParam(1, p->name_1);
@@ -920,7 +926,7 @@
 			int total_score = 0;
 			int color_done, color_notdone;
 
-			// Draw standard stuff
+			/* Draw standard stuff */
 			w->DrawWidgets();
 
 			/* Check if the currently selected player is still active. */
@@ -949,25 +955,25 @@
 			/* If there are no active players, don't display anything else. */
 			if (_performance_rating_detail_player == INVALID_PLAYER) break;
 
-			// Paint the player icons
+			/* Paint the player icons */
 			for (PlayerID i = PLAYER_FIRST; i < MAX_PLAYERS; i++) {
 				if (!GetPlayer(i)->is_active) {
-					// Check if we have the player as an active player
+					/* Check if we have the player as an active player */
 					if (!w->IsWidgetDisabled(i + 13)) {
-						// Bah, player gone :(
+						/* Bah, player gone :( */
 						w->DisableWidget(i + 13);
 
-						// We need a repaint
+						/* We need a repaint */
 						w->SetDirty();
 					}
 					continue;
 				}
 
-				// Check if we have the player marked as inactive
+				/* Check if we have the player marked as inactive */
 				if (w->IsWidgetDisabled(i + 13)) {
-					// New player! Yippie :p
+					/* New player! Yippie :p */
 					w->EnableWidget(i + 13);
-					// We need a repaint
+					/* We need a repaint */
 					w->SetDirty();
 				}
 
@@ -975,18 +981,18 @@
 				DrawPlayerIcon(i, i * 37 + 13 + x, 16 + x);
 			}
 
-			// The colors used to show how the progress is going
+			/* The colors used to show how the progress is going */
 			color_done = _colour_gradient[COLOUR_GREEN][4];
 			color_notdone = _colour_gradient[COLOUR_RED][4];
 
-			// Draw all the score parts
+			/* Draw all the score parts */
 			for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) {
 				int val    = _score_part[_performance_rating_detail_player][i];
 				int needed = _score_info[i].needed;
 				int score  = _score_info[i].score;
 
 				y += 20;
-				// SCORE_TOTAL has his own rulez ;)
+				/* SCORE_TOTAL has his own rulez ;) */
 				if (i == SCORE_TOTAL) {
 					needed = total_score;
 					score = SCORE_MAX;
@@ -996,11 +1002,11 @@
 
 				DrawString(7, y, STR_PERFORMANCE_DETAIL_VEHICLES + i, 0);
 
-				// Draw the score
+				/* Draw the score */
 				SetDParam(0, score);
 				DrawStringRightAligned(107, y, SET_PERFORMANCE_DETAIL_INT, 0);
 
-				// Calculate the %-bar
+				/* Calculate the %-bar */
 				if (val > needed) {
 					x = 50;
 				} else if (val == 0) {
@@ -1009,28 +1015,28 @@
 					x = val * 50 / needed;
 				}
 
-				// SCORE_LOAN is inversed
+				/* SCORE_LOAN is inversed */
 				if (val < 0 && i == SCORE_LOAN) x = 0;
 
-				// Draw the bar
+				/* Draw the bar */
 				if (x !=  0) GfxFillRect(112,     y - 2, 112 + x,  y + 10, color_done);
 				if (x != 50) GfxFillRect(112 + x, y - 2, 112 + 50, y + 10, color_notdone);
 
-				// Calculate the %
+				/* Calculate the % */
 				x = (val <= needed) ? val * 100 / needed : 100;
 
-				// SCORE_LOAN is inversed
+				/* SCORE_LOAN is inversed */
 				if (val < 0 && i == SCORE_LOAN) x = 0;
 
-				// Draw it
+				/* Draw it */
 				SetDParam(0, x);
 				DrawStringCentered(137, y, STR_PERFORMANCE_DETAIL_PERCENT, 0);
 
-				// SCORE_LOAN is inversed
+				/* SCORE_LOAN is inversed */
 				if (i == SCORE_LOAN) val = needed - val;
 
-				// Draw the amount we have against what is needed
-				//  For some of them it is in currency format
+				/* Draw the amount we have against what is needed
+				 * For some of them it is in currency format */
 				SetDParam(0, val);
 				SetDParam(1, needed);
 				switch (i) {
@@ -1050,9 +1056,9 @@
 		}
 
 		case WE_CLICK:
-			// Check which button is clicked
+			/* Check which button is clicked */
 			if (IS_INT_INSIDE(e->we.click.widget, 13, 21)) {
-				// Is it no on disable?
+				/* Is it no on disable? */
 				if (!w->IsWidgetDisabled(e->we.click.widget)) {
 					w->RaiseWidget(_performance_rating_detail_player + 13);
 					_performance_rating_detail_player = (PlayerID)(e->we.click.widget - 13);
@@ -1063,11 +1069,10 @@
 			break;
 
 		case WE_CREATE: {
-			PlayerID i;
 			Player *p2;
 
 			/* Disable the players who are not active */
-			for (i = PLAYER_FIRST; i < MAX_PLAYERS; i++) {
+			for (PlayerID i = PLAYER_FIRST; i < MAX_PLAYERS; i++) {
 				w->SetWidgetDisabledState(i + 13, !GetPlayer(i)->is_active);
 			}
 			/* Update all player stats with the current data
@@ -1085,8 +1090,8 @@
 			break;
 		}
 
-		case WE_TICK: {
-			// Update the player score every 5 days
+		case WE_TICK:
+			/* Update the player score every 5 days */
 			if (--w->custom[0] == 0) {
 				w->custom[0] = DAY_TICKS;
 				if (--w->custom[1] == 0) {
@@ -1094,7 +1099,7 @@
 
 					w->custom[1] = 5;
 					FOR_ALL_PLAYERS(p2) {
-						// Skip if player is not active
+						/* Skip if player is not active */
 						if (p2->is_active) UpdateCompanyRatingAndValue(p2, false);
 					}
 					w->SetDirty();
@@ -1102,7 +1107,6 @@
 			}
 
 			break;
-		}
 	}
 }
 
--- a/src/gui.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/gui.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file gui.h */
+
 #ifndef GUI_H
 #define GUI_H
 
@@ -7,19 +9,19 @@
 #include "window.h"
 #include "string.h"
 
-/* main_gui.c */
+/* main_gui.cpp */
 void SetupColorsAndInitialWindow(void);
 void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2);
 void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2);
 void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2);
 
-/* settings_gui.c */
+/* settings_gui.cpp */
 void ShowGameOptions(void);
 void ShowGameDifficulty(void);
 void ShowPatchesSelection(void);
 void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right);
 
-/* graph_gui.c */
+/* graph_gui.cpp */
 void ShowOperatingProfitGraph(void);
 void ShowIncomeGraph(void);
 void ShowDeliveredCargoGraph(void);
@@ -29,36 +31,36 @@
 void ShowCompanyLeagueTable(void);
 void ShowPerformanceRatingDetail(void);
 
-/* news_gui.c */
+/* news_gui.cpp */
 void ShowLastNewsMessage(void);
 void ShowMessageOptions(void);
 void ShowMessageHistory(void);
 
-/* rail_gui.c */
+/* rail_gui.cpp */
 void ShowBuildRailToolbar(RailType railtype, int button);
 void PlaceProc_BuyLand(TileIndex tile);
 void ReinitGuiAfterToggleElrail(bool disable);
 
-/* train_gui.c */
+/* train_gui.cpp */
 void ShowTrainViewWindow(const Vehicle *v);
 void ShowOrdersWindow(const Vehicle *v);
 
-/* road_gui.c */
+/* road_gui.cpp */
 void ShowBuildRoadToolbar(void);
 void ShowBuildRoadScenToolbar(void);
 void ShowRoadVehViewWindow(const Vehicle *v);
 
-/* dock_gui.c */
+/* dock_gui.cpp */
 void ShowBuildDocksToolbar(void);
 void ShowShipViewWindow(const Vehicle *v);
 
-/* aircraft_gui.c */
+/* aircraft_gui.cpp */
 void ShowBuildAirToolbar(void);
 
-/* terraform_gui.c */
+/* terraform_gui.cpp */
 void ShowTerraformToolbar(BaseWindow *link = NULL);
 
-/* tgp_gui.c */
+/* tgp_gui.cpp */
 void ShowGenerateLandscape(void);
 void ShowHeightmapLoad(void);
 
@@ -75,7 +77,7 @@
 	GUI_PlaceProc_RockyArea       = 5 << 4,
 };
 
-/* misc_gui.c */
+/* misc_gui.cpp */
 void PlaceLandBlockInfo(void);
 void ShowAboutWindow(void);
 void ShowBuildTreesToolbar(void);
@@ -120,7 +122,7 @@
 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
 extern const byte _fios_colors[];
 
-/* bridge_gui.c */
+/* bridge_gui.cpp */
 void ShowBuildBridgeWindow(uint start, uint end, byte type);
 
 void ShowBuildIndustryWindow(void);
@@ -128,12 +130,12 @@
 void ShowQuery(StringID caption, StringID message, BaseWindow *w, void (*callback)(BaseWindow*, bool));
 void ShowMusicWindow(void);
 
-/* main_gui.c */
+/* main_gui.cpp */
 void HandleOnEditText(const char *str);
 VARDEF bool _station_show_coverage;
 VARDEF PlaceProc *_place_proc;
 
-/* vehicle_gui.c */
+/* vehicle_gui.cpp */
 void InitializeGUI(void);
 
 #endif /* GUI_H */
--- a/src/hal.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/hal.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file hal.h Hardware Abstraction Layer declarations */
+
 #ifndef HAL_H
 #define HAL_H
 
--- a/src/heightmap.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/heightmap.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file heightmap.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "variables.h"
@@ -226,7 +228,7 @@
 	BmpData data;
 	BmpBuffer buffer;
 
-	// Init BmpData
+	/* Init BmpData */
 	memset(&data, 0, sizeof(data));
 
 	f = fopen(filename, "rb");
--- a/src/heightmap.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/heightmap.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file heightmap.h */
+
 #ifndef HEIGHTMAP_H
 #define HEIGHTMAP_H
 
@@ -8,12 +10,15 @@
  * Otherwise you will get inconsistent behaviour.
  */
 enum {
-	HM_COUNTER_CLOCKWISE, //! Rotate the map counter clockwise 45 degrees
-	HM_CLOCKWISE,         //! Rotate the map clockwise 45 degrees
+	HM_COUNTER_CLOCKWISE, ///< Rotate the map counter clockwise 45 degrees
+	HM_CLOCKWISE,         ///< Rotate the map clockwise 45 degrees
 };
 
 /**
  * Get the dimensions of a heightmap.
+ * @param filename to query
+ * @param x dimension x
+ * @param y dimension y
  * @return Returns false if loading of the image failed.
  */
 bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
@@ -22,11 +27,13 @@
  * Load a heightmap from file and change the map in his current dimensions
  *  to a landscape representing the heightmap.
  * It converts pixels to height. The brighter, the higher.
+ * @param filename of the heighmap file to be imported
  */
 void LoadHeightmap(char *filename);
 
 /**
  * Make an empty world where all tiles are of height 'tile_height'.
+ * @param tile_height of the desired new empty world
  */
 void FlatEmptyWorld(byte tile_height);
 
--- a/src/helpers.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/helpers.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,4 +1,7 @@
 /* $Id$ */
+
+/** @file helpers.cpp */
+
 #include "stdafx.h"
 
 #include "openttd.h"
@@ -12,51 +15,74 @@
 /* we cannot expose CBlobT directly to C so we must cast EngineList* to CBlobT<EngineID>* always when we are called from C */
 #define B (*(CBlobT<EngineID>*)el)
 
-/** Create Engine List (and initialize it to empty) */
+/** Create Engine List (and initialize it to empty)
+ * @param el list to be created
+ */
 void EngList_Create(EngineList *el)
 {
-	// call CBlobT constructor explicitly
+	/* call CBlobT constructor explicitly */
 	new (&B) CBlobT<EngineID>();
 }
 
-/** Destroy Engine List (and free its contents) */
+/** Destroy Engine List (and free its contents)
+ * @param el list to be destroyed
+ */
 void EngList_Destroy(EngineList *el)
 {
-	// call CBlobT destructor explicitly
+	/* call CBlobT destructor explicitly */
 	B.~CBlobT<EngineID>();
 }
 
-/** Return number of items stored in the Engine List */
+/** Return number of items stored in the Engine List
+ * @param el list for count inquiry
+ * @return the desired count
+ */
 uint EngList_Count(const EngineList *el)
 {
 	return B.Size();
 }
 
-/** Add new item at the end of Engine List */
+/** Add new item at the end of Engine List
+ * @param el list o which to add an engine
+ * @param eif engine to add to the list
+ */
 void EngList_Add(EngineList *el, EngineID eid)
 {
 	B.Append(eid);
 }
 
-/** Return pointer to the items array held by Engine List */
+/** Return pointer to the items array held by Engine List
+ * @param el list from which the array pointer has to be returned
+ * @return the pointer required
+ */
 EngineID* EngList_Items(EngineList *el)
 {
 	return B.Data();
 }
 
-/** Clear the Engine List (by invalidating all its items == reseting item count to zero) */
+/** Clear the Engine List (by invalidating all its items == reseting item count to zero)
+ * @param el list to be cleared
+ */
 void EngList_RemoveAll(EngineList *el)
 {
 	B.Clear();
 }
 
-/** Sort all items using qsort() and given 'CompareItems' function */
+/** Sort all items using qsort() and given 'CompareItems' function
+ * @param el list to be sorted
+ * @param compare function for evaluation of the quicksort
+ */
 void EngList_Sort(EngineList *el, EngList_SortTypeFunction compare)
 {
 	qsort(B.Data(), B.Size(), sizeof(**el), compare);
 }
 
-/** Sort selected range of items (on indices @ <begin, begin+num_items-1>) */
+/** Sort selected range of items (on indices @ <begin, begin+num_items-1>)
+ * @param el list to be sorted
+ * @param compare function for evaluation of the quicksort
+ * @param begin start of sorting
+ * @param count of items to be sorted
+ */
 void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items)
 {
 	assert(begin <= (uint)B.Size());
--- a/src/helpers.hpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/helpers.hpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,9 +1,10 @@
 /* $Id$ */
 
+/** @file helpers.hpp */
+
 #ifndef HELPERS_HPP
 #define HELPERS_HPP
 
-/** @file helpers.hpp */
 #include "macros.h"
 
 /** When allocating using malloc/calloc in C++ it is usually needed to cast the return value
@@ -70,13 +71,6 @@
 	FORCEINLINE mask_t& operator ^= (mask_t& m1, mask_t m2) {m1 = m1 ^ m2; return m1;} \
 	FORCEINLINE mask_t operator ~(mask_t m) {return (mask_t)(~(int)m);}
 
-/** probably redundant enum combining operators (as we have conversion functions)
- *  but the old code is full of such arithmetics */
-# define DECLARE_ENUM_AS_BIT_INDEX(idx_t, mask_t) \
-	FORCEINLINE mask_t operator << (int m, idx_t i) {return (mask_t)(m << (int)i);} \
-	FORCEINLINE mask_t operator << (mask_t m, int i) {return (mask_t)(((int)m) << i);} \
-	FORCEINLINE mask_t operator >> (mask_t m, int i) {return (mask_t)(((int)m) >> i);}
-
 
 /** Informative template class exposing basic enumeration properties used by several
  *  other templates below. Here we have only forward declaration. For each enum type
--- a/src/industry.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/industry.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file industry.h */
+
 #ifndef INDUSTRY_H
 #define INDUSTRY_H
 
@@ -18,30 +20,33 @@
 	INDUSTRYLIFE_CLOSABLE,         ///< Industry can only close (no production change)
 } IndustryLifeType;
 
+/**
+ * Defines the internal data of a functionnal industry
+ */
 struct Industry {
-	TileIndex xy;
-	byte width; /* swapped order of w/h with town */
+	TileIndex xy;                   ///< coordinates of the primary tile the industry is built one
+	byte width;
 	byte height;
-	const Town* town;
-	CargoID produced_cargo[2];
-	uint16 cargo_waiting[2];
-	byte production_rate[2];
-	CargoID accepts_cargo[3];
-	byte prod_level;
-	uint16 last_mo_production[2];
-	uint16 last_mo_transported[2];
-	byte pct_transported[2];
-	uint16 total_production[2];
-	uint16 total_transported[2];
-	uint16 counter;
+	const Town* town;               ///< Nearest town
+	CargoID produced_cargo[2];      ///< 2 production cargo slots
+	uint16 cargo_waiting[2];        ///< amount of cargo produced per cargo
+	byte production_rate[2];        ///< production rate for each cargo
+	CargoID accepts_cargo[3];       ///< 3 input cargo slots
+	byte prod_level;                ///< general production level
+	uint16 last_mo_production[2];   ///< stats of last month production per cargo
+	uint16 last_mo_transported[2];  ///< stats of last month transport per cargo
+	byte pct_transported[2];        ///< percentage transported per cargo
+	uint16 total_production[2];     ///< total units produced per cargo
+	uint16 total_transported[2];    ///< total units transported per cargo
+	uint16 counter;                 ///< used for animation and/or production (if available cargo)
 
-	byte type;
-	OwnerByte owner;
-	byte random_color;
-	Year last_prod_year;
-	byte was_cargo_delivered;
+	byte type;                      ///< type of industry. see IT_COAL_MINE and others
+	OwnerByte owner;                ///< owner of the industry.  Which SHOULD always be (imho) OWNER_NONE
+	byte random_color;              ///< randomized colour of the industry, for display purpose
+	Year last_prod_year;            ///< last year of production
+	byte was_cargo_delivered;       ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
 
-	IndustryID index;
+	IndustryID index;               ///< index of the industry in the pool of industries
 };
 
 typedef struct IndustryTileTable {
@@ -49,59 +54,62 @@
 	IndustryGfx gfx;
 } IndustryTileTable;
 
+/**
+ * Defines the data structure for constructing industry.
+ */
 typedef struct IndustrySpec {
-	/** Tables with the 'layout' of different composition of GFXes */
-	const IndustryTileTable *const *table;
-	/** Number of elements in the table */
-	byte num_table;
-	/** Base cost multiplier*/
-	byte cost_multiplier;
-	/** Industries this industry cannot be close to */
-	IndustryType conflicting[3];
-	/** index to a procedure to check for conflicting circumstances */
-	byte check_proc;
-
+	const IndustryTileTable *const *table;///< List of the tiles composing the industry
+	byte num_table;                       ///< Number of elements in the table
+	byte cost_multiplier;                 ///< Base cost multiplier*/
+	IndustryType conflicting[3];          ///< Industries this industry cannot be close to
+	byte check_proc;                      ///< Index to a procedure to check for conflicting circumstances
 	CargoID produced_cargo[2];
 	byte production_rate[2];
-	/** The minimum amount of cargo transported to the stations; if the
-	 * waiting cargo is less than this number, no cargo is moved to it*/
-	byte minimal_cargo;
-	CargoID accepts_cargo[3];
-
-	IndustryLifeType life_type;  ///< This is also known as Industry production flag, in newgrf specs
-
-	byte climate_availability;  ///< Bitmask, giving landscape enums as bit position
-
-	StringID name;
-	StringID closure_text;
-	StringID production_up_text;
-	StringID production_down_text;
+	byte minimal_cargo;                   ///< minimum amount of cargo transported to the stations
+	                                      ///< If the waiting cargo is less than this number, no cargo is moved to it
+	CargoID accepts_cargo[3];             ///< 3 accepted cargos
+	IndustryLifeType life_type;           ///< This is also known as Industry production flag, in newgrf specs
+	byte climate_availability;            ///< Bitmask, giving landscape enums as bit position
+	StringID name;                        ///< Displayed name of the industry
+	StringID closure_text;                ///< Message appearing when the industry closes
+	StringID production_up_text;          ///< Message appearing when the industry's production is increasing
+	StringID production_down_text;        ///< Message appearing when the industry's production is decreasing
 } IndustrySpec;
 
+/**
+ * Defines the data structure of each indivudual tile of an industry.
+ */
 typedef struct IndustryTileSpec {
-	CargoID accepts_cargo[3];
-	Slope slopes_refused;
+	CargoID accepts_cargo[3];             ///< Cargo accepted by this tile
+	Slope slopes_refused;                 ///< slope pattern on which this tile cannot be built
 } IndustryTileSpec;
 
-const IndustrySpec *GetIndustrySpec(IndustryType thistype);
-const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx);
+const IndustrySpec *GetIndustrySpec(IndustryType thistype);    ///< Array of industries default data
+const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx);  ///< Array of industry tiles default data
 
 DECLARE_OLD_POOL(Industry, Industry, 3, 8000)
 
 /**
  * Check if an Industry really exists.
+ * @param industry to check
+ * @return true if position is a valid one
  */
 static inline bool IsValidIndustry(const Industry *industry)
 {
 	return industry->xy != 0;
 }
 
+/**
+ * Check if an Industry exists whithin the pool of industries
+ * @param index of the desired industry
+ * @return true if it is inside the pool
+ */
 static inline bool IsValidIndustryID(IndustryID index)
 {
 	return index < GetIndustryPoolSize() && IsValidIndustry(GetIndustry(index));
 }
 
-VARDEF int _total_industries;
+VARDEF int _total_industries; //general counter
 
 static inline IndustryID GetMaxIndustryIndex(void)
 {
--- a/src/industry_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/industry_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file industry_cmd.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "clear_map.h"
@@ -80,6 +82,7 @@
  * not allowing modifications of it.
  * @param thistype of industry (which is the index in _industry_specs)
  * @pre thistype < IT_END
+ * @return a pointer to the corresponding industry spec
  **/
 const IndustrySpec *GetIndustrySpec(IndustryType thistype)
 {
@@ -87,6 +90,14 @@
 	return &_industry_specs[thistype];
 }
 
+/**
+ * Accessor for array _industry_tile_specs.
+ * This will ensure at once : proper access and
+ * not allowing modifications of it.
+ * @param gfx of industrytile (which is the index in _industry_specs)
+ * @pre gfx < NUM_INDUSTRY_GFXES
+ * @return a pointer to the corresponding industrytile spec
+ **/
 const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx)
 {
 	assert(gfx < NUM_INDUSTRY_GFXES);
@@ -427,7 +438,7 @@
 		}
 		break;
 
-	// Sparks on a coal plant
+	/* Sparks on a coal plant */
 	case GFX_POWERPLANT_SPARKS:
 		if ((_tick_counter & 3) == 0) {
 			m = GetIndustryAnimationState(tile);
@@ -869,7 +880,7 @@
  * Search callback function for ChopLumberMillTrees
  * @param tile to test
  * @param data that is passed by the caller.  In this case, nothing
- * @result of the test
+ * @return the result of the test
  */
 static bool SearchLumberMillTrees(TileIndex tile, uint32 data)
 {
@@ -1317,12 +1328,12 @@
 	const IndustrySpec *indspec = GetIndustrySpec(type);
 	const Industry *i;
 
-	// accepting industries won't be close, not even with patch
+	/* accepting industries won't be close, not even with patch */
 	if (_patches.same_industry_close && indspec->accepts_cargo[0] == CT_INVALID)
 		return true;
 
 	FOR_ALL_INDUSTRIES(i) {
-		// check if an industry that accepts the same goods is nearby
+		/* check if an industry that accepts the same goods is nearby */
 		if (DistanceMax(tile, i->xy) <= 14 &&
 				indspec->accepts_cargo[0] != CT_INVALID &&
 				indspec->accepts_cargo[0] == i->accepts_cargo[0] && (
@@ -1334,7 +1345,7 @@
 			return false;
 		}
 
-		// check "not close to" field.
+		/* check "not close to" field. */
 		if ((i->type == indspec->conflicting[0] || i->type == indspec->conflicting[1] || i->type == indspec->conflicting[2]) &&
 				DistanceMax(tile, i->xy) <= 14) {
 			_error_message = STR_INDUSTRY_TOO_CLOSE;
@@ -1445,6 +1456,14 @@
 	InvalidateWindow(WC_INDUSTRY_DIRECTORY, 0);
 }
 
+/** Helper function for Build/Fund an industry
+ * @param tile tile where industry is built
+ * @param type of industry to build
+ * @param flags of operations to conduct
+ * @param indspec pointer to industry specifications
+ * @param it pointer to list of tile type to build
+ * @return the pointer of the newly created industry, or NULL if it failed
+ */
 static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, uint32 flags, const IndustrySpec *indspec, const IndustryTileTable *it)
 {
 	const Town *t;
@@ -1474,8 +1493,10 @@
 
 /** Build/Fund an industry
  * @param tile tile where industry is built
- * @param p1 industry type @see build_industry.h and @see industry.h
+ * @param flags of operations to conduct
+ * @param p1 industry type see build_industry.h and see industry.h
  * @param p2 unused
+ * @return index of the newly create industry, or CMD_ERROR if it failed
  */
 int32 CmdBuildIndustry(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 {
@@ -1524,7 +1545,7 @@
 }
 
 static const byte _numof_industry_table[4][12] = {
-	// difficulty settings for number of industries
+	/* difficulty settings for number of industries */
 	{0, 0, 0, 0, 0, 0, 0, 0,  0,  0,  0},   //none
 	{0, 1, 1, 1, 2, 2, 3, 3,  4,  4,  5},   //low
 	{0, 1, 2, 3, 4, 5, 6, 7,  8,  9, 10},   //normal
@@ -1536,7 +1557,7 @@
 	int num = _numof_industry_table[_opt.diff.number_industries][amount];
 
 	if (type == IT_OIL_REFINERY || type == IT_OIL_RIG) {
-		// These are always placed next to the coastline, so we scale by the perimeter instead.
+		/* These are always placed next to the coastline, so we scale by the perimeter instead. */
 		num = ScaleByMapSize1D(num);
 	} else {
 		num = ScaleByMapSize(num);
@@ -1823,7 +1844,7 @@
 
 	_current_player = old_player;
 
-	// production-change
+	/* production-change */
 	_industry_sort_dirty = true;
 	InvalidateWindow(WC_INDUSTRY_DIRECTORY, 0);
 }
@@ -1881,7 +1902,7 @@
 	SLE_CONDVAR(Industry, last_prod_year,      SLE_INT32,                 31, SL_MAX_VERSION),
 	    SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8),
 
-	// reserve extra space in savegame here. (currently 32 bytes)
+	/* reserve extra space in savegame here. (currently 32 bytes) */
 	SLE_CONDNULL(32, 2, SL_MAX_VERSION),
 
 	SLE_END()
@@ -1891,7 +1912,7 @@
 {
 	Industry *ind;
 
-	// Write the vehicles
+	/* Write the vehicles */
 	FOR_ALL_INDUSTRIES(ind) {
 		SlSetArrayIndex(ind->index);
 		SlObject(ind, _industry_desc);
--- a/src/industry_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/industry_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file industry_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "debug.h"
@@ -19,6 +21,7 @@
 #include "helpers.hpp"
 #include "cargotype.h"
 
+/* industries per climate, according to the different construction windows */
 const byte _build_industry_types[4][12] = {
 	{  1,  2,  4,  6,  8,  0,  3,  5,  9, 11, 18 },
 	{  1, 14,  4, 13,  7,  0,  3,  9, 11, 15 },
@@ -290,9 +293,9 @@
 
 static void IndustryViewWndProc(BaseWindow *w, WindowEvent *e)
 {
-	// WP(w,vp2_d).data_1 is for the editbox line
-	// WP(w,vp2_d).data_2 is for the clickline
-	// WP(w,vp2_d).data_3 is for the click pos (left or right)
+	/* WP(w,vp2_d).data_1 is for the editbox line
+	 * WP(w,vp2_d).data_2 is for the clickline
+	 * WP(w,vp2_d).data_3 is for the click pos (left or right) */
 
 	switch (e->event) {
 	case WE_PAINT: {
@@ -325,7 +328,7 @@
 
 			SetDParam(2, i->pct_transported[0] * 100 >> 8);
 			DrawString(4 + (IsProductionAlterable(i) ? 30 : 0), 127, STR_482B_TRANSPORTED, 0);
-			// Let's put out those buttons..
+			/* Let's put out those buttons.. */
 			if (IsProductionAlterable(i)) {
 				DrawArrowButtons(5, 127, 3, (WP(w,vp2_d).data_2 == 1) ? WP(w,vp2_d).data_3 : 0,
 						!isProductionMinimum(i, 0), !isProductionMaximum(i, 0));
@@ -336,7 +339,7 @@
 				SetDParam(1, i->total_production[1]);
 				SetDParam(2, i->pct_transported[1] * 100 >> 8);
 				DrawString(4 + (IsProductionAlterable(i) ? 30 : 0), 137, STR_482B_TRANSPORTED, 0);
-				// Let's put out those buttons..
+				/* Let's put out those buttons.. */
 				if (IsProductionAlterable(i)) {
 					DrawArrowButtons(5, 137, 3, (WP(w,vp2_d).data_2 == 2) ? WP(w,vp2_d).data_3 : 0,
 						!isProductionMinimum(i, 1), !isProductionMaximum(i, 1));
@@ -357,7 +360,7 @@
 
 			i = GetIndustry(w->window_number);
 
-			// We should work if needed..
+			/* We should work if needed.. */
 			if (!IsProductionAlterable(i)) return;
 
 			x = e->we.click.pt.x;
@@ -379,7 +382,7 @@
 					WP(w,vp2_d).data_2 = line+1;
 					WP(w,vp2_d).data_3 = (x < 15 ? 1 : 2);
 				} else if (IS_INT_INSIDE(x, 34, 160)) {
-					// clicked the text
+					/* clicked the text */
 					WP(w,vp2_d).data_1 = line;
 					SetDParam(0, i->production_rate[line] * 8);
 					ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_GAME_PRODUCTION, 10, 100, w, CS_ALPHANUMERAL);
@@ -533,7 +536,7 @@
 			break;
 	}
 
-	// default to string sorting if they are otherwise equal
+	/* default to string sorting if they are otherwise equal */
 	if (r == 0) {
 		char buf1[96];
 
@@ -552,25 +555,30 @@
 	return r;
 }
 
+/**
+ * Makes a sorted industry list.
+ * When there are no industries, the list has to be made. This so when one
+ * starts a new game without industries after playing a game with industries
+ * the list is not populated with invalid industries from the previous game.
+ */
 static void MakeSortedIndustryList(void)
 {
 	const Industry* i;
 	int n = 0;
 
-	/* Don't attempt a sort if there are no industries */
-	if (GetNumIndustries() == 0) return;
-
 	/* Create array for sorting */
 	_industry_sort = ReallocT(_industry_sort, GetMaxIndustryIndex() + 1);
 	if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list");
 
-	FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i;
+	/* Don't attempt a sort if there are no industries */
+	if (GetNumIndustries() != 0) {
+		FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i;
+		qsort((void*)_industry_sort, n, sizeof(_industry_sort[0]), GeneralIndustrySorter);
+	}
 
 	_num_industry_sort = n;
 	_last_industry = NULL; // used for "cache"
 
-	qsort((void*)_industry_sort, n, sizeof(_industry_sort[0]), GeneralIndustrySorter);
-
 	DEBUG(misc, 3, "Resorting industries list");
 }
 
--- a/src/industry_map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/industry_map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -172,42 +172,42 @@
 } IndustryTypeSolver;
 
 static const IndustryTypeSolver industry_gfx_Solver [IT_END] = {
-	{  0,   6}, //IT_COAL_MINE
-	{  7,  10}, //IT_POWER_STATION,
-	{ 11,  15}, //IT_SAWMILL,
-	{ 16,  17}, //IT_FOREST,
-	{ 18,  23}, //IT_OIL_REFINERY,
-	{ 24,  28}, //IT_OIL_RIG,
-	{ 29,  31}, //IT_OIL_WELL,
-	{ 32,  38}, //IT_FARM,
-	{ 39,  42}, //IT_FACTORY,
-	{ 43,  46}, //IT_PRINTING_WORKS,
-	{ 47,  51}, //IT_COPPER_MINE,
-	{ 52,  57}, //IT_STEEL_MILL,
-	{ 58,  59}, //IT_BANK_TEMP,
-	{ 60,  63}, //IT_FOOD_PROCESS,
-	{ 64,  71}, //IT_PAPER_MILL,
-	{ 72,  88}, //IT_GOLD_MINE,
-	{ 89,  90}, //IT_BANK_TROPIC_ARCTIC,
-	{ 91,  99}, //IT_DIAMOND_MINE,
-	{100, 115}, //IT_IRON_MINE,
-	{116, 116}, //IT_FRUIT_PLANTATION,
-	{117, 117}, //IT_RUBBER_PLANTATION,
-	{118, 119}, //IT_WATER_SUPPLY,
-	{120, 120}, //IT_WATER_TOWER,
-	{121, 124}, //IT_FACTORY_2,
-	{125, 128}, //IT_LUMBER_MILL,
-	{129, 130}, //IT_COTTON_CANDY,
-	{131, 134}, //IT_CANDY_FACTORY or sweet factory
-	{135, 136}, //IT_BATTERY_FARM,
-	{137, 137}, //IT_COLA_WELLS,
-	{138, 141}, //IT_TOY_SHOP,
-	{142, 147}, //IT_TOY_FACTORY,
-	{148, 155}, //IT_PLASTIC_FOUNTAINS,
-	{156, 159}, //IT_FIZZY_DRINK_FACTORY,
-	{160, 163}, //IT_BUBBLE_GENERATOR,
-	{164, 166}, //IT_TOFFEE_QUARRY,
-	{167, 174}  //IT_SUGAR_MINE,
+	{  0,   6}, ///< IT_COAL_MINE
+	{  7,  10}, ///< IT_POWER_STATION,
+	{ 11,  15}, ///< IT_SAWMILL,
+	{ 16,  17}, ///< IT_FOREST,
+	{ 18,  23}, ///< IT_OIL_REFINERY,
+	{ 24,  28}, ///< IT_OIL_RIG,
+	{ 29,  31}, ///< IT_OIL_WELL,
+	{ 32,  38}, ///< IT_FARM,
+	{ 39,  42}, ///< IT_FACTORY,
+	{ 43,  46}, ///< IT_PRINTING_WORKS,
+	{ 47,  51}, ///< IT_COPPER_MINE,
+	{ 52,  57}, ///< IT_STEEL_MILL,
+	{ 58,  59}, ///< IT_BANK_TEMP,
+	{ 60,  63}, ///< IT_FOOD_PROCESS,
+	{ 64,  71}, ///< IT_PAPER_MILL,
+	{ 72,  88}, ///< IT_GOLD_MINE,
+	{ 89,  90}, ///< IT_BANK_TROPIC_ARCTIC,
+	{ 91,  99}, ///< IT_DIAMOND_MINE,
+	{100, 115}, ///< IT_IRON_MINE,
+	{116, 116}, ///< IT_FRUIT_PLANTATION,
+	{117, 117}, ///< IT_RUBBER_PLANTATION,
+	{118, 119}, ///< IT_WATER_SUPPLY,
+	{120, 120}, ///< IT_WATER_TOWER,
+	{121, 124}, ///< IT_FACTORY_2,
+	{125, 128}, ///< IT_LUMBER_MILL,
+	{129, 130}, ///< IT_COTTON_CANDY,
+	{131, 134}, ///< IT_CANDY_FACTORY or sweet factory
+	{135, 136}, ///< IT_BATTERY_FARM,
+	{137, 137}, ///< IT_COLA_WELLS,
+	{138, 141}, ///< IT_TOY_SHOP,
+	{142, 147}, ///< IT_TOY_FACTORY,
+	{148, 155}, ///< IT_PLASTIC_FOUNTAINS,
+	{156, 159}, ///< IT_FIZZY_DRINK_FACTORY,
+	{160, 163}, ///< IT_BUBBLE_GENERATOR,
+	{164, 166}, ///< IT_TOFFEE_QUARRY,
+	{167, 174}  ///< IT_SUGAR_MINE,
 };
 
 /**
--- a/src/intro_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/intro_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file intro_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "table/strings.h"
--- a/src/landscape.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/landscape.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -172,7 +172,7 @@
 	Slope tileh = GetTileSlope(tile, z);
 	Slope slope = _tile_type_procs[GetTileType(tile)]->get_slope_tileh_proc(tile, tileh);
 
-	// Flatter slope -> higher base height
+	/* Flatter slope -> higher base height */
 	if (slope < tileh) *z += TILE_HEIGHT;
 	return slope;
 }
@@ -223,7 +223,7 @@
 	if (IsSteepSlope(ti->tileh)) {
 		SpriteID lower_base;
 
-		// Lower part of foundation
+		/* Lower part of foundation */
 		lower_base = sprite_base;
 		if (lower_base == SPR_SLOPES_BASE - 15) lower_base = SPR_FOUNDATION_BASE;
 		AddSortableSpriteToDraw(
@@ -232,24 +232,24 @@
 		ti->z += TILE_HEIGHT;
 		ti->tileh = _inclined_tileh[f - 15];
 		if (f < 15 + 8) {
-			// inclined
+			/* inclined */
 			AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
 			OffsetGroundSprite(31, 9);
 		} else if (f >= 15 + 8 + 4) {
-			// three corners raised
+			/* three corners raised */
 			SpriteID upper = sprite_base + 15 + (f - 15 - 8 - 4) * 2;
 
 			AddSortableSpriteToDraw(upper, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
 			AddChildSpriteScreen(upper + 1, PAL_NONE, 31, 9);
 			OffsetGroundSprite(31, 9);
 		} else {
-			// one corner raised
+			/* one corner raised */
 			OffsetGroundSprite(31, 1);
 		}
 	} else {
 		if (f < 15) {
-			// leveled foundation
-			// Use the original slope sprites if NW and NE borders should be visible
+			/* leveled foundation
+			 * Use the original slope sprites if NW and NE borders should be visible */
 			if (sprite_base  == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
 
 			AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z);
@@ -257,7 +257,7 @@
 			ti->tileh = SLOPE_FLAT;
 			OffsetGroundSprite(31, 1);
 		} else {
-			// inclined foundation
+			/* inclined foundation */
 			AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
 			ti->tileh = _inclined_tileh[f - 15];
 			OffsetGroundSprite(31, 9);
@@ -304,6 +304,7 @@
 
 /** Clear a piece of landscape
  * @param tile tile to clear
+ * @param flags of operation to conduct
  * @param p1 unused
  * @param p2 unused
  */
@@ -317,6 +318,7 @@
 /** Clear a big piece of landscape
  * @param tile end tile of area dragging
  * @param p1 start tile of area dragging
+ * @param flags of operation to conduct
  * @param p2 unused
  */
 int32 CmdClearArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
@@ -332,7 +334,7 @@
 
 	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
 
-	// make sure sx,sy are smaller than ex,ey
+	/* make sure sx,sy are smaller than ex,ey */
 	ex = TileX(tile);
 	ey = TileY(tile);
 	sx = TileX(p1);
@@ -357,9 +359,9 @@
 				}
 				DoCommand(TileXY(x, y), 0, 0, flags, CMD_LANDSCAPE_CLEAR);
 
-				// draw explosion animation...
+				/* draw explosion animation... */
 				if ((x == sx || x == ex) && (y == sy || y == ey)) {
-					// big explosion in each corner, or small explosion for single tiles
+					/* big explosion in each corner, or small explosion for single tiles */
 					CreateEffectVehicleAbove(x * TILE_SIZE + TILE_SIZE / 2, y * TILE_SIZE + TILE_SIZE / 2, 2,
 						sy == ey && sx == ex ? EV_EXPLOSION_SMALL : EV_EXPLOSION_LARGE
 					);
@@ -390,7 +392,7 @@
 		_tile_type_procs[GetTileType(tile)]->tile_loop_proc(tile);
 
 		if (TileX(tile) < MapSizeX() - TILELOOP_SIZE) {
-			tile += TILELOOP_SIZE; /* no overflow */
+			tile += TILELOOP_SIZE; // no overflow
 		} else {
 			tile = TILE_MASK(tile - TILELOOP_SIZE * (MapSizeX() / TILELOOP_SIZE - 1) + TileDiffXY(0, TILELOOP_SIZE)); /* x would overflow, also increase y */
 		}
--- a/src/lang/american.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/american.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Make the highlighted order force the vehicle to wait for a full load
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Make the highlighted order force the vehicle to unload
 STR_SERVICE_HINT                                                :{BLACK}Skip this order unless a service is needed
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}New {STRING} now available!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cost: {CURRENCY} Weight: {WEIGHT_S}{}Speed: {VELOCITY}  Power: {POWER}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Broken down
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Age: {LTBLUE}{STRING}{BLACK}   Running Cost: {LTBLUE}{CURRENCY}/yr
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Center main view on road vehicle depot location
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Road vehicle selection list - click on vehicle for information
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Build the highlighted road vehicle
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}New road vehicle now available!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cost: {CURRENCY}{}Speed: {VELOCITY}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Name road vehicle
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Center main view on ship's location
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Send ship to depot
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Show ship details
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}New ship now available!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Speed: {VELOCITY}{}Capacity: {CARGO}{}Running Cost: {CURRENCY}/yr
 STR_982F_NAME_SHIP                                              :{BLACK}Name ship
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Center main view on aircraft's location
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Send aircraft to hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Show aircraft details
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}New aircraft now available!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Speed: {VELOCITY}{}Capacity: {COMMA} passengers, {COMMA} bags of mail{}Running Cost: {CURRENCY}/yr
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Name aircraft
@@ -2901,6 +2893,7 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}You are about to make changes to a running game; this can crash OpenTTD.{}Are you absolutely sure about this?
 
+
 STR_NEWGRF_ADD                                                  :{BLACK}Add
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Add a NewGRF file to the list
 STR_NEWGRF_REMOVE                                               :{BLACK}Remove
@@ -3126,4 +3119,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Length: {NUM}{}Height difference: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Area: {NUM} x {NUM}{}Height difference: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/brazilian_portuguese.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/brazilian_portuguese.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -937,11 +937,11 @@
 
 STR_OPTIONS_RES                                                 :{BLACK}Resolução da tela
 STR_OPTIONS_RES_CBO                                             :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
-STR_OPTIONS_RES_TIP                                             :{BLACK}Selecione a resolução de tela que deseja utilizar
+STR_OPTIONS_RES_TIP                                             :{BLACK}Selecionar a resolução da tela que deseja utilizar
 
 STR_OPTIONS_SCREENSHOT_FORMAT                                   :{BLACK}Formato da foto
 STR_OPTIONS_SCREENSHOT_FORMAT_CBO                               :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
-STR_OPTIONS_SCREENSHOT_FORMAT_TIP                               :{BLACK}Selecione o formato de foto que deseja utilizar
+STR_OPTIONS_SCREENSHOT_FORMAT_TIP                               :{BLACK}Selecionar o formato de foto que deseja utilizar
 
 STR_AUTOSAVE_1_MONTH                                            :A cada mês
 STR_AUTOSAVE_FAILED                                             :{WHITE}Falha ao salvar automaticamente
@@ -2221,9 +2221,9 @@
 STR_LIVERY_ROADVEH_TIP                                          :{BLACK}Exibir os esquemas de cor de automóveis
 STR_LIVERY_SHIP_TIP                                             :{BLACK}Exibir esquemas de cor de embarcação
 STR_LIVERY_AIRCRAFT_TIP                                         :{BLACK}Exibir esquemas de cor de aviões
-STR_LIVERY_PRIMARY_TIP                                          :{BLACK}Seleciona a cor principal para o esquema selecionado
-STR_LIVERY_SECONDARY_TIP                                        :{BLACK}Seleciona a cor secundária para o esquema selecionado
-STR_LIVERY_PANEL_TIP                                            :{BLACK}Selecione um esquema a mudar, ou múltiplos esquemas com CTRL+clique. Marque a opção para utilizar o esquema
+STR_LIVERY_PRIMARY_TIP                                          :{BLACK}Escolha a cor principal para o esquema selecionado
+STR_LIVERY_SECONDARY_TIP                                        :{BLACK}Escolha a cor secundária para o esquema selecionado
+STR_LIVERY_PANEL_TIP                                            :{BLACK}Selecionar um esquema de cores para mudar, ou múltiplos esquemas com CTRL+clique. Marque a opção para utilizar o esquema
 
 ##id 0x8000
 STR_8000_KIRBY_PAUL_TANK_STEAM                                  :Kirby Paul Tank (Vapor)
@@ -2554,7 +2554,7 @@
 STR_8827_FULL_LOAD                                              :{BLACK}Carga
 STR_8828_UNLOAD                                                 :{BLACK}Descarga
 STR_REFIT                                                       :{BLACK}Readaptar
-STR_REFIT_TIP                                                   :{BLACK}Selecione a adaptação na ordem atual. CTRL + Clique para remover a instrução
+STR_REFIT_TIP                                                   :{BLACK}Selecionar a adaptação na ordem atual. CTRL + Clique para remover a instrução
 STR_REFIT_ORDER                                                 :(Readaptar para {STRING})
 STR_8829_ORDERS                                                 :{WHITE}{VEHICLE} (Ordens)
 STR_882A_END_OF_ORDERS                                          :{SETX 10}- - Fim de Ordens - -
@@ -2610,8 +2610,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A ordem selecionada fará com que o veículo espere carregar completamente
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A ordem selecionada forçará o veículo a descarregar
 STR_SERVICE_HINT                                                :{BLACK}Saltar esta ordem a menos que seja necessário manutenção
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nov{G o a} {STRING} agora disponível!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Custo: {CURRENCY} Peso: {WEIGHT_S}{}Velocidade: {VELOCITY}  Potência: {POWER}{}Custo de circulação: {CURRENCY}/ano{}Capacidade: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Quebrado
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Idade: {LTBLUE}{STRING}{BLACK}   Custo de circulação: {LTBLUE}{CURRENCY}/ano
@@ -2679,8 +2677,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrar visualização na localização da garagem
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista de automóveis - clique num automóvel para informações
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construir o veículo selecionado
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Novo automóvel agora disponível!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Custo: {CURRENCY}{}Velocidade: {VELOCITY}{}Custo de circulação: {CURRENCY}/ano{}Capacidade: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Renomear automóvel
@@ -2752,8 +2748,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrar visualização na localização da embarcação
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Enviar embarcação para o depósito. CTRL+clique fará apenas manutenção
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Exibir detalhes da embarcação
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nova embarcação agora disponível!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Custo: {CURRENCY} Velocidade Máx.: {VELOCITY}{}Capacidade: {CARGO}{}Custo de circulação: {CURRENCY}/ano
 STR_982F_NAME_SHIP                                              :{BLACK}Renomear embarcação
 
@@ -2826,8 +2820,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrar visualização na localização da aeronave
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Enviar aeronave para o hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Exibir detalhes da aeronave
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nova aeronave agora disponível!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Custo: {CURRENCY} Velocidade Máx.: {VELOCITY}{}Capacidade: {COMMA} passageiros, {COMMA} sacos de correio{}Custo de circulação: {CURRENCY}/ano
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Renomear aeronave
@@ -2905,6 +2897,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}SomaMD5 (verf. de segurança): {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Você está prestes a efetuar alterações neste jogo atual; isto pode danificar o OpenTTD. {}Tem absoluta certeza que deseja fazer isto?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Atenção: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Erro: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Erro Fatal: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} não irá funcionar com a versão do TTDPatch encontrada pelo OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} funciona na versão {STRING} de TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} é projetado para ser usado com {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :parâmetro inválido para {STRING}: parâmetro {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} deve ser carregado antes de {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} deve ser carregado depois de {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Adicionar
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Adiciona um NewGRF à lista
 STR_NEWGRF_REMOVE                                               :{BLACK}Remover
@@ -2990,11 +2993,11 @@
 STR_REPLACE_VEHICLES_STOP                                       :{BLACK}Parar Substituição
 STR_NOT_REPLACING                                               :{BLACK}Não substituindo
 STR_NOT_REPLACING_VEHICLE_SELECTED                              :{BLACK}Nenhum veículo selecionado
-STR_REPLACE_HELP_LEFT_ARRAY                                     :{BLACK}Selecione o tipo de motor para substituir
-STR_REPLACE_HELP_RIGHT_ARRAY                                    :{BLACK}Selecione o novo tipo de motor para substituir o que selecionou à esquerda
+STR_REPLACE_HELP_LEFT_ARRAY                                     :{BLACK}Selecionar o tipo de motor para substituir
+STR_REPLACE_HELP_RIGHT_ARRAY                                    :{BLACK}Selecionar o novo tipo de motor para substituir o que selecionou à esquerda
 STR_REPLACE_HELP_STOP_BUTTON                                    :{BLACK}Pressione para parar a subsituição do tipo de motor que selecionou à esquerda
 STR_REPLACE_HELP_START_BUTTON                                   :{BLACK}Pressione para iniciar a substituição do tipo de motor que selecionou à esquerda, com o tipo de motor selecionado à direita
-STR_REPLACE_HELP_RAILTYPE                                       :{BLACK}Selecione o tipo de carga para o qual deseja efetuar a substituição dos motores
+STR_REPLACE_HELP_RAILTYPE                                       :{BLACK}Escolha o tipo de carga para o qual deseja efetuar a substituição dos motores
 STR_REPLACE_HELP_REPLACE_INFO_TAB                               :{BLACK}Exibe o tipo de motor que substituirá o que está selecionado à esquerda, se algum
 STR_REPLACE_HELP                                                :{BLACK}Permite substituir um tipo de motor por outro tipo, quando trens do tipo original entram num depósito
 STR_REPLACE_REMOVE_WAGON                                        :{BLACK}Remoção de vagões: {ORANGE}{SKIP}{STRING}
@@ -3130,4 +3133,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Comprimento: {NUM}{}Diferença de Altura: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Area: {NUM} x {NUM}{}Diferença de altura: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/bulgarian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/bulgarian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2608,8 +2608,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Изчакай на избраното назначение до пълно зареждане Ñ Ñ‚Ð¾Ð²Ð°Ñ€
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Разтоварва на избраното назначение Ñ†ÐµÐ»Ð¸Ñ Ñ‚Ð¾Ð²Ð°Ñ€
 STR_SERVICE_HINT                                                :{BLACK}ПропуÑни оÑвен ако е необходим ремонт
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Ðов {STRING} вече е доÑтъпен!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Цена: {CURRENCY} Тегло: {WEIGHT_S}{}СкороÑÑ‚: {VELOCITY}  МощноÑÑ‚: {POWER}{}Разход: {CURRENCY}/г.{}Капацитет: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Развален
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}ВъзраÑÑ‚: {LTBLUE}{STRING}{BLACK}   Оперативни разходи: {LTBLUE}{CURRENCY}/г.
@@ -2677,8 +2675,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}ФокуÑирай Ð¾Ð±Ñ‰Ð¸Ñ Ð¿Ð»Ð°Ð½ върху меÑтонахождението на МПС-депото
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}СпиÑък Ñ Ð¸Ð·Ð±Ð¾Ñ€ на МПС-та - натиÑни върху МПС за информациÑ
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Купи поÑоченото МПС
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Ðово МПС излезе на пазара!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Цена: {CURRENCY}{}СкороÑÑ‚: {VELOCITY}{}Оперативен разход: {CURRENCY}/год{}ВмеÑтимоÑÑ‚: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Преименувай МПС-то
@@ -2750,8 +2746,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}ФокуÑирай Ð¾Ð±Ñ‰Ð¸Ñ Ð¿Ð»Ð°Ð½ върху меÑтонахождението на кораба
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Прати кораба в депото
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Покажи детайлите за кораба
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Ðов кораб излезе на пазара!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} МакÑ. СкороÑÑ‚: {VELOCITY}{}ВмеÑтимоÑÑ‚: {CARGO}{}Разход: {CURRENCY}/год.
 STR_982F_NAME_SHIP                                              :{BLACK}Ðаименувай кораба
 
@@ -2824,8 +2818,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Центриране на Ð³Ð»Ð°Ð²Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† върху Ñамолета
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Изпращане на Ñамолета в хангар
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° Ñамолета
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Ðов Ñамолет е доÑтъпен!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Цена: {CURRENCY} МакÑ. ÑкороÑÑ‚: {VELOCITY}{}Капацитет: {COMMA} пътника, {COMMA} чувала поща{}Разход: {CURRENCY}/г.
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Име на Ñамолет
--- a/src/lang/catalan.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/catalan.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Fer que en l'ordre seleccionada s'esperi a que l'element tingui càrrega total
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Obliga en l'ordre seleccionada a descarregar l'element
 STR_SERVICE_HINT                                                :{BLACK}Saltar l'ordre a menys que es necessiti manteniment
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nova {STRING} disponible!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cost: {CURRENCY} Pes: {WEIGHT_S}{}Velocitat: {VELOCITY}  Potència: {POWER}{}Cost de circulació: {CURRENCY}/any{}Capacitat: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Avariat
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Edat: {LTBLUE}{STRING}{BLACK}   Cost de Circulació: {LTBLUE}{CURRENCY}/any
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centra la pantalla principal en la situació de la cotxera
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Llista de selecció de Vehicles Rodats - clica en un vehicle per informació
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construeix l'automòbil seleccionat
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nou automòbil disponible!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cost: {CURRENCY}{}Velocitat: {VELOCITY}{}Cost de circulació: {CURRENCY}/any{}Capacitat: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Anomena automòbil
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centra la pantalla principal en la situació del vaixell
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Envia el vaixell a la drassana. CTRL+Clic per només revisió
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Mostra els detalls del vaixell
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nou vaixell disponible!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Velocitat: {VELOCITY}{}Capacitat: {CARGO}{}Cost de Circulació: {CURRENCY}/any
 STR_982F_NAME_SHIP                                              :{BLACK}Anomena vaixell
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centra la pantalla principal a la situació de l'aeronau
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Envia aeronau a l'hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Mostra els detalls de l'aeronau
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nova aeronau disponible!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Velocitat: {VELOCITY}{}Capacitat: {COMMA} passatgers, {COMMA} sacs de correu{}Cost de Circulació: {CURRENCY}/any
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Anomena aeronau
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Estàs a punt de fer canvis en un joc actiu; això pot fer que OpenTTD es pengi.{}Estàs completament segur que vols fer-los?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Alerta: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Error: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fatal: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} no funcionarà amb la versió de TTDPatch informada per OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} és per la versió {STRING} de TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} està dissenyat per ser utilitzat amb {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Paràmetre invàlid per {STRING}: paràmetre {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} ha de ser carregat abans de {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} ha de ser carregat després de {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Afegeix
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Afegeix un arxiu NewGRF a la llista
 STR_NEWGRF_REMOVE                                               :{BLACK}Treu
@@ -3126,4 +3129,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Llargada: {NUM}{}Diferència d'alçada: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Àrea: {NUM} x {NUM}{}Diferència d'alçada: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/czech.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/czech.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -3,7 +3,7 @@
 ##isocode cs_CS
 ##plural 6
 ##case nom gen dat acc voc loc ins big
-##gender m f n
+##gender f m n
 
 ##id 0x0000
 STR_NULL                                                        :
@@ -2670,8 +2670,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}OznaÄený příkaz provádÄ›t do plného naložení
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}OznaÄený příkaz vyloží vozidlo
 STR_SERVICE_HINT                                                :{BLACK}PÅ™eskoÄ tento cíl, pokud není potÅ™eba pravidelná údržba
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Další {STRING} je k dispozici!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cena: {CURRENCY} Hmotnost: {WEIGHT_S}{}Rychlost: {VELOCITY}  Výkon: {POWER}{}Cena provozu: {CURRENCY} roÄnÄ›{}Kapacita: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Porucha
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Stáří: {LTBLUE}{STRING}{BLACK}   Cena provozu: {LTBLUE}{CURRENCY} roÄnÄ›
@@ -2739,8 +2737,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Nastav pohled na garáž
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Seznam silniÄních vozidel - klepni na vozidlo pro informace
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Koupit oznaÄené vozidlo
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nové silniÄní vozidlo je k dispozici!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cena: {CURRENCY}{}Rychlost: {VELOCITY}{}Cena provozu: {CURRENCY} roÄnÄ›{}Kapacita: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}PÅ™ejmenovat silniÄní vozidlo
@@ -2812,8 +2808,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Nastavit pohled na loÄ
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Poslat loÄ do doku
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Ukázat detaily lodi
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nová loÄ je k dispozici!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. rychlost: {VELOCITY}{}Kapacita: {CARGO}{}Cena provozu: {CURRENCY} roÄnÄ›
 STR_982F_NAME_SHIP                                              :{BLACK}PÅ™ejmenovat loÄ
 
@@ -2886,8 +2880,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Nastavit pohled na letadlo
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Poslat letadlo do hangáru
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Ukázat detaily letadla
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nové letadlo je k dispozici!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. rychlost: {VELOCITY}{}Kapacita: {COMMA} cestující{P "" "" ch}, {COMMA} balík{P "" y ů} poÅ¡ty{}Cena provozu: {CURRENCY} roÄnÄ›
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Přejmenovat letadlo
@@ -2965,6 +2957,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Právě se chystáš změnit nastavení grafik za běžící hry; může to shodit OpenTTD.{}Jsi si s tím opravdu jist/a?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Varování: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Chyba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Závažná chyba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} nebude fungovat s verzí TTDPatche, kterou OpenTTD hlásí.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} je pro TTD verzi {STRING}.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} je navržen pro práci s {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Neplatný parametr pro {STRING}: parametr {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} musí být nahráván před {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} musí být nahráván po {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Přidat
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Přidat NewGRF soubor do seznamu
 STR_NEWGRF_REMOVE                                               :{BLACK}Odebrat
@@ -3190,4 +3193,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Délka: {NUM}{}Výškový rozdíl: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Oblast: {NUM} x {NUM}{}Výškový rozdíl: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/danish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/danish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2605,8 +2605,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Få den markerede ordre til at tvinge toget til at vente på en fuld last
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Få den markerede ordre til at tvinge toget til at aflæsse
 STR_SERVICE_HINT                                                :{BLACK}Spring denne ordre over medmindre der er behov for service
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Ny {STRING} tilgængelig nu!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Pris: {CURRENCY} Vægt: {WEIGHT_S}{}Hastighed: {VELOCITY}  Styrke: {POWER}{}Driftsomkostninger: {CURRENCY}/år{}Kapacitet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}GÃ¥et i stykker
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Alder: {LTBLUE}{STRING}{BLACK}   Driftsomkostninger: {LTBLUE}{CURRENCY}/Ã¥r
@@ -2674,8 +2672,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrer skærmen over værkstedets lokalitet
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Liste over køretøjstyper - klik på køretøj for information
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Byg det markerede køretøj
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nyt vejkøretøj er tilgængeligt!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Pris: {CURRENCY}{}Hastighed: {VELOCITY}{}Driftsomkostninger: {CURRENCY}/Ã¥r{}Kapacitet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Giv køretøjet et navn
@@ -2747,8 +2743,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrer skærmen over skibets lokalitet
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Send skibet til dok. CTRL+klik vil kun servicere
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Vis detaljer omkring skibet
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nyt skib er tilgængeligt!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Pris: {CURRENCY} Maks. hastighed: {VELOCITY}{}Kapacitet: {CARGO}{}Driftsomkostninger: {CURRENCY}/Ã¥r
 STR_982F_NAME_SHIP                                              :{BLACK}Giv skibet et navn
 
@@ -2821,8 +2815,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrer skærmen over flyets lokalitet
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Send flyet til en hangar. CTRL+klik vil kun servicere
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Vis detaljet omkring flyet
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nyt fly tilgængeligt!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Pris: {CURRENCY} Maks. hastighed: {VELOCITY}{}Kapacitet: {COMMA} passagerer, {COMMA} sække post{}Driftsomkostninger: {CURRENCY}/år
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Navngiv flyet
--- a/src/lang/dutch.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/dutch.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Zorg dat de geselecteerde order het voertuig forceert te wachten voor een volledige belading
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Zorg dat de geselecteerde order het voertuig forceert uit te laden
 STR_SERVICE_HINT                                                :{BLACK}Sla deze order over tenzij een reparatie nodig is
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nieuwe {STRING} nu beschikbaar!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Prijs: {CURRENCY} Gewicht: {WEIGHT_S}{}Snelheid: {VELOCITY}  Kracht: {POWER}{}Brandstofprijs: {CURRENCY}/jr{}Capaciteit: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Kapot
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Leeftijd: {LTBLUE}{STRING}{BLACK}   Brandstofkosten: {LTBLUE}{CURRENCY}/jr
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centreer hoofdscherm op wegvoertuigs depot lokatie
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Wegvoertuig selectie lijst - klik op voertuig voor informatie
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Bouw het geselecteerde wegvoertuig
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nieuw wegvoertuig nu beschikbaar!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Prijs: {CURRENCY}{}Snelheid: {VELOCITY}{}Brandstofkosten: {CURRENCY}/jr{}Capaciteit: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Hernoem wegvoertuig
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centreer hoofdbeeld op de lokatie van dit schip
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Stuur schip naar depot
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Laat details van schip zien
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nieuw schip nu beschikbaar!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Prijs: {CURRENCY} Max. snelheid: {VELOCITY}{}Capaciteit: {CARGO}{}Brandstofkosten: {CURRENCY}/jr
 STR_982F_NAME_SHIP                                              :{BLACK}Hernoem schip
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centreer hoofdbeeld op de vliegtuiglokatie
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Stuur vliegtuig naar hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Laat vliegtuigdetails zien
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nieuw vliegtuig nu beschikbaar!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Prijs: {CURRENCY} Max. snelheid: {VELOCITY}{}Capaciteit: {COMMA} passagiers, {COMMA} zakken post{}Brandstofkosten: {CURRENCY}/jr
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Hernoem vliegtuig
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Je staat op het punt om wijzigingen te maken aan een lopend spel; dit dan OpenTTD laten crashen.{}Weet je het heel zeker?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Waarschuwing: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Fout: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Kritiek: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} werkt niet met de TTDPatch versie, gerapporteerd door OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} is voor de {STRING} versie van TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} is ontwikkeld voor {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Ongeldide parameter voor {STRING}: parameter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} moet geladen zijn voor {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} moet geladen zijn na {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Toevoegen
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Voeg een NewGRF bestand toe aan te lijst
 STR_NEWGRF_REMOVE                                               :{BLACK}Verwijderen
@@ -3126,4 +3129,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Lengte: {NUM}{}Hoogte verschil: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Gebied: {NUM} x {NUM}{}Hoogte verschil: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/english.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/english.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Make the highlighted order force the vehicle to wait for a full load
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Make the highlighted order force the vehicle to unload
 STR_SERVICE_HINT                                                :{BLACK}Skip this order unless a service is needed
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}New {STRING} now available!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cost: {CURRENCY} Weight: {WEIGHT_S}{}Speed: {VELOCITY}  Power: {POWER}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Broken down
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Age: {LTBLUE}{STRING2}{BLACK}   Running Cost: {LTBLUE}{CURRENCY}/yr
@@ -2635,6 +2633,10 @@
 STR_TRAIN_NO_POWER                                              :{RED}No power
 STR_TRAIN_START_NO_CATENARY                                     :This track lacks catenary, so the train can't start
 
+STR_NEW_VEHICLE_NOW_AVAILABLE                                   :{BLACK}{BIGFONT}New {STRING} now available!
+STR_NEW_VEHICLE_TYPE                                            :{BLACK}{BIGFONT}{STRING}
+STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE                         :{BLACK}New {STRING} now available!  -  {STRING}
+
 ##id 0x9000
 STR_9000_ROAD_VEHICLE_IN_THE_WAY                                :{WHITE}Road vehicle in the way
 STR_9001_ROAD_VEHICLES                                          :{WHITE}{COMPANY} - {COMMA} Road Vehicle{P "" s}
@@ -2675,8 +2677,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centre main view on road vehicle depot location
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Road vehicle selection list - click on vehicle for information
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Build the highlighted road vehicle
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}New road vehicle now available!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cost: {CURRENCY}{}Speed: {VELOCITY}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Name road vehicle
@@ -2748,8 +2748,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centre main view on ship's location
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Send ship to depot. CTRL+click will only service
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Show ship details
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}New ship now available!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Speed: {VELOCITY}{}Capacity: {CARGO}{}Running Cost: {CURRENCY}/yr
 STR_982F_NAME_SHIP                                              :{BLACK}Name ship
 
@@ -2822,8 +2820,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centre main view on aircraft's location
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Send aircraft to hangar. CTRL+click will only service
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Show aircraft details
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}New aircraft now available!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Max. Speed: {VELOCITY}{}Capacity: {COMMA} passengers, {COMMA} bags of mail{}Running Cost: {CURRENCY}/yr
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Name aircraft
@@ -3137,4 +3133,11 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Length: {NUM}{}Height difference: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Area: {NUM} x {NUM}{}Height difference: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
+
+STR_FEEDER_CARGO_VALUE                                          :{BLACK}Transfer Credits: {LTBLUE}{CURRENCY}
--- a/src/lang/esperanto.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/esperanto.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}La elektita ordeno igu la veturilon atendi Äis plena ÅarÄo
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}La elektita ordeno igu la veturilon deÅarÄi
 STR_SERVICE_HINT                                                :{BLACK}Transsaltu ordenon Äis prizorgo necesos
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nova {STRING} nun haveblas!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kosto: {CURRENCY} Pezo: {WEIGHT_S}{}Rapideco: {VELOCITY}  Forto: {POWER}{}Irkosto: po {CURRENCY} jare{}Kapablo: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Rompite
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}AÄo: {LTBLUE}{STRING}{BLACK}   Irkosto: {LTBLUE}po {CURRENCY} jare
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centre vidu vojveturilan deponejon en la ĉefvido
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Vojveturilelektan liston - alklaku veturilon por informoj
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Kreu la elektitan vojveturilon
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nova vojveturilo nun haveblas!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kosto: {CURRENCY}{}Rapideco: {VELOCITY}{}Irkosto: po {CURRENCY} jare{}Kapablo: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nomu vojveturilon
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centre vidu Åipon en ĉefvido
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Sendu Åipon al deponejo. CTRL+klako nur prizorgos
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Montru Åipajn detalojn
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nova Åipo nun haveblas!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kosto: {CURRENCY} Maksimuma rapideco: {VELOCITY}{}Kapablo: {CARGO}{}Irkosto: po {CURRENCY} jare
 STR_982F_NAME_SHIP                                              :{BLACK}Nomu Åipon
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centre vidu aviadilon en la ĉefvido
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Sendu aviadilon al hangaro. CTRL+klako nur prizorgos
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Montru aviadilajn detalojn
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nova aviadilo nun haveblas!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kosto: {CURRENCY} Maksimuma rapideco: {VELOCITY}{}Kapablo: {COMMA} pasaÄeroj, {COMMA} sakoj da poÅto{}Irkosto: po {CURRENCY} jare
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nomu aviadilon
@@ -2902,6 +2894,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Vi ĉi tiel ÅanÄos al kuranta ludo; tio povas kraÅigi la ludon.{}Ĉu vi nepre volas fari tion?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Averto: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Eraro: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fatalo: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} ne funkcios kun la versio de TTDPatch menciata de OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} estas por versio {STRING} de TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} estas intencita por uzo kun {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Nevalida parametro por {STRING}: parametro{STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} estu ÅarÄata antaÅ­ {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} estu ÅarÄata post {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Aldonu
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Aldonu NewGRF-dosieron al la listo
 STR_NEWGRF_REMOVE                                               :{BLACK}ForviÅu
@@ -3127,4 +3130,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Longo: {NUM}{}Altecdiferenco: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Regiono: {NUM} x {NUM}{}Altecdiferenco: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/estonian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/estonian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2702,8 +2702,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Sunni valitud käsu juures oodata täis laadingut
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Sunni valitud käsu juures maha laadida.
 STR_SERVICE_HINT                                                :{BLACK}Jäta see käsk vahele, kui teenindust ei vajata
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Uus {STRING} on nüüd olemas!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Maksumus: {CURRENCY} Mass: {WEIGHT_S}{}Kiirus: {VELOCITY}  Võimsus: {POWER}{}Kulu: {CURRENCY}/aastas{}Mahutus: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Lagunes
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Vanus: {LTBLUE}{STRING}{BLACK}   Kulud: {LTBLUE}{CURRENCY}/aastas
@@ -2771,8 +2769,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Vii vaade garaaþi asukohale
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Nimekiri maanteesõidukitest - maanteesõiduki kohta info saamiseks vajuta sellele
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Ehita valitud maanteesõiduk
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Uus maanteesõiduk on nüüdsest saadaval!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Hind: {CURRENCY}{}Kiirus: {VELOCITY}{}Hoolduskulud: {CURRENCY}/aastas{}Mahutavus: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nimeta maanteeveok ümber
@@ -2844,8 +2840,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Vii vaade laeva asukohale
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Saada laev paadikuuri
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Näita laeva detaile
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Uus laev on nüüdsest saadaval!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Hind: {CURRENCY} Maks. Kiirus: {VELOCITY}{}Mahutavus: {CARGO}{}Hoolduskulud: {CURRENCY}/aasta
 STR_982F_NAME_SHIP                                              :{BLACK}Anna laevale nimi
 
@@ -2918,8 +2912,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Vii peavaade lennukile
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Saada lennuk angaari
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Näita lennuki detaile
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Uus lennuk on saadaval!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Hind: {CURRENCY} Maks. kiirus: {VELOCITY}{}Mahutavus: {COMMA} reisijat, {COMMA} kotti kirju{}Hoolduskulud: {CURRENCY}/aastas
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Anna lennukile nimi
--- a/src/lang/finnish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/finnish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2605,8 +2605,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Aseta korostettu pysähdys pakottamaan ajoneuvon odottamaan täyttä lastausta.
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Aseta korostettu pysähdys pakottamaan ajoneuvo odottamaan purkua.
 STR_SERVICE_HINT                                                :{BLACK}Ohita tämä määräys, ellei palvelua tarvita.
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Uusi {STRING} saatavilla!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kulu: {CURRENCY} Paino: {WEIGHT_S}{}Nopeus: {VELOCITY}  Teho: {POWER}{}Käyttökustannukset: {CURRENCY}/vuosi{}Kapasiteetti: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Rikki
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Ikä: {LTBLUE}{STRING}{BLACK}   Käyttökustannukset: {LTBLUE}{CURRENCY}/vuosi
@@ -2674,8 +2672,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Keskitä päänäkymä huoltoaseman sijaintiin.
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Ajoneuvon valintalista - napsauta ajoneuvoa saadaksesi tietoja.
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Rakenna valittu ajoneuvo.
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Uusi ajoneuvo on saatavilla!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kulu: {CURRENCY}{}Nopeus: {VELOCITY}{}Käyttökustannukset: {CURRENCY}/vuosi{}Kapasiteetti: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nimeä ajoneuvo
@@ -2747,8 +2743,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Keskitä näkymä laivan sijaintiin.
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Lähetä laiva telakalle.
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Näytä laivan tiedot.
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Uusi laiva saatavilla!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kulu: {CURRENCY} Huippunopeus: {VELOCITY}{}Kapasiteetti: {CARGO}{}Käyttökustannukset: {CURRENCY}/vuosi
 STR_982F_NAME_SHIP                                              :{BLACK}Nimeä laiva
 
@@ -2821,8 +2815,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Keskitä näkymä lentokoneen sijaintiin.
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Lähetä lentokone lentokonehalliin.
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Näytä lentokoneen tiedot.
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Uusi lentokone saatavilla!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kulu: {CURRENCY} Huippunopeus: {VELOCITY}{}Kapasiteetti: {COMMA} matkustajaa, {COMMA} säkkiä postia{}Käyttökustannus: {CURRENCY}/vuosi
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nimeä lentokone
--- a/src/lang/french.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/french.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2139,7 +2139,7 @@
 STR_704E_KEY_TO_COMPANY_GRAPHS                                  :{WHITE}Légende du graphique des compagnies
 STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY                           :{BLACK}Cliquer ici pour activer/désactiver l'affichage de la compagnie
 STR_7050_UNITS_OF_CARGO_DELIVERED                               :{WHITE}Cargaison livrée
-STR_7051_COMPANY_PERFORMANCE_RATINGS                            :{WHITE}Historique de performace (performance max=1000)
+STR_7051_COMPANY_PERFORMANCE_RATINGS                            :{WHITE}Historique de performance (performance max=1000)
 STR_7052_COMPANY_VALUES                                         :{WHITE}Valeur de la compagnie
 STR_7053_COMPANY_LEAGUE_TABLE                                   :{WHITE}Classement des compagnies
 STR_7054                                                        :{WHITE}{STRING}{SETX 45}{ORANGE}{COMPANY} {BLACK}{PLAYERNAME} '{STRING}'
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Forcer le véhicule à attendre un chargement complet pour l'ordre sélectionné
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Forcer le véhicule à attendre un déchargement complet pour l'ordre sélectionné
 STR_SERVICE_HINT                                                :{BLACK}Sauter cet ordre tant qu'aucun entretien n'est requis
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nouv{G eau el elle} {STRING} disponible!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Prix: {CURRENCY} Poids: {WEIGHT_S}{}Vitesse: {VELOCITY}  Puissance: {POWER}{}Coût d'entretien: {CURRENCY}/an{}Capacité: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}En panne
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Âge: {LTBLUE}{STRING}{BLACK}   Coût d'entretien: {LTBLUE}{CURRENCY}/an
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centre la vue sur le dépôt
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Choix du véhicule - cliquer sur un véhicule pour obtenir des informations
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construire le véhicule sélectionné
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nouveau véhicule disponible!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Prix: {CURRENCY}{}Vitesse: {VELOCITY}{}Coût d'entretien: {CURRENCY}/an{}Capacité: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Renommer le véhicule
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrer la vue sur l'emplacement du navire
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Envoyer le navire au dépôt. Ctrl-clic pour entretien seul
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Afficher détails du navire
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nouveau navire maintenant disponible!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Prix: {CURRENCY} Vitesse max.: {VELOCITY}{}Capacité: {CARGO}{}Coût d'entretien: {CURRENCY}/an
 STR_982F_NAME_SHIP                                              :{BLACK}Nommer navire
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrer la vue principale sur l'emplacement de l'aéronef
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Envoyer l'aéronef au hangar. Ctrl-clic pour entretien seul
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Afficher détails de l'aéronef
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nouvel aéronef maintenant disponible!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Prix: {CURRENCY}    Vitesse max.: {VELOCITY}{}Capacité: {COMMA} passagers, {COMMA} sacs de courrier{}Coût d'entretien: {CURRENCY}/an
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nommer l'aéronef
@@ -2902,6 +2894,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Vous êtes sur le point de faire des changements dans une partie en cours; cela peut faire planter OpenTTD.{}Etes-vous absolument sûr ?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Avertissement: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Erreur: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fatal: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} ne fonctionnera pas avec la version de TTDPatch reportée par OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} est pour la version {STRING} de TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} est conçu pour être utilisé avec {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Paramètre invalide pour {STRING}: paramètre {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} doit être chargé avant {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} doit être chargé après {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Ajouter
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Ajouter un fichier NewGRF à la liste
 STR_NEWGRF_REMOVE                                               :{BLACK}Retirer
@@ -3127,4 +3130,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Longueur: {NUM}{}Ecart d'altitude: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Région: {NUM} x {NUM}{}Ecart d'altitude: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}/{STRING}/{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/galician.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/galician.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2528,8 +2528,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A orde seleccionada forzará o vehículo a esperar ata que a carga estea completa
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A orde seleccionada forzará o vehículo a descargar
 STR_SERVICE_HINT                                                :{BLACK}saltar esta orde a non ser que sexa necesario o servicio
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}¡Nov@ {STRING} dispoñible!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Coste: {CURRENCY} Peso: {WEIGHT_S}{}Velocidade: {VELOCITY}  Potencia: {POWER}{}Coste de Mantemento: {CURRENCY}/ano{}Capacidade: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Roto
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Idade: {LTBLUE}{STRING}{BLACK}   Coste de Mantemento: {LTBLUE}{CURRENCY}/ano
@@ -2594,8 +2592,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centra-la vista principal na situación do depósito de vehículos de estrada
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista de selección de vehículos de estrada - pincha nun vehículo para máis información
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construí-lo vehículo de estrada seleccionado
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}¡Novo vehículo de estrada dispoñible!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Coste: {CURRENCY}{}Velocidade: {VELOCITY}{}Coste de Mantemento: {CURRENCY}/ano{}Capacidade: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Renomear vehículo de estrada
@@ -2665,8 +2661,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centra-la vista principal na situación do barco
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Envia-lo barco o depósito
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Mostra-los detalles do barco
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}¡Novo barco dispoñible!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Coste: {CURRENCY} Velocidade Máx: {VELOCITY}{}Capacidade: {CARGO}{}Coste de Mantemento: {CURRENCY}/ano
 STR_982F_NAME_SHIP                                              :{BLACK}Renomear barco
 
@@ -2739,8 +2733,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centra-la vista principal na situación da aeronave
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Envia-la aeronave ó hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Mostra-los detalles da aeronave
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}¡Nova aeronave dispoñible!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Coste: {CURRENCY} Velocidade Máx.: {VELOCITY}{}Capacidade: {COMMA} pasaxeiros, {COMMA} sacos de correo{}Coste de Mantemento: {CURRENCY}/ano
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Cambia-lo nome da aeronave
--- a/src/lang/german.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/german.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Der markierte Auftrag wird nur nach voller Beladung ausgeführt
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Beim markierten Auftrag wird die volle Entladung veranlasst
 STR_SERVICE_HINT                                                :{BLACK}Überspringe diesen Auftrag, sofern keine Wartung benötigt wird
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Neue {STRING} ist jetzt verfügbar!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kosten: {CURRENCY}   Gewicht: {WEIGHT_S}{}Geschwindigk.: {VELOCITY} Leistung: {POWER}{}Betriebskosten: {CURRENCY}/Jahr{}Kapazität: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Panne
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Alter: {LTBLUE}{STRING}{BLACK}  Betriebskosten: {LTBLUE}{CURRENCY}/Jahr
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Ansicht auf das Fahrzeugdepot zentrieren
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Fahrzeugauswahlliste - Klicke auf ein Fahrzeug für Einzelheiten
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Baue das ausgewählte Fahrzeug
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Neues Fahrzeug jetzt erhältlich!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kosten: {CURRENCY}{}Geschwindigk.: {VELOCITY}{}Betriebskosten: {CURRENCY}/Jahr{}Ladevermögen: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Name des Fahrzeuges
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Anzeige auf das Schiff zentrieren
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Schicke das Schiff zur Werft
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Zeige Einzelheiten des Schiffes
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Neues Schiff ist erhältlich!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kosten: {CURRENCY}  Höchstgeschwindigk.: {VELOCITY}{}Kapazität: {CARGO}{}Betriebskosten: {CURRENCY}/Jahr
 STR_982F_NAME_SHIP                                              :{BLACK}Schiffsname
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Ansicht auf das Flugzeug zentrieren
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Schicke das Flugzeug in den Hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Zeige Einzelheiten des Flugzeuges
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Neues Flugzeug ist jetzt verfügbar!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kosten: {CURRENCY}  Höchstgeschwindigk.: {VELOCITY}{}Kapazität: {COMMA} Passagiere, {COMMA} Postsäcke{}Betriebskosten: {CURRENCY}/Jahr
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Flugzeugname
@@ -2902,6 +2894,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5-Summe: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Du bist dabei Änderungen während eines laufenden Spiels zu machen. Dies kann zum Absturz von OpenTTD führen.{}Bist du Dir wirklich sicher?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Warnung: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Fehler: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fataler Fehler: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} Arbeitet nicht zusammen mit der TTDPatch Version in OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} Ist für die {STRING} Version von TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} Ist erstellt für die Nutzung mit {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Falscher Parameter für {STRING}: Parameter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} Muß vor {STRING} geladen werden.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} Muß nach {STRING} geladen werden.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Hinzufügen
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Füge eine neue NewGRF Datei zu Liste hinzu
 STR_NEWGRF_REMOVE                                               :{BLACK}Entfernen
@@ -3127,4 +3130,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Länge: {NUM}{}Höhenunterschied: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Gebiet: {NUM} x {NUM}{}Höhenunterschied: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/hungarian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/hungarian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2709,8 +2709,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A kijelölt célponton meg kell várni, amíg telerakják a járművet
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A kijelölt célponton le kell pakolni a rakományt
 STR_SERVICE_HINT                                                :{BLACK}Célpont kihagyása, ha javítás szükséges
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Új {STRING} használható!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Ãr: {CURRENCY}    Súly: {WEIGHT_S}{}Sebesség: {VELOCITY}    Teljesítmény: {POWER}{}Működtetési költség: {CURRENCY}/év{}Kapacitás: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Lerobbant
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Kor: {LTBLUE}{STRING}{BLACK}   Működtetési költség: {LTBLUE}{CURRENCY}/év
@@ -2778,8 +2776,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}A fő nézetet a garázsra állítja
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Közúti jármű kiválasztása - kattints egy járműre az adataihoz
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}A kijelölt közúti jármű megvétele
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Új közúti jármű használható!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Ãr: {CURRENCY}{}Sebesség: {VELOCITY}{}Működtetési költség: {CURRENCY}/év{}Kapacitás: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Közúti jármű átnevezése
@@ -2851,8 +2847,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}A fő nézetet a hajóra állítja
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Dokkba küldi a hajót
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}A hajó adatai
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Új hajó használható!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Ãr: {CURRENCY}    Végsebesség: {VELOCITY}{}Kapacitás: {CARGO}{}Működtetési költség: {CURRENCY}/év
 STR_982F_NAME_SHIP                                              :{BLACK}Hajó átnevezése
 
@@ -2925,8 +2919,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}A fő nézetet a repülőgépre állítja
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Hangárba küldi a repülőgépet
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}A repülőgép adatai
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Új repülőgép használható!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Ãr: {CURRENCY}    Végsebesség: {VELOCITY}{}Kapacitás: {COMMA} utas, {COMMA} csomag levél{}Működtetési költség: {CURRENCY}/év
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Repülőgép átnevezése
@@ -3004,6 +2996,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Te éppen a jelenleg futó játékot akarod megváltoztatni; ettől elszállhat az OpenTTD.{}Teljesen biztos vagy benne, hogy ezt akarod?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Figyelmeztetés: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Hiba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Végzetes hiba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} nem fog működni az OpenTTD által jelentett TTDPatch verzióval.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} a TTD {STRING} verziójához van.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} úgy lett tervezve, hogy ezzel lesz használva: {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Hibás paraméterérték ehhez: {STRING}: paraméter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} muszáj hogy betöltődjön ezelőtt: {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} muszáj hogy ezután töltődjön be: {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Hozzáad
 STR_NEWGRF_ADD_TIP                                              :{BLACK}A NewGRF-et hozzáadja a listához
 STR_NEWGRF_REMOVE                                               :{BLACK}Eltávolít
@@ -3229,4 +3232,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Távolság: {NUM}{}Magasságkülönbség: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Terület: {NUM} x {NUM}{}Magasságkülönbség: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/icelandic.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/icelandic.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Neyða lest til að bíða eftir fullum farmi í valdri skipun
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Neyða lest til að afferma sig í valdri skipun
 STR_SERVICE_HINT                                                :{BLACK}Sleppa þessarri skipun nema þörf sé á viðgerð
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Ný {STRING} er nú fáanleg!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Verð: {CURRENCY} Þyngd: {WEIGHT_S}{}Hraði: {VELOCITY}  Afl: {POWER}{}Rekstrarkostnaður: {CURRENCY} á ári{}Burðargeta: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Bilaður
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Aldur: {LTBLUE}{STRING}{BLACK}   Rekstrarkostnaður: {LTBLUE}{CURRENCY} á ári
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Miðja aðalsjónarhorn á bifreiðaskýli
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Bifreiðalisti - ýttu á bifreið fyrir nánari upplýsingar
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Smíða valda bifreið
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Ný bifreið fáanleg!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Verð: {CURRENCY}{}Hraði: {VELOCITY}{}Rekstrarkostnaður: {CURRENCY} á ári{}Burðargeta: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nefna bifreið
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Miðja aðalsjónarhorn á staðsetningu skips
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Senda skipið í slipp
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Sýna nánari upplýsingar um skip
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nýtt skip fáanlegt!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Verð: {CURRENCY} Hámarkshraði: {VELOCITY}{}Burðargeta: {CARGO}{}Rekstrarkostnaður: {CURRENCY}á ári
 STR_982F_NAME_SHIP                                              :{BLACK}Nefna skip
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Miðja aðalsjónarhorn á flugvélina
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Senda flugvélina i flugskýli
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Sýna nánari upplýsingar um skip
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Ný flugvél nú fáanleg!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Verð: {CURRENCY} Hámarkshraði: {VELOCITY}{}Burðargeta: {COMMA} farþegar, {COMMA} pokar af pósti{}Rekstrarkostnaður: {CURRENCY}á ári
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nefna flugvélina
@@ -2902,6 +2894,7 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5 summa: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Þú ert í þann mund að eiga við leik í gangi, við það gæti OpenTTD hrunið.{}Ertu viss um að þú viljir halda áfram?
 
+
 STR_NEWGRF_ADD                                                  :{BLACK}Bæta við
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Bæta NewGRF skrá við listann
 STR_NEWGRF_REMOVE                                               :{BLACK}Fjarlægja
@@ -3127,4 +3120,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Lengd: {NUM}{}Hæðarmunur {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Svæði: {NUM} x {NUM}{}Hæðarmunur: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/italian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/italian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Fai diventare l'ordine evidenziato 'forza il veicolo ad attendere il carico completo'
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Fai diventare l'ordine evidenziato 'forza il veicolo a scaricare'
 STR_SERVICE_HINT                                                :{BLACK}Ignora l'ordine finché non sia necessaria la manutenzione
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nuova {STRING} ora disponibile!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Costo: {CURRENCY} Peso: {WEIGHT_S}{}Velocità: {VELOCITY}  Potenza: {POWER}{}Consumi: {CURRENCY}/anno{}Capienza: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Guasto!
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Età: {LTBLUE}{STRING}{BLACK}   Consumi: {LTBLUE}{CURRENCY}/anno
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centra visuale sul deposito veicoli
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista veicoli - fai clic sul veicolo per le informazioni
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Costruisci veicolo stradale evidenziato
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nuovo veicolo stradale disponibile!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Costo: {CURRENCY}{}Velocità: {VELOCITY}{}Consumi: {CURRENCY}/anno{}Capienza: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nome veicolo stradale
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centra la visuale sulla nave
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Manda la nave al deposito
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Mostra dettagli sulla nave
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}E' disponibile una nuova nave!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Costo: {CURRENCY} Velocità Max: {VELOCITY}{}Capienza: {CARGO}{}Consumi: {CURRENCY}/anno
 STR_982F_NAME_SHIP                                              :{BLACK}Nome Nave
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centra visuale sull'aereo
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Manda l'aereo all'hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Mostra dettagli dell'aereo
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}E' disponibile un nuovo aereo!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Costo: {CURRENCY} Velocità Max: {VELOCITY}{}Capienza: {COMMA} passeggeri, {COMMA} sacchi postali{}Consumi: {CURRENCY}/anno
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nome aereo
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Stai per fare cambiamenti a una partita in corso; questa cosa può crashare OpenTTD.{}Sei assolutamente sicuro di farlo?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Attenzione: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Errore: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Errore Fatale: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} può non funzionare con la versione di TTDPatch riportata da OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} è per la versione {STRING} di TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} è progettato per essere usato con {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Parametri invalidi per {STRING}: parametri {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} deve essere caricato prima di {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} deve essere caricato dopo {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Aggiungi
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Aggiungi un file NewGRF alla lista
 STR_NEWGRF_REMOVE                                               :{BLACK}Togli
@@ -3126,4 +3129,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Lunghezza: {NUM}{}Differenza in altezza: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Area: {NUM} x {NUM}{}Differenza in altezza: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/japanese.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/japanese.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -1041,6 +1041,7 @@
 STR_CONFIG_PATCHES_NONUNIFORM_STATIONS                          :{LTBLUE}ä¸çµ±ä¸€ã®é§…を許容:{ORANGE}{STRING}
 STR_CONFIG_PATCHES_NEW_PATHFINDING_ALL                          :{LTBLUE}新型グローãƒãƒ«ãƒ‘スファインダー(NPF):{ORANGE}{STRING}
 STR_CONFIG_PATCHES_FREIGHT_TRAINS                               :{LTBLUE}é‡ã„列車ã®ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®ãŸã‚ã®é‡é‡ä¹—æ•°ã®è¨­å®šï¼š{ORANGE}{STRING}
+STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD                            :{LTBLUE}町有é“路上ã«é€šéŽç‚¹ã®å»ºè¨­ã‚’許容:{ORANGE}{STRING}
 
 STR_CONFIG_PATCHES_SMALL_AIRPORTS                               :{LTBLUE}常ã«å°åž‹ç©ºæ¸¯ã®å»ºè¨­ã‚’許容:{ORANGE}{STRING}
 
@@ -1584,6 +1585,8 @@
 STR_1816_TREE_LINED_ROAD                                        :並木é“
 STR_1817_ROAD_VEHICLE_DEPOT                                     :車庫
 STR_1818_ROAD_RAIL_LEVEL_CROSSING                               :è¸åˆ‡
+STR_CAN_T_REMOVE_BUS_STATION                                    :{WHITE}ãƒã‚¹åœãŒç ´å£Šã§ãã¾ã›ã‚“...
+STR_CAN_T_REMOVE_TRUCK_STATION                                  :{WHITE}è·å½¹æ‰€ãŒç ´å£Šã§ãã¾ã›ã‚“...
 
 ##id 0x2000
 STR_2000_TOWNS                                                  :{WHITE}市町æ‘
@@ -2603,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}é¸æŠžã—ãŸæŒ‡ä»¤ã«å…¨è² è·ã¾ã§å¾…ã¤ã“ã¨ã‚’強制ã—ã¾ã™
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}é¸æŠžã—ãŸæŒ‡ä»¤ã«é™ã‚ã™ã“ã¨ã‚’強制ã—ã¾ã™
 STR_SERVICE_HINT                                                :{BLACK}ä¿®ç†ãŒå¿…è¦ã§ãªã„ã¨ã“ã®æŒ‡ä»¤ã‚’スキップ
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}{STRING}ãŒæ–°ç™»å ´ï¼
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}価格:{CURRENCY} é‡é‡ï¼š{WEIGHT_S}{}最大速度:{VELOCITY} 出力:{POWER}{}é‹è»¢è²»ï¼šä¸€å¹´é–“{CURRENCY}{}容é‡ï¼š{CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}故障
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}使用年数:{LTBLUE}{STRING}{BLACK} é‹è»¢è²»ï¼š{LTBLUE}1å¹´é–“ã«{CURRENCY}
@@ -2672,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}主ã®ç”»é¢ã‚’車庫ã®å ´æ‰€ã«ç§»å‹•ã—ã¾ã™
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}é“路車両ã®ãƒªã‚¹ãƒˆ - 情報を見るã«ã¯è»Šä¸¡ã‚’クリックã—ã¾ã™
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}é¸æŠžã—ãŸé“路車両を購入ã—ã¾ã™
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}æ–°ã—ã„é“è·¯è»Šä¸¡ãŒæ–°ç™»å ´ï¼
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}価格:{CURRENCY}{}最大速度:{VELOCITY}{}é‹è»¢è²»ï¼šä¸€å¹´é–“{CURRENCY}{}容é‡ï¼š{CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}é“路車両をå付ã‘ã‚‹
@@ -2745,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}主ã®ç”»é¢ã‚’船舶ã®å ´æ‰€ã«ç§»å‹•ã—ã¾ã™
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}船舶を造船所ã¸å›žé€ã—ã¾ã™ã€‚Contorl+クリックã™ã‚‹ã¨ä¿®ç†ã®ã¿ã‚’ã—ã¾ã™
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}èˆ¹èˆ¶ã®æƒ…報を表示
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}æ–°ã—ã„èˆ¹èˆ¶ãŒæ–°ç™»å ´ï¼
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}価格:{CURRENCY} 最大速度:{VELOCITY}{}容é‡ï¼š{CARGO}{}é‹è»¢è²»ï¼šä¸€å¹´é–“{CURRENCY}
 STR_982F_NAME_SHIP                                              :{BLACK}船舶をå付ã‘ã‚‹
 
@@ -2819,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}主ã®ç”»é¢ã‚’飛行機ã®å ´æ‰€ã«ç§»å‹•ã—ã¾ã™
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}飛行機を格ç´åº«ã¸å›žé€ã—ã¾ã™ã€‚Control+クリックã™ã‚‹ã¨ä¿®ç†ã®ã¿ã—ã¾ã™
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}é£›è¡Œæ©Ÿã®æƒ…報を表示
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}æ–°ã—ã„é£›è¡Œæ©ŸãŒæ–°ç™»å ´ï¼
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}価格:{CURRENCY} 最大速度:{VELOCITY}{}容é‡ï¼š{COMMA}人ã®ä¹—客ã€{COMMA}袋ã®éƒµä¾¿è¢‹{}é‹è»¢è²»ï¼šä¸€å¹´é–“{CURRENCY}
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}飛行機をå付ã‘ã‚‹
@@ -2898,6 +2893,7 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum:{SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}実行中ã®ã‚²ãƒ¼ãƒ ã«å¤‰æ›´ã‚’é©ç”¨ã—ã¦ã€ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã®ãƒªã‚¹ã‚¯ãŒã‚りã¾ã™ã€‚{}ç¶šã‘ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ
 
+
 STR_NEWGRF_ADD                                                  :{BLACK}追加
 STR_NEWGRF_ADD_TIP                                              :{BLACK}NewGRFファイルをリストã«è¿½åŠ ã—ã¾ã™
 STR_NEWGRF_REMOVE                                               :{BLACK}削除
@@ -3123,4 +3119,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}é•·ã•:{NUM}{}高ã•ã®é•ã„:{NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}地域:{NUM} x {NUM}{}高ã•ã®é•ã„:{NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/korean.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/korean.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}ì„ íƒëœ 경로ì—서 모든 í™”ë¬¼ì„ ê°€ë“ ì‹£ë„ë¡ ë³€ê²½í•©ë‹ˆë‹¤.
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}ì„ íƒëœ 경로ì—서 모든 í™”ë¬¼ì„ ì „ë¶€ 내리ë„ë¡ ë³€ê²½í•©ë‹ˆë‹¤.
 STR_SERVICE_HINT                                                :{BLACK}ì ê²€ì´ 필요하면 ì´ ê²½ë¡œë¥¼ 건너ëœë‹ˆë‹¤.
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}새로운 {STRING}ì„/를 ì´ì œ 사용할 수 있습니다!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}가격: {CURRENCY} 무게: {WEIGHT_S}{}ì†ë„: {VELOCITY}  힘: {POWER}{}운행비용: {CURRENCY}/ë…„{}수송량: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}고장
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}수명: {LTBLUE}{STRING}{BLACK}   운행비용: {LTBLUE}{CURRENCY}/년
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}ì´ ì°¨ê³ ê°€ 있는 곳으로 ì´ë™
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}ìžë™ì°¨ ì„ íƒ ëª©ë¡ - 차량 정보를 보려면 í´ë¦­
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}ì„ íƒí•œ ìžë™ì°¨ 만들기
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}새로운 ìžë™ì°¨ë¥¼ ì´ì œ 사용할 수 있습니다!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}가격: {CURRENCY}{}ì†ë ¥: {VELOCITY}{}운행비용: {CURRENCY}/ë…„{}수송량: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}ìžë™ì°¨ ì´ë¦„ 지정
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}ì´ ì„ ë°•ì´ ìžˆëŠ” 곳으로 ì´ë™í•©ë‹ˆë‹¤
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}ì„ ë°•ì„ ì •ë°•ì†Œë¡œ 보냅니다. CTRL+í´ë¦­í•˜ë©´ ì ê²€ë§Œ 합니다.
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}ì„ ë°• ìƒì„¸ì •ë³´ 보기
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}새로운 ì„ ë°•ì„ ì´ì œ 사용할 수 있습니다!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}가격: {CURRENCY} 최고ì†ë ¥: {VELOCITY}{}수송량: {CARGO}{}운행비용: {CURRENCY}/ë…„
 STR_982F_NAME_SHIP                                              :{BLACK}ì„ ë°• ì´ë¦„ 지정
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}ì´ í•­ê³µê¸°ê°€ 있는 곳으로 ì´ë™
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}항공기를 격납고로 보냅니다. CTRL+í´ë¦­í•˜ë©´ ì ê²€ë§Œ 합니다
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}항공기 ìƒì„¸ì •ë³´ 보기
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}새로운 항공기를 ì´ì œ 사용할 수 있습니다!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}가격: {CURRENCY} 최고ì†ë ¥: {VELOCITY}{}수송량: ìŠ¹ê° {COMMA}명, 우편 {COMMA}가방{}운행비용: {CURRENCY}/ë…„
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}항공기 ì´ë¦„ 지정
@@ -2902,6 +2894,10 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}ê²Œìž„ì´ ì§„í–‰ì¤‘ì¸ë° ì„¤ì •ì„ ë³€ê²½í•˜ë ¤ê³  하면 게임과 ì¶©ëŒí•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.{}ì •ë§ë¡œ ì„¤ì •ì„ ë³€ê²½í•˜ì‹œê² ìŠµë‹ˆê¹Œ?
 
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING}ì€/는 {STRING} ë²„ì ¼ì˜ TTD를 위한 것입니다.
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING}ì€/는 반드시 {STRING}ì´ì „ì— ë¶ˆëŸ¬ì™€ì•¼ 합니다.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING}ì€/는 반드시 {STRING}다ìŒì— 불러와야 합니다.
+
 STR_NEWGRF_ADD                                                  :{BLACK}추가
 STR_NEWGRF_ADD_TIP                                              :{BLACK}NewGRF 파ì¼ì„ 목ë¡ì— 추가
 STR_NEWGRF_REMOVE                                               :{BLACK}제거
@@ -3127,4 +3123,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}길ì´: {NUM}{}ê³ ë„ì°¨: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}ë„“ì´: {NUM} x {NUM}{}ê³ ë„ì°¨: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/lithuanian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/lithuanian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2637,8 +2637,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Pazymetoje stoteleje laukti, kol transporto priemone pilnai pasikraus
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Iskrauti krovini pazymetoje stoteleje
 STR_SERVICE_HINT                                                :{BLACK}Nevykdyti sios uzduoties iki tol, kol nereikes remonto
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}{STRING} jau išrastas!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kaina: {CURRENCY} Svoris: {WEIGHT_S}{}Greitis: {VELOCITY}  Galia: {POWER}{}Eksplotacijos išlaidos: {CURRENCY}/metus{}Talpa: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Sugedo
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Amzius: {LTBLUE}{STRING}{BLACK}   Eksploatacijos islaidos: {LTBLUE}{CURRENCY}/met
@@ -2706,8 +2704,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Rodyti automobiliu garaza ekrano centre
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Automobiliu pasirinkimo sarasas - paspausk ant automobilio jei nori detalesnes informacijos
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Isigyti pazymeta automobili
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Atsirado naujas automobilis!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kaina: {CURRENCY}{}Greitis: {VELOCITY}{}Eksploatavimo kaina: {CURRENCY}/met{}Talpa: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Pavadinti automobili
@@ -2779,8 +2775,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Rodyti laiva ekrano centre
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Nukreipti laiva i depa
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Rodyti laivo informacija
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Atsirado naujas laivas!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kainuoja: {CURRENCY} Maks. Greitis: {VELOCITY}{}Talpa: {CARGO}{}Vaziavimo kaina: {CURRENCY}/m
 STR_982F_NAME_SHIP                                              :{BLACK}Laivo vardas
 
@@ -2853,8 +2847,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Rodyti lektuva ektrano centre
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Siusti lektuva i angara
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Rodyti lektuvo informacija
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Atsirado naujas lektuvas!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kaina: {CURRENCY} Maks. greitis: {VELOCITY}{}Talpa: {COMMA} keleiviu, {COMMA} pasto maisail{}Eksploatacijos islaidos: {CURRENCY}/met.
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Pervardinti lektuva
--- a/src/lang/norwegian_bokmal.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/norwegian_bokmal.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Fyll alltid kjøretøyet ved valgte stasjon
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Tøm alltid kjøretøyet ved valgte stasjon
 STR_SERVICE_HINT                                                :{BLACK}Hopp over ordren med mindre vedlikehold trengs.
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nytt {STRING} er nå tilgjengelig!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Koster: {CURRENCY} Vekt: {WEIGHT_S}{}Fart: {VELOCITY}  Kraft: {POWER}{}Driftkostnader: {CURRENCY}/Ã¥r{}Kapasitet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Havarert
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Alder: {LTBLUE}{STRING}{BLACK}   Driftkostnad: {LTBLUE}{CURRENCY}/Ã¥r
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Vis hvor garasjen ligger
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Kjøretøyliste - trykk på kjøretøy for mer informasjon
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Bygg det valgte kjøretøyet
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nytt kjøretøy er nå tilgjengelig!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Koster: {CURRENCY}{}Fart: {VELOCITY}{}Driftkostnader: {CURRENCY}/Ã¥r{}Kapasitet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Navngi kjøretøy
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Vis skipets gjeldende posisjon
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Send skipet til depotet
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Vis detaljer om skipet
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nytt skip er nå tilgjengelig!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koster: {CURRENCY} Maks. fart: {VELOCITY}{}Kapasitet: {CARGO}{}Driftkostnader: {CURRENCY}/Ã¥r
 STR_982F_NAME_SHIP                                              :{BLACK}Navngi skip
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Vis flyets gjeldende posisjon
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Send fly til hangar. CTRL-klikk for kun å utføre vedlikehold
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Vis detaljer om flyet
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nytt fly er nå tilgjengelig
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koster: {CURRENCY} Maks. fart: {VELOCITY}{}Kapasitet: {COMMA} passasjerer, {COMMA} sekker post {}Driftkostnader: {CURRENCY}/Ã¥r
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Navngi fly
@@ -2901,6 +2893,7 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Du er i ferd med å gjøre forandringer i et kjørende spill; Dette kan krasje OpenTTD.{}Er du helt sikker på at du vil gjøre dette?
 
+
 STR_NEWGRF_ADD                                                  :{BLACK}Legg til
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Legg en ny NewGRF-fil til listen
 STR_NEWGRF_REMOVE                                               :{BLACK}Fjern
@@ -3126,4 +3119,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Lengde: {NUM}{}Høydeforskjell: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Område: {NUM} x {NUM}{}Høydeforskjell: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/norwegian_nynorsk.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/norwegian_nynorsk.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2604,8 +2604,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Alltid fyll køyretøyet ved den valde stasjonen
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Alltid tøm køyretøyet ved den valde stasjonen
 STR_SERVICE_HINT                                                :{BLACK}Hopp over ordren dersom ikkje vedlikehald trengst
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nytt {STRING} er no tilgjengeleg!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kostnad: {CURRENCY} Vekt: {WEIGHT_S}{}Fart: {VELOCITY}  Kraft: {POWER}{}Driftskostnader: {CURRENCY}/Ã¥r{}Kapasitet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Havarert
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Alder: {LTBLUE}{STRING}{BLACK}   Driftskostnad: {LTBLUE}{CURRENCY}/Ã¥r
@@ -2673,8 +2671,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Vis kvar garasjen ligg
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Køyretøyliste - trykk på køyretøy for meir informasjon
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Bygg det valde køyretøyet
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nytt køyretøy er no tilgjengeleg!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kostnad: {CURRENCY}{}Fart: {VELOCITY}{}Driftskostnader: {CURRENCY}/Ã¥r{}Kapasitet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Namngje køyretøy
@@ -2746,8 +2742,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Vis skipet sin gjeldande posisjon
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Send skipet til depotet. CTRL-klikk for å berre sende til vedlikehald
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Vis detaljar om skipet
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nytt skip er no tilgjengeleg!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kostnad: {CURRENCY} Maks. fart: {VELOCITY}{}Kapasitet: {CARGO}{}Driftskostnader: {CURRENCY}/Ã¥r
 STR_982F_NAME_SHIP                                              :{BLACK}Namngje skip
 
@@ -2820,8 +2814,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Vis flyet sin gjeldande posisjon
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Send fly til hangar. CTRL-klikk for å berre utføre vedlikehald
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Vis detaljar om flyet
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nytt fly er no tilgjengeleg
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kostnad: {CURRENCY} Maks. fart: {VELOCITY}{}Kapasitet: {COMMA} passasjerar, {COMMA} sekkar post {}Driftskostnadar: {CURRENCY}/Ã¥r
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Namngje fly
--- a/src/lang/polish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/polish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2735,8 +2735,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Spraw aby zaznaczone polecenie zmusiło pojazd do czekania na pełny załadunek
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Spraw aby zaznaczone polecenie zmusiło pojazd do wyładunku
 STR_SERVICE_HINT                                                :{BLACK}Pomiń to polecenie jesli serwis nie jest wymagany
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Dostępna nowa {STRING}!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Koszt: {CURRENCY} Waga: {WEIGHT_S}{}Prędkość: {VELOCITY}  Moc: {POWER}{}Utrzymanie: {CURRENCY}/rok{}Pojemność: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Awaria
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Wiek: {LTBLUE}{STRING}{BLACK}   Utrzymanie: {LTBLUE}{CURRENCY}/rok
@@ -2804,8 +2802,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centruj główne okno na pozycji zajezdni samochodowej
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista wyboru samochodów - klik na pojeździe po więcej informacji
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Zbuduj wybrany samochód
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Dostępny nowy samochód!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Koszt: {CURRENCY}{}Prędkość: {VELOCITY}{}Utrzymanie: {CURRENCY}/rok{}Pojemność: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nazwij samochód
@@ -2877,8 +2873,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centruj główne okno na pozycji statku
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Wyślij statek do stoczni
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Pokaż szczegóły statku
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Dostępny nowy statek!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koszt: {CURRENCY} Max. Prędkość: {VELOCITY}{}Pojemność: {CARGO}{}Utrzymanie: {CURRENCY}/rok
 STR_982F_NAME_SHIP                                              :{BLACK}Nazwa statku
 
@@ -2951,8 +2945,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centruj główne okno na pozycji samolotu
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Wyślij samolot do hangaru
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Pokaż szczegóły samolotu
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Dostępny nowy samolot!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koszt: {CURRENCY} Max. Prędkość: {VELOCITY}{}Pojemność: {COMMA} pasażerów, {COMMA} paczek poczty{}Utrzymanie: {CURRENCY}/rok
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nazwa samolotu
@@ -3030,6 +3022,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}suma MD5: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Zamierzasz wprowadzić zmiany do gry w toku; to może zawiesić OpenTTD.{}Czy jesteś całkowicie pewien?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Ostrzeżenie: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Błąd: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Błąd krytyczny: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} nie zadziała z wersją TTDPatcha zgłoszoną przez OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} jest przeznaczony dla TTD wersji {STRING}.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} jest zaprojektowany do użycia z {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Niewłaściwy parametr dla {STRING}: parametr {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} musi być wczytany przed {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} musi być wczytany po {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Dodaj
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Dodaj plik NewGRF do listy
 STR_NEWGRF_REMOVE                                               :{BLACK}Usuń
@@ -3255,4 +3258,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Długość: {NUM}{}Różnica wysokości: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Obszar: {NUM} x {NUM}{}Różnica wysokości: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/portuguese.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/portuguese.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A ordem seleccionada fará com que o veículo espere carregar completamente
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}A ordem seleccionada forçará o veículo a descarregar
 STR_SERVICE_HINT                                                :{BLACK}Saltar esta ordem a menos que seja necessário manutenção
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Novo {STRING} disponível!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Custo: {CURRENCY} Peso: {WEIGHT_S}{}Velocidade: {VELOCITY}  Potência: {POWER}{}Custo de circulação: {CURRENCY}/ano{}Capacidade: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Avariado
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Idade: {LTBLUE}{STRING}{BLACK}   Custo de circulação: {LTBLUE}{CURRENCY}/ano
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrar visualização na localização do depósito de veículos de estrada
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista de veículos de estrada - clique num veículo para informações
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construir o veículo de estrada seleccionado
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Novo veículo de estrada disponível!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Custo: {CURRENCY}{}Velocidade: {VELOCITY}{}Custo de circulação: {CURRENCY}/ano{}Capacidade: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Renomear veículo de estrada
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrar visualização na localização do barco
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Mandar barco para o depósito
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Mostrar detalhes do barco
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Novo barco disponível!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Custo: {CURRENCY} Velocidade Máx.: {VELOCITY}{}Capacidade: {CARGO}{}Custo de circulação: {CURRENCY}/ano
 STR_982F_NAME_SHIP                                              :{BLACK}Renomear barco
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrar visualização na localização da aeronave
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Mandar aeronave para o hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Mostrar detalhes da aeronave
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nova aeronave disponível!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Custo: {CURRENCY} Velocidade Máx.: {VELOCITY}{}Capacidade: {COMMA} passageiros, {COMMA} sacos de correio{}Custo de circulação: {CURRENCY}/ano
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Renomear aeronave
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Vai alterar um jogo em andamento; o OpenTTD pode terminar abruptamente.{}Tem a certeza que quer continuar?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Aviso: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Erro: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fatal: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} não funciona com a versão do TTDPatch reportada pelo OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} é para a versão {STRING} do TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} foi feito para ser usado com {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Parâmetro inválido para {STRING}: parâmetro {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} deve ser carregado antes de {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} deve ser carregado antes de {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Adicionar
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Adicionar um ficheiro NewGRF à lista
 STR_NEWGRF_REMOVE                                               :{BLACK}Remover
@@ -3126,4 +3129,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Comprimento: {NUM}{}Diferença de altura: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Ãrea: {NUM} x {NUM}{}Diferença de altura: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/romanian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/romanian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Forteazã trenul sã astepte la destinatia selectatã pânã la umplerea la capacitate maximã
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Forteazã trenul sã descarce marfa la destinatia selectatã
 STR_SERVICE_HINT                                                :{BLACK}Sãri peste aceastã comandã dacã nu este necesar un service
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Stiri: {STRING} este acum disponibil!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cost: {CURRENCY} Greutate: {WEIGHT_S}{}Vitezã: {VELOCITY}  Putere: {POWER}{}Cost de rulare: {CURRENCY}/an{}Capacitate: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Defectiune
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Vechimea: {LTBLUE}{STRING}{BLACK}   Cost de rulare: {LTBLUE}{CURRENCY}/an
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centreazã imaginea pe locatia acestei autobaze
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista selectie vehicule rutiere - apasa pe vehicul pentru informatii
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Cumpãrã autovehiculul selectat
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Un nou autovehicul disponibil!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Pret: {CURRENCY}{}Vitezã: {VELOCITY}{}Cost de rulare: {CURRENCY}/an{}Capacitate: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Numele autovehiculului
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centreazã imaginea pe locatia curentã a navei
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Trimite nava într-un santier
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Afiseazã detaliile navei
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}O nouã navã este disponibilã!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cost: {CURRENCY} Viteza max.: {VELOCITY}{}Capacitate: {CARGO}{}Cost de rulare: {CURRENCY}/an
 STR_982F_NAME_SHIP                                              :{BLACK}Alege un nume pentru aceastã navã
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centreazã imaginea pe locatia curentã a aeronavei
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Trimite aeronava într-un hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Afiseazã detaliile aeronavei
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Un nou tip de aeronavã disponibil!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Pret: {CURRENCY} Viteza max.: {VELOCITY}{}Capacitate: {COMMA} cãlãtori, {COMMA} saci de postã{}Cost de rulare: {CURRENCY}/an
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Redenumeste aeronava
--- a/src/lang/russian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/russian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -970,7 +970,7 @@
 STR_LITERS                                                      :литров
 STR_ITEMS                                                       :штук
 STR_CRATES                                                      :мешков
-STR_RES_OTHER                                                   :прочее
+STR_RES_OTHER                                                   :Другое
 STR_NOTHING                                                     :
 
 STR_SMALL_RIGHT_ARROW                                           :{TINYFONT}{RIGHTARROW}
@@ -1017,46 +1017,46 @@
 STR_CONFIG_PATCHES_ON                                           :да
 STR_CONFIG_PATCHES_VEHICLESPEED                                 :{LTBLUE}Показывать ÑкороÑть в панели ÑтатуÑа транÑпорта: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_BUILDONSLOPES                                :{LTBLUE}Разрешить ÑтроительÑтво на Ñклонах и берегу: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_CATCHMENT                                    :{LTBLUE}Разрешить более реалиÑтичные зоны покрытиÑ: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_CATCHMENT                                    :{LTBLUE}Зона Ð¿Ð¾ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð·Ð°Ð²Ð¸Ñит от типа Ñтанции: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_EXTRADYNAMITE                                :{LTBLUE}Разрешить удаление вÑех принадлежащих городу объектов: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_MAMMOTHTRAINS                                :{LTBLUE}Включить ÑтроительÑтво очень длинных поездов: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAMMOTHTRAINS                                :{LTBLUE}Разрешить ÑтроительÑтво очень длинных поездов: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_REALISTICACCEL                               :{LTBLUE}Включить реалиÑтичное уÑкорение Ð´Ð»Ñ Ð¿Ð¾ÐµÐ·Ð´Ð¾Ð²: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_FORBID_90_DEG                                :{LTBLUE}Запретить резкие повороты поездам и кораблÑм: {ORANGE}{STRING} {LTBLUE}(NPF)
 STR_CONFIG_PATCHES_JOINSTATIONS                                 :{LTBLUE}ОбъединÑть поÑтроенные Ñ€Ñдом Ñтанции: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_FULLLOADANY                                  :{LTBLUE}Покидать Ñтанцию, когда любой груз полноÑтью загружен: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_IMPROVEDLOAD                                 :{LTBLUE}ИÑпользовать улучшенный алгоритм загрузки: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_GRADUAL_LOADING                              :{LTBLUE}ПоÑÑ‚ÐµÐ¿ÐµÐ½Ð½Ð°Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ° транÑпорта: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_INFLATION                                    :{LTBLUE}ИнфлÑциÑ: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_SELECTGOODS                                  :{LTBLUE}ДоÑтавлÑть груз на Ñтанцию, только еÑли она его принимает: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_INFLATION                                    :{LTBLUE}Включить инфлÑцию: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SELECTGOODS                                  :{LTBLUE}ПоÑтавлÑть груз на Ñтанцию, только еÑли на него был ÑпроÑ: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_LONGBRIDGES                                  :{LTBLUE}Разрешить ÑтроительÑтво очень длинных моÑтов: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_GOTODEPOT                                    :{LTBLUE}Разрешить добавлÑть депо в маршрут: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_BUILDXTRAIND                                 :{LTBLUE}Разрешить ÑтроительÑтво Ñырьевых предприÑтий: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_MULTIPINDTOWN                                :{LTBLUE}Строить неÑк. предприÑтий 1 типа в одном городе: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_SAMEINDCLOSE                                 :{LTBLUE}Одинаковые предприÑÑ‚Ð¸Ñ Ð¼Ð¾Ð¶Ð½Ð¾ Ñтроить Ñ€Ñдом: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MULTIPINDTOWN                                :{LTBLUE}Разрешить неÑколько предприÑтий одного типа на город: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SAMEINDCLOSE                                 :{LTBLUE}Одинаковые предприÑÑ‚Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть Ñ€Ñдом друг Ñ Ð´Ñ€ÑƒÐ³Ð¾Ð¼: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_LONGDATE                                     :{LTBLUE}Ð’Ñегда показывать длинную дату в панели ÑоÑтоÑниÑ: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_SIGNALSIDE                                   :{LTBLUE}Показывать Ñветофоры на Ñтороне движениÑ: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_SHOWFINANCES                                 :{LTBLUE}Показывать финанÑовую ÑтатиÑтику в конце года: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_NEW_NONSTOP                                  :{LTBLUE}ИÑпользовать поведение TTDP Ð´Ð»Ñ Ð¿Ñ€Ð¸ÐºÐ°Ð·Ð° "без оÑтановок": {ORANGE}{STRING}
 STR_CONFIG_PATCHES_ROADVEH_QUEUE                                :{LTBLUE}Разрешить автомобилÑм ожидать въезда на Ñтанцию: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_AUTOSCROLL                                   :{LTBLUE}Смещать обзор, когда курÑор находитÑÑ Ñƒ ÐºÑ€Ð°Ñ Ñкрана: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_BRIBE                                        :{LTBLUE}Разрешить взÑтку меÑтной админиÑтрации: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_BRIBE                                        :{LTBLUE}Разрешить подкупать муниципальную влаÑть: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_NONUNIFORM_STATIONS                          :{LTBLUE}Станции могут быть произвольной формы: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_NEW_PATHFINDING_ALL                          :{LTBLUE}Включить новый алгоритм навигации (NPF, заменÑет NTP): {ORANGE}{STRING}
 STR_CONFIG_PATCHES_FREIGHT_TRAINS                               :{LTBLUE}Множитель ÑƒÐ²ÐµÐ»Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð²ÐµÑа груза Ð´Ð»Ñ Ñ‚Ð¾Ð²Ð°Ñ€Ð½Ñ‹Ñ… поездов: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD                            :{LTBLUE}ПозволÑть Ñтроить Ñквозные оÑтановки на городÑких дорогах: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD                            :{LTBLUE}ПозволÑть Ñтроить оÑтановки на городÑких дорогах: {ORANGE}{STRING}
 
 STR_CONFIG_PATCHES_SMALL_AIRPORTS                               :{LTBLUE}Ð’Ñегда разрешать ÑтроительÑтво малых аÑропортов: {ORANGE}{STRING}
 
 STR_CONFIG_PATCHES_WARN_LOST_TRAIN                              :{LTBLUE}Предупреждать, еÑли поезд заблудилÑÑ: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_ORDER_REVIEW                                 :{LTBLUE}ПроверÑть маршруты транÑпортных ÑредÑтв на правильноÑть: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_ORDER_REVIEW                                 :{LTBLUE}ПроверÑть маршруты на правильноÑть: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_ORDER_REVIEW_OFF                             :нет
-STR_CONFIG_PATCHES_ORDER_REVIEW_EXDEPOT                         :да, кроме оÑтановленных транÑп. ÑредÑтв
+STR_CONFIG_PATCHES_ORDER_REVIEW_EXDEPOT                         :да, кроме оÑтановленного транÑпорта
 STR_CONFIG_PATCHES_ORDER_REVIEW_ON                              :вÑего транÑпорта
 STR_CONFIG_PATCHES_WARN_INCOME_LESS                             :{LTBLUE}Предупреждать, еÑли поезд приноÑит убыток: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_NEVER_EXPIRE_VEHICLES                        :{LTBLUE}ТранÑпорт никогда не уÑтаревает: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_AUTORENEW_VEHICLE                            :{LTBLUE}ÐвтоматичеÑки обновлÑть изношенный транÑпорт
 STR_CONFIG_PATCHES_AUTORENEW_MONTHS                             :{LTBLUE}ОбновлÑть через {ORANGE}{STRING}{LTBLUE} меÑÑцев поÑле иÑÑ‚ÐµÑ‡ÐµÐ½Ð¸Ñ Ñрока Ñлужбы
-STR_CONFIG_PATCHES_AUTORENEW_MONEY                              :{LTBLUE}ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ñумма, Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ð°Ñ Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_AUTORENEW_MONEY                              :{LTBLUE}Сумма, Ð½ÐµÐ¾Ð±Ñ…Ð¾Ð´Ð¸Ð¼Ð°Ñ Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_ERRMSG_DURATION                              :{LTBLUE}ДлительноÑть Ñообщений об ошибке: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_POPULATION_IN_LABEL                          :{LTBLUE}Показывать количеÑтво жителей города поÑле названиÑ: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_INVISIBLE_TREES                              :{LTBLUE}Убирать Ð´ÐµÑ€ÐµÐ²ÑŒÑ Ð¿Ñ€Ð¸ включении прозрачноÑти зданий: {ORANGE}{STRING}
@@ -1080,9 +1080,9 @@
 STR_CONFIG_PATCHES_HEIGHTMAP_ROTATION_CLOCKWISE                 :По чаÑовой
 STR_CONFIG_PATCHES_SE_FLAT_WORLD_HEIGHT                         :{LTBLUE}Уровень выÑоты Ð´Ð»Ñ ÐºÐ°Ñ€Ñ‚ Ñ Ð¿Ð»Ð¾Ñким рельефом: {ORANGE}{STRING}
 
-STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}МакÑ. площадь Ñтанции : {ORANGE}{STRING} {RED}Большие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð¼ÐµÐ´Ð»ÑÑŽÑ‚ игру
-STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}ÐвтоматичеÑки обÑлуживать вертолеты в вертопортах: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR                       :{LTBLUE}СвÑзать ландшафтную панель Ñ Ñ‚Ñ€Ð°Ð½Ñпортными: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_STATION_SPREAD                               :{LTBLUE}ПротÑженноÑть Ñтанции: {ORANGE}{STRING} {RED}(большие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð¼ÐµÐ´Ð»ÑÑŽÑ‚ игру)
+STR_CONFIG_PATCHES_SERVICEATHELIPAD                             :{LTBLUE}Включить обÑлуживание на вертолетных площадках: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR                       :{LTBLUE}Открывать ландшафтную панель вмеÑте Ñ Ñ‚Ñ€Ð°Ð½Ñпортными: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_REVERSE_SCROLLING                            :{LTBLUE}Обратить направление перетаÑÐºÐ¸Ð²Ð°Ð½Ð¸Ñ Ð¾Ð±Ð·Ð¾Ñ€Ð°: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_MEASURE_TOOLTIP                              :{LTBLUE}Показывать замеры при ÑтроительÑтве: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_LIVERIES                                     :{LTBLUE}Показывать окраÑку транÑпорта: {ORANGE}{STRING}
@@ -1091,10 +1091,10 @@
 STR_CONFIG_PATCHES_LIVERIES_ALL                                 :Ð´Ð»Ñ Ð²Ñех компаний
 STR_CONFIG_PATCHES_PREFER_TEAMCHAT                              :{LTBLUE}Предпочитать командный чат при нажатии Enter: {ORANGE}{STRING}
 
-STR_CONFIG_PATCHES_MAX_TRAINS                                   :{LTBLUE}МакÑимальное количеÑтво поездов у игрока: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_MAX_ROADVEH                                  :{LTBLUE}МакÑимальное количеÑтво кол-во автомобилей у игрока: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_MAX_AIRCRAFT                                 :{LTBLUE}МакÑимальное количеÑтво авиатранÑпорта у игрока: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_MAX_SHIPS                                    :{LTBLUE}МакÑимальное количеÑтво кораблей у игрока: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAX_TRAINS                                   :{LTBLUE}МакÑимальное количеÑтво поездов на игрока: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAX_ROADVEH                                  :{LTBLUE}МакÑимальное количеÑтво автомобилей на игрока: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAX_AIRCRAFT                                 :{LTBLUE}МакÑимальное количеÑтво авиатранÑпорта на игрока: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAX_SHIPS                                    :{LTBLUE}МакÑимальное количеÑтво кораблей на игрока: {ORANGE}{STRING}
 
 STR_CONFIG_PATCHES_AI_BUILDS_TRAINS                             :{LTBLUE}Ðе допуÑкать поÑтройки поездов конкурентами: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH                            :{LTBLUE}Ðе допуÑкать поÑтройки автомобилей конкурентами: {ORANGE}{STRING}
@@ -1116,13 +1116,13 @@
 STR_CONFIG_PATCHES_WAGONSPEEDLIMITS                             :{LTBLUE}Включить ограничение ÑкороÑти вагонов: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_DISABLE_ELRAILS                              :{LTBLUE}Отключить Ñлектрофицированную железную дорогу: {ORANGE}{STRING}
 
-STR_CONFIG_PATCHES_COLORED_NEWS_YEAR                            :{LTBLUE}"Цветные" новоÑти поÑвл. в : {ORANGE}{STRING}
+STR_CONFIG_PATCHES_COLORED_NEWS_YEAR                            :{LTBLUE}Цветные газеты поÑвлÑÑŽÑ‚ÑÑ: {ORANGE}в {STRING} году
 STR_CONFIG_PATCHES_STARTING_YEAR                                :{LTBLUE}Год начала игры: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_ENDING_YEAR                                  :{LTBLUE}Год Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¸Ð³Ñ€Ñ‹: {ORANGE}{STRING}
-STR_CONFIG_PATCHES_SMOOTH_ECONOMY                               :{LTBLUE}Включить плавную Ñкономику (более мелкие изменениÑ)
-STR_CONFIG_PATCHES_ALLOW_SHARES                                 :{LTBLUE}Разрешить покупку акций других компаний
+STR_CONFIG_PATCHES_ENDING_YEAR                                  :{LTBLUE}Заканчивать игру: {ORANGE}в {STRING} году
+STR_CONFIG_PATCHES_SMOOTH_ECONOMY                               :{LTBLUE}Включить плавную Ñкономику (чаÑтые, небольшие изменениÑ)
+STR_CONFIG_PATCHES_ALLOW_SHARES                                 :{LTBLUE}Разрешить покупать акции других компаний
 STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY                         :{LTBLUE}При перетаÑкивании Ñтавить Ñветофоры каждые: {ORANGE}{STRING} клетки
-STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE                  :{LTBLUE}ÐвтоматичеÑки Ñтроить Ñемафоры: до {ORANGE}{STRING} года
+STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE                  :{LTBLUE}ÐвтоматичеÑки Ñтроить Ñемафоры: {ORANGE}до {STRING} года
 STR_CONFIG_PATCHES_TOOLBAR_POS                                  :{LTBLUE}Положение главной панели инÑтрументов: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_TOOLBAR_POS_LEFT                             :Ñлева
 STR_CONFIG_PATCHES_TOOLBAR_POS_CENTER                           :в центре
@@ -1272,7 +1272,7 @@
 STR_CONFIG_GAME_PRODUCTION                                      :{WHITE}Изменить производительноÑть
 
 TEMP_AI_IN_PROGRESS                                             :{WHITE}Добро пожаловать в новый ИИ, он ÑовершенÑтвуетÑÑ. Ð’Ñ‹ должны быть готовы к проблемам. Когда Ñто ÑлучитÑÑ, Ñделайте Ñнимок и отправьте на форум. ÐаÑлаждайтеÑÑŒ!
-TEMP_AI_ACTIVATED                                               :{WHITE}Внимание: Ñто новый ИИ еще теÑтируетÑÑ! Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ только Ñ Ð³Ñ€ÑƒÐ·Ð¾Ð²Ð¸ÐºÐ°Ð¼Ð¸ и автобуÑами!
+TEMP_AI_ACTIVATED                                               :{WHITE}Внимание: новый AI вÑÑ‘ еще находитÑÑ Ð² ÑоÑтоÑнии альфа-верÑии! Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ð°ÐµÑ‚ только Ñ Ð°Ð²Ñ‚Ð¾Ñ‚Ñ€Ð°Ð½Ñпортом!
 TEMP_AI_MULTIPLAYER                                             :{WHITE}Внимание: теÑтовое иÑпользование (новый ИИ). ПожалуйÑта, Ñообщайте обо вÑех проблемах на truelight@openttd.org.
 
 ############ network gui strings
@@ -2619,8 +2619,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Задать ожидание полной загрузки
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Задать ожидание полной разгрузки
 STR_SERVICE_HINT                                                :{BLACK}ПропуÑтить Ñто задание, еÑли обÑлуживание не требуетÑÑ
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Теперь доÑтупно {STRING}!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Цена: {CURRENCY} ВеÑ: {WEIGHT_S}{}СкороÑть: {VELOCITY}  МощноÑть: {POWER}{}Цена обÑлуж.: {CURRENCY}/год{}ЕмкоÑть: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Поломка
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}ВозраÑÑ‚: {LTBLUE}{STRING}{BLACK} СтоимоÑть обÑлуживаниÑ: {LTBLUE}{CURRENCY}/год
@@ -2688,8 +2686,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Показать гараж в главном окне
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}СпиÑок автомобилей - кликните Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}ПоÑтроить выделенный автомобиль
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}ДоÑтупна Ð½Ð¾Ð²Ð°Ñ Ð¼Ð¾Ð´ÐµÐ»ÑŒ автомобилÑ!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Цена: {CURRENCY}{}СкороÑть: {VELOCITY}{}СтоимоÑть обÑлуж.: {CURRENCY}/год{}ЕмкоÑть: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Ðазвать автомобиль
@@ -2761,8 +2757,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Показать корабль в главном окне
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Отправить корабль в док. CTRL+клик - только Ð´Ð»Ñ Ð¾Ð±ÑлуживаниÑ
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Показать информацию о корабле
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}ДоÑтупен новый корабль!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Цена: {CURRENCY} МакÑ. СкороÑть: {VELOCITY}{}ЕмкоÑть: {CARGO}{}СтоимоÑть обÑлуж.: {CURRENCY}/год
 STR_982F_NAME_SHIP                                              :{BLACK}Ðазвание кораблÑ
 
@@ -2835,8 +2829,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Показать транÑпорт в главном окне
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}ПоÑлать авиатранÑпорт в ангар. CTRL+клик - только Ð´Ð»Ñ Ð¾Ð±ÑлуживаниÑ.
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Показать ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾Ð± авиатранÑпорте.
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Ðовое воздушное Ñудно!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Цена: {CURRENCY} МакÑ. СкороÑть: {VELOCITY}{}ЕмкоÑть: {COMMA} паÑÑажиров, {COMMA} почты{}Цена обÑлуж.: {CURRENCY}/год
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Ðазвание Ñамолета
@@ -2914,6 +2906,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}Сумма MD5: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Ð’Ñ‹ хотите Ñделать Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² уже запущенной игре - Ñто может привеÑти к ошибке игры, и ее вылету.{}Ð’Ñ‹ абÑолютно уверены в том, что хотите Ñделать?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Внимание: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Ошибка: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}КритичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} не будет работать Ñ Ð²ÐµÑ€Ñией TTDPatch, Ñообщенной OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} Ð´Ð»Ñ {STRING}-верÑии TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} Ñделан Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð² {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Ðеверный параметр {STRING}: параметр {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} должен быть загружен перед {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} должен быть загружен поÑле {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Добавить
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Добавить файл NewGRF в ÑпиÑок
 STR_NEWGRF_REMOVE                                               :{BLACK}Удалить
@@ -3139,4 +3142,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Длина: {NUM}{}Разница выÑоты: {NUM} м
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Площадь: {NUM} x {NUM}{}Разница выÑот: {NUM} м
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}.{STRING}.{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/simplified_chinese.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/simplified_chinese.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}命令列车在高亮项目对应的车站装满货物
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}命令列车在高亮项目对应的车站å¸è½½è´§ç‰©
 STR_SERVICE_HINT                                                :{BLACK}除éžéœ€è¦åœ¨æ­¤å¤„ä¿å…»ï¼Œå¦åˆ™è·³è¿‡è¿™ä¸€é¡¹ç›®
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}新的 {STRING} 投入使用!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}费用:{CURRENCY} é‡é‡ï¼š{WEIGHT_S}{}速度:{VELOCITY}  功率:{POWER}{}è¿è¡Œè´¹ç”¨ï¼š{CURRENCY}/yr{}Capacity: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}抛锚
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}年龄: {LTBLUE}{STRING}{BLACK}   è¿è¡Œæˆæœ¬: {LTBLUE}{CURRENCY}/å¹´
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}å°†å±å¹•中心移动到车库所在的ä½ç½®
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}汽车列表 - 点击å¯ä»¥æŸ¥çœ‹è¯¦ç»†ä¿¡æ¯
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}购买高亮的汽车
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}新的汽车上市ï¼
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}价格:{CURRENCY}{}速度:{VELOCITY}{}è¿è¡Œæˆæœ¬ï¼š{CURRENCY}/å¹´{}装载能力:{CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}命忱½è½¦
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}å°†å±å¹•ä¸­å¿ƒç§»åŠ¨åˆ°èˆ¹åªæ‰€åœ¨çš„ä½ç½®
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}命令船åªå‰å¾€èˆ¹åžã€‚Ctrl+å•击时船åªåªè¿›è¡Œä¿å…»ã€‚
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}显示船åªçš„详情
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}新的船åªä¸Šå¸‚ï¼
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}价格:{CURRENCY} 最大速度:{VELOCITY}{}装载能力:{CARGO}{}è¿è¡Œè´¹ç”¨ï¼š{CURRENCY}/yr
 STR_982F_NAME_SHIP                                              :{BLACK}命å船åª
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}å°†å±å¹•中心移动到飞机所在的ä½ç½®
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}命令飞机å‰å¾€æœºåº“。Ctrl+å•击时飞机åªè¿›è¡Œä¿å…»ã€‚
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}显示飞机的详情
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}新的飞机上市ï¼
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}价格:{CURRENCY} 最大速度:{VELOCITY}{}è¿è½½èƒ½åŠ›ï¼š{COMMA} 使—…客,{COMMA} 包邮件{}è¿è¡Œè´¹ç”¨ï¼š{CURRENCY}/å¹´
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}命å飞机
--- a/src/lang/slovak.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/slovak.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -559,48 +559,48 @@
 STR_01AB                                                        :{BLACK}{TINYFONT}{STRING}
 
 ############ range for days starts
-STR_01AC_1ST                                                    :1/
-STR_01AD_2ND                                                    :2
-STR_01AE_3RD                                                    :3
-STR_01AF_4TH                                                    :4
-STR_01B0_5TH                                                    :5
-STR_01B1_6TH                                                    :6
-STR_01B2_7TH                                                    :7
-STR_01B3_8TH                                                    :8
-STR_01B4_9TH                                                    :9
-STR_01B5_10TH                                                   :10
-STR_01B6_11TH                                                   :11
-STR_01B7_12TH                                                   :12
-STR_01B8_13TH                                                   :13
-STR_01B9_14TH                                                   :14
-STR_01BA_15TH                                                   :15
-STR_01BB_16TH                                                   :16
-STR_01BC_17TH                                                   :17
-STR_01BD_18TH                                                   :18
-STR_01BE_19TH                                                   :19
-STR_01BF_20TH                                                   :20
-STR_01C0_21ST                                                   :21
-STR_01C1_22ND                                                   :22
-STR_01C2_23RD                                                   :23
-STR_01C3_24TH                                                   :24
-STR_01C4_25TH                                                   :25
-STR_01C5_26TH                                                   :26
-STR_01C6_27TH                                                   :27
-STR_01C7_28TH                                                   :28
-STR_01C8_29TH                                                   :29
-STR_01C9_30TH                                                   :30
-STR_01CA_31ST                                                   :31
+STR_01AC_1ST                                                    :1.
+STR_01AD_2ND                                                    :2/
+STR_01AE_3RD                                                    :3/
+STR_01AF_4TH                                                    :4/
+STR_01B0_5TH                                                    :5/
+STR_01B1_6TH                                                    :6/
+STR_01B2_7TH                                                    :7/
+STR_01B3_8TH                                                    :8/
+STR_01B4_9TH                                                    :9/
+STR_01B5_10TH                                                   :10/
+STR_01B6_11TH                                                   :11/
+STR_01B7_12TH                                                   :12/
+STR_01B8_13TH                                                   :13/
+STR_01B9_14TH                                                   :14/
+STR_01BA_15TH                                                   :15/
+STR_01BB_16TH                                                   :16/
+STR_01BC_17TH                                                   :17/
+STR_01BD_18TH                                                   :18/
+STR_01BE_19TH                                                   :19/
+STR_01BF_20TH                                                   :20/
+STR_01C0_21ST                                                   :21/
+STR_01C1_22ND                                                   :22/
+STR_01C2_23RD                                                   :23/
+STR_01C3_24TH                                                   :24/
+STR_01C4_25TH                                                   :25/
+STR_01C5_26TH                                                   :26/
+STR_01C6_27TH                                                   :27/
+STR_01C7_28TH                                                   :28/
+STR_01C8_29TH                                                   :29/
+STR_01C9_30TH                                                   :30/
+STR_01CA_31ST                                                   :31/
 ############ range for days ends
 
 STR_01CB                                                        :{TINYFONT}{COMMA}
 
-STR_01CE_CARGO_ACCEPTED                                         :{BLACK}Prijma naklad: {LTBLUE}
+STR_01CE_CARGO_ACCEPTED                                         :{BLACK}Prijíma náklad: {LTBLUE}
 
 STR_01D1_8                                                      :({COMMA}/8 {STRING})
 STR_01D2_JAZZ_JUKEBOX                                           :{WHITE}Jukebox
 STR_01D3_SOUND_MUSIC                                            :Zvuk/Hudba
 STR_01D4_SHOW_SOUND_MUSIC_WINDOW                                :{BLACK}Zobraz okno zvuku a hudby
-STR_01D5_ALL                                                    :{TINYFONT}Vsetko
+STR_01D5_ALL                                                    :{TINYFONT}Všetko
 STR_01D6_OLD_STYLE                                              :{TINYFONT}Stary styl
 STR_01D7_NEW_STYLE                                              :{TINYFONT}Novy styl
 STR_01D8_EZY_STREET                                             :{TINYFONT}Ezy Street
@@ -1105,6 +1105,7 @@
 STR_CONFIG_PATCHES_NONUNIFORM_STATIONS                          :{LTBLUE}Roznorode stanice: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_NEW_PATHFINDING_ALL                          :{LTBLUE}Novy globalny algoritmus hladania cesty (NPF namiesto NTP): {ORANGE}{STRING}
 STR_CONFIG_PATCHES_FREIGHT_TRAINS                               :{LTBLUE}Váhový násobok pre nákladné vlaky: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD                            :{LTBLUE}Povolit prejazdné zastávky na mestských cestách: {ORANGE}{STRING}
 
 STR_CONFIG_PATCHES_SMALL_AIRPORTS                               :{LTBLUE}Vzdy povolit stavbu malych letisk: {ORANGE}{STRING}
 
@@ -1648,6 +1649,8 @@
 STR_1816_TREE_LINED_ROAD                                        :Cesta v aleji
 STR_1817_ROAD_VEHICLE_DEPOT                                     :Garaz
 STR_1818_ROAD_RAIL_LEVEL_CROSSING                               :Zeleznicne priecestie
+STR_CAN_T_REMOVE_BUS_STATION                                    :{WHITE}Nie je možné odstránit autobusovú stanicu ...
+STR_CAN_T_REMOVE_TRUCK_STATION                                  :{WHITE}Nie je možné odstránit nakladaciu rampu ...
 
 ##id 0x2000
 STR_2000_TOWNS                                                  :{WHITE}Mesta
@@ -2667,8 +2670,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Na oznacenom prikaze bude vozidlo cakat na plne nalozenie
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Na oznacenom prikaze bude vozidlo uplne vylozene
 STR_SERVICE_HINT                                                :{BLACK}Vynechat tento prikaz pokial nie je potrebna oprava
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nove {STRING} je uz dostupne!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cena: {CURRENCY} Hmotnost: {WEIGHT_S}{}Rýchlost: {VELOCITY}  Výkon: {POWER}{}Náklady na prevádzku: {CURRENCY}/rok{}Kapacita: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Pokazene
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Vek: {LTBLUE}{STRING}{BLACK}   Naklady na prevadzku: {LTBLUE}{CURRENCY}/rok
@@ -2736,8 +2737,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrovat pohlad na poziciu garaze
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Vyber vozidiel - kliknut pre detaily
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Zakupit vybrany automobil
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Novy automobil dostupny!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cena: {CURRENCY}{}Rychlost: {VELOCITY}{}Naklady na prevadzku: {CURRENCY}/rok{}Kapacita: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Pomenovat automobil
@@ -2809,8 +2808,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Vycentrovat pohlad na lod
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Poslat lod do lodenice
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Zobrazit detaily o lodi
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nová lod je dostupná!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. rychlost: {VELOCITY}{}Kapacita: {CARGO}{}Naklady na prevadzku: {CURRENCY}/rok
 STR_982F_NAME_SHIP                                              :{BLACK}Pomenovat lod
 
@@ -2883,8 +2880,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Vycentrovat pohlad na lietadlo
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Poslat lietadlo do hangaru
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Zobrazit detaily o lietadle
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nove lietadlo dostupne!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. rychlost: {VELOCITY}{}Kapacita: {COMMA} cestujucich, {COMMA} balikov posty{}Naklady na prevadzku: {CURRENCY}/rok
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Pomenovat lietadlo
@@ -2962,6 +2957,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Chystáte sa vykonat zmeny v spustenej hre, co može sposobit pád hry.{}Naozaj ich chcete vykonat?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Upozornenie: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Chyba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Kritická chyba: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} nebude fungovat s TTDPatch verziou hlásenou OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} je pre {STRING} verziu TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} je navrhnutý pre použitie s {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Neplatný parameter {STRING}: parameter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} musí byt nahratý pred {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} musí byt nahratý po {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Pridat
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Pridat NewGRF súbor do zoznamu
 STR_NEWGRF_REMOVE                                               :{BLACK}Odstránit
@@ -3187,4 +3193,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Dlžka: {NUM}{}Výškový rozdiel: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Plocha: {NUM} x {NUM}{}Výškový rozdiel: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/slovenian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/slovenian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -1871,6 +1871,7 @@
 STR_4802_COAL_MINE                                              :Premogovnik
 STR_4802_COAL_MINE.r                                            :Premogovnika
 STR_4803_POWER_STATION                                          :Termo elektrarna
+STR_4803_POWER_STATION.r                                        :Termo elektrarne
 STR_4804_SAWMILL                                                :Žaga
 STR_4804_SAWMILL.r                                              :Žage
 STR_4805_FOREST                                                 :Gozd
@@ -2685,8 +2686,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}OznaÄi izbran ukaz, naj vozilo Äaka na polno obremenitev
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}OznaÄi izbran ukaz, naj se vozilo v celoti raztovori
 STR_SERVICE_HINT                                                :{BLACK}PreskoÄi ta ukaz, razen Äe je potreben servis
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Novo prevozno sredstvo {STRING} je sedaj na voljo!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Cena: {CURRENCY} Teža: {WEIGHT_S}{}Hitrost: {VELOCITY}  MoÄ: {POWER}{}Cena delovanja: {CURRENCY}/leto{}Zmogljivost: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}V okvari
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Starost: {LTBLUE}{STRING}{BLACK}   Cena delovanja: {LTBLUE}{CURRENCY}/leto
@@ -2754,8 +2753,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Pogled na garažo
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Seznam cestnih vozil - klikni na vozilo za informacije
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Zgradi izbrano cestno vozilo
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Novo cestno vozilo sedaj na voljo!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cena: {CURRENCY}{}Hitrost: {VELOCITY}{}Cena delovanja: {CURRENCY}/leto{}Zmogljivost: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Poimenuj cestno vozilo
@@ -2827,8 +2824,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Pogled na ladjo
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Pošlji ladjo v ladjedelnico. CTRL+klik samo na servis
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Prikaži podrobnosti ladje
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nova ladja na voljo!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. hitrost: {VELOCITY}{}Zmogljivost: {CARGO}{}Cena delovanja: {CURRENCY}/leto
 STR_982F_NAME_SHIP                                              :{BLACK}Poimenuj ladjo
 
@@ -2901,8 +2896,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Pogled na letalo
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Pošlji letalo v hangar. CTRL+klik samo na servis
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Prikaži podrobnosti letala
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Novo letalo na voljo!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Cena: {CURRENCY} Max. hitrost: {VELOCITY}{}Zmogljivost: {COMMA} potnikov, {COMMA} vreÄ poÅ¡te{}Cena delovanja: {CURRENCY}/leto
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Poimenuj letalo
@@ -2980,6 +2973,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Pripravljaš se narediti spremembe na zagnani igri; to lahko sesuje OpenTTD.{}Si zagotovo želiš tega?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Pozor: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Napaka: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Usodno: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} ne deluje s TTDPatch razliÄico prijavljeno v OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} je za {STRING} razliÄico TTD-ja.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} je izdelano za uporabo v {STRING} kombinaciji
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Neveljavna nastavitev za {STRING}: nastavitev {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} je potrebno naložiti pred {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} je potrebno naložiti po {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Dodaj
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Dodaj NewGRF datoteko na seznam
 STR_NEWGRF_REMOVE                                               :{BLACK}Odstrani
@@ -3205,4 +3209,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Dolžina: {NUM}{}Višinska razlika: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}ObmoÄje: {NUM} x {NUM}{}ViÅ¡inska razlika: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/spanish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/spanish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2607,8 +2607,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Hacer que en la orden resaltada, el vehículo espere a carga completa
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Hacer que en la orden resaltada, el vehículo espere a descargar completamente
 STR_SERVICE_HINT                                                :{BLACK}Saltar esta orden a menos que el servicio sea necesario
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nuevo {STRING} ahora disponible!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Coste: {CURRENCY} Peso: {WEIGHT_S}{}Velocidad: {VELOCITY}  Potencia: {POWER}{}Coste Operativo: {CURRENCY}/año{}Capacidad: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Averiado
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Edad: {LTBLUE}{STRING}{BLACK}   Coste Operativo: {LTBLUE}{CURRENCY}/año
@@ -2676,8 +2674,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrar vista en posición del depósito
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Lista de selección de vehículos - click en vehículo para información
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Construir el vehículo resaltado
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}¡Nuevo vehículo de carretera disponible!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Coste: {CURRENCY}{}Velocidad: {VELOCITY}{}Coste Operativo: {CURRENCY}/año{}Capacidad: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Nombrar vehículo
@@ -2749,8 +2745,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrar vista en posición del barco
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Mandar barco al astillero
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Mostrar detalles del barco
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}¡Nuevo barco ya disponible!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Coste: {CURRENCY} Velocidad Máx.: {VELOCITY}{}Capacidad: {CARGO}{}Coste Operativo: {CURRENCY}/año
 STR_982F_NAME_SHIP                                              :{BLACK}Nombrar barco
 
@@ -2823,8 +2817,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrar vista en posición de la aeronave
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Enviar aeronave al hangar
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Mostrar detalles de la aeronave
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}¡Nueva aeronave ya disponible!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Coste: {CURRENCY} Velocidad Máx.: {VELOCITY}{}Capacidad: {COMMA} pasajeros, {COMMA} sacas de correo{}Coste Operativo: {CURRENCY}/año
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Nombrar aeronave
@@ -2902,6 +2894,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Se van a realizar cambios a un juego en ejecución; esto puede cerrar OpenTTD.{}¿Estás completamente seguro de realizar esto?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Atención: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Error: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Error Fatal: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} no funcionará con la con la versión TTDPatch informada por OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} es la para la versión {STRING} de TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} está diseñado para ser usado con {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Parámetro incorrecto para {STRING}: parametro {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} debe ser cargado antes de {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} debe ser cargado después de {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Añadir
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Añadir un NewGRF a la lista
 STR_NEWGRF_REMOVE                                               :{BLACK}Quitar
@@ -3127,4 +3130,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Longitud: {NUM}{}Diferencia altura: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Ãrea: {NUM} x {NUM}{}Diferencia altura: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/swedish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/swedish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Gör markerad order att tvinga fordonet att vänta på full last
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Gör markerad order att tvinga fordonet att vänta på tom last
 STR_SERVICE_HINT                                                :{BLACK}Skippa den här ordern om inte servning behövs
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nytt {STRING} nu tillgängligt!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Kostnad: {CURRENCY} Vikt: {WEIGHT_S}{}Hastighet: {VELOCITY}  Kraft {POWER}{}Löpande kostnad: {CURRENCY}/år{}Kapacitet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Motorstopp
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Ålder: {LTBLUE}{STRING}{BLACK}   Löpande kostnad: {LTBLUE}{CURRENCY}/år
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centrera vyn ovanför bussgaraget
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Vägfordonslista - klicka på fordon för information
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Bygg markerat vägfordon
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nytt vägfordon tillgängligt!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Kostnad: {CURRENCY}{}Hastighet: {VELOCITY}{}Löpande kostnad: {CURRENCY}/år{}Kapacitet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Byt namn på vägfordon
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Centrera vyn ovanför skeppet
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Skicka skepp till depå. CTRL + klick servar endast
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Visa skeppdetaljer
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nytt skepp tillgängligt!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kostnad: {CURRENCY} Tophastighet: {VELOCITY}{}Kapacitet: {CARGO}{}Löpande kostnad: {CURRENCY}/år
 STR_982F_NAME_SHIP                                              :{BLACK}Byt namn på skepp
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Centrera vyn ovanför flygplanet
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Skicka flygplan till hangar. CTRL + klick servar endast
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Visa flygplan detaljer
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nytt flygplan tillgängligt!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Kostnad: {CURRENCY} Tophastighet: {VELOCITY}{}Kapacitet: {COMMA} passagerare, {COMMA} postsäckar{}Löpande kostnad: {CURRENCY}/år
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Byt namn på flygplan
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Du håller på att göra ändringar i ett spel som används; detta kan krascha OpenTTD.{}Är du helt säker på detta?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Varning: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Fel: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Fatalt: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} kommer inte att fungera med den TTDPatchversion som rapporterades av OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} är för {STRING}versionen av TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} är designat för att användas med {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Felaktig parameter för {STRING}: parameter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} måste laddas innan {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} måste laddas efter {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Lägg till
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Lägg till en ny NewGRF-fil till listan
 STR_NEWGRF_REMOVE                                               :{BLACK}Ta bort
@@ -3126,4 +3129,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Längd: {NUM}{}Höjdskillnad: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Yta: {NUM} x {NUM}{}Höjdskillnad: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/traditional_chinese.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/traditional_chinese.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -447,7 +447,7 @@
 STR_0182_BUILD_ROADS                                            :{BLACK}鋪設é“è·¯
 STR_0183_BUILD_SHIP_DOCKS                                       :{BLACK}興建碼頭設施
 STR_0184_BUILD_AIRPORTS                                         :{BLACK}興建機場設施
-STR_0185_PLANT_TREES_PLACE_SIGNS                                :{BLACK}æ¤æ¨¹
+STR_0185_PLANT_TREES_PLACE_SIGNS                                :{BLACK}æ¤æ¨¹/置放標示
 STR_0186_LAND_BLOCK_INFORMATION                                 :{BLACK}土地資訊
 STR_0187_OPTIONS                                                :{BLACK}é¸é …
 STR_0188                                                        :{BLACK}{SMALLUPARROW}
@@ -477,7 +477,7 @@
 STR_AGE_RED                                                     :{RED}{COMMA} å¹´ ({COMMA})
 ############ range for service numbers ends
 
-STR_019C_ROAD_VEHICLE                                           :巴士/貨車
+STR_019C_ROAD_VEHICLE                                           :車輛
 STR_019D_AIRCRAFT                                               :飛機
 STR_019E_SHIP                                                   :船舶
 STR_019F_TRAIN                                                  :列車
@@ -816,7 +816,7 @@
 STR_MEASURING_UNITS_SELECTION                                   :{BLACK}é‡åº¦å–®ä½
 STR_02E6_ROAD_VEHICLES                                          :{BLACK}公車/貨車
 STR_02E7                                                        :{BLACK}{SKIP}{SKIP}{SKIP}{STRING}
-STR_02E8_SELECT_SIDE_OF_ROAD_FOR                                :{BLACK}鏿“‡é‹å…·åœ¨è·¯ä¸Šçš„行駛ä½ç½®
+STR_02E8_SELECT_SIDE_OF_ROAD_FOR                                :{BLACK}鏿“‡è»Šè¼›åœ¨è·¯ä¸Šçš„行駛ä½ç½®
 STR_02E9_DRIVE_ON_LEFT                                          :é å·¦è¡Œé§›
 STR_02EA_DRIVE_ON_RIGHT                                         :é å³è¡Œé§›
 STR_02EB_TOWN_NAMES                                             :{BLACK}市鎮å稱
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}讓列車在é¸å®šçš„æŒ‡ä»¤ç­‰å¾…載滿
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}讓列車在é¸å®šçš„æŒ‡ä»¤å¼·åˆ¶å¸è¼‰
 STR_SERVICE_HINT                                                :{BLACK}è·³éŽé€™å€‹æŒ‡ä»¤ï¼Œé™¤éžéœ€è¦ç¶­è­·
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}{STRING} 新登場ï¼
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}價格: {CURRENCY} é‡é‡: {WEIGHT_S}{}速度: {VELOCITY}  功率: {POWER}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}故障
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}使用年數: {LTBLUE}{STRING}{BLACK}   ç‡Ÿé‹æ”¯å‡º: {LTBLUE}{CURRENCY}/å¹´
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}將主視野移到車庫ä½ç½®
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}汽車清單 - é»žé¸æ±½è»Šå¯çœ‹åˆ°è©³ç´°è³‡è¨Š
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}購買é¸å®šçš„æ±½è»Š
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}新汽車登場ï¼
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}價格: {CURRENCY}{}速度: {VELOCITY}{}營é‹è²»ç”¨: {CURRENCY}/å¹´{}容é‡: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}命忱½è»Š
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}將主視窗移到船舶ä½ç½®
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}將船舶é€å¾€èˆ¹å¡¢ã€‚æŒ‰ä½ CTRL 點é¸å‰‡åªåšç¶­è­·
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}顯示船舶詳細資料
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}新船舶登場ï¼
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}價格: {CURRENCY} 極速: {VELOCITY}{}容é‡: {CARGO}{}ç‡Ÿé‹æ”¯å‡º: {CURRENCY}/å¹´
 STR_982F_NAME_SHIP                                              :{BLACK}命å船舶
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}將主視野帶到飛機ä½ç½®
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}將飛機é€åˆ°æ©Ÿæ£šã€‚æŒ‰ä½ CTRL 點é¸å‰‡åªåšç¶­è­·
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}顯示飛機詳細資料
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}新飛機登場ï¼
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}價格: {CURRENCY} 極速: {VELOCITY}{}容é‡: 乘客 {COMMA} å,郵件 {COMMA} 袋{}ç‡Ÿé‹æ”¯å‡º: {CURRENCY}/å¹´
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}命å飛機
@@ -2901,6 +2893,16 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5 雜湊值: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}æ‚¨æ­£æº–å‚™ä¿®æ”¹é€²è¡Œä¸­çš„éŠæˆ²ï¼›é€™å¯èƒ½ä½¿ OpenTTD 當掉。{}您絕å°ç¢ºå®šè¦é€™éº¼åšå—Žï¼Ÿ
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}警告: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}錯誤: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}åš´é‡éŒ¯èª¤: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :已知 {STRING} è·Ÿ TTDPatch 版本ä¸åˆã€‚
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} åªé©åˆç”¨æ–¼ TTD 版本 {STRING}
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} 必須跟 {STRING} 一起使用
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              : {STRING} çš„åƒæ•¸ç„¡æ•ˆ: {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :è¼‰å…¥å‰ {1:STRING} 必須先載入 {0:STRING}。
+
 STR_NEWGRF_ADD                                                  :{BLACK}新增
 STR_NEWGRF_ADD_TIP                                              :{BLACK}為清單加入新的 NewGRF 檔
 STR_NEWGRF_REMOVE                                               :{BLACK}移除
@@ -3126,4 +3128,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}長度: {NUM}{}高度差: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}å€åŸŸ: {NUM} x {NUM}{}高度差: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/turkish.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/turkish.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2606,8 +2606,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Seçili talimatı yaparken tren dolana kadar beklesin
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Seçili talimatı yaparken tren mutlaka yükünü boşaltsın
 STR_SERVICE_HINT                                                :{BLACK}Bakım gerekmiyorsa bunu atla
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Yeni bir araç üretildi: {STRING}
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Fiyat: {CURRENCY} Ağırlık: {WEIGHT_S}{}Hız: {VELOCITY}  Güç: {POWER}{}Bakım: {CURRENCY}/sene{}Kapasite: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Bozuldu
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Yaş: {LTBLUE}{STRING}{BLACK}   Bakım: {LTBLUE}{CURRENCY}/sene
@@ -2675,8 +2673,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Araba garajını göster
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Araba listesi - bilgi için arabayı tıklayın
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Seçili arabayı al
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Yeni bir araba üretildi!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Fiyat: {CURRENCY}{}Hız: {VELOCITY}{}Bakım: {CURRENCY}/sene{}Kapasite: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Arabayı adlandır
@@ -2748,8 +2744,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Gemiyi göster
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Tersaneye gönder
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Gemi ayrıntılarını göster
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Yeni gemi üretildi!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Fiyatı: {CURRENCY} Mak. Hız: {VELOCITY}{}Kapasite: {CARGO}{}Bakım: {CURRENCY}/sene
 STR_982F_NAME_SHIP                                              :{BLACK}Gemiyi adlandır
 
@@ -2822,8 +2816,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Uçağı göster
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Uçağı hangara gönder
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Uçak ayrıntılarını göster
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Yeni bir uçak yapıldı!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Fiyat: {CURRENCY} Mak. Hız: {VELOCITY}{}Kapasite: {COMMA} yolcu, {COMMA} çanta posta{}Bakım: {CURRENCY}/yıl
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Uçağı adlandır
@@ -2901,6 +2893,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5sum: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Çalışan bir oyunu değiştirmek üzeresiniz; bu OpenTTD'yi çökertebilir.{}Emin misiniz?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}Uyarı: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Hata: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Ölümcül hata: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} OpenTTD tarafından belirtilen TTDPatch sürümüyle çalışmayacaktır.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING}, TTD'nin {STRING} sürümü içindir.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING}, {STRING} ile kullanılmak için tasarlanmıştır
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :{STRING} için geçersiz parametre: {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} önce, {STRING} ondan sonra yüklenmeli.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} sonra, {STRING} ondan önce yüklenmeli.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Ekle
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Listeye NewGRF dosyası ekle
 STR_NEWGRF_REMOVE                                               :{BLACK}Kaldır
@@ -3126,4 +3129,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Uzunluk: {NUM}{}Yükseklik farkı: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Alan: {NUM} x {NUM}{}Yükseklik farkı: {NUM} m
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/ukrainian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/ukrainian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -109,8 +109,9 @@
 STR_002B_BATTERIES.r                                            :батарейок
 STR_002B_BATTERIES.z                                            :батарейки
 STR_002C_PLASTIC                                                :плаÑтилін
+STR_002C_PLASTIC.r                                              :плаÑтиліну
 STR_002C_PLASTIC.z                                              :плаÑтилін
-STR_002D_FIZZY_DRINKS                                           :газована водф
+STR_002D_FIZZY_DRINKS                                           :газована вода
 STR_002D_FIZZY_DRINKS.r                                         :газованої води
 STR_002D_FIZZY_DRINKS.z                                         :газовану воду
 STR_002E                                                        :
@@ -202,6 +203,7 @@
 STR_004B_BATTERY.r                                              :батарейок
 STR_004B_BATTERY.z                                              :батарейки
 STR_004C_PLASTIC                                                :плаÑтилін
+STR_004C_PLASTIC.r                                              :плаÑтиліну
 STR_004C_PLASTIC.z                                              :плаÑтилін
 STR_004D_FIZZY_DRINK                                            :газована вода
 STR_004D_FIZZY_DRINK.r                                          :газованої води
@@ -237,7 +239,7 @@
 STR_QUANTITY_TOFFEE                                             :{WEIGHT} іриÑок
 STR_QUANTITY_BATTERIES                                          :{COMMA} батарей{P ка ки ок}
 STR_QUANTITY_PLASTIC                                            :{VOLUME} плаÑтику
-STR_QUANTITY_FIZZY_DRINKS                                       :{COMMA} газованої вод{P а "" и}!!!
+STR_QUANTITY_FIZZY_DRINKS                                       :{COMMA} плÑш{P ка ки ок} газованої води
 STR_ABBREV_NOTHING                                              :
 STR_ABBREV_PASSENGERS                                           :{TINYFONT}ПС
 STR_ABBREV_COAL                                                 :{TINYFONT}ВГ
@@ -275,11 +277,11 @@
 STR_00AE                                                        :{WHITE}{DATE_SHORT}
 STR_00AF                                                        :{WHITE}{DATE_LONG}
 STR_00B0_MAP                                                    :{WHITE}Карта - {STRING}
-STR_00B1_GAME_OPTIONS                                           :{WHITE}Опції ігри
+STR_00B1_GAME_OPTIONS                                           :{WHITE}Опції гри
 STR_00B2_MESSAGE                                                :{YELLOW}ПовідомленнÑ
 STR_00B3_MESSAGE_FROM                                           :{YELLOW}ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ {STRING}
 STR_POPUP_CAUTION_CAPTION                                       :{WHITE}Обережно!
-STR_00B4_CAN_T_DO_THIS                                          :{WHITE}Ðеможливо це зробити...
+STR_00B4_CAN_T_DO_THIS                                          :{WHITE}Ðеможливо зробити це...
 STR_00B5_CAN_T_CLEAR_THIS_AREA                                  :{WHITE}Ðеможливо очиÑтити цю ділÑнку...
 STR_00B6_ORIGINAL_COPYRIGHT                                     :{BLACK}ÐвторÑьке право {COPYRIGHT} 1995 ÐšÑ€Ñ–Ñ Ð¡Ð¾Ð¹Ñ”Ñ€, Ð’ÑÑ– права захищені
 STR_00B7_VERSION                                                :{BLACK}OpenTTD верÑÑ–Ñ {REV}
@@ -367,7 +369,7 @@
 STR_0113_COLA_WELLS                                             :{BLACK}{TINYFONT}Джерело Кока-Коли
 STR_0114_TOY_SHOP                                               :{BLACK}{TINYFONT}Іграшковий магазин
 STR_0115_TOY_FACTORY                                            :{BLACK}{TINYFONT}Іграшкова фабрика
-STR_0116_PLASTIC_FOUNTAINS                                      :{BLACK}{TINYFONT}ПлаÑтикові фонтани
+STR_0116_PLASTIC_FOUNTAINS                                      :{BLACK}{TINYFONT}ПлаÑтилінові фонтани
 STR_0117_FIZZY_DRINK_FACTORY                                    :{BLACK}{TINYFONT}Завод газованої води
 STR_0118_BUBBLE_GENERATOR                                       :{BLACK}{TINYFONT}Бульбашкова фабрика
 STR_0119_TOFFEE_QUARRY                                          :{BLACK}{TINYFONT}ІриÑковий кар'єр
@@ -469,7 +471,7 @@
 STR_UNITS_FORCE_SI                                              :{COMMA} kN
 
 ############ range for menu starts
-STR_0154_OPERATING_PROFIT_GRAPH                                 :Прибуток виробництва
+STR_0154_OPERATING_PROFIT_GRAPH                                 :Операційний прибуток
 STR_0155_INCOME_GRAPH                                           :Графік доходів
 STR_0156_DELIVERED_CARGO_GRAPH                                  :ДоÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ð²Ð°Ð½Ñ‚Ð°Ð¶Ñ–Ð²
 STR_0157_PERFORMANCE_HISTORY_GRAPH                              :Графік продуктивноÑті
@@ -571,7 +573,7 @@
 STR_0182_BUILD_ROADS                                            :{BLACK}Будувати дороги
 STR_0183_BUILD_SHIP_DOCKS                                       :{BLACK}Будувати порти
 STR_0184_BUILD_AIRPORTS                                         :{BLACK}Будувати аеропорти
-STR_0185_PLANT_TREES_PLACE_SIGNS                                :{BLACK}Садити дерева, позначити міÑце, тощо
+STR_0185_PLANT_TREES_PLACE_SIGNS                                :{BLACK}ПоÑадити дерева, позначити міÑце, тощо
 STR_0186_LAND_BLOCK_INFORMATION                                 :{BLACK}Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ земельну ділÑнку
 STR_0187_OPTIONS                                                :{BLACK}Опції
 STR_0188                                                        :{BLACK}{SMALLUPARROW}
@@ -758,7 +760,7 @@
 STR_0234_NEW_TOWN                                               :{BLACK}Ðове міÑто
 STR_0235_CONSTRUCT_NEW_TOWN                                     :{BLACK}Будувати нове міÑто
 STR_0236_CAN_T_BUILD_TOWN_HERE                                  :{WHITE}Тут не можна будувати міÑто...
-STR_0237_TOO_CLOSE_TO_EDGE_OF_MAP                               :{WHITE}...близько до краю карти
+STR_0237_TOO_CLOSE_TO_EDGE_OF_MAP                               :{WHITE}...надто близько до краю карти
 STR_0238_TOO_CLOSE_TO_ANOTHER_TOWN                              :{WHITE}...надто близько до іншого міÑта
 STR_0239_SITE_UNSUITABLE                                        :{WHITE}...невідповідне міÑце
 STR_023A_TOO_MANY_TOWNS                                         :{WHITE}...забагато міÑÑ‚
@@ -798,7 +800,7 @@
 STR_025A_COLA_WELLS                                             :{BLACK}Джерело Кока-коли
 STR_025B_TOY_SHOP                                               :{BLACK}Іграшковий магазин
 STR_025C_TOY_FACTORY                                            :{BLACK}Іграшкова фабрика
-STR_025D_PLASTIC_FOUNTAINS                                      :{BLACK}ПлаÑтикові фонтани
+STR_025D_PLASTIC_FOUNTAINS                                      :{BLACK}ПлаÑтилінові фонтани
 STR_025E_FIZZY_DRINK_FACTORY                                    :{BLACK}Фабрика газованої води
 STR_025F_BUBBLE_GENERATOR                                       :{BLACK}Бульбашкова фабрика
 STR_0260_TOFFEE_QUARRY                                          :{BLACK}ІриÑковий кар'єр
@@ -824,7 +826,7 @@
 STR_0274_PLANT_FRUIT_PLANTATION                                 :{BLACK}ПоÑадити фруктовий Ñад
 STR_0275_PLANT_RUBBER_PLANTATION                                :{BLACK}ПоÑадити каучуковий Ñад
 STR_0276_CONSTRUCT_WATER_SUPPLY                                 :{BLACK}Будувати водопоÑтачаннÑ
-STR_0277_CONSTRUCT_WATER_TOWER_CAN                              :{BLACK}Будувати водонапірна башту (тільки у міÑтах)
+STR_0277_CONSTRUCT_WATER_TOWER_CAN                              :{BLACK}Будувати водонапірну башту (тільки у міÑтах)
 STR_0278_CONSTRUCT_DIAMOND_MINE                                 :{BLACK}Будувати діамантову шахту
 STR_0279_CONSTRUCT_COPPER_ORE_MINE                              :{BLACK}Будувати міднорудну шахту
 STR_027A_PLANT_COTTON_CANDY_FOREST                              :{BLACK}ПоÑадити Ð»Ñ–Ñ Ñолодкої вати
@@ -833,7 +835,7 @@
 STR_027D_CONSTRUCT_COLA_WELLS                                   :{BLACK}Будувати джерело Кока-коли
 STR_027E_CONSTRUCT_TOY_SHOP                                     :{BLACK}Будувати іграшковий магазин
 STR_027F_CONSTRUCT_TOY_FACTORY                                  :{BLACK}Будувати іграшкову фабрику
-STR_0280_CONSTRUCT_PLASTIC_FOUNTAINS                            :{BLACK}Будувати плаÑтикові фонтани
+STR_0280_CONSTRUCT_PLASTIC_FOUNTAINS                            :{BLACK}Будувати плаÑтилінові фонтани
 STR_0281_CONSTRUCT_FIZZY_DRINK_FACTORY                          :{BLACK}Будувати завод газованої води
 STR_0282_CONSTRUCT_BUBBLE_GENERATOR                             :{BLACK}Будувати бульбашкову фабрику
 STR_0283_CONSTRUCT_TOFFEE_QUARRY                                :{BLACK}Будувати іриÑковий кар'єр
@@ -941,8 +943,8 @@
 STR_02E6_ROAD_VEHICLES                                          :{BLACK}ТранÑпорт
 STR_02E7                                                        :{BLACK}{SKIP}{SKIP}{SKIP}{STRING}
 STR_02E8_SELECT_SIDE_OF_ROAD_FOR                                :{BLACK}Виберіть, по Ñкій Ñтороні їхатиме транÑпорт
-STR_02E9_DRIVE_ON_LEFT                                          :Їде по лівій Ñтороні
-STR_02EA_DRIVE_ON_RIGHT                                         :Їде по правій Ñтороні
+STR_02E9_DRIVE_ON_LEFT                                          :їде по лівій Ñтороні
+STR_02EA_DRIVE_ON_RIGHT                                         :їде по правій Ñтороні
 STR_02EB_TOWN_NAMES                                             :{BLACK}Ðазви міÑÑ‚
 STR_02EC                                                        :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
 STR_02ED_SELECT_STYLE_OF_TOWN_NAMES                             :{BLACK}Виберіть Ñтиль назв міÑÑ‚
@@ -965,7 +967,7 @@
 STR_0304_QUIT                                                   :{BLACK}Вихід
 STR_0305_QUIT_OPENTTD                                           :{BLACK}покинути 'OpenTTD'
 STR_0307_OPENTTD                                                :{WHITE}OpenTTD {REV}
-STR_030D_CAN_ONLY_BE_BUILT_IN_TOWNS                             :{WHITE}...можна збудувати лише в міÑтах
+STR_030D_CAN_ONLY_BE_BUILT_IN_TOWNS                             :{WHITE}...можна будувати лише у міÑтах
 STR_030E_SELECT_TEMPERATE_LANDSCAPE                             :{BLACK}Вибрати 'помірний' клімат
 STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE                            :{BLACK}Вибрати 'Ñубарктичний' клімат
 STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE                          :{BLACK}Вибрати 'тропічний' клімат
@@ -1373,7 +1375,7 @@
 STR_CONSTRUCT_COTTON_CANDY_TIP                                  :{BLACK}ПоÑадити Ð»Ñ–Ñ Ñолодкої вати
 STR_CONSTRUCT_BATTERY_FARM_TIP                                  :{BLACK}ПоÑадити батарейкове поле
 STR_CONSTRUCT_COLA_WELLS_TIP                                    :{BLACK}Будувати джерело кока-коли
-STR_CONSTRUCT_PLASTIC_FOUNTAINS_TIP                             :{BLACK}Будувати плаÑтикові фонтани
+STR_CONSTRUCT_PLASTIC_FOUNTAINS_TIP                             :{BLACK}Будувати плаÑтилінові фонтани
 STR_CONSTRUCT_BUBBLE_GENERATOR_TIP                              :{BLACK}Збудувати бульбашкову фабрику
 STR_CONSTRUCT_TOFFEE_QUARRY_TIP                                 :{BLACK}Будувати іриÑковий кар'єр
 STR_CONSTRUCT_SUGAR_MINE_TIP                                    :{BLACK}Збудувати цукрову копальню
@@ -1932,14 +1934,14 @@
 STR_4002_SAVE                                                   :{BLACK}Зберегти
 STR_4003_DELETE                                                 :{BLACK}Видалити
 STR_4004                                                        :{COMPANY}, {DATE_LONG}
-STR_4005_BYTES_FREE                                             :{BLACK}{COMMA} мегабайт вільно
+STR_4005_BYTES_FREE                                             :{BLACK}{COMMA} мегабайт{P "" и ""}  вільно
 STR_4006_UNABLE_TO_READ_DRIVE                                   :{BLACK}Ðеможливо прочитати приÑтрій
 STR_4007_GAME_SAVE_FAILED                                       :{WHITE}Помилка запиÑу гри
-STR_4008_UNABLE_TO_DELETE_FILE                                  :{WHITE}Ðеможлтво видалити файл
+STR_4008_UNABLE_TO_DELETE_FILE                                  :{WHITE}Ðеможливо Ñтерти файл
 STR_4009_GAME_LOAD_FAILED                                       :{WHITE}Помилка Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð³Ñ€Ð¸
 STR_400A_LIST_OF_DRIVES_DIRECTORIES                             :{BLACK}СпиÑок приÑтроїв, каталогів Ñ– збережених файлів гри
 STR_400B_CURRENTLY_SELECTED_NAME                                :{BLACK}Поточне вибране ім'Ñ Ñ„Ð°Ð¹Ð»Ñƒ Ð´Ð»Ñ Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð³Ñ€Ð¸
-STR_400C_DELETE_THE_CURRENTLY_SELECTED                          :{BLACK}Видалити поточну вибрану збережену гру
+STR_400C_DELETE_THE_CURRENTLY_SELECTED                          :{BLACK}Стерти вибрану збережену гру
 STR_400D_SAVE_THE_CURRENT_GAME_USING                            :{BLACK}Зберегти поточну гру, викориÑтовуючи вибране ім'Ñ Ñ„Ð°Ð¹Ð»Ñƒ
 STR_400E_SELECT_NEW_GAME_TYPE                                   :{WHITE}Виберіть новий тип гри
 STR_400F_SELECT_SCENARIO_GREEN_PRE                              :{BLACK}Виберіть Ñценарій (зелений), вÑтановлена гра (Ñиній), або випадкова нова гра
@@ -2013,8 +2015,8 @@
 STR_4820_TOY_SHOP.z                                             :іграшковий магазин
 STR_4821_TOY_FACTORY                                            :Іграшкова фабрика
 STR_4821_TOY_FACTORY.z                                          :іграшкову фабрику
-STR_4822_PLASTIC_FOUNTAINS                                      :ПлаÑтиковий фонтан
-STR_4822_PLASTIC_FOUNTAINS.z                                    :плаÑтиковий фонтан
+STR_4822_PLASTIC_FOUNTAINS                                      :ПлаÑтиліновий фонтан
+STR_4822_PLASTIC_FOUNTAINS.z                                    :плаÑтиліновий фонтан
 STR_4823_FIZZY_DRINK_FACTORY                                    :Завод газованої води
 STR_4823_FIZZY_DRINK_FACTORY.z                                  :завод газованої води
 STR_4824_BUBBLE_GENERATOR                                       :Бульбашкова фабрика
@@ -2434,7 +2436,7 @@
 STR_8032_TOY_VAN                                                :Вагон Ð´Ð»Ñ Ñ–Ð³Ñ€Ð°ÑˆÐ¾Ðº
 STR_8033_BATTERY_TRUCK                                          :вантажівка Ð´Ð»Ñ Ð±Ð°Ñ‚Ð°Ñ€ÐµÐ¹Ð¾Ðº
 STR_8034_FIZZY_DRINK_TRUCK                                      :вантажівка Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
-STR_8035_PLASTIC_TRUCK                                          :вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
+STR_8035_PLASTIC_TRUCK                                          :вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
 STR_8036_X2001_ELECTRIC                                         :'X2001' (Електричка)
 STR_8037_MILLENNIUM_Z1_ELECTRIC                                 :'Millennium Z1' (Електричка)
 STR_8038_WIZZOWOW_Z99                                           :Wizzowow Z99
@@ -2464,7 +2466,7 @@
 STR_8050_TOY_VAN                                                :вагон Ð´Ð»Ñ Ñ–Ð³Ñ€Ð°ÑˆÐ¾Ðº
 STR_8051_BATTERY_TRUCK                                          :вагон Ð´Ð»Ñ Ð±Ð°Ñ‚Ð°Ñ€ÐµÐ¹Ð¾Ðº
 STR_8052_FIZZY_DRINK_TRUCK                                      :вантажівка Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
-STR_8053_PLASTIC_TRUCK                                          :вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
+STR_8053_PLASTIC_TRUCK                                          :вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
 STR_8054_LEV1_LEVIATHAN_ELECTRIC                                :Lev1 'Leviathan' (електричка)
 STR_8055_LEV2_CYCLOPS_ELECTRIC                                  :Lev2 'Cyclops' (електричка)
 STR_8056_LEV3_PEGASUS_ELECTRIC                                  :Lev3 'Pegasus' (електричка)
@@ -2496,7 +2498,7 @@
 STR_8070_TOY_VAN                                                :вагон Ð´Ð»Ñ Ñ–Ð³Ñ€Ð°ÑˆÐ¾Ðº
 STR_8071_BATTERY_TRUCK                                          :вагон Ð´Ð»Ñ Ð±Ð°Ñ‚Ð°Ñ€ÐµÐ¹Ð¾Ðº
 STR_8072_FIZZY_DRINK_TRUCK                                      :вагон Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
-STR_8073_PLASTIC_TRUCK                                          :вагон Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
+STR_8073_PLASTIC_TRUCK                                          :вагон Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
 STR_8074_MPS_REGAL_BUS                                          :MPS Regal автобуÑ
 STR_8075_HEREFORD_LEOPARD_BUS                                   :Hereford Leopard автобуÑ
 STR_8076_FOSTER_BUS                                             :Foster автобуÑ
@@ -2562,8 +2564,8 @@
 STR_80B2_POWERNAUGHT_COLA_TRUCK                                 :Powernaught вантажівка Ð´Ð»Ñ ÐºÐ¾Ð»Ð¸
 STR_80B3_WIZZOWOW_COLA_TRUCK                                    :Wizzowow вантажівка Ð´Ð»Ñ ÐºÐ¾Ð»Ð¸
 STR_80B4_MIGHTYMOVER_COTTON_CANDY                               :MightyMover вантажівка Ð´Ð»Ñ Ñ†ÑƒÐºÑ€Ð¾Ð²Ð¾Ñ— вати
-STR_80B5_POWERNAUGHT_COTTON_CANDY                               :Powernaught вантажівка Ð´Ð»Ñ Ñолодощів
-STR_80B6_WIZZOWOW_COTTON_CANDY_TRUCK                            :Wizzowow вантажівка Ð´Ð»Ñ Ñолодощів
+STR_80B5_POWERNAUGHT_COTTON_CANDY                               :Powernaught вантажівка Ð´Ð»Ñ Ñ†ÑƒÐºÑ€Ð¾Ð²Ð¾Ñ— вати
+STR_80B6_WIZZOWOW_COTTON_CANDY_TRUCK                            :Wizzowow вантажівка Ð´Ð»Ñ Ñ†ÑƒÐºÑ€Ð¾Ð²Ð¾Ñ— вати
 STR_80B7_MIGHTYMOVER_TOFFEE_TRUCK                               :MightyMover вантажівка Ð´Ð»Ñ Ñ–Ñ€Ð¸Ñок
 STR_80B8_POWERNAUGHT_TOFFEE_TRUCK                               :Powernaught вантажівка Ð´Ð»Ñ Ñ–Ñ€Ð¸Ñок
 STR_80B9_WIZZOWOW_TOFFEE_TRUCK                                  :Wizzowow вантажівка Ð´Ð»Ñ Ñ–Ñ€Ð¸Ñок
@@ -2579,9 +2581,9 @@
 STR_80C3_MIGHTYMOVER_FIZZY_DRINK                                :MightyMover вантажівка Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
 STR_80C4_POWERNAUGHT_FIZZY_DRINK                                :Powernaught вантажівка Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
 STR_80C5_WIZZOWOW_FIZZY_DRINK_TRUCK                             :Wizzowow вантажівка Ð´Ð»Ñ Ð³Ð°Ð·Ð¾Ð²Ð°Ð½Ð¾Ñ— води
-STR_80C6_MIGHTYMOVER_PLASTIC_TRUCK                              :MightyMover вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
-STR_80C7_POWERNAUGHT_PLASTIC_TRUCK                              :Powernaught вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
-STR_80C8_WIZZOWOW_PLASTIC_TRUCK                                 :Wizzowow вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтику
+STR_80C6_MIGHTYMOVER_PLASTIC_TRUCK                              :MightyMover вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
+STR_80C7_POWERNAUGHT_PLASTIC_TRUCK                              :Powernaught вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
+STR_80C8_WIZZOWOW_PLASTIC_TRUCK                                 :Wizzowow вантажівка Ð´Ð»Ñ Ð¿Ð»Ð°Ñтиліну
 STR_80C9_MIGHTYMOVER_BUBBLE_TRUCK                               :MightyMover вантажівка Ð´Ð»Ñ ÐºÑƒÐ»ÑŒÐ¾Ðº
 STR_80CA_POWERNAUGHT_BUBBLE_TRUCK                               :Powernaught вантажівка Ð´Ð»Ñ ÐºÑƒÐ»ÑŒÐ¾Ðº
 STR_80CB_WIZZOWOW_BUBBLE_TRUCK                                  :Wizzowow вантажівка Ð´Ð»Ñ ÐºÑƒÐ»ÑŒÐ¾Ðº
@@ -2638,7 +2640,7 @@
 STR_80FE_GURU_X2_HELICOPTER                                     :Guru X2 гелікоптер
 STR_80FF_POWERNAUT_HELICOPTER                                   :Powernaut гелікоптер
 STR_8100_MESSAGE_FROM_VEHICLE_MANUFACTURE                       :{WHITE}ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ виробника транÑпорту
-STR_8101_WE_HAVE_JUST_DESIGNED_A                                :{GOLD}Ми розробили новий {STRING} - бажаєте екÑлюзивно кориÑтуватиÑÑŒ ним протÑгом року, так ми побачимо Ñк він зарекомендує Ñебе перед тим Ñк буде доÑтупним Ð´Ð»Ñ Ð²ÑÑ–Ñ…?
+STR_8101_WE_HAVE_JUST_DESIGNED_A                                :{GOLD}Ми розробили новий {STRING} - чи бажаєте екÑклюзивно кориÑтуватиÑÑŒ ним протÑгом року, так ми побачимо, Ñк він зарекомендує Ñебе, перед тим Ñк буде доÑтупним Ð´Ð»Ñ Ð²ÑÑ–Ñ…?
 STR_8102_RAILROAD_LOCOMOTIVE                                    :локомотив
 STR_8103_ROAD_VEHICLE                                           :автомобіль
 STR_8104_AIRCRAFT                                               :літак
@@ -2765,8 +2767,6 @@
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Чекати повного Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð½Ð° цій Ñтанції
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Лише розвантажитиÑÑ Ð½Ð° цій Ñтанції
 STR_SERVICE_HINT                                                :{BLACK}ПропуÑтити це Ð·Ð°Ð²Ð´Ð°Ð½Ð½Ñ Ð¿Ð¾ÐºÐ¸ обÑÐ»ÑƒÐ³Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ‚Ñ€Ñ–Ð±Ð½Ðµ!!!
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}ДоÑтупний новий {STRING}!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Ціна: {CURRENCY} Вага: {WEIGHT_S}{}ШвидкіÑть: {VELOCITY}{}ПотужніÑть: {POWER}{}ВартіÑть екÑплуатації: {CURRENCY}/рік{}МіÑткіÑть: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}ЗламавÑÑ
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Вік: {LTBLUE}{STRING}{BLACK}   ТранÑпортні витрати: {LTBLUE}{CURRENCY}/рік
@@ -2834,8 +2834,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Показати авто депо в центрі екрану
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}СпиÑок авто - натиÑніть на авто Ð´Ð»Ñ Ñ–Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ—
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Будувати вибране авто
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}ДоÑтупне нове авто!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Ціна: {CURRENCY}{}ШвидкіÑть: {VELOCITY}{}ТранÑпортні витрати: {CURRENCY}/рік{}МіÑткіÑть: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Ðазвати авто
@@ -2907,8 +2905,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Показати корабель в центрі екрану
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Ðаправити корабель в депо
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Показати корабель детально
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}ДоÑтупний новий корабель!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Ціна: {CURRENCY} МакÑ. швидкіÑть: {VELOCITY}{}МіÑткіÑть: {CARGO}{}ТранÑпортні витрати: {CURRENCY}/рік
 STR_982F_NAME_SHIP                                              :{BLACK}Ðазвати корабель
 
@@ -2981,8 +2977,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Показати літак в центрі екрану
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Ðаправити літак в ангар
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Показати літак детально
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}ДоÑтупний новий літак!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Ціна: {CURRENCY} МакÑ. швидкіÑть: {VELOCITY}{}МіÑткіÑть: {COMMA} паÑажирів, {COMMA} мішків пошти{}ТранÑпортні витрати: {CURRENCY}/рік
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Ðазвати літак
@@ -3060,6 +3054,17 @@
 STR_NEWGRF_MD5SUM                                               :{BLACK}MD5Ñума: {SILVER}{STRING}
 STR_NEWGRF_CONFIRMATION_TEXT                                    :{YELLOW}Ви хочете зробити зміни у вже запущеній грі; це може привеÑти до завиÑÐ°Ð½Ð½Ñ OpenTTD.{}Ви впевнені що хочете зробити це?
 
+STR_NEWGRF_ERROR_MSG_INFO                                       :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING                                    :{RED}ПопередженнÑ: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR                                      :{RED}Помилка: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL                                      :{RED}Збій: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER                                 :{STRING} не буде працювати з верÑією TTDPatch, вказаною OpenTTD.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS                                 :{STRING} Ð´Ð»Ñ {STRING} вірÑÑ–Ñ— TTD.
+STR_NEWGRF_ERROR_UNSET_SWITCH                                   :{STRING} розроблено Ð´Ð»Ñ {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER                              :Помилковий параметр Ð´Ð»Ñ {STRING}: параметр {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE                                    :{STRING} має бути завантажений до {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER                                     :{STRING} має бути завантажений піÑÐ»Ñ {STRING}.
+
 STR_NEWGRF_ADD                                                  :{BLACK}Додати
 STR_NEWGRF_ADD_TIP                                              :{BLACK}Додати файли NewGRF до ÑпиÑку
 STR_NEWGRF_REMOVE                                               :{BLACK}Видалити
@@ -3285,4 +3290,9 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Довжина: {NUM}{}Ð Ñ–Ð·Ð½Ð¸Ñ†Ñ Ð²Ð¸Ñот: {NUM} м
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}ДілÑнка: {NUM} x {NUM}{}Ð Ñ–Ð·Ð½Ð¸Ñ†Ñ Ð²Ð¸Ñот: {NUM} м
 
+############ Date formatting
+STR_DATE_TINY                                                   :{STRING}-{STRING}-{NUM}
+STR_DATE_SHORT                                                  :{STRING} {NUM}
+STR_DATE_LONG                                                   :{STRING} {STRING} {NUM}
+
 ########
--- a/src/lang/unfinished/afrikaans.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/unfinished/afrikaans.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -82,6 +82,16 @@
 STR_004B_BATTERY                                                :Battery
 STR_004C_PLASTIC                                                :Plastiek
 STR_004D_FIZZY_DRINK                                            :Koeldrank
+STR_QUANTITY_NOTHING                                            :
+STR_QUANTITY_PASSENGERS                                         :{COMMA} Passasier{P "" s}
+STR_QUANTITY_COAL                                               :{WEIGHT} van steenkool
+STR_QUANTITY_MAIL                                               :{COMMA} sak{P "" e} van pos
+STR_QUANTITY_OIL                                                :{VOLUME} van olie
+STR_QUANTITY_LIVESTOCK                                          :{COMMA} item{P "" s} van lewende hawe
+STR_QUANTITY_GOODS                                              :{COMMA} hok{P "" ke} van goedere
+STR_QUANTITY_GRAIN                                              :{WEIGHT} van graan
+STR_QUANTITY_WOOD                                               :{WEIGHT} van hout
+STR_QUANTITY_IRON_ORE                                           :{WEIGHT} van yster erts
 STR_QUANTITY_STEEL                                              :{WEIGHT} van staal
 STR_QUANTITY_VALUABLES                                          :{COMMA} sak{P "" ke} van kosbaarhede
 STR_QUANTITY_COPPER_ORE                                         :{WEIGHT} van koper erts
@@ -149,7 +159,7 @@
 STR_00B5_CAN_T_CLEAR_THIS_AREA                                  :{WHITE}Kan nie die area reinig nie....
 STR_00B6_ORIGINAL_COPYRIGHT                                     :{BLACK}Oorspronklik kopiereg {COPYRIGHT} 1995 Chris Sawyer, Alle regte voorbehou
 STR_00B7_VERSION                                                :{BLACK}OpenTTD bewerking {REV}
-STR_00BA_COPYRIGHT_OPENTTD                                      :{BLACK}OpenTTD {COPYRIGHT}2002-2006 Die OpenTTD span
+STR_00BA_COPYRIGHT_OPENTTD                                      :{BLACK}OpenTTD {COPYRIGHT}2002-2007 Die OpenTTD span
 STR_TRANSLATED_BY                                               :{BLACK}  Vertaler(s) -
 
 STR_00C5                                                        :{BLACK}{CROSS}
@@ -192,7 +202,7 @@
 STR_00EA_OWNERS                                                 :Eienaars
 STR_00EB_ROADS                                                  :{BLACK}{TINYFONT}Paaie
 STR_00EC_RAILROADS                                              :{BLACK}{TINYFONT}Spoorwege
-STR_00ED_STATIONS_AIRPORTS_DOCKS                                :{BLACK}{TINYFONT}Stasies/Lughawe/Werfe
+STR_00ED_STATIONS_AIRPORTS_DOCKS                                :{BLACK}{TINYFONT}Stasies/Lughawes/Werfe
 STR_00EE_BUILDINGS_INDUSTRIES                                   :{BLACK}{TINYFONT}Geboue/Nywerheide
 STR_00EF_VEHICLES                                               :{BLACK}{TINYFONT}Voertuie
 STR_00F0_100M                                                   :{BLACK}{TINYFONT}100m
@@ -263,7 +273,7 @@
 STR_0131_TOO_MANY_NAMES_DEFINED                                 :{WHITE}Te veel naame bepaal
 STR_0132_CHOSEN_NAME_IN_USE_ALREADY                             :{WHITE}Verkieste naam reeds in gebruik
 
-STR_0133_WINDOWS                                                :Vensters
+STR_0133_WINDOWS                                                :Windows
 STR_0134_UNIX                                                   :Unix
 STR_0135_OSX                                                    :OS X
 STR_OSNAME_BEOS                                                 :BeOS
@@ -298,6 +308,7 @@
 STR_0148_GAME_OPTIONS                                           :{BLACK}Spel Opsies
 
 STR_0150_SOMEONE                                                :iemand{SKIP}{SKIP}
+STR_0151_MAP_OF_WORLD                                           :Kaart van die wereld
 STR_0152_TOWN_DIRECTORY                                         :Stad index
 STR_0153_SUBSIDIES                                              :Subsidiëe
 
@@ -434,7 +445,7 @@
 STR_0187_OPTIONS                                                :{BLACK}Opsies
 STR_0188                                                        :{BLACK}{SMALLUPARROW}
 STR_0189                                                        :{BLACK}{SMALLDOWNARROW}
-STR_018A_CAN_T_CHANGE_SERVICING                                 :{WHITE}kan nie tussendiens tydperk verander nie...
+STR_018A_CAN_T_CHANGE_SERVICING                                 :{WHITE}kan nie versiening tussentyd verander nie...
 STR_018B_CLOSE_WINDOW                                           :{BLACK}Maak venster toe
 STR_018C_WINDOW_TITLE_DRAG_THIS                                 :{BLACK}Venster titel - sleep die om venster te beweeg
 STR_STICKY_BUTTON                                               :{BLACK}Bemerk die venste as ontoemaakbaar by die"Sluit Alle Vensters" sleutel
@@ -540,7 +551,7 @@
 STR_01E8_TRACK_XTITLE                                           :{BLACK}{TINYFONT}Liedjie{SETX 88}Titel
 STR_01E9_SHUFFLE                                                :{TINYFONT}Skuifel
 STR_01EA_PROGRAM                                                :{TINYFONT}{BLACK}Musiek lys
-STR_01EB_MUSIC_PROGRAM_SELECTION                                :{WHITE}Musiek Lys Seleksie
+STR_01EB_MUSIC_PROGRAM_SELECTION                                :{WHITE}Musiek Lys Keuse
 STR_01EC_0                                                      :{TINYFONT}{LTBLUE}0{COMMA} "{STRING}"
 STR_01ED                                                        :{TINYFONT}{LTBLUE}{COMMA} "{STRING}"
 STR_01EE_TRACK_INDEX                                            :{TINYFONT}{BLACK}Liedjie Index
@@ -557,7 +568,7 @@
 STR_01F9_SAVE_MUSIC_SETTINGS                                    :{BLACK}Bewaar musiek stellings
 STR_01FA_CLICK_ON_MUSIC_TRACK_TO                                :{BLACK}Kliek op musiek liedjie om by huidige musiek lys in te sit (slegs Gewoonte 1 of Gewoonte 2)
 STR_CLICK_ON_TRACK_TO_REMOVE                                    :{BLACK}Kliek op musiek lied om te verwyder van huidige program (Slegs Gewoonte1 of Gewoonte2)
-STR_01FB_TOGGLE_PROGRAM_SHUFFLE                                 :{BLACK}Skakel musiek lys skuimel aan/af
+STR_01FB_TOGGLE_PROGRAM_SHUFFLE                                 :{BLACK}Skakel musiek lys skuifel aan/af
 STR_01FC_SHOW_MUSIC_TRACK_SELECTION                             :{BLACK}Vertoon musiek liedjie keuse venster
 STR_01FD_CLICK_ON_SERVICE_TO_CENTER                             :{BLACK}Kliek op diens om uitsig te senter op nywerheid/stad
 STR_01FE_DIFFICULTY                                             :{BLACK}Moeilikheid ({STRING})
@@ -588,6 +599,9 @@
 STR_0214_ENTREPRENEUR                                           :Ondernemer
 STR_0215_INDUSTRIALIST                                          :Nyweraar
 STR_0216_CAPITALIST                                             :Kapitalis
+STR_0217_MAGNATE                                                :Magnaat
+STR_0218_MOGUL                                                  :Mongool
+STR_0219_TYCOON_OF_THE_CENTURY                                  :Magnaat van die eeu
 STR_HIGHSCORE_NAME                                              :{BIGFONT}{PLAYERNAME}, {COMPANY}
 STR_HIGHSCORE_STATS                                             :{BIGFONT}'{STRING}'   ({COMMA})
 STR_021B_ACHIEVES_STATUS                                        :{BLACK}{BIGFONT}{COMPANY} behaal '{STRING}' stand!
@@ -668,7 +682,7 @@
 STR_026A_CONSTRUCT_FARM                                         :{BLACK}Bou Plaas
 STR_026B_CONSTRUCT_IRON_ORE_MINE                                :{BLACK}Bou Yster Erts Myn
 STR_026C_CONSTRUCT_OIL_WELLS                                    :{BLACK}Bou Olie Bron
-STR_026D_CONSTRUCT_BANK_CAN_ONLY                                :{BLACK}Bou Bank (kan slegs in stede met 'n populasie grooter as 1200 gebou)
+STR_026D_CONSTRUCT_BANK_CAN_ONLY                                :{BLACK}Bou Bank (kan slegs in stede met 'n populasie grooter as 1200 gebou word)
 STR_026E_CONSTRUCT_PAPER_MILL                                   :{BLACK}Bou Papiermeul
 STR_026F_CONSTRUCT_FOOD_PROCESSING                              :{BLACK}Bou Kos Verwerkings Fabriek
 STR_0270_CONSTRUCT_PRINTING_WORKS                               :{BLACK}Bou Drukwerke
@@ -702,7 +716,7 @@
 STR_028C_PLACE_ROCKY_AREAS_ON_LANDSCAPE                         :{BLACK}Plaas rotse op landerye
 STR_028D_PLACE_LIGHTHOUSE                                       :{BLACK}Plaas vuurtoring
 STR_028E_PLACE_TRANSMITTER                                      :{BLACK}Plaas sender
-STR_028F_DEFINE_DESERT_AREA                                     :{BLACK}Bepaal woestyn ares.{}Druk en hou CTRL om te verwyder
+STR_028F_DEFINE_DESERT_AREA                                     :{BLACK}Bepaal woestyn area.{}Druk en hou CTRL om te verwyder
 STR_CREATE_LAKE                                                 :{BLACK}Bepaal water area.{}Dit sal die omgewing vloed as dit teen seevlak is
 STR_0290_DELETE                                                 :{BLACK}Uitwis
 STR_0291_DELETE_THIS_TOWN_COMPLETELY                            :{BLACK}Uitwis hele stad
@@ -721,9 +735,9 @@
 STR_QUIT_SCENARIO_QUERY                                         :{YELLOW}Is jy seker jy wil die draaiboek verlaat?
 STR_029C_QUIT_EDITOR                                            :{WHITE}Verlaat Redakteur
 STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS                             :{WHITE}...kan slegs in stede met 'n populasie van te minste 1200 gebou word
-STR_029E_MOVE_THE_STARTING_DATE                                 :{BLACK}Beweeg die begin datum terug 1 jaar
-STR_029F_MOVE_THE_STARTING_DATE                                 :{BLACK}Beweeg die begin datum voor 1 jaar
-STR_02A0_ENDS_OF_BRIDGE_MUST_BOTH                               :{WHITE}...altbei einde van brug moet op land wees
+STR_029E_MOVE_THE_STARTING_DATE                                 :{BLACK}Beweeg die begin datum 1 jaar terug
+STR_029F_MOVE_THE_STARTING_DATE                                 :{BLACK}Beweeg die begin datum 1 jaar voor
+STR_02A0_ENDS_OF_BRIDGE_MUST_BOTH                               :{WHITE}...albei einde van brug moet op land wees
 STR_02A1_SMALL                                                  :{BLACK}Klein
 STR_02A2_MEDIUM                                                 :{BLACK}Middel
 STR_02A3_LARGE                                                  :{BLACK}Groot
@@ -731,7 +745,7 @@
 STR_02A5_TOWN_SIZE                                              :{YELLOW}Stad groote:
 
 STR_02B6                                                        :{STRING}  -  {STRING}
-STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS                              :{BLACK}Vertoon laaste boodskap of nuus verslag
+STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS                              :{BLACK}Wys laaste boodskap of nuus verslag
 STR_OFF                                                         :Af
 STR_SUMMARY                                                     :Opsomming
 STR_FULL                                                        :Vol
@@ -749,7 +763,7 @@
 ############ range for menu starts
 STR_02C3_GAME_OPTIONS                                           :Spel opsies
 STR_02C5_DIFFICULTY_SETTINGS                                    :Moeilikheid stellings
-STR_02C7_CONFIG_PATCHES                                         :Skep Stukke
+STR_02C7_CONFIG_PATCHES                                         :Skep stukke
 STR_NEWGRF_SETTINGS                                             :Newgrf stellings
 STR_GAMEOPTMENU_0A                                              :
 STR_02CA_TOWN_NAMES_DISPLAYED                                   :{SETX 12}Stad naame vertoon
@@ -794,7 +808,7 @@
 STR_MEASURING_UNITS_SELECTION                                   :{BLACK}Maatre� eenheide keuse
 STR_02E6_ROAD_VEHICLES                                          :{BLACK}Pad voertuie
 STR_02E7                                                        :{BLACK}{SKIP}{SKIP}{SKIP}{STRING}
-STR_02E8_SELECT_SIDE_OF_ROAD_FOR                                :{BLACK}Selekteer kant van pad waarop voetuie bestuur
+STR_02E8_SELECT_SIDE_OF_ROAD_FOR                                :{BLACK}Kies kant van pad waarop voetuie bestuur
 STR_02E9_DRIVE_ON_LEFT                                          :Bestuur op links
 STR_02EA_DRIVE_ON_RIGHT                                         :Bestuur op regs
 STR_02EB_TOWN_NAMES                                             :{BLACK}Stad naame
@@ -811,7 +825,7 @@
 STR_02FB_START_A_NEW_GAME                                       :{BLACK}Begin nuwe spel
 STR_02FC_LOAD_A_SAVED_GAME                                      :{BLACK}Laai 'n bewaarde spel
 STR_02FE_CREATE_A_CUSTOMIZED_GAME                               :{BLACK}Skep 'n doelgeboude spel wêreld/draaiboek
-STR_02FF_SELECT_SINGLE_PLAYER_GAME                              :{BLACK}Kies enkel-spele spel
+STR_02FF_SELECT_SINGLE_PLAYER_GAME                              :{BLACK}Kies enkel-speler spel
 STR_0300_SELECT_MULTIPLAYER_GAME                                :{BLACK}Kies veelspeler spel met 2-8 spelers
 STR_0301_DISPLAY_GAME_OPTIONS                                   :{BLACK}Vertoon spel opsies
 STR_0302_DISPLAY_DIFFICULTY_OPTIONS                             :{BLACK}Vertoon moeilikheid opsies
@@ -1395,7 +1409,7 @@
 STR_BMPMAP_ERR_IMAGE_TYPE                                       :{WHITE}...kan nie prent tipe verdoel nie.
 
 ##id 0x0800
-STR_0800_COST                                                   :{TINYFONT}{RED}Prys: {CURRENCY}
+STR_0800_COST                                                   :{TINYFONT}{RED}Koste: {CURRENCY}
 STR_0801_COST                                                   :{RED}Koste: {CURRENCY}
 STR_0802_INCOME                                                 :{TINYFONT}{GREEN}Inkome: {CURRENCY}
 STR_0803_INCOME                                                 :{GREEN}Inkome: {CURRENCY}
@@ -1430,7 +1444,7 @@
 STR_100F_CAN_T_BUILD_RAILROAD_STATION                           :{WHITE}Kan nie spoorweg stasie hier bou nie...
 STR_1010_CAN_T_BUILD_SIGNALS_HERE                               :{WHITE}Kan nie seine hier bou nie...
 STR_1011_CAN_T_BUILD_RAILROAD_TRACK                             :{WHITE}Kan nie spoorweg spoor hier bou nie...
-STR_1012_CAN_T_REMOVE_RAILROAD_TRACK                            :{WHITE}Kan nie spoorweg spoor van hier verwyder nie...
+STR_1012_CAN_T_REMOVE_RAILROAD_TRACK                            :{WHITE}Kan nie spoorweg spoor van hier af verwyder nie...
 STR_1013_CAN_T_REMOVE_SIGNALS_FROM                              :{WHITE}Kan nie seine van hier verwyder nie...
 STR_1014_TRAIN_DEPOT_ORIENTATION                                :{WHITE}Trein Depot Ori�tering
 STR_1015_RAILROAD_CONSTRUCTION                                  :Spoorweg konstruksie
@@ -1463,7 +1477,7 @@
 STR_1809_CAN_T_BUILD_TRUCK_STATION                              :{WHITE}Kan nie vraagmotor stasie bou nie...
 STR_180A_ROAD_CONSTRUCTION                                      :Pad konstruksie
 STR_180B_BUILD_ROAD_SECTION                                     :{BLACK}Bou pad afdeling
-STR_180C_BUILD_ROAD_VEHICLE_DEPOT                               :{BLACK}Bou pad voertuig depot (vir bou en diens van voertuie)
+STR_180C_BUILD_ROAD_VEHICLE_DEPOT                               :{BLACK}Bou pad voertuig depot (vir bou en versiening van voertuie)
 STR_180D_BUILD_BUS_STATION                                      :{BLACK}Bou bus stasie
 STR_180E_BUILD_TRUCK_LOADING_BAY                                :{BLACK}Bou vraagmotor laai area
 STR_180F_BUILD_ROAD_BRIDGE                                      :{BLACK}Bou pad brug
@@ -1485,7 +1499,7 @@
 STR_2007_RENAME_TOWN                                            :Hernaam Stad
 STR_2008_CAN_T_RENAME_TOWN                                      :{WHITE}Kan nie stad hernaam nie...
 STR_2009_LOCAL_AUTHORITY_REFUSES                                :{WHITE}{TOWN} plaaslike raad weier om dit te toelaat
-STR_200A_TOWN_NAMES_CLICK_ON_NAME                               :{BLACK}Stad naame - kliek op naam om skerm op stad te senter
+STR_200A_TOWN_NAMES_CLICK_ON_NAME                               :{BLACK}Stad naame - kliek naam om skerm op stad te senter
 STR_200B_CENTER_THE_MAIN_VIEW_ON                                :{BLACK}Senter skerm op stad
 STR_200C_CHANGE_TOWN_NAME                                       :{BLACK}Verander stad naam
 STR_200D_PASSENGERS_LAST_MONTH_MAX                              :{BLACK}Passasiers verlede maand: {ORANGE}{COMMA}{BLACK}  max: {ORANGE}{COMMA}
@@ -1648,11 +1662,11 @@
 STR_3054_SHOW_STATION_RATINGS                                   :{BLACK}Wys stasie graderings
 STR_3055_CHANGE_NAME_OF_STATION                                 :{BLACK}Verander naam van stasie
 STR_3056_SHOW_LIST_OF_ACCEPTED_CARGO                            :{BLACK}Wys lys van aanvaarde vrag
-STR_3057_STATION_NAMES_CLICK_ON                                 :{BLACK}Stasie naame - Kliek op naam om skerm op stasie te senter
+STR_3057_STATION_NAMES_CLICK_ON                                 :{BLACK}Stasie naame - Kliek naam om skerm op stasie te senter
 STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT                            :{BLACK}Kies groote/tipe van lughawe
 STR_305C_0                                                      :{STATION} {STATIONFEATURES}
 STR_305E_RAILROAD_STATION                                       :Spoorweg stasie
-STR_305F_AIRCRAFT_HANGAR                                        :Vlietuig hangar
+STR_305F_AIRCRAFT_HANGAR                                        :Vliegtuig hangar
 STR_3060_AIRPORT                                                :Lughawe
 STR_3061_TRUCK_LOADING_AREA                                     :Vraagmotor laai area
 STR_3062_BUS_STATION                                            :Bus stasie
@@ -1808,7 +1822,7 @@
 STR_5800_OBJECT_IN_THE_WAY                                      :{WHITE}Voorwerp in die pad
 STR_5801_TRANSMITTER                                            :Sender
 STR_5802_LIGHTHOUSE                                             :Vuurtoring
-STR_5803_COMPANY_HEADQUARTERS                                   :Maatskappy Hoofkwartier
+STR_5803_COMPANY_HEADQUARTERS                                   :Maatskappy Hoofkwartiers
 STR_5804_COMPANY_HEADQUARTERS_IN                                :{WHITE}...maatskappy hoofkwartiers in die pad
 STR_5805_COMPANY_OWNED_LAND                                     :Maatskappy-besitte land
 STR_5806_CAN_T_PURCHASE_THIS_LAND                               :{WHITE}Land area kan nie aangekoop word nie...
@@ -1819,6 +1833,34 @@
 ############ These strings may never get a new id, or savegames will break!
 ##id 0x6000
 
+STR_SV_STNAME_CENTRAL                                           :{STRING} Sentraal
+STR_SV_STNAME_TRANSFER                                          :{STRING} Verplaas
+STR_SV_STNAME_HALT                                              :{STRING} Halte
+STR_SV_STNAME_VALLEY                                            :{STRING} Vallei
+STR_SV_STNAME_HEIGHTS                                           :{STRING} Hoogtes
+STR_SV_STNAME_WOODS                                             :{STRING} Woude
+STR_SV_STNAME_LAKESIDE                                          :{STRING} Meerkant
+STR_SV_STNAME_EXCHANGE                                          :{STRING} Wissel
+STR_SV_STNAME_AIRPORT                                           :{STRING} Lughawe
+STR_SV_STNAME_OILFIELD                                          :{STRING} Olieveld
+STR_SV_STNAME_MINES                                             :{STRING} Myne
+STR_SV_STNAME_DOCKS                                             :{STRING} Werfe
+STR_SV_STNAME_BUOY_1                                            :{STRING} Baken 1
+STR_SV_STNAME_BUOY_2                                            :{STRING} Baken 2
+STR_SV_STNAME_BUOY_3                                            :{STRING} Baken 3
+STR_SV_STNAME_BUOY_4                                            :{STRING} Baken 4
+STR_SV_STNAME_BUOY_5                                            :{STRING} Baken 5
+STR_SV_STNAME_BUOY_6                                            :{STRING} Baken 6
+STR_SV_STNAME_BUOY_7                                            :{STRING} Baken 7
+STR_SV_STNAME_BUOY_8                                            :{STRING} Baken 8
+STR_SV_STNAME_BUOY_9                                            :{STRING} Baken 9
+STR_SV_STNAME_ANNEXE                                            :{STRING} Anneks
+STR_SV_STNAME_SIDINGS                                           :{STRING} Wisselspoore
+STR_SV_STNAME_BRANCH                                            :{STRING} Tak
+STR_SV_STNAME_UPPER                                             :Bo {STRING}
+STR_SV_STNAME_LOWER                                             :Laer {STRING}
+STR_SV_STNAME_HELIPORT                                          :{STRING} Helihawe
+STR_SV_STNAME_FOREST                                            :{STRING} Woud
 
 ############ end of savegame specific region!
 
@@ -1865,6 +1907,7 @@
 STR_681D_MEDIUM                                                 :Gemiddel
 STR_681E_FAST                                                   :Vinnig
 STR_681F_VERY_FAST                                              :Baie Vinnig
+STR_VERY_LOW                                                    :Baie Laag
 STR_6820_LOW                                                    :Laag
 STR_6821_MEDIUM                                                 :Gemiddel
 STR_6822_HIGH                                                   :Hoog
@@ -1954,7 +1997,10 @@
 STR_7037_PRESIDENT                                              :{WHITE}{PLAYERNAME}{}{GOLD}(Bestuurder)
 STR_7038_INAUGURATED                                            :{GOLD}Bevestig: {WHITE}{NUM}
 STR_7039_VEHICLES                                               :{GOLD}Voertuie
+STR_TRAINS                                                      :{WHITE}{COMMA} trein{P "" e}
+STR_ROAD_VEHICLES                                               :{WHITE}{COMMA} pad voertui{P g e}
 STR_AIRCRAFT                                                    :{WHITE}{COMMA} vliegtuig
+STR_SHIPS                                                       :{WHITE}{COMMA} sk{P ip epe}
 STR_7042_NONE                                                   :{WHITE}Geen
 STR_7043_FACE_SELECTION                                         :{WHITE}Gesig Keuse
 STR_7044_MALE                                                   :{BLACK}Manlik
@@ -2001,10 +2047,13 @@
 STR_706D_PRESIDENT                                              :President
 STR_706F_BUILD_HQ                                               :{BLACK}Bou HK
 STR_7070_BUILD_COMPANY_HEADQUARTERS                             :{BLACK}Bou maatskappy hoofkwartiers / wys maatskappy hoofkwartiers
+STR_RELOCATE_COMPANY_HEADQUARTERS                               :{BLACK}Herbou maatskappy hoofkwartiers elders vir 1% koste van maatskappy waarde
 STR_7071_CAN_T_BUILD_COMPANY_HEADQUARTERS                       :{WHITE}Maatskappy hoofkwartiers kan nie hier gebou word nie...
 STR_7072_VIEW_HQ                                                :{BLACK}Wys HK
+STR_RELOCATE_HQ                                                 :{BLACK}Beweeg HQ
 STR_COMPANY_PASSWORD                                            :{BLACK}Wagwoord
 STR_COMPANY_PASSWORD_TOOLTIP                                    :{BLACK}Wagwoord-beskerm jou maatskappy om onmagtig gebruikers te belet van verbinding
+STR_SET_COMPANY_PASSWORD                                        :Stel maatskappy wagwoord
 STR_7073_WORLD_RECESSION_FINANCIAL                              :{BIGFONT}{BLACK}W�eld Insinking!{}{}Finansieel eksperte vrees ergste as ekconomie inmekaar sak!
 STR_7074_RECESSION_OVER_UPTURN_IN                               :{BIGFONT}{BLACK}Insinking Oor!{}{}Oplewing in sake gee vertroue na nywerheide as ekonomie versterk!
 STR_7075_TOGGLE_LARGE_SMALL_WINDOW                              :{BLACK}Skakel groot/klein venster groote
@@ -2320,8 +2369,8 @@
 STR_8801_CITIZENS_CELEBRATE_FIRST                               :{BLACK}{BIGFONT}Burgers herdenk . . .{}Eerste trein arriveer by {STATION}!
 STR_8802_DETAILS                                                :{WHITE}{STRING} (Aanwyse)
 STR_8803_TRAIN_IN_THE_WAY                                       :{WHITE}Trein in die pad
-STR_8804                                                        :{SETX 10}{COMMA}: {STRING}
-STR_8805                                                        :{RIGHTARROW}{SETX 10}{COMMA}: {STRING}
+STR_8804                                                        :{SETX 10}{COMMA}: {STRING} {STRING}
+STR_8805                                                        :{RIGHTARROW}{SETX 10}{COMMA}: {STRING} {STRING}
 STR_8806_GO_TO                                                  :Gaan na {STATION}
 STR_8807_GO_TO_TRANSFER                                         :Gaan na {STATION} (Oordrag en vat vrag)
 STR_8808_GO_TO_UNLOAD                                           :Gaan na {STATION} (Aflaai)
@@ -2335,7 +2384,9 @@
 STR_8810_GO_NON_STOP_TO_LOAD                                    :Gaan deurgaande na {STATION} (Laai)
 STR_8811_GO_TO_NON_STOP_TRANSFER_LOAD                           :Gaan deurgaande na {STATION} (Oordrag en wag vir volle lading)
 STR_GO_TO_TRAIN_DEPOT                                           :Gaan na {TOWN} Trein Depot
+STR_SERVICE_AT_TRAIN_DEPOT                                      :Diens by {TOWN} Trein Depot
 STR_880F_GO_NON_STOP_TO_TRAIN_DEPOT                             :Gaan deurgaande na {TOWN} Trein Depot
+STR_SERVICE_NON_STOP_AT_TRAIN_DEPOT                             :Diens deurgaande by {TOWN} Trein Depot
 
 STR_HEADING_FOR_TRAIN_DEPOT                                     :{ORANGE}Op pad na {TOWN} Trein Depot
 STR_HEADING_FOR_TRAIN_DEPOT_VEL                                 :{ORANGE}Op pad na {TOWN} Trein Depot, {VELOCITY}
@@ -2344,6 +2395,7 @@
 
 STR_INVALID_ORDER                                               :{RED} (Swak Opdrag)
 
+STR_UNKNOWN_DESTINATION                                         :onbekende destinasie
 STR_8812_EMPTY                                                  :{LTBLUE}Leeg
 STR_8813_FROM                                                   :{LTBLUE}{CARGO} vanaf {STATION}
 STR_FROM_MULT                                                   :{LTBLUE}{CARGO} van {STATION} (x{NUM})
@@ -2374,14 +2426,19 @@
 STR_8826_GO_TO                                                  :{BLACK}Gaan Na
 STR_8827_FULL_LOAD                                              :{BLACK}Volle Lading
 STR_8828_UNLOAD                                                 :{BLACK}Aflaai
+STR_REFIT                                                       :{BLACK}Herpas
+STR_REFIT_TIP                                                   :{BLACK}Kies watter vrag tipe te herpas na in die opdraag. CTRL-kliek om herpas instruksie te verwyder
+STR_REFIT_ORDER                                                 :(Herpas na {STRING})
 STR_8829_ORDERS                                                 :{WHITE}{VEHICLE} (Opdrae)
 STR_882A_END_OF_ORDERS                                          :{SETX 10}- - Einde van Opdrae - -
 STR_FULLLOAD_OR_SERVICE                                         :{SKIP}{SKIP}{STRING}
+STR_SERVICE                                                     :{BLACK}Diens
 STR_882B_CAN_T_BUILD_RAILROAD_VEHICLE                           :{WHITE}Kan nie spoorweg voertuig bou nie...
 STR_882C_BUILT_VALUE                                            :{LTBLUE}{STRING}{BLACK}   Gebou: {LTBLUE}{NUM}{BLACK} Waarde: {LTBLUE}{CURRENCY}
 STR_882D_VALUE                                                  :{LTBLUE}{STRING}{BLACK}   Waarde: {LTBLUE}{CURRENCY}
 STR_882E                                                        :{WHITE}{VEHICLE}
 STR_882F_LOADING_UNLOADING                                      :{LTBLUE}Laai / Aflaai
+STR_TRAIN_MUST_BE_STOPPED                                       :{WHITE}Trein moet binne in 'n depot gestop word
 STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT                              :{WHITE}Kan nie trein na depot stuur nie...
 STR_8831_NO_MORE_SPACE_FOR_ORDERS                               :{WHITE}Geen spasie vir nog opdrae
 STR_8832_TOO_MANY_ORDERS                                        :{WHITE}Te veel opdrae
@@ -2394,6 +2451,7 @@
 STR_883A_UNABLE_TO_FIND_ROUTE_TO                                :{WHITE}Kan nie roete na plaaslike depot vind nie
 STR_883B_CAN_T_STOP_START_TRAIN                                 :{WHITE}Trein kan nie stop/aanvang word nie...
 STR_883C_SERVICING_INTERVAL_DAYS                                :{BLACK}Diens tussentyd: {LTBLUE}{COMMA}dae{BLACK}   Laaste diens: {LTBLUE}{DATE_LONG}
+STR_SERVICING_INTERVAL_PERCENT                                  :{BLACK}Versiens tussentyd: {LTBLUE}{COMMA}%{BLACK}   Laaste versiening: {LTBLUE}{DATE_LONG}
 STR_883D_TRAINS_CLICK_ON_TRAIN_FOR                              :{BLACK}Treine - kliek op trein vir inligting
 STR_883E_BUILD_NEW_TRAINS_REQUIRES                              :{BLACK}Bou nuwe treine (vereis trein depot)
 STR_883F_TRAINS_CLICK_ON_TRAIN_FOR                              :{BLACK}Treine - kliek op trein vir info., sleep voertuig om te bysit/verwyder van trein
@@ -2423,10 +2481,12 @@
 STR_8856_INSERT_A_NEW_ORDER_BEFORE                              :{BLACK}Invoeg 'n nuwe opdrag voor die beklemtoonde opdrag, of byvoeg na einde van lys
 STR_8857_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Maak die beklemtoonde opdrag dwing die voertuig om vir 'n volle lading te wag
 STR_8858_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Maak die beklemtoonde opdrag dwing die voertuig te aflaai
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Nuwe {STRING} nou beskikbaar!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
+STR_SERVICE_HINT                                                :{BLACK}Sprong die opdraag tensy 'n versiening nodig is
+STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Koste: {CURRENCY} Gewig: {WEIGHT_S}{}Spoed: {VELOCITY}  Krag: {POWER}{}Loopkoste: {CURRENCY}/jr{}Kapasitiet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Oponthoud
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Ouderdom: {LTBLUE}{STRING}{BLACK}   Loopkoste: {LTBLUE}{CURRENCY}/Jr
+STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED                         :{BLACK}Gewig: {LTBLUE}{WEIGHT_S}  {BLACK}Krag: {LTBLUE}{POWER}{BLACK} Max. spoed: {LTBLUE}{VELOCITY}
+STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE                  :{BLACK}Gewig: {LTBLUE}{WEIGHT_S} {BLACK}Krag: {LTBLUE}{POWER}{BLACK} Max. spoed: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE}
 STR_885F_PROFIT_THIS_YEAR_LAST_YEAR                             :{BLACK}Profyt die jaar: {LTBLUE}{CURRENCY}  (verlede jaar: {CURRENCY})
 STR_8860_RELIABILITY_BREAKDOWNS                                 :{BLACK}Deeglikheid: {LTBLUE}{COMMA}%  {BLACK}Oponthoude sedert laaste diens: {LTBLUE}{COMMA}
 STR_8861_STOPPED                                                :{RED}Gestop
@@ -2443,7 +2503,10 @@
 STR_886D_MAKE_THE_HIGHLIGHTED_ORDER                             :{BLACK}Maak die beklemtoonde opdrag dwing die voertuig om sy vrag te stort
 STR_886F_TRANSFER                                               :{BLACK}Oordrag
 
+STR_TRAIN_STOPPING                                              :{RED}Ophou
+STR_TRAIN_STOPPING_VEL                                          :{RED}Ophou, {VELOCITY}
 STR_INCOMPATIBLE_RAIL_TYPES                                     :Onbestaaanbaar spoor tipes
+STR_TRAIN_NO_POWER                                              :{RED}Geen Krag
 
 ##id 0x9000
 STR_9000_ROAD_VEHICLE_IN_THE_WAY                                :{WHITE}Pad voertuig in die pad
@@ -2485,8 +2548,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Senter skerm op pad voertuig depot
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Pad voertuig keuse lys - kliek op voertuig vir inligting
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Bou die beklemtoonde pad voertuig
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Nuwe pad voertuig nou beskikbaar!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Koste: {CURRENCY}{}Spoed: {VELOCITY}{}Loopkoste: {CURRENCY}/yr{}Kapasitiet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Benaam pad voertuig
@@ -2503,7 +2564,11 @@
 STR_9036_RENAME_ROAD_VEHICLE_TYPE                               :{WHITE}Hernaam pad voertuig tipe
 STR_9037_CAN_T_RENAME_ROAD_VEHICLE                              :{WHITE}Pad voertuig tipe kan nie hernaam word nie...
 STR_9038_GO_TO_ROADVEH_DEPOT                                    :Gaan na {TOWN} Pad Voertuig Depot
+STR_SERVICE_AT_ROADVEH_DEPOT                                    :Versien by {TOWN} Pad Voertuig Depot
 
+STR_REFIT_ROAD_VEHICLE_TO_CARRY                                 :{BLACK}Herpas pad voertuig om 'n ander vrag tipe te ontvoer
+STR_REFIT_ROAD_VEHICLE                                          :{BLACK}Herpas pad voertuig
+STR_REFIT_ROAD_VEHICLE_TO_CARRY_HIGHLIGHTED                     :{BLACK}Herpas pad voertuig om beklemtoonde vrat tipe te ontvoer
 
 ##id 0x9800
 STR_9800_DOCK_CONSTRUCTION                                      :Werf konstruksie
@@ -2552,8 +2617,6 @@
 STR_9829_CENTER_MAIN_VIEW_ON_SHIP                               :{BLACK}Senter skerm op skip
 STR_982A_SEND_SHIP_TO_DEPOT                                     :{BLACK}Stuur skip na depot
 STR_982B_SHOW_SHIP_DETAILS                                      :{BLACK}Wys skip se aanwyse
-STR_982C_NEW_SHIP_NOW_AVAILABLE                                 :{BLACK}{BIGFONT}Nuwe skip nou beskikbaar!
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_982E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koste: {CURRENCY} Max. Spoed: {VELOCITY}{}Kapasitiet: {CARGO}{}Loopkoste: {CURRENCY}/yr
 STR_982F_NAME_SHIP                                              :{BLACK}Benaam skip
 
@@ -2626,8 +2689,6 @@
 STR_A029_CENTER_MAIN_VIEW_ON_AIRCRAFT                           :{BLACK}Senter skerm op vliegtuig
 STR_A02A_SEND_AIRCRAFT_TO_HANGAR                                :{BLACK}Stuur vliegtuig na hangar. CTRL+kliek sal net diens
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Wys vliegtuig aanwyse
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Nuwe vliegtuig nou beskikbaar!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 STR_A02E_COST_MAX_SPEED_CAPACITY                                :{BLACK}Koste: {CURRENCY} Max. Spoed: {VELOCITY}{}Kapasiteit: {COMMA} passasiers, {COMMA} sakke van pos{}Loopkoste: {CURRENCY}/Jr
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Benaam vliegtuig
@@ -2698,6 +2759,7 @@
 
 
 
+
 STR_CURRENCY_WINDOW                                             :{WHITE}Gewoonte koers
 STR_CURRENCY_EXCHANGE_RATE                                      :{LTBLUE}Wisselkoers: {ORANGE}{CURRENCY} =  {COMMA}
 STR_CURRENCY_SEPARATOR                                          :{LTBLUE}Afskeier
@@ -2811,4 +2873,6 @@
 STR_MEASURE_LENGTH_HEIGHTDIFF                                   :{BLACK}Lengte: {NUM}{}Hoogte verskil: {NUM} m
 STR_MEASURE_AREA_HEIGHTDIFF                                     :{BLACK}Area: {NUM} x {NUM}{}Hoogte verskil: {NUM} m
 
+############ Date formatting
+
 ########
--- a/src/lang/unfinished/croatian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/unfinished/croatian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -2398,8 +2398,6 @@
 STR_8853_SKIP_THE_CURRENT_ORDER                                 :{BLACK}PreskoÄi trenutnu naredbu i poÄni sa sljedećom
 STR_8854_DELETE_THE_HIGHLIGHTED                                 :{BLACK}ObriÅ¡i oznaÄenu naredbu
 STR_SERVICE_HINT                                                :{BLACK}PreskoÄi ovu narudžbu osim ako servis nije potreban
-STR_8859_NEW_NOW_AVAILABLE                                      :{BLACK}{BIGFONT}Novi {STRING} od sada dostupan!
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_VEHICLE_INFO_COST_WEIGHT_SPEED_POWER                        :{BLACK}Trošak: {CURRENCY} Težina: {WEIGHT_S}{}Brzina: {VELOCITY} Snaga: {POWER}{}Troškovi održavanja: {CURRENCY}/god{}Kapacitet: {CARGO}
 STR_885C_BROKEN_DOWN                                            :{RED}Pokvaren
 STR_885D_AGE_RUNNING_COST_YR                                    :{BLACK}Starost: {LTBLUE}{STRING}{BLACK}   Troškovi uporabe: {LTBLUE}{CURRENCY}/god
@@ -2459,8 +2457,6 @@
 STR_9025_CENTER_MAIN_VIEW_ON_ROAD                               :{BLACK}Centriraj glavni pogled na lokaciju spremišta cestovnih vozila
 STR_9026_ROAD_VEHICLE_SELECTION                                 :{BLACK}Popis cestovnih vozila - klikni na vozilo za informacije
 STR_9027_BUILD_THE_HIGHLIGHTED_ROAD                             :{BLACK}Izgradi oznaÄeno cestovno vozilo
-STR_9028_NEW_ROAD_VEHICLE_NOW_AVAILABLE                         :{BLACK}{BIGFONT}Novo cestovno vozilo od sada dostupno!
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Trošak: {CURRENCY}{}Brzina: {VELOCITY}{}Trošak uporabe: {CURRENCY}/god{}Kapacitet: {CARGO}
 
 STR_902C_NAME_ROAD_VEHICLE                                      :{WHITE}Imenuj cestovno vozilo
@@ -2572,8 +2568,6 @@
 STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT                         :{BLACK}Izgradi oznaÄeni zrakoplov
 STR_A028_SHOW_AIRCRAFT_S_ORDERS                                 :{BLACK}Prikaži naredbe zrakoplova
 STR_A02B_SHOW_AIRCRAFT_DETAILS                                  :{BLACK}Prikaži detalje zrakoplova
-STR_A02C_NEW_AIRCRAFT_NOW_AVAILABLE                             :{BLACK}{BIGFONT}Novi zrakoplov od sada dostupan!
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 
 STR_A030_NAME_AIRCRAFT                                          :{WHITE}Imenuj zrakoplov
 STR_A031_CAN_T_NAME_AIRCRAFT                                    :{WHITE}Ne mogu imenovati zrakoplov...
--- a/src/lang/unfinished/latvian.txt	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lang/unfinished/latvian.txt	Sun Mar 04 04:25:36 2007 +0000
@@ -1382,7 +1382,6 @@
 STR_SERVICE                                                     :{BLACK}Serviss
 STR_882E                                                        :{WHITE}{VEHICLE}
 STR_TRAIN_MUST_BE_STOPPED                                       :{WHITE}Vilciens ja'apsta'dina kad tas ierodas depo
-STR_885A                                                        :{BLACK}{BIGFONT}{STRING}
 STR_8861_STOPPED                                                :{RED}Stoppets
 
 STR_8865_NAME_TRAIN                                             :{WHITE}Nosaukt vilcienu
@@ -1394,7 +1393,6 @@
 ##id 0x9000
 STR_9002                                                        :{WHITE}{VEHICLE}
 STR_9012_CAPACITY                                               :{BLACK}Capacitâte: {LTBLUE}{CARGO}
-STR_9029                                                        :{BLACK}{BIGFONT}{STRING}
 STR_902A_COST_SPEED_RUNNING_COST                                :{BLACK}Cena: {CURRENCY}{}Atrums: {VELOCITY}{}Running Cost: {CURRENCY}/yr{}Capacity: {CARGO}
 
 STR_9034_RENAME                                                 :{BLACK}Pârsaukt
@@ -1403,13 +1401,11 @@
 STR_9805_SHIPS                                                  :{WHITE}{COMPANY} - {COMMA} Kuìi
 STR_980F                                                        :{WHITE}{VEHICLE}
 STR_9820_BUILD_NEW_SHIP                                         :{BLACK}Uzbûvet jauno kuìi
-STR_982D                                                        :{BLACK}{BIGFONT}{STRING}
 
 STR_9836_RENAME                                                 :{BLACK}Pârsaukt
 
 ##id 0xA000
 STR_A00A                                                        :{WHITE}{VEHICLE}
-STR_A02D                                                        :{BLACK}{BIGFONT}{STRING}
 
 STR_PLANE_CRASH_OUT_OF_FUEL                                     :{BLACK}{BIGFONT}Lidmaðînas avârija!{}Lidmaðînai pietrûka degviela, {COMMA} nogalinâti!
 STR_A036                                                        :{TINYFONT}{BLACK}{STATION}
--- a/src/livery.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/livery.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file livery.h */
+
 #ifndef LIVERY_H
 #define LIVERY_H
 
--- a/src/lzoconf.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/lzoconf.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-/* lzoconf.h -- configuration for the LZO real-time data compression library
+/** @file lzoconf.h -- configuration for the LZO real-time data compression library
 
    This file is part of the LZO real-time data compression library.
 
--- a/src/macros.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/macros.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,13 +1,15 @@
 /* $Id$ */
 
+/** @file macros.h */
+
 #ifndef MACROS_H
 #define MACROS_H
 
-/// Fetch n bits starting at bit s from x
+/* Fetch n bits starting at bit s from x */
 #define GB(x, s, n) (((x) >> (s)) & ((1U << (n)) - 1))
-/// Set n bits starting at bit s in x to d
+/* Set n bits starting at bit s in x to d */
 #define SB(x, s, n, d) ((x) = ((x) & ~(((1U << (n)) - 1) << (s))) | ((d) << (s)))
-/// Add i to the n bits starting at bit s in x
+/* Add i to the n bits starting at bit s in x */
 #define AB(x, s, n, i) ((x) = ((x) & ~(((1U << (n)) - 1) << (s))) | (((x) + ((i) << (s))) & (((1U << (n)) - 1) << (s))))
 
 #ifdef min
@@ -79,7 +81,7 @@
 }
 
 
-// checking more bits. Maybe unneccessary, but easy to use
+/* checking more bits. Maybe unneccessary, but easy to use */
 #define HASBITS(x,y) ((x) & (y))
 #define SETBITS(x,y) ((x) |= (y))
 #define CLRBITS(x,y) ((x) &= ~(y))
--- a/src/main_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/main_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file main_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "heightmap.h"
@@ -60,25 +62,25 @@
 	_cmd_text = str;
 
 	switch (_rename_what) {
-	case 0: /* Rename a s sign, if string is empty, delete sign */
+	case 0: // Rename a s sign, if string is empty, delete sign
 		DoCommandP(0, id, 0, NULL, CMD_RENAME_SIGN | CMD_MSG(STR_280C_CAN_T_CHANGE_SIGN_NAME));
 		break;
-	case 1: /* Rename a waypoint */
+	case 1: // Rename a waypoint
 		if (*str == '\0') return;
 		DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME));
 		break;
 #ifdef ENABLE_NETWORK
-	case 3: { /* Give money, you can only give money in excess of loan */
+	case 3: { // Give money, you can only give money in excess of loan
 		const Player *p = GetPlayer(_current_player);
 		int32 money = min(p->money64 - p->current_loan, atoi(str) / _currency->rate);
 		char msg[20];
 
 		money = clamp(money, 0, 20000000); // Clamp between 20 million and 0
 
-		// Give 'id' the money, and substract it from ourself
+		/* Give 'id' the money, and substract it from ourself */
 		if (!DoCommandP(0, money, id, NULL, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS))) break;
 
-		// Inform the player of this action
+		/* Inform the player of this action */
 		snprintf(msg, sizeof(msg), "%d", money);
 
 		if (!_network_server) {
@@ -103,7 +105,6 @@
  * @param cursor How should the cursor image change? E.g. cursor with depot image in it
  * @param mode Tile highlighting mode, e.g. drawing a rectangle or a dot on the ground
  * @param placeproc Procedure which will be called when someone clicks on the map
-
  * @return true if the button is clicked, false if it's unclicked
  */
 bool HandlePlacePushButton(BaseWindow *w, int widget, CursorID cursor, int mode, PlaceProc *placeproc)
@@ -526,7 +527,7 @@
 {
 	byte num = ActivePlayerCount();
 
-	// Increase one to fit in PlayerList in the menu when in network
+	/* Increase one to fit in PlayerList in the menu when in network */
 	if (_networking && WP(w,menu_d).main_button == 9) num++;
 
 	if (WP(w,menu_d).item_count != num) {
@@ -556,7 +557,7 @@
 		sel = WP(w,menu_d).sel_index;
 		chk = WP(w,menu_d).checked_items; // let this mean gray items.
 
-		// 9 = playerlist
+		/* 9 = playerlist */
 		if (_networking && WP(w,menu_d).main_button == 9) {
 			if (sel == 0) {
 				GfxFillRect(x, y, x + 238, y + 9, 0);
@@ -601,8 +602,8 @@
 		int index = w->GetMenuItemIndex(e->we.popupmenu.pt.x, e->we.popupmenu.pt.y);
 		int action_id = WP(w,menu_d).action_id;
 
-		// We have a new entry at the top of the list of menu 9 when networking
-		//  so keep that in count
+		/* We have a new entry at the top of the list of menu 9 when networking
+		 *  so keep that in count */
 		if (_networking && WP(w,menu_d).main_button == 9) {
 			if (index > 0) index = GetPlayerIndexFromMenu(index - 1) + 1;
 		} else {
@@ -628,8 +629,8 @@
 		UpdatePlayerMenuHeight(w);
 		index = w->GetMenuItemIndex(e->we.popupmenu.pt.x, e->we.popupmenu.pt.y);
 
-		// We have a new entry at the top of the list of menu 9 when networking
-		//  so keep that in count
+		/* We have a new entry at the top of the list of menu 9 when networking
+		 * so keep that in count */
 		if (_networking && WP(w,menu_d).main_button == 9) {
 			if (index > 0) index = GetPlayerIndexFromMenu(index - 1) + 1;
 		} else {
@@ -973,7 +974,7 @@
 
 static void ToolbarScenDateBackward(BaseWindow *w)
 {
-	// don't allow too fast scrolling
+	/* don't allow too fast scrolling */
 	if (w->autorepeat_timeout <= 2) {
 		w->HandleButtonClick(6);
 		w->SetDirty();
@@ -986,7 +987,7 @@
 
 static void ToolbarScenDateForward(BaseWindow *w)
 {
-	// don't allow too fast scrolling
+	/* don't allow too fast scrolling */
 	if (w->autorepeat_timeout <= 2) {
 		w->HandleButtonClick(7);
 		w->SetDirty();
@@ -1041,12 +1042,12 @@
 	}
 }
 
-// TODO - Incorporate into game itself to allow for ingame raising/lowering of
-// larger chunks at the same time OR remove altogether, as we have 'level land' ?
 /**
  * Raise/Lower a bigger chunk of land at the same time in the editor. When
  * raising get the lowest point, when lowering the highest point, and set all
  * tiles in the selection to that height.
+ * @todo : Incorporate into game itself to allow for ingame raising/lowering of
+ *         larger chunks at the same time OR remove altogether, as we have 'level land' ?
  * @param tile The top-left tile where the terraforming will start
  * @param mode 1 for raising, 0 for lowering land
  */
@@ -1066,7 +1067,7 @@
 		SndPlayTileFx(SND_1F_SPLAT, tile);
 
 		assert(_terraform_size != 0);
-		// check out for map overflows
+		/* check out for map overflows */
 		sizex = min(MapSizeX() - TileX(tile) - 1, _terraform_size);
 		sizey = min(MapSizeY() - TileY(tile) - 1, _terraform_size);
 
@@ -1174,8 +1175,10 @@
 	{-28,  0}, {-24, -2}, {-20, -4}, {-16, -6}, {-12, -8}, { -8,-10}, { -4,-12}, {  0,-14}, {  4,-12}, {  8,-10}, { 12, -8}, { 16, -6}, { 20, -4}, { 24, -2}, { 28,  0},
 };
 
-// TODO - Merge with terraform_gui.c (move there) after I have cooled down at its braindeadness
-// and changed OnButtonClick to include the widget as well in the function decleration. Post 0.4.0 - Darkvater
+/**
+ * @todo Merge with terraform_gui.cpp (move there) after I have cooled down at its braindeadness
+ * and changed OnButtonClick to include the widget as well in the function declaration. Post 0.4.0 - Darkvater
+ */
 static void EditorTerraformClick_Dynamite(BaseWindow *w)
 {
 	HandlePlacePushButton(w, 4, ANIMCURSOR_DEMOLISH, 1, PlaceProc_DemolishArea);
@@ -1271,7 +1274,7 @@
 {
 	switch (e->event) {
 	case WE_CREATE:
-		// XXX - lighthouse button is widget 10!! Don't forget when changing
+		/* XXX - lighthouse button is widget 10!! Don't forget when changing */
 		w->widget[10].tooltips = (_opt.landscape == LT_DESERT) ? STR_028F_DEFINE_DESERT_AREA : STR_028D_PLACE_LIGHTHOUSE;
 		break;
 
@@ -1311,7 +1314,7 @@
 		case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11:
 			_editor_terraform_button_proc[e->we.click.widget - 4](w);
 			break;
-		case 12: case 13: { /* Increase/Decrease terraform size */
+		case 12: case 13: { // Increase/Decrease terraform size
 			int size = (e->we.click.widget == 12) ? 1 : -1;
 			w->HandleButtonClick(e->we.click.widget);
 			size += _terraform_size;
@@ -1322,11 +1325,11 @@
 			SndPlayFx(SND_15_BEEP);
 			w->SetDirty();
 		} break;
-		case 14: /* gen random land */
+		case 14: // gen random land
 			w->HandleButtonClick(14);
 			ShowCreateScenario();
 			break;
-		case 15: /* Reset landscape */
+		case 15: // Reset landscape
 			ShowQuery(
 			  STR_022C_RESET_LANDSCAPE,
 			  STR_RESET_LANDSCAPE_CONFIRMATION_TEXT,
@@ -1431,10 +1434,10 @@
 
 	case WE_CLICK:
 		switch (e->we.click.widget) {
-		case 4: /* new town */
+		case 4: // new town
 			HandlePlacePushButton(w, 4, SPR_CURSOR_TOWN, 1, PlaceProc_Town);
 			break;
-		case 5: {/* random town */
+		case 5: {// random town
 			Town *t;
 
 			w->HandleButtonClick(5);
@@ -1450,7 +1453,7 @@
 
 			break;
 		}
-		case 6: {/* many random towns */
+		case 6: {// many random towns
 			w->HandleButtonClick(6);
 
 			_generating_world = true;
@@ -1605,7 +1608,7 @@
  * Search callback function for TryBuildIndustry
  * @param tile to test
  * @param data that is passed by the caller.  In this case, the type of industry been tested
- * @result of the operation
+ * @return the success (or not) of the operation
  */
 static bool SearchTileForIndustry(TileIndex tile, uint32 data)
 {
@@ -1617,6 +1620,7 @@
  * in order to find a suitable zone to create the desired industry
  * @param tile to start search for
  * @param type of the desired industry
+ * @return the success (or not) of the operation
  */
 static bool TryBuildIndustry(TileIndex tile, int type)
 {
@@ -1665,7 +1669,7 @@
 	case WE_PLACE_OBJ: {
 		int type;
 
-		// Show error if no town exists at all
+		/* Show error if no town exists at all */
 		type = _industry_type_to_place;
 		if (!AnyTownExists()) {
 			SetDParam(0, GetIndustrySpec(type)->name);
@@ -1804,7 +1808,7 @@
 {
 	switch (e->event) {
 	case WE_PAINT:
-		// Draw brown-red toolbar bg.
+		/* Draw brown-red toolbar bg. */
 		GfxFillRect(0, 0, w->Width() - 1, w->Height() - 1, 0xB2);
 		GfxFillRect(0, 0, w->Width() - 1, w->Height() - 1, 0xB4 | (1 << PALETTE_MODIFIER_GREYOUT));
 
@@ -2017,7 +2021,7 @@
 		w->SetWidgetDisabledState(6, _patches_newgame.starting_year <= MIN_YEAR);
 		w->SetWidgetDisabledState(7, _patches_newgame.starting_year >= MAX_YEAR);
 
-		// Draw brown-red toolbar bg.
+		/* Draw brown-red toolbar bg. */
 		GfxFillRect(0, 0, w->Width() - 1, w->Height() - 1, 0xB2);
 		GfxFillRect(0, 0, w->Width() - 1, w->Height() - 1, 0xB4 | (1 << PALETTE_MODIFIER_GREYOUT));
 
@@ -2155,12 +2159,12 @@
 		);
 
 		if (p != NULL) {
-			// Draw player money
+			/* Draw player money */
 			SetDParam64(0, p->money64);
 			DrawStringCentered(570, 1, p->player_money >= 0 ? STR_0004 : STR_0005, 0);
 		}
 
-		// Draw status bar
+		/* Draw status bar */
 		if (w->message.msg) { // true when saving is active
 			DrawStringCentered(320, 1, STR_SAVING_GAME, 0);
 		} else if (_do_autosave) {
@@ -2168,12 +2172,12 @@
 		} else if (_pause) {
 			DrawStringCentered(320, 1, STR_0319_PAUSED, 0);
 		} else if (WP(w,def_d).data_1 > -1280 && BaseWindow::FindById(WC_NEWS_WINDOW,0) == NULL && _statusbar_news_item.string_id != 0) {
-			// Draw the scrolling news text
+			/* Draw the scrolling news text */
 			if (!DrawScrollingStatusText(&_statusbar_news_item, WP(w,def_d).data_1))
 				WP(w,def_d).data_1 = -1280;
 		} else {
 			if (p != NULL) {
-				// This is the default text
+				/* This is the default text */
 				SetDParam(0, p->name_1);
 				SetDParam(1, p->name_2);
 				DrawStringCentered(320, 1, STR_02BA, 0);
@@ -2199,12 +2203,12 @@
 	case WE_TICK: {
 		if (_pause) return;
 
-		if (WP(w, def_d).data_1 > -1280) { /* Scrolling text */
+		if (WP(w, def_d).data_1 > -1280) { // Scrolling text
 			WP(w, def_d).data_1 -= 2;
 			w->InvalidateWidget(1);
 		}
 
-		if (WP(w, def_d).data_2 > 0) { /* Red blot to show there are new unread newsmessages */
+		if (WP(w, def_d).data_2 > 0) { // Red blot to show there are new unread newsmessages
 			WP(w, def_d).data_2 -= 2;
 		} else if (WP(w, def_d).data_2 < 0) {
 			WP(w, def_d).data_2 = 0;
@@ -2311,17 +2315,17 @@
 			case 'R' | WKC_CTRL: MarkWholeScreenDirty(); break;
 
 #if defined(_DEBUG)
-			case '0' | WKC_ALT: /* Crash the game */
+			case '0' | WKC_ALT: // Crash the game
 				*(byte*)0 = 0;
 				break;
 
-			case '1' | WKC_ALT: /* Gimme money */
+			case '1' | WKC_ALT: // Gimme money
 				/* Server can not cheat in advertise mode either! */
 				if (!_networking || !_network_server || !_network_advertise)
 					DoCommandP(0, 10000000, 0, NULL, CMD_MONEY_CHEAT);
 				break;
 
-			case '2' | WKC_ALT: /* Update the coordinates of all station signs */
+			case '2' | WKC_ALT: // Update the coordinates of all station signs
 				UpdateAllStationVirtCoord();
 				break;
 #endif
@@ -2418,7 +2422,7 @@
 	w = BaseWindow::Allocate(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL);
 	AssignWindowViewport(w, 0, 0, width, height, TileXY(32, 32), 0);
 
-	// XXX: these are not done
+	/* XXX: these are not done */
 	switch (_game_mode) {
 		default: NOT_REACHED();
 		case GM_MENU:
--- a/src/map.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/map.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file map.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "debug.h"
@@ -25,8 +27,8 @@
 
 void AllocateMap(uint size_x, uint size_y)
 {
-	// Make sure that the map size is within the limits and that
-	// the x axis size is a power of 2.
+	/* Make sure that the map size is within the limits and that
+	 * the x axis size is a power of 2. */
 	if (size_x < 64 || size_x > 2048 ||
 			size_y < 64 || size_y > 2048 ||
 			(size_x&(size_x-1)) != 0 ||
@@ -44,7 +46,7 @@
 	free(_m);
 	_m = CallocT<Tile>(_map_size);
 
-	// XXX TODO handle memory shortage more gracefully
+	/* XXX TODO handle memory shortage more gracefully */
 	if (_m == NULL) error("Failed to allocate memory for the map");
 }
 
@@ -86,36 +88,36 @@
 
 uint ScaleByMapSize(uint n)
 {
-	// First shift by 12 to prevent integer overflow for large values of n.
-	// >>12 is safe since the min mapsize is 64x64
-	// Add (1<<4)-1 to round upwards.
+	/* First shift by 12 to prevent integer overflow for large values of n.
+	 * >>12 is safe since the min mapsize is 64x64
+	 * Add (1<<4)-1 to round upwards. */
 	return (n * (MapSize() >> 12) + (1<<4) - 1) >> 4;
 }
 
 
-// Scale relative to the circumference of the map
+/* Scale relative to the circumference of the map */
 uint ScaleByMapSize1D(uint n)
 {
-	// Normal circumference for the X+Y is 256+256 = 1<<9
-	// Note, not actually taking the full circumference into account,
-	// just half of it.
-	// (1<<9) - 1 is there to scale upwards.
+	/* Normal circumference for the X+Y is 256+256 = 1<<9
+	 * Note, not actually taking the full circumference into account,
+	 * just half of it.
+	 * (1<<9) - 1 is there to scale upwards. */
 	return (n * (MapSizeX() + MapSizeY()) + (1<<9) - 1) >> 9;
 }
 
 
-// This function checks if we add addx/addy to tile, if we
-//  do wrap around the edges. For example, tile = (10,2) and
-//  addx = +3 and addy = -4. This function will now return
-//  INVALID_TILE, because the y is wrapped. This is needed in
-//  for example, farmland. When the tile is not wrapped,
-//  the result will be tile + TileDiffXY(addx, addy)
+/* This function checks if we add addx/addy to tile, if we
+ *  do wrap around the edges. For example, tile = (10,2) and
+ *  addx = +3 and addy = -4. This function will now return
+ *  INVALID_TILE, because the y is wrapped. This is needed in
+ *  for example, farmland. When the tile is not wrapped,
+ *  the result will be tile + TileDiffXY(addx, addy) */
 uint TileAddWrap(TileIndex tile, int addx, int addy)
 {
 	uint x = TileX(tile) + addx;
 	uint y = TileY(tile) + addy;
 
-	// Are we about to wrap?
+	/* Are we about to wrap? */
 	if (x < MapMaxX() && y < MapMaxY())
 		return tile + TileDiffXY(addx, addy);
 
@@ -123,21 +125,21 @@
 }
 
 extern const TileIndexDiffC _tileoffs_by_diagdir[] = {
-	{-1,  0}, // DIAGDIR_NE
-	{ 0,  1}, // DIAGDIR_SE
-	{ 1,  0}, // DIAGDIR_SW
-	{ 0, -1}  // DIAGDIR_NW
+	{-1,  0}, ///< DIAGDIR_NE
+	{ 0,  1}, ///< DIAGDIR_SE
+	{ 1,  0}, ///< DIAGDIR_SW
+	{ 0, -1}  ///< DIAGDIR_NW
 };
 
 extern const TileIndexDiffC _tileoffs_by_dir[] = {
-	{-1, -1}, // DIR_N
-	{-1,  0}, // DIR_NE
-	{-1,  1}, // DIR_E
-	{ 0,  1}, // DIR_SE
-	{ 1,  1}, // DIR_S
-	{ 1,  0}, // DIR_SW
-	{ 1, -1}, // DIR_W
-	{ 0, -1}  // DIR_NW
+	{-1, -1}, ///< DIR_N
+	{-1,  0}, ///< DIR_NE
+	{-1,  1}, ///< DIR_E
+	{ 0,  1}, ///< DIR_SE
+	{ 1,  1}, ///< DIR_S
+	{ 1,  0}, ///< DIR_SW
+	{ 1, -1}, ///< DIR_W
+	{ 0, -1}  ///< DIR_NW
 };
 
 uint DistanceManhattan(TileIndex t0, TileIndex t1)
@@ -191,7 +193,7 @@
  * @param size: number of tiles per side of the desired search area
  * @param proc: callback testing function pointer.
  * @param data to be passed to the callback function. Depends on the implementation
- * @result of the search
+ * @return result of the search
  * @pre proc != NULL
  * @pre size > 0
  */
--- a/src/map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,12 +1,14 @@
 /* $Id$ */
 
+/** @file map.h */
+
 #ifndef MAP_H
 #define MAP_H
 
 #include "stdafx.h"
 
-// Putting externs inside inline functions seems to confuse the aliasing
-// checking on MSVC6. Never use those variables directly.
+/* Putting externs inside inline functions seems to confuse the aliasing
+ * checking on MSVC6. Never use those variables directly. */
 extern uint _map_log_x;
 extern uint _map_size_x;
 extern uint _map_size_y;
@@ -30,7 +32,7 @@
 
 void AllocateMap(uint size_x, uint size_y);
 
-// binary logarithm of the map size, try to avoid using this one
+/* binary logarithm of the map size, try to avoid using this one */
 static inline uint MapLogX(void)  { return _map_log_x; }
 /* The size of the map */
 static inline uint MapSizeX(void) { return _map_size_x; }
@@ -41,7 +43,7 @@
 /* The number of tiles in the map */
 static inline uint MapSize(void) { return _map_size; }
 
-// Scale a number relative to the map size
+/* Scale a number relative to the map size */
 uint ScaleByMapSize(uint); // Scale relative to the number of tiles
 uint ScaleByMapSize1D(uint); // Scale relative to the circumference of the map
 
@@ -55,10 +57,10 @@
 
 static inline TileIndexDiff TileDiffXY(int x, int y)
 {
-	// Multiplication gives much better optimization on MSVC than shifting.
-	// 0 << shift isn't optimized to 0 properly.
-	// Typically x and y are constants, and then this doesn't result
-	// in any actual multiplication in the assembly code..
+	/* Multiplication gives much better optimization on MSVC than shifting.
+	 * 0 << shift isn't optimized to 0 properly.
+	 * Typically x and y are constants, and then this doesn't result
+	 * in any actual multiplication in the assembly code.. */
 	return (y * MapSizeX()) + x;
 }
 
@@ -73,9 +75,9 @@
 };
 
 enum {
-	TILE_SIZE   = 16,   /* Tiles are 16x16 "units" in size */
-	TILE_PIXELS = 32,   /* a tile is 32x32 pixels */
-	TILE_HEIGHT =  8,   /* The standard height-difference between tiles on two levels is 8 (z-diff 8) */
+	TILE_SIZE   = 16,   ///< Tiles are 16x16 "units" in size
+	TILE_PIXELS = 32,   ///< a tile is 32x32 pixels
+	TILE_HEIGHT =  8,   ///< The standard height-difference between tiles on two levels is 8 (z-diff 8)
 };
 
 
@@ -132,12 +134,12 @@
 		return TileXY(x, y);
 }
 
-// Functions to calculate distances
-uint DistanceManhattan(TileIndex, TileIndex); // also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
-uint DistanceSquare(TileIndex, TileIndex); // euclidian- or L2-Norm squared
-uint DistanceMax(TileIndex, TileIndex); // also known as L-Infinity-Norm
-uint DistanceMaxPlusManhattan(TileIndex, TileIndex); // Max + Manhattan
-uint DistanceFromEdge(TileIndex); // shortest distance from any edge of the map
+/* Functions to calculate distances */
+uint DistanceManhattan(TileIndex, TileIndex); ///< also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
+uint DistanceSquare(TileIndex, TileIndex); ///< euclidian- or L2-Norm squared
+uint DistanceMax(TileIndex, TileIndex); ///< also known as L-Infinity-Norm
+uint DistanceMaxPlusManhattan(TileIndex, TileIndex); ///< Max + Manhattan
+uint DistanceFromEdge(TileIndex); ///< shortest distance from any edge of the map
 
 
 #define BEGIN_TILE_LOOP(var,w,h,tile)                      \
--- a/src/md5.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/md5.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file md5.cpp */
+
 /*
   Copyright (C) 1999, 2000, 2002 Aladdin Enterprises.  All rights reserved.
 
@@ -23,7 +25,7 @@
   ghost@aladdin.com
 
  */
-/* $Id$ */
+
 /*
   Independent implementation of MD5 (RFC 1321).
 
--- a/src/md5.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/md5.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file md5.h */
+
 /*
   Copyright (C) 1999, 2002 Aladdin Enterprises.  All rights reserved.
 
@@ -23,7 +25,7 @@
   ghost@aladdin.com
 
  */
-/* $Id$ */
+
 /*
   Independent implementation of MD5 (RFC 1321).
 
--- a/src/mersenne.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/mersenne.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file mersenne.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 
--- a/src/minilzo.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/minilzo.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-/* minilzo.c -- mini subset of the LZO real-time data compression library
+/* @file minilzo.cpp -- mini subset of the LZO real-time data compression library
 
    This file is part of the LZO real-time data compression library.
 
--- a/src/minilzo.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/minilzo.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-/* minilzo.h -- mini subset of the LZO real-time data compression library
+/* @file minilzo.h -- mini subset of the LZO real-time data compression library
 
    This file is part of the LZO real-time data compression library.
 
--- a/src/misc.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/misc.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file misc.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "currency.h"
@@ -234,7 +236,7 @@
 	}
 }
 
-// Calculate constants that depend on the landscape type.
+/* Calculate constants that depend on the landscape type. */
 void InitializeLandscapeVariables(bool only_constants)
 {
 	if (only_constants) return;
@@ -249,8 +251,8 @@
 
 int FindFirstBit(uint32 value)
 {
-	// The macro FIND_FIRST_BIT is better to use when your value is
-	// not more than 128.
+	/* The macro FIND_FIRST_BIT is better to use when your value is
+	  not more than 128. */
 	byte i = 0;
 
 	if (value == 0) return 0;
@@ -310,8 +312,8 @@
 	    SLEG_END()
 };
 
-// Save load date related variables as well as persistent tick counters
-// XXX: currently some unrelated stuff is just put here
+/* Save load date related variables as well as persistent tick counters
+ * XXX: currently some unrelated stuff is just put here */
 static void SaveLoad_DATE(void)
 {
 	SlGlobList(_date_desc);
--- a/src/misc_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/misc_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file misc_cmd.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "functions.h"
@@ -14,6 +16,7 @@
 #include "network/network.h"
 #include "variables.h"
 #include "livery.h"
+#include "player_face.h"
 
 /** Change the player's face.
  * @param tile unused
@@ -22,8 +25,12 @@
  */
 int32 CmdSetPlayerFace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 {
+	PlayerFace pf = (PlayerFace)p2;
+
+	if (!IsValidPlayerFace(pf)) return CMD_ERROR;
+
 	if (flags & DC_EXEC) {
-		GetPlayer(_current_player)->face = p2;
+		GetPlayer(_current_player)->face = pf;
 		MarkWholeScreenDirty();
 	}
 	return 0;
--- a/src/misc_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/misc_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file misc_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "hal.h"
@@ -31,6 +33,7 @@
 #include "settings.h"
 #include "date.h"
 #include "cargotype.h"
+#include "player_face.h"
 
 #include "fios.h"
 /* Variables to display file lists */
@@ -60,7 +63,7 @@
 		DoDrawStringCentered(140, 38, _landinfo_data[2], 0);
 		DoDrawStringCentered(140, 49, _landinfo_data[3], 0);
 		DoDrawStringCentered(140, 60, _landinfo_data[4], 0);
-		if (_landinfo_data[5][0] != '\0') DrawStringMultiCenter(140, 76, BindCString(_landinfo_data[5]), 276);
+		if (_landinfo_data[5][0] != '\0') DrawStringMultiCenter(140, 76, BindCString(_landinfo_data[5]), w->Width() - 4);
 		if (_landinfo_data[6][0] != '\0') DoDrawStringCentered(140, 71, _landinfo_data[6], 0);
 	}
 }
@@ -248,7 +251,7 @@
 static void AboutWindowProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_CREATE: /* Set up window counter and start position of scroller */
+	case WE_CREATE: // Set up window counter and start position of scroller
 		WP(w, scroller_d).counter = 0;
 		WP(w, scroller_d).height = w->Height() - 40;
 		break;
@@ -257,11 +260,11 @@
 		int y = WP(w, scroller_d).height;
 		w->DrawWidgets();
 
-		// Show original copyright and revision version
+		/* Show original copyright and revision version */
 		DrawStringCentered(210, 17, STR_00B6_ORIGINAL_COPYRIGHT, 0);
 		DrawStringCentered(210, 17 + 10, STR_00B7_VERSION, 0);
 
-		// Show all scrolling credits
+		/* Show all scrolling credits */
 		for (i = 0; i < lengthof(credits); i++) {
 			if (y >= 50 && y < (w->Height() - 40)) {
 				DoDrawString(credits[i], 10, y, 0x10);
@@ -269,13 +272,13 @@
 			y += 10;
 		}
 
-		// If the last text has scrolled start anew from the start
+		/* If the last text has scrolled start anew from the start */
 		if (y < 50) WP(w, scroller_d).height = w->Height() - 40;
 
 		DoDrawStringCentered(210, w->Height() - 25, "Website: http://www.openttd.org", 16);
 		DrawStringCentered(210, w->Height() - 15, STR_00BA_COPYRIGHT_OPENTTD, 0);
 	}	break;
-	case WE_MOUSELOOP: /* Timer to scroll the text and adjust the new top */
+	case WE_MOUSELOOP: // Timer to scroll the text and adjust the new top
 		if (WP(w, scroller_d).counter++ % 3 == 0) {
 			WP(w, scroller_d).height--;
 			w->SetDirty();
@@ -368,7 +371,7 @@
 				_tree_to_plant = -1;
 			break;
 
-		case 16: /* place trees randomly over the landscape*/
+		case 16: // place trees randomly over the landscape
 			w->LowerWidget(16);
 			w->autorepeat_timeout = 5;
 			SndPlayFx(SND_15_BEEP);
@@ -504,13 +507,13 @@
 				120,
 				(_errmsg_message_1 == INVALID_STRING_ID ? 25 : 15),
 				_errmsg_message_2,
-				238);
+				w->Width() - 2);
 			if (_errmsg_message_1 != INVALID_STRING_ID)
 				DrawStringMultiCenter(
 					120,
 					30,
 					_errmsg_message_1,
-					238);
+					w->Width() - 2);
 		} else {
 			const Player *p = GetPlayer((PlayerID)GetDParamX(_errmsg_decode_params,2));
 			DrawPlayerFace(p->face, p->player_color, 2, 16);
@@ -519,13 +522,13 @@
 				214,
 				(_errmsg_message_1 == INVALID_STRING_ID ? 65 : 45),
 				_errmsg_message_2,
-				238);
+				w->Width() - 2);
 			if (_errmsg_message_1 != INVALID_STRING_ID)
 				DrawStringMultiCenter(
 					214,
 					90,
 					_errmsg_message_1,
-					238);
+					w->Width() - 2);
 		}
 		break;
 
@@ -544,7 +547,7 @@
 
 	case WE_KEYPRESS:
 		if (e->we.keypress.keycode == WKC_SPACE) {
-			// Don't continue.
+			/* Don't continue. */
 			e->we.keypress.cont = false;
 			w->Close();
 		}
@@ -575,11 +578,11 @@
 			pt = RemapCoords2(x, y);
 			vp = BaseWindow::FindById(WC_MAIN_WINDOW, 0)->viewport;
 
-			// move x pos to opposite corner
+			/* move x pos to opposite corner */
 			pt.x = ((pt.x - vp->virtual_left) >> vp->zoom) + vp->left;
 			pt.x = (pt.x < (_screen.width >> 1)) ? _screen.width - 260 : 20;
 
-			// move y pos to opposite corner
+			/* move y pos to opposite corner */
 			pt.y = ((pt.y - vp->virtual_top) >> vp->zoom) + vp->top;
 			pt.y = (pt.y < (_screen.height >> 1)) ? _screen.height - 80 : 100;
 
@@ -656,7 +659,7 @@
 			for (arg = 0; arg < WP(w, tooltips_d).paramcount; arg++) {
 				SetDParam(arg, WP(w, tooltips_d).params[arg]);
 			}
-			DrawStringMultiCenter((w->Width() >> 1), (w->Height() >> 1) - 5, WP(w, tooltips_d).string_id, 197);
+			DrawStringMultiCenter((w->Width() >> 1), (w->Height() >> 1) - 5, WP(w, tooltips_d).string_id, w->Width() - 2);
 			break;
 		}
 
@@ -802,11 +805,7 @@
 	uint width;
 	size_t len;
 
-	if (backspace) {
-		do {
-			tb->caretpos--;
-		} while (IsUtf8Part(*(tb->buf + tb->caretpos)));
-	}
+	if (backspace) tb->caretpos -= Utf8PrevCharLen(tb->buf + tb->caretpos);
 
 	len = Utf8Decode(&c, tb->buf + tb->caretpos);
 	width = GetCharacterWidth(FS_NORMAL, c);
@@ -889,10 +888,7 @@
 		if (tb->caretpos != 0) {
 			WChar c;
 
-			do {
-				tb->caretpos--;
-			} while (IsUtf8Part(*(tb->buf + tb->caretpos)));
-
+			tb->caretpos -= Utf8PrevCharLen(tb->buf + tb->caretpos);
 			Utf8Decode(&c, tb->buf + tb->caretpos);
 			tb->caretxoffs -= GetCharacterWidth(FS_NORMAL, c);
 
@@ -1109,7 +1105,7 @@
 			}
 			break;
 
-		case WE_DESTROY: /* Call cancellation of query, if we have not handled it before */
+		case WE_DESTROY: // Call cancellation of query, if we have not handled it before
 			if (!qs->handled && w->parent != NULL) {
 				WindowEvent e;
 				BaseWindow *parent = w->parent;
@@ -1209,7 +1205,7 @@
 			w->DrawWidgets();
 			COPY_IN_DPARAM(0, q->params, lengthof(q->params));
 
-			DrawStringMultiCenter(w->Width() / 2, (w->Height() / 2) - 10, q->message, w->Width());
+			DrawStringMultiCenter(w->Width() / 2, (w->Height() / 2) - 10, q->message, w->Width() - 2);
 			break;
 
 		case WE_CLICK:
@@ -1224,7 +1220,7 @@
 				}
 			break;
 
-		case WE_KEYPRESS: /* ESC closes the window, Enter confirms the action */
+		case WE_KEYPRESS: // ESC closes the window, Enter confirms the action
 			switch (e->we.keypress.keycode) {
 				case WKC_RETURN:
 				case WKC_NUM_ENTER:
@@ -1238,7 +1234,7 @@
 			}
 			break;
 
-		case WE_DESTROY: /* Call callback function (if any) on window close if not yet called */
+		case WE_DESTROY: // Call callback function (if any) on window close if not yet called
 			if (!q->calledback && q->proc != NULL) {
 				q->calledback = true;
 				q->proc(w->parent, false);
@@ -1327,7 +1323,7 @@
 {   WIDGETS_END},
 };
 
-// Colors for fios types
+/* Colors for fios types */
 const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8};
 
 void BuildFileList(void)
@@ -1406,7 +1402,7 @@
 	static FiosItem o_dir;
 
 	switch (e->event) {
-	case WE_CREATE: { /* Set up OPENTTD button */
+	case WE_CREATE: { // Set up OPENTTD button
 		o_dir.type = FIOS_TYPE_DIRECT;
 		switch (_saveload_mode) {
 			case SLD_SAVE_GAME:
@@ -1466,27 +1462,27 @@
 
 	case WE_CLICK:
 		switch (e->we.click.widget) {
-		case 2: /* Sort save names by name */
+		case 2: // Sort save names by name
 			_savegame_sort_order = (_savegame_sort_order == SORT_BY_NAME) ?
 				SORT_BY_NAME | SORT_DESCENDING : SORT_BY_NAME;
 			_savegame_sort_dirty = true;
 			w->SetDirty();
 			break;
 
-		case 3: /* Sort save names by date */
+		case 3: // Sort save names by date
 			_savegame_sort_order = (_savegame_sort_order == SORT_BY_DATE) ?
 				SORT_BY_DATE | SORT_DESCENDING : SORT_BY_DATE;
 			_savegame_sort_dirty = true;
 			w->SetDirty();
 			break;
 
-		case 6: /* OpenTTD 'button', jumps to OpenTTD directory */
+		case 6: // OpenTTD 'button', jumps to OpenTTD directory
 			FiosBrowseTo(&o_dir);
 			w->SetDirty();
 			BuildFileList();
 			break;
 
-		case 7: { /* Click the listbox */
+		case 7: { // Click the listbox
 			int y = (e->we.click.pt.y - w->widget[e->we.click.widget].top - 1) / 10;
 			char *name;
 			const FiosItem *file;
@@ -1513,20 +1509,20 @@
 					w->Close();
 					ShowHeightmapLoad();
 				} else {
-					// SLD_SAVE_GAME, SLD_SAVE_SCENARIO copy clicked name to editbox
+					/* SLD_SAVE_GAME, SLD_SAVE_SCENARIO copy clicked name to editbox */
 					ttd_strlcpy(WP(w, querystr_d).text.buf, file->title, WP(w, querystr_d).text.maxlength);
 					UpdateTextBufferSize(&WP(w, querystr_d).text);
 					w->InvalidateWidget(10);
 				}
 			} else {
-				// Changed directory, need repaint.
+				/* Changed directory, need repaint. */
 				w->SetDirty();
 				BuildFileList();
 			}
 			break;
 		}
 
-		case 11: case 12: /* Delete, Save game */
+		case 11: case 12: // Delete, Save game
 			break;
 		}
 		break;
@@ -1542,7 +1538,7 @@
 		}
 
 		if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
-			if (HandleEditBoxKey(w, &WP(w, querystr_d), 10, e) == 1) /* Press Enter */
+			if (HandleEditBoxKey(w, &WP(w, querystr_d), 10, e) == 1) // Press Enter
 					w->HandleButtonClick(12);
 		}
 		break;
@@ -1551,7 +1547,7 @@
 		 * in those two saveload mode  */
 		if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO)) break;
 
-		if (w->IsWidgetLowered(11)) { /* Delete button clicked */
+		if (w->IsWidgetLowered(11)) { // Delete button clicked
 			if (!FiosDelete(WP(w,querystr_d).text.buf)) {
 				ShowErrorMessage(INVALID_STRING_ID, STR_4008_UNABLE_TO_DELETE_FILE, 0, 0);
 			} else {
@@ -1562,7 +1558,7 @@
 
 			UpdateTextBufferSize(&WP(w, querystr_d).text);
 			w->SetDirty();
-		} else if (w->IsWidgetLowered(12)) { /* Save button clicked */
+		} else if (w->IsWidgetLowered(12)) { // Save button clicked
 			_switch_mode = SM_SAVE;
 			FiosMakeSavegameName(_file_to_saveload.name, WP(w,querystr_d).text.buf, sizeof(_file_to_saveload.name));
 
@@ -1571,7 +1567,7 @@
 		}
 		break;
 	case WE_DESTROY:
-		// pause is only used in single-player, non-editor mode, non menu mode
+		/* pause is only used in single-player, non-editor mode, non menu mode */
 		if (!_networking && _game_mode != GM_EDITOR && _game_mode != GM_MENU) {
 			DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
 		}
@@ -1652,8 +1648,8 @@
 	WP(w, querystr_d).afilter = CS_ALPHANUMERAL;
 	InitializeTextBuffer(&WP(w, querystr_d).text, _edit_str_buf, lengthof(_edit_str_buf), 240);
 
-	// pause is only used in single-player, non-editor mode, non-menu mode. It
-	// will be unpaused in the WE_DESTROY event handler.
+	/* pause is only used in single-player, non-editor mode, non-menu mode. It
+	 * will be unpaused in the WE_DESTROY event handler. */
 	if (_game_mode != GM_MENU && !_networking && _game_mode != GM_EDITOR) {
 		DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
 	}
@@ -1703,7 +1699,10 @@
 		return true;
 }
 
-// p1 player to set to, p2 is -1 or +1 (down/up)
+/**
+ * @param p1 player to set to
+ * @param p2 is -1 or +1 (down/up)
+ */
 static int32 ClickChangePlayerCheat(int32 p1, int32 p2)
 {
 	while (IsValidPlayer((PlayerID)p1)) {
@@ -1719,7 +1718,9 @@
 	return _local_player;
 }
 
-// p1 -1 or +1 (down/up)
+/**
+ * @param p1 -1 or +1 (down/up)
+ */
 static int32 ClickChangeClimateCheat(int32 p1, int32 p2)
 {
 	if (p1 == -1) p1 = 3;
@@ -1731,7 +1732,9 @@
 
 extern void EnginesMonthlyLoop(void);
 
-// p2 1 (increase) or -1 (decrease)
+/**
+ * @param p2 1 (increase) or -1 (decrease)
+ */
 static int32 ClickChangeDateCheat(int32 p1, int32 p2)
 {
 	YearMonthDay ymd;
@@ -1760,13 +1763,13 @@
 
 
 typedef struct CheatEntry {
-	VarType type;          // type of selector
-	ce_flags flags;        // selector flags
-	StringID str;          // string with descriptive text
-	void *variable;        // pointer to the variable
-	bool *been_used;       // has this cheat been used before?
-	CheckButtonClick *proc;// procedure
-	int16 min, max;        // range for spinbox setting
+	VarType type;          ///< type of selector
+	ce_flags flags;        ///< selector flags
+	StringID str;          ///< string with descriptive text
+	void *variable;        ///< pointer to the variable
+	bool *been_used;       ///< has this cheat been used before?
+	CheckButtonClick *proc;///< procedure
+	int16 min, max;        ///< range for spinbox setting
 } CheatEntry;
 
 static const CheatEntry _cheats_ui[] = {
@@ -1800,7 +1803,7 @@
 
 		w->DrawWidgets();
 
-		DrawStringMultiCenter(200, 25, STR_CHEATS_WARNING, 350);
+		DrawStringMultiCenter(200, 25, STR_CHEATS_WARNING, w->Width() - 50);
 
 		x = 0;
 		y = 45;
@@ -1863,7 +1866,7 @@
 			int32 value, oldvalue;
 			uint x = e->we.click.pt.x;
 
-			// not clicking a button?
+			/* not clicking a button? */
 			if (!IS_INT_INSIDE(x, 20, 40) || btn >= lengthof(_cheats_ui)) break;
 
 			ce = &_cheats_ui[btn];
@@ -1887,7 +1890,7 @@
 				value += (x >= 30) ? step : -step;
 				value = clamp(value, ce->min, ce->max);
 
-				// take whatever the function returns
+				/* take whatever the function returns */
 				value = ce->proc(value, (x >= 30) ? 1 : -1);
 
 				if (value != oldvalue) {
--- a/src/mixer.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/mixer.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file mixer.cpp*/
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "mixer.h"
@@ -7,16 +9,16 @@
 struct MixerChannel {
 	bool active;
 
-	// pointer to allocated buffer memory
+	/* pointer to allocated buffer memory */
 	int8 *memory;
 
-	// current position in memory
+	/* current position in memory */
 	uint32 pos;
 	uint32 frac_pos;
 	uint32 frac_speed;
 	uint32 samples_left;
 
-	// Mixing volume
+	/* Mixing volume */
 	uint volume_left;
 	uint volume_right;
 
@@ -46,7 +48,7 @@
 	volume_right = sc->volume_right;
 
 	if (frac_speed == 0x10000) {
-		// Special case when frac_speed is 0x10000
+		/* Special case when frac_speed is 0x10000 */
 		do {
 			buffer[0] += *b * volume_left >> 8;
 			buffer[1] += *b * volume_right >> 8;
@@ -79,10 +81,10 @@
 {
 	MixerChannel *mc;
 
-	// Clear the buffer
+	/* Clear the buffer */
 	memset(buffer, 0, sizeof(int16) * 2 * samples);
 
-	// Mix each channel
+	/* Mix each channel */
 	for (mc = _channels; mc != endof(_channels); mc++) {
 		if (mc->active) {
 			mix_int8_to_int16(mc, (int16*)buffer, samples);
@@ -111,7 +113,7 @@
 
 	mc->frac_speed = (rate << 16) / _play_rate;
 
-	// adjust the magnitude to prevent overflow
+	/* adjust the magnitude to prevent overflow */
 	while (size & 0xFFFF0000) {
 		size >>= 1;
 		rate = (rate >> 1) + 1;
--- a/src/mixer.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/mixer.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file mixer.h */
+
 #ifndef MIXER_H
 #define MIXER_H
 
--- a/src/music.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/music.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file music.cpp */
+
 #include "music.h"
 
 const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE] = {
--- a/src/music.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/music.h	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file music.h */
+
 #ifndef MUSIC_H
 #define MUSIC_H
 
--- a/src/music_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/music_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file music_gui.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "table/strings.h"
--- a/src/network/network.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/network/network.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1421,4 +1421,17 @@
 	NetworkCoreShutdown();
 }
 
+/**
+ * Checks whether the given version string is compatible with our version.
+ * It'll check the first NETWORK_REVISION_LENGTH - 1 characters (-1 for '\0')
+ * against the current version and the NOREV_STRING.
+ * @param other the version string to compare to
+ */
+bool IsNetworkCompatibleVersion(const char *other)
+{
+	extern const char _openttd_revision[];
+	return strncmp(NOREV_STRING, other, NETWORK_REVISION_LENGTH - 1) == 0 ||
+			strncmp(_openttd_revision, other, NETWORK_REVISION_LENGTH - 1) == 0;
+}
+
 #endif /* ENABLE_NETWORK */
--- a/src/network/network.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/network/network.h	Sun Mar 04 04:25:36 2007 +0000
@@ -178,6 +178,8 @@
 void NetworkReboot(void);
 void NetworkDisconnect(void);
 
+bool IsNetworkCompatibleVersion(const char *version);
+
 VARDEF bool _network_server;     ///< network-server is active
 VARDEF bool _network_available;  ///< is network mode available?
 VARDEF bool _network_dedicated;  ///< are we a dedicated server?
--- a/src/network/network_server.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/network/network_server.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -621,8 +621,7 @@
 
 #if defined(WITH_REV) || defined(WITH_REV_HACK)
 	// Check if the client has revision control enabled
-	if (strcmp(NOREV_STRING, client_revision) != 0 &&
-			strcmp(_network_game_info.server_revision, client_revision) != 0) {
+	if (!IsNetworkCompatibleVersion(client_revision)) {
 		// Different revisions!!
 		SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_WRONG_REVISION);
 		return;
--- a/src/network/network_udp.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/network/network_udp.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -261,7 +261,6 @@
 
 DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE)
 {
-	extern const char _openttd_revision[];
 	NetworkGameList *item;
 
 	// Just a fail-safe.. should never happen
@@ -316,9 +315,7 @@
 		snprintf(item->info.hostname, sizeof(item->info.hostname), "%s", inet_ntoa(client_addr->sin_addr));
 
 	/* Check if we are allowed on this server based on the revision-match */
-	item->info.version_compatible =
-		strcmp(item->info.server_revision, _openttd_revision) == 0 ||
-		strcmp(item->info.server_revision, NOREV_STRING) == 0;
+	item->info.version_compatible = IsNetworkCompatibleVersion(item->info.server_revision);
 	item->info.compatible &= item->info.version_compatible; // Already contains match for GRFs
 
 	item->online = true;
--- a/src/newgrf.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/newgrf.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -781,12 +781,12 @@
 			FOR_EACH_OBJECT avi[i].base_cost = grf_load_byte(&buf); // ?? is it base_cost?
 			break;
 
-		case 0x0C: /* Speed (1 unit is 8 mph) */
-			FOR_EACH_OBJECT avi[i].max_speed = grf_load_byte(&buf);
+		case 0x0C: /* Speed (1 unit is 8 mph, we translate to 1 unit is 1 km/h) */
+			FOR_EACH_OBJECT avi[i].max_speed = (grf_load_byte(&buf) * 129) / 10;
 			break;
 
 		case 0x0D: /* Acceleration */
-			FOR_EACH_OBJECT avi[i].acceleration = grf_load_byte(&buf);
+			FOR_EACH_OBJECT avi[i].acceleration = (grf_load_byte(&buf) * 129) / 10;
 			break;
 
 		case 0x0E: /* Running cost factor */
@@ -2628,8 +2628,6 @@
 	uint32 grfid;
 	const char *name;
 	const char *info;
-	int name_len;
-	int info_len;
 
 	if (!check_length(len, 8, "Info")) return; buf++;
 	version = grf_load_byte(&buf);
@@ -2641,17 +2639,13 @@
 	if (GB(grfid, 24, 8) == 0xFF) SETBIT(_cur_grfconfig->flags, GCF_SYSTEM);
 
 	len -= 6;
-	name = (const char*)buf;
-	name_len = ttd_strnlen(name, len);
-
-	if (name_len < len) {
-		_cur_grfconfig->name = TranslateTTDPatchCodes(name);
-
-		len -= name_len + 1;
-		info = name + name_len + 1;
-		info_len = ttd_strnlen(info, len);
-
-		if (info_len < len) _cur_grfconfig->info  = TranslateTTDPatchCodes(info);
+	name = grf_load_string(&buf, len);
+	_cur_grfconfig->name = TranslateTTDPatchCodes(name);
+
+	len -= strlen(name) + 1;
+	if (len > 0) {
+		info = grf_load_string(&buf, len);
+		_cur_grfconfig->info = TranslateTTDPatchCodes(info);
 	}
 
 	/* GLS_INFOSCAN only looks for the action 8, so we can skip the rest of the file */
--- a/src/newgrf_config.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/newgrf_config.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -255,8 +255,8 @@
 				free(c->filename);
 				c->filename = strdup(f->filename);
 				memcpy(c->md5sum, f->md5sum, sizeof(c->md5sum));
-				if (c->name == NULL) c->name = strdup(f->name);
-				if (c->info == NULL) c->info = strdup(f->info);
+				if (c->name == NULL && f->name != NULL) c->name = strdup(f->name);
+				if (c->info == NULL && f->info != NULL) c->info = strdup(f->info);
 				c->error = NULL;
 			}
 		}
--- a/src/newgrf_engine.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/newgrf_engine.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -44,7 +44,7 @@
 	WagonOverride *wo;
 
 	assert(engine < TOTAL_NUM_ENGINES);
-	assert(cargo < NUM_CARGO + 1); // Include CT_DEFAULT pseudo cargo. CT_PURCHASE does not apply to overrides.
+	assert(cargo < NUM_CARGO + 2); // Include CT_DEFAULT and CT_PURCHASE pseudo cargos.
 
 	wos = &_engine_wagon_overrides[engine];
 	wos->overrides_count++;
@@ -457,21 +457,6 @@
 }
 
 
-static uint32 GetVehicleTypeInfo(EngineID engine_type)
-{
-	/* Bit 0  Vehicle type is available on the market
-	 * Bit 1  Vehicle type is in the testing phase
-	 * Bit 2  Exclusive testing offer for a human player active */
-	const Engine *e = GetEngine(engine_type);
-	uint32 var = 0;
-
-	if (e->player_avail == 0xFF) SETBIT(var, 0);
-	if (e->age < e->duration_phase_1) SETBIT(var, 1);
-	if (e->player_avail > 0 && e->player_avail != 0xFF) SETBIT(var, 2);
-	return var;
-}
-
-
 static uint32 GetGRFParameter(EngineID engine_type, byte parameter)
 {
 	const GRFFile *file = GetEngineGRF(engine_type);
@@ -490,7 +475,7 @@
 		switch (variable) {
 			case 0x43: return _current_player; /* Owner information */
 			case 0x46: return 0;               /* Motion counter */
-			case 0x48: return GetVehicleTypeInfo(object->u.vehicle.self_type); /* Vehicle Type Info */
+			case 0x48: return GetEngine(object->u.vehicle.self_type)->flags; /* Vehicle Type Info */
 			case 0xC4: return clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR; /* Build year */
 			case 0xDA: return INVALID_VEHICLE; /* Next vehicle */
 			case 0x7F: return GetGRFParameter(object->u.vehicle.self_type, parameter); /* Read GRF parameter */
@@ -601,7 +586,7 @@
 			return (cs->classes << 16) | (cs->weight << 8) | GetEngineGRF(v->engine_type)->cargo_map[v->cargo_type];
 		}
 
-		case 0x48: return GetVehicleTypeInfo(v->engine_type); /* Vehicle Type Info */
+		case 0x48: return GetEngine(v->engine_type)->flags; /* Vehicle Type Info */
 
 		/* Variables which use the parameter */
 		case 0x60: /* Count consist's engine ID occurance */
@@ -616,6 +601,21 @@
 			}
 
 		case 0x7F: return GetGRFParameter(v->engine_type, parameter); /* Read GRF parameter */
+
+		case 0xFE:
+		case 0xFF: {
+			uint16 modflags = 0;
+
+			/* TODO: There are some other bits that should be implemented:
+			 *   bit 5: Whether the rail vehicle is powered or not (mostly useful for wagons).
+			 *   bit 6: This is an electrically powered rail vehicle which is running on normal rail.
+			 *   bit 8: (Maybe?) Toggled whenever the train reverses.
+			 */
+
+			if (HASBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE)) SETBIT(modflags, 10);
+
+			return variable == 0xFE ? modflags : GB(modflags, 8, 8);
+		}
 	}
 
 	/* General vehicle properties */
--- a/src/newgrf_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/newgrf_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -485,6 +485,9 @@
 			break;
 
 		case WE_DESTROY:
+			if (!WP(w, newgrf_d).execute) {
+				CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list);
+			}
 			/* Remove the temporary copy of grf-list used in window */
 			ClearGRFConfigList(WP(w, newgrf_d).list);
 			break;
--- a/src/news.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/news.h	Sun Mar 04 04:25:36 2007 +0000
@@ -59,11 +59,8 @@
 };
 
 enum NewsCallback {
-	DNC_TRAINAVAIL    = 0, ///< Show new train available message. StringID is EngineID
-	DNC_ROADAVAIL     = 1, ///< Show new road vehicle available message. StringID is EngineID
-	DNC_SHIPAVAIL     = 2, ///< Show new ship available message. StringID is EngineID
-	DNC_AIRCRAFTAVAIL = 3, ///< Show new aircraft available message. StringID is EngineID
-	DNC_BANKRUPCY     = 4, ///< Show bankrupcy message. StringID is PlayerID (0-3) and NewsBankrupcy (4-7)
+	DNC_VEHICLEAVAIL  = 0, ///< Show new vehicle available message. StringID is EngineID
+	DNC_BANKRUPCY     = 1, ///< Show bankrupcy message. StringID is PlayerID (0-3) and NewsBankrupcy (4-7)
 };
 
 enum NewsBankrupcy {
--- a/src/news_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/news_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -53,33 +53,21 @@
 
 static byte _total_news = 0; // total news count
 
-void DrawNewsNewTrainAvail(BaseWindow *w);
-void DrawNewsNewRoadVehAvail(BaseWindow *w);
-void DrawNewsNewShipAvail(BaseWindow *w);
-void DrawNewsNewAircraftAvail(BaseWindow *w);
+void DrawNewsNewVehicleAvail(BaseWindow *w);
 void DrawNewsBankrupcy(BaseWindow *w);
 static void MoveToNextItem(void);
 
-StringID GetNewsStringNewTrainAvail(const NewsItem *ni);
-StringID GetNewsStringNewRoadVehAvail(const NewsItem *ni);
-StringID GetNewsStringNewShipAvail(const NewsItem *ni);
-StringID GetNewsStringNewAircraftAvail(const NewsItem *ni);
+StringID GetNewsStringNewVehicleAvail(const NewsItem *ni);
 StringID GetNewsStringBankrupcy(const NewsItem *ni);
 
 static DrawNewsCallbackProc * const _draw_news_callback[] = {
-	DrawNewsNewTrainAvail,    /* DNC_TRAINAVAIL */
-	DrawNewsNewRoadVehAvail,  /* DNC_ROADAVAIL */
-	DrawNewsNewShipAvail,     /* DNC_SHIPAVAIL */
-	DrawNewsNewAircraftAvail, /* DNC_AIRCRAFTAVAIL */
+	DrawNewsNewVehicleAvail,  /* DNC_VEHICLEAVAIL */
 	DrawNewsBankrupcy,        /* DNC_BANKRUPCY */
 };
 
 extern GetNewsStringCallbackProc * const _get_news_string_callback[];
 GetNewsStringCallbackProc * const _get_news_string_callback[] = {
-	GetNewsStringNewTrainAvail,    /* DNC_TRAINAVAIL */
-	GetNewsStringNewRoadVehAvail,  /* DNC_ROADAVAIL */
-	GetNewsStringNewShipAvail,     /* DNC_SHIPAVAIL */
-	GetNewsStringNewAircraftAvail, /* DNC_AIRCRAFTAVAIL */
+	GetNewsStringNewVehicleAvail,  /* DNC_VEHICLEAVAIL */
 	GetNewsStringBankrupcy,        /* DNC_BANKRUPCY */
 };
 
@@ -135,7 +123,7 @@
 				if (!(ni->flags & NF_VIEWPORT)) {
 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
 					DrawStringMultiCenter(215, ni->display_mode == NM_NORMAL ? 76 : 56,
-						ni->string_id, 426);
+						ni->string_id, w->Width() - 4);
 				} else {
 					byte bk = _display_opt;
 					_display_opt &= ~DO_TRANS_BUILDINGS;
@@ -150,7 +138,7 @@
 					);
 
 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
-					DrawStringMultiCenter(w->Width() / 2, 20, ni->string_id, 428);
+					DrawStringMultiCenter(w->Width() / 2, 20, ni->string_id, w->Width() - 4);
 				}
 				break;
 			}
@@ -168,7 +156,7 @@
 				} else {
 					w->DrawViewport();
 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
-					DrawStringMultiCenter(w->Width() / 2, w->Height() - 16, ni->string_id, 276);
+					DrawStringMultiCenter(w->Width() / 2, w->Height() - 16, ni->string_id, w->Width() - 4);
 				}
 				break;
 			}
--- a/src/openttd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/openttd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -40,6 +40,7 @@
 #include "fileio.h"
 #include "hal.h"
 #include "airport.h"
+#include "aircraft.h"
 #include "console.h"
 #include "screenshot.h"
 #include "network/network.h"
@@ -55,6 +56,7 @@
 #include "clear_map.h"
 #include "fontcache.h"
 #include "newgrf_config.h"
+#include "player_face.h"
 
 #include "bridge_map.h"
 #include "clear_map.h"
@@ -1467,6 +1469,34 @@
 		}
 	}
 
+	if (CheckSavegameVersion(48)) {
+		for (TileIndex t = 0; t < map_size; t++) {
+			switch (GetTileType(t)) {
+				case MP_RAILWAY:
+					if (IsPlainRailTile(t)) {
+						/* Swap ground type and signal type for plain rail tiles, so the
+						 * ground type uses the same bits as for depots and waypoints. */
+						uint tmp = GB(_m[t].m4, 0, 4);
+						SB(_m[t].m4, 0, 4, GB(_m[t].m2, 0, 4));
+						SB(_m[t].m2, 0, 4, tmp);
+					} else if (HASBIT(_m[t].m5, 2)) {
+						/* Split waypoint and depot rail type and remove the subtype. */
+						CLRBIT(_m[t].m5, 2);
+						CLRBIT(_m[t].m5, 6);
+					}
+					break;
+
+				case MP_STREET:
+					/* Swap m3 and m4, so the track type for rail crossings is the
+					 * same as for normal rail. */
+					Swap(_m[t].m3, _m[t].m4);
+					break;
+
+				default: break;
+			}
+		}
+	}
+
 	/* Elrails got added in rev 24 */
 	if (CheckSavegameVersion(24)) {
 		Vehicle *v;
@@ -1490,7 +1520,7 @@
 
 				case MP_STREET:
 					if (IsLevelCrossing(t)) {
-						SetRailTypeCrossing(t, UpdateRailType(GetRailTypeCrossing(t), min_rail));
+						SetRailType(t, UpdateRailType(GetRailType(t), min_rail));
 					}
 					break;
 
@@ -1575,11 +1605,11 @@
 				case MP_RAILWAY:
 					if (HasSignals(t)) {
 						// convert PBS signals to combo-signals
-						if (HASBIT(_m[t].m4, 2)) SetSignalType(t, SIGTYPE_COMBO);
+						if (HASBIT(_m[t].m2, 2)) SetSignalType(t, SIGTYPE_COMBO);
 
 						// move the signal variant back
-						SetSignalVariant(t, HASBIT(_m[t].m4, 3) ? SIG_SEMAPHORE : SIG_ELECTRIC);
-						CLRBIT(_m[t].m4, 3);
+						SetSignalVariant(t, HASBIT(_m[t].m2, 3) ? SIG_SEMAPHORE : SIG_ELECTRIC);
+						CLRBIT(_m[t].m2, 3);
 					}
 
 					// Clear PBS reservation on track
@@ -1771,9 +1801,9 @@
 		 * loading again, even if it didn't actually load anything, so now the
 		 * amount of cargo that has been paid for is stored. */
 		FOR_ALL_VEHICLES(v) {
-			if (HASBIT(v->load_status, 2)) {
+			if (HASBIT(v->vehicle_flags, 2)) {
 				v->cargo_paid_for = v->cargo_count;
-				CLRBIT(v->load_status, 2);
+				CLRBIT(v->vehicle_flags, 2);
 			} else {
 				v->cargo_paid_for = 0;
 			}
@@ -1789,6 +1819,22 @@
 		}
 	}
 
+	if (CheckSavegameVersion(50)) {
+		Vehicle *v;
+		/* Aircraft units changed from 8 mph to 1 km/h */
+		FOR_ALL_VEHICLES(v) {
+			if (v->type == VEH_Aircraft && v->subtype <= AIR_AIRCRAFT) {
+				const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type);
+				v->cur_speed *= 129;
+				v->cur_speed /= 10;
+				v->max_speed = avi->max_speed;
+				v->acceleration = avi->acceleration;
+			}
+		}
+	}
+
+	if (CheckSavegameVersion(49)) FOR_ALL_PLAYERS(p) p->face = ConvertFromOldPlayerFace(p->face);
+
 	return true;
 }
 
@@ -1806,6 +1852,7 @@
 	/* reload vehicles */
 	ResetVehiclePosHash();
 	AfterLoadVehicles();
+	StartupEngines();
 	/* update station and waypoint graphics */
 	AfterLoadWaypoints();
 	AfterLoadStations();
--- a/src/os_timer.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/os_timer.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -7,8 +7,12 @@
 /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
  * from external win64.asm because VS2005 does not support inline assembly */
 #if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE)
-# if defined (_M_AMD64)
-extern uint64 _rdtsc(void);
+# if _MSC_VER >= 1400
+#include <intrin.h>
+uint64 _rdtsc(void)
+{
+	return __rdtsc();
+}
 #	else
 uint64 _declspec(naked) _rdtsc(void)
 {
--- a/src/pathfind.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/pathfind.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -786,7 +786,7 @@
 				// Check that the tile contains exactly one track
 				if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
 
-				if (!HASBIT(tpf->railtypes, IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile))) {
+				if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
 					bits = TRACK_BIT_NONE;
 					break;
 				}
--- a/src/player.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/player.h	Sun Mar 04 04:25:36 2007 +0000
@@ -147,6 +147,7 @@
 } PlayerAiNew;
 
 
+typedef uint32 PlayerFace;
 
 typedef struct Player {
 	uint32 name_2;
@@ -155,7 +156,7 @@
 	uint16 president_name_1;
 	uint32 president_name_2;
 
-	uint32 face;
+	PlayerFace face;
 
 	int32 player_money;
 	int32 current_loan;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/player_face.h	Sun Mar 04 04:25:36 2007 +0000
@@ -0,0 +1,153 @@
+/* $Id$ */
+
+/** @file player_face.h Functionality related to the player's face */
+
+#ifndef PLAYER_FACE_H
+#define PLAYER_FACE_H
+
+/** The gender/race combinations that we have faces for */
+enum GenderEthnicity {
+	GENDER_FEMALE    = 0, ///< This bit set means a female, otherwise male
+	ETHNICITY_BLACK  = 1, ///< This bit set means black, otherwise white
+
+	GE_WM = 0,                                         ///< A male of Caucasian origin (white)
+	GE_WF = 1 << GENDER_FEMALE,                        ///< A female of Caucasian origin (white)
+	GE_BM = 1 << ETHNICITY_BLACK,                      ///< A male of African origin (black)
+	GE_BF = 1 << ETHNICITY_BLACK | 1 << GENDER_FEMALE, ///< A female of African origin (black)
+	GE_END,
+};
+DECLARE_ENUM_AS_BIT_SET(GenderEthnicity); ///< See GenderRace as a bitset
+
+/** Bitgroups of the PlayerFace variable */
+enum PlayerFaceVariable {
+	PFV_GENDER,
+	PFV_ETHNICITY,
+	PFV_GEN_ETHN,
+	PFV_HAS_MOUSTACHE,
+	PFV_HAS_TIE_EARRING,
+	PFV_HAS_GLASSES,
+	PFV_EYE_COLOUR,
+	PFV_CHEEKS,
+	PFV_CHIN,
+	PFV_EYEBROWS,
+	PFV_MOUSTACHE,
+	PFV_LIPS,
+	PFV_NOSE,
+	PFV_HAIR,
+	PFV_JACKET,
+	PFV_COLLAR,
+	PFV_TIE_EARRING,
+	PFV_GLASSES,
+	PFV_END
+};
+DECLARE_POSTFIX_INCREMENT(PlayerFaceVariable);
+
+/** Information about the valid values of PlayerFace bitgroups as well as the sprites to draw */
+struct PlayerFaceBitsInfo {
+	byte     offset;               ///< Offset in bits into the PlayerFace
+	byte     length;               ///< Number of bits used in the PlayerFace
+	byte     valid_values[GE_END]; ///< The number of valid values per gender/ethnicity
+	SpriteID first_sprite[GE_END]; ///< The first sprite per gender/ethnicity
+};
+
+/** Lookup table for indices into the PlayerFace, valid ranges and sprites */
+static const PlayerFaceBitsInfo _pf_info[] = {
+	/* Index                   off len   WM  WF  BM  BF         WM     WF     BM     BF */
+	/* PFV_GENDER          */ {  0, 1, {  2,  2,  2,  2 }, {     0,     0,     0,     0 } }, ///< 0 = male, 1 = female
+	/* PFV_ETHNICITY       */ {  1, 2, {  2,  2,  2,  2 }, {     0,     0,     0,     0 } }, ///< 0 = (Western-)Caucasian, 1 = African(-American)/Black
+	/* PFV_GEN_ETHN        */ {  0, 3, {  4,  4,  4,  4 }, {     0,     0,     0,     0 } }, ///< Shortcut to get/set gender _and_ ethnicity
+	/* PFV_HAS_MOUSTACHE   */ {  3, 1, {  2,  0,  2,  0 }, {     0,     0,     0,     0 } }, ///< Females do not have a moustache
+	/* PFV_HAS_TIE_EARRING */ {  3, 1, {  0,  2,  0,  2 }, {     0,     0,     0,     0 } }, ///< Draw the earring for females or not. For males the tie is always drawn.
+	/* PFV_HAS_GLASSES     */ {  4, 1, {  2,  2,  2,  2 }, {     0,     0,     0,     0 } }, ///< Whether to draw glasses or not
+	/* PFV_EYE_COLOUR      */ {  5, 2, {  3,  3,  3,  3 }, {     0,     0,     0,     0 } }, ///< Palette modification
+	/* PFV_CHEEKS          */ {  0, 0, {  1,  1,  1,  1 }, { 0x325, 0x326, 0x390, 0x3B0 } }, ///< Cheeks are only indexed by their gender/ethnicity
+	/* PFV_CHIN            */ {  7, 2, {  4,  1,  2,  2 }, { 0x327, 0x327, 0x391, 0x3B1 } },
+	/* PFV_EYEBROWS        */ {  9, 4, { 12, 16, 11, 16 }, { 0x32B, 0x337, 0x39A, 0x3B8 } },
+	/* PFV_MOUSTACHE       */ { 13, 2, {  3,  0,  3,  0 }, { 0x367,     0, 0x397,     0 } }, ///< Depends on PFV_HAS_MOUSTACHE
+	/* PFV_LIPS            */ { 13, 4, { 13, 10,  9,  9 }, { 0x35B, 0x351, 0x3A5, 0x3C8 } }, ///< Depends on !PFV_HAS_MOUSTACHE
+	/* PFV_NOSE            */ { 17, 3, {  8,  4,  4,  5 }, { 0x349, 0x34C, 0x393, 0x3B3 } }, ///< Depends on !PFV_HAS_MOUSTACHE
+	/* PFV_HAIR            */ { 20, 4, {  9,  5,  5,  4 }, { 0x382, 0x38B, 0x3D4, 0x3D9 } },
+	/* PFV_JACKET          */ { 24, 2, {  3,  3,  3,  3 }, { 0x36B, 0x378, 0x36B, 0x378 } },
+	/* PFV_COLLAR          */ { 26, 2, {  4,  4,  4,  4 }, { 0x36E, 0x37B, 0x36E, 0x37B } },
+	/* PFV_TIE_EARRING     */ { 28, 3, {  6,  3,  6,  3 }, { 0x372, 0x37F, 0x372, 0x3D1 } }, ///< Depends on PFV_HAS_TIE_EARRING
+	/* PFV_GLASSES         */ { 31, 1, {  2,  2,  2,  2 }, { 0x347, 0x347, 0x3AE, 0x3AE } }  ///< Depends on PFV_HAS_GLASSES
+};
+assert_compile(lengthof(_pf_info) == PFV_END);
+
+/**
+ * Gets the player's face bits for the given player face variable
+ * @param pf  the face to extract the bits from
+ * @param pfv the face variable to get the data of
+ * @param ge  the gender and ethnicity of the face
+ * @pre _pf_info[pfv].valid_values[ge] != 0
+ * @return the requested bits
+ */
+static inline uint GetPlayerFaceBits(PlayerFace pf, PlayerFaceVariable pfv, GenderEthnicity ge)
+{
+	assert(_pf_info[pfv].valid_values[ge] != 0);
+
+	return GB(pf, _pf_info[pfv].offset, _pf_info[pfv].length);
+}
+
+/**
+ * Sets the player's face bits for the given player face variable
+ * @param pf  the face to write the bits to
+ * @param pfv the face variable to write the data of
+ * @param ge  the gender and ethnicity of the face
+ * @param val the new value
+ * @pre val < _pf_info[pfv].valid_values[ge]
+ */
+static inline void SetPlayerFaceBits(PlayerFace &pf, PlayerFaceVariable pfv, GenderEthnicity ge, uint val)
+{
+	assert(val < _pf_info[pfv].valid_values[ge]);
+
+	SB(pf, _pf_info[pfv].offset, _pf_info[pfv].length, val);
+}
+
+/**
+ * Checks whether the player bits have a valid range
+ * @param pf  the face to extract the bits from
+ * @param pfv the face variable to get the data of
+ * @param ge  the gender and ethnicity of the face
+ * @return true if and only if the bits are valid
+ */
+static inline bool ArePlayerFaceBitsValid(PlayerFace pf, PlayerFaceVariable pfv, GenderEthnicity ge)
+{
+	return GB(pf, _pf_info[pfv].offset, _pf_info[pfv].length) < _pf_info[pfv].valid_values[ge];
+}
+
+/**
+ * Scales a player face bits variable to the correct scope
+ * @param pfv the face variable to write the data of
+ * @param ge  the gender and ethnicity of the face
+ * @param val the to value to scale
+ * @pre val < (1U << _pf_info[pfv].length), i.e. val has a value of 0..2^(bits used for this variable)-1
+ * @return the scaled value
+ */
+static inline uint ScalePlayerFaceValue(PlayerFaceVariable pfv, GenderEthnicity ge, uint val)
+{
+	assert(val < (1U << _pf_info[pfv].length));
+
+	return (val * _pf_info[pfv].valid_values[ge]) >> _pf_info[pfv].length;
+}
+
+/**
+ * Gets the sprite to draw for the given player face variable
+ * @param pf  the face to extract the data from
+ * @param pfv the face variable to get the sprite of
+ * @param ge  the gender and ethnicity of the face
+ * @pre _pf_info[pfv].valid_values[ge] != 0
+ * @return sprite to draw
+ */
+static inline SpriteID GetPlayerFaceSprite(PlayerFace pf, PlayerFaceVariable pfv, GenderEthnicity ge)
+{
+	assert(_pf_info[pfv].valid_values[ge] != 0);
+
+	return _pf_info[pfv].first_sprite[ge] + GB(pf, _pf_info[pfv].offset, _pf_info[pfv].length);
+}
+
+void DrawPlayerFace(PlayerFace face, int color, int x, int y);
+PlayerFace ConvertFromOldPlayerFace(uint32 face);
+bool IsValidPlayerFace(PlayerFace pf);
+
+#endif /* PLAYER_FACE_H */
--- a/src/player_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/player_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -21,6 +21,7 @@
 #include "newgrf.h"
 #include "network/network_data.h"
 #include "network/network_client.h"
+#include "player_face.h"
 
 static void DoShowPlayerFinances(PlayerID player, bool show_small, bool show_stickied);
 
@@ -505,6 +506,44 @@
 	SelectPlayerLiveryWndProc
 };
 
+/**
+ * Draws the face of a player.
+ * @param pf    the player's face
+ * @param color the (background) color of the gradient
+ * @param x     x-position to draw the face
+ * @param y     y-position to draw the face
+ */
+void DrawPlayerFace(PlayerFace pf, int color, int x, int y)
+{
+	GenderEthnicity ge = (GenderEthnicity)GetPlayerFaceBits(pf, PFV_GEN_ETHN, GE_WM);
+
+	bool has_moustache   = !HASBIT(ge, GENDER_FEMALE) && GetPlayerFaceBits(pf, PFV_HAS_MOUSTACHE,   ge) != 0;
+	bool has_tie_earring = !HASBIT(ge, GENDER_FEMALE) || GetPlayerFaceBits(pf, PFV_HAS_TIE_EARRING, ge) != 0;
+	bool has_glasses     = GetPlayerFaceBits(pf, PFV_HAS_GLASSES, ge) != 0;
+	SpriteID pal;
+	switch (GetPlayerFaceBits(pf, PFV_EYE_COLOUR, ge)) {
+		default: NOT_REACHED();
+		case 0: pal = PALETTE_TO_BROWN; break;
+		case 1: pal = PALETTE_TO_BLUE;  break;
+		case 2: pal = PALETTE_TO_GREEN; break;
+	}
+
+	/* Draw the gradient (background) */
+	DrawSprite(SPR_GRADIENT, GENERAL_SPRITE_COLOR(color), x, y);
+
+	for (PlayerFaceVariable pfv = PFV_CHEEKS; pfv < PFV_END; pfv++) {
+		switch (pfv) {
+			case PFV_MOUSTACHE:   if (!has_moustache)   continue; break;
+			case PFV_LIPS:        /* FALL THROUGH */
+			case PFV_NOSE:        if (has_moustache)    continue; break;
+			case PFV_TIE_EARRING: if (!has_tie_earring) continue; break;
+			case PFV_GLASSES:     if (!has_glasses)     continue; break;
+			default: break;
+		}
+		DrawSprite(GetPlayerFaceSprite(pf, pfv, ge), (pfv == PFV_EYEBROWS) ? pal : PAL_NONE, x, y);
+	}
+}
+
 static void SelectPlayerFaceWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
@@ -531,7 +570,7 @@
 			w->SetDirty();
 			break;
 		case 7:
-			WP(w,facesel_d).face = (WP(w,facesel_d).gender << 31) + GB(InteractiveRandom(), 0, 31);
+			WP(w,facesel_d).face = ConvertFromOldPlayerFace((WP(w, facesel_d).gender << 31) + GB(InteractiveRandom(), 0, 31));
 			w->SetDirty();
 			break;
 		}
--- a/src/players.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/players.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -26,6 +26,7 @@
 #include "ai/ai.h"
 #include "date.h"
 #include "window.h"
+#include "player_face.h"
 
 /**
  * Sets the local player and updates the patch settings that are set on a
@@ -64,22 +65,10 @@
 	DrawSprite(SPR_PLAYER_ICON, PLAYER_SPRITE_COLOR(p), x, y);
 }
 
-/** The gender/race combinations that we have faces for */
-enum GenderRace {
-	GENDER_FEMALE = 0,                                    ///< This bit set means a female, otherwise male
-	RACE_BLACK    = 1,                                    ///< This bit set means black, otherwise white
-
-	WHITE_MALE    = 0,                                    ///< A male of Caucasian origin
-	WHITE_FEMALE  = 1 << GENDER_FEMALE,                   ///< A female of Caucasian origin
-	BLACK_MALE    = 1 << RACE_BLACK,                      ///< A male of African origin
-	BLACK_FEMALE  = 1 << RACE_BLACK | 1 << GENDER_FEMALE, ///< A female of African origin
-};
-DECLARE_ENUM_AS_BIT_SET(GenderRace); ///< See GenderRace as a bitset
-
 /**
- * Draws the face of a player.
+ * Converts an old player face format to the new player face format
  *
- * Meaning of the bits in face (some bits are used in several times):
+ * Meaning of the bits in the old face (some bits are used in several times):
  * - 4 and 5: chin
  * - 6 to 9: eyebrows
  * - 10 to 13: nose
@@ -91,124 +80,87 @@
  * - 19, 26 and 27: race (bit 27 set and bit 19 equal to bit 26 = black, otherwise white)
  * - 31: gender (0 = male, 1 = female)
  *
- * @param face  the bit-encoded representation of the face
- * @param color the (background) color of the gradient
- * @param x     x-position to draw the face
- * @param y     y-position to draw the face
- *
- * @note all magic hexadecimal numbers in this function as sprite IDs.
- * @todo replace magic hexadecimal numbers with enums
+ * @param face the face in the old format
+ * @return the face in the new format
  */
-void DrawPlayerFace(uint32 face, int color, int x, int y)
+PlayerFace ConvertFromOldPlayerFace(uint32 face)
 {
-	GenderRace gen_race = WHITE_MALE;
-
-	if (HASBIT(face, 31)) SetBitT(gen_race, GENDER_FEMALE);
-	if (HASBIT(face, 27) && (HASBIT(face, 26) == HASBIT(face, 19))) SetBitT(gen_race, RACE_BLACK);
-
-	/* Draw the gradient (background) */
-	DrawSprite(SPR_GRADIENT, GENERAL_SPRITE_COLOR(color), x, y);
-
-	/* Draw the cheeks */
-	static const SpriteID cheeks_table[] = { 0x325, 0x326, 0x390, 0x3B0 };
-	DrawSprite(cheeks_table[gen_race], PAL_NONE, x, y);
+	PlayerFace pf = 0;
+	GenderEthnicity ge = GE_WM;
 
-	/* Draw the chin */
-	uint chin = GB(face, 4, 2);
-	if (HASBIT(gen_race, RACE_BLACK)) {
-		DrawSprite((HASBIT(gen_race, GENDER_FEMALE) ? 0x3B1 : 0x391) + (chin >> 1), PAL_NONE, x, y);
-	} else {
-		DrawSprite(0x327 + (HASBIT(gen_race, GENDER_FEMALE) ? 0 : chin), PAL_NONE, x, y);
-	}
-
-	/* Draw the eyes */
-	uint eye_colour = GB(face, 20, 3);
-	uint eyebrows   = GB(face,  6, 4);
-	SpriteID pal;
+	if (HASBIT(face, 31)) SetBitT(ge, GENDER_FEMALE);
+	if (HASBIT(face, 27) && (HASBIT(face, 26) == HASBIT(face, 19))) SetBitT(ge, ETHNICITY_BLACK);
 
-	if (eye_colour < 6) {
-		pal = PALETTE_TO_BROWN;
-	} else if (eye_colour == 6) {
-		pal = PALETTE_TO_BLUE;
+	SetPlayerFaceBits(pf, PFV_GEN_ETHN,    ge, ge);
+	SetPlayerFaceBits(pf, PFV_HAS_GLASSES, ge, GB(face, 28, 3) <= 1);
+	SetPlayerFaceBits(pf, PFV_EYE_COLOUR,  ge, clampu(GB(face, 20, 3), 5, 7) - 5);
+	SetPlayerFaceBits(pf, PFV_CHIN,        ge, ScalePlayerFaceValue(PFV_CHIN,     ge, GB(face,  4, 2)));
+	SetPlayerFaceBits(pf, PFV_EYEBROWS,    ge, ScalePlayerFaceValue(PFV_EYEBROWS, ge, GB(face,  6, 4)));
+	SetPlayerFaceBits(pf, PFV_HAIR,        ge, ScalePlayerFaceValue(PFV_HAIR,     ge, GB(face, 16, 4)));
+	SetPlayerFaceBits(pf, PFV_JACKET,      ge, ScalePlayerFaceValue(PFV_JACKET,   ge, GB(face, 20, 2)));
+	SetPlayerFaceBits(pf, PFV_COLLAR,      ge, ScalePlayerFaceValue(PFV_COLLAR,   ge, GB(face, 22, 2)));
+	SetPlayerFaceBits(pf, PFV_GLASSES,     ge, GB(face, 28, 1));
+
+	uint lips = GB(face, 10, 4);
+	if (!HASBIT(ge, GENDER_FEMALE) && lips < 4) {
+		SetPlayerFaceBits(pf, PFV_HAS_MOUSTACHE, ge, true);
+		SetPlayerFaceBits(pf, PFV_MOUSTACHE,     ge, max(lips, 1U) - 1);
 	} else {
-		pal = PALETTE_TO_GREEN;
-	}
+		if (!HASBIT(ge, GENDER_FEMALE)) {
+			lips -= 3;
+			if (HASBIT(ge, ETHNICITY_BLACK) && lips > 8) lips = 0;
+		} else {
+			lips = ScalePlayerFaceValue(PFV_LIPS, ge, lips);
+		}
+		SetPlayerFaceBits(pf, PFV_LIPS, ge, lips);
 
-	switch (gen_race) {
-		case WHITE_MALE:   DrawSprite(0x32B + (eyebrows * 12 >> 4), pal, x, y); break;
-		case WHITE_FEMALE: DrawSprite(0x337 + eyebrows,             pal, x, y); break;
-		case BLACK_MALE:   DrawSprite(0x39A + (eyebrows * 11 >> 4), pal, x, y); break;
-		case BLACK_FEMALE: DrawSprite(0x3B8 + eyebrows,             pal, x, y); break;
+		uint nose = GB(face, 13, 3);
+		if (ge == GE_WF) {
+			nose = (nose * 3 >> 3) * 3 >> 2; // There is 'hole' in the nose sprites for females
+		} else {
+			nose = ScalePlayerFaceValue(PFV_NOSE, ge, nose);
+		}
+		SetPlayerFaceBits(pf, PFV_NOSE, ge, nose);
 	}
 
-	/* Draw the mouth */
-	uint nose = GB(face, 13, 3);
-	uint lips = GB(face, 10, 4);
-
-	if (!HASBIT(gen_race, GENDER_FEMALE)) {
-		lips = (lips * 15 >> 4);
-
-		if (lips < 3) {
-			/* Moustache, including nose and lips */
-			DrawSprite((HASBIT(gen_race, RACE_BLACK) ? 0x397 : 0x367) + lips, PAL_NONE, x, y);
-
-			/* Skip the rest */
-			goto skip_mouth;
-		}
-
-		/* Lips */
-		lips -= 3;
-		if (HASBIT(gen_race, RACE_BLACK)) {
-			if (lips > 8) lips = 0;
-			lips += 0x3A5 - 0x35B;
-		}
-		DrawSprite(lips + 0x35B, PAL_NONE, x, y);
-	} else if (HASBIT(gen_race, RACE_BLACK)) {
-		/* Female lips with make up */
-		DrawSprite((lips * 9 >> 4) + 0x3C8, PAL_NONE, x, y);
-	} else {
-		/* Female lips */
-		DrawSprite((lips * 10 >> 4) + 0x351, PAL_NONE, x, y);
+	uint tie_earring = GB(face, 24, 4);
+	if (!HASBIT(ge, GENDER_FEMALE) || tie_earring < 3) { // Not all females have an earring
+		if (HASBIT(ge, GENDER_FEMALE)) SetPlayerFaceBits(pf, PFV_HAS_TIE_EARRING, ge, true);
+		SetPlayerFaceBits(pf, PFV_TIE_EARRING, ge, HASBIT(ge, GENDER_FEMALE) ? tie_earring : ScalePlayerFaceValue(PFV_TIE_EARRING, ge, tie_earring / 2));
 	}
 
-	{
-		/* Nose */
-		static const SpriteID mouth_table[] = { 0x34C, 0x34D, 0x34F };
-		switch (gen_race) {
-			case WHITE_MALE:   DrawSprite(0x349 + nose,                 PAL_NONE, x, y); break;
-			case WHITE_FEMALE: DrawSprite(mouth_table[(nose * 3 >> 3)], PAL_NONE, x, y); break;
-			case BLACK_MALE:   DrawSprite(0x393 + (nose & 3),           PAL_NONE, x, y); break;
-			case BLACK_FEMALE: DrawSprite(0x3B3 + (nose * 5 >> 3),      PAL_NONE, x, y); break;
+	return pf;
+}
+
+/**
+ * Checks whether a player's face is a valid encoding.
+ * Unused bits are not enforced to be 0.
+ * @param pf the fact to check
+ * @return true if and only if the face is valid
+ */
+bool IsValidPlayerFace(PlayerFace pf)
+{
+	if (!ArePlayerFaceBitsValid(pf, PFV_GEN_ETHN, GE_WM)) return false;
+
+	GenderEthnicity ge   = (GenderEthnicity)GetPlayerFaceBits(pf, PFV_GEN_ETHN, GE_WM);
+	bool has_moustache   = !HASBIT(ge, GENDER_FEMALE) && GetPlayerFaceBits(pf, PFV_HAS_MOUSTACHE,   ge) != 0;
+	bool has_tie_earring = !HASBIT(ge, GENDER_FEMALE) || GetPlayerFaceBits(pf, PFV_HAS_TIE_EARRING, ge) != 0;
+	bool has_glasses     = GetPlayerFaceBits(pf, PFV_HAS_GLASSES, ge) != 0;
+
+	if (!ArePlayerFaceBitsValid(pf, PFV_EYE_COLOUR, ge)) return false;
+	for (PlayerFaceVariable pfv = PFV_CHEEKS; pfv < PFV_END; pfv++) {
+		switch (pfv) {
+			case PFV_MOUSTACHE:   if (!has_moustache)   continue; break;
+			case PFV_LIPS:        /* FALL THROUGH */
+			case PFV_NOSE:        if (has_moustache)    continue; break;
+			case PFV_TIE_EARRING: if (!has_tie_earring) continue; break;
+			case PFV_GLASSES:     if (!has_glasses)     continue; break;
+			default: break;
 		}
-	}
-skip_mouth:
-
-	/* Draw the hair */
-	uint hair = GB(face, 16, 4);
-	switch (gen_race) {
-		case WHITE_MALE:   DrawSprite(0x382 + (hair * 9 >> 4), PAL_NONE, x, y); break;
-		case WHITE_FEMALE: DrawSprite(0x38B + (hair * 5 >> 4), PAL_NONE, x, y); break;
-		case BLACK_MALE:   DrawSprite(0x3D4 + (hair * 5 >> 4), PAL_NONE, x, y); break;
-		case BLACK_FEMALE: DrawSprite(0x3D9 + (hair * 5 >> 4), PAL_NONE, x, y); break;
+		if (!ArePlayerFaceBitsValid(pf, pfv, ge)) return false;
 	}
 
-	/* Draw the tie, ear rings etc. */
-	uint tie = GB(face, 20, 8);
-	if (HASBIT(gen_race, GENDER_FEMALE)) {
-		DrawSprite(0x378 + (GB(tie, 0, 2) * 3 >> 2), PAL_NONE, x, y);
-		DrawSprite(0x37B + (GB(tie, 2, 2) * 4 >> 2), PAL_NONE, x, y);
-
-		tie >>= 4;
-		if (tie < 3) DrawSprite((HASBIT(gen_race, RACE_BLACK) ? 0x3D1 : 0x37F) + tie, PAL_NONE, x, y);
-	} else {
-		DrawSprite(0x36B + (GB(tie, 0, 2) * 3 >> 2), PAL_NONE, x, y);
-		DrawSprite(0x36E + (GB(tie, 2, 2) * 4 >> 2), PAL_NONE, x, y);
-		DrawSprite(0x372 + (GB(tie, 4, 4) * 6 >> 4), PAL_NONE, x, y);
-	}
-
-	/* draw the glasses */
-	uint glasses = GB(face, 28, 3);
-	if (glasses <= 1) DrawSprite((HASBIT(gen_race, RACE_BLACK) ? 0x3AE : 0x347) + glasses, PAL_NONE, x, y);
+	return true;
 }
 
 void InvalidatePlayerWindows(const Player *p)
@@ -519,7 +471,7 @@
 
 	p->avail_railtypes = GetPlayerRailtypes(p->index);
 	p->inaugurated_year = _cur_year;
-	p->face = Random();
+	p->face = ConvertFromOldPlayerFace(Random());
 
 	/* Engine renewal settings */
 	p->engine_renew_list = NULL;
--- a/src/rail.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/rail.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -110,7 +110,7 @@
 
 		case MP_STREET:
 			/* rail/road crossing */
-			if (IsLevelCrossing(tile)) return GetRailTypeCrossing(tile);
+			if (IsLevelCrossing(tile)) return GetRailType(tile);
 			break;
 
 		case MP_STATION:
--- a/src/rail.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/rail.h	Sun Mar 04 04:25:36 2007 +0000
@@ -161,7 +161,6 @@
 template <> struct EnumPropsT<TrackdirBits> : MakeEnumPropsT<TrackdirBits, uint16, TRACKDIR_BIT_NONE, TRACKDIR_BIT_MASK, INVALID_TRACKDIR_BIT> {};
 typedef TinyEnumT<TrackdirBits> TrackdirBitsShort;
 DECLARE_ENUM_AS_BIT_SET(TrackdirBits);
-DECLARE_ENUM_AS_BIT_INDEX(Trackdir, TrackdirBits);
 
 /** This struct contains all the info that is needed to draw and construct tracks.
  */
@@ -240,7 +239,6 @@
 	byte custom_ground_offset;
 } RailtypeInfo;
 
-extern RailtypeInfo _railtypes[RAILTYPE_END];
 
 // these are the maximums used for updating signal blocks, and checking if a depot is in a pbs block
 enum {
@@ -292,7 +290,7 @@
 */
 static inline Track TrackBitsToTrack(TrackBits tracks)
 {
-	assert (tracks == INVALID_TRACK_BIT || (tracks != TRACK_BIT_NONE && KILL_FIRST_BIT(tracks) == 0));
+	assert(tracks == INVALID_TRACK_BIT || (tracks != TRACK_BIT_NONE && KILL_FIRST_BIT(tracks) == 0));
 	return tracks != INVALID_TRACK_BIT ? (Track)FIND_FIRST_BIT(tracks) : INVALID_TRACK;
 }
 
@@ -322,14 +320,18 @@
  * Maps a trackdir to the bit that stores its status in the map arrays, in the
  * direction along with the trackdir.
  */
-extern const byte _signal_along_trackdir[TRACKDIR_END];
-static inline byte SignalAlongTrackdir(Trackdir trackdir) {return _signal_along_trackdir[trackdir];}
+static inline byte SignalAlongTrackdir(Trackdir trackdir)
+{
+	extern const byte _signal_along_trackdir[TRACKDIR_END];
+	return _signal_along_trackdir[trackdir];
+}
 
 /**
  * Maps a trackdir to the bit that stores its status in the map arrays, in the
  * direction against the trackdir.
  */
-static inline byte SignalAgainstTrackdir(Trackdir trackdir) {
+static inline byte SignalAgainstTrackdir(Trackdir trackdir)
+{
 	extern const byte _signal_against_trackdir[TRACKDIR_END];
 	return _signal_against_trackdir[trackdir];
 }
@@ -338,7 +340,8 @@
  * Maps a Track to the bits that store the status of the two signals that can
  * be present on the given track.
  */
-static inline byte SignalOnTrack(Track track) {
+static inline byte SignalOnTrack(Track track)
+{
 	extern const byte _signal_on_track[TRACK_END];
 	return _signal_on_track[track];
 }
@@ -347,9 +350,6 @@
 /*
  * Functions describing logical relations between Tracks, TrackBits, Trackdirs
  * TrackdirBits, Direction and DiagDirections.
- *
- * TODO: Add #unndefs or something similar to remove the arrays used below
- * from the global scope and expose direct uses of them.
  */
 
 /**
@@ -463,13 +463,15 @@
 	return _dir_to_diag_trackdir[diagdir];
 }
 
-extern const TrackdirBits _exitdir_reaches_trackdirs[DIAGDIR_END];
-
 /**
  * Returns all trackdirs that can be reached when entering a tile from a given
  * (diagonal) direction. This will obviously include 90 degree turns, since no
  * information is available about the exact angle of entering */
-static inline TrackdirBits DiagdirReachesTrackdirs(DiagDirection diagdir) { return _exitdir_reaches_trackdirs[diagdir]; }
+static inline TrackdirBits DiagdirReachesTrackdirs(DiagDirection diagdir)
+{
+	extern const TrackdirBits _exitdir_reaches_trackdirs[DIAGDIR_END];
+	return _exitdir_reaches_trackdirs[diagdir];
+}
 
 /**
  * Returns all tracks that can be reached when entering a tile from a given
@@ -481,7 +483,12 @@
  * Maps a trackdir to the trackdirs that can be reached from it (ie, when
  * entering the next tile. This will include 90 degree turns!
  */
-static inline TrackdirBits TrackdirReachesTrackdirs(Trackdir trackdir) { return _exitdir_reaches_trackdirs[TrackdirToExitdir(trackdir)]; }
+static inline TrackdirBits TrackdirReachesTrackdirs(Trackdir trackdir)
+{
+	extern const TrackdirBits _exitdir_reaches_trackdirs[DIAGDIR_END];
+	return _exitdir_reaches_trackdirs[TrackdirToExitdir(trackdir)];
+}
+
 /* Note that there is no direct table for this function (there used to be),
  * but it uses two simpeler tables to achieve the result */
 
@@ -489,7 +496,8 @@
 /**
  * Maps a trackdir to all trackdirs that make 90 deg turns with it.
  */
-static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir) {
+static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir)
+{
 	extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END];
 	return _track_crosses_trackdirs[TrackdirToTrack(trackdir)];
 }
@@ -509,6 +517,7 @@
  */
 static inline const RailtypeInfo *GetRailTypeInfo(RailType railtype)
 {
+	extern RailtypeInfo _railtypes[RAILTYPE_END];
 	assert(railtype < RAILTYPE_END);
 	return &_railtypes[railtype];
 }
--- a/src/rail_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/rail_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -3,6 +3,7 @@
 #include "stdafx.h"
 #include "openttd.h"
 #include "bridge_map.h"
+#include "bridge.h"
 #include "cmd_helper.h"
 #include "debug.h"
 #include "functions.h"
@@ -660,7 +661,7 @@
 	if (flags & DC_EXEC) {
 		if (!HasSignals(tile)) {
 			// there are no signals at all on this tile yet
-			_m[tile].m5 |= RAIL_TILE_SIGNALS; // change into signals
+			SetHasSignals(tile, true);
 			_m[tile].m2 |= 0xF0;              // all signals are on
 			_m[tile].m3 &= ~0xF0;          // no signals built by default
 			SetSignalType(tile, SIGTYPE_NORMAL);
@@ -823,7 +824,7 @@
 		/* removed last signal from tile? */
 		if (GB(_m[tile].m3, 4, 4) == 0) {
 			SB(_m[tile].m2, 4, 4, 0);
-			SB(_m[tile].m5, 6, 2, RAIL_TILE_NORMAL >> 6); // XXX >> because the constant is meant for direct application, not use with SB
+			SetHasSignals(tile, false);
 			SetSignalVariant(tile, SIG_ELECTRIC); // remove any possible semaphores
 		}
 
@@ -1003,12 +1004,11 @@
 			return cost;
 		}
 
-		case RAIL_TILE_DEPOT_WAYPOINT:
-			if (GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
-				return RemoveTrainDepot(tile, flags);
-			} else {
-				return RemoveTrainWaypoint(tile, flags, false);
-			}
+		case RAIL_TILE_DEPOT:
+			return RemoveTrainDepot(tile, flags);
+
+		case RAIL_TILE_WAYPOINT:
+			return RemoveTrainWaypoint(tile, flags, false);
 
 		default:
 			return CMD_ERROR;
@@ -1283,7 +1283,7 @@
 
 		if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
 
-		if (GetRailTileSubtype(ti->tile) == RAIL_SUBTYPE_DEPOT) {
+		if (IsRailDepot(ti->tile)) {
 			dts = &_depot_gfx_table[GetRailDepotDirection(ti->tile)];
 
 			relocation = rti->total_offset;
@@ -1845,16 +1845,21 @@
 
 static uint32 GetTileTrackStatus_Track(TileIndex tile, TransportType mode)
 {
-	byte a;
-	uint16 b;
-
 	if (mode != TRANSPORT_RAIL) return 0;
 
-	if (IsPlainRailTile(tile)) {
-		TrackBits rails = GetTrackBits(tile);
-		uint32 ret = rails * 0x101;
+	switch (GetRailTileType(tile)) {
+		default: NOT_REACHED();
+		case RAIL_TILE_NORMAL: {
+			TrackBits rails = GetTrackBits(tile);
+			uint32 ret = rails * 0x101;
+			return (rails == TRACK_BIT_CROSS) ? ret | 0x40 : ret;
+		}
 
-		if (HasSignals(tile)) {
+		case RAIL_TILE_SIGNALS: {
+			uint32 ret = GetTrackBits(tile) * 0x101;
+			byte a;
+			uint16 b;
+
 			a = _m[tile].m3;
 			b = _m[tile].m2;
 
@@ -1871,25 +1876,21 @@
 			if ((b & 0x40) == 0) ret |= 0x07100000;
 			if ((b & 0x20) == 0) ret |= 0x20080000;
 			if ((b & 0x10) == 0) ret |= 0x08200000;
-		} else {
-			if (rails == TRACK_BIT_CROSS) ret |= 0x40;
+
+			return ret;
 		}
-		return ret;
-	} else {
-		if (GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
-			return AxisToTrackBits(DiagDirToAxis(GetRailDepotDirection(tile))) * 0x101;
-		} else {
-			return GetRailWaypointBits(tile) * 0x101;
-		}
+
+		case RAIL_TILE_DEPOT:    return AxisToTrackBits(DiagDirToAxis(GetRailDepotDirection(tile))) * 0x101;
+		case RAIL_TILE_WAYPOINT: return GetRailWaypointBits(tile) * 0x101;
 	}
 }
 
 static void ClickTile_Track(TileIndex tile)
 {
-	if (IsTileDepotType(tile, TRANSPORT_RAIL)) {
-		ShowDepotWindow(tile, VEH_Train);
-	} else if (IsRailWaypoint(tile)) {
-		ShowRenameWaypointWindow(GetWaypointByTile(tile));
+	switch (GetRailTileType(tile)) {
+		case RAIL_TILE_DEPOT:    ShowDepotWindow(tile, VEH_Train);                  break;
+		case RAIL_TILE_WAYPOINT: ShowRenameWaypointWindow(GetWaypointByTile(tile)); break;
+		default: break;
 	}
 }
 
@@ -1913,10 +1914,13 @@
 			break;
 		}
 
-		case RAIL_TILE_DEPOT_WAYPOINT:
+		case RAIL_TILE_DEPOT:
+			td->str = STR_1023_RAILROAD_TRAIN_DEPOT;
+			break;
+
+		case RAIL_TILE_WAYPOINT:
 		default:
-			td->str = (GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) ?
-				STR_1023_RAILROAD_TRAIN_DEPOT : STR_LANDINFO_WAYPOINT;
+			td->str = STR_LANDINFO_WAYPOINT;
 			break;
 	}
 }
--- a/src/rail_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/rail_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -796,16 +796,31 @@
 		case 8:
 		case 9:
 		case 10:
-		case 11:
+		case 11: {
 			w->RaiseWidget(_railstation.numtracks + 4);
 			w->RaiseWidget(19);
+
 			_railstation.numtracks = (e->we.click.widget - 5) + 1;
 			_railstation.dragdrop = false;
+
+			const StationSpec *statspec = _railstation.newstations ? GetCustomStationSpec(_railstation.station_class, _railstation.station_type) : NULL;
+			if (statspec != NULL && HASBIT(statspec->disallowed_lengths, _railstation.platlength - 1)) {
+				/* The previously selected number of platforms in invalid */
+				for (uint i = 0; i < 7; i++) {
+					if (!HASBIT(statspec->disallowed_lengths, i)) {
+						w->RaiseWidget(_railstation.platlength + 11);
+						_railstation.platlength = i + 1;
+						break;
+					}
+				}
+			}
+
 			w->LowerWidget(_railstation.platlength + 11);
 			w->LowerWidget(_railstation.numtracks + 4);
 			SndPlayFx(SND_15_BEEP);
 			w->SetDirty();
 			break;
+		}
 
 		case 12:
 		case 13:
@@ -813,16 +828,31 @@
 		case 15:
 		case 16:
 		case 17:
-		case 18:
+		case 18: {
 			w->RaiseWidget(_railstation.platlength + 11);
 			w->RaiseWidget(19);
+
 			_railstation.platlength = (e->we.click.widget - 12) + 1;
 			_railstation.dragdrop = false;
+
+			const StationSpec *statspec = _railstation.newstations ? GetCustomStationSpec(_railstation.station_class, _railstation.station_type) : NULL;
+			if (statspec != NULL && HASBIT(statspec->disallowed_platforms, _railstation.numtracks - 1)) {
+				/* The previously selected number of tracks in invalid */
+				for (uint i = 0; i < 7; i++) {
+					if (!HASBIT(statspec->disallowed_platforms, i)) {
+						w->RaiseWidget(_railstation.numtracks + 4);
+						_railstation.numtracks = i + 1;
+						break;
+					}
+				}
+			}
+
 			w->LowerWidget(_railstation.platlength + 11);
 			w->LowerWidget(_railstation.numtracks + 4);
 			SndPlayFx(SND_15_BEEP);
 			w->SetDirty();
 			break;
+		}
 
 		case 19:
 			_railstation.dragdrop ^= true;
--- a/src/rail_map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/rail_map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -9,17 +9,16 @@
 
 
 typedef enum RailTileType {
-	RAIL_TILE_NORMAL         = 0x0,
-	RAIL_TILE_SIGNALS        = 0x40,
-	RAIL_TILE_UNUSED         = 0x80, /* XXX: Maybe this could become waypoints? */
-	RAIL_TILE_DEPOT_WAYPOINT = 0xC0, /* Is really depots and waypoints... */
-	RAIL_TILE_TYPE_MASK      = 0xC0
+	RAIL_TILE_NORMAL   = 0,
+	RAIL_TILE_SIGNALS  = 1,
+	RAIL_TILE_WAYPOINT = 2,
+	RAIL_TILE_DEPOT    = 3,
 } RailTileType;
 
 static inline RailTileType GetRailTileType(TileIndex t)
 {
 	assert(IsTileType(t, MP_RAILWAY));
-	return (RailTileType)(_m[t].m5 & RAIL_TILE_TYPE_MASK);
+	return (RailTileType)GB(_m[t].m5, 6, 2);
 }
 
 /**
@@ -40,39 +39,25 @@
 	return GetRailTileType(tile) == RAIL_TILE_SIGNALS;
 }
 
-
-/** These specify the subtype when the main rail type is
- * RAIL_TILE_DEPOT_WAYPOINT */
-typedef enum RailTileSubtypes {
-	RAIL_SUBTYPE_DEPOT    = 0x00,
-	RAIL_SUBTYPE_WAYPOINT = 0x04,
-	RAIL_SUBTYPE_MASK     = 0x3C
-} RailTileSubtype;
-
 /**
- * Returns the RailTileSubtype of a given rail tile with type
- * RAIL_TILE_DEPOT_WAYPOINT
+ * Add/remove the 'has signal' bit from the RailTileType
  */
-static inline RailTileSubtype GetRailTileSubtype(TileIndex tile)
+static inline void SetHasSignals(TileIndex tile, bool signals)
 {
-	assert(GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT);
-	return (RailTileSubtype)(_m[tile].m5 & RAIL_SUBTYPE_MASK);
+	assert(IsPlainRailTile(tile));
+	SB(_m[tile].m5, 6, 1, signals);
 }
 
 
 static inline bool IsRailDepot(TileIndex t)
 {
-	return
-		GetRailTileType(t) == RAIL_TILE_DEPOT_WAYPOINT &&
-		GetRailTileSubtype(t) == RAIL_SUBTYPE_DEPOT;
+	return GetRailTileType(t) == RAIL_TILE_DEPOT;
 }
 
 
 static inline bool IsRailWaypoint(TileIndex t)
 {
-	return
-		GetRailTileType(t) == RAIL_TILE_DEPOT_WAYPOINT &&
-		GetRailTileSubtype(t) == RAIL_SUBTYPE_WAYPOINT;
+	return GetRailTileType(t) == RAIL_TILE_WAYPOINT;
 }
 
 
@@ -81,23 +66,11 @@
 	return (RailType)GB(_m[t].m3, 0, 4);
 }
 
-// TODO remove this by moving to the same bits as GetRailType()
-static inline RailType GetRailTypeCrossing(TileIndex t)
-{
-	return (RailType)GB(_m[t].m4, 0, 4);
-}
-
 static inline void SetRailType(TileIndex t, RailType r)
 {
 	SB(_m[t].m3, 0, 4, r);
 }
 
-// TODO remove this by moving to the same bits as SetRailType()
-static inline void SetRailTypeCrossing(TileIndex t, RailType r)
-{
-	SB(_m[t].m4, 0, 4, r);
-}
-
 
 static inline TrackBits GetTrackBits(TileIndex tile)
 {
@@ -140,6 +113,10 @@
 	return TrackToTrackBits(GetRailWaypointTrack(t));
 }
 
+static inline WaypointID GetWaypointIndex(TileIndex t)
+{
+	return (WaypointID)_m[t].m2;
+}
 
 typedef enum SignalType {
 	SIGTYPE_NORMAL  = 0, // normal signal
@@ -151,13 +128,13 @@
 static inline SignalType GetSignalType(TileIndex t)
 {
 	assert(GetRailTileType(t) == RAIL_TILE_SIGNALS);
-	return (SignalType)GB(_m[t].m4, 0, 2);
+	return (SignalType)GB(_m[t].m2, 0, 2);
 }
 
 static inline void SetSignalType(TileIndex t, SignalType s)
 {
 	assert(GetRailTileType(t) == RAIL_TILE_SIGNALS);
-	SB(_m[t].m4, 0, 2, s);
+	SB(_m[t].m2, 0, 2, s);
 }
 
 static inline bool IsPresignalEntry(TileIndex t)
@@ -189,12 +166,12 @@
 
 static inline SignalVariant GetSignalVariant(TileIndex t)
 {
-	return (SignalVariant)GB(_m[t].m4, 2, 1);
+	return (SignalVariant)GB(_m[t].m2, 2, 1);
 }
 
 static inline void SetSignalVariant(TileIndex t, SignalVariant v)
 {
-	SB(_m[t].m4, 2, 1, v);
+	SB(_m[t].m2, 2, 1, v);
 }
 
 static inline bool IsSignalPresent(TileIndex t, byte signalbit)
@@ -283,18 +260,12 @@
 
 static inline void SetRailGroundType(TileIndex t, RailGroundType rgt)
 {
-	if (GetRailTileType(t) == RAIL_TILE_DEPOT_WAYPOINT) {
-		SB(_m[t].m4, 0, 4, rgt);
-		return;
-	}
-	SB(_m[t].m2, 0, 4, rgt);
+	SB(_m[t].m4, 0, 4, rgt);
 }
 
 static inline RailGroundType GetRailGroundType(TileIndex t)
 {
-	/* TODO Unify this */
-	if (GetRailTileType(t) == RAIL_TILE_DEPOT_WAYPOINT) return (RailGroundType)GB(_m[t].m4, 0, 4);
-	return (RailGroundType)GB(_m[t].m2, 0, 4);
+	return (RailGroundType)GB(_m[t].m4, 0, 4);
 }
 
 static inline bool IsSnowRailGround(TileIndex t)
@@ -310,7 +281,7 @@
 	_m[t].m2 = 0;
 	_m[t].m3 = r;
 	_m[t].m4 = 0;
-	_m[t].m5 = RAIL_TILE_NORMAL | b;
+	_m[t].m5 = RAIL_TILE_NORMAL << 6 | b;
 }
 
 
@@ -321,7 +292,7 @@
 	_m[t].m2 = 0;
 	_m[t].m3 = r;
 	_m[t].m4 = 0;
-	_m[t].m5 = RAIL_TILE_DEPOT_WAYPOINT | RAIL_SUBTYPE_DEPOT | d;
+	_m[t].m5 = RAIL_TILE_DEPOT << 6 | d;
 }
 
 
@@ -332,7 +303,7 @@
 	_m[t].m2 = index;
 	_m[t].m3 = r;
 	_m[t].m4 = 0;
-	_m[t].m5 = RAIL_TILE_DEPOT_WAYPOINT | RAIL_SUBTYPE_WAYPOINT | a;
+	_m[t].m5 = RAIL_TILE_WAYPOINT << 6 | a;
 }
 
 #endif /* RAIL_MAP_H */
--- a/src/road_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/road_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -3,6 +3,7 @@
 #include "stdafx.h"
 #include "openttd.h"
 #include "bridge_map.h"
+#include "bridge.h"
 #include "cmd_helper.h"
 #include "rail_map.h"
 #include "road_map.h"
@@ -161,7 +162,7 @@
 			if (flags & DC_EXEC) {
 				ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM);
 
-				MakeRailNormal(tile, GetTileOwner(tile), GetCrossingRailBits(tile), GetRailTypeCrossing(tile));
+				MakeRailNormal(tile, GetTileOwner(tile), GetCrossingRailBits(tile), GetRailType(tile));
 				MarkTileDirtyByTile(tile);
 				YapfNotifyTrackLayoutChange(tile, FindFirstTrack(GetTrackBits(tile)));
 			}
@@ -373,13 +374,13 @@
 	// not owned by me?
 	if (!CheckTileOwnership(tile) || !EnsureNoVehicle(tile)) return CMD_ERROR;
 
-	if (GetRailTypeCrossing(tile) == totype) return CMD_ERROR;
+	if (GetRailType(tile) == totype) return CMD_ERROR;
 
 	// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
-	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailTypeCrossing(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
+	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 
 	if (exec) {
-		SetRailTypeCrossing(tile, totype);
+		SetRailType(tile, totype);
 		MarkTileDirtyByTile(tile);
 		YapfNotifyTrackLayoutChange(tile, FindFirstTrack(GetCrossingRailBits(tile)));
 	}
@@ -716,7 +717,7 @@
 
 			if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
 
-			image = GetRailTypeInfo(GetRailTypeCrossing(ti->tile))->base_sprites.crossing;
+			image = GetRailTypeInfo(GetRailType(ti->tile))->base_sprites.crossing;
 
 			if (GetCrossingRoadAxis(ti->tile) == AXIS_X) image++;
 			if (IsCrossingBarred(ti->tile)) image += 2;
@@ -732,7 +733,7 @@
 			}
 
 			DrawGroundSprite(image, pal);
-			if (GetRailTypeCrossing(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti);
+			if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti);
 			break;
 		}
 
--- a/src/road_map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/road_map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -65,13 +65,13 @@
 static inline Owner GetCrossingRoadOwner(TileIndex t)
 {
 	assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
-	return (Owner)_m[t].m3;
+	return (Owner)_m[t].m4;
 }
 
 static inline void SetCrossingRoadOwner(TileIndex t, Owner o)
 {
 	assert(GetRoadTileType(t) == ROAD_TILE_CROSSING);
-	_m[t].m3 = o;
+	_m[t].m4 = o;
 }
 
 static inline void UnbarCrossing(TileIndex t)
@@ -95,13 +95,13 @@
 #define IsOnDesert IsOnSnow
 static inline bool IsOnSnow(TileIndex t)
 {
-	return HASBIT(_m[t].m4, 7);
+	return HASBIT(_m[t].m3, 7);
 }
 
 #define ToggleDesert ToggleSnow
 static inline void ToggleSnow(TileIndex t)
 {
-	TOGGLEBIT(_m[t].m4, 7);
+	TOGGLEBIT(_m[t].m3, 7);
 }
 
 
@@ -117,12 +117,12 @@
 
 static inline Roadside GetRoadside(TileIndex tile)
 {
-	return (Roadside)GB(_m[tile].m4, 4, 3);
+	return (Roadside)GB(_m[tile].m3, 4, 3);
 }
 
 static inline void SetRoadside(TileIndex tile, Roadside s)
 {
-	SB(_m[tile].m4, 4, 3, s);
+	SB(_m[tile].m3, 4, 3, s);
 }
 
 static inline bool HasRoadWorks(TileIndex t)
@@ -132,9 +132,9 @@
 
 static inline bool IncreaseRoadWorksCounter(TileIndex t)
 {
-	AB(_m[t].m4, 0, 4, 1);
+	AB(_m[t].m3, 0, 4, 1);
 
-	return GB(_m[t].m4, 0, 4) == 15;
+	return GB(_m[t].m3, 0, 4) == 15;
 }
 
 static inline void StartRoadWorks(TileIndex t)
@@ -153,7 +153,7 @@
 	assert(HasRoadWorks(t));
 	SetRoadside(t, (Roadside)(GetRoadside(t) - ROADSIDE_GRASS_ROAD_WORKS + ROADSIDE_GRASS));
 	/* Stop the counter */
-	SB(_m[t].m4, 0, 4, 0);
+	SB(_m[t].m3, 0, 4, 0);
 }
 
 
@@ -183,8 +183,8 @@
 	SetTileType(t, MP_STREET);
 	SetTileOwner(t, owner);
 	_m[t].m2 = town;
-	_m[t].m3 = 0;
-	_m[t].m4 = 0 << 7 | 0 << 4 | 0;
+	_m[t].m3 = 0 << 7 | 0 << 4 | 0;
+	_m[t].m4 = 0;
 	_m[t].m5 = ROAD_TILE_NORMAL << 4 | bits;
 }
 
@@ -194,8 +194,8 @@
 	SetTileType(t, MP_STREET);
 	SetTileOwner(t, rail);
 	_m[t].m2 = town;
-	_m[t].m3 = road;
-	_m[t].m4 = 0 << 7 | 0 << 4 | rt;
+	_m[t].m3 = 0 << 7 | 0 << 4 | rt;
+	_m[t].m4 = road;
 	_m[t].m5 = ROAD_TILE_CROSSING << 4 | roaddir << 3 | 0 << 2;
 }
 
--- a/src/roadveh_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/roadveh_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -204,6 +204,9 @@
 		v->cur_image = 0xC15;
 		v->random_bits = VehicleRandomBits();
 
+		v->vehicle_flags = 0;
+		if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SETBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
+
 		VehiclePositionChanged(v);
 
 		InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
@@ -748,7 +751,7 @@
 			if (--v->load_unload_time_rem != 0) return;
 
 			if (CanFillVehicle(v) && (v->current_order.flags & OF_FULL_LOAD ||
-					(_patches.gradual_loading && !HASBIT(v->load_status, LS_LOADING_FINISHED)))) {
+					(_patches.gradual_loading && !HASBIT(v->vehicle_flags, VF_LOADING_FINISHED)))) {
 				SET_EXPENSES_TYPE(EXPENSES_ROADVEH_INC);
 				if (LoadUnloadVehicle(v, false)) {
 					InvalidateWindow(WC_ROADVEH_LIST, v->owner);
--- a/src/roadveh_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/roadveh_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -56,7 +56,7 @@
 
 		/* Draw max speed */
 		{
-			SetDParam(0, v->max_speed / 2);
+			SetDParam(0, v->max_speed * 10 / 32);
 			DrawString(2, 25, STR_900E_MAX_SPEED, 0);
 		}
 
@@ -78,7 +78,7 @@
 		{
 			SetDParam(0, v->service_interval);
 			SetDParam(1, v->date_of_last_service);
-			DrawString(13, 90, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
+			DrawString(13, 102, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
 		}
 
 		DrawRoadVehImage(v, 3, 57, INVALID_VEHICLE);
@@ -100,6 +100,11 @@
 			str = STR_8813_FROM;
 		}
 		DrawString(34, 78, str, 0);
+
+		/* Draw Transfer credits text */
+		SetDParam(0, v->cargo_feeder_share);
+		DrawString(34, 89, STR_FEEDER_CARGO_VALUE, 0);
+
 	} break;
 
 	case WE_CLICK: {
@@ -144,15 +149,15 @@
 {    WWT_CAPTION,   RESIZE_NONE,    14,    11,   339,     0,    13, STR_900C_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS},
 { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   340,   379,     0,    13, STR_01AA_NAME,    STR_902E_NAME_ROAD_VEHICLE},
 {      WWT_PANEL,   RESIZE_NONE,    14,     0,   379,    14,    55, 0x0,              STR_NULL},
-{      WWT_PANEL,   RESIZE_NONE,    14,     0,   379,    56,    88, 0x0,              STR_NULL},
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,    89,    94, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL},
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,    95,   100, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL},
-{      WWT_PANEL,   RESIZE_NONE,    14,    11,   379,    89,   100, 0x0,              STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,    14,     0,   379,    56,   100, 0x0,              STR_NULL},
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   101,   106, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL},
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   107,   112, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL},
+{      WWT_PANEL,   RESIZE_NONE,    14,    11,   379,   101,   112, 0x0,              STR_NULL},
 {   WIDGETS_END},
 };
 
 static const WindowDesc _roadveh_details_desc = {
-	WDP_AUTO, WDP_AUTO, 380, 101,
+	WDP_AUTO, WDP_AUTO, 380, 113,
 	WC_VEHICLE_DETAILS,WC_VEHICLE_VIEW,
 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 	_roadveh_details_widgets,
--- a/src/saveload.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/saveload.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -28,7 +28,7 @@
 #include "variables.h"
 #include <setjmp.h>
 
-extern const uint16 SAVEGAME_VERSION = 47;
+extern const uint16 SAVEGAME_VERSION = 51;
 uint16 _sl_version;       ///< the major savegame version identifier
 byte   _sl_minor_version; ///< the minor savegame version, DO NOT USE!
 
--- a/src/ship_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/ship_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -306,7 +306,7 @@
 
 			if (CanFillVehicle(v) && (
 						v->current_order.flags & OF_FULL_LOAD ||
-						(_patches.gradual_loading && !HASBIT(v->load_status, LS_LOADING_FINISHED))
+						(_patches.gradual_loading && !HASBIT(v->vehicle_flags, VF_LOADING_FINISHED))
 					)) {
 				SET_EXPENSES_TYPE(EXPENSES_SHIP_INC);
 				if (LoadUnloadVehicle(v, false)) {
@@ -913,6 +913,9 @@
 		v->type = VEH_Ship;
 		v->random_bits = VehicleRandomBits();
 
+		v->vehicle_flags = 0;
+		if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SETBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
+
 		VehiclePositionChanged(v);
 
 		InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
--- a/src/ship_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/ship_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -76,7 +76,7 @@
 		{
 			SetDParam(0, v->service_interval);
 			SetDParam(1, v->date_of_last_service);
-			DrawString(13, 90, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
+			DrawString(13, 102, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
 		}
 
 		DrawShipImage(v, 3, 57, INVALID_VEHICLE);
@@ -98,6 +98,11 @@
 			str = STR_8813_FROM;
 		}
 		DrawString(74, 78, str, 0);
+
+		/* Draw Transfer credits text */
+		SetDParam(0, v->cargo_feeder_share);
+		DrawString(74, 89, STR_FEEDER_CARGO_VALUE, 0);
+
 	} break;
 
 	case WE_CLICK: {
@@ -141,15 +146,15 @@
 {    WWT_CAPTION,   RESIZE_NONE,    14,    11,   364,     0,    13, STR_9811_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS},
 { WWT_PUSHTXTBTN,   RESIZE_NONE,    14,   365,   404,     0,    13, STR_01AA_NAME,    STR_982F_NAME_SHIP},
 {      WWT_PANEL,   RESIZE_NONE,    14,     0,   404,    14,    55, 0x0,              STR_NULL},
-{      WWT_PANEL,   RESIZE_NONE,    14,     0,   404,    56,    88, 0x0,              STR_NULL},
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,    89,    94, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL},
-{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,    95,   100, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL},
-{      WWT_PANEL,   RESIZE_NONE,    14,    11,   404,    89,   100, 0x0,              STR_NULL},
+{      WWT_PANEL,   RESIZE_NONE,    14,     0,   404,    56,   100, 0x0,              STR_NULL},
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   101,   106, STR_0188,         STR_884D_INCREASE_SERVICING_INTERVAL},
+{ WWT_PUSHTXTBTN,   RESIZE_NONE,    14,     0,    10,   107,   112, STR_0189,         STR_884E_DECREASE_SERVICING_INTERVAL},
+{      WWT_PANEL,   RESIZE_NONE,    14,    11,   404,   101,   112, 0x0,              STR_NULL},
 {   WIDGETS_END},
 };
 
 static const WindowDesc _ship_details_desc = {
-	WDP_AUTO, WDP_AUTO, 405, 101,
+	WDP_AUTO, WDP_AUTO, 405, 113,
 	WC_VEHICLE_DETAILS,WC_VEHICLE_VIEW,
 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 	_ship_details_widgets,
--- a/src/station.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/station.h	Sun Mar 04 04:25:36 2007 +0000
@@ -15,6 +15,7 @@
 typedef struct GoodsEntry {
 	GoodsEntry() :
 		waiting_acceptance(0),
+		unload_pending(0),
 		days_since_pickup(0),
 		rating(175),
 		enroute_from(INVALID_STATION),
@@ -25,6 +26,7 @@
 	{}
 
 	uint16 waiting_acceptance;
+	uint16 unload_pending;        ///< records how much cargo is awaiting transfer during gradual loading to allow correct fee calc
 	byte days_since_pickup;
 	byte rating;
 	StationID enroute_from;
--- a/src/station_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/station_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -141,7 +141,7 @@
  * @param type the type of tile searched for
  * @param industry when type == MP_INDUSTRY, the type of the industry,
  *                 in all other cases this parameter is ignored
- * @result the noumber of matching tiles around
+ * @return the result the noumber of matching tiles around
  */
 static int CountMapSquareAround(TileIndex tile, TileType type, IndustryType industry)
 {
@@ -2764,6 +2764,7 @@
 
 static const SaveLoad _goods_desc[] = {
 	    SLE_VAR(GoodsEntry, waiting_acceptance, SLE_UINT16),
+	SLE_CONDVAR(GoodsEntry, unload_pending,     SLE_UINT16,                51, SL_MAX_VERSION),
 	    SLE_VAR(GoodsEntry, days_since_pickup,  SLE_UINT8),
 	    SLE_VAR(GoodsEntry, rating,             SLE_UINT8),
 	SLE_CONDVAR(GoodsEntry, enroute_from,       SLE_FILE_U8 | SLE_VAR_U16,  0, 6),
--- a/src/station_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/station_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -37,7 +37,6 @@
 	STATIONLIST_WIDGET_SORTBY,
 	STATIONLIST_WIDGET_SORTCRITERIA,
 	STATIONLIST_WIDGET_SORTDROPBTN,
-	CARGO_ALL_SELECTED = 0x1FFF,
 };
 
 typedef int CDECL StationSortListingTypeFunction(const void*, const void*);
@@ -114,7 +113,7 @@
 		GetString(_bufcache, STR_STATION, lastof(_bufcache));
 	}
 
-	r =  strcmp(buf1, _bufcache); // sort by name
+	r = strcmp(buf1, _bufcache); // sort by name
 	return (_internal_sort_order & 1) ? -r : r;
 }
 
@@ -130,9 +129,8 @@
 	const Station* st1 = *(const Station**)a;
 	const Station* st2 = *(const Station**)b;
 	int sum1 = 0, sum2 = 0;
-	int j;
 
-	for (j = 0; j < NUM_CARGO; j++) {
+	for (CargoID j = 0; j < NUM_CARGO; j++) {
 		if (st1->goods[j].waiting_acceptance & 0xfff) sum1 += GetTransportedGoodsIncome(st1->goods[j].waiting_acceptance & 0xfff, 20, 50, j);
 		if (st2->goods[j].waiting_acceptance & 0xfff) sum2 += GetTransportedGoodsIncome(st2->goods[j].waiting_acceptance & 0xfff, 20, 50, j);
 	}
@@ -146,9 +144,8 @@
 	const Station* st2 = *(const Station**)b;
 	byte maxr1 = 0;
 	byte maxr2 = 0;
-	int j;
 
-	for (j = 0; j < NUM_CARGO; j++) {
+	for (CargoID j = 0; j < NUM_CARGO; j++) {
 		if (st1->goods[j].waiting_acceptance & 0xfff) maxr1 = max(maxr1, st1->goods[j].rating);
 		if (st2->goods[j].waiting_acceptance & 0xfff) maxr2 = max(maxr2, st2->goods[j].rating);
 	}
@@ -200,7 +197,6 @@
 static void BuildStationsList(plstations_d* sl, PlayerID owner, byte facilities, uint16 cargo_filter)
 {
 	uint n = 0;
-	uint i, j;
 	const Station *st;
 
 	if (!(sl->flags & SL_REBUILD)) return;
@@ -215,7 +211,7 @@
 		if (st->owner == owner) {
 			if (facilities & st->facilities) { //only stations with selected facilities
 				int num_waiting_cargo = 0;
-				for (j = 0; j < NUM_CARGO; j++) {
+				for (CargoID j = 0; j < NUM_CARGO; j++) {
 					if (st->goods[j].waiting_acceptance & 0xFFF) {
 						num_waiting_cargo++; //count number of waiting cargo
 						if (HASBIT(cargo_filter, j)) {
@@ -237,7 +233,7 @@
 	if (n != 0 && sl->sort_list == NULL) error("Could not allocate memory for the station-sorting-list");
 	sl->list_length = n;
 
-	for (i = 0; i < n; ++i) sl->sort_list[i] = station_sort[i];
+	for (uint i = 0; i < n; ++i) sl->sort_list[i] = station_sort[i];
 
 	sl->flags &= ~SL_REBUILD;
 	sl->flags |= SL_RESORT;
@@ -265,6 +261,8 @@
 
 static void PlayerStationsWndProc(BaseWindow *w, WindowEvent *e)
 {
+	static const uint16 CARGO_ALL_SELECTED = 0x1FFF;
+
 	const PlayerID owner = (PlayerID)w->window_number;
 	static byte facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
 	static uint16 cargo_filter = CARGO_ALL_SELECTED;
@@ -273,60 +271,51 @@
 	plstations_d *sl = &WP(w, plstations_d);
 
 	switch (e->event) {
-	case WE_CREATE: { /* set up resort timer */
-		int i;
-		for (i = 0; i < 5; i++) {
-			if (HASBIT(facilities, i)) w->LowerWidget(i + STATIONLIST_WIDGET_TRAIN);
-		}
-		for (i = 0; i < NUM_CARGO; i++) {
-			if (HASBIT(cargo_filter, i)) w->LowerWidget(i + STATIONLIST_WIDGET_CARGOSTART);
-		}
-		w->SetWidgetLoweredState(STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
-		w->SetWidgetLoweredState(STATIONLIST_WIDGET_CARGOALL, cargo_filter == CARGO_ALL_SELECTED);
-		w->SetWidgetLoweredState(STATIONLIST_WIDGET_NOCARGOWAITING, HASBIT(cargo_filter, STATIONLIST_WIDGET_NOCARGOWAITING - NUM_CARGO));
+		case WE_CREATE: /* set up resort timer */
+			for (uint i = 0; i < 5; i++) {
+				if (HASBIT(facilities, i)) w->LowerWidget(i + STATIONLIST_WIDGET_TRAIN);
+			}
+			for (CargoID i = 0; i < NUM_CARGO; i++) {
+				if (HASBIT(cargo_filter, i)) w->LowerWidget(i + STATIONLIST_WIDGET_CARGOSTART);
+			}
+			w->SetWidgetLoweredState(STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
+			w->SetWidgetLoweredState(STATIONLIST_WIDGET_CARGOALL, cargo_filter == CARGO_ALL_SELECTED);
+			w->SetWidgetLoweredState(STATIONLIST_WIDGET_NOCARGOWAITING, HASBIT(cargo_filter, STATIONLIST_WIDGET_NOCARGOWAITING - NUM_CARGO));
 
-		sl->sort_list = NULL;
-		sl->flags = SL_REBUILD;
-		sl->sort_type = station_sort.criteria;
-		if (station_sort.order) sl->flags |= SL_ORDER;
-		sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
-		break;
-	}
+			sl->sort_list = NULL;
+			sl->flags = SL_REBUILD;
+			sl->sort_type = station_sort.criteria;
+			if (station_sort.order) sl->flags |= SL_ORDER;
+			sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
+			break;
 
-	case WE_PAINT: {
-		BuildStationsList(sl, owner, facilities, cargo_filter);
-		SortStationsList(sl);
+		case WE_PAINT: {
+			BuildStationsList(sl, owner, facilities, cargo_filter);
+			SortStationsList(sl);
 
-		SetVScrollCount(w, sl->list_length);
+			SetVScrollCount(w, sl->list_length);
 
-		/* draw widgets, with player's name in the caption */
-		{
+			/* draw widgets, with player's name in the caption */
 			const Player* p = GetPlayer(owner);
 			SetDParam(0, p->name_1);
 			SetDParam(1, p->name_2);
 			SetDParam(2, w->vscroll.count);
 			w->DrawWidgets();
-		}
-
-		{
-			int max;
-			int i, cg_ofst;
-			int x = 0, y = 0, xb = 2; // offset from top of widget
 
 			/* draw sorting criteria string */
 			DrawString(85, 26, _station_sort_listing[sl->sort_type], 0x10);
 			/* draw arrow pointing up/down for ascending/descending sorting */
 			DoDrawString(sl->flags & SL_ORDER ? DOWNARROW : UPARROW, 69, 26, 0x10);
 
+			int cg_ofst;
+			int x = 89;
+			int y = 14;
+			int xb = 2; // offset from left of widget
 
-			x = 89;
-			y = 14;
-
-			for (i = 0; i < NUM_CARGO; i++) {
-				cg_ofst = w->IsWidgetLowered(i + STATIONLIST_WIDGET_CARGOSTART) ? 2 : 1;
-
+			for (CargoID i = 0; i < NUM_CARGO; i++) {
 				const CargoSpec *cs = GetCargo(i);
 				if (cs->IsValid()) {
+					cg_ofst = w->IsWidgetLowered(i + STATIONLIST_WIDGET_CARGOSTART) ? 2 : 1;
 					GfxFillRect(x + cg_ofst, y + cg_ofst, x + cg_ofst + 10 , y + cg_ofst + 7, cs->rating_colour);
 					DrawStringCentered(x + 6 + cg_ofst, y + cg_ofst, cs->abbrev, 0x10);
 				}
@@ -348,12 +337,11 @@
 				return;
 			}
 
-			max = min(w->vscroll.pos + w->vscroll.cap, sl->list_length);
+			int max = min(w->vscroll.pos + w->vscroll.cap, sl->list_length);
 			y = 40; // start of the list-widget
 
-			for (i = w->vscroll.pos; i < max; ++i) { // do until max number of stations of owner
+			for (int i = w->vscroll.pos; i < max; ++i) { // do until max number of stations of owner
 				const Station *st = sl->sort_list[i];
-				CargoID j;
 				int x;
 
 				assert(st->xy != 0);
@@ -364,9 +352,8 @@
 				x = DrawString(xb, y, STR_3049_0, 0) + 5;
 
 				// show cargo waiting and station ratings
-				for (j = 0; j != NUM_CARGO; j++) {
+				for (CargoID j = 0; j != NUM_CARGO; j++) {
 					uint amount = GB(st->goods[j].waiting_acceptance, 0, 12);
-
 					if (amount != 0) {
 						StationsWndShowStationRating(x, y, j, amount, st->goods[j].rating);
 						x += 20;
@@ -374,135 +361,130 @@
 				}
 				y += 10;
 			}
-		}
-	} break;
-
-	case WE_CLICK: {
-		switch (e->we.click.widget) {
-		case STATIONLIST_WIDGET_LIST: {
-			const Station* st;
-
-			uint32 id_v = (e->we.click.pt.y - 41) / 10;
-
-			if (id_v >= w->vscroll.cap) return; // click out of bounds
-
-			id_v += w->vscroll.pos;
-
-			if (id_v >= sl->list_length) return; // click out of list bound
-
-			st = sl->sort_list[id_v];
-			assert(st->owner == owner);
-			ScrollMainWindowToTile(st->xy);
 			break;
 		}
 
-		case STATIONLIST_WIDGET_TRAIN:
-		case STATIONLIST_WIDGET_TRUCK:
-		case STATIONLIST_WIDGET_BUS:
-		case STATIONLIST_WIDGET_AIRPLANE:
-		case STATIONLIST_WIDGET_SHIP:
-			if (_ctrl_pressed) {
-				TOGGLEBIT(facilities, e->we.click.widget - STATIONLIST_WIDGET_TRAIN);
-				w->ToggleWidgetLoweredState(e->we.click.widget);
-			} else {
-				int i;
-				for (i = 0; facilities != 0; i++, facilities >>= 1) {
-					if (HASBIT(facilities, 0)) w->RaiseWidget(i + STATIONLIST_WIDGET_TRAIN);
-				}
-				SETBIT(facilities, e->we.click.widget - STATIONLIST_WIDGET_TRAIN);
-				w->LowerWidget(e->we.click.widget);
-			}
-			w->SetWidgetLoweredState(STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
-			sl->flags |= SL_REBUILD;
-			w->SetDirty();
-		break;
+		case WE_CLICK:
+			switch (e->we.click.widget) {
+				case STATIONLIST_WIDGET_LIST: {
+					uint32 id_v = (e->we.click.pt.y - 41) / 10;
 
-		case STATIONLIST_WIDGET_FACILALL: {
-			int i;
-			for (i = 0; i < 5; i++) {
-				w->LowerWidget(i + STATIONLIST_WIDGET_TRAIN);
+					if (id_v >= w->vscroll.cap) return; // click out of bounds
+
+					id_v += w->vscroll.pos;
+
+					if (id_v >= sl->list_length) return; // click out of list bound
+
+					const Station *st = sl->sort_list[id_v];
+					assert(st->owner == owner);
+					ScrollMainWindowToTile(st->xy);
+					break;
+				}
+
+				case STATIONLIST_WIDGET_TRAIN:
+				case STATIONLIST_WIDGET_TRUCK:
+				case STATIONLIST_WIDGET_BUS:
+				case STATIONLIST_WIDGET_AIRPLANE:
+				case STATIONLIST_WIDGET_SHIP:
+					if (_ctrl_pressed) {
+						TOGGLEBIT(facilities, e->we.click.widget - STATIONLIST_WIDGET_TRAIN);
+						w->ToggleWidgetLoweredState(e->we.click.widget);
+					} else {
+						for (uint i = 0; facilities != 0; i++, facilities >>= 1) {
+							if (HASBIT(facilities, 0)) w->RaiseWidget(i + STATIONLIST_WIDGET_TRAIN);
+						}
+						SETBIT(facilities, e->we.click.widget - STATIONLIST_WIDGET_TRAIN);
+						w->LowerWidget(e->we.click.widget);
+					}
+					w->SetWidgetLoweredState(STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
+					sl->flags |= SL_REBUILD;
+					w->SetDirty();
+					break;
+
+				case STATIONLIST_WIDGET_FACILALL:
+					for (uint i = 0; i < 5; i++) {
+						w->LowerWidget(i + STATIONLIST_WIDGET_TRAIN);
+					}
+					w->LowerWidget(STATIONLIST_WIDGET_FACILALL);
+
+					facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
+					sl->flags |= SL_REBUILD;
+					w->SetDirty();
+					break;
+
+				case STATIONLIST_WIDGET_CARGOALL:
+					for (CargoID i = 0; i < NUM_CARGO; i++) {
+						w->LowerWidget(i + STATIONLIST_WIDGET_CARGOSTART);
+					}
+					w->LowerWidget(STATIONLIST_WIDGET_NOCARGOWAITING);
+					w->LowerWidget(STATIONLIST_WIDGET_CARGOALL);
+
+					cargo_filter = CARGO_ALL_SELECTED;
+					sl->flags |= SL_REBUILD;
+					w->SetDirty();
+					break;
+
+				case STATIONLIST_WIDGET_SORTBY: /*flip sorting method asc/desc*/
+					sl->flags ^= SL_ORDER; //DESC-flag
+					station_sort.order = GB(sl->flags, 0, 1);
+					sl->flags |= SL_RESORT;
+					w->flash_timeout = 5;
+					w->LowerWidget(STATIONLIST_WIDGET_SORTBY);
+					w->SetDirty();
+					break;
+
+				case STATIONLIST_WIDGET_SORTCRITERIA:
+				case STATIONLIST_WIDGET_SORTDROPBTN: /* select sorting criteria dropdown menu */
+					w->ShowDropDownMenu(_station_sort_listing, sl->sort_type, STATIONLIST_WIDGET_SORTDROPBTN, 0, 0);
+					break;
+
+				default:
+					if (e->we.click.widget >= STATIONLIST_WIDGET_CARGOSTART && e->we.click.widget <= STATIONLIST_WIDGET_NOCARGOWAITING) { //change cargo_filter
+						if (_ctrl_pressed) {
+							TOGGLEBIT(cargo_filter, e->we.click.widget - STATIONLIST_WIDGET_CARGOSTART);
+							w->ToggleWidgetLoweredState(e->we.click.widget);
+						} else {
+							for (uint i = 0; cargo_filter != 0; i++, cargo_filter >>= 1) {
+								if (HASBIT(cargo_filter, 0)) w->RaiseWidget(i + STATIONLIST_WIDGET_CARGOSTART);
+							}
+							SETBIT(cargo_filter, e->we.click.widget - STATIONLIST_WIDGET_CARGOSTART);
+							w->LowerWidget(e->we.click.widget);
+						}
+						sl->flags |= SL_REBUILD;
+						w->SetWidgetLoweredState(STATIONLIST_WIDGET_CARGOALL, cargo_filter == CARGO_ALL_SELECTED);
+						w->SetDirty();
+					}
+					break;
 			}
-			w->LowerWidget(STATIONLIST_WIDGET_FACILALL);
-
-			facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
-			sl->flags |= SL_REBUILD;
-			w->SetDirty();
 			break;
-		}
-		case STATIONLIST_WIDGET_CARGOALL: {
-			int i;
-			for (i = 0; i < NUM_CARGO; i++) {
-				w->LowerWidget(i + STATIONLIST_WIDGET_CARGOSTART);
+
+		case WE_DROPDOWN_SELECT: /* we have selected a dropdown item in the list */
+			if (sl->sort_type != e->we.dropdown.index) {
+				// value has changed -> resort
+				sl->sort_type = e->we.dropdown.index;
+				station_sort.criteria = sl->sort_type;
+				sl->flags |= SL_RESORT;
 			}
-			w->LowerWidget(STATIONLIST_WIDGET_NOCARGOWAITING);
-			w->LowerWidget(STATIONLIST_WIDGET_CARGOALL);
-
-			cargo_filter = CARGO_ALL_SELECTED;
-			sl->flags |= SL_REBUILD;
 			w->SetDirty();
 			break;
-		}
-		case STATIONLIST_WIDGET_SORTBY: /*flip sorting method asc/desc*/
-			sl->flags ^= SL_ORDER; //DESC-flag
-			station_sort.order = GB(sl->flags, 0, 1);
-			sl->flags |= SL_RESORT;
-			w->autorepeat_timeout = 5;
-			w->LowerWidget(STATIONLIST_WIDGET_SORTBY);
-			w->SetDirty();
-		break;
-
-		case STATIONLIST_WIDGET_SORTCRITERIA:
-		case STATIONLIST_WIDGET_SORTDROPBTN: /* select sorting criteria dropdown menu */
-			w->ShowDropDownMenu(_station_sort_listing, sl->sort_type, STATIONLIST_WIDGET_SORTDROPBTN, 0, 0);
-		break;
 
-		default:
-			if (e->we.click.widget >= STATIONLIST_WIDGET_CARGOSTART && e->we.click.widget <= STATIONLIST_WIDGET_NOCARGOWAITING) { //change cargo_filter
-				if (_ctrl_pressed) {
-					TOGGLEBIT(cargo_filter, e->we.click.widget - STATIONLIST_WIDGET_CARGOSTART);
-					w->ToggleWidgetLoweredState(e->we.click.widget);
-				} else {
-					int i;
-					for (i = 0; cargo_filter != 0; i++, cargo_filter >>= 1) {
-						if (HASBIT(cargo_filter, 0)) w->RaiseWidget(i + STATIONLIST_WIDGET_CARGOSTART);
-					}
-					SETBIT(cargo_filter, e->we.click.widget - STATIONLIST_WIDGET_CARGOSTART);
-					w->LowerWidget(e->we.click.widget);
-				}
+		case WE_TICK:
+			if (--sl->resort_timer == 0) {
+				DEBUG(misc, 3, "Periodic rebuild station list player %d", owner);
+				sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
 				sl->flags |= SL_REBUILD;
-				w->SetWidgetLoweredState(STATIONLIST_WIDGET_CARGOALL, cargo_filter == CARGO_ALL_SELECTED);
 				w->SetDirty();
 			}
-		}
-	} break;
-
-	case WE_DROPDOWN_SELECT: /* we have selected a dropdown item in the list */
-		if (sl->sort_type != e->we.dropdown.index) {
-			// value has changed -> resort
-			sl->sort_type = e->we.dropdown.index;
-			station_sort.criteria = sl->sort_type;
-			sl->flags |= SL_RESORT;
-		}
-		w->SetDirty();
-		break;
+			break;
 
-	case WE_TICK:
-		if (--sl->resort_timer == 0) {
-			DEBUG(misc, 3, "Periodic rebuild station list player %d", owner);
-			sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
-			sl->flags |= SL_REBUILD;
+		case WE_TIMEOUT:
+			w->RaiseWidget(STATIONLIST_WIDGET_SORTBY);
 			w->SetDirty();
-		}
-		break;
+			break;
 
-	case WE_TIMEOUT:
-		w->RaiseWidget(STATIONLIST_WIDGET_SORTBY);
-		w->SetDirty();
-		break;
-
-	case WE_RESIZE:
-		w->vscroll.cap += e->we.sizing.diff.y / 10;
-		break;
+		case WE_RESIZE:
+			w->vscroll.cap += e->we.sizing.diff.y / 10;
+			break;
 	}
 }
 
@@ -559,17 +541,15 @@
 
 void ShowPlayerStations(PlayerID player)
 {
-	BaseWindow *w;
-
 	if (!IsValidPlayer(player)) return;
 
-	w = BaseWindow::AllocateFront(&_player_stations_desc, player);
-	if (w != NULL) {
-		w->caption_color = (byte)w->window_number;
-		w->vscroll.cap = 12;
-		w->resize.step_height = 10;
-		w->resize.height = w->Height() - 10 * 7; // minimum if 5 in the list
-	}
+	BaseWindow *w = BaseWindow::AllocateFront(&_player_stations_desc, player);
+	if (w == NULL) return;
+
+	w->caption_color = (byte)w->window_number;
+	w->vscroll.cap = 12;
+	w->resize.step_height = 10;
+	w->resize.height = w->Height() - 10 * 7; // minimum if 5 in the list
 }
 
 static const OldWidget _station_view_expanded_widgets[] = {
@@ -612,14 +592,13 @@
 {
 	StationID station_id = w->window_number;
 	const Station* st = GetStation(station_id);
-	uint i;
 	uint num;
 	int x,y;
 	int pos;
 	StringID str;
 
 	num = 1;
-	for (i = 0; i != NUM_CARGO; i++) {
+	for (CargoID i = 0; i != NUM_CARGO; i++) {
 		if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) {
 			num++;
 			if (st->goods[i].enroute_from != station_id) num++;
@@ -643,7 +622,7 @@
 
 	if (--pos < 0) {
 		str = STR_00D0_NOTHING;
-		for (i = 0; i != NUM_CARGO; i++) {
+		for (CargoID i = 0; i != NUM_CARGO; i++) {
 			if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) str = STR_EMPTY;
 		}
 		SetDParam(0, str);
@@ -651,7 +630,7 @@
 		y += 10;
 	}
 
-	i = 0;
+	CargoID i = 0;
 	do {
 		uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12);
 		if (waiting == 0) continue;
@@ -666,7 +645,7 @@
 			} while (--num);
 		}
 
-		if ( st->goods[i].enroute_from == station_id) {
+		if (st->goods[i].enroute_from == station_id) {
 			if (--pos < 0) {
 				SetDParam(1, waiting);
 				SetDParam(0, i);
@@ -696,7 +675,7 @@
 
 		b = InlineString(b, STR_000C_ACCEPTS);
 
-		for (i = 0; i != NUM_CARGO; i++) {
+		for (CargoID i = 0; i != NUM_CARGO; i++) {
 			if (b >= endof(_userstring) - 5 - 1) break;
 			if (st->goods[i].waiting_acceptance & 0x8000) {
 				if (first) {
@@ -719,7 +698,7 @@
 		DrawString(2, 67, STR_3034_LOCAL_RATING_OF_TRANSPORT, 0);
 
 		y = 77;
-		for (i = 0; i != NUM_CARGO; i++) {
+		for (CargoID i = 0; i != NUM_CARGO; i++) {
 			if (st->goods[i].enroute_from != INVALID_STATION) {
 				SetDParam(0, GetCargo(i)->name);
 				SetDParam(2, st->goods[i].rating * 101 >> 8);
@@ -735,84 +714,84 @@
 static void StationViewWndProc(BaseWindow *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_PAINT:
-		DrawStationViewWindow(w);
-		break;
-
-	case WE_CLICK:
-		switch (e->we.click.widget) {
-		case 7:
-			ScrollMainWindowToTile(GetStation(w->window_number)->xy);
+		case WE_PAINT:
+			DrawStationViewWindow(w);
 			break;
 
-		case 8:
-			w->SetDirty();
+		case WE_CLICK:
+			switch (e->we.click.widget) {
+				case 7:
+					ScrollMainWindowToTile(GetStation(w->window_number)->xy);
+					break;
 
-			/* toggle height/widget set */
-			if (w->IsOfPrototype(_station_view_expanded_widgets)) {
-				w->AssignWidget(_station_view_widgets);
-				w->SetHeight(110);
-			} else {
-				w->AssignWidget(_station_view_expanded_widgets);
-				w->SetHeight(210);
+				case 8:
+					w->SetDirty();
+
+					/* toggle height/widget set */
+					if (w->IsOfPrototype(_station_view_expanded_widgets)) {
+						w->AssignWidget(_station_view_widgets);
+						w->SetHeight(110);
+					} else {
+						w->AssignWidget(_station_view_expanded_widgets);
+						w->SetHeight(210);
+					}
+
+					w->SetDirty();
+					break;
+
+				case 9:
+					SetDParam(0, w->window_number);
+					ShowQueryString(STR_STATION, STR_3030_RENAME_STATION_LOADING, 31, 180, w, CS_ALPHANUMERAL);
+					break;
+
+				case 10: { /* Show a list of scheduled trains to this station */
+					const Station *st = GetStation(w->window_number);
+					ShowVehicleListWindow(st->owner, VEH_Train, (StationID)w->window_number);
+					break;
+				}
+
+				case 11: { /* Show a list of scheduled road-vehicles to this station */
+					const Station *st = GetStation(w->window_number);
+					ShowVehicleListWindow(st->owner, VEH_Road, (StationID)w->window_number);
+					break;
+				}
+
+				case 12: { /* Show a list of scheduled aircraft to this station */
+					const Station *st = GetStation(w->window_number);
+					/* Since oilrigs have no owners, show the scheduled aircraft of current player */
+					PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
+					ShowVehicleListWindow(owner, VEH_Aircraft, (StationID)w->window_number);
+					break;
+				}
+
+				case 13: { /* Show a list of scheduled ships to this station */
+					const Station *st = GetStation(w->window_number);
+					/* Since oilrigs/bouys have no owners, show the scheduled ships of current player */
+					PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
+					ShowVehicleListWindow(owner, VEH_Ship, (StationID)w->window_number);
+					break;
+				}
 			}
-
-			w->SetDirty();
 			break;
 
-		case 9: {
-			SetDParam(0, w->window_number);
-			ShowQueryString(STR_STATION, STR_3030_RENAME_STATION_LOADING, 31, 180, w, CS_ALPHANUMERAL);
-		} break;
+		case WE_ON_EDIT_TEXT:
+			if (e->we.edittext.str[0] != '\0') {
+				_cmd_text = e->we.edittext.str;
+				DoCommandP(0, w->window_number, 0, NULL,
+					CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION));
+			}
+			break;
 
-		case 10: { /* Show a list of scheduled trains to this station */
-			const Station *st = GetStation(w->window_number);
-			ShowVehicleListWindow(st->owner, VEH_Train, (StationID)w->window_number);
+		case WE_DESTROY: {
+			WindowNumber wno =
+				(w->window_number << 16) | GetStation(w->window_number)->owner;
+
+			DeleteWindowById(WC_TRAINS_LIST, wno);
+			DeleteWindowById(WC_ROADVEH_LIST, wno);
+			DeleteWindowById(WC_SHIPS_LIST, wno);
+			DeleteWindowById(WC_AIRCRAFT_LIST, wno);
 			break;
 		}
-
-		case 11: { /* Show a list of scheduled road-vehicles to this station */
-			const Station *st = GetStation(w->window_number);
-			ShowVehicleListWindow(st->owner, VEH_Road, (StationID)w->window_number);
-			break;
-		}
-
-		case 12: { /* Show a list of scheduled aircraft to this station */
-			const Station *st = GetStation(w->window_number);
-			/* Since oilrigs have no owners, show the scheduled aircraft of current player */
-			PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
-			ShowVehicleListWindow(owner, VEH_Aircraft, (StationID)w->window_number);
-			break;
-		}
-
-		case 13: { /* Show a list of scheduled ships to this station */
-			const Station *st = GetStation(w->window_number);
-			/* Since oilrigs/bouys have no owners, show the scheduled ships of current player */
-			PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
-			ShowVehicleListWindow(owner, VEH_Ship, (StationID)w->window_number);
-			break;
-		}
-		}
-		break;
-
-	case WE_ON_EDIT_TEXT:
-		if (e->we.edittext.str[0] != '\0') {
-			_cmd_text = e->we.edittext.str;
-			DoCommandP(0, w->window_number, 0, NULL,
-				CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION));
-		}
-		break;
-
-	case WE_DESTROY: {
-		WindowNumber wno =
-			(w->window_number << 16) | GetStation(w->window_number)->owner;
-
-		DeleteWindowById(WC_TRAINS_LIST, wno);
-		DeleteWindowById(WC_ROADVEH_LIST, wno);
-		DeleteWindowById(WC_SHIPS_LIST, wno);
-		DeleteWindowById(WC_AIRCRAFT_LIST, wno);
-		break;
-	}
 	}
 }
 
@@ -827,12 +806,10 @@
 
 void ShowStationViewWindow(StationID station)
 {
-	BaseWindow *w;
+	BaseWindow *w = BaseWindow::AllocateFront(&_station_view_desc, station);
+	if (w == NULL) return;
 
-	w = BaseWindow::AllocateFront(&_station_view_desc, station);
-	if (w != NULL) {
-		PlayerID owner = GetStation(w->window_number)->owner;
-		if (owner != OWNER_NONE) w->caption_color = owner;
-		w->vscroll.cap = 5;
-	}
+	PlayerID owner = GetStation(w->window_number)->owner;
+	if (owner != OWNER_NONE) w->caption_color = owner;
+	w->vscroll.cap = 5;
 }
--- a/src/stdafx.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/stdafx.h	Sun Mar 04 04:25:36 2007 +0000
@@ -126,6 +126,15 @@
 /* Stuff for MSVC */
 #if defined(_MSC_VER)
 # pragma once
+/* Define a win32 target platform, to override defaults of the SDK
+ * We need to define NTDDI version for Vista SDK, but win2k is minimum */
+# define NTDDI_VERSION NTDDI_WIN2K // Windows 2000
+# define _WIN32_WINNT 0x0500       // Windows 2000
+
+# define _WIN32_WINDOWS 0x400      // Windows 95
+# define WINVER 0x0400             // Windows NT 4.0 / Windows 95
+# define _WIN32_IE_ 0x0401         // 4.01 (win98 and NT4SP5+)
+
 # define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
 # pragma warning(disable: 4244)  // 'conversion' conversion from 'type1' to 'type2', possible loss of data
 # pragma warning(disable: 4761)  // integral size mismatch in argument : conversion supplied
--- a/src/string.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/string.h	Sun Mar 04 04:25:36 2007 +0000
@@ -106,6 +106,28 @@
 	return GB(c, 6, 2) == 2;
 }
 
+/**
+ * Retrieve the (partial) length of the previous UNICODE character
+ * in an UTF-8 encoded string.
+ * @param s char pointer pointing to the first char of the next character
+ * @returns the decoded length in bytes (size) of the UNICODE character
+ * that was just before the one where 's' is pointing to
+ * @note If 's' is not pointing to the first byte of the next UNICODE character
+ * only a partial length of the sequence will be returned.
+ * For example given this sequence: 0xE3 0x85 0x80, 0xE3 0x81 0x9E
+ * 1. 's' is pointing to the second 0xE3, return value is 3
+ * 2. 's' is pointing to 0x80, return value is 2.
+ * So take care with the return values of this function. To get the real length
+ * for an (invalid) sequence, pass the string offset of this function's return
+ * value to Utf8EncodedCharLen() or Utf8Decode()
+ */
+static inline size_t Utf8PrevCharLen(const char *s)
+{
+	size_t len = 1;
+	while (IsUtf8Part(*--s)) len++;
+	return len;
+}
+
 
 static inline bool IsPrintable(WChar c)
 {
--- a/src/strings.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/strings.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -179,9 +179,17 @@
 }
 
 
-// This function takes a C-string and allocates a temporary string ID.
-// The duration of the bound string is valid only until the next GetString,
-// so be careful.
+/**
+ * This function takes a C-string and allocates a temporary string ID.
+ * The StringID of the bound string is valid until BindCString is called
+ * another NUM_BOUND_STRINGS times. So be careful when using it.
+ *
+ * @note formatting a DATE_TINY calls BindCString twice, thus reduces the
+ *       amount of 'user' bound strings by 2.
+ * @todo rewrite the BindCString system to make the limit flexible and
+ *       non-round-robin. For example by using smart pointers that free
+ *       the allocated StringID when they go out-of-scope/are freed.
+ */
 StringID BindCString(const char *str)
 {
 	int idx = (++_bind_index) & (NUM_BOUND_STRINGS - 1);
@@ -285,40 +293,34 @@
 static char *FormatYmdString(char *buff, Date date, const char* last)
 {
 	YearMonthDay ymd;
-
 	ConvertDateToYMD(date, &ymd);
 
-	buff = strecpy(buff, GetStringPtr(ymd.day + STR_01AC_1ST - 1), last);
-	buff = strecpy(buff, " ", last);
-	buff = strecpy(buff, GetStringPtr(STR_0162_JAN + ymd.month), last);
-	buff = strecpy(buff, " ", last);
-
-	return FormatNoCommaNumber(buff, ymd.year, last);
+	int32 args[3] = { ymd.day + STR_01AC_1ST - 1, STR_0162_JAN + ymd.month, ymd.year };
+	return FormatString(buff, GetStringPtr(STR_DATE_LONG), args, 0, last);
 }
 
 static char *FormatMonthAndYear(char *buff, Date date, const char* last)
 {
 	YearMonthDay ymd;
-
 	ConvertDateToYMD(date, &ymd);
 
-	buff = strecpy(buff, GetStringPtr(STR_MONTH_JAN + ymd.month), last);
-	buff = strecpy(buff, " ", last);
-
-	return FormatNoCommaNumber(buff, ymd.year, last);
+	int32 args[2] = { STR_MONTH_JAN + ymd.month, ymd.year };
+	return FormatString(buff, GetStringPtr(STR_DATE_SHORT), args, 0, last);
 }
 
 static char *FormatTinyDate(char *buff, Date date, const char* last)
 {
 	YearMonthDay ymd;
-
 	ConvertDateToYMD(date, &ymd);
-	buff += snprintf(
-		buff, last - buff + 1,
-		" %02i-%02i-%04i", ymd.day, ymd.month + 1, ymd.year
-	);
 
-	return buff;
+	char day[3];
+	char month[3];
+	/* We want to zero-pad the days and months */
+	snprintf(day,   lengthof(day),   "%02i", ymd.day);
+	snprintf(month, lengthof(month), "%02i", ymd.month + 1);
+
+	int32 args[3] = { BindCString(day), BindCString(month), ymd.year };
+	return FormatString(buff, GetStringPtr(STR_DATE_TINY), args, 0, last);
 }
 
 static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, int64 number, bool compact, const char* last)
--- a/src/table/engines.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/table/engines.h	Sun Mar 04 04:25:36 2007 +0000
@@ -519,7 +519,7 @@
  * @param h mail_capacity
  * @param i passenger_capacity
  */
-#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, {e}, f, g, h, i }
+#define AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, {e}, f, (g * 129) / 10, h, i }
 #define H AIR_HELI
 #define P AIR_CTOL
 #define J AIR_CTOL | AIR_FAST
--- a/src/town_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/town_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file town_cmd.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "functions.h"
@@ -1492,7 +1494,7 @@
 /**
  * Search callback function for TownActionBuildStatue
  * @param data that is passed by the caller.  In this case, nothing
- * @result of the test
+ * @return the result of the test
  */
 static bool SearchTileForStatue(TileIndex tile, uint32 data)
 {
--- a/src/train_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/train_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -67,7 +67,7 @@
 		/* Power is not added for articulated parts */
 		if (IsArticulatedPart(u)) continue;
 
-		RailType railtype = (IsLevelCrossingTile(u->tile) ? GetRailTypeCrossing(u->tile) : GetRailType(u->tile));
+		RailType railtype = GetRailType(u->tile);
 		bool engine_has_power = HasPowerOnRail(u->u.rail.railtype, railtype);
 		bool wagon_has_power  = HasPowerOnRail(v->u.rail.railtype, railtype);
 
@@ -785,6 +785,9 @@
 			v->cur_image = 0xAC2;
 			v->random_bits = VehicleRandomBits();
 
+			v->vehicle_flags = 0;
+			if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SETBIT(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
+
 			v->subtype = 0;
 			SetFrontEngine(v);
 			SetTrainEngine(v);
@@ -2515,7 +2518,7 @@
 
 			if (CanFillVehicle(v) && (
 						v->current_order.flags & OF_FULL_LOAD ||
-						(_patches.gradual_loading && !HASBIT(v->load_status, LS_LOADING_FINISHED))
+						(_patches.gradual_loading && !HASBIT(v->vehicle_flags, VF_LOADING_FINISHED))
 					)) {
 				v->u.rail.days_since_order_progr = 0; /* Prevent a train lost message for full loading trains */
 				SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC);
@@ -2705,10 +2708,7 @@
 	return
 		IsTileOwner(tile, v->owner) && (
 			!IsFrontEngine(v) ||
-			HASBIT(
-				v->u.rail.compatible_railtypes,
-				IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile)
-			)
+			HASBIT(v->u.rail.compatible_railtypes, GetRailType(tile))
 		);
 }
 
--- a/src/train_gui.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/train_gui.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -503,6 +503,8 @@
 				DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, 0);
 			}
 		}
+		SetDParam(0, v->cargo_feeder_share);
+		DrawString(x, y + 15, STR_FEEDER_CARGO_VALUE, 0);
 	}
 }
 
--- a/src/unmovable_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/unmovable_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -2,7 +2,6 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "bridge_map.h"
 #include "table/strings.h"
 #include "table/sprites.h"
 #include "functions.h"
@@ -20,6 +19,7 @@
 #include "variables.h"
 #include "table/unmovable_land.h"
 #include "genworld.h"
+#include "bridge.h"
 
 /** Destroy a HQ.
  * During normal gameplay you can only implicitely destroy a HQ when you are
--- a/src/vehicle.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/vehicle.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -718,7 +718,7 @@
 			if (v->cargo_cap == v->cargo_count) {
 				full |= mask;
 			} else if (GB(ge[v->cargo_type].waiting_acceptance, 0, 12) > 0 ||
-					(HASBIT(v->load_status, LS_CARGO_UNLOADING) && (ge[v->cargo_type].waiting_acceptance & 0x8000))) {
+					(HASBIT(v->vehicle_flags, VF_CARGO_UNLOADING) && (ge[v->cargo_type].waiting_acceptance & 0x8000))) {
 				/* If there is any cargo waiting, or this vehicle is still unloading
 				 * and the station accepts the cargo, don't leave the station. */
 				keep_loading = true;
@@ -3049,10 +3049,12 @@
 
 	    SLE_VAR(Vehicle, load_unload_time_rem, SLE_UINT16),
 	SLE_CONDVAR(Vehicle, cargo_paid_for,       SLE_UINT16,                45, SL_MAX_VERSION),
-	SLE_CONDVAR(Vehicle, load_status,          SLE_UINT8,                 40, SL_MAX_VERSION),
+	SLE_CONDVAR(Vehicle, vehicle_flags,        SLE_UINT8,                 40, SL_MAX_VERSION),
 
 	    SLE_VAR(Vehicle, profit_this_year,     SLE_INT32),
 	    SLE_VAR(Vehicle, profit_last_year,     SLE_INT32),
+	SLE_CONDVAR(Vehicle, cargo_feeder_share,   SLE_INT32,                 51, SL_MAX_VERSION),
+	SLE_CONDVAR(Vehicle, cargo_loaded_at_xy,   SLE_UINT32,                51, SL_MAX_VERSION),
 	    SLE_VAR(Vehicle, value,                SLE_UINT32),
 
 	    SLE_VAR(Vehicle, random_bits,          SLE_UINT8),
--- a/src/vehicle.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/vehicle.h	Sun Mar 04 04:25:36 2007 +0000
@@ -31,12 +31,14 @@
 enum RoadVehicleStates {
 	/*
 	 * Lower 4 bits are used for vehicle track direction. (Trackdirs)
-	 * When in a road stop (bit 5 set) these bits give the
+	 * When in a road stop (bit 5 or bit 6 set) these bits give the
 	 * track direction of the entry to the road stop.
 	 * As the entry direction will always be a diagonal
 	 * direction (X_NE, Y_SE, X_SW or Y_NW) only bits 0 and 3
 	 * are needed to hold this direction. Bit 1 is then used to show
 	 * that the vehicle is using the second road stop bay.
+	 * Bit 2 is then used for drive-through stops to show the vehicle
+	 * is stopping at this road stop.
 	 */
 
 	/* Numeric values */
@@ -46,13 +48,11 @@
 	/* Bit numbers */
 	RVS_USING_SECOND_BAY         =    1,                      ///< Only used while in a road stop
 	RVS_IS_STOPPING              =    2,                      ///< Only used for drive-through stops. Vehicle will stop here
-	RVS_DRIVE_SIDE               =    4,                      ///< Only used when retrieving move data and for turning vehicles
+	RVS_DRIVE_SIDE               =    4,                      ///< Only used when retrieving move data
 	RVS_IN_ROAD_STOP             =    5,                      ///< The vehicle is in a road stop
 	RVS_IN_DT_ROAD_STOP          =    6,                      ///< The vehicle is in a drive-through road stop
 
 	/* Bit sets of the above specified bits */
-	RVSB_USING_SECOND_BAY        = 1 << RVS_USING_SECOND_BAY, ///< Only used while in a road stop
-	RVSB_DRIVE_SIDE              = 1 << RVS_DRIVE_SIDE,       ///< Only used when retrieving move data and for turning vehicles
 	RVSB_IN_ROAD_STOP            = 1 << RVS_IN_ROAD_STOP,     ///< The vehicle is in a road stop
 	RVSB_IN_ROAD_STOP_END        = RVSB_IN_ROAD_STOP + TRACKDIR_END,
 	RVSB_IN_DT_ROAD_STOP         = 1 << RVS_IN_DT_ROAD_STOP,  ///< The vehicle is in a drive-through road stop
@@ -83,10 +83,10 @@
 	VS_CRASHED         = 0x80,
 };
 
-enum LoadStatus {
-	LS_LOADING_FINISHED,
-	LS_CARGO_UNLOADING,
-	/* LS_CARGO_PAID_FOR was here until savegame version 45. */
+enum VehicleFlags {
+	VF_LOADING_FINISHED,
+	VF_CARGO_UNLOADING,
+	VF_BUILT_AS_PROTOTYPE,
 };
 
 /* Effect vehicle types */
@@ -294,10 +294,12 @@
 
 	uint16 load_unload_time_rem;
 	uint16 cargo_paid_for;      // How much of the cargo currently on board has been paid for.
-	byte load_status;
+	byte vehicle_flags;         // Used for gradual loading and other miscellaneous things (@see VehicleFlags enum)
 
 	int32 profit_this_year;
 	int32 profit_last_year;
+	int32 cargo_feeder_share;      ///< value of feeder pickup to be paid for on delivery of cargo
+	TileIndex cargo_loaded_at_xy;  ///< tile index where feeder cargo was loaded
 	uint32 value;
 
 	union {
--- a/src/video/cocoa_v.mm	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/video/cocoa_v.mm	Sun Mar 04 04:25:36 2007 +0000
@@ -8,6 +8,14 @@
 
 #ifdef WITH_COCOA
 
+#include <AvailabilityMacros.h>
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+/* On 10.4, we get tons of warnings that the QuickDraw functions are deprecated.
+ *  We know that. Don't keep bugging us about that. */
+#	undef AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+#	define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+#endif
+
 #import <Cocoa/Cocoa.h>
 #import <sys/time.h> /* gettimeofday */
 #import <sys/param.h> /* for MAXPATHLEN */
@@ -508,12 +516,12 @@
 			break;
 
 		case NSLeftMouseDown:
+			pt = QZ_GetMouseLocation(event);
 			if (!([ event modifierFlags ] & NSCommandKeyMask) ||
 					!QZ_MouseIsInsideView(&pt)) {
 				[NSApp sendEvent:event];
 			}
 
-			pt = QZ_GetMouseLocation(event);
 			if (!QZ_MouseIsInsideView(&pt)) {
 				QZ_ShowMouse();
 				break;
--- a/src/video/win32_v.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/video/win32_v.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -758,7 +758,7 @@
 #if !defined(WINCE)
 	if (_wnd.fullscreen) ChangeDisplaySettings(NULL, 0);
 #endif
-	if (_double_size) {
+	if (_wnd.double_size) {
 		_cur_resolution[0] *= 2;
 		_cur_resolution[1] *= 2;
 	}
--- a/src/water_cmd.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/water_cmd.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -3,6 +3,7 @@
 #include "stdafx.h"
 #include "openttd.h"
 #include "bridge_map.h"
+#include "bridge.h"
 #include "cmd_helper.h"
 #include "station_map.h"
 #include "table/sprites.h"
@@ -276,7 +277,7 @@
 static int32 ClearTile_Water(TileIndex tile, byte flags)
 {
 	switch (GetWaterTileType(tile)) {
-		case WATER_CLEAR:
+		case WATER_TILE_CLEAR:
 			if (flags & DC_NO_WATER) return_cmd_error(STR_3807_CAN_T_BUILD_ON_WATER);
 
 			// Make sure no vehicle is on the tile
@@ -293,7 +294,7 @@
 			if (flags & DC_EXEC) DoClearSquare(tile);
 			return _price.clear_water;
 
-		case WATER_COAST: {
+		case WATER_TILE_COAST: {
 			Slope slope = GetTileSlope(tile, NULL);
 
 			// Make sure no vehicle is on the tile
@@ -313,7 +314,7 @@
 			}
 		}
 
-		case WATER_LOCK: {
+		case WATER_TILE_LOCK: {
 			static const TileIndexDiffC _shiplift_tomiddle_offs[] = {
 				{ 0,  0}, {0,  0}, { 0, 0}, {0,  0}, // middle
 				{-1,  0}, {0,  1}, { 1, 0}, {0, -1}, // lower
@@ -326,7 +327,7 @@
 			return RemoveShiplift(tile + ToTileIndexDiff(_shiplift_tomiddle_offs[GetSection(tile)]), flags);
 		}
 
-		case WATER_DEPOT:
+		case WATER_TILE_DEPOT:
 			if (flags & DC_AUTO) return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
 			return RemoveShipDepot(tile, flags);
 
@@ -435,13 +436,13 @@
 static void DrawTile_Water(TileInfo *ti)
 {
 	switch (GetWaterTileType(ti->tile)) {
-		case WATER_CLEAR:
+		case WATER_TILE_CLEAR:
 			DrawGroundSprite(SPR_FLAT_WATER_TILE, PAL_NONE);
 			if (ti->z != 0 || !IsTileOwner(ti->tile, OWNER_WATER)) DrawCanalWater(ti->tile);
 			DrawBridgeMiddle(ti);
 			break;
 
-		case WATER_COAST:
+		case WATER_TILE_COAST:
 			assert(!IsSteepSlope(ti->tileh));
 			if (_coast_base != 0) {
 				DrawGroundSprite(_coast_base + ti->tileh, PAL_NONE);
@@ -451,12 +452,12 @@
 			DrawBridgeMiddle(ti);
 			break;
 
-		case WATER_LOCK: {
+		case WATER_TILE_LOCK: {
 			const WaterDrawTileStruct *t = _shiplift_display_seq[GetSection(ti->tile)];
 			DrawWaterStuff(ti, t, 0, ti->z > t[3].delta_y ? 24 : 0);
 		} break;
 
-		case WATER_DEPOT:
+		case WATER_TILE_DEPOT:
 			DrawWaterStuff(ti, _shipdepot_display_seq[GetSection(ti->tile)], PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), 0);
 			break;
 	}
@@ -496,16 +497,16 @@
 static void GetTileDesc_Water(TileIndex tile, TileDesc *td)
 {
 	switch (GetWaterTileType(tile)) {
-		case WATER_CLEAR:
+		case WATER_TILE_CLEAR:
 			if (TilePixelHeight(tile) == 0 || IsTileOwner(tile, OWNER_WATER)) {
 				td->str = STR_3804_WATER;
 			} else {
 				td->str = STR_LANDINFO_CANAL;
 			}
 			break;
-		case WATER_COAST: td->str = STR_3805_COAST_OR_RIVERBANK; break;
-		case WATER_LOCK : td->str = STR_LANDINFO_LOCK; break;
-		case WATER_DEPOT: td->str = STR_3806_SHIP_DEPOT; break;
+		case WATER_TILE_COAST: td->str = STR_3805_COAST_OR_RIVERBANK; break;
+		case WATER_TILE_LOCK : td->str = STR_LANDINFO_LOCK; break;
+		case WATER_TILE_DEPOT: td->str = STR_3806_SHIP_DEPOT; break;
 		default: assert(0); break;
 	}
 
@@ -704,10 +705,10 @@
 	if (mode != TRANSPORT_WATER) return 0;
 
 	switch (GetWaterTileType(tile)) {
-		case WATER_CLEAR: ts = TRACK_BIT_ALL; break;
-		case WATER_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile, NULL) & 0xF]; break;
-		case WATER_LOCK:  ts = AxisToTrackBits(DiagDirToAxis(GetLockDirection(tile))); break;
-		case WATER_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;
+		case WATER_TILE_CLEAR: ts = TRACK_BIT_ALL; break;
+		case WATER_TILE_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile, NULL) & 0xF]; break;
+		case WATER_TILE_LOCK:  ts = AxisToTrackBits(DiagDirToAxis(GetLockDirection(tile))); break;
+		case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;
 		default: return 0;
 	}
 	if (TileX(tile) == 0) {
@@ -723,7 +724,7 @@
 
 static void ClickTile_Water(TileIndex tile)
 {
-	if (GetWaterTileType(tile) == WATER_DEPOT) {
+	if (GetWaterTileType(tile) == WATER_TILE_DEPOT) {
 		TileIndex tile2 = GetOtherShipDepotTile(tile);
 
 		ShowDepotWindow(tile < tile2 ? tile : tile2, VEH_Ship);
--- a/src/water_map.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/water_map.h	Sun Mar 04 04:25:36 2007 +0000
@@ -4,10 +4,10 @@
 #define WATER_MAP_H
 
 typedef enum WaterTileType {
-	WATER_CLEAR,
-	WATER_COAST,
-	WATER_LOCK,
-	WATER_DEPOT,
+	WATER_TILE_CLEAR,
+	WATER_TILE_COAST,
+	WATER_TILE_LOCK,
+	WATER_TILE_DEPOT,
 } WaterTileType;
 
 typedef enum DepotPart {
@@ -25,22 +25,22 @@
 
 static inline WaterTileType GetWaterTileType(TileIndex t)
 {
-	if (_m[t].m5 == 0) return WATER_CLEAR;
-	if (_m[t].m5 == 1) return WATER_COAST;
-	if (IS_INT_INSIDE(_m[t].m5, LOCK_MIDDLE, LOCK_END)) return WATER_LOCK;
+	if (_m[t].m5 == 0) return WATER_TILE_CLEAR;
+	if (_m[t].m5 == 1) return WATER_TILE_COAST;
+	if (IS_INT_INSIDE(_m[t].m5, LOCK_MIDDLE, LOCK_END)) return WATER_TILE_LOCK;
 
 	assert(IS_INT_INSIDE(_m[t].m5, DEPOT_NORTH, DEPOT_END));
-	return WATER_DEPOT;
+	return WATER_TILE_DEPOT;
 }
 
 static inline bool IsWater(TileIndex t)
 {
-	return GetWaterTileType(t) == WATER_CLEAR;
+	return GetWaterTileType(t) == WATER_TILE_CLEAR;
 }
 
 static inline bool IsCoast(TileIndex t)
 {
-	return GetWaterTileType(t) == WATER_COAST;
+	return GetWaterTileType(t) == WATER_TILE_COAST;
 }
 
 static inline bool IsClearWaterTile(TileIndex t)
@@ -75,7 +75,7 @@
 
 static inline byte GetSection(TileIndex t)
 {
-	assert(GetWaterTileType(t) == WATER_LOCK || GetWaterTileType(t) == WATER_DEPOT);
+	assert(GetWaterTileType(t) == WATER_TILE_LOCK || GetWaterTileType(t) == WATER_TILE_DEPOT);
 	return GB(_m[t].m5, 0, 4);
 }
 
--- a/src/waypoint.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/waypoint.h	Sun Mar 04 04:25:36 2007 +0000
@@ -59,7 +59,7 @@
 static inline Waypoint *GetWaypointByTile(TileIndex tile)
 {
 	assert(IsTileType(tile, MP_RAILWAY) && IsRailWaypoint(tile));
-	return GetWaypoint(_m[tile].m2);
+	return GetWaypoint(GetWaypointIndex(tile));
 }
 
 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);
--- a/src/win32.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/win32.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -606,10 +606,13 @@
 	return EXCEPTION_EXECUTE_HANDLER;
 }
 
+#ifdef _M_AMD64
+extern "C" void *_get_save_esp(void);
+#endif
+
 static void Win32InitializeExceptions(void)
 {
 #ifdef _M_AMD64
-	extern void *_get_save_esp(void);
 	_safe_esp = _get_save_esp();
 #else
 	_asm {
@@ -665,8 +668,11 @@
 		d = dir_calloc();
 		if (d != NULL) {
 			wchar_t search_path[MAX_PATH];
-			/* build search path for FindFirstFile */
-			_snwprintf(search_path, lengthof(search_path), L"%s\\*", path);
+			bool slash = path[wcslen(path) - 1] == L'\\';
+
+			/* build search path for FindFirstFile, try not to append additional slashes
+			 * as it throws Win9x off its groove for root directories */
+			_snwprintf(search_path, lengthof(search_path), L"%s%s*", path, slash ? L"" : L"\\");
 			*lastof(search_path) = '\0';
 			d->hFind = FindFirstFileW(search_path, &d->fd);
 
@@ -1011,16 +1017,16 @@
 	width = length = 0;
 
 	for (ptr = utf8_buf; (c = Utf8Consume(&ptr)) != '\0';) {
-		byte charwidth;
-
 		if (!IsPrintable(c)) break;
-		if (tb->length + length >= tb->maxlength - 1) break;
-		charwidth = GetCharacterWidth(FS_NORMAL, c);
 
+		size_t len = Utf8CharLen(c);
+		if (tb->length + length >= tb->maxlength - (uint16)len) break;
+
+		byte charwidth = GetCharacterWidth(FS_NORMAL, c);
 		if (tb->maxwidth != 0 && width + tb->width + charwidth > tb->maxwidth) break;
 
 		width += charwidth;
-		length += Utf8CharLen(c);
+		length += len;
 	}
 
 	if (length == 0) return false;
@@ -1032,6 +1038,7 @@
 
 	tb->length += length;
 	tb->caretpos += length;
+	assert(tb->length < tb->maxlength);
 	tb->buf[tb->length] = '\0'; // terminating zero
 
 	return true;
--- a/src/win64.asm	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/win64.asm	Sun Mar 04 04:25:36 2007 +0000
@@ -5,13 +5,4 @@
 		MOV	RAX,RSP
 		RET
 
-PUBLIC	_rdtsc
-_rdtsc:
-		RDTSC
-		MOV RCX,RDX
-		SHL RCX,32
-		AND RAX,0FFFFFFFFh
-		OR  RAX,RCX
-		RET
-
 		END
--- a/src/window.h	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/window.h	Sun Mar 04 04:25:36 2007 +0000
@@ -39,19 +39,19 @@
    That was all.. good luck, and enjoy :) -- TrueLight */
 
 enum ResizeFlag {
-	RESIZE_NONE   = 0,
+	RESIZE_NONE   = 0,  ///< no resize required
 
-	RESIZE_LEFT   = 1,
-	RESIZE_RIGHT  = 2,
-	RESIZE_TOP    = 4,
-	RESIZE_BOTTOM = 8,
+	RESIZE_LEFT   = 1,  ///< left resize flag
+	RESIZE_RIGHT  = 2,  ///< rigth resize flag
+	RESIZE_TOP    = 4,  ///< top resize flag
+	RESIZE_BOTTOM = 8,  ///< bottom resize flag
 
-	RESIZE_LR     = RESIZE_LEFT  | RESIZE_RIGHT,
-	RESIZE_RB     = RESIZE_RIGHT | RESIZE_BOTTOM,
-	RESIZE_TB     = RESIZE_TOP   | RESIZE_BOTTOM,
-	RESIZE_LRB    = RESIZE_LEFT  | RESIZE_RIGHT  | RESIZE_BOTTOM,
-	RESIZE_LRTB   = RESIZE_LEFT  | RESIZE_RIGHT  | RESIZE_TOP | RESIZE_BOTTOM,
-	RESIZE_RTB    = RESIZE_RIGHT | RESIZE_TOP    | RESIZE_BOTTOM,
+	RESIZE_LR     = RESIZE_LEFT  | RESIZE_RIGHT,   ///<  combination of left and right resize flags
+	RESIZE_RB     = RESIZE_RIGHT | RESIZE_BOTTOM,  ///<  combination of right and bottom resize flags
+	RESIZE_TB     = RESIZE_TOP   | RESIZE_BOTTOM,  ///<  combination of top and bottom resize flags
+	RESIZE_LRB    = RESIZE_LEFT  | RESIZE_RIGHT  | RESIZE_BOTTOM, ///< combination of left, right and bottom resize flags
+	RESIZE_LRTB   = RESIZE_LEFT  | RESIZE_RIGHT  | RESIZE_TOP | RESIZE_BOTTOM,  ///<  combination of all resize flags
+	RESIZE_RTB    = RESIZE_RIGHT | RESIZE_TOP    | RESIZE_BOTTOM, ///<  combination of right, top and bottom resize flag
 
 	/* The following flags are used by the system to specify what is disabled, hidden, or clicked
 	 * They are used in the same place as the above RESIZE_x flags, Widget visual_flags.
@@ -86,7 +86,7 @@
 
 /* used to indicate the end of widgets' list for vararg functions */
 enum {
-	WIDGET_LIST_END = -1,
+	WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions
 };
 
 /****************** THESE ARE NOT WIDGET TYPES!!!!! *******************/
@@ -280,7 +280,6 @@
 typedef struct ResizeInfo {
 	uint width; ///< Minimum width and height
 	uint height;
-
 	uint step_width; ///< In how big steps the width and height go
 	uint step_height;
 } ResizeInfo;
@@ -757,7 +756,7 @@
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(scroller_d));
 
 typedef enum SortListFlags {
-	VL_NONE    = 0x00,
+	VL_NONE    = 0x00,  ///< no sort
 	VL_DESC    = 0x01,  ///< sort descending or ascending
 	VL_RESORT  = 0x02,  ///< instruct the code to resort the list in the next loop
 	VL_REBUILD = 0x04,  ///< create sort-listing to use for qsort and friends
--- a/src/yapf/yapf_common.cpp	Sat Mar 03 20:33:32 2007 +0000
+++ b/src/yapf/yapf_common.cpp	Sun Mar 04 04:25:36 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file yapf_common.cpp */
+
 #include "../stdafx.h"
 
 #include "yapf.hpp"
@@ -10,20 +12,20 @@
 
 /** translate tileh to the bitset of up-hill trackdirs */
 const TrackdirBits CYapfCostBase::c_upwards_slopes[] = {
-	TRACKDIR_BIT_NONE                    , // no tileh
-	TRACKDIR_BIT_X_SW | TRACKDIR_BIT_Y_NW, // 1
-	TRACKDIR_BIT_X_SW | TRACKDIR_BIT_Y_SE, // 2
-	TRACKDIR_BIT_X_SW                    , // 3
-	TRACKDIR_BIT_X_NE | TRACKDIR_BIT_Y_SE, // 4
-	TRACKDIR_BIT_NONE                    , // 5
-	TRACKDIR_BIT_Y_SE                    , // 6
-	TRACKDIR_BIT_NONE                    , // 7
-	TRACKDIR_BIT_X_NE | TRACKDIR_BIT_Y_NW, // 8,
-	TRACKDIR_BIT_Y_NW                    , // 9
-	TRACKDIR_BIT_NONE                    , //10
-	TRACKDIR_BIT_NONE                    , //11,
-	TRACKDIR_BIT_X_NE                    , //12
-	TRACKDIR_BIT_NONE                    , //13
-	TRACKDIR_BIT_NONE                    , //14
-	TRACKDIR_BIT_NONE                    , //15
+	TRACKDIR_BIT_NONE                    , ///<  no tileh
+	TRACKDIR_BIT_X_SW | TRACKDIR_BIT_Y_NW, ///<  1
+	TRACKDIR_BIT_X_SW | TRACKDIR_BIT_Y_SE, ///<  2
+	TRACKDIR_BIT_X_SW                    , ///<  3
+	TRACKDIR_BIT_X_NE | TRACKDIR_BIT_Y_SE, ///<  4
+	TRACKDIR_BIT_NONE                    , ///<  5
+	TRACKDIR_BIT_Y_SE                    , ///<  6
+	TRACKDIR_BIT_NONE                    , ///<  7
+	TRACKDIR_BIT_X_NE | TRACKDIR_BIT_Y_NW, ///<  8
+	TRACKDIR_BIT_Y_NW                    , ///<  9
+	TRACKDIR_BIT_NONE                    , ///< 10
+	TRACKDIR_BIT_NONE                    , ///< 11
+	TRACKDIR_BIT_X_NE                    , ///< 12
+	TRACKDIR_BIT_NONE                    , ///< 13
+	TRACKDIR_BIT_NONE                    , ///< 14
+	TRACKDIR_BIT_NONE                    , ///< 15
 };