--- a/Doxyfile Mon Mar 26 21:31:37 2007 +0000
+++ b/Doxyfile Mon Mar 26 22:15:38 2007 +0000
@@ -84,6 +84,7 @@
*.cpp \
*.c++ \
*.h \
+ *.hpp \
table/*.h
RECURSIVE = YES
EXCLUDE =
--- a/Makefile.in Mon Mar 26 21:31:37 2007 +0000
+++ b/Makefile.in Mon Mar 26 22:15:38 2007 +0000
@@ -96,6 +96,9 @@
run: all
$(Q)cd !!BIN_DIR!! && ./!!TTD!! $(OPENTTD_ARGS)
+run-gdb: all
+ $(Q)cd !!BIN_DIR!! && gdb --ex run --args ./!!TTD!! $(OPENTTD_ARGS)
+
%.o:
@for dir in $(SRC_DIRS); do \
$(MAKE) -C $$dir $(@:src/%=%); \
@@ -133,8 +136,8 @@
# An OSX application bundle needs the data files, lang files and openttd executable in a different location.
ifdef OSXAPP
-DATA_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Data
-LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Lang
+DATA_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/data
+LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang
TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS
else
DATA_DIR = $(BUNDLE_DIR)/data
--- a/changelog.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/changelog.txt Mon Mar 26 22:15:38 2007 +0000
@@ -1,3 +1,46 @@
+0.5.1-RC2 (2007-03-23)
+------------------------------------------------------------------------
+- Fix: crashes when the chatbox would be drawn outside of the main window [FS#701] (r9420)
+- Fix: reading out of an array caused a segmentation fault [FS#694] (r9394)
+
+
+0.5.1-RC1 (2007-03-20)
+------------------------------------------------------------------------
+- Feature: Translation dependant formatting of dates (r8906)
+- Feature: Kick inactive initial network connections after some time [FS#115] (r9038, r9061)
+- Feature: Add an extra news group for opening and closing of industries (r9097)
+- Codechange: Disable shares by default and increase the default maximum distance from edge for oil refineries (r9339)
+- Codechange: When you started openttd with '-g' you got the same map every run (r9205)
+- Codechange: When all news-setting buttons are 'full', make the for-all button show 'full' too (r9137)
+- Codechange: Disable the ability to make flooding water with the canal build tool. In the scenario editor you can still make both canals and flood water at height level 0 [FS#622, FS#629] (r9105, r9115)
+- Codechange: The station list, sorted by cargo rating, now takes stations into account that have no cargo waiting [FS#595] (r9062)
+- Fix: Close the Shared Order Vehicle List if you remove the shared link with only 2 vehicles (r9338)
+- Fix: A34-1000, Z-Shuttle, and Kelling K1 are now listed as small aircraft (r9298)
+- Fix: Shared orders got messed up when the 'first' trains got removed in the depot [FS#685] (r9277)
+- Fix: Use a less CPU-intensive algorithm to find a random industry for the AI to prevent it slowing down the game [FS#644] (r9251)
+- Fix: When loading games, enroute_from was updated in the wrong place, causing issues with TTD savegames/scenarios (r9147)
+- Fix: "Train is lost" message is generated incorrectly [FS#676] (r9146)
+- Fix: Difficulty level button was not selected when opening the difficulty window (r9117)
+- Fix: The wrong catenary wires were drawn for tunnel entrances [FS#612] (r9077)
+- Fix: The intercontinental airport used 'T-junction' runway sprites when there is no exit in the middle of the runway as in the city airport [FS#529] (r9076)
+- Fix: [win] dedicated console now doesn't need an extra 'enter' to fully quit [FS#459] (r9074)
+- Fix: Take over companies properly in multiplayer games [FS#459] (r9071)
+- Fix: When a bribe failed and you haven't picked up cargo yet, you would never be able to do so for a given station [FS#404] (r9070)
+- Fix: Don't keep on scrolling for non-numeric values in settings, but require reclick [FS#663] (r9064)
+- Fix: The personal (.openttd) directories were hidden in the load/save directory listings [FS#652] (r9043)
+- Fix: Desync caused by buffer overflow [FS#664] (r9027)
+- Fix: When cutting strings into multiple lines also take into consideration whitespace characters of more than 1 byte length. (r9012)
+- Fix: Play the correct engine sound based on the engine type instead of the sprite (r9009)
+- Fix: New locomotive names were not announced in the news, it said "new railway locomotive available - railway locomotive" [FS#581] (r9000, r9001)
+- Fix: [NewGRF] Do not select a disabled platform length/number of track count when going out of drag-drop mode [FS#450] (r8999)
+- Fix: [win] Resolution doubled in cfg file when fullscreen mode used [FS#642] (r8994)
+- Fix: The industry list should also be (re)set when the number of industries is 0 [FS#656] (r8980)
+- Fix: [win] Possible buffer overflow if unicode text is pasted into an input box and needs trimming. (r8975)
+- Fix: [win] Support compilation with the Vista Platform SDK (r8974)
+- Fix: Crash on loading savegames with GRFs that do not have their GRF info/name set (r8955)
+- Fix: [NewGRF] support for vehicle variable 48 was wrong (r8943)
+
+
0.5.0 (2007-02-27)
------------------------------------------------------------------------
- Feature: Add the ability to load newer TTDP games (the tile information for coasts has changed) (r8738)
--- a/config.lib Mon Mar 26 21:31:37 2007 +0000
+++ b/config.lib Mon Mar 26 22:15:38 2007 +0000
@@ -555,18 +555,18 @@
OSXAPP="OpenTTD.app"
# TODO: remove next few lines of code when the search path patch has been applied
- if [ -n "$custom_lang_dir" ] && [ "$custom_lang_dir" != "${OSXAPP}/Contents/Lang/" ]; then
+ if [ -n "$custom_lang_dir" ] && [ "$custom_lang_dir" != "${OSXAPP}/Contents/Resources/lang/" ]; then
log 1 "configure: error: --custom-lang-dir and --with-application-bundle are not compatible
exit 1
fi
- if [ -n "$custom_lang_dir" ] && [ "$second_data_dir" != "${OSXAPP}/Contents/Data/" ]; then
+ if [ -n "$custom_lang_dir" ] && [ "$second_data_dir" != "${OSXAPP}/Contents/Resources/data/" ]; then
log 1 "configure: error: --second-data-dir and --with-application-bundle are not compatible
exit 1
fi
- custom_lang_dir="${OSXAPP}/Contents/Lang/"
- second_data_dir="${OSXAPP}/Contents/Data/"
+ custom_lang_dir="${OSXAPP}/Contents/Resources/lang/"
+ second_data_dir="${OSXAPP}/Contents/Resources/data/"
# TODO: remove till here
else
OSXAPP=""
@@ -581,8 +581,8 @@
# First, are we a real OSX system, else we can't detect it
native=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | grep darwin`
# If $host doesn't match $build , we are cross-compiling
- if [ -n "$native" ] && [ "$build" != "$host" ]; then
- $cc_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
+ if [ -n "$native" ] && [ "$build" == "$host" ]; then
+ $cxx_build $SRC_DIR/os/macosx/G5_detector.cpp -o G5_detector
res=`./G5_detector`
rm -f G5_detector
if [ -n "$res" ]; then
--- a/configure Mon Mar 26 21:31:37 2007 +0000
+++ b/configure Mon Mar 26 22:15:38 2007 +0000
@@ -3,7 +3,11 @@
CONFIGURE_EXECUTABLE="$_"
# On *nix systems those two are equal when ./configure is done
if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then
- CONFIGURE_EXECUTABLE="$CONFIGURE_EXECUTABLE $0"
+ if [ -z "`echo $CONFIGURE_EXECUTABLE | grep make`" ]; then
+ CONFIGURE_EXECUTABLE="$0"
+ else
+ CONFIGURE_EXECUTABLE="$CONFIGURE_EXECUTABLE $0"
+ fi
fi
# Find out where configure is (in what dir)
ROOT_DIR="`dirname $0`"
--- a/docs/landscape.html Mon Mar 26 21:31:37 2007 +0000
+++ b/docs/landscape.html Mon Mar 26 22:15:38 2007 +0000
@@ -568,621 +568,67 @@
<td valign=top nowrap> </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 </th>
- <th align=left>Size </th>
- <th align=left>Climates </th>
- <th align=left>Description</th>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>00</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>01</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>02</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>small block of flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>03</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>church</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>04</tt> </td>
- <td>1×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> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>large office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>06</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>town houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>07</tt>..<tt>08</tt> </td>
- <td>1×2</td>
- <td>temperate</td>
- <td align=left>hotel</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>09</tt> </td>
- <td>1×1</td>
- <td>temperate, sub-arctic, sub-tropical </td>
- <td align=left>statue</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>0A</tt> </td>
- <td>1×1</td>
- <td>temperate, sub-arctic, sub-tropical</td>
- <td align=left>fountain</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>0B</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>park (with a pond)</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>0C</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>park (with an alley)</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>0D</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>0E</tt>..<tt>10</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>various types of shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>11</tt> </td>
- <td>1×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> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>warehouse</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>13</tt> </td>
- <td>1×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> </td>
- <td>2×2</td>
- <td>temperate</td>
- <td align=left>stadium</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>18</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>old houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>19</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>cottages</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1A</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1B</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1C</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1D</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1E</tt> </td>
- <td>1×1</td>
- <td>temperate, sub-tropical</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>1F</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>theatre</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>20</tt>..<tt>23</tt> </td>
- <td>2×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> </td>
- <td>1×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> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>26</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>27</tt> </td>
- <td>1×1</td>
- <td>temperate</td>
- <td align=left>cinema</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>28</tt>..<tt>2B</tt> </td>
- <td>2×2</td>
- <td>temperate</td>
- <td align=left>shopping mall</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>2C</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>2D</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>2E</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>2F</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>30</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>31</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>32</tt> </td>
- <td>1×1</td>
- <td>sub-arctic, sub-tropical</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>33</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>34</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>35</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>36</tt> </td>
- <td>1×1</td>
- <td>sub-arctic, sub-tropical</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>37</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>38</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>39</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3A</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3B</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3C</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>church</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3D</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>church</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3E</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>3F</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>40</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>41</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>42</tt>..<tt>43</tt> </td>
- <td>1×2</td>
- <td>sub-arctic</td>
- <td align=left>hotel</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>44</tt>..<tt>45</tt> </td>
- <td>1×2</td>
- <td>snow</td>
- <td align=left>hotel</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>46</tt> </td>
- <td>1×1</td>
- <td>sub-arctic, sub-tropical</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>47</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>48</tt> </td>
- <td>1×1</td>
- <td>sub-arctic</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>49</tt> </td>
- <td>1×1</td>
- <td>snow</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>4A</tt>..<tt>4B</tt> </td>
- <td>2×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> </td>
- <td>2×1</td>
- <td>snow</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>4E</tt> </td>
- <td>1×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> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>51</tt> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>houses (suburb-type)</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>52</tt> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>53</tt> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>church</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>54</tt> </td>
- <td>1×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> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>57</tt>..<tt>58</tt> </td>
- <td>2×1</td>
- <td>sub-tropical</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>59</tt> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>flats</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>5A</tt> </td>
- <td>1×1</td>
- <td>sub-tropical</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>5B</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>church</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>5C</tt>..<tt>61</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>various types of toyland houses</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>62</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>63</tt>..<tt>64</tt> </td>
- <td>1×2</td>
- <td>toyland</td>
- <td align=left>houses ('shoe' style)</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>65</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>66</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>igloo</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>67</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>tepees</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>68</tt>, <tt>69</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>shops and offices</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>6A</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>tall office block</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>6B</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>statue</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>6C</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>teapot-house</td>
- </tr>
-
- <tr>
- <td nowrap valign=top><tt>6D</tt> </td>
- <td>1×1</td>
- <td>toyland</td>
- <td align=left>piggy-bank</td>
- </tr>
- </table>
- </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>
- <li>for large office blocks (types <tt>04</tt> and <tt>05</tt>):
+ <li>m1 : Random bits <a href="#newhouses">(newhouses)</a> </li>
+ <li>m2 : index into the array of industries</li>
+ <li>m3 bit 7 :
<ul>
- <li>m1 bits 6..0: position of the lift</li>
- <li>m1 bit 7: if set the lift is moving</li>
- <li>m5 bit 7: if set then m5 bits 5..0 hold the destination floor of the lift, which could be 0..6, except 1.<br>
- So the building has 6 effective floors. This is due to the fact that the first floor is 2 'normal' floors high.<br>
- One 'normal' floor has a height of 6 lift positions.</li>
+ <li> set : House is complete
+ <ul>
+ <li>m5 : age of House. Maximum been 255, which means 255 years and more</li>
+ </ul>
+ </li>
+ <li> clear : House is in construction
+ <ul>
+ <li>m5 bits 7..5 : free</li>
+ <li>m5 bits 4..3 : construction stage</li>
+ <li>m5 bits 2..0 : construction counter</li>
+ </ul>
+ </li>
+ </ul>
+ <li>m3 bit 6 : 9th bit of house type (m4), allowing 512 different types.</li>
+ <li>m3 bits 5..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
+ <li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
+ <li>m5 : see m3 bit 7</li>
+ <li>m6 :
+ <ul>
+ <li>If <a href="#newhouses">newhouses</a> is activated
+ <ul>
+ <li>bits 7..3 : Current animation frame</li>
+ <li>bit 2 : free</li>
+ </ul>
+ </li>
+ <li>Standard behaviour
+ <ul>
+ <li>bits 7..2 : lift position (for houses type 04 and 05)</li>
+ </ul>
+ </li>
+ <li>bits 1..0 : tropic zone specifier</li>
</ul>
</li>
- <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
+ <li>m7 :
+ <ul>
+ <li>If <a href="#newhouses">newhouses</a> is activated
+ <ul>
+ <li>Periodic processing time remaining</li>
+ </ul>
+ </li>
+ <li>Standard behaviour (only for houses type 04 and 05)
+ <ul>
+ <li>bits 7..4 : free</li>
+ <li>bits 3..1 : lift destination. Values can be 0..6, except 1.<br>
+ So the building has 6 effective floors. This is due to the fact that the first floor is 2 'normal' floors high.<br>
+ One 'normal' floor has a height of 6 lift positions.
+ </li>
+ <li>bit 0 : Lift has destination when set</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
</ul>
+ <small><a name="newhouses">Newhouses is the name englobing a newGRF feature developped by TTDPatch devs (mainly Csaboka).<br>
+ It allows the replacement of the properties as well as the graphics of houses in the game.<br>
+ To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.<br>
+ 110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
</td>
</tr>
@@ -2066,8 +1512,13 @@
<td valign=top nowrap> </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:
+ <li>m1 : <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
+ <li>m2 :
+ <ul>
+ <li>for company statue (m5 = 02), TownID on which the statue is built in</li>
+ </ul>
+ </li>
+ <li>m5 : tile type:
<table>
<tr>
<td nowrap valign=top><tt>00</tt> </td>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/landscape_externals.html Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,616 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<head>
+ <meta name="Author" content="Marcin Grzegorczyk">
+ <meta name="Description" content="Structure of OpenTTD (OTTD) landscape arrays">
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>OpenTTD Landscape externals</title>
+</head>
+
+<body>
+ <h3><a name="Landscape">Landscape</a></h3>
+ <p>
+ These are the different house types available on standard game.<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>
+ </p>
+
+ <table>
+ <tr>
+ <th align=left>Type </th>
+ <th align=left>Size </th>
+ <th align=left>Climates </th>
+ <th align=left>Description</th>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>00</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>01</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>02</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>small block of flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>03</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>church</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>04</tt> </td>
+ <td>1×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> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>large office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>06</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>town houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>07</tt>..<tt>08</tt> </td>
+ <td>1×2</td>
+ <td>temperate</td>
+ <td align=left>hotel</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>09</tt> </td>
+ <td>1×1</td>
+ <td>temperate, sub-arctic, sub-tropical </td>
+ <td align=left>statue</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>0A</tt> </td>
+ <td>1×1</td>
+ <td>temperate, sub-arctic, sub-tropical</td>
+ <td align=left>fountain</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>0B</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>park (with a pond)</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>0C</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>park (with an alley)</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>0D</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>0E</tt>..<tt>10</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>various types of shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>11</tt> </td>
+ <td>1×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> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>warehouse</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>13</tt> </td>
+ <td>1×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> </td>
+ <td>2×2</td>
+ <td>temperate</td>
+ <td align=left>stadium</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>18</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>old houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>19</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>cottages</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1A</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1B</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1C</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1D</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1E</tt> </td>
+ <td>1×1</td>
+ <td>temperate, sub-tropical</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>1F</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>theatre</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>20</tt>..<tt>23</tt> </td>
+ <td>2×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> </td>
+ <td>1×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> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>26</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>27</tt> </td>
+ <td>1×1</td>
+ <td>temperate</td>
+ <td align=left>cinema</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>28</tt>..<tt>2B</tt> </td>
+ <td>2×2</td>
+ <td>temperate</td>
+ <td align=left>shopping mall</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>2C</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>2D</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>2E</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>2F</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>30</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>31</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>32</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic, sub-tropical</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>33</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>34</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>35</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>36</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic, sub-tropical</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>37</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>38</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>39</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3A</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3B</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3C</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>church</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3D</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>church</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3E</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>3F</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>40</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>41</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>42</tt>..<tt>43</tt> </td>
+ <td>1×2</td>
+ <td>sub-arctic</td>
+ <td align=left>hotel</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>44</tt>..<tt>45</tt> </td>
+ <td>1×2</td>
+ <td>snow</td>
+ <td align=left>hotel</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>46</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic, sub-tropical</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>47</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>48</tt> </td>
+ <td>1×1</td>
+ <td>sub-arctic</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>49</tt> </td>
+ <td>1×1</td>
+ <td>snow</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>4A</tt>..<tt>4B</tt> </td>
+ <td>2×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> </td>
+ <td>2×1</td>
+ <td>snow</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>4E</tt> </td>
+ <td>1×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> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>51</tt> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>houses (suburb-type)</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>52</tt> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>53</tt> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>church</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>54</tt> </td>
+ <td>1×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> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>57</tt>..<tt>58</tt> </td>
+ <td>2×1</td>
+ <td>sub-tropical</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>59</tt> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>flats</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>5A</tt> </td>
+ <td>1×1</td>
+ <td>sub-tropical</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>5B</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>church</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>5C</tt>..<tt>61</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>various types of toyland houses</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>62</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>63</tt>..<tt>64</tt> </td>
+ <td>1×2</td>
+ <td>toyland</td>
+ <td align=left>houses ('shoe' style)</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>65</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>66</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>igloo</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>67</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>tepees</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>68</tt>, <tt>69</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>shops and offices</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>6A</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>tall office block</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>6B</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>statue</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>6C</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>teapot-house</td>
+ </tr>
+
+ <tr>
+ <td nowrap valign=top><tt>6D</tt> </td>
+ <td>1×1</td>
+ <td>toyland</td>
+ <td align=left>piggy-bank</td>
+ </tr>
+ </table>
+</body>
+
+</html>
\ No newline at end of file
--- a/docs/landscape_grid.html Mon Mar 26 21:31:37 2007 +0000
+++ b/docs/landscape_grid.html Mon Mar 26 22:15:38 2007 +0000
@@ -33,6 +33,7 @@
<li><span style="font-weight: bold;">m4</span> - 8 bits in size, is used for general storage</li>
<li><span style="font-weight: bold;">m5</span> - 8 bits in size, is used for general storage</li>
<li><span style="font-weight: bold;">m6</span> - 8 bits in size, special meaning : lower 2 bits only valid in tropic climate, upper 2 bits for bridges</li>
+ <li><span style="font-weight: bold;">m7</span> - 8 bits in size, is used for general storage</li>
</ul>
<table align=center border="1" cellpadding="2" cellspacing="2">
@@ -46,6 +47,7 @@
<th>m4 (8)</th>
<th>m5 (8)</th>
<th>m6 (8)</th>
+ <th>m7 (8)</th>
</tr>
<tr>
<td colspan=2 class="caption">bits</td>
@@ -56,6 +58,7 @@
<td class="bits">7654 3210</td>
<td class="bits">7654 3210</td>
<td class="bits">7654 3210</td>
+ <td class="bits">7654 3210</td>
</tr>
<tr>
<td rowspan="2">0</td>
@@ -67,6 +70,7 @@
<td class="bits">XXXX XX<span class="free">OO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">farmland</td>
@@ -77,6 +81,7 @@
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OOO</span>X XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td rowspan=3>1</td>
@@ -88,6 +93,7 @@
<td class="bits"><span class="free">OOOO O</span>XXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">depot</td>
@@ -98,6 +104,7 @@
<td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">XX<span class="free">OO O</span>XXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">waypoint</td>
@@ -108,6 +115,7 @@
<td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">XX<span class="free">OO O</span>XXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td rowspan=3>2</td>
@@ -119,6 +127,7 @@
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">level crossing</td>
@@ -129,6 +138,7 @@
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XX<span class="free">OO</span></td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td class="caption">road depot</td>
@@ -139,17 +149,19 @@
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>3</td>
- <td class="caption">town</td>
+ <td class="caption">house</td>
<td class="bits">XXXX XXXX</td>
- <td class="bits"><span class="abuse">XXXX XXXX</span></td>
+ <td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
- <td class="bits">XX<span class="free">OO OOOO</span></td>
+ <td class="bits">XX<span class="free">O</span>X XXXX</td>
<td class="bits">XXXX XXXX</td>
- <td class="bits">X<span class="free">O</span>XX XXXX</td>
- <td class="bits"><span class="free">OOOO OO</span>XX</td>
+ <td class="bits">XX<span class="abuse">XX XXXX</span></td>
+ <td class="bits"><span class="abuse">XXXX XX</span>XX</td>
+ <td class="bits"><span class="abuse">X</span>XX<span class="abuse">X XXX</span>X</td>
</tr>
<tr>
<td>4</td>
@@ -161,6 +173,7 @@
<td class="bits">XXXX XX<span class="free">OO</span></td>
<td class="bits">XX<span class="free">OO O</span>XXX</td>
<td class="bits"><span class="free">OOOO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>5</td>
@@ -172,6 +185,7 @@
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO O</span>XXX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>6</td>
@@ -183,20 +197,25 @@
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OO</span>XX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td rowspan=3>8</td>
<td class="caption">industry</td>
<td class="bits">XXXX XXXX</td>
- <td class="bits"><span class="abuse">X</span><span class="free">OO</span><span class="abuse">X XXXX</span></td>
+ <td class="bits"><span class="abuse">X</span><span class="free">OO</span><span class="abuse">X
+ XXXX</span></td>
<td class="bits">XXXX XXXX XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
- <td>bubble/sugar/toffee,<BR>gold/copper/coal,<BR>oil wells, power station</td>
+ <td>bubble/sugar/toffee,<BR>
+ gold/copper/coal,<BR>
+ oil wells, power station</td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="abuse">X</span><span class="free">OOO OOOO</span></td>
<td class="bits">-inherit-</td>
@@ -204,6 +223,7 @@
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>toy factory</td>
@@ -214,6 +234,7 @@
<td class="bits">XXXX XXXX</td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td rowspan=2>9</td>
@@ -225,16 +246,19 @@
<td class="bits">X<span class="free">OOO OOOO</span></td>
<td class="bits">X<span class="free">OOO</span> XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>bridge ramp</td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XXXX XXXX</td>
- <td class="bits"><span class="free">OOOO OOOO</span> <span class="abuse">XXXX</span> <span class="free">OOOO</span></td>
+ <td class="bits"><span class="free">OOOO OOOO</span> <span class="abuse">XXXX</span>
+ <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OOOO</span> XXXX</td>
<td class="bits">X<span class="free">OOO OOOO</span></td>
<td class="bits">X<span class="free">OOO</span> XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
<tr>
<td>A</td>
@@ -246,6 +270,7 @@
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits">XX<span class="free">OO OO</span>XX</td>
+ <td class="bits"><span class="free">OOOO OOOO</span></td>
</tr>
</tbody>
</table>
--- a/docs/openttd.6 Mon Mar 26 21:31:37 2007 +0000
+++ b/docs/openttd.6 Mon Mar 26 22:15:38 2007 +0000
@@ -1,6 +1,6 @@
.\" Hey, EMACS: -*- nroff -*-
.\" Please adjust this date whenever revising the manpage.
-.Dd February 27, 2007
+.Dd March 23, 2007
.Dt OPENTTD 6
.Sh NAME
.Nm openttd
--- a/known-bugs.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/known-bugs.txt Mon Mar 26 22:15:38 2007 +0000
@@ -15,43 +15,39 @@
If the bug report is closed, it has been fixed, which then can be verified
in the latest SVN version.
-Bugs for 0.5.0
+Bugs for 0.5.1
------------------------------------------------------------------------
URL: http://bugs.openttd.org
+-677 Badspacing in news summaries
+-674 Map signs allow less nonenglish characters than english ones
+-672 Non-transparent station names' backgrounds do not resize properly upon language change
+-669 Docks/Airports/RV Stations can be built without available vehicles
+-646 AI builds useless stations
-601 airports can't get flooded when they have planes in them
-599 reloaded game lost company passwords
--595 Sort by max cargo rating does not sort correctly
-594 terraforming wipes out canals
-591 Autorenew fails under certain conditions
-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
-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
-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
-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
-474 Overtaking car doesn't hit the against-riding car.
--459 Merging is buggy
-458 Crash when changing Resolution on Mac OS X (x86)
--450 GUI selecting disabled numbers (newstations)
-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
-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
-365 Blimp Stuck at airport
-362 Changing signal type affects whole square
--357 CPU spikes in game
-355 graphics bugs with trains - water, tunnels
-354 Maglev Trains faster than All Planes
-339 Crash in Quicktime when exiting game
@@ -67,7 +63,6 @@
-165 vehicle length not taken into account
-153 Language crash with app renaming OSX
-119 Clipping problems with vehicles on slopes
--115 inactive logins do not get auto kicked
- 89 Able to build railways/stations before engines become available
- 65 short wagons bug
- 51 Windows doesn't support CUSTOM_LANG_DIR
@@ -87,7 +82,7 @@
-1116638 "More, but smaller changes" deficiency
-1106356 re-offered prototypes
-Minor Bugs for 0.5.0
+Minor Bugs for 0.5.1
------------------------------------------------------------------------
URL: http://sourceforge.net/tracker/?atid=669662&group_id=103924&func=browse
--- a/os/debian/changelog Mon Mar 26 21:31:37 2007 +0000
+++ b/os/debian/changelog Mon Mar 26 22:15:38 2007 +0000
@@ -4,6 +4,18 @@
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Mon, 26 Feb 2007 21:07:05 +0100
+openttd (0.5.1~rc2-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl> Fri, 23 Mar 2007 23:45:46 +0100
+
+openttd (0.5.1~rc1-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Matthijs Kooijman <m.kooijman@student.utwente.nl> Wed, 20 Mar 2007 22:03:46 +0100
+
openttd (0.5.0-1) unstable; urgency=low
* New upstream release
--- a/os/win32/installer/install.nsi Mon Mar 26 21:31:37 2007 +0000
+++ b/os/win32/installer/install.nsi Mon Mar 26 22:15:38 2007 +0000
@@ -1,6 +1,6 @@
!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 APPVERSION "0.5.1" ; Define application version
+!define INSTALLERVERSION 30 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPURLLINK "http://www.openttd.org"
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
--- a/projects/openttd.vcproj Mon Mar 26 21:31:37 2007 +0000
+++ b/projects/openttd.vcproj Mon Mar 26 22:15:38 2007 +0000
@@ -519,6 +519,9 @@
RelativePath=".\..\src\newgrf_engine.h">
</File>
<File
+ RelativePath=".\..\src\newgrf_house.h">
+ </File>
+ <File
RelativePath=".\..\src\newgrf_sound.h">
</File>
<File
@@ -531,6 +534,9 @@
RelativePath=".\..\src\newgrf_text.h">
</File>
<File
+ RelativePath=".\..\src\newgrf_town.h">
+ </File>
+ <File
RelativePath=".\..\src\news.h">
</File>
<File
@@ -920,12 +926,18 @@
RelativePath=".\..\src\newgrf.cpp">
</File>
<File
+ RelativePath=".\..\src\newgrf_cargo.cpp">
+ </File>
+ <File
RelativePath=".\..\src\newgrf_config.cpp">
</File>
<File
RelativePath=".\..\src\newgrf_engine.cpp">
</File>
<File
+ RelativePath=".\..\src\newgrf_house.cpp">
+ </File>
+ <File
RelativePath=".\..\src\newgrf_sound.cpp">
</File>
<File
@@ -937,6 +949,9 @@
<File
RelativePath=".\..\src\newgrf_text.cpp">
</File>
+ <File
+ RelativePath=".\..\src\newgrf_town.cpp">
+ </File>
</Filter>
<Filter
Name="Map Accessors"
--- a/projects/openttd_vs80.vcproj Mon Mar 26 21:31:37 2007 +0000
+++ b/projects/openttd_vs80.vcproj Mon Mar 26 22:15:38 2007 +0000
@@ -920,6 +920,10 @@
>
</File>
<File
+ RelativePath=".\..\src\newgrf_house.h"
+ >
+ </File>
+ <File
RelativePath=".\..\src\newgrf_sound.h"
>
</File>
@@ -936,6 +940,10 @@
>
</File>
<File
+ RelativePath=".\..\src\newgrf_town.h"
+ >
+ </File>
+ <File
RelativePath=".\..\src\news.h"
>
</File>
@@ -1448,6 +1456,10 @@
>
</File>
<File
+ RelativePath=".\..\src\newgrf_cargo.cpp"
+ >
+ </File>
+ <File
RelativePath=".\..\src\newgrf_config.cpp"
>
</File>
@@ -1456,6 +1468,10 @@
>
</File>
<File
+ RelativePath=".\..\src\newgrf_house.cpp"
+ >
+ </File>
+ <File
RelativePath=".\..\src\newgrf_sound.cpp"
>
</File>
@@ -1471,6 +1487,10 @@
RelativePath=".\..\src\newgrf_text.cpp"
>
</File>
+ <File
+ RelativePath=".\..\src\newgrf_town.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Map Accessors"
--- a/readme.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/readme.txt Mon Mar 26 22:15:38 2007 +0000
@@ -1,6 +1,6 @@
OpenTTD README
-Last updated: 2007-02-27
-Release version: 0.5.0
+Last updated: 2007-03-23
+Release version: 0.5.1-RC2
------------------------------------------------------------------------
--- a/source.list Mon Mar 26 21:31:37 2007 +0000
+++ b/source.list Mon Mar 26 22:15:38 2007 +0000
@@ -140,10 +140,12 @@
newgrf_cargo.h
newgrf_config.h
newgrf_engine.h
+newgrf_house.h
newgrf_sound.h
newgrf_spritegroup.h
newgrf_station.h
newgrf_text.h
+newgrf_town.h
news.h
npf.h
music/null_m.h
@@ -277,12 +279,15 @@
# NewGRF
newgrf.cpp
+newgrf_cargo.cpp
newgrf_config.cpp
newgrf_engine.cpp
+newgrf_house.cpp
newgrf_sound.cpp
newgrf_spritegroup.cpp
newgrf_station.cpp
newgrf_text.cpp
+newgrf_town.cpp
# Map Accessors
bridge_map.cpp
--- a/src/ai/default/default.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/ai/default/default.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -460,7 +460,10 @@
static Industry *AiFindRandomIndustry()
{
- return GetRandomIndustry();
+ int num = RandomRange(GetMaxIndustryIndex());
+ if (IsValidIndustry(GetIndustry(num))) return GetIndustry(num);
+
+ return NULL;
}
static void AiFindSubsidyIndustryRoute(FoundRoute *fr)
@@ -2458,7 +2461,7 @@
bool is_pass = (
p->ai.cargo_type == CT_PASSENGERS ||
p->ai.cargo_type == CT_MAIL ||
- (_opt.landscape == LT_NORMAL && p->ai.cargo_type == CT_VALUABLES)
+ (_opt.landscape == LT_TEMPERATE && p->ai.cargo_type == CT_VALUABLES)
);
Order order;
@@ -3200,7 +3203,7 @@
bool is_pass = (
p->ai.cargo_type == CT_PASSENGERS ||
p->ai.cargo_type == CT_MAIL ||
- (_opt.landscape == LT_NORMAL && p->ai.cargo_type == CT_VALUABLES)
+ (_opt.landscape == LT_TEMPERATE && p->ai.cargo_type == CT_VALUABLES)
);
Order order;
--- a/src/aircraft_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/aircraft_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -30,6 +30,7 @@
#include "newgrf_sound.h"
#include "date.h"
#include "spritecache.h"
+#include "cargotype.h"
/** this maps the terminal to its corresponding state and block flag
* currently set for 10 terms, 4 helipads */
@@ -606,7 +607,7 @@
/* Check cargo */
CargoID new_cid = GB(p2, 0, 8);
- if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
+ if (new_cid >= NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_AIRCRAFT_RUN);
@@ -647,7 +648,7 @@
v->cargo_cap = pass;
Vehicle *u = v->next;
- uint mail = new_cid != CT_PASSENGERS ? 0 : avi->mail_capacity;
+ uint mail = IsCargoInClass(new_cid, CC_PASSENGERS) ? avi->mail_capacity : 0;
u->cargo_cap = mail;
if (v->cargo_type == new_cid) {
v->cargo_count = min(pass, v->cargo_count);
@@ -1063,19 +1064,38 @@
if (v->load_unload_time_rem != 0) v->load_unload_time_rem--;
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;
- if (amd->flag & AMED_SLOWTURN) {
- if (v->load_unload_time_rem == 0) v->load_unload_time_rem = 8;
- } else {
- v->cur_speed >>= 1;
+
+ GetNewVehiclePosResult gp;
+
+ if (dist < 4) {
+ /* move vehicle one pixel towards target */
+ gp.x = (v->x_pos != (x + amd->x)) ?
+ v->x_pos + ((x + amd->x > v->x_pos) ? 1 : -1) :
+ v->x_pos;
+ gp.y = (v->y_pos != (y + amd->y)) ?
+ v->y_pos + ((y + amd->y > v->y_pos) ? 1 : -1) :
+ v->y_pos;
+
+ /* Oilrigs must keep v->tile as st->airport_tile, since the landing pad is in a non-airport tile */
+ gp.new_tile = (st->airport_type == AT_OILRIG) ? st->airport_tile : TileVirtXY(gp.x, gp.y);
+
+ } else {
+
+ /* 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;
+ if (amd->flag & AMED_SLOWTURN) {
+ if (v->load_unload_time_rem == 0) v->load_unload_time_rem = 8;
+ } else {
+ v->cur_speed >>= 1;
+ }
}
+
+ /* Move vehicle. */
+ gp = GetNewVehiclePos(v);
}
- /* 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;
@@ -1350,7 +1370,7 @@
InvalidateWindow(WC_VEHICLE_VIEW, v->index);
uint amt = 2;
- if (v->cargo_type == CT_PASSENGERS) amt += v->cargo_count;
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) amt += v->cargo_count;
SetDParam(0, amt);
v->cargo_count = 0;
@@ -1388,7 +1408,7 @@
if (GB(Random(), 0, 16) > prob) return;
/* Crash the airplane. Remove all goods stored at the station. */
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
st->goods[i].rating = 1;
SB(st->goods[i].waiting_acceptance, 0, 12, 0);
}
--- a/src/build_vehicle_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/build_vehicle_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -41,21 +41,22 @@
BUILD_VEHICLE_WIDGET_BUILD,
BUILD_VEHICLE_WIDGET_RENAME,
BUILD_VEHICLE_WIDGET_RESIZE,
+ BUILD_VEHICLE_WIDGET_END
};
static const OldWidget _build_vehicle_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW },
- { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 227, 0, 13, 0x0, STR_018C_WINDOW_TITLE_DRAG_THIS },
+ { WWT_CAPTION, RESIZE_RIGHT, 14, 11, 239, 0, 13, 0x0, STR_018C_WINDOW_TITLE_DRAG_THIS },
{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 80, 14, 25, STR_SORT_BY, STR_SORT_ORDER_TIP},
- { WWT_PANEL, RESIZE_RIGHT, 14, 81, 215, 14, 25, 0x0, STR_SORT_CRITERIA_TIP},
- { WWT_TEXTBTN, RESIZE_LR, 14, 216, 227, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP},
- { WWT_MATRIX, RESIZE_RB, 14, 0, 215, 26, 121, 0x0, STR_NULL },
- { WWT_SCROLLBAR, RESIZE_LRB, 14, 216, 227, 26, 121, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST },
- { WWT_PANEL, RESIZE_RTB, 14, 0, 227, 122, 223, 0x0, STR_NULL },
+ { WWT_PANEL, RESIZE_RIGHT, 14, 81, 227, 14, 25, 0x0, STR_SORT_CRITERIA_TIP},
+ { WWT_TEXTBTN, RESIZE_LR, 14, 228, 239, 14, 25, STR_0225, STR_SORT_CRITERIA_TIP},
+ { WWT_MATRIX, RESIZE_RB, 14, 0, 227, 26, 121, 0x0, STR_NULL },
+ { WWT_SCROLLBAR, RESIZE_LRB, 14, 228, 239, 26, 121, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST },
+ { WWT_PANEL, RESIZE_RTB, 14, 0, 239, 122, 243, 0x0, STR_NULL },
- { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 224, 235, 0x0, STR_NULL },
- { WWT_PUSHTXTBTN, RESIZE_RTB, 14, 115, 215, 224, 235, 0x0, STR_NULL },
- { WWT_RESIZEBOX, RESIZE_LRTB, 14, 216, 227, 224, 235, 0x0, STR_RESIZE_BUTTON },
+ { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 114, 244, 255, 0x0, STR_NULL },
+ { WWT_PUSHTXTBTN, RESIZE_RTB, 14, 115, 227, 244, 255, 0x0, STR_NULL },
+ { WWT_RESIZEBOX, RESIZE_LRTB, 14, 228, 239, 244, 255, 0x0, STR_RESIZE_BUTTON },
{ WIDGETS_END},
};
@@ -527,8 +528,9 @@
* @param x,y location where to draw the info
* @param w how wide are the text allowed to be (size of widget/window to Draw in)
* @param engine_number the engine of which to draw the info of
+ * @return y after drawing all the text
*/
-void DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number)
+int DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number)
{
const Engine *e = GetEngine(engine_number);
YearMonthDay ymd;
@@ -594,6 +596,8 @@
/* Additional text from NewGRF */
y += ShowAdditionalText(x, y, w, engine_number);
if (refitable) y += ShowRefitOptionsList(x, y, w, engine_number);
+
+ return y;
}
/* Figure out what train EngineIDs to put in the list */
@@ -793,6 +797,23 @@
}
}
+static void ExpandPurchaseInfoWidget(BaseWindow *w, int expand_by)
+{
+ OldWidget *wi = &w->widget[BUILD_VEHICLE_WIDGET_PANEL];
+
+ w->SetDirty();
+ wi->bottom += expand_by;
+
+ for (uint i = BUILD_VEHICLE_WIDGET_BUILD; i < BUILD_VEHICLE_WIDGET_END; i++) {
+ wi = &w->widget[i];
+ wi->top += expand_by;
+ wi->bottom += expand_by;
+ }
+
+ w->SetHeight(w->Height() + expand_by);
+ w->SetDirty();
+}
+
static void DrawBuildVehicleWindow(BaseWindow *w)
{
const buildvehicle_d *bv = &WP(w, buildvehicle_d);
@@ -808,7 +829,9 @@
if (bv->sel_engine != INVALID_ENGINE) {
const OldWidget *wi = &w->widget[BUILD_VEHICLE_WIDGET_PANEL];
- DrawVehiclePurchaseInfo(2, wi->top + 1, wi->right - wi->left - 2, bv->sel_engine);
+ int text_end = DrawVehiclePurchaseInfo(2, wi->top + 1, wi->right - wi->left - 2, bv->sel_engine);
+
+ if (text_end > wi->bottom) ExpandPurchaseInfoWidget(w, text_end - wi->bottom);
}
DrawString(85, 15, _sort_listing[bv->vehicle_type][bv->sort_criteria], 0x10);
@@ -941,7 +964,7 @@
}
static const WindowDesc _build_vehicle_desc = {
- WDP_AUTO, WDP_AUTO, 228, 236,
+ WDP_AUTO, WDP_AUTO, 240, 256,
WC_BUILD_VEHICLE, WC_NONE,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
_build_vehicle_widgets,
@@ -982,14 +1005,12 @@
w->Resize(0, 16);
break;
case VEH_ROAD:
- w->Resize(20, 16);
+ w->Resize(0, 16);
case VEH_SHIP:
- w->Resize(27, 0);
break;
case VEH_AIRCRAFT:
bv->filter.flags =
tile == 0 ? AirportFTAClass::ALL : GetStationByTile(tile)->Airport()->flags;
- w->Resize(12, 0);
break;
}
SetupWindowStrings(w, type);
--- a/src/cargotype.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/cargotype.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -12,7 +12,7 @@
#include "table/cargo_const.h"
-static CargoSpec _cargo[NUM_CARGO];
+CargoSpec _cargo[NUM_CARGO];
static const byte INVALID_CARGO = 0xFF;
@@ -64,6 +64,7 @@
CargoID GetCargoIDByLabel(CargoLabel cl)
{
for (CargoID c = 0; c < lengthof(_cargo); c++) {
+ if (_cargo[c].bitnum == INVALID_CARGO) continue;
if (_cargo[c].label == cl) return c;
}
--- a/src/cargotype.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/cargotype.h Mon Mar 26 22:15:38 2007 +0000
@@ -8,6 +8,15 @@
typedef uint32 CargoLabel;
+enum TownEffect {
+ TE_NONE,
+ TE_PASSENGERS,
+ TE_MAIL,
+ TE_GOODS,
+ TE_WATER,
+ TE_FOOD,
+};
+
struct CargoSpec {
uint8 bitnum;
@@ -20,9 +29,9 @@
uint8 transit_days[2];
bool is_freight;
- uint8 substitutetowngrowth;
+ TownEffect town_effect; ///< The effect this cargo type has on towns
uint16 multipliertowngrowth;
- uint8 callbackflags;
+ uint8 callback_mask;
StringID name;
StringID name_plural;
@@ -33,12 +42,14 @@
SpriteID sprite;
uint16 classes;
+ const struct SpriteGroup *group;
bool IsValid() const;
};
extern uint32 _cargo_mask;
+extern CargoSpec _cargo[NUM_CARGO];
/* Set up the default cargo types for the given landscape type */
@@ -48,5 +59,10 @@
/* Get the cargo ID with the cargo label */
CargoID GetCargoIDByLabel(CargoLabel cl);
+static inline bool IsCargoInClass(CargoID c, uint16 cc)
+{
+ return (GetCargo(c)->classes & cc) != 0;
+}
+
#endif /* CARGOTYPE_H */
--- a/src/clear_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/clear_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -16,6 +16,7 @@
#include "tunnel_map.h"
#include "bridge_map.h"
#include "bridge.h"
+#include "landscape.h"
#include "variables.h"
#include "table/sprites.h"
#include "unmovable_map.h"
@@ -620,7 +621,7 @@
/* convert into snowy tiles */
static void TileLoopClearAlps(TileIndex tile)
{
- int k = GetTileZ(tile) - _opt.snow_line + TILE_HEIGHT;
+ int k = GetTileZ(tile) - GetSnowLine() + TILE_HEIGHT;
if (k < 0) { // well below the snow line
if (!IsClearGround(tile, CLEAR_SNOW)) return;
@@ -667,8 +668,8 @@
TileLoopClearHelper(tile);
switch (_opt.landscape) {
- case LT_DESERT: TileLoopClearDesert(tile); break;
- case LT_HILLY: TileLoopClearAlps(tile); break;
+ case LT_TROPIC: TileLoopClearDesert(tile); break;
+ case LT_ARCTIC: TileLoopClearAlps(tile); break;
}
switch (GetClearGround(tile)) {
--- a/src/currency.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/currency.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -158,12 +158,17 @@
}
/**
- * Called only from newgrf.c. Will fill _currency_specs array with
+ * Will fill _currency_specs array with
* default values from origin_currency_specs
+ * Called only from newgrf.cpp and settings.cpp.
+ * @param preserve_custom will not reset custom currency (the latest one on the list)
+ * if ever it is flagged to true. In which case, the total size of the memory to move
+ * will be one currency spec less, thus preserving the custom curreny from been
+ * overwritten.
**/
-void ResetCurrencies()
+void ResetCurrencies(bool preserve_custom)
{
- memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs));
+ memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs) - (preserve_custom ? sizeof(_custom_currency) : 0));
}
/**
--- a/src/currency.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/currency.h Mon Mar 26 22:15:38 2007 +0000
@@ -40,7 +40,7 @@
uint GetMaskOfAllowedCurrencies();
void CheckSwitchToEuro();
-void ResetCurrencies();
+void ResetCurrencies(bool preserve_custom = true);
StringID* BuildCurrencyDropdown();
byte GetNewgrfCurrencyIdConverted(byte grfcurr_id);
--- a/src/dock_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/dock_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -156,7 +156,7 @@
if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
GUIPlaceProcDragXY(e);
} else if (e->we.place.userdata == VPM_X_OR_Y) {
- DoCommandP(e->we.place.tile, e->we.place.starttile, _ctrl_pressed, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS));
+ DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS));
}
}
break;
--- a/src/economy.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/economy.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -652,7 +652,7 @@
_economy.max_loan += 50000;
inf = _economy.infl_amount_pr * 54;
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
AddSingleInflation(
(int32*)_cargo_payment_rates + i,
_cargo_payment_rates_frac + i,
@@ -829,12 +829,12 @@
SetDParam(0, mode ? cs->name_plural : cs->name);
if (s->age < 12) {
- if (s->cargo_type != CT_PASSENGERS && s->cargo_type != CT_MAIL) {
+ if (cs->town_effect != TE_PASSENGERS && cs->town_effect != TE_MAIL) {
SetDParam(1, STR_INDUSTRY);
SetDParam(2, s->from);
tile = GetIndustry(s->from)->xy;
- if (s->cargo_type != CT_GOODS && s->cargo_type != CT_FOOD) {
+ if (cs->town_effect != TE_GOODS && cs->town_effect != TE_FOOD) {
SetDParam(4, STR_INDUSTRY);
SetDParam(5, s->to);
tile2 = GetIndustry(s->to)->xy;
@@ -871,10 +871,12 @@
Subsidy *s;
for (s = _subsidies; s != endof(_subsidies); s++) {
- if (s->cargo_type != CT_INVALID && s->age < 12 &&
- (((s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL) && (index == s->from || index == s->to)) ||
- ((s->cargo_type == CT_GOODS || s->cargo_type == CT_FOOD) && index == s->to))) {
- s->cargo_type = CT_INVALID;
+ if (s->cargo_type != CT_INVALID && s->age < 12) {
+ const CargoSpec *cs = GetCargo(s->cargo_type);
+ if (((cs->town_effect == TE_PASSENGERS || cs->town_effect == TE_MAIL) && (index == s->from || index == s->to)) ||
+ ((cs->town_effect == TE_GOODS || cs->town_effect == TE_FOOD) && index == s->to)) {
+ s->cargo_type = CT_INVALID;
+ }
}
}
}
@@ -884,10 +886,12 @@
Subsidy *s;
for (s = _subsidies; s != endof(_subsidies); s++) {
- if (s->cargo_type != CT_INVALID && s->age < 12 &&
- s->cargo_type != CT_PASSENGERS && s->cargo_type != CT_MAIL &&
- (index == s->from || (s->cargo_type != CT_GOODS && s->cargo_type != CT_FOOD && index == s->to))) {
- s->cargo_type = CT_INVALID;
+ if (s->cargo_type != CT_INVALID && s->age < 12) {
+ const CargoSpec *cs = GetCargo(s->cargo_type);
+ if (cs->town_effect != TE_PASSENGERS && cs->town_effect != TE_MAIL &&
+ (index == s->from || (cs->town_effect != TE_GOODS && cs->town_effect != TE_FOOD && index == s->to))) {
+ s->cargo_type = CT_INVALID;
+ }
}
}
}
@@ -957,12 +961,14 @@
/* Quit if no production in this industry
* or if the cargo type is passengers
* or if the pct transported is already large enough */
- if (total == 0 || trans > 42 || cargo == CT_INVALID || cargo == CT_PASSENGERS)
- return;
+ if (total == 0 || trans > 42 || cargo == CT_INVALID) return;
+
+ const CargoSpec *cs = GetCargo(cargo);
+ if (cs->town_effect == TE_PASSENGERS) return;
fr->cargo = cargo;
- if (cargo == CT_GOODS || cargo == CT_FOOD) {
+ if (cs->town_effect == TE_GOODS || cs->town_effect == TE_FOOD) {
/* The destination is a town */
Town *t = GetRandomTown();
@@ -1055,7 +1061,10 @@
if (fr.distance <= 70) {
s->cargo_type = fr.cargo;
s->from = ((Industry*)fr.from)->index;
- s->to = (fr.cargo == CT_GOODS || fr.cargo == CT_FOOD) ? ((Town*)fr.to)->index : ((Industry*)fr.to)->index;
+ {
+ const CargoSpec *cs = GetCargo(fr.cargo);
+ s->to = (cs->town_effect == TE_GOODS || cs->town_effect == TE_FOOD) ? ((Town*)fr.to)->index : ((Industry*)fr.to)->index;
+ }
add_subsidy:
if (!CheckSubsidyDuplicate(s)) {
s->age = 0;
@@ -1105,12 +1114,11 @@
int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type)
{
- CargoID cargo = cargo_type;
const CargoSpec *cs = GetCargo(cargo_type);
byte f;
/* zero the distance if it's the bank and very short transport. */
- if (_opt.landscape == LT_NORMAL && cargo == CT_VALUABLES && dist < 10)
+ if (_opt.landscape == LT_TEMPERATE && cs->label == 'VALU' && dist < 10)
dist = 0;
f = 255;
@@ -1130,7 +1138,7 @@
}
if (f < 31) f = 31;
- return BIGMULSS(dist * f * num_pieces, _cargo_payment_rates[cargo], 21);
+ return BIGMULSS(dist * f * num_pieces, _cargo_payment_rates[cargo_type], 21);
}
static void DeliverGoodsToIndustry(TileIndex xy, CargoID cargo_type, int num_pieces)
@@ -1187,7 +1195,8 @@
for (s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type == cargo_type && s->age < 12) {
/* Check distance from source */
- if (cargo_type == CT_PASSENGERS || cargo_type == CT_MAIL) {
+ const CargoSpec *cs = GetCargo(cargo_type);
+ if (cs->town_effect == TE_PASSENGERS || cs->town_effect == TE_MAIL) {
xy = GetTown(s->from)->xy;
} else {
xy = (GetIndustry(s->from))->xy;
@@ -1195,11 +1204,11 @@
if (DistanceMax(xy, from->xy) > 9) continue;
/* Check distance from dest */
- switch (cargo_type) {
- case CT_PASSENGERS:
- case CT_MAIL:
- case CT_GOODS:
- case CT_FOOD:
+ switch (cs->town_effect) {
+ case TE_PASSENGERS:
+ case TE_MAIL:
+ case TE_GOODS:
+ case TE_FOOD:
xy = GetTown(s->to)->xy;
break;
@@ -1257,8 +1266,9 @@
subsidised = CheckSubsidised(s_from, s_to, cargo_type);
/* Increase town's counter for some special goods types */
- if (cargo_type == CT_FOOD) s_to->town->new_act_food += num_pieces;
- if (cargo_type == CT_WATER) s_to->town->new_act_water += num_pieces;
+ const CargoSpec *cs = GetCargo(cargo_type);
+ if (cs->town_effect == TE_FOOD) s_to->town->new_act_food += num_pieces;
+ if (cs->town_effect == TE_WATER) s_to->town->new_act_water += num_pieces;
/* Give the goods to the industry. */
DeliverGoodsToIndustry(s_to->xy, cargo_type, num_pieces);
--- a/src/economy.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/economy.h Mon Mar 26 22:15:38 2007 +0000
@@ -66,6 +66,6 @@
void DeleteSubsidyWithStation(StationID index);
int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
-uint MoveGoodsToStation(TileIndex tile, int w, int h, int type, uint amount);
+uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount);
#endif /* ECONOMY_H */
--- a/src/engine_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/engine_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -140,7 +140,7 @@
{
const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
SetDParam(0, (_price.aircraft_base >> 3) * avi->base_cost >> 5);
- SetDParam(1, avi->max_speed);
+ SetDParam(1, avi->max_speed * 10 / 16);
SetDParam(2, avi->passenger_capacity);
SetDParam(3, avi->mail_capacity);
SetDParam(4, avi->running_cost * _price.aircraft_running >> 8);
--- a/src/fileio.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/fileio.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -10,6 +10,12 @@
#include "macros.h"
#include "variables.h"
#include "debug.h"
+#include "fios.h"
+#ifndef WIN32
+#include <pwd.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#endif
/*************************************************/
/* FILE IO ROUTINES ******************************/
@@ -132,15 +138,6 @@
FioCloseFile(i);
}
-bool FioCheckFileExists(const char *filename)
-{
- FILE *f = FioFOpenFile(filename);
- if (f == NULL) return false;
-
- fclose(f);
- return true;
-}
-
#if defined(LIMITED_FDS)
static void FioFreeHandle()
{
@@ -165,6 +162,45 @@
}
#endif /* LIMITED_FDS */
+void FioOpenFile(int slot, const char *filename)
+{
+ FILE *f;
+
+#if defined(LIMITED_FDS)
+ FioFreeHandle();
+#endif /* LIMITED_FDS */
+ f = FioFOpenFile(filename);
+ if (f == NULL) error("Cannot open file '%s%s'", _paths.data_dir, filename);
+
+ FioCloseFile(slot); // if file was opened before, close it
+ _fio.handles[slot] = f;
+#if defined(LIMITED_FDS)
+ _fio.filename[slot] = filename;
+ _fio.usage_count[slot] = 0;
+ _fio.open_handles++;
+#endif /* LIMITED_FDS */
+ FioSeekToFile(slot << 24);
+}
+
+/**
+ * Check whether the given file exists
+ * @param filename the file to try for existance
+ * @return true if and only if the file can be opened
+ */
+bool FioCheckFileExists(const char *filename)
+{
+ FILE *f = FioFOpenFile(filename);
+ if (f == NULL) return false;
+
+ fclose(f);
+ return true;
+}
+
+/**
+ * Opens the file with the given name
+ * @param filename the file to open (in either data_dir or second_data_dir)
+ * @return the opened file or NULL when it failed.
+ */
FILE *FioFOpenFile(const char *filename)
{
FILE *f;
@@ -192,22 +228,156 @@
return f;
}
-void FioOpenFile(int slot, const char *filename)
+/**
+ * Create a directory with the given name
+ * @param name the new name of the directory
+ */
+void FioCreateDirectory(const char *name)
{
- FILE *f;
+#if defined(WIN32) || defined(WINCE)
+ CreateDirectory(OTTD2FS(name), NULL);
+#elif defined(OS2) && !defined(__INNOTEK_LIBC__)
+ mkdir(OTTD2FS(name));
+#else
+ mkdir(OTTD2FS(name), 0755);
+#endif
+}
-#if defined(LIMITED_FDS)
- FioFreeHandle();
-#endif /* LIMITED_FDS */
- f = FioFOpenFile(filename);
- if (f == NULL) error("Cannot open file '%s%s'", _paths.data_dir, filename);
+/**
+ * Appends, if necessary, the path separator character to the end of the string.
+ * It does not add the path separator to zero-sized strings.
+ * @param buf string to append the separator to
+ * @param buflen the length of the buf
+ */
+void AppendPathSeparator(char *buf, size_t buflen)
+{
+ size_t s = strlen(buf);
- FioCloseFile(slot); // if file was opened before, close it
- _fio.handles[slot] = f;
-#if defined(LIMITED_FDS)
- _fio.filename[slot] = filename;
- _fio.usage_count[slot] = 0;
- _fio.open_handles++;
-#endif /* LIMITED_FDS */
- FioSeekToFile(slot << 24);
+ /* Length of string + path separator + '\0' */
+ if (s != 0 && buf[s - 1] != PATHSEPCHAR && s + 2 < buflen) {
+ buf[s] = PATHSEPCHAR;
+ buf[s + 1] = '\0';
+ }
}
+
+#if defined(WIN32) || defined(WINCE)
+/**
+ * Determine the base (personal dir and game data dir) paths
+ * @param exe the path to the executable
+ */
+extern void DetermineBasePaths(const char *exe);
+#else /* defined(WIN32) || defined(WINCE) */
+
+/**
+ * Changes the working directory to the path of the give executable.
+ * For OSX application bundles '.app' is the required extension of the bundle,
+ * so when we crop the path to there, when can remove the name of the bundle
+ * in the same way we remove the name from the executable name.
+ * @param exe the path to the executable
+ */
+void ChangeWorkingDirectory(const char *exe)
+{
+#ifdef WITH_COCOA
+ char *app_bundle = strchr(exe, '.');
+ while (app_bundle != NULL && strncasecmp(app_bundle, ".app", 4) != 0) app_bundle = strchr(&app_bundle[1], '.');
+
+ if (app_bundle != NULL) app_bundle[0] = '\0';
+#endif /* WITH_COCOA */
+ char *s = strrchr(exe, PATHSEPCHAR);
+ if (s != NULL) {
+ *s = '\0';
+ chdir(exe);
+ *s = PATHSEPCHAR;
+ }
+#ifdef WITH_COCOA
+ if (app_bundle != NULL) app_bundle[0] = '.';
+#endif /* WITH_COCOA */
+}
+
+/**
+ * Determine the base (personal dir and game data dir) paths
+ * @param exe the path to the executable
+ */
+void DetermineBasePaths(const char *exe)
+{
+ /* Change the working directory to enable doubleclicking in UIs */
+ ChangeWorkingDirectory(exe);
+
+ _paths.game_data_dir = MallocT<char>(MAX_PATH);
+ ttd_strlcpy(_paths.game_data_dir, GAME_DATA_DIR, MAX_PATH);
+#if defined(SECOND_DATA_DIR)
+ _paths.second_data_dir = MallocT<char>(MAX_PATH);
+ ttd_strlcpy(_paths.second_data_dir, SECOND_DATA_DIR, MAX_PATH);
+#endif
+
+#if defined(USE_HOMEDIR)
+ const char *homedir = getenv("HOME");
+
+ if (homedir == NULL) {
+ const struct passwd *pw = getpwuid(getuid());
+ if (pw != NULL) homedir = pw->pw_dir;
+ }
+
+ _paths.personal_dir = str_fmt("%s" PATHSEP "%s", homedir, PERSONAL_DIR);
+#else /* not defined(USE_HOMEDIR) */
+ _paths.personal_dir = MallocT<char>(MAX_PATH);
+ ttd_strlcpy(_paths.personal_dir, PERSONAL_DIR, MAX_PATH);
+
+ /* check if absolute or relative path */
+ const char *s = strchr(_paths.personal_dir, PATHSEPCHAR);
+
+ /* add absolute path */
+ if (s == NULL || _paths.personal_dir != s) {
+ getcwd(_paths.personal_dir, MAX_PATH);
+ AppendPathSeparator(_paths.personal_dir, MAX_PATH);
+ ttd_strlcat(_paths.personal_dir, PERSONAL_DIR, MAX_PATH);
+ }
+#endif /* defined(USE_HOMEDIR) */
+
+ AppendPathSeparator(_paths.personal_dir, MAX_PATH);
+ AppendPathSeparator(_paths.game_data_dir, MAX_PATH);
+}
+#endif /* defined(WIN32) || defined(WINCE) */
+
+/**
+ * Acquire the base paths (personal dir and game data dir),
+ * fill all other paths (save dir, autosave dir etc) and
+ * make the save and scenario directories.
+ * @param exe the path to the executable
+ * @todo for save_dir, autosave_dir, scenario_dir and heightmap_dir the
+ * assumption is that there is no path separator, however for gm_dir
+ * lang_dir and data_dir that assumption is made.
+ * This inconsistency should be resolved.
+ */
+void DeterminePaths(const char *exe)
+{
+ DetermineBasePaths(exe);
+
+ _paths.save_dir = str_fmt("%ssave", _paths.personal_dir);
+ _paths.autosave_dir = str_fmt("%s" PATHSEP "autosave", _paths.save_dir);
+ _paths.scenario_dir = str_fmt("%sscenario", _paths.personal_dir);
+ _paths.heightmap_dir = str_fmt("%s" PATHSEP "heightmap", _paths.scenario_dir);
+ _paths.gm_dir = str_fmt("%sgm" PATHSEP, _paths.game_data_dir);
+ _paths.data_dir = str_fmt("%sdata" PATHSEP, _paths.game_data_dir);
+#if defined(CUSTOM_LANG_DIR)
+ /* Sets the search path for lng files to the custom one */
+ _paths.lang_dir = MallocT<char>(MAX_PATH);
+ ttd_strlcpy(_paths.lang_dir, CUSTOM_LANG_DIR, MAX_PATH);
+ AppendPathSeparator(_paths.lang_dir, MAX_PATH);
+#else
+ _paths.lang_dir = str_fmt("%slang" PATHSEP, _paths.game_data_dir);
+#endif
+
+ if (_config_file == NULL) {
+ _config_file = str_fmt("%sopenttd.cfg", _paths.personal_dir);
+ }
+
+ _highscore_file = str_fmt("%shs.dat", _paths.personal_dir);
+ _log_file = str_fmt("%sopenttd.log", _paths.personal_dir);
+
+ /* Make (auto)save and scenario folder */
+ FioCreateDirectory(_paths.save_dir);
+ FioCreateDirectory(_paths.autosave_dir);
+ FioCreateDirectory(_paths.scenario_dir);
+ FioCreateDirectory(_paths.heightmap_dir);
+}
--- a/src/fileio.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/fileio.h Mon Mar 26 22:15:38 2007 +0000
@@ -12,10 +12,15 @@
uint16 FioReadWord();
uint32 FioReadDword();
void FioCloseAll();
-FILE *FioFOpenFile(const char *filename);
void FioOpenFile(int slot, const char *filename);
void FioReadBlock(void *ptr, uint size);
void FioSkipBytes(int n);
+
+FILE *FioFOpenFile(const char *filename);
bool FioCheckFileExists(const char *filename);
+void FioCreateDirectory(const char *filename);
+
+void AppendPathSeparator(char *buf, size_t buflen);
+void DeterminePaths(const char *exe);
#endif /* FILEIO_H */
--- a/src/functions.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/functions.h Mon Mar 26 22:15:38 2007 +0000
@@ -206,8 +206,6 @@
/* callback from drivers that is called if the game size changes dynamically */
void GameSizeChanged();
bool FileExists(const char *filename);
-bool ReadLanguagePack(int index);
-void InitializeLanguagePacks();
const char *GetCurrentLocale(const char *param);
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize);
@@ -217,6 +215,4 @@
int ttd_main(int argc, char* argv[]);
void HandleExitGameRequest();
-void DeterminePaths();
-
#endif /* FUNCTIONS_H */
--- a/src/genworld_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/genworld_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -240,7 +240,7 @@
w->SetWidgetDisabledState(GLAND_SMOOTHNESS_PULLDOWN, _patches_newgame.land_generator == 0);
}
/* Disable snowline if not hilly */
- w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_TEXT, _opt_newgame.landscape != LT_HILLY);
+ w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_TEXT, _opt_newgame.landscape != LT_ARCTIC);
/* Disable town, industry and trees in SE */
w->SetWidgetDisabledState(GLAND_TOWN_TEXT, _game_mode == GM_EDITOR);
w->SetWidgetDisabledState(GLAND_TOWN_PULLDOWN, _game_mode == GM_EDITOR);
@@ -251,13 +251,13 @@
w->SetWidgetDisabledState(GLAND_START_DATE_DOWN, _patches_newgame.starting_year <= MIN_YEAR);
w->SetWidgetDisabledState(GLAND_START_DATE_UP, _patches_newgame.starting_year >= MAX_YEAR);
- w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_HILLY);
- w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_UP, _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_HILLY);
+ w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_ARCTIC);
+ w->SetWidgetDisabledState(GLAND_SNOW_LEVEL_UP, _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_ARCTIC);
- w->SetWidgetLoweredState(GLAND_TEMPERATE, _opt_newgame.landscape == LT_NORMAL);
- w->SetWidgetLoweredState(GLAND_ARCTIC, _opt_newgame.landscape == LT_HILLY);
- w->SetWidgetLoweredState(GLAND_TROPICAL, _opt_newgame.landscape == LT_DESERT);
- w->SetWidgetLoweredState(GLAND_TOYLAND, _opt_newgame.landscape == LT_CANDY);
+ w->SetWidgetLoweredState(GLAND_TEMPERATE, _opt_newgame.landscape == LT_TEMPERATE);
+ w->SetWidgetLoweredState(GLAND_ARCTIC, _opt_newgame.landscape == LT_ARCTIC);
+ w->SetWidgetLoweredState(GLAND_TROPICAL, _opt_newgame.landscape == LT_TROPIC);
+ w->SetWidgetLoweredState(GLAND_TOYLAND, _opt_newgame.landscape == LT_TOYLAND);
w->DrawWidgets();
y = (mode == GLWP_HEIGHTMAP) ? 22 : 0;
@@ -589,10 +589,10 @@
w->SetWidgetDisabledState(CSCEN_FLAT_LAND_HEIGHT_DOWN, _patches_newgame.se_flat_world_height <= 0);
w->SetWidgetDisabledState(CSCEN_FLAT_LAND_HEIGHT_UP, _patches_newgame.se_flat_world_height >= 15);
- w->SetWidgetLoweredState(CSCEN_TEMPERATE, _opt_newgame.landscape == LT_NORMAL);
- w->SetWidgetLoweredState(CSCEN_ARCTIC, _opt_newgame.landscape == LT_HILLY);
- w->SetWidgetLoweredState(CSCEN_TROPICAL, _opt_newgame.landscape == LT_DESERT);
- w->SetWidgetLoweredState(CSCEN_TOYLAND, _opt_newgame.landscape == LT_CANDY);
+ w->SetWidgetLoweredState(CSCEN_TEMPERATE, _opt_newgame.landscape == LT_TEMPERATE);
+ w->SetWidgetLoweredState(CSCEN_ARCTIC, _opt_newgame.landscape == LT_ARCTIC);
+ w->SetWidgetLoweredState(CSCEN_TROPICAL, _opt_newgame.landscape == LT_TROPIC);
+ w->SetWidgetLoweredState(CSCEN_TOYLAND, _opt_newgame.landscape == LT_TOYLAND);
w->DrawWidgets();
DrawStringRightAligned(211, 97, STR_MAPSIZE, 0);
--- a/src/gfx.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/gfx.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -531,7 +531,7 @@
}
-uint DrawStringMultiLine(int x, int y, StringID str, int maxw)
+uint DrawStringMultiLine(int x, int y, StringID str, int maxw, int maxh)
{
char buffer[512];
uint32 tmp;
@@ -548,6 +548,14 @@
mt = GetCharacterHeight((FontSize)GB(tmp, 16, 16));
total_height = (num + 1) * mt;
+ if (maxh != -1 && (int)total_height > maxh) {
+ /* Check there's room enough for at least one line. */
+ if (maxh < mt) return 0;
+
+ num = maxh / mt - 1;
+ total_height = (num + 1) * mt;
+ }
+
src = buffer;
for (;;) {
@@ -1555,7 +1563,7 @@
memcpy(old_val, d, c * sizeof(*old_val));
/* Dark blue water */
- s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
+ s = (_opt.landscape == LT_TOYLAND) ? ev->ac : ev->a;
j = EXTR(320, 5);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1564,7 +1572,7 @@
}
/* Glittery water */
- s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
+ s = (_opt.landscape == LT_TOYLAND) ? ev->bc : ev->b;
j = EXTR(128, 15);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1624,7 +1632,7 @@
/* Animate water for old DOS graphics */
if (_use_dos_palette) {
/* Dark blue water DOS */
- s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
+ s = (_opt.landscape == LT_TOYLAND) ? ev->ac : ev->a;
j = EXTR(320, 5);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1633,7 +1641,7 @@
}
/* Glittery water DOS */
- s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
+ s = (_opt.landscape == LT_TOYLAND) ? ev->bc : ev->b;
j = EXTR(128, 15);
for (i = 0; i != 5; i++) {
*d++ = s[j];
--- a/src/gfx.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/gfx.h Mon Mar 26 22:15:38 2007 +0000
@@ -6,6 +6,7 @@
#define GFX_H
#include "misc/rect.hpp"
+#include "openttd.h"
enum WindowKeyCodes {
WKC_SHIFT = 0x8000,
@@ -112,6 +113,12 @@
SpriteID pal;
int wheel; ///< mouse wheel movement
+
+ /* We need two different vars to keep track of how far the scrollwheel moved.
+ * OSX uses this for scrolling around the map. */
+ int v_wheel;
+ int h_wheel;
+
const AnimCursor *animate_list; ///< in case of animated cursor, list of frames
const AnimCursor *animate_cur; ///< in case of animated cursor, current frame
uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current cursor
@@ -223,7 +230,7 @@
uint32 FormatStringLinebreaks(char *str, int maxw);
void LoadStringWidthTable();
void DrawStringMultiCenter(int x, int y, StringID str, int maxw);
-uint DrawStringMultiLine(int x, int y, StringID str, int maxw);
+uint DrawStringMultiLine(int x, int y, StringID str, int maxw, int maxh = -1);
void DrawDirtyBlocks();
void SetDirtyBlocks(int left, int top, int right, int bottom);
void MarkWholeScreenDirty();
--- a/src/gfxinit.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/gfxinit.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -357,7 +357,7 @@
}
/* Load additional sprites for climates other than temperate */
- if (_opt.landscape != LT_NORMAL) {
+ if (_opt.landscape != LT_TEMPERATE) {
LoadGrfIndexed(
files->landscape[_opt.landscape - 1].filename,
_landscape_spriteindexes[_opt.landscape - 1],
--- a/src/graph_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/graph_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -722,7 +722,7 @@
gd.x_values_increment = 10;
uint i = 0;
- for (CargoID c = 0; c != NUM_CARGO; c++) {
+ for (CargoID c = 0; c < NUM_CARGO; c++) {
const CargoSpec *cs = GetCargo(c);
if (!cs->IsValid()) continue;
@@ -792,12 +792,12 @@
/* Count the number of active cargo types */
uint num_active = 0;
- for (CargoID c = 0; c != NUM_CARGO; c++) {
+ 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);
+ w->Resize(0, max(num_active, 12U) * 8);
/* Add widgets for each cargo type */
w->widget_count += num_active;
--- a/src/industry.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/industry.h Mon Mar 26 22:15:38 2007 +0000
@@ -12,6 +12,7 @@
enum {
INVALID_INDUSTRY = 0xFFFF,
+ INDUTILE_NOANIM = 0xFF, ///< flag to mark industry tiles as having no animation
};
enum IndustryLifeType {
@@ -83,6 +84,10 @@
struct IndustryTileSpec {
CargoID accepts_cargo[3]; ///< Cargo accepted by this tile
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
+ byte anim_production; ///< Animation frame to start when goods are produced
+ byte anim_next; ///< Next frame in an animation
+ bool anim_state; ///< When true, the tile has to be drawn using the animation
+ ///< state instead of the construction state
};
const IndustrySpec *GetIndustrySpec(IndustryType thistype); ///< Array of industries default data
--- a/src/industry_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/industry_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -12,6 +12,7 @@
#include "table/sprites.h"
#include "map.h"
#include "tile.h"
+#include "landscape.h"
#include "viewport.h"
#include "command.h"
#include "industry.h"
@@ -233,7 +234,7 @@
ind = GetIndustryByTile(ti->tile);
/* Retrieve pointer to the draw industry tile struct */
- dits = &_industry_draw_tile_data[gfx << 2 | (_industry_section_draw_animation_state[gfx] ?
+ dits = &_industry_draw_tile_data[gfx << 2 | (GetIndustryTileSpec(gfx)->anim_state ?
GetIndustryAnimationState(ti->tile) & 3 :
GetIndustryConstructionStage(ti->tile))];
@@ -357,9 +358,9 @@
am = MoveGoodsToStation(i->xy, i->width, i->height, i->produced_cargo[0], cw);
i->last_mo_transported[0] += am;
if (am != 0) {
- uint newgfx = _industry_produce_section[GetIndustryGfx(tile)];
+ uint newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_production;
- if (newgfx != 0xFF) {
+ if (newgfx != INDUTILE_NOANIM) {
ResetIndustryConstructionStage(tile);
SetIndustryCompleted(tile, true);
SetIndustryGfx(tile, newgfx);
@@ -645,8 +646,8 @@
TransportIndustryGoods(tile);
- newgfx = _industry_section_animation_next[GetIndustryGfx(tile)];
- if (newgfx != 255) {
+ newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_next;
+ if (newgfx != INDUTILE_NOANIM) {
ResetIndustryConstructionStage(tile);
SetIndustryGfx(tile, newgfx);
MarkTileDirtyByTile(tile);
@@ -813,14 +814,14 @@
uint field_type;
int type;
- if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) + TILE_HEIGHT * 2 >= _opt.snow_line)
+ if (_opt.landscape == LT_ARCTIC) {
+ if (GetTileZ(tile) + TILE_HEIGHT * 2 >= GetSnowLine())
return;
}
/* determine field size */
r = (Random() & 0x303) + 0x404;
- if (_opt.landscape == LT_HILLY) r += 0x404;
+ if (_opt.landscape == LT_ARCTIC) r += 0x404;
size_x = GB(r, 0, 8);
size_y = GB(r, 8, 8);
@@ -851,7 +852,7 @@
END_TILE_LOOP(cur_tile, size_x, size_y, tile)
type = 3;
- if (_opt.landscape != LT_HILLY && _opt.landscape != LT_DESERT) {
+ if (_opt.landscape != LT_ARCTIC && _opt.landscape != LT_TROPIC) {
type = _plantfarmfield_type[Random() & 0xF];
}
@@ -1015,8 +1016,8 @@
static bool CheckNewIndustry_Forest(TileIndex tile)
{
- if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) < _opt.snow_line + TILE_HEIGHT * 2U) {
+ if (_opt.landscape == LT_ARCTIC) {
+ if (GetTileZ(tile) < HighestSnowLine() + TILE_HEIGHT * 2U) {
_error_message = STR_4831_FOREST_CAN_ONLY_BE_PLANTED;
return false;
}
@@ -1047,8 +1048,8 @@
static bool CheckNewIndustry_Farm(TileIndex tile)
{
- if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) + TILE_HEIGHT * 2 >= _opt.snow_line) {
+ if (_opt.landscape == LT_ARCTIC) {
+ if (GetTileZ(tile) + TILE_HEIGHT * 2 >= HighestSnowLine()) {
_error_message = STR_0239_SITE_UNSUITABLE;
return false;
}
@@ -1765,7 +1766,7 @@
case INDUSTRYLIFE_PRODUCTION:
/* decrease or increase */
- if (type == IT_OIL_WELL && _opt.landscape == LT_NORMAL)
+ if (type == IT_OIL_WELL && _opt.landscape == LT_TEMPERATE)
only_decrease = true;
if (only_decrease || CHANCE16(1,3)) {
--- a/src/intro_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/intro_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -55,10 +55,10 @@
case WE_CREATE: w->LowerWidget(_opt_newgame.landscape + 8); break;
case WE_PAINT:
- w->SetWidgetLoweredState(8, _opt_newgame.landscape == LT_NORMAL);
- w->SetWidgetLoweredState(9, _opt_newgame.landscape == LT_HILLY);
- w->SetWidgetLoweredState(10, _opt_newgame.landscape == LT_DESERT);
- w->SetWidgetLoweredState(11, _opt_newgame.landscape == LT_CANDY);
+ w->SetWidgetLoweredState(8, _opt_newgame.landscape == LT_TEMPERATE);
+ w->SetWidgetLoweredState(9, _opt_newgame.landscape == LT_ARCTIC);
+ w->SetWidgetLoweredState(10, _opt_newgame.landscape == LT_TROPIC);
+ w->SetWidgetLoweredState(11, _opt_newgame.landscape == LT_TOYLAND);
SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
w->DrawWidgets();
break;
--- a/src/landscape.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/landscape.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -5,6 +5,7 @@
#include "bridge_map.h"
#include "heightmap.h"
#include "clear_map.h"
+#include "date.h"
#include "functions.h"
#include "map.h"
#include "player.h"
@@ -14,6 +15,7 @@
#include <stdarg.h>
#include "viewport.h"
#include "command.h"
+#include "landscape.h"
#include "vehicle.h"
#include "variables.h"
#include "void_map.h"
@@ -61,6 +63,7 @@
SLOPE_NWS, SLOPE_WSE, SLOPE_SEN, SLOPE_ENW
};
+SnowLine *_snow_line = NULL;
uint GetPartialZ(int x, int y, Slope corners)
{
@@ -302,6 +305,62 @@
_tile_type_procs[GetTileType(tile)]->get_tile_desc_proc(tile, td);
}
+/**
+ * Has a snow line table already been loaded.
+ * @return true if the table has been loaded already.
+ */
+bool IsSnowLineSet(void)
+{
+ return _snow_line != NULL;
+}
+
+/**
+ * Set a variable snow line, as loaded from a newgrf file.
+ * @param table the 12 * 32 byte table containing the snowline for each day
+ */
+void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS])
+{
+ _snow_line = CallocT<SnowLine>(1);
+ memcpy(_snow_line->table, table, sizeof(_snow_line->table));
+
+ for (uint i = 0; i < SNOW_LINE_MONTHS; i++) {
+ for (uint j = 0; j < SNOW_LINE_DAYS; j++) {
+ _snow_line->highest_value = max(_snow_line->highest_value, table[i][j]);
+ }
+ }
+}
+
+/**
+ * Get the current snow line, either variable or static.
+ * @return the snow line height.
+ */
+byte GetSnowLine(void)
+{
+ if (_snow_line == NULL) return _opt.snow_line;
+
+ YearMonthDay ymd;
+ ConvertDateToYMD(_date, &ymd);
+ return _snow_line->table[ymd.month][ymd.day];
+}
+
+/**
+ * Get the highest possible snow line height, either variable or static.
+ * @return the highest snow line height.
+ */
+byte HighestSnowLine(void)
+{
+ return _snow_line == NULL ? _opt.snow_line : _snow_line->highest_value;
+}
+
+/**
+ * Clear the variable snow line table and free the memory.
+ */
+void ClearSnowLine(void)
+{
+ free(_snow_line);
+ _snow_line = NULL;
+}
+
/** Clear a piece of landscape
* @param tile tile to clear
* @param flags of operation to conduct
@@ -633,15 +692,15 @@
uint32 r;
if (mode == GW_HEIGHTMAP) {
- SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 1 + gwp_desert_amount : 1);
+ SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 1 + gwp_desert_amount : 1);
LoadHeightmap(_file_to_saveload.name);
IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
} else if (_patches.land_generator == LG_TERRAGENESIS) {
- SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 3 + gwp_desert_amount : 3);
+ SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 3 + gwp_desert_amount : 3);
GenerateTerrainPerlin();
} else {
switch (_opt.landscape) {
- case LT_HILLY:
+ case LT_ARCTIC:
SetGeneratingWorldProgress(GWP_LANDSCAPE, 2);
for (i = ScaleByMapSize((Random() & 0x7F) + 950); i != 0; --i) {
@@ -657,7 +716,7 @@
IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
break;
- case LT_DESERT:
+ case LT_TROPIC:
SetGeneratingWorldProgress(GWP_LANDSCAPE, 3 + gwp_desert_amount);
for (i = ScaleByMapSize((Random() & 0x7F) + 170); i != 0; --i) {
@@ -694,7 +753,7 @@
ConvertGroundTilesIntoWaterTiles();
- if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest();
+ if (_opt.landscape == LT_TROPIC) CreateDesertOrRainForest();
}
void OnTick_Town();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/landscape.h Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,19 @@
+/* $Id$ */
+
+/** @file landscape.h */
+
+enum {
+ SNOW_LINE_MONTHS = 12,
+ SNOW_LINE_DAYS = 32,
+};
+
+struct SnowLine {
+ byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS];
+ byte highest_value;
+};
+
+bool IsSnowLineSet(void);
+void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
+byte GetSnowLine(void);
+byte HighestSnowLine(void);
+void ClearSnowLine(void);
--- a/src/lang/american.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/american.txt Mon Mar 26 22:15:38 2007 +0000
@@ -280,6 +280,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...owned by {STRING}
STR_013C_CARGO :{BLACK}Cargo
@@ -590,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Arrival of first vehicle at competitor's station
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Accidents / disasters
STR_0209_COMPANY_INFORMATION :{YELLOW}Company information
+STR_NEWS_OPEN_CLOSE :{YELLOW}Open / close of industries
STR_020A_ECONOMY_CHANGES :{YELLOW}Economy changes
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Advice / information on player's vehicles
STR_020C_NEW_VEHICLES :{YELLOW}New vehicles
@@ -725,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Place lighthouse
STR_028E_PLACE_TRANSMITTER :{BLACK}Place transmitter
STR_028F_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Press and hold CTRL to remove it
-STR_CREATE_LAKE :{BLACK}Define water area.{}It will flood its surroundings if at sea level
+STR_CREATE_LAKE :{BLACK}Define water area.{}Make a canal, unless CTRL is held down at sea level, when it will flood the surroundings instead
STR_0290_DELETE :{BLACK}Delete
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Delete this town completely
STR_0292_SAVE_SCENARIO :Save scenario
@@ -1088,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Own company
STR_CONFIG_PATCHES_LIVERIES_ALL :All companies
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Prefer team chat with <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Function of scrollwheel: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom map
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll map
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Off
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Map scrollwheel speed: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max trains per player: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max road vehicles per player: {ORANGE}{STRING}
@@ -1206,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Place trees of random type
STR_CANT_BUILD_CANALS :{WHITE}Can't build canals here...
-STR_BUILD_CANALS_TIP :{BLACK}Build canals
+STR_BUILD_CANALS_TIP :{BLACK}Build canals.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Can't build locks here...
@@ -2907,6 +2914,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :Invalid parameter for {STRING}: parameter {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} must be loaded before {STRING}.
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} must be loaded after {STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :the GRF file it was designed to translate
STR_NEWGRF_ADD :{BLACK}Add
STR_NEWGRF_ADD_TIP :{BLACK}Add a NewGRF file to the list
--- a/src/lang/brazilian_portuguese.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/brazilian_portuguese.txt Mon Mar 26 22:15:38 2007 +0000
@@ -236,7 +236,7 @@
STR_010A_COPPER_ORE_MINE :{BLACK}{TINYFONT}Mina de Cobre
STR_010B_FRUIT_PLANTATION :{BLACK}{TINYFONT}Plantação de Frutas
STR_010C_RUBBER_PLANTATION :{BLACK}{TINYFONT}Plantação de Seringueiras
-STR_010D_WATER_SUPPLY :{BLACK}{TINYFONT}Poço de Ãgua
+STR_010D_WATER_SUPPLY :{BLACK}{TINYFONT}Poço Artesiano
STR_010E_WATER_TOWER :{BLACK}{TINYFONT}Reservatório
STR_010F_LUMBER_MILL :{BLACK}{TINYFONT}Serraria
STR_0110_COTTON_CANDY_FOREST :{BLACK}{TINYFONT}Floresta de Algodão Doce
@@ -282,6 +282,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...propriedade de {STRING}
STR_013C_CARGO :{BLACK}Carga
@@ -592,6 +593,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Chegada do primeiro veÃculo à estação de um oponente
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Acidentes / desastres
STR_0209_COMPANY_INFORMATION :{YELLOW}Informações da empresa
+STR_NEWS_OPEN_CLOSE :{YELLOW}Abrir / fechar industrias
STR_020A_ECONOMY_CHANGES :{YELLOW}Alterações econômicas
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Avisos / informações dos veÃculos do jogador
STR_020C_NEW_VEHICLES :{YELLOW}Novos veÃculos
@@ -727,7 +729,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Colocar farol
STR_028E_PLACE_TRANSMITTER :{BLACK}Colocar transmissor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Define área desértica.{} Pressione e segure CTRL para removê-la
-STR_CREATE_LAKE :{BLACK}Define área de água.{} Ela irá inundar quando no nÃvel do mar
STR_0290_DELETE :{BLACK}Remover
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Remover esta cidade completamente
STR_0292_SAVE_SCENARIO :Salvar cenário
@@ -1090,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Minha empresa
STR_CONFIG_PATCHES_LIVERIES_ALL :Todas as empresas
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Falar em time com <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Função do scrollwheel: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom map
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll map
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Desligado
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Velocidade do scrollwheel do mapa: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Máximo de trens por jogador: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Máximo de automóveis por jogador: {ORANGE}{STRING}
@@ -1208,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Plantar árvores de tipo aleatório
STR_CANT_BUILD_CANALS :{WHITE}ImpossÃvel construir canais aqui...
-STR_BUILD_CANALS_TIP :{BLACK}Construir canais
+STR_BUILD_CANALS_TIP :{BLACK}Construir canais.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}ImpossÃvel construir eclusas aqui...
@@ -1892,7 +1898,7 @@
STR_483A_INSECT_INFESTATION_CAUSES :{BLACK}{BIGFONT}Infestação de insetos causa destruição em {INDUSTRY}!{}Produção diminui em 50%
STR_483B_CAN_ONLY_BE_POSITIONED :{WHITE}...só pode ser colocado perto das bordas do mapa
STR_INDUSTRY_PROD_GOUP :{BLACK}{BIGFONT}A produção de {STRING} em {INDUSTRY} aumentou em {COMMA}%!
-STR_INDUSTRY_PROD_GODOWN :{BLACK}{BIGFONT}A produção de {STRING} na {INDUSTRY} diminuiu em {COMMA}%!
+STR_INDUSTRY_PROD_GODOWN :{BLACK}{BIGFONT}A produção de {STRING} em {INDUSTRY} diminuiu em {COMMA}%!
##id 0x5000
STR_5000_TRAIN_IN_TUNNEL :{WHITE}Há um trem no túnel
@@ -2911,6 +2917,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :o arquivo GRF foi designado para tradução
STR_NEWGRF_ADD :{BLACK}Adicionar
STR_NEWGRF_ADD_TIP :{BLACK}Adiciona um NewGRF Ã lista
--- a/src/lang/bulgarian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/bulgarian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -282,6 +282,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...ÑобÑтвеноÑÑ‚ на {STRING}
STR_013C_CARGO :{BLACK}Товар
@@ -592,6 +593,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Първо приÑтигане на превозно ÑредÑтво в конкурентна ÑтанциÑ
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Инциденти / бедÑтвиÑ
STR_0209_COMPANY_INFORMATION :{YELLOW}Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° компаниÑта
+STR_NEWS_OPEN_CLOSE :{YELLOW}Отворени / затворени промишленоÑти
STR_020A_ECONOMY_CHANGES :{YELLOW}Промени в икономиката
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Съвет / Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° превозните ÑредÑтва
STR_020C_NEW_VEHICLES :{YELLOW}Ðови превозни ÑредÑтва
@@ -727,7 +729,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}ПоÑтавÑне фар
STR_028E_PLACE_TRANSMITTER :{BLACK}ПоÑтави предавател
STR_028F_DEFINE_DESERT_AREA :{BLACK}Избери пуÑтинен терен.{}Задръж CTRL за да го премахнеш.
-STR_CREATE_LAKE :{BLACK}ПоÑочване на водна зона.{}Ще наводни ÑÑŠÑедните ако Ñа на морÑкото ниво
+STR_CREATE_LAKE :{BLACK}Определи водна площ.{}ПоÑтрои канал, оÑвем когато CTRL е натиÑнат на морÑко ниво, когато ще наводни околната Ñреда в замÑна
STR_0290_DELETE :{BLACK}Изтрий
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Премахни напълно града
STR_0292_SAVE_SCENARIO :Ð—Ð°Ð¿Ð¸Ñ Ð½Ð° Ñценарий
@@ -1090,6 +1092,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :ТвоÑта компаниÑ
STR_CONFIG_PATCHES_LIVERIES_ALL :Ð’Ñички компании
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Избери Ð¿Ñ€ÐµÐ´Ð¿Ð¾Ñ‡Ð¸Ñ‚Ð°Ð½Ð¸Ñ Ð¾Ñ‚Ð±Ð¾Ñ€ за чатене <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Предназначение на scrollwheel: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Промени фокуÑат на картата
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Разгледай картата
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Изклучен
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Scrollwheel ÑкороÑÑ‚ на картата: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}МакÑ. влакове на играч: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}МакÑ. брой коли на играч: {ORANGE}{STRING}
@@ -1208,7 +1215,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}ПоÑтави дървета от произволен тип
STR_CANT_BUILD_CANALS :{WHITE}Тук не може да Ñе ÑтроÑÑ‚ канали...
-STR_BUILD_CANALS_TIP :{BLACK}Строене на канали. ÐатиÑнете CTRL за да поÑтавите морÑка плочка (Ñамо на нивото на морето).
+STR_BUILD_CANALS_TIP :{BLACK}ПоÑтрои канал.
STR_LANDINFO_CANAL :Канал
STR_CANT_BUILD_LOCKS :{WHITE}Тук не може да Ñе ÑтроÑÑ‚ шлюзове...
@@ -2635,7 +2642,9 @@
STR_TRAIN_NO_POWER :{RED}ÐÑма мощноÑÑ‚
STR_TRAIN_START_NO_CATENARY :Влака не може да тръгне, защото ЖП линиÑта нÑма catenary
+STR_NEW_VEHICLE_NOW_AVAILABLE :{BLACK}{BIGFONT}Ðов {STRING} е на разположение!
STR_NEW_VEHICLE_TYPE :{BLACK}{BIGFONT}{STRING}
+STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ðов {STRING} е на разположение! - {STRING}
##id 0x9000
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Кола на пътÑ
@@ -2907,6 +2916,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :Ðевалиден параметър за {STRING}: параметър {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} Ñ‚Ñ€Ñбва да бъде зареден преди {STRING}.
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} Ñ‚Ñ€Ñбва да бъде зареден Ñлед {STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF файлат беше предназначен да преведе
STR_NEWGRF_ADD :{BLACK}Добави
STR_NEWGRF_ADD_TIP :{BLACK}ДобавÑне на NewGRF файл към ÑпиÑъка
@@ -3140,3 +3150,4 @@
########
+STR_FEEDER_CARGO_VALUE :{BLACK}Сума за премеÑтване: {LTBLUE}{CURRENCY}
--- a/src/lang/catalan.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/catalan.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Arribada del 1er. vehicle a una estació competidora
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Accidents / desastres
STR_0209_COMPANY_INFORMATION :{YELLOW}Informació de l'Empresa
+STR_NEWS_OPEN_CLOSE :{YELLOW}Obrir / tancar d'indústries
STR_020A_ECONOMY_CHANGES :{YELLOW}Canvis de l'Economia
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Avisos / informació dels teus vehicles
STR_020C_NEW_VEHICLES :{YELLOW}Nous vehicles
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Situa un far
STR_028E_PLACE_TRANSMITTER :{BLACK}Situa un repetidor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Defineix à rea de desert.{}Prem i mantingues la tecla CTRL per treure'l
-STR_CREATE_LAKE :{BLACK}Defineix à rea d'aigua.{}Inundarà els voltants si és a nivell del mar
+STR_CREATE_LAKE :{BLACK}Defineix l'area d'aigua.{}Fa un canal, excepte si CTRL està apretat al nivell del mar, llavors s'inundaran els voltants
STR_0290_DELETE :{BLACK}Esborra
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Esborra totalment aquesta població
STR_0292_SAVE_SCENARIO :Desa l'escenari
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Pròpia companyia
STR_CONFIG_PATCHES_LIVERIES_ALL :Totes les companyies
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Prefereix fer un chat d'equip amb <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funció de la rodeta del ratolÃ: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Moure mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Off
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Velocitat del mapa amb la rodeta del ratolÃ: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max trens per jugador: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max automòbils per jugador: {ORANGE}{STRING}
@@ -1207,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Situar arbres de tipus aleatori
STR_CANT_BUILD_CANALS :{WHITE}Aquà no es poden construir canals...
-STR_BUILD_CANALS_TIP :{BLACK}Construeix canals
+STR_BUILD_CANALS_TIP :{BLACK}Construir canals.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Aquà no es pot construir una resclosa...
--- a/src/lang/czech.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/czech.txt Mon Mar 26 22:15:38 2007 +0000
@@ -449,7 +449,7 @@
STR_ENGINE_SORT_POWER :výkonu
STR_ENGINE_SORT_INTRO_DATE :data uvedenà na trh
STR_ENGINE_SORT_RUNNING_COST :provoznÃch nákladů
-STR_ENGINE_SORT_POWER_VS_RUNNING_COST :výkon/provoznÃch nákladů
+STR_ENGINE_SORT_POWER_VS_RUNNING_COST :výkonu/provoznÃch nákladů
STR_ENGINE_SORT_CARGO_CAPACITY :přepravnà kapacity
STR_NO_WAITING_CARGO :{BLACK}NeÄeká žádná komodita jakéhokoli druhu
STR_SELECT_ALL_FACILITIES :{BLACK}OznaÄit vÅ¡echny druhy stanic
@@ -649,6 +649,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}PÅ™Ãjezd prvnÃho vozidla do konkurenÄnà stanice
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Nehody / katastrofy
STR_0209_COMPANY_INFORMATION :{YELLOW}Informace o spoleÄnosti
+STR_NEWS_OPEN_CLOSE :{YELLOW}Otevřenà / zavřenà továren
STR_020A_ECONOMY_CHANGES :{YELLOW}Změny v ekonomice
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Rady / informace o hráÄových vozidlech
STR_020C_NEW_VEHICLES :{YELLOW}Nový dopravnà prostředek
@@ -784,7 +785,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}UmÃstit maják
STR_028E_PLACE_TRANSMITTER :{BLACK}UmÃstit vysÃlaÄ
STR_028F_DEFINE_DESERT_AREA :{BLACK}VytvoÅ™it pouÅ¡tnà oblast{}Stiskem CTRL ji odstranÃÅ¡
-STR_CREATE_LAKE :{BLACK}VytvoÅ™it vodnà plochu.{}Sousednà dÃlky se zaplavà také, pokud jsou na úrovni moÅ™e
+STR_CREATE_LAKE :{BLACK}VytvoÅ™it vodnà plochu.{}Pokud nenà držen CTRL, vytvořà se na úrovni moÅ™e průplav; v opaÄném pÅ™ÃpadÄ› se zaplavà ostatnà dÃlky
STR_0290_DELETE :{BLACK}Smaž
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Smazat celé toto město
STR_0292_SAVE_SCENARIO :Uložit mapu
@@ -1147,6 +1148,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :jen vlastnà spoleÄnost
STR_CONFIG_PATCHES_LIVERIES_ALL :vÅ¡echny spoleÄnosti
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Přepnout na týmový chat <ENTER>em: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Chovánà skrolovacÃho tlaÄÃtka: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :zoomovánà mapy
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :pohyb po mapÄ›
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :nic
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Rychlost skrolovacÃho koleÄka: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maximum vlaků na hráÄe: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maximum silniÄnÃch vozidel na hráÄe: {ORANGE}{STRING}
@@ -1265,7 +1271,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}UmÃstit nahodné stromy
STR_CANT_BUILD_CANALS :{WHITE}Zde nemohu postavit průplav...
-STR_BUILD_CANALS_TIP :{BLACK}StavÄ›t průplav. PodrženÃm CTRL můžete vytvoÅ™it vodnà plochu (pouze na úrovni moÅ™e).
+STR_BUILD_CANALS_TIP :{BLACK}Vytvořit průplav
STR_LANDINFO_CANAL :Průplav
STR_CANT_BUILD_LOCKS :{WHITE}Zde nemohu postavit zdymadlo...
@@ -2541,13 +2547,16 @@
STR_8101_WE_HAVE_JUST_DESIGNED_A :{GOLD}PrávÄ› jsme vyvinuli nov{G ou ý é} {STRING.acc}. MÄ›l byste zájem o roÄnà výhradnà právo na použÃvánà tohoto prostÅ™edku, aby byl otestován pÅ™ed uvedenÃm na trh?
STR_8102_RAILROAD_LOCOMOTIVE :{G=f}lokomotiva
STR_8102_RAILROAD_LOCOMOTIVE.acc :{G=f}lokomotivu
+STR_8102_RAILROAD_LOCOMOTIVE.dat :
STR_8103_ROAD_VEHICLE :{G=n}silniÄnà vozidlo
STR_8104_AIRCRAFT :{G=n}letadlo
STR_8105_SHIP :{G=f}loÄ
STR_8106_MONORAIL_LOCOMOTIVE :{G=f}lokomotiva pro monorail
STR_8106_MONORAIL_LOCOMOTIVE.acc :{G=f}lokomotivu pro monorail
+STR_8106_MONORAIL_LOCOMOTIVE.dat :
STR_8107_MAGLEV_LOCOMOTIVE :{G=f}lokomotiva Maglev
STR_8107_MAGLEV_LOCOMOTIVE.acc :{G=f}lokomotivu Maglev
+STR_8107_MAGLEV_LOCOMOTIVE.dat :
##id 0x8800
STR_8800_TRAIN_DEPOT :{WHITE}ŽelezniÄnà depo {TOWN}
--- a/src/lang/danish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/danish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Ankomst af første køretøj til modstanderens station
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Uheld / katastrofer
STR_0209_COMPANY_INFORMATION :{YELLOW}Selskabsinformation
+STR_NEWS_OPEN_CLOSE :{YELLOW}Ã…bning / lukning af industrier
STR_020A_ECONOMY_CHANGES :{YELLOW}Økonomiændringer
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Rådgivning / information om spillerens køretøjer
STR_020C_NEW_VEHICLES :{YELLOW}Nye køretøjer
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Placér fyrtårn
STR_028E_PLACE_TRANSMITTER :{BLACK}Placér sender
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Hold CTRL nede for at fjerne det
-STR_CREATE_LAKE :{BLACK}Definer vandområde.{}Vil oversvømme nærlæggende land i samme plan
+STR_CREATE_LAKE :{BLACK}Definer vandområde.{}Lav en kanal, med mindre CTRL-tasten holdes ved havniveau, hvorved omgivelserne oversvømmes i stedet
STR_0290_DELETE :{BLACK}Slet
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Slet denne by fuldstændigt
STR_0292_SAVE_SCENARIO :Gem scenarie
@@ -1042,6 +1043,7 @@
STR_CONFIG_PATCHES_NONUNIFORM_STATIONS :{LTBLUE}Ikke uniforme stationer: {ORANGE}{STRING}
STR_CONFIG_PATCHES_NEW_PATHFINDING_ALL :{LTBLUE}Ny global ruteplanlægger (NPF, tilsidesætter NTP): {ORANGE}{STRING}
STR_CONFIG_PATCHES_FREIGHT_TRAINS :{LTBLUE}Vægtfaktor for fragt for at simulere tunge tog: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD :{LTBLUE}Tillad gennemkørsels-stop på veje ejet af en by: {ORANGE}{STRING}
STR_CONFIG_PATCHES_SMALL_AIRPORTS :{LTBLUE}Tillad altid små lufthavne: {ORANGE}{STRING}
@@ -1088,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Eget selskab
STR_CONFIG_PATCHES_LIVERIES_ALL :Alle selskaber
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Foretræk hold-chat med <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Rulleknappens funktion: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom kort
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Rul kort
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Slået fra
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Rulleknap-hastighed på kort: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maks. antal tog per spiller: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maks. antal køretøjer per spiller: {ORANGE}{STRING}
@@ -1206,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Placer træer af tilfældig type
STR_CANT_BUILD_CANALS :{WHITE}Kan ikke bygge en kanal her...
-STR_BUILD_CANALS_TIP :{BLACK}Byg kanaler
+STR_BUILD_CANALS_TIP :{BLACK}Byg kanaler.
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kan ikke bygge en sluse her...
@@ -1502,8 +1509,8 @@
STR_0801_COST :{RED}Pris: {CURRENCY}
STR_0802_INCOME :{TINYFONT}{GREEN}Indkomst: {CURRENCY}
STR_0803_INCOME :{GREEN}Indkomst: {CURRENCY}
-STR_FEEDER_TINY :{TINYFONT}{YELLOW}Overfør: {CURRENCY}
-STR_FEEDER :{YELLOW}Overfør: {CURRENCY}
+STR_FEEDER_TINY :{TINYFONT}{YELLOW}Overført: {CURRENCY}
+STR_FEEDER :{YELLOW}Overført: {CURRENCY}
STR_0805_ESTIMATED_COST :{WHITE}Anslået Pris: {CURRENCY}
STR_0807_ESTIMATED_INCOME :{WHITE}Anslået Indkomst: {CURRENCY}
STR_0808_CAN_T_RAISE_LAND_HERE :{WHITE}Kan ikke hæve landet her...
@@ -2765,7 +2772,7 @@
STR_983C_REFIT_SHIP :{BLACK}Ombyg skibet
STR_983D_SELECT_TYPE_OF_CARGO_FOR :{BLACK}Vælg den slags last skibet skal sejle med
STR_983E_REFIT_SHIP_TO_CARRY_HIGHLIGHTED :{BLACK}Ombyg skibet til den markerede slags last
-STR_983F_SELECT_CARGO_TYPE_TO_CARRY :{GOLD}Vælg den lasttype der skal sejles med:
+STR_983F_SELECT_CARGO_TYPE_TO_CARRY :{GOLD}Vælg den lasttype der skal transporteres:
STR_9840_NEW_CAPACITY_COST_OF_REFIT :{BLACK}Ny kapacitet: {GOLD}{CARGO}{}{BLACK}Pris for ombyggelse: {GOLD}{CURRENCY}
STR_9841_CAN_T_REFIT_SHIP :{WHITE}Kan ikke ombygge skib...
STR_9842_REFITTABLE :(kan ombygges)
@@ -2907,6 +2914,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :Ugyldig parameter for {STRING}: parameter {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} skal indlæses før {STRING}.
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} skal indlæses efter {STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF filen, som den er lavet til at oversætte,
STR_NEWGRF_ADD :{BLACK}Tilføj
STR_NEWGRF_ADD_TIP :{BLACK}Tilføj et NewGRF sæt til listen
@@ -3140,3 +3148,4 @@
########
+STR_FEEDER_CARGO_VALUE :{BLACK}Værdi af overført gods: {LTBLUE}{CURRENCY}
--- a/src/lang/dutch.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/dutch.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Eerste voertuig bij concurrerend station
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Ongelukken/rampen
STR_0209_COMPANY_INFORMATION :{YELLOW}Bedrijfsinformatie
+STR_NEWS_OPEN_CLOSE :{YELLOW}Openen / sluiten van industrieën
STR_020A_ECONOMY_CHANGES :{YELLOW}Veranderingen in de economie
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Advies/informatie over voertuigen van de speler
STR_020C_NEW_VEHICLES :{YELLOW}Nieuwe voertuigen
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plaats vuurtoren
STR_028E_PLACE_TRANSMITTER :{BLACK}Plaats radiomast
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definieer woestijn gebied.{}Gebruik CTRL om het te verwijderen
-STR_CREATE_LAKE :{BLACK}Definieer watergebied.{}Het zal de omgeving overstromen als deze op zeeniveau ligt
+STR_CREATE_LAKE :{BLACK}Definiëer water gebied.{}Maak een kanaal, tenzij CTRL wordt vastgehouden op zee niveau, dan zal de omgeving overstromen
STR_0290_DELETE :{BLACK}Verwijder
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Verwijder deze hele stad
STR_0292_SAVE_SCENARIO :Scenario opslaan
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Eigen bedrijf
STR_CONFIG_PATCHES_LIVERIES_ALL :Alle bedrijven
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Voorkeur voor team chat met <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Functie van muiswiel: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom kaart
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll kaart
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Uit
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Kaart muiswiel snelheid: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maximaal aantal treinen per speler: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maximaal aantal wegvoertuigen per speler: {ORANGE}{STRING}
@@ -1207,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Plant bomen van willekeurig type
STR_CANT_BUILD_CANALS :{WHITE}Kan hier geen kanaal bouwen...
-STR_BUILD_CANALS_TIP :{BLACK}Bouw kanaal
+STR_BUILD_CANALS_TIP :{BLACK}Bouw kanalen.
STR_LANDINFO_CANAL :Kanaal
STR_CANT_BUILD_LOCKS :{WHITE}Kan hier geen sluis bouwen...
--- a/src/lang/english.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/english.txt Mon Mar 26 22:15:38 2007 +0000
@@ -727,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Place lighthouse
STR_028E_PLACE_TRANSMITTER :{BLACK}Place transmitter
STR_028F_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Press and hold CTRL to remove it
-STR_CREATE_LAKE :{BLACK}Define water area.{}It will flood its surroundings if at sea level
+STR_CREATE_LAKE :{BLACK}Define water area.{}Make a canal, unless CTRL is held down at sea level, when it will flood the surroundings instead
STR_0290_DELETE :{BLACK}Delete
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Delete this town completely
STR_0292_SAVE_SCENARIO :Save scenario
@@ -1090,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Own company
STR_CONFIG_PATCHES_LIVERIES_ALL :All companies
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Prefer team chat with <ENTER>: {ORANGE}{STRING1}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Function of scrollwheel: {ORANGE}{STRING1}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom map
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll map
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Off
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Map scrollwheel speed: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max trains per player: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max road vehicles per player: {ORANGE}{STRING1}
@@ -1208,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Place trees of random type
STR_CANT_BUILD_CANALS :{WHITE}Can't build canals here...
-STR_BUILD_CANALS_TIP :{BLACK}Build canals. Press CTRL to place sea tiles (at sea-level only.)
+STR_BUILD_CANALS_TIP :{BLACK}Build canals.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Can't build locks here...
--- a/src/lang/esperanto.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/esperanto.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Unua veturilo atingas konkurantan stacion
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Akcidentoj / katastrofoj
STR_0209_COMPANY_INFORMATION :{YELLOW}Kompaniaj informoj
+STR_NEWS_OPEN_CLOSE :{YELLOW}Malfermo / fermo de industrioj
STR_020A_ECONOMY_CHANGES :{YELLOW}Ekonomiaj ÅanÄoj
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Konsiloj / informoj pri propraj veturiloj
STR_020C_NEW_VEHICLES :{YELLOW}Novaj veturiloj
@@ -727,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Metu lumturon
STR_028E_PLACE_TRANSMITTER :{BLACK}Metu transmitilon
STR_028F_DEFINE_DESERT_AREA :{BLACK}Difinu dezertan regionon.{}Premu kaj tenu CTRL por forigi Äin
-STR_CREATE_LAKE :{BLACK}Difinu akvoregionon.{}Inundos la ĉirkaÅon se marnivele
+STR_CREATE_LAKE :{BLACK}Difinu akvoregionon.{}Faru kanalon, krom se CTRL estas tenata marnivele, kiukaze Äi anstataÅe transfluas al la ĉirkaÅo
STR_0290_DELETE :{BLACK}Forigu
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Plene forigu ĉi tiun urbon
STR_0292_SAVE_SCENARIO :Konservu scenaron
@@ -1090,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Propra kompanio
STR_CONFIG_PATCHES_LIVERIES_ALL :Ĉiuj kompanioj
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Preferu teambabiladon per <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funkcio de skrol-rado: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zomi mapon
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Skroli mapon
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Malaktiva
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Mapskrolrada rapido: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Trajna maksimumo por ĉiu ludanto: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Vojveturila maksimumo por ĉiu ludanto: {ORANGE}{STRING}
@@ -1208,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Metu arbojn de hazardaj tipoj
STR_CANT_BUILD_CANALS :{WHITE}Ne povas konstrui kanalojn ĉi tie...
-STR_BUILD_CANALS_TIP :{BLACK}Konstruu kanalojn. Premu CTRL por meti mar-kvadratojn (nur marnivele.)
+STR_BUILD_CANALS_TIP :{BLACK}Konstruu kanalojn.
STR_LANDINFO_CANAL :Kanalo
STR_CANT_BUILD_LOCKS :{WHITE}Ne povas konstrui kluzojn ĉi tie...
@@ -2909,6 +2915,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :la GRF-dosiero estas farita por traduki
STR_NEWGRF_ADD :{BLACK}Aldonu
STR_NEWGRF_ADD_TIP :{BLACK}Aldonu NewGRF-dosieron al la listo
--- a/src/lang/estonian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/estonian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -380,6 +380,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...omanik on {STRING}
STR_013C_CARGO :{BLACK}Laadung
@@ -724,6 +725,8 @@
STR_022A_GENERATE_RANDOM_LAND :{BLACK}Juhusliku kaardi loomine
STR_022B_RESET_LANDSCAPE :{BLACK}Nulli maastik
STR_022C_RESET_LANDSCAPE :{WHITE}Nulli maastik
+STR_RESET_LANDSCAPE_TOOLTIP :{BLACK}Eemalda kogu mängija omand kaardilt
+STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Kas oled kindel, et tahad eemaldada kogu mängija omandi?
STR_022E_LANDSCAPE_GENERATION :{BLACK}Maastiku loomine
STR_022F_TOWN_GENERATION :{BLACK}Linnade loomine
STR_0230_INDUSTRY_GENERATION :{BLACK}Tööstuste loomine
@@ -823,7 +826,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Ehita tuletorn
STR_028E_PLACE_TRANSMITTER :{BLACK}Paigalda saatjamast
STR_028F_DEFINE_DESERT_AREA :{BLACK}Loo kõrbealad.{}Eemaldamiseks klõpsa hoides all CTRL nuppu
-STR_CREATE_LAKE :{BLACK}Märgi vee ala.{}See uputab kogu läheduse kui on mereveetasemel
STR_0290_DELETE :{BLACK}Kustuta
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Hävita see linn täielikult
STR_0292_SAVE_SCENARIO :Salvesta kaart
@@ -1185,6 +1187,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Enda firma
STR_CONFIG_PATCHES_LIVERIES_ALL :Kõik Firmad
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Eelista Meeskonnajututuba <ENTER>i vajutamisega: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Kerimisratta funktsioon: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Suurenda kaarti
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Keri kaarti
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Väljas
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Kaarti kerimisratta kiirus: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maks. rongide arv mängija kohta: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Suurim maanteesõidukite arv mängija kohta: {ORANGE}{STRING}
@@ -1303,7 +1310,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Istutab suvalisi puid
STR_CANT_BUILD_CANALS :{WHITE}Siia ei saa kanaleid ehitada...
-STR_BUILD_CANALS_TIP :{BLACK}Kanali ehitamine. Veeruutude ehitamiseks vajuta CTRL (ainult merepinna kõrgusel)
+STR_BUILD_CANALS_TIP :{BLACK}Ehita kanaleid.
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Siia ei saa lüüse ehitada...
@@ -1683,6 +1690,7 @@
STR_1817_ROAD_VEHICLE_DEPOT :Depoo
STR_1818_ROAD_RAIL_LEVEL_CROSSING :Raudtee ülesõit
STR_CAN_T_REMOVE_BUS_STATION :{WHITE}Bussijaama ei saa eemaldada...
+STR_CAN_T_REMOVE_TRUCK_STATION :{WHITE}Ei saa eemaldada veoauto jaama...
##id 0x2000
STR_2000_TOWNS :{WHITE}Linnad
@@ -2729,6 +2737,10 @@
STR_TRAIN_NO_POWER :{RED}Vool puudub
STR_TRAIN_START_NO_CATENARY :Selle raja ahel puudub, rong ei saa sõitu alustada
+STR_NEW_VEHICLE_NOW_AVAILABLE :{BLACK}{BIGFONT}Uus {STRING} saadaval!
+STR_NEW_VEHICLE_TYPE :{BLACK}{BIGFONT}{STRING}
+STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Uus {STRING} saadaval! - {STRING}
+
##id 0x9000
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Maanteesõiduk on teel ees
STR_9001_ROAD_VEHICLES :{WHITE}{COMPANY} - {COMMA} maanteesõiduk{P "" it}
@@ -2989,6 +3001,18 @@
STR_NEWGRF_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING}
STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}Sa oled tegemas muudatusi töötavasse mängu; see võib OpenTTD kokku jooksutada.{}Kas sa oled täielikult veendunud selles?
+STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_WARNING :{RED}Hoiatus: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_ERROR :{RED}Viga: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL :{RED}Saatuslik viga: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER :{STRING} ei tööta TTDPatch versiooniga OpenTTD väitel.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{STRING} on {STRING} TTD versiooni jaoks.
+STR_NEWGRF_ERROR_UNSET_SWITCH :{STRING} on mõeldud kasutamiseks {STRING}
+STR_NEWGRF_ERROR_INVALID_PARAMETER :vigane parameeter {STRING} jaoks: parameeter {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} peab olema laetud enne {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} peab olema laetud pärast{STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF fail, mis tehti tõlkimiseks,
+
STR_NEWGRF_ADD :{BLACK}Lisa
STR_NEWGRF_ADD_TIP :{BLACK}Lisa nimekirja NewGRF fail
STR_NEWGRF_REMOVE :{BLACK}Eemalda
@@ -3214,4 +3238,11 @@
STR_MEASURE_LENGTH_HEIGHTDIFF :{BLACK}Pikkus: {NUM}{}Kürguste erinevusj: {NUM} m
STR_MEASURE_AREA_HEIGHTDIFF :{BLACK}Pindala: {NUM} x {NUM}{}Kõrguste erinevus: {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}Kanna Raha: {LTBLUE}{CURRENCY}
--- a/src/lang/finnish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/finnish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -47,7 +47,7 @@
STR_0028_COTTON_CANDY :Hattaraa
STR_0029_BUBBLES :Kuplia
STR_002A_TOFFEE :Toffeeta
-STR_002B_BATTERIES :Pattereita
+STR_002B_BATTERIES :Paristoja
STR_002C_PLASTIC :Muovia
STR_002D_FIZZY_DRINKS :Sihijuomaa
STR_002E :
@@ -203,7 +203,7 @@
STR_00EB_ROADS :{BLACK}{TINYFONT}Tie
STR_00EC_RAILROADS :{BLACK}{TINYFONT}Rautatie
STR_00ED_STATIONS_AIRPORTS_DOCKS :{BLACK}{TINYFONT}Asemat/lentokentät/satamat
-STR_00EE_BUILDINGS_INDUSTRIES :{BLACK}{TINYFONT}Rakennus
+STR_00EE_BUILDINGS_INDUSTRIES :{BLACK}{TINYFONT}Rakennukset/Teollisuus
STR_00EF_VEHICLES :{BLACK}{TINYFONT}Liikennevälineet
STR_00F0_100M :{BLACK}{TINYFONT}100 m
STR_00F1_200M :{BLACK}{TINYFONT}200 m
@@ -280,6 +280,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...omistaja: {STRING}
STR_013C_CARGO :{BLACK}Rahti
@@ -590,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Ensimmäinen ajoneuvo saapuu kilpailijan asemalle.
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Vahingot/onnettomuudet
STR_0209_COMPANY_INFORMATION :{YELLOW}Yhtiön tiedot
+STR_NEWS_OPEN_CLOSE :{YELLOW}Avaa / tehtaiden sulkemiset
STR_020A_ECONOMY_CHANGES :{YELLOW}Talouden muutokset
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Neuvoja/tietoja pelaajan ajoneuvoista
STR_020C_NEW_VEHICLES :{YELLOW}Uudet ajoneuvot
@@ -725,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Sijoita majakka.
STR_028E_PLACE_TRANSMITTER :{BLACK}Sijoita lähetin.
STR_028F_DEFINE_DESERT_AREA :{BLACK}Määrittele aavikon alue.{}Paina ja pidä pohjassa CTRL-nappia poistaaksesi aavikkoa.
-STR_CREATE_LAKE :{BLACK}Määrittele veden alue.{}Vesi tulvii ympäröivään maastoon, jos se on merenpinnan tasolla.
+STR_CREATE_LAKE :{BLACK}Määrittele vesialue.{}Tee kanava, paitsi jos CTRL on alaspainettuna merenpinnalla. Tällöin meri laajenee ympäristöön.
STR_0290_DELETE :{BLACK}Poista
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Poista tämä kaupunki kokonaan.
STR_0292_SAVE_SCENARIO :Tallenna skenaario
@@ -741,7 +743,7 @@
STR_PLAY_HEIGHTMAP :{BLACK}Pelaa korkeuskartta
STR_PLAY_HEIGHTMAP_HINT :{BLACK}Aloita uusi peli, käyttäen korkeuskarttaa maastona
STR_QUIT_SCENARIO_QUERY :{YELLOW}Lopetetaanko skenaario?
-STR_029C_QUIT_EDITOR :{WHITE}Sulje muokkain
+STR_029C_QUIT_EDITOR :{WHITE}Sulje editori
STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...voidaan rakentaa vain kaupunkeihin, joissa on yli 1200 asukasta.
STR_029E_MOVE_THE_STARTING_DATE :{BLACK}Siirrä aloituspäivää vuodella taaksepäin.
STR_029F_MOVE_THE_STARTING_DATE :{BLACK}Siirrä aloituspäivää vuodella eteenpäin.
@@ -816,12 +818,12 @@
STR_MEASURING_UNITS_SELECTION :{BLACK}Mittayksiköiden valinta
STR_02E6_ROAD_VEHICLES :{BLACK}Ajoneuvot
STR_02E7 :{BLACK}{SKIP}{SKIP}{SKIP}{STRING}
-STR_02E8_SELECT_SIDE_OF_ROAD_FOR :{BLACK}Valitse, kummalla puolella tietä ajetaan.
+STR_02E8_SELECT_SIDE_OF_ROAD_FOR :{BLACK}Valitse kummalla puolella tietä ajetaan.
STR_02E9_DRIVE_ON_LEFT :Vasemmalla kaistalla
STR_02EA_DRIVE_ON_RIGHT :Oikealla kaistalla
STR_02EB_TOWN_NAMES :{BLACK}Kaupunkien nimet
STR_02EC :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
-STR_02ED_SELECT_STYLE_OF_TOWN_NAMES :{BLACK}Valitse tyyli kaupunkien nimille.
+STR_02ED_SELECT_STYLE_OF_TOWN_NAMES :{BLACK}Valitse kaupunkien nimien tyyli.
STR_02F4_AUTOSAVE :{BLACK}Automaattitallennus
STR_02F5 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
@@ -829,7 +831,7 @@
STR_02F7_OFF :Pois
STR_02F8_EVERY_3_MONTHS :Joka 3. kuukausi
STR_02F9_EVERY_6_MONTHS :Joka 6. kuukausi
-STR_02FA_EVERY_12_MONTHS :Joka 12. kuukausi
+STR_02FA_EVERY_12_MONTHS :Kerran vuodessa
STR_02FB_START_A_NEW_GAME :{BLACK}Aloita uusi peli.
STR_02FC_LOAD_A_SAVED_GAME :{BLACK}Lataa tallennettu peli.
STR_02FE_CREATE_A_CUSTOMIZED_GAME :{BLACK}Luo oma pelimaailma/skenaario.
@@ -839,7 +841,7 @@
STR_0302_DISPLAY_DIFFICULTY_OPTIONS :{BLACK}Näytä vaikeusasetukset.
STR_0303_START_A_NEW_GAME_USING :{BLACK}Aloita uusi peli käyttäen omaa skenaariota.
STR_0304_QUIT :{BLACK}Sulje
-STR_0305_QUIT_OPENTTD :{BLACK}Sulje "OpenTTD".
+STR_0305_QUIT_OPENTTD :{BLACK}Sulje OpenTTD.
STR_0307_OPENTTD :{WHITE}OpenTTD {REV}
STR_030D_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...voidaan rakentaa vain kaupunkeihin.
STR_030E_SELECT_TEMPERATE_LANDSCAPE :{BLACK}Valitse 'lauhkea' ilmasto.
@@ -860,7 +862,7 @@
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...voidaan rakentaa vain aavikkoalueisiin.
STR_0319_PAUSED :{YELLOW}* * TAUKO * *
-STR_031B_SCREENSHOT_SUCCESSFULLY :{WHITE}Kuvankaappaus tallennettu levyllä nimellä '{STRING}'.
+STR_031B_SCREENSHOT_SUCCESSFULLY :{WHITE}Kuvakaappaus tallennettu nimellä '{STRING}'.
STR_031C_SCREENSHOT_FAILED :{WHITE}Kuvakaappaus epäonnistui!
STR_0329_PURCHASE_LAND_FOR_FUTURE :{BLACK}Osta maata tulevaa käyttöä varten.
@@ -1088,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Oma yritys
STR_CONFIG_PATCHES_LIVERIES_ALL :Kaikki yritykset
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Suosi ryhmäkeskustelua <ENTER> {ORANGE}{STRING} kanssa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Hiiren rullan toiminta: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoomaa karttaa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Vieritä karttaa
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Pois
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Rullan nopeus: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Junia/pelaaja: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Ajoneuvoja/pelaaja: {ORANGE}{STRING}
@@ -1206,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Aseta sattumanvaraisia puita
STR_CANT_BUILD_CANALS :{WHITE}Kanaalia ei voi rakentaa tähän...
-STR_BUILD_CANALS_TIP :{BLACK}Rakenna kanaali
+STR_BUILD_CANALS_TIP :{BLACK}Rakenna kanavia.
STR_LANDINFO_CANAL :Kanaali
STR_CANT_BUILD_LOCKS :{WHITE}Sulkua ei voi rakentaa tähän...
@@ -1506,14 +1513,14 @@
STR_FEEDER :{YELLOW}Siirrä: {CURRENCY}
STR_0805_ESTIMATED_COST :{WHITE}Arvioitu kustannus: {CURRENCY}
STR_0807_ESTIMATED_INCOME :{WHITE}Arvioitu tulo: {CURRENCY}
-STR_0808_CAN_T_RAISE_LAND_HERE :{WHITE}Maata ei voi korottaa...
-STR_0809_CAN_T_LOWER_LAND_HERE :{WHITE}Maata ei voi madaltaa...
+STR_0808_CAN_T_RAISE_LAND_HERE :{WHITE}Maata ei voi korottaa.
+STR_0809_CAN_T_LOWER_LAND_HERE :{WHITE}Maata ei voi laskea.
STR_080A_ROCKS :Kalliota
STR_080B_ROUGH_LAND :Epätasaista maata
STR_080C_BARE_LAND :Paljasta maata
STR_080D_GRASS :Ruohikkoa
STR_080E_FIELDS :Peltoja
-STR_080F_SNOW_COVERED_LAND :Lumenpeittämää maata
+STR_080F_SNOW_COVERED_LAND :Lumen peittämää maata
STR_0810_DESERT :Aavikkoa
##id 0x1000
@@ -1530,12 +1537,12 @@
STR_100B_MONORAIL_CONSTRUCTION :{WHITE}Yksiraiteisen rakentaminen
STR_100C_MAGLEV_CONSTRUCTION :{WHITE}MagLevin rakentaminen
STR_100D_SELECT_RAIL_BRIDGE :{WHITE}Valitse rautatiesilta.
-STR_100E_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Veturitallia ei voi rakentaa...
-STR_100F_CAN_T_BUILD_RAILROAD_STATION :{WHITE}Rautatieasemaa ei voi rakentaa...
-STR_1010_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Opastinta ei voi rakentaa...
-STR_1011_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Rautatietä ei voi rakentaa...
-STR_1012_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Rautatietä ei voi poistaa tästä...
-STR_1013_CAN_T_REMOVE_SIGNALS_FROM :{WHITE}Opastinta ei voi poistaa tästä...
+STR_100E_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Veturitallia ei voi rakentaa.
+STR_100F_CAN_T_BUILD_RAILROAD_STATION :{WHITE}Rautatieasemaa ei voi rakentaa.
+STR_1010_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Opastinta ei voi rakentaa.
+STR_1011_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Rautatietä ei voi rakentaa.
+STR_1012_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Rautatietä ei voi poistaa.
+STR_1013_CAN_T_REMOVE_SIGNALS_FROM :{WHITE}Opastinta ei voi poistaa tästä.
STR_1014_TRAIN_DEPOT_ORIENTATION :{WHITE}Veturitallin suunta
STR_1015_RAILROAD_CONSTRUCTION :Rautatien rakentaminen
STR_TOOLB_ELRAIL_CONSTRUCTION :Sähköradan rakentaminen
@@ -1565,25 +1572,25 @@
STR_ROAD_WORKS_IN_PROGRESS :{WHITE}Tietyöt ovat käynnissä.
STR_1802_ROAD_CONSTRUCTION :{WHITE}Tien rakentaminen
STR_1803_SELECT_ROAD_BRIDGE :{WHITE}Valitse maantiesilta
-STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Tietä ei voi rakentaa...
-STR_1805_CAN_T_REMOVE_ROAD_FROM :{WHITE}Tietä ei voi poistaa tästä...
-STR_1806_ROAD_DEPOT_ORIENTATION :{WHITE}Huoltoaseman suunta
-STR_1807_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}Huoltoasemaa ei voi rakentaa...
-STR_1808_CAN_T_BUILD_BUS_STATION :{WHITE}Linja-autoasemaa ei voi rakentaa...
-STR_1809_CAN_T_BUILD_TRUCK_STATION :{WHITE}Lastauslaituria ei voi rakentaa...
+STR_1804_CAN_T_BUILD_ROAD_HERE :{WHITE}Tietä ei voi rakentaa.
+STR_1805_CAN_T_REMOVE_ROAD_FROM :{WHITE}Tietä ei voi poistaa.
+STR_1806_ROAD_DEPOT_ORIENTATION :{WHITE}Autovarikon suunta
+STR_1807_CAN_T_BUILD_ROAD_VEHICLE :{WHITE}Autovarikkoa ei voi rakentaa.
+STR_1808_CAN_T_BUILD_BUS_STATION :{WHITE}Linja-autoasemaa ei voi rakentaa.
+STR_1809_CAN_T_BUILD_TRUCK_STATION :{WHITE}Lastauslaituria ei voi rakentaa.
STR_180A_ROAD_CONSTRUCTION :Tien rakentaminen
STR_180B_BUILD_ROAD_SECTION :{BLACK}Rakenna tieosuus.
-STR_180C_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Rakenna huoltoasema (ajoneuvojen rakentamista ja huoltoa varten)
+STR_180C_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Rakenna autovarikko (ajoneuvojen rakentamista ja huoltoa varten)
STR_180D_BUILD_BUS_STATION :{BLACK}Rakenna linja-autoasema
STR_180E_BUILD_TRUCK_LOADING_BAY :{BLACK}Rakenna lastauslaituri
STR_180F_BUILD_ROAD_BRIDGE :{BLACK}Rakenna maantiesilta
STR_1810_BUILD_ROAD_TUNNEL :{BLACK}Rakenna maantietunneli
STR_1811_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Tien rakentaminen/siirtäminen päälle/pois
-STR_1813_SELECT_ROAD_VEHICLE_DEPOT :{BLACK}Valitse huoltoaseman suunta.
+STR_1813_SELECT_ROAD_VEHICLE_DEPOT :{BLACK}Valitse autovarikon suunta.
STR_1814_ROAD :Tie
STR_1815_ROAD_WITH_STREETLIGHTS :Tie katuvaloilla
STR_1816_TREE_LINED_ROAD :Puilla reunustettu tie
-STR_1817_ROAD_VEHICLE_DEPOT :Huoltoasema
+STR_1817_ROAD_VEHICLE_DEPOT :Autovarikko
STR_1818_ROAD_RAIL_LEVEL_CROSSING :Tasoristeys
STR_CAN_T_REMOVE_BUS_STATION :{WHITE}Linja-autoasemaa ei voida poistaa...
STR_CAN_T_REMOVE_TRUCK_STATION :{WHITE}Kuorma-auto asemaa ei voida poistaa...
@@ -1595,23 +1602,23 @@
STR_TOWN_LABEL_TINY_BLACK :{TINYFONT}{BLACK}{TOWN}
STR_TOWN_LABEL_TINY_WHITE :{TINYFONT}{WHITE}{TOWN}
STR_2002 :{TINYFONT}{BLACK}{STRING}
-STR_2004_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Rakennus täytyy tuhota ensin.
+STR_2004_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Rakennus täytyy purkaa ensin.
STR_2005 :{WHITE}{TOWN}
STR_2006_POPULATION :{BLACK}Asukasluku: {ORANGE}{COMMA}{BLACK} Taloja: {ORANGE}{COMMA}
STR_2007_RENAME_TOWN :Nimeä kaupunki
-STR_2008_CAN_T_RENAME_TOWN :{WHITE}Kaupunkia ei voi uudelleennimetä...
+STR_2008_CAN_T_RENAME_TOWN :{WHITE}Kaupungin nimeä ei voi vaihtaa.
STR_2009_LOCAL_AUTHORITY_REFUSES :{WHITE}{TOWN}: paikallisviranomaiset kieltäytyvät.
-STR_200A_TOWN_NAMES_CLICK_ON_NAME :{BLACK}Kaupunkien nimet - napsauta nimeä keskittääksesi päänäkymän kaupunkiin.
-STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}Keskitä päänäkymä kaupungin sijaintiin.
+STR_200A_TOWN_NAMES_CLICK_ON_NAME :{BLACK}Kaupunkien nimet - kaupungin valitseminen keskittää näkymän.
+STR_200B_CENTER_THE_MAIN_VIEW_ON :{BLACK}Keskitä näkymä kaupungkiin.
STR_200C_CHANGE_TOWN_NAME :{BLACK}Vaihda kaupungin nimeä.
STR_200D_PASSENGERS_LAST_MONTH_MAX :{BLACK}Matkustajia viime kuussa: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
STR_200E_MAIL_LAST_MONTH_MAX :{BLACK}Postia viime kuussa: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
STR_200F_TALL_OFFICE_BLOCK :Korkea toimistorakennus
STR_2010_OFFICE_BLOCK :Tomistorakennus
-STR_2011_SMALL_BLOCK_OF_FLATS :Pienasuntokortteli
+STR_2011_SMALL_BLOCK_OF_FLATS :Pientaloalue
STR_2012_CHURCH :Kirkko
STR_2013_LARGE_OFFICE_BLOCK :Suuri toimistorakennus
-STR_2014_TOWN_HOUSES :Kaupungin talot
+STR_2014_TOWN_HOUSES :Kaupungintalot
STR_2015_HOTEL :Hotelli
STR_2016_STATUE :Patsas
STR_2017_FOUNTAIN :Suihkulähde
@@ -1629,14 +1636,14 @@
STR_2023_TRANSPORT_COMPANY_RATINGS :{BLACK}Kuljetusyhtiön arvioinnit:
STR_2024 :{YELLOW}{COMPANY}{PLAYERNAME}: {ORANGE}{STRING}
STR_2025_SUBSIDIES :{WHITE}Tuet
-STR_2026_SUBSIDIES_ON_OFFER_FOR :{BLACK}Tarjolla olevat tuet:
+STR_2026_SUBSIDIES_ON_OFFER_FOR :{BLACK}Tarjotut tuet:
STR_2027_FROM_TO :{ORANGE}{STRING} välille {STRING}-{STRING}
STR_2028_BY :{YELLOW} ({DATE_SHORT})
STR_202A_NONE :{ORANGE}Ei mitään
STR_202B_SERVICES_ALREADY_SUBSIDISED :{BLACK}Käytetyt tuet-
STR_202C_FROM_TO :{ORANGE}{STRING} välille {STATION}-{STATION}{YELLOW} ({COMPANY}
STR_202D_UNTIL :{YELLOW}, {DATE_SHORT} asti)
-STR_202E_OFFER_OF_SUBSIDY_EXPIRED :{BLACK}{BIGFONT}Tuki päättynyt:{}{}{STRING} väli {STRING} - {STRING} ei sisällä enää tukia.
+STR_202E_OFFER_OF_SUBSIDY_EXPIRED :{BLACK}{BIGFONT}Tuki päättynyt:{}{}{STRING} väli {STRING} - {STRING} ei ole enää tuettu.
STR_202F_SUBSIDY_WITHDRAWN_SERVICE :{BLACK}{BIGFONT}Tuki vedetty pois:{}{}{STRING} kuljetuspalvelu välille {STATION}-{STATION} ei ole enää tuettu.
STR_2030_SERVICE_SUBSIDY_OFFERED :{BLACK}{BIGFONT}Tuki tarjottu:{}{}Ensimmäinen {STRING}kuljetus välillä {STRING} - {STRING} saa vuoden mittaisen tuen paikallisviranomaisilta!
STR_2031_SERVICE_SUBSIDY_AWARDED :{BLACK}{BIGFONT}Tuki myönnetty yhtiölle {COMPANY}!{}{}{STRING}kuljetus välillä {STATION}-{STATION} tuottaa 50{NBSP}% enemmän seuraavan vuoden ajan!
@@ -1644,22 +1651,22 @@
STR_2033_SERVICE_SUBSIDY_AWARDED :{BLACK}{BIGFONT}Tuki myönnetty yhtiölle {COMPANY}!{}{}{STRING}kuljetus välillä {STATION}-{STATION} tuottaa kolminkertaisesti seuraavan vuoden ajan!
STR_2034_SERVICE_SUBSIDY_AWARDED :{BLACK}{BIGFONT}Tuki myönnetty yhtiölle {COMPANY}!{}{}{STRING}kuljetus välillä {STATION}-{STATION} tuottaa nelinkertaisesti seuraavan vuoden ajan!
STR_2035_LOCAL_AUTHORITY_REFUSES :{WHITE}{TOWN}: paikallisviranomaiset eivät salli toisen lentokentän rakentamista tähän kaupunkiin.
-STR_2036_COTTAGES :Mökkiä
-STR_2037_HOUSES :Taloa
-STR_2038_FLATS :Asuntoa
-STR_2039_TALL_OFFICE_BLOCK :Korkeata toimistorakennusta
-STR_203A_SHOPS_AND_OFFICES :Kauppaa ja toimistoa
-STR_203B_SHOPS_AND_OFFICES :Kauppaa ja toimistoa
+STR_2036_COTTAGES :Mökkejä
+STR_2037_HOUSES :Taloja
+STR_2038_FLATS :Asuntoja
+STR_2039_TALL_OFFICE_BLOCK :Korkeita toimistorakennuksia
+STR_203A_SHOPS_AND_OFFICES :Liikkeitä ja toimistoja
+STR_203B_SHOPS_AND_OFFICES :Liikkeitä ja toimistoja
STR_203C_THEATER :Teatteri
STR_203D_STADIUM :Stadion
-STR_203E_OFFICES :Toimistoa
-STR_203F_HOUSES :Taloa
+STR_203E_OFFICES :Toimistoja
+STR_203F_HOUSES :Taloja
STR_2040_CINEMA :Elokuvateatteri
STR_2041_SHOPPING_MALL :Kauppakeskus
STR_2042_DO_IT :{BLACK}Sijoita
STR_2043_LIST_OF_THINGS_TO_DO_AT :{BLACK}Luettelo kaupungissa tehtävistä asioista - napsauta kohdetta saadaksesi lisätietoja.
STR_2044_CARRY_OUT_THE_HIGHLIGHTED :{BLACK}Suorita valittu toiminto.
-STR_2045_ACTIONS_AVAILABLE :{BLACK}Saatavilla olevat toiminnot:
+STR_2045_ACTIONS_AVAILABLE :{BLACK}Toiminnot:
STR_2046_SMALL_ADVERTISING_CAMPAIGN :Pieni mainoskampanja
STR_2047_MEDIUM_ADVERTISING_CAMPAIGN :Keskikokoinen mainoskampanja
STR_2048_LARGE_ADVERTISING_CAMPAIGN :Suuri mainoskampanja
@@ -1668,9 +1675,9 @@
STR_204B_FUND_NEW_BUILDINGS :Rahoita uusia rakennuksia
STR_204C_BUY_EXCLUSIVE_TRANSPORT :Osta yksinoikeudet kuljetuksiin
STR_TOWN_BRIBE_THE_LOCAL_AUTHORITY :Lahjo viranomaisia
-STR_204D_INITIATE_A_SMALL_LOCAL :{WHITE}{STRING}{}{YELLOW} Tee aloite pienestä mainoskampanjasta hoikutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
-STR_204E_INITIATE_A_MEDIUM_LOCAL :{WHITE}{STRING}{}{YELLOW} Tee aloite keskikokoisesta mainoskampanjasta hoikutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
-STR_204F_INITIATE_A_LARGE_LOCAL :{WHITE}{STRING}{}{YELLOW} Tee aloite suuresta mainoskampanjasta hoikutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
+STR_204D_INITIATE_A_SMALL_LOCAL :{WHITE}{STRING}{}{YELLOW} Käynnistä pieni mainoskampanja hoikutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
+STR_204E_INITIATE_A_MEDIUM_LOCAL :{WHITE}{STRING}{}{YELLOW} Käynnistä keskikokoinen mainoskampanja houkutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
+STR_204F_INITIATE_A_LARGE_LOCAL :{WHITE}{STRING}{}{YELLOW}Käynnistä suuri mainoskampanja hoikutellaksesi lisää matkustajia ja rahtia kuljetuspalveluihisi.{} Kustannus: {CURRENCY}
STR_2050_FUND_THE_RECONSTRUCTION :{WHITE}{STRING}{}{YELLOW} Rahoita kaupungin tieverkon rakentamista. Aiheuttaa huomattavaa häiriötä tieliikenteessä kuuden kuukauden ajan.{} Kustannus: {CURRENCY}
STR_2051_BUILD_A_STATUE_IN_HONOR :{WHITE}{STRING}{}{YELLOW} Rakenna patsas yhtiösi kunniaksi.{} Kustannus: {CURRENCY}
STR_2052_FUND_THE_CONSTRUCTION_OF :{WHITE}{STRING}{}{YELLOW} Rahoita uusien kaupparakennusten rakentamista kaupungissa.{} Kustannus: {CURRENCY}
@@ -1695,15 +1702,15 @@
STR_2800_PLANT_TREES :Istuta puita
STR_2801_PLACE_SIGN :Aseta kyltti
STR_2802_TREES :{WHITE}Puita
-STR_2803_TREE_ALREADY_HERE :{WHITE}...puu on jo tässä.
-STR_2804_SITE_UNSUITABLE :{WHITE}...paikka sopimaton.
-STR_2805_CAN_T_PLANT_TREE_HERE :{WHITE}Puuta ei voi istuttaa...
+STR_2803_TREE_ALREADY_HERE :{WHITE}...tässä on jo puu.
+STR_2804_SITE_UNSUITABLE :{WHITE}...huono paikka.
+STR_2805_CAN_T_PLANT_TREE_HERE :{WHITE}Puuta ei voi istuttaa.
STR_2806 :{WHITE}{STRING}
STR_2808_TOO_MANY_SIGNS :{WHITE}...liian monta kylttiä.
-STR_2809_CAN_T_PLACE_SIGN_HERE :{WHITE}Kylttiä ei voi sijoittaa...
+STR_2809_CAN_T_PLACE_SIGN_HERE :{WHITE}Kylttiä ei voi sijoittaa.
STR_280A_SIGN :Kyltti
STR_280B_EDIT_SIGN_TEXT :{WHITE}Muokkaa kyltin tekstiä.
-STR_280C_CAN_T_CHANGE_SIGN_NAME :{WHITE}Kyltin nimeä ei voi muuttaa...
+STR_280C_CAN_T_CHANGE_SIGN_NAME :{WHITE}Kyltin nimeä ei voi muuttaa.
STR_280D_SELECT_TREE_TYPE_TO_PLANT :{BLACK}Valitse istutettava puutyyppi.
STR_280E_TREES :Puita
STR_280F_RAINFOREST :Sademetsää
@@ -1716,19 +1723,19 @@
STR_3003_NUMBER_OF_TRACKS :{BLACK}Ratojen määrä
STR_3004_PLATFORM_LENGTH :{BLACK}Asemalaiturin pituus
STR_3005_TOO_CLOSE_TO_ANOTHER_RAILROAD :{WHITE}Liian lähellä toista rautatieasemaa.
-STR_3006_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Liitä yhteen useampi kuin yksi olemassaoleva asema/lastausalue.
-STR_3007_TOO_MANY_STATIONS_LOADING :{WHITE}Liian monta asemaa/lastausaluetta kaupungissa.
-STR_3008_TOO_MANY_STATIONS_LOADING :{WHITE}Liian monta asemaa/lastausaluetta.
+STR_3006_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Liitä yhteen useampi asema/lastausalue.
+STR_3007_TOO_MANY_STATIONS_LOADING :{WHITE}Liian monta asemaa ja lastausaluetta kaupungissa.
+STR_3008_TOO_MANY_STATIONS_LOADING :{WHITE}Liian monta asemaa ja lastausaluetta.
STR_3008A_TOO_MANY_BUS_STOPS :{WHITE}Liian monta linja-autopysäkkiä.
STR_3008B_TOO_MANY_TRUCK_STOPS :{WHITE}Liian monta lastauslaituria.
-STR_3009_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Liian lähellä toista asemaa/lastausaluetta.
+STR_3009_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Liian lähellä toista asemaa tai lastausaluetta.
STR_300A_0 :{WHITE}{STATION} {STATIONFEATURES}
STR_300B_MUST_DEMOLISH_RAILROAD :{WHITE}Rautatieasema pitää tuhota ensin.
STR_300D_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Liian lähellä toista lentokenttää.
STR_300E_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}Lentokenttä pitää tuhota ensin.
STR_3030_RENAME_STATION_LOADING :Nimeä asema/lastausalue
-STR_3031_CAN_T_RENAME_STATION :{WHITE}Asemaa ei voi nimetä uudelleen...
+STR_3031_CAN_T_RENAME_STATION :{WHITE}Asemaa ei voi nimetä uudelleen.
STR_3032_RATINGS :{BLACK}Arviot
STR_3033_ACCEPTS :{BLACK}Ottaa vastaan
STR_3034_LOCAL_RATING_OF_TRANSPORT :{BLACK}Paikallinen arvio kuljetuspalvelusta:
@@ -1739,24 +1746,24 @@
STR_3037_POOR :Kehno
STR_3038_MEDIOCRE :Keskinkertainen
STR_3039_GOOD :Hyvä
-STR_303A_VERY_GOOD :Oikein hyvä
+STR_303A_VERY_GOOD :Erittäin hyvä
STR_303B_EXCELLENT :Mainio
STR_303C_OUTSTANDING :Loistava
############ range for rating ends
STR_303D :{WHITE}{STRING}: {YELLOW}{STRING} ({COMMA}{NBSP}%)
-STR_303E_NO_LONGER_ACCEPTS :{WHITE}{STATION} ei enää ota vastaan {STRING}.
-STR_303F_NO_LONGER_ACCEPTS_OR :{WHITE}{STATION} ei enää ota vastaan {STRING} tai {STRING}.
+STR_303E_NO_LONGER_ACCEPTS :{WHITE}{STATION} ei ota enää vastaan {STRING}.
+STR_303F_NO_LONGER_ACCEPTS_OR :{WHITE}{STATION} ei ota enää vastaan {STRING} tai {STRING}.
STR_3040_NOW_ACCEPTS :{WHITE}{STATION} ottaa nyt vastaan {STRING}.
STR_3041_NOW_ACCEPTS_AND :{WHITE}{STATION} ottaa nyt vastaan {STRING} ja {STRING}.
STR_3042_BUS_STATION_ORIENTATION :{WHITE}Linja-autoaseman suunta
STR_3043_TRUCK_STATION_ORIENT :{WHITE}Lastauslaiturin suunta
-STR_3046_MUST_DEMOLISH_BUS_STATION :{WHITE}Linja-autoasema pitää tuhota ensin.
-STR_3047_MUST_DEMOLISH_TRUCK_STATION :{WHITE}Lastauslaituri pitää tuhota ensin.
+STR_3046_MUST_DEMOLISH_BUS_STATION :{WHITE}Linja-autoasema pitää purkaa ensin.
+STR_3047_MUST_DEMOLISH_TRUCK_STATION :{WHITE}Lastauslaituri pitää purkaa ensin.
STR_3048_STATIONS :{WHITE}{COMPANY} - {COMMA} asema{P "" a}
STR_3049_0 :{YELLOW}{STATION} {STATIONFEATURES}
STR_304A_NONE :{YELLOW}- Ei mitään -
-STR_304B_SITE_UNSUITABLE :{WHITE}...paikka sopimaton.
+STR_304B_SITE_UNSUITABLE :{WHITE}...huono paikka
STR_304C_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Liian lähellä toista satamaa.
STR_304D_MUST_DEMOLISH_DOCK_FIRST :{WHITE}Satama pitää tuhota ensin.
STR_304E_SELECT_RAILROAD_STATION :{BLACK}Valitse rautatieaseman suunta.
@@ -1769,7 +1776,7 @@
STR_3055_CHANGE_NAME_OF_STATION :{BLACK}Muuta aseman nimi.
STR_3056_SHOW_LIST_OF_ACCEPTED_CARGO :{BLACK}Näytä luettelo vastaanotettavasta rahdista.
STR_3057_STATION_NAMES_CLICK_ON :{BLACK}Asemien nimet - napsauta nimeä keskittääksesi näkymän asemaan.
-STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT :{BLACK}Valitse lentokentän koko/tyyppi.
+STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT :{BLACK}Valitse lentokentän koko ja tyyppi.
STR_305C_0 :{STATION} {STATIONFEATURES}
STR_STATION_SIGN_TINY :{TINYFONT}{STATION}
STR_305E_RAILROAD_STATION :Rautatieasema
@@ -1785,7 +1792,7 @@
STR_3069_BUOY :Poiju
STR_306A_BUOY_IN_THE_WAY :{WHITE}...poiju on tiellä.
STR_306C_STATION_TOO_SPREAD_OUT :{WHITE}...asema liian levittäytynyt.
-STR_306D_NONUNIFORM_STATIONS_DISALLOWED :{WHITE}...epäyhdenmukaiset asemat poissa käytöstä.
+STR_306D_NONUNIFORM_STATIONS_DISALLOWED :{WHITE}...epäsymmetriset asemat poissa käytöstä.
STR_USE_CTRL_TO_SELECT_MORE :{BLACK}Pidä CTRL painettuna valitaksesi enemmän kuin yhden tavaran
STR_UNDEFINED :(määrittelemätön)
@@ -1793,9 +1800,9 @@
STR_STAT_CLASS_WAYP :Rastit
##id 0x3800
-STR_3800_SHIP_DEPOT_ORIENTATION :{WHITE}Telakan suunn.
+STR_3800_SHIP_DEPOT_ORIENTATION :{WHITE}Telakan suunta
STR_3801_MUST_BE_BUILT_ON_WATER :{WHITE}...se pitää rakentaa veteen.
-STR_3802_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Telakkaa ei voi rakentaa...
+STR_3802_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Telakkaa ei voi rakentaa.
STR_3803_SELECT_SHIP_DEPOT_ORIENTATION :{BLACK}Valitse telakan suunta
STR_3804_WATER :Vettä
STR_3805_COAST_OR_RIVERBANK :Rannikko tai joenpenkka
@@ -2632,7 +2639,9 @@
STR_TRAIN_NO_POWER :{RED}Ei virtaa
STR_TRAIN_START_NO_CATENARY :Radasta puuttuu "catenary"; junaa ei voi käynnistää
+STR_NEW_VEHICLE_NOW_AVAILABLE :{BLACK}{BIGFONT}Uusi {STRING} on nyt saatavilla!
STR_NEW_VEHICLE_TYPE :{BLACK}{BIGFONT}{STRING}
+STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Uusi {STRING} on nyt saatavilla! - {STRING}
##id 0x9000
STR_9000_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Ajoneuvo tiellä.
@@ -2897,6 +2906,14 @@
STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{STRING}
STR_NEWGRF_ERROR_MSG_WARNING :{RED}Varoitus: {SILVER}{STRING}
STR_NEWGRF_ERROR_MSG_ERROR :{RED}Virhe: {SILVER}{STRING}
+STR_NEWGRF_ERROR_MSG_FATAL :{RED}Virhe: {SILVER}{STRING}
+STR_NEWGRF_ERROR_VERSION_NUMBER :{STRING} ei toimi tämän TTDPatchin version kanssa.
+STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{STRING} on TTD:n {STRING} versiota varten.
+STR_NEWGRF_ERROR_UNSET_SWITCH :{STRING} ja {STRING} on suunniteltu toimimaan yhdessä
+STR_NEWGRF_ERROR_INVALID_PARAMETER :Virheellinen parametri: {STRING}: {STRING} ({NUM})
+STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} tulee ladata ennen kuin {STRING}.
+STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} tulee ladata vasta kun {STRING} on ladattu.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF-tiedosto jonka se muuntaa
STR_NEWGRF_ADD :{BLACK}Lisää
STR_NEWGRF_ADD_TIP :{BLACK}Lisää NewGRF-tiedosto listaan
--- a/src/lang/french.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/french.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}1er véhicule dans la station d'un competiteur
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Accidents / désastres
STR_0209_COMPANY_INFORMATION :{YELLOW}Informations corporatives
+STR_NEWS_OPEN_CLOSE :{YELLOW}Ouvertures/fermetures d'industries
STR_020A_ECONOMY_CHANGES :{YELLOW}Changements économiques
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Conseils / information sur les véhicules du joueur
STR_020C_NEW_VEHICLES :{YELLOW}Nouveaux véhicules
@@ -727,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Placer un Phare
STR_028E_PLACE_TRANSMITTER :{BLACK}Placer un Transmetteur
STR_028F_DEFINE_DESERT_AREA :{BLACK}Définir une zone désertique.{}Garder Ctrl enfoncé pour retrait
-STR_CREATE_LAKE :{BLACK}Définir une zone d'eau.{}Inondera ses abords si au niveau de la mer
+STR_CREATE_LAKE :{BLACK}Définir une zone d'eau.{}Construit un canal, si Ctrl est enfoncé au niveau de la mer, le voisinage sera innondé.
STR_0290_DELETE :{BLACK}Supprimer
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Supprimer complètement cette ville
STR_0292_SAVE_SCENARIO :Sauvegarder scénario
@@ -1090,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Propre compagnie
STR_CONFIG_PATCHES_LIVERIES_ALL :Toutes les compagnies
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Préférer le chat d'équipe avec <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Fonction de la molette: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom de la carte
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Défilement de la carte
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Désactivé
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Vitesse de défilement avec molette: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Nombre de trains max. par joueur: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Nombre de véhicules routiers max. par joueur: {ORANGE}{STRING}
@@ -1208,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Planter des arbres de types choisis au hasard
STR_CANT_BUILD_CANALS :{WHITE}Impossible de construire un canal ici...
-STR_BUILD_CANALS_TIP :{BLACK}Construire des canaux. Appuyer sur Ctrl pour placer de l'eau non canalisée (seulement au niveau de la mer).
+STR_BUILD_CANALS_TIP :{BLACK}Construire des canaux.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Impossible de construire un écluse ici...
@@ -1282,14 +1288,14 @@
STR_NETWORK_PLAYER_NAME :{BLACK}Nom du joueur:
STR_NETWORK_ENTER_NAME_TIP :{BLACK}Ceci est le nom avec lequel les autres joueurs pourront vous identifier
STR_NETWORK_CONNECTION :{BLACK}Connexion :
-STR_NETWORK_CONNECTION_TIP :{BLACK}Choisir entre un jeu Internet ou sur réseau local
+STR_NETWORK_CONNECTION_TIP :{BLACK}Choisir entre un jeu sur Internet ou sur réseau local
STR_NETWORK_START_SERVER :{BLACK}Démarrer le serveur
STR_NETWORK_START_SERVER_TIP :{BLACK}Démarre son propre serveur
STR_NETWORK_GAME_NAME :{BLACK}Nom
STR_NETWORK_GAME_NAME_TIP :{BLACK}Nom de la partie
-STR_NETWORK_INFO_ICONS_TIP :{BLACK}Langage, version du serveur, etc.
+STR_NETWORK_INFO_ICONS_TIP :{BLACK}Langue, version du serveur, etc.
STR_NETWORK_CLICK_GAME_TO_SELECT :{BLACK}Cliquer sur une partie de la liste pour la sélectionner
STR_NETWORK_FIND_SERVER :{BLACK}Trouver un serveur
@@ -1336,7 +1342,7 @@
STR_NETWORK_LAN_INTERNET :LAN / Internet
STR_NETWORK_INTERNET_ADVERTISE :Internet (publier)
STR_NETWORK_COMBO2 :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
-STR_NETWORK_0_PLAYERS :0 joueur
+STR_NETWORK_0_PLAYERS :0 joueurs
STR_NETWORK_1_PLAYERS :1 joueur
STR_NETWORK_2_PLAYERS :2 joueurs
STR_NETWORK_3_PLAYERS :3 joueurs
@@ -1407,8 +1413,8 @@
STR_NETWORK_CONNECTING_SPECIAL_1 :{BLACK}Rapatriement des infos sur le jeu..
STR_NETWORK_CONNECTING_SPECIAL_2 :{BLACK}Rapatriement des infos sur la compagnie..
############ End of leave-in-this-order
-STR_NETWORK_CONNECTING_WAITING :{BLACK}{NUM} client{P "" s} avant nous
-STR_NETWORK_CONNECTING_DOWNLOADING :{BLACK}{NUM} / {NUM} ko déjà téléchargés
+STR_NETWORK_CONNECTING_WAITING :{BLACK}{NUM} client{P "" s} avant vous
+STR_NETWORK_CONNECTING_DOWNLOADING :{BLACK}{NUM} / {NUM} ko téléchargés
STR_NETWORK_DISCONNECT :{BLACK}Déconnecter
@@ -1420,7 +1426,7 @@
STR_NETWORK_ERR_NOTAVAILABLE :{WHITE} Aucun périphérique réseau trouvé ou programme compilé sans ENABLE_NETWORK
STR_NETWORK_ERR_NOSERVER :{WHITE} Aucune partie réseau n'a été trouvée
STR_NETWORK_ERR_NOCONNECTION :{WHITE} Le serveur n'a pas répondu à la requête
-STR_NETWORK_ERR_NEWGRF_MISMATCH :{WHITE} Echec de la connexion à cause de NewGRF différents
+STR_NETWORK_ERR_NEWGRF_MISMATCH :{WHITE} Echec de la connexion : NewGRF requis
STR_NETWORK_ERR_DESYNC :{WHITE} La synchronisation de la partie réseau a échouée.
STR_NETWORK_ERR_LOSTCONNECTION :{WHITE} La connection de la partie réseau a été perdue.
STR_NETWORK_ERR_SAVEGAMEERROR :{WHITE} La sauvegarde serveur n'a pas pu être chargée.
@@ -1430,7 +1436,7 @@
STR_NETWORK_ERR_SERVER_ERROR :{WHITE} Il y a eu une erreur de protocole et la connection est donc fermée.
STR_NETWORK_ERR_WRONG_REVISION :{WHITE} La révision de ce client ne correspond pas à celle du serveur.
STR_NETWORK_ERR_WRONG_PASSWORD :{WHITE} Mot de passe incorrect.
-STR_NETWORK_ERR_SERVER_FULL :{WHITE} Le serveur est plein
+STR_NETWORK_ERR_SERVER_FULL :{WHITE} Le serveur est complet
STR_NETWORK_ERR_SERVER_BANNED :{WHITE} Vous êtes bannis de ce serveur
STR_NETWORK_ERR_KICKED :{WHITE} Vous avez été exclu de la partie
STR_NETWORK_ERR_CHEATER :{WHITE} Tricher n'est pas autorisé sur ce serveur
@@ -1442,7 +1448,7 @@
STR_NETWORK_ERR_CLIENT_SAVEGAME :chargement de la carte impossible
STR_NETWORK_ERR_CLIENT_CONNECTION_LOST :connection perdue
STR_NETWORK_ERR_CLIENT_PROTOCOL_ERROR :erreur de protocole
-STR_NETWORK_ERR_CLIENT_NEWGRF_MISMATCH :NewGRF différents
+STR_NETWORK_ERR_CLIENT_NEWGRF_MISMATCH :NewGRF requis
STR_NETWORK_ERR_CLIENT_NOT_AUTHORIZED :non autorisé
STR_NETWORK_ERR_CLIENT_NOT_EXPECTED :paquet étrange reçu
STR_NETWORK_ERR_CLIENT_WRONG_REVISION :révision incorrecte
@@ -1718,7 +1724,7 @@
STR_3003_NUMBER_OF_TRACKS :{BLACK}Nombre de voies
STR_3004_PLATFORM_LENGTH :{BLACK}Longueur du quai
STR_3005_TOO_CLOSE_TO_ANOTHER_RAILROAD :{WHITE}Trop près d'une autre gare
-STR_3006_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Ajouter une ou plusieurs gares
+STR_3006_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjacent à plus d'une gare à la fois
STR_3007_TOO_MANY_STATIONS_LOADING :{WHITE}Trop de gares dans cette ville
STR_3008_TOO_MANY_STATIONS_LOADING :{WHITE}Trop de gares
STR_3008A_TOO_MANY_BUS_STOPS :{WHITE}Trop d'arrêts d'autobus
--- a/src/lang/galician.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/galician.txt Mon Mar 26 22:15:38 2007 +0000
@@ -706,7 +706,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Colocar faro
STR_028E_PLACE_TRANSMITTER :{BLACK}Colocar transmisor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definir área de deserto
-STR_CREATE_LAKE :{BLACK}Definir área de auga.{}Inundará os arredores se está a nivel do mar
STR_0290_DELETE :{BLACK}Borrar
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Borrar completamente esta cidade
STR_0292_SAVE_SCENARIO :Grabar Escenario
@@ -1159,7 +1158,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Colocar árbores dun tipo aleatorio
STR_CANT_BUILD_CANALS :{WHITE}Non se pode construÃ-los canais aÃ...
-STR_BUILD_CANALS_TIP :{BLACK}ConstruÃr canais
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Non se pode construÃ-lo peche aÃ...
--- a/src/lang/german.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/german.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Ankunft des ersten Fahrzeugs in einer Station eines Gegners
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Unfälle / Katastrophen
STR_0209_COMPANY_INFORMATION :{YELLOW}Firmendaten
+STR_NEWS_OPEN_CLOSE :{YELLOW}Öffnen und Schließen von Industrien
STR_020A_ECONOMY_CHANGES :{YELLOW}Änderungen der Wirtschaftslage
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Rat / Informationen zu Fahrzeugen des Spielers
STR_020C_NEW_VEHICLES :{YELLOW}Neue Fahrzeuge
@@ -727,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Leuchtturm errichten
STR_028E_PLACE_TRANSMITTER :{BLACK}Sender errichten
STR_028F_DEFINE_DESERT_AREA :{BLACK}Lege Wüstengebiet an.{}STRG drücken zum entfernen
-STR_CREATE_LAKE :{BLACK}Gebiet fluten.{}Auf Meereshöhe entsteht ein Gewässer
+STR_CREATE_LAKE :{BLACK}Wasser erzeugen.{}Baut einen Kanal. Bei gedrückter Strg.-Taste wird ein Wasserfeld erzeugt, das umliegendes Land flutet.
STR_0290_DELETE :{BLACK}Löschen
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Diese Stadt vollständig löschen
STR_0292_SAVE_SCENARIO :Szenario speichern
@@ -1090,6 +1091,9 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Eigene Firma
STR_CONFIG_PATCHES_LIVERIES_ALL :Alle Firmen
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Bevorzuge Teamchat mit <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Karte vergrößern
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Kartenansicht verschieben
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Aus
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maximale Anzahl der Züge pro Spieler: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maximale Anzahl der Straßenfahrzeuge pro Spieler: {ORANGE}{STRING}
@@ -1208,7 +1212,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Zufällige Baumart pflanzen
STR_CANT_BUILD_CANALS :{WHITE}Kann hier keinen Kanal bauen...
-STR_BUILD_CANALS_TIP :{BLACK}Kanal bauen
+STR_BUILD_CANALS_TIP :{BLACK}Kanalbau.
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kann hier keine Schleuse bauen...
--- a/src/lang/hungarian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/hungarian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -657,6 +657,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Első jármű megérkezése az ellenfél megállójába
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Balesetek / természeti csapások
STR_0209_COMPANY_INFORMATION :{YELLOW}Céginformációk
+STR_NEWS_OPEN_CLOSE :{YELLOW}Ipari létesÃtmények létrejötte / bezárása
STR_020A_ECONOMY_CHANGES :{YELLOW}Gazdasági változások
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Tanácsok / információk a játékos járműveiről
STR_020C_NEW_VEHICLES :{YELLOW}Új járművek
@@ -792,7 +793,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}VilágÃtótorony épÃtése
STR_028E_PLACE_TRANSMITTER :{BLACK}Rádióadó épÃtése
STR_028F_DEFINE_DESERT_AREA :{BLACK}Sivatagot hoz létre.{}Nyomj CTRL-t az eltávolÃtásához
-STR_CREATE_LAKE :{BLACK}Vizet hoz létre.{}A tengerszinten lévő elemeket elárasztja
+STR_CREATE_LAKE :{BLACK}Vizi terület definiálása.{}Csatornát készÃt, kivéve ha tengerszinten CTRL-t lenyomva hÃvod meg, ekkor elárasztja a területet
STR_0290_DELETE :{BLACK}Töröl
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}A város teljes eltüntetése
STR_0292_SAVE_SCENARIO :Pálya mentése
@@ -1155,6 +1156,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Csak a sajátét
STR_CONFIG_PATCHES_LIVERIES_ALL :Minden cégét
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Alapesetben csapatban beszélsz <ENTER>-re: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Scrollgomb funkció: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Térkép nagyÃtás
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Térkép mozgatás
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Ki
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Scrollgomb sebessége a térképen: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maximum vonat játékosonként: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maximum közúti jármű játékosonként: {ORANGE}{STRING}
@@ -1273,7 +1279,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Véletlenszerűen kiválasztott fákat helyez el
STR_CANT_BUILD_CANALS :{WHITE}Nem lehet csatornát épÃteni ide...
-STR_BUILD_CANALS_TIP :{BLACK}Csatorna épÃtése. Nyomj CTRL-t hogy tengert csinálj (tengerszinten csak).
+STR_BUILD_CANALS_TIP :{BLACK}Csatorna épÃtése (vagy rosszabb esetben terület elárasztása!)
STR_LANDINFO_CANAL :Csatorna
STR_CANT_BUILD_LOCKS :{WHITE}Nem lehet zsilipet épÃteni ide...
@@ -3011,6 +3017,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :az adott GRF fájl célja egy másik lefordÃtása
STR_NEWGRF_ADD :{BLACK}Hozzáad
STR_NEWGRF_ADD_TIP :{BLACK}A NewGRF-et hozzáadja a listához
--- a/src/lang/icelandic.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/icelandic.txt Mon Mar 26 22:15:38 2007 +0000
@@ -726,7 +726,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Setja vita
STR_028E_PLACE_TRANSMITTER :{BLACK}Setja sendi
STR_028F_DEFINE_DESERT_AREA :{BLACK}Afmarkaðu eyðimörk.{}Smelltu og haltu CTRL til að fjarlægja hana
-STR_CREATE_LAKE :{BLACK}Afmarkaðu vantssvæði.{}Það mun flæða yfir aðlægt svæði ef það er við sjávarmál
STR_0290_DELETE :{BLACK}Eyða
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Eyða þessum bæ algjörlega
STR_0292_SAVE_SCENARIO :Vista kort
@@ -1207,7 +1206,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Gróðursetja tré af handahófskenndri gerð
STR_CANT_BUILD_CANALS :{WHITE}Ekki hægt að grafa skipaskurð hér...
-STR_BUILD_CANALS_TIP :{BLACK}Grafa skipaskurð
STR_LANDINFO_CANAL :Skipaskurður
STR_CANT_BUILD_LOCKS :{WHITE}Ekki hægt að gera skurðgátt hér
--- a/src/lang/italian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/italian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -1,7 +1,8 @@
##name Italian
-##ownname Italian (IT)
-##isocode it_IT
+##ownname Italiano
+##isocode it
##plural 0
+##gender m f
##id 0x0000
STR_NULL :
@@ -33,55 +34,55 @@
STR_001A_COPPER_ORE :Minerali di Rame
STR_001B_MAIZE :Mais
STR_001C_FRUIT :Frutta
-STR_001D_DIAMONDS :Diamanti
-STR_001E_FOOD :Cibo
-STR_001F_PAPER :Carta
-STR_0020_GOLD :Oro
-STR_0021_WATER :Acqua
-STR_0022_WHEAT :Frumento
-STR_0023_RUBBER :Gomma
-STR_0024_SUGAR :Zucchero
-STR_0025_TOYS :Giocattoli
-STR_0026_CANDY :Caramelle
-STR_0027_COLA :Cola
-STR_0028_COTTON_CANDY :Cotone Candito
-STR_0029_BUBBLES :Bolle
-STR_002A_TOFFEE :Toffee
-STR_002B_BATTERIES :Batterie
-STR_002C_PLASTIC :Plastica
-STR_002D_FIZZY_DRINKS :Bibite Frizzanti
+STR_001D_DIAMONDS :{G=m}Diamanti
+STR_001E_FOOD :{G=m}Cibo
+STR_001F_PAPER :{G=f}Carta
+STR_0020_GOLD :{G=m}Oro
+STR_0021_WATER :{G=f}Acqua
+STR_0022_WHEAT :{G=m}Frumento
+STR_0023_RUBBER :{G=f}Gomma
+STR_0024_SUGAR :{G=m}Zucchero
+STR_0025_TOYS :{G=m}Giocattoli
+STR_0026_CANDY :{G=f}Caramelle
+STR_0027_COLA :{G=f}Cola
+STR_0028_COTTON_CANDY :{G=m}Cotone Candito
+STR_0029_BUBBLES :{G=f}Bolle
+STR_002A_TOFFEE :{G=m}Toffee
+STR_002B_BATTERIES :{G=f}Batterie
+STR_002C_PLASTIC :{G=f}Plastica
+STR_002D_FIZZY_DRINKS :{G=f}Bibite Frizzanti
STR_002E :
-STR_002F_PASSENGER :Passeggero
-STR_0030_COAL :Carbone
-STR_0031_MAIL :Posta
-STR_0032_OIL :Petrolio
-STR_0033_LIVESTOCK :Bestiame
-STR_0034_GOODS :Beni
-STR_0035_GRAIN :Grano
-STR_0036_WOOD :Legname
-STR_0037_IRON_ORE :Minerale Ferroso
-STR_0038_STEEL :Acciaio
-STR_0039_VALUABLES :Valori
-STR_003A_COPPER_ORE :Minerale di Rame
-STR_003B_MAIZE :Mais
-STR_003C_FRUIT :Frutta
-STR_003D_DIAMOND :Diamante
-STR_003E_FOOD :Cibo
-STR_003F_PAPER :Carta
-STR_0040_GOLD :Oro
-STR_0041_WATER :Acqua
-STR_0042_WHEAT :Frumento
-STR_0043_RUBBER :Gomma
-STR_0044_SUGAR :Zucchero
-STR_0045_TOY :Giocattolo
-STR_0046_CANDY :Caramella
-STR_0047_COLA :Cola
-STR_0048_COTTON_CANDY :Cotone Candito
-STR_0049_BUBBLE :Bolla
-STR_004A_TOFFEE :Toffee
-STR_004B_BATTERY :Batteria
-STR_004C_PLASTIC :Plastica
-STR_004D_FIZZY_DRINK :Bevanda Frizzante
+STR_002F_PASSENGER :{G=m}Passeggero
+STR_0030_COAL :{G=m}Carbone
+STR_0031_MAIL :{G=f}Posta
+STR_0032_OIL :{G=m}Petrolio
+STR_0033_LIVESTOCK :{G=m}Bestiame
+STR_0034_GOODS :{G=m}Beni
+STR_0035_GRAIN :{G=m}Grano
+STR_0036_WOOD :{G=m}Legname
+STR_0037_IRON_ORE :{G=m}Minerale Ferroso
+STR_0038_STEEL :{G=m}Acciaio
+STR_0039_VALUABLES :{G=m}Valori
+STR_003A_COPPER_ORE :{G=m}Minerale di Rame
+STR_003B_MAIZE :{G=m}Mais
+STR_003C_FRUIT :{G=f}Frutta
+STR_003D_DIAMOND :{G=m}Diamante
+STR_003E_FOOD :{G=m}Cibo
+STR_003F_PAPER :{G=f}Carta
+STR_0040_GOLD :{G=m}Oro
+STR_0041_WATER :{G=f}Acqua
+STR_0042_WHEAT :{G=m}Frumento
+STR_0043_RUBBER :{G=f}Gomma
+STR_0044_SUGAR :{G=m}Zucchero
+STR_0045_TOY :{G=m}Giocattolo
+STR_0046_CANDY :{G=f}Caramella
+STR_0047_COLA :{G=f}Cola
+STR_0048_COTTON_CANDY :{G=m}Cotone Candito
+STR_0049_BUBBLE :{G=f}Bolla
+STR_004A_TOFFEE :{G=m}Toffee
+STR_004B_BATTERY :{G=f}Batteria
+STR_004C_PLASTIC :{G=f}Plastica
+STR_004D_FIZZY_DRINK :{G=f}Bevanda Frizzante
STR_QUANTITY_NOTHING :
STR_QUANTITY_PASSENGERS :{COMMA} passegger{P o i}
STR_QUANTITY_COAL :{WEIGHT} di carbone
@@ -591,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Arrivo del primo veicolo alle stazioni della concorrenza
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Incidenti / disastri
STR_0209_COMPANY_INFORMATION :{YELLOW}Informazioni sulla societÃ
+STR_NEWS_OPEN_CLOSE :{YELLOW}Apertura / chiusura delle industrie
STR_020A_ECONOMY_CHANGES :{YELLOW}Cambiamenti economici
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Avvisi / informazioni sui veicoli del giocatore
STR_020C_NEW_VEHICLES :{YELLOW}Nuovi veicoli
@@ -726,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Piazza faro
STR_028E_PLACE_TRANSMITTER :{BLACK}Piazza trasmettitore
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definisce area desertica.{}Clicca premendo CTRL per rimuoverla
-STR_CREATE_LAKE :{BLACK}Definisce area d'acqua.{}Si espande se definita a livello del mare
+STR_CREATE_LAKE :{BLACK}Definisci la zona d'acqua.{}Crei un canale, a meno che CTRL non venga premuto a livello del mare, allagando così i dintorni
STR_0290_DELETE :{BLACK}Elimina
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Elimina completamente questa cittÃ
STR_0292_SAVE_SCENARIO :Salva scenario
@@ -1089,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Propria societÃ
STR_CONFIG_PATCHES_LIVERIES_ALL :Tutte le societÃ
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Preferisce team chat con <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funzione della rotellina: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom mappa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scrolla mappa
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Off
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Velocità rotellina mappa: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max treni per giocatore: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max veicoli stradali per giocatore: {ORANGE}{STRING}
@@ -1207,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Pianta alberi di tipo casuale
STR_CANT_BUILD_CANALS :{WHITE}Non puoi costruire qui un canale...
-STR_BUILD_CANALS_TIP :{BLACK}Costruisci canali
+STR_BUILD_CANALS_TIP :{BLACK}Costruisci canali.
STR_LANDINFO_CANAL :Canale
STR_CANT_BUILD_LOCKS :{WHITE}Non puoi costruire qui una chiusa...
@@ -2782,7 +2789,7 @@
STR_CLONE_AIRCRAFT_INFO :{BLACK}Costruisce una copia dell'aereo. Premere contemporaneamente Control per condividere gli ordini
STR_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Costruisce una copia di un aereo. Cliccare su questo pulsante e poi sull'aereo (dentro o fuori dal deposito) da copiare. Premere contemporaneamente Control per condividere gli ordini
STR_A005_NEW_AIRCRAFT :{WHITE}Nuovo Aereo
-STR_A006_BUILD_AIRCRAFT :{BLACK}Construisci Aereo
+STR_A006_BUILD_AIRCRAFT :{BLACK}Costruisci Aereo
STR_A008_CAN_T_BUILD_AIRCRAFT :{WHITE}Non puoi costruire l'aereo
STR_A009_AIRCRAFT :{WHITE}{COMPANY} - {COMMA} Aereo
STR_A00A :{WHITE}{VEHICLE}
@@ -2908,6 +2915,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :il file GRF se questo era progettato per essere tradotto
STR_NEWGRF_ADD :{BLACK}Aggiungi
STR_NEWGRF_ADD_TIP :{BLACK}Aggiungi un file NewGRF alla lista
@@ -2999,8 +3007,8 @@
STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Premi per fermare il rimpiazzo delle locomotive del tipo selezionato a sinistra
STR_REPLACE_HELP_START_BUTTON :{BLACK}Premi per iniziare il rimpiazzo delle locomotive del tipo selezionato a sinistra con quello selezionato a destra
STR_REPLACE_HELP_RAILTYPE :{BLACK}Seleziona il tipo di binario per la quale vuoi rimpiazzare le locomotive
-STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Mostra con quale locomotiva verrà rimpiazzato il tipo selezionato a sinistra, se qualcuna
-STR_REPLACE_HELP :{BLACK}Permette di rimpiazzare un locomotere con uno di un'altro tipo, quando il treno entra in un deposito
+STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Mostra con quale locomotore verrà rimpiazzato il tipo selezionato a sinistra, se disponibile
+STR_REPLACE_HELP :{BLACK}Permette di rimpiazzare un locomotore con uno di un altro tipo, quando i treni con quel locomotore entrano in un deposito
STR_REPLACE_REMOVE_WAGON :{BLACK}Rimozione vagoni: {ORANGE}{SKIP}{STRING}
STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}La autosostituzione mantiene la lunghezza del treno togliendo vagoni (iniziando dalla testa), se la sostituzione della locomotiva lo farebbe piu lungo.
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Sostituzione: {ORANGE}{SKIP}{SKIP}{STRING}
@@ -3080,7 +3088,7 @@
STR_SNOW_LINE_QUERY_CAPT :{WHITE}Cambia l'altezza delle nevi perenni
STR_START_DATE_QUERY_CAPT :{WHITE}Cambia l'anno di partenza
STR_HEIGHTMAP_SCALE_WARNING_CAPTION :{WHITE}Avviso scala
-STR_HEIGHTMAP_SCALE_WARNING_MESSAGE :{YELLOW}Ridimenzionare di molto la mappa sorgente non è consigliabile. Continuo con la generazione?
+STR_HEIGHTMAP_SCALE_WARNING_MESSAGE :{YELLOW}Ridimensionare di molto la mappa sorgente non è consigliabile. Continuo con la generazione?
STR_SNOW_LINE_HEIGHT_NUM :{NUM}
STR_HEIGHTMAP_NAME :{BLACK}Nome Heightmap:
STR_HEIGHTMAP_SIZE :{BLACK}Dim.: {ORANGE}{NUM} x {NUM}
@@ -3093,7 +3101,7 @@
STR_WORLD_GENERATION :{BLACK}Generazione mondo
STR_TREE_GENERATION :{BLACK}Generazione alberi
STR_UNMOVABLE_GENERATION :{BLACK}Generazione oggetti non spostabili
-STR_CLEARING_TILES :{BLACK}generazione aree brulle e rocciose
+STR_CLEARING_TILES :{BLACK}Generazione aree brulle e rocciose
STR_SETTINGUP_GAME :{BLACK}Settaggio del gioco
STR_PREPARING_TILELOOP :{BLACK}Loop generazione tile del terreno
STR_PREPARING_GAME :{BLACK}Preparazione del gioco
@@ -3120,7 +3128,7 @@
STR_INTERCONTINENTAL_AIRPORT :{BLACK}Intercontinentale
STR_HELIPORT :{BLACK}Eliporto
STR_HELIDEPOT :{BLACK}Elideposito
-STR_HELISTATION :{BLACK}Elistatione
+STR_HELISTATION :{BLACK}Elistazione
STR_SMALL_AIRPORTS :{BLACK}Aeroporti piccoli
STR_LARGE_AIRPORTS :{BLACK}Aeroporti grandi
--- a/src/lang/japanese.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/japanese.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}競争者ã®é§…ã¸è»Šä¸¡ã®åˆã‚ã¦ã®åˆ°ç€
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}事故ï¼ç½å®³
STR_0209_COMPANY_INFORMATION :{YELLOW}ä¼šç¤¾æƒ…å ±
+STR_NEWS_OPEN_CLOSE :{YELLOW}産æ¥ã®é–‹æ¥ï¼é–‰æ¥
STR_020A_ECONOMY_CHANGES :{YELLOW}経済ã®å¤‰åŒ–
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}プレヤーã®è»Šä¸¡ã«ã¤ã„ã¦ã®æƒ…å ±
STR_020C_NEW_VEHICLES :{YELLOW}車両ã®æ–°ç™»å ´
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}ç¯å°ã‚’建è¨ã—ã¾ã™
STR_028E_PLACE_TRANSMITTER :{BLACK}é€ä¿¡æ©Ÿã‚’建è¨ã—ã¾ã™
STR_028F_DEFINE_DESERT_AREA :{BLACK}ç ‚æ¼ ã‚’ä½œæˆã—ã¾ã™ã€‚{}Control+クリックã™ã‚‹ã¨æ¶ˆåŽ»ã—ã¾ã™
-STR_CREATE_LAKE :{BLACK}湖を作æˆã—ã¾ã™ã€‚{}æµ·æ°´ä½ã®å ´åˆã¯å‘¨è¾ºåœ°åŸŸã‚’水浸ã—ã¾ã™
+STR_CREATE_LAKE :{BLACK}。水を作æˆã—ã¾ã™ã€‚{}通常ã®ä½¿ç”¨æ™‚ã«é‹æ²³ã‚’建è¨ã—ã¾ã™ã€‚Controlをクリックã™ã‚‹ã¨ã€æµ·æ°´ä½ã«ã‚る地域ãŒæµ¸æ°´ã§ãã¾ã™ã€‚
STR_0290_DELETE :{BLACK}ç ´å£Š
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}ã“ã®ç”ºã‚’完全ã«ç ´å£Šã—ã¾ã™
STR_0292_SAVE_SCENARIO :シナリオをä¿å˜
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :プレヤーã®ä¼šç¤¾
STR_CONFIG_PATCHES_LIVERIES_ALL :ã™ã¹ã¦ã®ä¼šç¤¾
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}<ENTER>ã§ã®ãƒãƒ¼ãƒ ãƒãƒ£ãƒƒãƒˆã‚’優先:{ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}マウススクãƒãƒ¼ãƒ«ã®å‹•ä½œï¼š{ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :地図をズーãƒ
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :地図をスクãƒãƒ¼ãƒ«
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :切
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}地図ã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«é€Ÿåº¦ï¼š{ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}一人ã®ãƒ—レヤーã®åˆ—車数上é™ï¼š{ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}一人ã®ãƒ—レヤーã®é“路車両数上é™ï¼š{ORANGE}{STRING}
@@ -1207,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}ランドムãªæœ¨ã‚’æ¤æž—ã—ã¾ã™
STR_CANT_BUILD_CANALS :{WHITE}ã“ã“ã«é‹æ²³ãŒå»ºè¨ã§ãã¾ã›ã‚“...
-STR_BUILD_CANALS_TIP :{BLACK}é‹æ²³ã‚’建è¨ã—ã¾ã™ã€‚Control+クリックã™ã‚‹ã¨æµ·ã®ã‚¿ã‚¤ãƒ«ã‚‚建è¨ã§ãã¾ã™ï¼ˆæµ·æ°´ä½ã«ã®ã¿ï¼‰
+STR_BUILD_CANALS_TIP :{BLACK}é‹æ²³ã‚’建è¨ã—ã¾ã™
STR_LANDINFO_CANAL :é‹æ²³
STR_CANT_BUILD_LOCKS :{WHITE}ã“ã“ã«æ°´é–€ãŒå»ºè¨ã§ãã¾ã›ã‚“...
@@ -2906,6 +2912,8 @@
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_ERROR_LOAD_AFTER :{STRING}ã¯{STRING}ã®èªã¿è¾¼ã¿å¾Œã®ã¿ã«èªã¿è¾¼ã‚ã¾ã™ã€‚
STR_NEWGRF_ADD :{BLACK}追åŠ
STR_NEWGRF_ADD_TIP :{BLACK}NewGRFファイルをリストã«è¿½åŠ ã—ã¾ã™
@@ -3135,6 +3143,7 @@
############ Date formatting
STR_DATE_TINY :{2:NUM}-{1:STRING}-{0:STRING}
STR_DATE_SHORT :{1:NUM}å¹´{0:STRING}
+STR_DATE_LONG :{2:NUM}å¹´{1:STRING}{0:STRING}
########
--- a/src/lang/korean.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/korean.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}ê²½ìŸì‚¬ì˜ 첫 차량 ë„ì°©
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}ì‚¬ê³ / 재앙
STR_0209_COMPANY_INFORMATION :{YELLOW}회사 ì •ë³´
+STR_NEWS_OPEN_CLOSE :{YELLOW}ì‚°ì—… ë„우기 / ë„기
STR_020A_ECONOMY_CHANGES :{YELLOW}ê²½ì œì 변화
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}ì¡°ì–¸ / ë‹¹ì‹ ì°¨ëŸ‰ì— ëŒ€í•œ ì •ë³´
STR_020C_NEW_VEHICLES :{YELLOW}새로운 차량
@@ -727,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}등대를 놓습니다.
STR_028E_PLACE_TRANSMITTER :{BLACK}ì†¡ì‹ ê¸°ë¥¼ 놓습니다.
STR_028F_DEFINE_DESERT_AREA :{BLACK}사막 지ì—ì„ ì§€ì •í•©ë‹ˆë‹¤.{}CTRL키를 누른채로 지우ì‹ì‹œì˜¤.
-STR_CREATE_LAKE :{BLACK}ë¬¼ì„ ì§€ì •í•©ë‹ˆë‹¤.{}í•´ìˆ˜ë©´ì— ë‘˜ëŸ¬ì‹¸ì´ë©´ 물로 채워질 것입니다.
+STR_CREATE_LAKE :{BLACK}수면 지ì—ì„ ì •ì˜í•˜ì„¸ìš”.{}바다 높ì´ì—ì„œ CTRLì´ ëˆŒë ¤ 있지 않으면, 운하를 만들때 ì¹¨ìˆ˜í• ê²ƒìž…ë‹ˆë‹¤.
STR_0290_DELETE :{BLACK}ì‚ì œ
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}ì´ ë„시를 ì™„ì „ížˆ ì‚ì œ
STR_0292_SAVE_SCENARIO :시나리오 ì €ìž¥
@@ -1090,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :내 회사
STR_CONFIG_PATCHES_LIVERIES_ALL :ëª¨ë“ íšŒì‚¬
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}<ENTER>키로 우리 팀ì›ë¼ë¦¬ 채팅 : {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}스í¬ë¡¤ì˜ ì—í• : {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :맵 줌
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :맵 스í¬ë¡¤
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :ë„기
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}맵 스í¬ë¡¤ ì†ë„: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}최대 열차 수: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}최대 ìžë™ì°¨ 수: {ORANGE}{STRING}
@@ -1208,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}ëª¨ë“ ì¢…ë¥˜ì˜ ë‚˜ë¬´ë¥¼ 무작위로 심습니다.
STR_CANT_BUILD_CANALS :{WHITE}ì—¬ê¸°ì— ìš´í•˜ë¥¼ ê±´ì„¤í• ìˆ˜ 없습니다...
-STR_BUILD_CANALS_TIP :{BLACK}운하를 건설합니다. CTRL키를 눌러 바다 타ì¼ì„ 건설하ì‹ì‹œì˜¤ (해수면 높ì´ì—서만)
+STR_BUILD_CANALS_TIP :{BLACK}운하 만들기
STR_LANDINFO_CANAL :운하
STR_CANT_BUILD_LOCKS :{WHITE}ì—¬ê¸°ì— ê°‘ë¬¸ì„ ì§€ì„ ìˆ˜ 없습니다...
@@ -2903,10 +2909,13 @@
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}ì€ OpenTTDì—ì„œ ë³´ê³ ëœ TTD패치 ë²„ì „ì—ì„œ ìž‘ë™í•˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤.
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_ERROR_AFTER_TRANSLATED_FILE :GRF íŒŒì¼ ìžì²´ëŠ” 번ì—용으로 ë””ìžì¸ë¨
STR_NEWGRF_ADD :{BLACK}추가
STR_NEWGRF_ADD_TIP :{BLACK}NewGRF 파ì¼ì„ 목ë¡ì— 추가
@@ -3134,6 +3143,10 @@
STR_MEASURE_AREA_HEIGHTDIFF :{BLACK}ë„“ì´: {NUM} x {NUM}{}ê³ ë„ì°¨: {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}환승 단위: {LTBLUE}{CURRENCY}
--- a/src/lang/lithuanian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/lithuanian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -759,7 +759,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Statyti švyturį
STR_028E_PLACE_TRANSMITTER :{BLACK}Statyti siųstuvą
STR_028F_DEFINE_DESERT_AREA :{BLACK}Nurodyti dykumos plotus{}Laikant nuspaustą VALD (CTRL) galima ją pašalinti
-STR_CREATE_LAKE :{BLACK}Pazymeti kaip vandeni, aplinkines zemes bus uztvindytos, jei bus juros lygyje
STR_0290_DELETE :{BLACK}Å alinti
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Šalinti šį miestą
STR_0292_SAVE_SCENARIO :Išsaugoti scenarijų
@@ -1239,7 +1238,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Sodina atsitiktinės rūšies medžius
STR_CANT_BUILD_CANALS :{WHITE}Neimanoma cia iskasti kanalu...
-STR_BUILD_CANALS_TIP :{BLACK}Kasti kanalus
STR_LANDINFO_CANAL :Kanalas
STR_CANT_BUILD_LOCKS :{WHITE}Neimanoma cia irengti sliuzu...
--- a/src/lang/norwegian_bokmal.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/norwegian_bokmal.txt Mon Mar 26 22:15:38 2007 +0000
@@ -725,7 +725,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plasser fyrtårn
STR_028E_PLACE_TRANSMITTER :{BLACK}Plasser radiosender
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Trykk og hold inne CTRL for å fjerne den
-STR_CREATE_LAKE :{BLACK}Definer vannområde.{}Det vil oversvømme området rundt hvis det er på sjønivå
STR_0290_DELETE :{BLACK}Slett
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Slett denne byen fullstendig
STR_0292_SAVE_SCENARIO :Lagre scenario
@@ -1206,7 +1205,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Plasser trær av tilfeldig type
STR_CANT_BUILD_CANALS :{WHITE}Kan ikke bygge kanaler her...
-STR_BUILD_CANALS_TIP :{BLACK}Bygg kanaler. Trykk CTRL for å plassere sjøområder (kun på havnivå).
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kan ikke bygge sluser her...
--- a/src/lang/norwegian_nynorsk.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/norwegian_nynorsk.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Første køyretøy kjem fram på stasjonen til motstandaren
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Ulykker/katastrofar
STR_0209_COMPANY_INFORMATION :{YELLOW}Firma informasjon
+STR_NEWS_OPEN_CLOSE :{YELLOW}Opning / stenging av industriar
STR_020A_ECONOMY_CHANGES :{YELLOW}Økonomiske endringar
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Råd/informasjon om køyretøya til spelaren
STR_020C_NEW_VEHICLES :{YELLOW}Nye køyretøy
@@ -727,7 +728,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plasser fyrtårn
STR_028E_PLACE_TRANSMITTER :{BLACK}Plasser radiosendar
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Trykk og held inne CTRL for å fjerne det
-STR_CREATE_LAKE :{BLACK}Definer vassområde.{}Det vil fløyme landa rundt dersom det er på høgd med sjøen.
STR_0290_DELETE :{BLACK}Slett
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Slett byen heilt
STR_0292_SAVE_SCENARIO :Lagre scenario
@@ -1090,6 +1090,9 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Eige firma
STR_CONFIG_PATCHES_LIVERIES_ALL :Alle firma
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Foretrekk lagchat med <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funksjonen til scrollhjulet: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom kart
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll kart
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maks antal tog per speler: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maks antal køyretøy per spelar: {ORANGE}{STRING}
@@ -1208,7 +1211,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Plasser tre av tilfeldig type
STR_CANT_BUILD_CANALS :{WHITE}Kan ikkje byggje kanalar her...
-STR_BUILD_CANALS_TIP :{BLACK}Bygg kanalar. Trykk CTRL for å plassere sjøområde (kun på havnivå)
+STR_BUILD_CANALS_TIP :{BLACK}Lag kanalar
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kan ikkje byggje sluser her...
@@ -2909,6 +2912,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :Ugyldig parameter for {STRING}: parameter {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} må være lasta før{STRING}.
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} må være lasta etter {STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF fila den var laga for å omsetje
STR_NEWGRF_ADD :{BLACK}Legg til
STR_NEWGRF_ADD_TIP :{BLACK}Legg ei ny NewGRF-fil til lista
--- a/src/lang/polish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/polish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -644,6 +644,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Przybycie pierwszego pojazdu do stacji przeciwnika
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Wypadki / klęski
STR_0209_COMPANY_INFORMATION :{YELLOW}Informacja firmy
+STR_NEWS_OPEN_CLOSE :{YELLOW}Otwarcie / zamknięcie przedsiębiorstw
STR_020A_ECONOMY_CHANGES :{YELLOW}Zmiany ekonomiczne
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Porady / informacje o pojazdach gracza
STR_020C_NEW_VEHICLES :{YELLOW}Nowe pojazdy
@@ -813,7 +814,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Umieść latarnię morską
STR_028E_PLACE_TRANSMITTER :{BLACK}Umieść nadajnik
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definiuj obszar pustyni.{}Wciśnij i trzymaj CTRL by usunąć
-STR_CREATE_LAKE :{BLACK}Definiuj akwen wodny.{}Okolice będą zalane jeśli są na poziomie morza
+STR_CREATE_LAKE :{BLACK}Stwórz akwen wodny.{}Tworzy kanał, chyba że przyrzymany jest CTRL na poziomie morza, wtedy pobliski teren zostanie zatopiony
STR_0290_DELETE :{BLACK}Skasuj
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Skasuj to miasto
STR_0292_SAVE_SCENARIO :Zapisz scenariusz
@@ -1176,6 +1177,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :WÅ‚asnej firmy
STR_CONFIG_PATCHES_LIVERIES_ALL :Wszystkich firm
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Preferuj czat drużynowy po użyciu <ENTER> lub <T>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funkcja rolki myszy: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Powiększ widok
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Przesuń widok
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Rolka wyłączona
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Prędkość przesuwania widoku: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maks. liczba pociągów na gracza: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maks. liczba samochodów na gracza: {ORANGE}{STRING}
@@ -1294,7 +1300,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Sadzenie drzew rożnych rodzajów
STR_CANT_BUILD_CANALS :{WHITE}Nie można tutaj wybudować kanału...
-STR_BUILD_CANALS_TIP :{BLACK}Buduj kanały
+STR_BUILD_CANALS_TIP :{BLACK}Buduj kanały.
STR_LANDINFO_CANAL :Kanał
STR_CANT_BUILD_LOCKS :{WHITE}Nie można tutaj wybudować śluzy...
@@ -2484,7 +2490,7 @@
STR_8087_TALBOTT_LIVESTOCK_VAN :Ciężarówka na żywiec Talbott
STR_8088_UHL_LIVESTOCK_VAN :Ciężarówka na żywiec Uhl
STR_8089_FOSTER_LIVESTOCK_VAN :Ciężarówka na żywiec Foster
-STR_808A_BALOGH_GOODS_TRUCK :Ciężarówka towarowy Balogh
+STR_808A_BALOGH_GOODS_TRUCK :Ciężarówka towarowa Balogh
STR_808B_CRAIGHEAD_GOODS_TRUCK :Ciężarówka towarowa Craighead
STR_808C_GOSS_GOODS_TRUCK :Ciężarówka towarowa Goss
STR_808D_HEREFORD_GRAIN_TRUCK :Ciężarówka na ziarno Hereford
@@ -2522,7 +2528,7 @@
STR_80AD_RMT_RUBBER_TRUCK :Ciężarówka na kauczuk RMT
STR_80AE_MIGHTYMOVER_SUGAR_TRUCK :Ciężarówka na cukier MightyMover
STR_80AF_POWERNAUGHT_SUGAR_TRUCK :Ciężarówka na cukier Powernaught
-STR_80B0_WIZZOWOW_SUGAR_TRUCK :Ciężarówka do cukier Wizzowow
+STR_80B0_WIZZOWOW_SUGAR_TRUCK :Ciężarówka na cukier Wizzowow
STR_80B1_MIGHTYMOVER_COLA_TRUCK :Cysterna na ColÄ™ MightyMover
STR_80B2_POWERNAUGHT_COLA_TRUCK :Cysterna na ColÄ™ Powernaught
STR_80B3_WIZZOWOW_COLA_TRUCK :Cysterna na ColÄ™ Wizzowow
--- a/src/lang/portuguese.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/portuguese.txt Mon Mar 26 22:15:38 2007 +0000
@@ -280,6 +280,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :SO/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...propriedade de {STRING}
STR_013C_CARGO :{BLACK}Carga
@@ -590,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Chegada do primeiro veÃculo à estação de um oponente
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Acidentes / desastres
STR_0209_COMPANY_INFORMATION :{YELLOW}Informações da empresa
+STR_NEWS_OPEN_CLOSE :{YELLOW}Abertura / Fecho de indústrias
STR_020A_ECONOMY_CHANGES :{YELLOW}Alterações económicas
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Avisos / informações dos veÃculos do jogador
STR_020C_NEW_VEHICLES :{YELLOW}Novos veÃculos
@@ -725,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Colocar farol
STR_028E_PLACE_TRANSMITTER :{BLACK}Colocar transmissor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definir área de deserto.{}Manter a tecla CTRL pressionada para remover
-STR_CREATE_LAKE :{BLACK}Definir área de água.{}A área adjacente será inundada se estiver ao nÃvel do mar
+STR_CREATE_LAKE :{BLACK}Definir área de água.{}Construir um canal com a tecla CTRL numa área que não seja a do mar, senão inundar-se-iam as zonas circundantes
STR_0290_DELETE :{BLACK}Apagar
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Apagar completamente esta cidade
STR_0292_SAVE_SCENARIO :Guardar cenário
@@ -1088,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Própria companhia
STR_CONFIG_PATCHES_LIVERIES_ALL :Todas as companhias
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Escolher chat de equipa com <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Função de scrollwheel: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Ampliar mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Percorrer mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Desligado
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Velocidade do scrollwheel no mapa: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Máximo de comboios por jogador: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Máximo de veÃculos de estrada por jogador: {ORANGE}{STRING}
@@ -1206,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Colocar árvores de tipo aleatório
STR_CANT_BUILD_CANALS :{WHITE}Não é possÃvel construir canais aqui...
-STR_BUILD_CANALS_TIP :{BLACK}Construir canais
+STR_BUILD_CANALS_TIP :{BLACK}Construir canais.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Não é possÃvel construir diques aqui...
@@ -2907,6 +2914,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :O ficheiro GRF foi desenhado para traduzir
STR_NEWGRF_ADD :{BLACK}Adicionar
STR_NEWGRF_ADD_TIP :{BLACK}Adicionar um ficheiro NewGRF Ã lista
--- a/src/lang/romanian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/romanian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -724,7 +724,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plaseazã far
STR_028E_PLACE_TRANSMITTER :{BLACK}Plaseazã transmitãtor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Defineste suprafata de desert.{}Apasã si mentine apasat CTRL pentru a o sterge
-STR_CREATE_LAKE :{BLACK}Defineste suprafata cu apã.{}Împrejurimile aflate la acelasi nivel vor fi inundate
STR_0290_DELETE :{BLACK}Sterge
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Sterge acest oras
STR_0292_SAVE_SCENARIO :Salveazã scenariul
@@ -1205,7 +1204,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Planteazã arbori din diverse specii la întâmplare
STR_CANT_BUILD_CANALS :{WHITE}Nu pot construi un canal aici...
-STR_BUILD_CANALS_TIP :{BLACK}Construieste canale
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}Nu pot construi o ecluzã aici...
--- a/src/lang/russian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/russian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -282,6 +282,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...принадлежащий {STRING}
STR_013C_CARGO :{BLACK}Груз
@@ -592,6 +593,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Первое транÑп. ÑредÑтво противника на Ñтанции
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Ðварии/КатаÑтрофы
STR_0209_COMPANY_INFORMATION :{YELLOW}Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ Компании
+STR_NEWS_OPEN_CLOSE :{YELLOW}Открытие / закрытие промышленноÑти
STR_020A_ECONOMY_CHANGES :{YELLOW}Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² Ñкономике
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Ð¡Ð¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾ транÑпорте игрока
STR_020C_NEW_VEHICLES :{YELLOW}Ðовый транÑпорт
@@ -727,7 +729,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}ПоÑтавить маÑк
STR_028E_PLACE_TRANSMITTER :{BLACK}ПоÑтавить передатчик
STR_028F_DEFINE_DESERT_AREA :{BLACK}Задать площадь пуÑтыни.{}Ðажмите и держите CTRL Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ
-STR_CREATE_LAKE :{BLACK}Определить водный проÑтор.{} Затопит землю, еÑли на уровне морÑ
+STR_CREATE_LAKE :{BLACK}Указать водную облаÑÑ‚ÑŒ.{}Создать канал, или наводнить вÑÑŽ окружающую облаÑÑ‚ÑŒ при зажатом CTRL на уровне морÑ.
STR_0290_DELETE :{BLACK}Уничтожить
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}ПолноÑтью уничтожить Ñтот город
STR_0292_SAVE_SCENARIO :Сохранить Ñценарий
@@ -1021,7 +1023,7 @@
STR_CONFIG_PATCHES_EXTRADYNAMITE :{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/YAPF)
+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}
@@ -1090,6 +1092,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :только Ð´Ð»Ñ Ñвоей компании
STR_CONFIG_PATCHES_LIVERIES_ALL :Ð´Ð»Ñ Ð²Ñех компаний
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Предпочитать командный чат при нажатии Enter: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}ИÑпользовать колеÑо прокрутки: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Ð´Ð»Ñ Ð¼Ð°ÑштабированиÑ
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Ð´Ð»Ñ ÑÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±Ð·Ð¾Ñ€Ð°
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :не иÑпользовать
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}СкороÑÑ‚ÑŒ ÑÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±Ð·Ð¾Ñ€Ð° прокруткой колеÑа мыши: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}МакÑимальное количеÑтво поездов на игрока: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}МакÑимальное количеÑтво автомобилей на игрока: {ORANGE}{STRING}
@@ -1208,7 +1215,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}РазмеÑтить Ð´ÐµÑ€ÐµÐ²ÑŒÑ Ñлучайного типа
STR_CANT_BUILD_CANALS :{WHITE}Ðевозможно поÑтроить канал здеÑÑŒ...
-STR_BUILD_CANALS_TIP :{BLACK}Проложить канал
+STR_BUILD_CANALS_TIP :{BLACK}Строить каналы.
STR_LANDINFO_CANAL :Канал
STR_CANT_BUILD_LOCKS :{WHITE}Ðевозможно поÑтроить шлюз здеÑÑŒ...
--- a/src/lang/simplified_chinese.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/simplified_chinese.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}对手车站的剪彩仪å¼
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}事故/ç¾éš¾
STR_0209_COMPANY_INFORMATION :{YELLOW}å…¬å¸ä¿¡æ¯
+STR_NEWS_OPEN_CLOSE :{YELLOW}å¼€å¯/å…³é—工业设施
STR_020A_ECONOMY_CHANGES :{YELLOW}ç»æµŽå˜åŒ–
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}玩家车辆的状况报告
STR_020C_NEW_VEHICLES :{YELLOW}新的车辆类型
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}放置ç¯å¡”
STR_028E_PLACE_TRANSMITTER :{BLACK}放置转æ’å¡”
STR_028F_DEFINE_DESERT_AREA :{BLACK}å®šä¹‰æ²™æ¼ åŒºåŸŸã€‚{}æ‘ä½ CTRL å¯ä»¥åŽ»æŽ‰æ²™æ¼ 区域。
-STR_CREATE_LAKE :{BLACK}定义ç¡çœ 。{}在海平é¢é«˜åº¦çš„æ°´é¢å°†æ·¹æ²¡å‘¨å›´çš„区域。
+STR_CREATE_LAKE :{BLACK}定义水域。{}修建è¿æ²³ï¼Œä»…在CTRL被按下的情况下ä¸ä¼šåœ¨æµ·å¹³é¢æ·¹æ²¡å‘¨å›´çš„区域。
STR_0290_DELETE :{BLACK}åˆ é™¤
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}å®Œå…¨åˆ é™¤è¿™åº§åŸŽé•‡
STR_0292_SAVE_SCENARIO :ä¿å˜åœºæ™¯
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :本公å¸
STR_CONFIG_PATCHES_LIVERIES_ALL :所有公å¸
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}输入 <ENTER> 时与å好的团队交谈:{ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}é¼ æ ‡æ»šè½®çš„ä½œç”¨ï¼š{ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :缩放地图
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :滚动地图
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :å…³é—
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}地图滚动速度:{ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}æ¯ä½çŽ©å®¶æœ€å¤§ç«è½¦æ•°é‡ï¼š{ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}æ¯ä½çŽ©å®¶æœ€å¤§æ±½è½¦æ•°é‡ï¼š{ORANGE}{STRING}
@@ -1207,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}ç§æ¤éšæœºç±»åž‹çš„æ ‘æœ¨
STR_CANT_BUILD_CANALS :{WHITE}ä¸èƒ½åœ¨è¿™é‡Œå…´å»ºè¿æ²³â€¦â€¦
-STR_BUILD_CANALS_TIP :{BLACK}兴建è¿æ²³ã€‚点击 CTRL å¯ä»¥å¢žåŠ æµ·é¢ (仅在平é¢æœ‰æ•ˆ)。
+STR_BUILD_CANALS_TIP :{BLACK}修建è¿æ²³ã€‚
STR_LANDINFO_CANAL :è¿æ²³
STR_CANT_BUILD_LOCKS :{WHITE}ä¸èƒ½åœ¨è¿™é‡Œå…´å»ºèˆ¹é—¸â€¦â€¦
@@ -2908,6 +2914,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :{STRING} å‚数错误:å‚æ•° {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} 必须在 {STRING} å‰åŠ 载。
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} 必须在 {STRING} åŽåŠ 载。
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF 被设计为å¯å¹³ç§»
STR_NEWGRF_ADD :{BLACK}增åŠ
STR_NEWGRF_ADD_TIP :{BLACK}å‘列表ä¸å¢žåŠ 一个 NewGRF 文件
--- a/src/lang/slovak.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/slovak.txt Mon Mar 26 22:15:38 2007 +0000
@@ -344,6 +344,7 @@
STR_OSNAME_MORPHOS :MorphOS
STR_OSNAME_AMIGAOS :AmigaOS
STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}... vlastnÃkom je {STRING}
STR_013C_CARGO :{BLACK}Náklad
@@ -654,6 +655,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Prijazd prveho vozidla do stanice konkurencie
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Havarie / Katastrofy
STR_0209_COMPANY_INFORMATION :{YELLOW}Informacie o spolocnosti
+STR_NEWS_OPEN_CLOSE :{YELLOW}Vznik a zánik priemyslu
STR_020A_ECONOMY_CHANGES :{YELLOW}Zmeny v ekonomike
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Oznamenia / Informacie o vozidlach hraca
STR_020C_NEW_VEHICLES :{YELLOW}Nove vozidla
@@ -789,7 +791,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Umiestnit majak
STR_028E_PLACE_TRANSMITTER :{BLACK}Umiestnit vysielac
STR_028F_DEFINE_DESERT_AREA :{BLACK}Vytvorit oblast puste.{}Drzanim CTRL ju odstranite
-STR_CREATE_LAKE :{BLACK}Vytvorit oblast vody.{}Okolie bude tiez zaplavene, ak je na urovni mora
+STR_CREATE_LAKE :{BLACK}Definovat oblast vody.{}Vytvorà kanál, pri stlacenà CTRL na úrovni mora zaplavà okolie
STR_0290_DELETE :{BLACK}Vymazat
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Kompletne vymazat toto mesto
STR_0292_SAVE_SCENARIO :Ulozit scenar
@@ -1152,6 +1154,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Vlastna spolocnost
STR_CONFIG_PATCHES_LIVERIES_ALL :Vsetky spolocnosti
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Preferovaný teamový chat: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funkcia scrolovacieho kolieska: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zvacšit mapu
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Posúvat mapu
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Vypnuté
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Rychlost posúvania mapy: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Maximalny pocet vlakov hraca: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Maximalny pocet automobilov hraca: {ORANGE}{STRING}
@@ -1270,7 +1277,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Umiestnit nahodne stromy
STR_CANT_BUILD_CANALS :{WHITE}Tu sa neda postavit prieplav ...
-STR_BUILD_CANALS_TIP :{BLACK}Postavit prieplavy
+STR_BUILD_CANALS_TIP :{BLACK}Stavba kanálov.
STR_LANDINFO_CANAL :Prieplav
STR_CANT_BUILD_LOCKS :{WHITE}Tu sa neda postavit stavidlo ...
@@ -2971,6 +2978,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :GRF súbor bol navrhnutý na preklad
STR_NEWGRF_ADD :{BLACK}Pridat
STR_NEWGRF_ADD_TIP :{BLACK}Pridat NewGRF súbor do zoznamu
--- a/src/lang/slovenian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/slovenian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -633,6 +633,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Prihod prvega vozila na nasprotnikovo postajo
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}NesreÄe / katastrofe
STR_0209_COMPANY_INFORMATION :{YELLOW}Informacije o podjetju
+STR_NEWS_OPEN_CLOSE :{YELLOW}Odpiranje / zapiranje industrij
STR_020A_ECONOMY_CHANGES :{YELLOW}Ekonomske spremembe
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Nasveti / informacije o igralÄevem vozilu
STR_020C_NEW_VEHICLES :{YELLOW}Nova vozila
@@ -768,7 +769,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Postavi svetilnik
STR_028E_PLACE_TRANSMITTER :{BLACK}Postavi oddajnik
STR_028F_DEFINE_DESERT_AREA :{BLACK}DoloÄi obmoÄja puÅ¡Äave.{}Pritisni in drži CTRL za odstranitev
-STR_CREATE_LAKE :{BLACK}DoloÄi vodno obmoÄje.{}Voda bo poplavila okolico, Äe bo na viÅ¡ini morja
STR_0290_DELETE :{BLACK}Izbriši
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Popolnoma izbriši mesto
STR_0292_SAVE_SCENARIO :Shrani scenarij
@@ -1131,6 +1131,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Lastno podjetje
STR_CONFIG_PATCHES_LIVERIES_ALL :Vsa podjetja
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Izberi skupinski pogovor z <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Funkcija kolesca miške: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Približaj zemljevid
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Premikaj zemljevid
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Izklopljeno
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Hitrost premika s kolescem miške: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}NajveÄ vlakov na igralca: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}NajveÄ cestnih vozil na igralca: {ORANGE}{STRING}
@@ -1249,7 +1254,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Postavi drevesa nakljuÄne vrste
STR_CANT_BUILD_CANALS :{WHITE}Ni mogoÄe zgraditi kanalov tukaj ...
-STR_BUILD_CANALS_TIP :{BLACK}Gradnja kanalov. CTRL+klik za postavitev morskih kvadratkov{}(samo na višini gladine morja)
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Ni mogoÄe zgraditi zapornic tukaj ...
@@ -2988,6 +2992,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :GRF datoteka je bila narejena za prevod
STR_NEWGRF_ADD :{BLACK}Dodaj
STR_NEWGRF_ADD_TIP :{BLACK}Dodaj NewGRF datoteko na seznam
--- a/src/lang/spanish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/spanish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -592,6 +592,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Llegada del 1er veh. estación de la competencia
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Accidentes / desastres
STR_0209_COMPANY_INFORMATION :{YELLOW}Información de la empresa
+STR_NEWS_OPEN_CLOSE :{YELLOW}Aperturas/ cierres de industrias
STR_020A_ECONOMY_CHANGES :{YELLOW}Cambios en la economÃa
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Sugerencias/info. sobre vehÃculos del jugador
STR_020C_NEW_VEHICLES :{YELLOW}Nuevos vehÃculos
@@ -727,7 +728,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Colocar faro
STR_028E_PLACE_TRANSMITTER :{BLACK}Colocar transmisor
STR_028F_DEFINE_DESERT_AREA :{BLACK}Define área desertica.{}Pulsa y mantén CTRL para quitarla
-STR_CREATE_LAKE :{BLACK}Define zona de água.{}Inundará los alrededores hasta nivel del mar
+STR_CREATE_LAKE :{BLACK}Define el area de agua.{}Haz un canal, a menos que mantengas pulsado CTRL a nivel del mar, entonces se inundarán los alrededores del lugar
STR_0290_DELETE :{BLACK}Borrar
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Borrar esta población completamente
STR_0292_SAVE_SCENARIO :Guardar escenario
@@ -1090,6 +1091,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Propia empresa
STR_CONFIG_PATCHES_LIVERIES_ALL :Todas las empresas
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Charla de equipo preferida con <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Función de la rueda de scroll: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom sobre el mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scroll sobre el mapa
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Nada
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Velocidad del scroll sobre el mapa: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Máx trenes por jugador: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Máx vehÃculos de carretera por jugador: {ORANGE}{STRING}
@@ -1208,7 +1214,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Colocar distintos árboles al azar
STR_CANT_BUILD_CANALS :{WHITE}No se pueden construir canales aquÃ...
-STR_BUILD_CANALS_TIP :{BLACK}Construir canales
+STR_BUILD_CANALS_TIP :{BLACK}Construir canales.
STR_LANDINFO_CANAL :Canal
STR_CANT_BUILD_LOCKS :{WHITE}No se pueden construir dársenas aquÃ...
@@ -2909,6 +2915,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :el fichero GRF ha sido diseñado para ser traducido
STR_NEWGRF_ADD :{BLACK}Añadir
STR_NEWGRF_ADD_TIP :{BLACK}Añadir un NewGRF a la lista
--- a/src/lang/swedish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/swedish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Ankomst av första fordonet vid konkurrenternas stn.
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Olyckor / katastrofer
STR_0209_COMPANY_INFORMATION :{YELLOW}Företagsinformation
+STR_NEWS_OPEN_CLOSE :{YELLOW}Öppning / stängning av industrier
STR_020A_ECONOMY_CHANGES :{YELLOW}Förändringar av ekonomin
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}RÃ¥d / information om spelarens fordon
STR_020C_NEW_VEHICLES :{YELLOW}Nya fordon
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Placera fyrtorn
STR_028E_PLACE_TRANSMITTER :{BLACK}Placera radiosändare
STR_028F_DEFINE_DESERT_AREA :{BLACK}Definiera ökenområde.{}Tryck och håll CTRL för att ta bort
-STR_CREATE_LAKE :{BLACK}Definiera vattenområde.{}Den fyller närområdet om det ligger i sjönivå
+STR_CREATE_LAKE :{BLACK}Definiera vattenyta.{}Skapa en kanal, om inte CTRL är nedhållen vid havsnivå, då den kommer att översvämma närliggande områden istället
STR_0290_DELETE :{BLACK}Ta bort
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Ta bort staden helt och hållet
STR_0292_SAVE_SCENARIO :Spara scenario
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :Egna företaget
STR_CONFIG_PATCHES_LIVERIES_ALL :Alla företag
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Prioritera lagchat med <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Mushjulsfunktion: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zooma kartan
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Scrolla kartan
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Avstängd
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}Mushjulshastighet: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max antal tåg per spelare: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max antal vägfordon per spelare: {ORANGE}{STRING}
@@ -1207,7 +1213,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Placera träd av olika typ
STR_CANT_BUILD_CANALS :{WHITE}Kan inte bygga kanaler här...
-STR_BUILD_CANALS_TIP :{BLACK}Bygg kanaler. Håll ner CTRL för att bygga vid angränsande vatten.
+STR_BUILD_CANALS_TIP :{BLACK}Bygg kanaler.
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Kan inte bygga slussar här...
@@ -2908,6 +2914,7 @@
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_ERROR_AFTER_TRANSLATED_FILE :GRF-filen den var designad att översätta
STR_NEWGRF_ADD :{BLACK}Lägg till
STR_NEWGRF_ADD_TIP :{BLACK}Lägg till en ny NewGRF-fil till listan
--- a/src/lang/traditional_chinese.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/traditional_chinese.txt Mon Mar 26 22:15:38 2007 +0000
@@ -411,16 +411,16 @@
STR_SEND_FOR_SERVICING :é€åŽ»ç¶è·
############ range for months starts
-STR_0162_JAN :一月
-STR_0163_FEB :二月
-STR_0164_MAR :三月
-STR_0165_APR :四月
-STR_0166_MAY :五月
-STR_0167_JUN :å…月
-STR_0168_JUL :七月
-STR_0169_AUG :八月
-STR_016A_SEP :ä¹æœˆ
-STR_016B_OCT :å月
+STR_0162_JAN :1
+STR_0163_FEB :2
+STR_0164_MAR :3
+STR_0165_APR :4
+STR_0166_MAY :5
+STR_0167_JUN :6
+STR_0168_JUL :7
+STR_0169_AUG :8
+STR_016A_SEP :9
+STR_016B_OCT :10
STR_016C_NOV :å一月
STR_016D_DEC :å二月
############ range for months ends
@@ -496,37 +496,37 @@
STR_01AB :{BLACK}{TINYFONT}{STRING}
############ range for days starts
-STR_01AC_1ST :一日
-STR_01AD_2ND :二日
-STR_01AE_3RD :三日
-STR_01AF_4TH :四日
-STR_01B0_5TH :五日
-STR_01B1_6TH :å…æ—¥
-STR_01B2_7TH :七日
-STR_01B3_8TH :å…«æ—¥
-STR_01B4_9TH :ä¹æ—¥
-STR_01B5_10TH :åæ—¥
-STR_01B6_11TH :å一日
-STR_01B7_12TH :å二日
-STR_01B8_13TH :å三日
-STR_01B9_14TH :å四日
-STR_01BA_15TH :å五日
-STR_01BB_16TH :åå…æ—¥
-STR_01BC_17TH :å七日
-STR_01BD_18TH :åå…«æ—¥
-STR_01BE_19TH :åä¹æ—¥
-STR_01BF_20TH :二åæ—¥
-STR_01C0_21ST :二å一日
-STR_01C1_22ND :二å二日
-STR_01C2_23RD :二å三日
-STR_01C3_24TH :二å四日
-STR_01C4_25TH :二å五日
-STR_01C5_26TH :二åå…æ—¥
-STR_01C6_27TH :二å七日
-STR_01C7_28TH :二åå…«æ—¥
-STR_01C8_29TH :二åä¹æ—¥
-STR_01C9_30TH :三åæ—¥
-STR_01CA_31ST :三å一日
+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}
@@ -591,6 +591,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}首個交通工具已到é”競çˆå°æ‰‹çš„車站
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}æ„外 / ç½é›£
STR_0209_COMPANY_INFORMATION :{YELLOW}å…¬å¸è³‡è¨Š
+STR_NEWS_OPEN_CLOSE :{YELLOW}å·¥æ¥é–‹å¼µ/倒閉消æ¯
STR_020A_ECONOMY_CHANGES :{YELLOW}經濟氣候變化
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}給玩家的載具的建è°æˆ–資訊
STR_020C_NEW_VEHICLES :{YELLOW}新載具
@@ -726,7 +727,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}建立燈塔
STR_028E_PLACE_TRANSMITTER :{BLACK}建立發射站
STR_028F_DEFINE_DESERT_AREA :{BLACK}å®šç¾©æ²™æ¼ å€ã€‚{}è«‹æŒ‰ä½ CTRL 移除
-STR_CREATE_LAKE :{BLACK}定義水å€ã€‚{}如果在海平é¢çš„話會淹沒周åœåœ°å€
+STR_CREATE_LAKE :{BLACK}劃出湖泊範åœã€‚{}é–‹é‘¿é‹æ²³ã€‚在海平é¢ä¸ŠæŒ‰ CTRL éµå‰‡æœƒæ·¹æ²«é€±é土地
STR_0290_DELETE :{BLACK}刪除
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}完全移除這個市鎮
STR_0292_SAVE_SCENARIO :儲å˜å ´æ™¯
@@ -739,7 +740,7 @@
STR_0298_LOAD_SCENARIO :{WHITE}è¼‰å…¥å ´æ™¯
STR_0299_SAVE_SCENARIO :{WHITE}儲å˜å ´æ™¯
STR_029A_PLAY_SCENARIO :{BLACK}以æ¤å ´æ™¯é–‹å§‹
-STR_PLAY_HEIGHTMAP :{BLACK}玩高度圖
+STR_PLAY_HEIGHTMAP :{BLACK}載入高度圖
STR_PLAY_HEIGHTMAP_HINT :{BLACK}以高度圖為地形開始新éŠæˆ²
STR_QUIT_SCENARIO_QUERY :{YELLOW}ä½ è¦é›¢é–‹é€™å€‹å ´æ™¯å—Ž?
STR_029C_QUIT_EDITOR :{WHITE}離開編輯器
@@ -1089,6 +1090,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :自己的公å¸
STR_CONFIG_PATCHES_LIVERIES_ALL :所有公å¸
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}按 <ENTER> éµèˆ‡å°éšŠäº¤è«‡: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}æ»‘é¼ æ»¾è¼ªä½œç”¨ï¼š {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :放大地圖
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :æ²å‹•åœ°åœ–
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :關閉
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}滾輪地圖æ²å‹•é€Ÿåº¦ï¼š {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}æ¯ä½çŽ©å®¶å¯æ“有列車數目: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}æ¯ä½çŽ©å®¶å¯æ“有車輛數目: {ORANGE}{STRING}
@@ -1206,8 +1212,8 @@
STR_TREES_RANDOM_TYPE :{BLACK}隨機種類樹木
STR_TREES_RANDOM_TYPE_TIP :{BLACK}種æ¤éš¨æ©Ÿç¨®é¡žæ¨¹æœ¨
-STR_CANT_BUILD_CANALS :{WHITE}ä¸å¯ä»¥åœ¨é€™è£èˆˆå»ºé‹æ²³...
-STR_BUILD_CANALS_TIP :{BLACK}興建é‹æ²³ã€‚按 CTRL éµ (åªé™æ–¼æµ·å¹³é¢)
+STR_CANT_BUILD_CANALS :{WHITE}ä¸å¯ä»¥åœ¨é€™è£é–‹é‘¿é‹æ²³...
+STR_BUILD_CANALS_TIP :{BLACK}é–‹é‘¿é‹æ²³ã€‚
STR_LANDINFO_CANAL :é‹æ²³
STR_CANT_BUILD_LOCKS :{WHITE}ä¸å¯ä»¥åœ¨é€™è£èˆˆå»ºæ°´é–˜...
@@ -2499,13 +2505,13 @@
STR_8807_GO_TO_TRANSFER :å‰å¾€ {STATION} (轉é‹ï¼Œåƒ…載ä¸å¸)
STR_8808_GO_TO_UNLOAD :å‰å¾€ {STATION} (å¸å®¢è²¨)
STR_8809_GO_TO_TRANSFER_UNLOAD :å‰å¾€ {STATION} (轉é‹ï¼Œå¸å®¢è²¨æ¸…空離站)
-STR_880A_GO_TO_LOAD :å‰å¾€ {STATION} (載客貨)
+STR_880A_GO_TO_LOAD :å‰å¾€ {STATION} (載貨)
STR_880B_GO_TO_TRANSFER_LOAD :å‰å¾€ {STATION} (轉é‹ï¼Œç‰å¾…滿載)
STR_880C_GO_NON_STOP_TO :å‰å¾€ {STATION} ä¸åœé /ä¸é€”ä¸åœ
STR_880D_GO_TO_NON_STOP_TRANSFER :å‰å¾€ {STATION} (轉é‹ï¼Œåƒ…載ä¸å¸) ä¸é€”ä¸åœ
STR_880E_GO_NON_STOP_TO_UNLOAD :å‰å¾€ {STATION} (å¸å®¢è²¨) ä¸é€”ä¸åœ
STR_880F_GO_TO_NON_STOP_TRANSFER_UNLOAD :å‰å¾€ {STATION} (轉é‹ï¼Œå¸å®¢è²¨æ¸…空離站) ä¸é€”ä¸åœ
-STR_8810_GO_NON_STOP_TO_LOAD :å‰å¾€ {STATION} (載客貨) ä¸é€”ä¸åœ
+STR_8810_GO_NON_STOP_TO_LOAD :å‰å¾€ {STATION} (載貨) ä¸é€”ä¸åœ
STR_8811_GO_TO_NON_STOP_TRANSFER_LOAD :å‰å¾€ {STATION} (轉é‹ï¼Œç‰å¾…滿載) ä¸é€”ä¸åœ
STR_GO_TO_TRAIN_DEPOT :å‰å¾€ {TOWN} æ©Ÿå»
STR_SERVICE_AT_TRAIN_DEPOT :在 {TOWN} æ©Ÿå» ç¶è·
@@ -2908,6 +2914,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER : {STRING} çš„åƒæ•¸ç„¡æ•ˆ: {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :è¼‰å…¥å‰ {1:STRING} å¿…é ˆå…ˆè¼‰å…¥ {0:STRING}。
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} å¿…é ˆåœ¨ {STRING} 之後載入。
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF 檔案翻è¯å¾Œå‡ºç¾éŒ¯èª¤
STR_NEWGRF_ADD :{BLACK}新增
STR_NEWGRF_ADD_TIP :{BLACK}ç‚ºæ¸…å–®åŠ å…¥æ–°çš„ NewGRF 檔
@@ -3137,7 +3144,7 @@
############ Date formatting
STR_DATE_TINY :{STRING}-{STRING}-{NUM}
STR_DATE_SHORT :{STRING} {NUM}
-STR_DATE_LONG :{STRING} {STRING} {NUM}
+STR_DATE_LONG :{2:NUM} 年 {1:STRING} 月 {0:STRING} 日
########
--- a/src/lang/turkish.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/turkish.txt Mon Mar 26 22:15:38 2007 +0000
@@ -725,7 +725,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Deniz feneri koy
STR_028E_PLACE_TRANSMITTER :{BLACK}Verici koy
STR_028F_DEFINE_DESERT_AREA :{BLACK}Çöl yap, kaldırmak için CTRL'ye basılı tut
-STR_CREATE_LAKE :{BLACK}Su yap, deniz seviyesindeki yerler suyla dolar
STR_0290_DELETE :{BLACK}Sil
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Sehri tamamen sil
STR_0292_SAVE_SCENARIO :Kaydet
@@ -1206,7 +1205,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Rastgele türde ağaçlar koy
STR_CANT_BUILD_CANALS :{WHITE}Buraya kanal yapılamaz...
-STR_BUILD_CANALS_TIP :{BLACK}Kanal Yap
STR_LANDINFO_CANAL :Kanal
STR_CANT_BUILD_LOCKS :{WHITE}Buraya kilit yapılamaz...
--- a/src/lang/ukrainian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/ukrainian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -597,7 +597,7 @@
STR_0195_SHOW_VEGETATION_ON_MAP :{BLACK}Показати роÑлинніÑÑ‚ÑŒ на карті
STR_0196_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Показати влаÑників землі на карті
STR_0197_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Показати назви міÑÑ‚ на карті
-STR_0198_PROFIT_THIS_YEAR_LAST_YEAR :{TINYFONT}{BLACK}Прибуток цього року: {CURRENCY} (минулого року: {CURRENCY})
+STR_0198_PROFIT_THIS_YEAR_LAST_YEAR :{TINYFONT}{BLACK}Прибуток цього року: {CURRENCY} (торік: {CURRENCY})
############ range for service numbers starts
STR_AGE :{COMMA} р{P ік оки оків} ({COMMA})
@@ -717,6 +717,7 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}ÐŸÑ€Ð¸Ð±ÑƒÑ‚Ñ‚Ñ Ð¿ÐµÑ€ÑˆÐ¾Ð³Ð¾ транÑпорту на Ñтанцію конкурента
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}ÐещаÑні випадки/Ñтихійні лиха
STR_0209_COMPANY_INFORMATION :{YELLOW}Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ñ–Ñ—
+STR_NEWS_OPEN_CLOSE :{YELLOW}Ð’Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ / Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð¿Ñ–Ð´Ð¿Ñ€Ð¸Ñ”Ð¼Ñтв
STR_020A_ECONOMY_CHANGES :{YELLOW}Зміни в економіці
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}Поради/Ñ–Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ транÑпорт гравцÑ
STR_020C_NEW_VEHICLES :{YELLOW}Ðовий транÑпорт
@@ -852,7 +853,7 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}ПоÑтавити маÑк
STR_028E_PLACE_TRANSMITTER :{BLACK}ПоÑтавити ретранÑлÑтор
STR_028F_DEFINE_DESERT_AREA :{BLACK}Позначити територію пуÑтелі.{}ÐатиÑніть Ñ– утримуйте CTRL, щоб відмінити
-STR_CREATE_LAKE :{BLACK}Позначити територію води.{}ЗаповнитьÑÑ Ð²Ð¾Ð´Ð¾ÑŽ, Ñкщо на рівні морÑ
+STR_CREATE_LAKE :{BLACK}Позначити, де буде вода.{}Make a canal, unless CTRL is held down at sea level, when it will flood the surroundings instead
STR_0290_DELETE :{BLACK}Видалити
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Видалити міÑто повніÑÑ‚ÑŽ
STR_0292_SAVE_SCENARIO :Зберегти Ñценарій
@@ -1105,7 +1106,7 @@
STR_END_OF_SHARED_ORDERS :{SETX 10}- - Кінець наказів - -
STR_TRAIN_IS_LOST :{WHITE}Поїзд {COMMA} заблукав.
-STR_TRAIN_IS_UNPROFITABLE :{WHITE}Поїзд {COMMA} Ð¿Ñ€Ð¸Ð½Ñ–Ñ Ð¿Ñ€Ð¸Ð±ÑƒÑ‚Ð¾Ðº минулого року {CURRENCY}
+STR_TRAIN_IS_UNPROFITABLE :{WHITE}Поїзд {COMMA} торік Ð¿Ñ€Ð¸Ð½Ñ–Ñ Ð¿Ñ€Ð¸Ð±ÑƒÑ‚Ð¾Ðº {CURRENCY}
STR_EURO_INTRODUCE :{BLACK}{BIGFONT}ЄвропейÑька грошова одиницÑ!{}{}У вашій країні введено євро - єдину валюту Ð´Ð»Ñ Ñ€Ð¾Ð·Ñ€Ð°Ñ…ÑƒÐ½ÐºÑ–Ð²!
# Start of order review system.
@@ -1215,6 +1216,11 @@
STR_CONFIG_PATCHES_LIVERIES_OWN :ÐœÐ¾Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ñ–Ñ
STR_CONFIG_PATCHES_LIVERIES_ALL :Ð’ÑÑ– компанії
STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Командний чат по <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ ÐºÐ¾Ð»ÐµÑа миші: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :МаÑштаб карти
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Прокрутка карти
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Відкл.
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{LTBLUE}ШвидкіÑÑ‚ÑŒ прокрутки колеÑом миші: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}МакÑ. поїздів у гравцÑ: {ORANGE}{STRING}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}МакÑ. авто у гравцÑ: {ORANGE}{STRING}
@@ -1333,7 +1339,7 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Садити дерева випадкового типу
STR_CANT_BUILD_CANALS :{WHITE}Ðеможливо будувати канал тут...
-STR_BUILD_CANALS_TIP :{BLACK}Будувати канал
+STR_BUILD_CANALS_TIP :{BLACK}Будувати канали.
STR_LANDINFO_CANAL :Канал
STR_CANT_BUILD_LOCKS :{WHITE}Ðеможливо будувати шлюз тут...
@@ -1512,7 +1518,7 @@
STR_NETWORK_INAUGURATION_YEAR :{SILVER}ЗаÑновано: {WHITE}{NUM}
STR_NETWORK_VALUE :{SILVER}ВартіÑÑ‚ÑŒ компанії: {WHITE}{CURRENCY64}
STR_NETWORK_CURRENT_BALANCE :{SILVER}Поточний баланÑ: {WHITE}{CURRENCY64}
-STR_NETWORK_LAST_YEARS_INCOME :{SILVER}Прибуток минулого року: {WHITE}{CURRENCY64}
+STR_NETWORK_LAST_YEARS_INCOME :{SILVER}Прибуток торік: {WHITE}{CURRENCY64}
STR_NETWORK_PERFORMANCE :{SILVER}ПродуктивніÑÑ‚ÑŒ: {WHITE}{NUM}
STR_NETWORK_VEHICLES :{SILVER}ТранÑпорт: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {PLANE}, {NUM} {SHIP}
@@ -2312,16 +2318,16 @@
STR_7058_PRESIDENT :{BLACK}{PLAYERNAME}{}(Керівник)
STR_7059_TRANSPORT_COMPANY_MERGER :{BLACK}{BIGFONT}Компанії об'єдналиÑÑ!
STR_705A_HAS_BEEN_SOLD_TO_FOR :{BLACK}{BIGFONT}{COMPANY} була викуплена {COMPANY} за {CURRENCY}!
-STR_705B_WE_ARE_LOOKING_FOR_A_TRANSPORT :{WHITE}Ми шукаємо нового влаÑника нашої компанії.{}{}Ви бажаєте купити {COMPANY} за {CURRENCY}?
+STR_705B_WE_ARE_LOOKING_FOR_A_TRANSPORT :{WHITE}Ми шукаємо нового влаÑника нашої компанії.{}{}Чи бажаєте Ви купити {COMPANY} за {CURRENCY}?
STR_705C_BANKRUPT :{BLACK}{BIGFONT}БÐÐКРУТ!
-STR_705D_HAS_BEEN_CLOSED_DOWN_BY :{BLACK}{BIGFONT}{COMPANY} буде закрита кредиторами Ñ– вÑе майно буде продане!
+STR_705D_HAS_BEEN_CLOSED_DOWN_BY :{BLACK}{BIGFONT}{COMPANY} була закрита кредиторами Ñ– вÑе майно продане!
STR_705E_NEW_TRANSPORT_COMPANY_LAUNCHED :{BLACK}{BIGFONT}ЗаÑновано нову компанію!
STR_705F_STARTS_CONSTRUCTION_NEAR :{BLACK}{BIGFONT}{COMPANY} починає будівництво Ð±Ñ–Ð»Ñ {TOWN}!
STR_7060_CAN_T_BUY_COMPANY :{WHITE}Ðеможливо купити компанію...
STR_7061_CARGO_PAYMENT_RATES :{WHITE}Тарифи на доÑтавку вантажів
STR_7062_DAYS_IN_TRANSIT :{BLACK}{TINYFONT}Днів у дорозі
STR_7063_PAYMENT_FOR_DELIVERING :{BLACK}{TINYFONT}Плата за доÑтавку 10 одиниць (або 10,000 літрів) вантажу на відÑтань 20 квадратів
-STR_7064_TOGGLE_GRAPH_FOR_CARGO :{BLACK}Вкл/викл графік типів вантажу
+STR_7064_TOGGLE_GRAPH_FOR_CARGO :{BLACK}Вкл/відкл графік типів вантажу
STR_7065 :{BLACK}{TINYFONT}{STRING}
STR_7066_ENGINEER :Інженер
STR_7067_TRAFFIC_MANAGER :Регулювальник
@@ -2342,7 +2348,7 @@
STR_COMPANY_PASSWORD_TOOLTIP :{BLACK}Пароль захищає вашу компанію від Ð¿Ñ€Ð¸Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ñ–Ð½ÑˆÐ¸Ñ… гравців.
STR_SET_COMPANY_PASSWORD :Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»ÑŽ
STR_7073_WORLD_RECESSION_FINANCIAL :{BIGFONT}{BLACK}Світова економічна криза!{}{}ФінанÑиÑти очікують Ñпад виробництва та попиту!
-STR_7074_RECESSION_OVER_UPTURN_IN :{BIGFONT}{BLACK}Криза минула!{}{}Ð—Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ð´Ñ–ÑльноÑÑ‚Ñ– підніме промиÑловіÑÑ‚ÑŒ коли економіка ÑтабілізуєтьÑÑ!
+STR_7074_RECESSION_OVER_UPTURN_IN :{BIGFONT}{BLACK}Криза минула!{}{}Ð—Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ Ð²Ð¸Ñ€Ð¾Ð±Ð½Ð¸Ñ†Ñ‚Ð²Ð° внаÑлідок Ñтабілізації економіки надає впевненоÑÑ‚Ñ– підприємÑтвам!
STR_7075_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Розмір вікна великий/малий
STR_7076_COMPANY_VALUE :{GOLD}ВартіÑÑ‚ÑŒ компанії: {WHITE}{CURRENCY64}
STR_7077_BUY_25_SHARE_IN_COMPANY :{BLACK}Купити 25% акцій компанії
@@ -2775,7 +2781,7 @@
STR_885D_AGE_RUNNING_COST_YR :{BLACK}Вік: {LTBLUE}{STRING}{BLACK} ТранÑпортні витрати: {LTBLUE}{CURRENCY}/рік
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Вага: {LTBLUE}{WEIGHT_S} {BLACK}ПотужніÑÑ‚ÑŒ: {LTBLUE}{POWER}{BLACK} МакÑ. швидкіÑÑ‚ÑŒ: {LTBLUE}{VELOCITY}
STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Вага: {LTBLUE}{WEIGHT_S} {BLACK}ПотужніÑÑ‚ÑŒ: {LTBLUE}{POWER}{BLACK} МакÑ. швидкіÑÑ‚ÑŒ: {LTBLUE}{VELOCITY} {BLACK}МакÑ. T.E.: {LTBLUE}{FORCE}
-STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Прибуток: {LTBLUE}{CURRENCY} (минулого року: {CURRENCY})
+STR_885F_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Прибуток: {LTBLUE}{CURRENCY} (торік: {CURRENCY})
STR_8860_RELIABILITY_BREAKDOWNS :{BLACK}ÐадійніÑÑ‚ÑŒ: {LTBLUE}{COMMA}% {BLACK}Поломок піÑÐ»Ñ Ð¾Ñтаннього техоглÑду: {LTBLUE}{COMMA}
STR_8861_STOPPED :{RED}Зупинений
STR_8862_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Ðеможливо проїхати Ñигнал - небезпечно...
@@ -3071,6 +3077,7 @@
STR_NEWGRF_ERROR_INVALID_PARAMETER :Помилковий параметр Ð´Ð»Ñ {STRING}: параметр {STRING} ({NUM})
STR_NEWGRF_ERROR_LOAD_BEFORE :{STRING} має бути завантажений до {STRING}.
STR_NEWGRF_ERROR_LOAD_AFTER :{STRING} має бути завантажений піÑÐ»Ñ {STRING}.
+STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :GRF-файл, Ð´Ð»Ñ Ñкого це призначалоÑÑŒ переклаÑти
STR_NEWGRF_ADD :{BLACK}Додати
STR_NEWGRF_ADD_TIP :{BLACK}Додати файли NewGRF до ÑпиÑку
@@ -3304,4 +3311,4 @@
########
-STR_FEEDER_CARGO_VALUE :{BLACK}Дохід перевезень: {LTBLUE}{CURRENCY}
+STR_FEEDER_CARGO_VALUE :{BLACK}Плата за транÑфер: {LTBLUE}{CURRENCY}
--- a/src/lang/unfinished/afrikaans.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/unfinished/afrikaans.txt Mon Mar 26 22:15:38 2007 +0000
@@ -717,7 +717,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Plaas vuurtoring
STR_028E_PLACE_TRANSMITTER :{BLACK}Plaas sender
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
STR_0292_SAVE_SCENARIO :Bewaar draaiboek
@@ -1136,7 +1135,6 @@
STR_CANT_BUILD_CANALS :{WHITE}Kan nie kanaale hier bou nie...
-STR_BUILD_CANALS_TIP :{BLACK}Bou kanaale. Druk CRTL om see blokkies te plaas (slegs op see-vlak)
STR_LANDINFO_CANAL :Kanaal
STR_CANT_BUILD_LOCKS :{WHITE}Kan nie sluite hier bou nie...
--- a/src/lang/unfinished/croatian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/unfinished/croatian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -723,7 +723,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Postavi svjetionik
STR_028E_PLACE_TRANSMITTER :{BLACK}Postavi odaÅ¡iljaÄ
STR_028F_DEFINE_DESERT_AREA :{BLACK}Odredi pustinjsko podruÄje.{}Pritisni i drži CTRL za uklanjanje
-STR_CREATE_LAKE :{BLACK}Odredi vodeno podruÄje.{}Poplaviti će okolno podruÄje ako je na razini mora
STR_0290_DELETE :{BLACK}Obriši
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Obriši ovaj grad u cjelosti
STR_0292_SAVE_SCENARIO :Spremi scenarij
@@ -1169,7 +1168,6 @@
STR_TREES_RANDOM_TYPE_TIP :{BLACK}Stavi drveće nasumiÄnog tipa
STR_CANT_BUILD_CANALS :{WHITE}Ovdje ne možeš graditi kanale...
-STR_BUILD_CANALS_TIP :{BLACK}Izgradi kanale. Pritisni CTRL kako bi smjestio vodene ploÄice (samo na razini mora).
STR_LANDINFO_CANAL :Kanal
--- a/src/lang/unfinished/greek.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/unfinished/greek.txt Mon Mar 26 22:15:38 2007 +0000
@@ -111,9 +111,44 @@
STR_QUANTITY_COLA :{VOLUME} κόλας
STR_QUANTITY_CANDYFLOSS :{WEIGHT} μαλλί της γÏιάς
STR_QUANTITY_BUBBLES :{COMMA} φυσαλίδ{P α ες}
+STR_QUANTITY_TOFFEE :{WEIGHT} τόφυ
STR_QUANTITY_BATTERIES :{COMMA} μπαταÏί{P α ες}
STR_QUANTITY_PLASTIC :{VOLUME} πλαστικοÏ
STR_QUANTITY_FIZZY_DRINKS :{COMMA} αναψυκτικ{P ό ά}
+STR_ABBREV_NOTHING :
+STR_ABBREV_PASSENGERS :{TINYFONT}PS
+STR_ABBREV_COAL :{TINYFONT}CL
+STR_ABBREV_MAIL :{TINYFONT}ML
+STR_ABBREV_OIL :{TINYFONT}OL
+STR_ABBREV_LIVESTOCK :{TINYFONT}LV
+STR_ABBREV_GOODS :{TINYFONT}GD
+STR_ABBREV_GRAIN :{TINYFONT}GR
+STR_ABBREV_WOOD :{TINYFONT}WD
+STR_ABBREV_IRON_ORE :{TINYFONT}OR
+STR_ABBREV_STEEL :{TINYFONT}ST
+STR_ABBREV_VALUABLES :{TINYFONT}VL
+STR_ABBREV_COPPER_ORE :{TINYFONT}CO
+STR_ABBREV_MAIZE :{TINYFONT}MZ
+STR_ABBREV_FRUIT :{TINYFONT}FT
+STR_ABBREV_DIAMONDS :{TINYFONT}DM
+STR_ABBREV_FOOD :{TINYFONT}FD
+STR_ABBREV_PAPER :{TINYFONT}PR
+STR_ABBREV_GOLD :{TINYFONT}GD
+STR_ABBREV_WATER :{TINYFONT}WR
+STR_ABBREV_WHEAT :{TINYFONT}WH
+STR_ABBREV_RUBBER :{TINYFONT}RB
+STR_ABBREV_SUGAR :{TINYFONT}SG
+STR_ABBREV_TOYS :{TINYFONT}TY
+STR_ABBREV_SWEETS :{TINYFONT}SW
+STR_ABBREV_COLA :{TINYFONT}CL
+STR_ABBREV_CANDYFLOSS :{TINYFONT}CF
+STR_ABBREV_BUBBLES :{TINYFONT}BU
+STR_ABBREV_TOFFEE :{TINYFONT}TF
+STR_ABBREV_BATTERIES :{TINYFONT}BA
+STR_ABBREV_PLASTIC :{TINYFONT}PL
+STR_ABBREV_FIZZY_DRINKS :{TINYFONT}FZ
+STR_ABBREV_NONE :{TINYFONT}NO
+STR_ABBREV_ALL :{TINYFONT}ALL
STR_00AE :{WHITE}{DATE_SHORT}
STR_00AF :{WHITE}{DATE_LONG}
STR_00B0_MAP :{WHITE}ΧάÏτης - {STRING}
@@ -242,6 +277,11 @@
STR_0133_WINDOWS :Windows
STR_0134_UNIX :Unix
STR_0135_OSX :OS X
+STR_OSNAME_BEOS :BeOS
+STR_OSNAME_MORPHOS :MorphOS
+STR_OSNAME_AMIGAOS :AmigaOS
+STR_OSNAME_OS2 :OS/2
+STR_OSNAME_SUNOS :SunOS
STR_013B_OWNED_BY :{WHITE}...ιδιοκτησία του {STRING}
STR_013C_CARGO :{BLACK}ΦοÏτίο
@@ -252,10 +292,12 @@
STR_CAPACITY_MULT :{BLACK}ΧωÏιτηκότητα: {LTBLUE}{CARGO} (x{NUM})
STR_013F_TOTAL_CAPACITY_TEXT :{BLACK}Συνολική χωÏητικότητα φοÏτίου του Ï„Ïαίνου:
STR_013F_TOTAL_CAPACITY :{LTBLUE}- {CARGO} ({SHORTCARGO})
+STR_TOTAL_CAPACITY_MULT :{LTBLUE}- {CARGO} ({SHORTCARGO}) (x{NUM})
STR_0140_NEW_GAME :{BLACK}ÎÎο Παιχνίδι
STR_0141_LOAD_GAME :{BLACK}ΦόÏτωση ΠαιχνιδιοÏ
STR_SINGLE_PLAYER :{BLACK}Ένας παίκτης
STR_MULTIPLAYER :{BLACK}Πολοί παίκτες
+STR_SCENARIO_EDITOR :{BLACK}ΔιαμόÏφωση ΣεναÏίου
STR_64 :64
STR_128 :128
@@ -264,6 +306,7 @@
STR_1024 :1024
STR_2048 :2048
STR_MAPSIZE :{BLACK}Διάσταση χάÏτη:
+STR_BY :{BLACK}*
STR_0148_GAME_OPTIONS :{BLACK}ΕπιλογÎÏ‚ ΠαιχνιδιοÏ
STR_0150_SOMEONE :κάποιος{SKIP}{SKIP}
@@ -271,14 +314,37 @@
STR_0152_TOWN_DIRECTORY :Κατάλογος Πόλεων
STR_0153_SUBSIDIES :ΕπιχοÏηγήσεις
-
-STR_UNITS_VELOCITY_METRIC :{COMMA} χλμ/ÏŽÏα
-
+STR_UNITS_IMPERIAL :ΑυτοκÏατοÏικό
+STR_UNITS_METRIC :ΜετÏικό
+STR_UNITS_SI :SI
-
+STR_UNITS_VELOCITY_IMPERIAL :{COMMA} μαω
+STR_UNITS_VELOCITY_METRIC :{COMMA} χλμ/ÏŽÏα
+STR_UNITS_VELOCITY_SI :{COMMA} μ/δ
+STR_UNITS_POWER_IMPERIAL :{COMMA}hp
+STR_UNITS_POWER_METRIC :{COMMA}hp
+STR_UNITS_POWER_SI :{COMMA}kW
+STR_UNITS_WEIGHT_SHORT_IMPERIAL :{COMMA}t
+STR_UNITS_WEIGHT_SHORT_METRIC :{COMMA}t
+STR_UNITS_WEIGHT_SHORT_SI :{COMMA}kg
+STR_UNITS_WEIGHT_LONG_IMPERIAL :{COMMA} τονος{P "" s}
+STR_UNITS_WEIGHT_LONG_METRIC :{COMMA} τόνοι{P "" s}
+STR_UNITS_WEIGHT_LONG_SI :{COMMA} kg
+
+STR_UNITS_VOLUME_SHORT_IMPERIAL :{COMMA}γαλ
+STR_UNITS_VOLUME_SHORT_METRIC :{COMMA}λ
+STR_UNITS_VOLUME_SHORT_SI :{COMMA}m³
+
+STR_UNITS_VOLUME_LONG_IMPERIAL :{COMMA} γαλλόνι{P "" s}
+STR_UNITS_VOLUME_LONG_METRIC :{COMMA} λίτÏα{P "" s}
+STR_UNITS_VOLUME_LONG_SI :{COMMA} m³
+
+STR_UNITS_FORCE_IMPERIAL :{COMMA}x10³ lbf
+STR_UNITS_FORCE_METRIC :{COMMA} δÏναμη τόνου
+STR_UNITS_FORCE_SI :{COMMA} kN
############ range for menu starts
STR_0154_OPERATING_PROFIT_GRAPH :ΓÏάφημα λειτουÏÎ³Î¹ÎºÎ¿Ï ÎºÎÏδους
@@ -288,6 +354,7 @@
STR_0158_COMPANY_VALUE_GRAPH :ΓÏάφημα εταιÏικής αξίας
STR_0159_CARGO_PAYMENT_RATES :Ποσοστά πληÏωμής φοÏτίου
STR_015A_COMPANY_LEAGUE_TABLE :Πίνακας κατάταξης επιχείÏησης
+STR_PERFORMANCE_DETAIL_MENU :ΛεπτομεÏής εκτίμηση απόδοσης
############ range for menu ends
STR_015B_OPENTTD :{WHITE}Σχετικά με το OpenTTD
@@ -295,10 +362,16 @@
STR_015D_LOAD_GAME :ΦόÏτωση παιχνιδιοÏ
STR_015E_QUIT_GAME :ΠαÏαίτηση από το παιχνίδι
STR_015F_QUIT :Έξοδος
+STR_ABANDON_GAME_QUERY :{YELLOW}Είστε σίγουÏος ότι θÎλετε να εγκαταλείψετε το παιχνίδι;
STR_0161_QUIT_GAME :{WHITE}ΠαÏαίτηση από το Παιχνίδι
+STR_SORT_ORDER_TIP :{BLACK}Επιλογή σειÏάς ταξινόμησης (καθοδικά/ανοδικά)
+STR_SORT_CRITERIA_TIP :{BLACK}Επιλογή κÏιτηÏίου ταξινόμησης
+STR_SORT_BY :{BLACK}Ταξινόμηση κατά
+STR_SORT_BY_POPULATION :{BLACK}Πληθυσμός
STR_SORT_BY_PRODUCTION :{BLACK}ΠαÏαγωγή
STR_SORT_BY_TYPE :{BLACK}ΤÏπος
+STR_SORT_BY_TRANSPORTED :{BLACK}ΜεταφÎÏθηκαν
STR_SORT_BY_NAME :{BLACK}Όνομα
STR_SORT_BY_DROPDOWN_NAME :Όνομα
STR_SORT_BY_DATE :{BLACK}ÎœÎÏα
@@ -307,13 +380,29 @@
STR_SORT_BY_PROFIT_THIS_YEAR :ΚÎÏδος Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… χÏόνου
STR_SORT_BY_AGE :Ηλικία
STR_SORT_BY_RELIABILITY :αξιοπιστία
+STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE :Συνολική χωÏητικότητα ανά Ï„Ïπο φοÏτίου
STR_SORT_BY_MAX_SPEED :ÎœÎγιστη ταχÏτητα
STR_SORT_BY_MODEL :ΜοντÎλο
STR_SORT_BY_VALUE :Αξία
STR_SORT_BY_FACILITY :ΤÏπος σταθμοÏ
+STR_SORT_BY_WAITING :Αξία φοÏτίου σε αναμονή
+STR_SORT_BY_RATING_MAX :Εκτίμηση φοÏτίου
+STR_ENGINE_SORT_ENGINE_ID :EngineID (κλασσική ταξινόμηση)
STR_ENGINE_SORT_COST :Κόστος
STR_ENGINE_SORT_POWER :ΔÏναμη
+STR_ENGINE_SORT_INTRO_DATE :ΗμÎÏα ΚυκλοφοÏίας
+STR_ENGINE_SORT_RUNNING_COST :Κόστος ΣυντήÏησης
+STR_ENGINE_SORT_POWER_VS_RUNNING_COST :ΔÏναμη/Κόστος ΣυντήÏησης
+STR_ENGINE_SORT_CARGO_CAPACITY :ΧωÏητικότητα ΦοÏτίου
STR_NO_WAITING_CARGO :{BLACK}ΚανÎνα εμπόÏευμα κανενός Ï„Ïπου δεν πεÏιμÎνει
+STR_SELECT_ALL_FACILITIES :{BLACK}Επιλογή όλων των εγκαταστάσεων
+STR_SELECT_ALL_TYPES :{BLACK}Επιλογή όλων των Ï„Ïπων φοÏτίου (συμπεÏιλαμβανομÎνου φοÏτίου μη-αναμονής)
+STR_AVAILABLE_TRAINS :{BLACK}ΔιαθÎσιμα ΤÏÎνα
+STR_AVAILABLE_ROAD_VEHICLES :{BLACK}ΔιαθÎσιμα Οχήματα
+STR_AVAILABLE_SHIPS :{BLACK}ΔιαθÎσιμα Πλοία
+STR_AVAILABLE_AIRCRAFT :{BLACK}ΔιαθÎσιμα ΑεÏοσκάφη
+STR_AVAILABLE_ENGINES_TIP :{BLACK}Î Ïοβολή λίστας διαθÎσιμων σχεδίων μηχανών για τον Ï„Ïπο οχήματος.
+STR_MANAGE_LIST :{BLACK}ΔιαχείÏιση λίστας
STR_MANAGE_LIST_TIP :{BLACK}Στείλε οδηγίες σε όλα τα οχήματα σε αυτή λίστα
STR_REPLACE_VEHICLES :ΑντικατÎστησε τα οχήματα
STR_SEND_TRAIN_TO_DEPOT :Στείλε στο υπόστεγο
@@ -368,10 +457,14 @@
STR_018A_CAN_T_CHANGE_SERVICING :{WHITE}Δεν μποÏεί να αλλάξει το διάστημα της συντήÏησης...
STR_018B_CLOSE_WINDOW :{BLACK}Κλείσιμο παÏαθÏÏου
STR_018C_WINDOW_TITLE_DRAG_THIS :{BLACK}Τίτλος παÏαθÏÏου - σÏÏετε για να το μετακινήσετε
+STR_STICKY_BUTTON :{BLACK}Σημείωση Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… παÏαθÏÏου να μην κλείνει από το πλήκτÏο 'Κλείσιμο ΠαÏαθÏÏων'
+STR_RESIZE_BUTTON :{BLACK}Κάντε κλίκ και σÏÏετε για να αλλάξετε το μÎγεθος του παÏαθÏÏου
+STR_SAVELOAD_HOME_BUTTON :{BLACK}Κάντε κλίκ εδώ για να πάτε στον Ï„ÏÎχων φάκελλο αποθήκευσης
STR_018D_DEMOLISH_BUILDINGS_ETC :{BLACK}Κατεδάφιση των κτηÏίων κ.λπ. σε Îνα τετÏάγωνο εδάφους
STR_018E_LOWER_A_CORNER_OF_LAND :{BLACK}Χαμηλώστε μια γωνία του εδάφους
STR_018F_RAISE_A_CORNER_OF_LAND :{BLACK}Ανυψώστε μια γωνία του εδάφους
STR_0190_SCROLL_BAR_SCROLLS_LIST :{BLACK}ΜπάÏα ΚÏλισης - μετακινεί την λίστα πάνω/κάτω
+STR_HSCROLL_BAR_SCROLLS_LIST :{BLACK}ΜπάÏα κίνησης - κινεί τη λίστα αÏιστεÏά/δεξιά
STR_0191_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Εμφάνιση πεÏιγÏαμμάτων εδάφους στο χάÏτη
STR_0192_SHOW_VEHICLES_ON_MAP :{BLACK}Εμφάνιση οχημάτων στο χάÏτη
STR_0193_SHOW_INDUSTRIES_ON_MAP :{BLACK}Εμφάνιση βιομηχανιών στο χάÏτη
@@ -483,6 +576,7 @@
STR_01F8_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}ΚαθαÏισμός Ï„ÏÎχοντος Ï€ÏογÏάμματος (Î ÏοσαÏμοσμÎνο1 ή Î ÏοσαÏμοσμÎνο2 μόνο)
STR_01F9_SAVE_MUSIC_SETTINGS :{BLACK}Αποθήκευση επιλογών μουσικής
STR_01FA_CLICK_ON_MUSIC_TRACK_TO :{BLACK}Κάντε κλίκ στο μουσικό κομμάτι για Ï€Ïοσθήκη στο Ï„ÏÎχον Ï€ÏόγÏαμμα (Î ÏοσαÏμοσμÎνο1 ή Î ÏοσαÏμοσμÎνο2 μόνο)
+STR_CLICK_ON_TRACK_TO_REMOVE :{BLACK}Κάντε κλικ στο Ï„ÏαγοÏδι για να το αφαιÏÎσετε από το Ï€ÏόγÏαμμα (Î ÏοσαÏμοσμÎνο 1 ή 2 μόνο)
STR_01FB_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Εναλλαγή τυχαίας αναπαÏαγωγής on/off στο Ï€ÏόγÏαμμα
STR_01FC_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Εμφάνιση παÏαθÏÏου επιλογής Î¼Î¿Ï…ÏƒÎ¹ÎºÎ¿Ï ÎºÎ¿Î¼Î¼Î±Ï„Î¹Î¿Ï
STR_01FD_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Κάντε κλίκ στην υπηÏεσία για κεντÏάÏισμα στην βιομηχανία/πόλη
@@ -497,14 +591,18 @@
STR_0207_ARRIVAL_OF_FIRST_VEHICLE :{YELLOW}Άφιξη του Ï€Ïώτου οχήματος το σταθμό του αντιπάλου
STR_0208_ACCIDENTS_DISASTERS :{YELLOW}Ατυχήματα / καταστÏοφÎÏ‚
STR_0209_COMPANY_INFORMATION :{YELLOW}ΠληÏοφοÏίες εταιÏείας
+STR_NEWS_OPEN_CLOSE :{YELLOW}Άνοιγμα / κλείσιμο των βιομηχανιών
STR_020A_ECONOMY_CHANGES :{YELLOW}ΟικονομικÎÏ‚ αλλαγÎÏ‚
STR_020B_ADVICE_INFORMATION_ON_PLAYER :{YELLOW}ΣυμβουλÎÏ‚ / πληÏοφοÏίες για τα οχήματα του παίκτη
STR_020C_NEW_VEHICLES :{YELLOW}ÎÎα οχήματα
STR_020D_CHANGES_OF_CARGO_ACCEPTANCE :{YELLOW}ΑλλαγÎÏ‚ στην αποδοχή φοÏτίου
STR_020E_SUBSIDIES :{YELLOW}ΕπιχοÏηγήσεις
STR_020F_GENERAL_INFORMATION :{YELLOW}ΓενικÎÏ‚ πληÏοφοÏίες
+STR_MESSAGES_ALL :{YELLOW}ΡÏθμιση όλων των μηνυμάτων σε: Κλειστά / ΠεÏιγÏαφή / ΟλόκληÏα
+STR_MESSAGE_SOUND :{YELLOW}ΑναπαÏαγωγή ήχου για μηνÏματα σε πεÏιγÏαφή
STR_0210_TOO_FAR_FROM_PREVIOUS_DESTINATIO :{WHITE}...Ï€Î¿Î»Ï Î¼Î±ÎºÏιά από τον Ï€ÏοηγοÏμενο Ï€ÏοοÏισμό
STR_0211_TOP_COMPANIES_WHO_REACHED :{BIGFONT}{BLACK}Οι καλÏτεÏες εταιÏείες που Îφτασαν το {NUM}{}({STRING} Επίπεδο)
+STR_TOP_COMPANIES_NETWORK_GAME :{BIGFONT}{BLACK}Πίνακας Î Ïωταθλήματος ΕταιÏειών σε {NUM}
STR_0212 :{BIGFONT}{COMMA},
STR_0213_BUSINESSMAN :Επαγγελματίας
STR_0214_ENTREPRENEUR :ΕπιχειÏηματίας
@@ -528,6 +626,8 @@
STR_022A_GENERATE_RANDOM_LAND :{BLACK}ΔημιουÏγία τυχαίου εδάφους
STR_022B_RESET_LANDSCAPE :{BLACK}ΕπαναφοÏά τοπίου
STR_022C_RESET_LANDSCAPE :{WHITE}ΕπαναφοÏά Τοπίου
+STR_RESET_LANDSCAPE_TOOLTIP :{BLACK}ΑφαίÏεση όλων των ιδιοκτησιών παικτών από το χάÏτη
+STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Είστε σίγουÏος ότι θÎλετε να αφαιÏÎσετε όλες τις ιδιοκτησίες παικτών;
STR_022E_LANDSCAPE_GENERATION :{BLACK}ΔημιουÏγία τοπίου
STR_022F_TOWN_GENERATION :{BLACK}ΔημιουÏγία πόλης
STR_0230_INDUSTRY_GENERATION :{BLACK}ΔημιουÏγία Βιομηχανίας
@@ -540,6 +640,7 @@
STR_0238_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}...Ï€Î¿Î»Ï ÎºÎ¿Î½Ï„Î¬ σε άλλη πόλη
STR_0239_SITE_UNSUITABLE :{WHITE}...ακατάλληλη πεÏιοχή
STR_023A_TOO_MANY_TOWNS :{WHITE}...πάÏα πολλÎÏ‚ πόλεις
+STR_CANNOT_GENERATE_TOWN :{WHITE}ΑδÏνατο να χτιστοÏν πόλεις
STR_NO_SPACE_FOR_TOWN :{WHITE}...δεν υπάÏχει αλλος χώÏος στον χάÏτη
STR_023B_INCREASE_SIZE_OF_TOWN :{BLACK}ΑÏξηση μεγÎθους πόλεως
STR_023C_EXPAND :{BLACK}ΕπÎκταση
@@ -630,6 +731,7 @@
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}ΠλήÏης διαγÏαφή πόλεως
STR_0292_SAVE_SCENARIO :Απποθήκευση σεναÏίου
STR_0293_LOAD_SCENARIO :ΦόÏτωση σεναÏίου
+STR_LOAD_HEIGHTMAP :ΦόÏτωση heightmap
STR_0294_QUIT_EDITOR :Έξοδος από το Ï€ÏόγÏαμμα επεξεÏγασίας
STR_0295 :
STR_0296_QUIT :Έξοδος
@@ -637,6 +739,8 @@
STR_0298_LOAD_SCENARIO :{WHITE}ΦόÏτωση ΣεναÏίου
STR_0299_SAVE_SCENARIO :{WHITE}Αποθήκευση ΣεναÏίου
STR_029A_PLAY_SCENARIO :{BLACK}Παιξτε το ΣενάÏιο
+STR_PLAY_HEIGHTMAP :{BLACK}Παίξτε Heightmap
+STR_PLAY_HEIGHTMAP_HINT :{BLACK}Εκκίνηση νÎου παιχνιδιοÏ, χÏησιμοποιώντας heightmap για χάÏτη
STR_QUIT_SCENARIO_QUERY :{YELLOW}Είστε σίγουÏοι οτι θÎλετε ναφÏγετε από το πίστα;
STR_029C_QUIT_EDITOR :{WHITE}Έξοδος από το Î ÏόγÏαμμα ΕπεξεÏγασίας
STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...μποÏεί να χτιστεί μόνο σε πόλεις με πληθυσμό άνω των 1200
@@ -651,6 +755,9 @@
STR_02B6 :{STRING} - {STRING}
STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS :{BLACK}Εμφάνιση τελευταίου μηνÏματος ή αναφοÏάς νÎων
+STR_OFF :Κλειστό
+STR_SUMMARY :ΠεÏιγÏαφή
+STR_FULL :ΟλόκληÏο
STR_02BA :{SILVER}- - {COMPANY} - -
STR_02BB_TOWN_DIRECTORY :Καταλογος πόλεων
STR_02BC_VEHICLE_DESIGN_NAMES :{BLACK}Ονόματα σχεδίων οχημάτων
@@ -661,13 +768,17 @@
STR_02C1_VEHICLE_DESIGN_NAMES_SELECTION :{BLACK}Επιλογή ονομάτων σχεδίασης οχημάτων
STR_02C2_SAVE_CUSTOMIZED_VEHICLE :{BLACK}Αποθήκευση Ï€ÏοσαÏμοσμÎνων ονομάτων σχεδίασης οχημάτων
+STR_CHECKMARK :{CHECKMARK}
############ range for menu starts
STR_02C3_GAME_OPTIONS :ΕπιλογÎÏ‚ παιχνιδιοÏ
STR_02C5_DIFFICULTY_SETTINGS :Ρυθμίσεις δυσκολίας
STR_02C7_CONFIG_PATCHES :ΡÏθμιση διοÏθώσεων
+STR_NEWGRF_SETTINGS :Ρυθμίσεις NewGRF
+STR_GAMEOPTMENU_0A :
STR_02CA_TOWN_NAMES_DISPLAYED :{SETX 12}Ονόματα πόλεων που εμφανίζονται
STR_02CC_STATION_NAMES_DISPLAYED :{SETX 12}Ονόματα σταθμών που εμφανίζονται
STR_02CE_SIGNS_DISPLAYED :{SETX 12}Πινακίδες που εμφανίζονται
+STR_WAYPOINTS_DISPLAYED2 :{SETX 12}Εμφάνιση σημείων διαδÏομής
STR_02D0_FULL_ANIMATION :{SETX 12}ΠλήÏες animation
STR_02D2_FULL_DETAIL :{SETX 12}ΠλήÏης λεπτομÎÏεια
STR_02D4_TRANSPARENT_BUILDINGS :{SETX 12}Διαφανή κτίÏια
@@ -677,6 +788,7 @@
############ range for menu starts
STR_02D5_LAND_BLOCK_INFO :ΠληÏοφοÏίες πεÏιοχής εδάφους
STR_02D6 :
+STR_CONSOLE_SETTING :Ενναλαγή Κονσόλας
STR_02D7_SCREENSHOT_CTRL_S :ΦωτογÏαφία εικόνας (Ctrl-S)
STR_02D8_GIANT_SCREENSHOT_CTRL_G :Γιγαντιαία ΦωτογÏαφία Εικόνας (Ctrl-G)
STR_02D9_ABOUT_OPENTTD :Σχετικά με το 'OpenTTD'
@@ -687,13 +799,22 @@
STR_02DC_DISPLAY_SUBSIDIES :{BLACK}Εμφάνιση χÏηματοδοτήσεων
STR_02DD_SUBSIDIES :ΧÏηματοδοτήσεις
STR_02DE_MAP_OF_WORLD :ΧάÏτης του κόσμου
+STR_EXTRA_VIEW_PORT :Î Ïόσθετη εμφάνιση
STR_SIGN_LIST :Λίστα ταμπελών
STR_02DF_TOWN_DIRECTORY :Κατάλογος πόλεων
+STR_TOWN_POPULATION :{BLACK}Παγκόσμιος πληθυσμός: {COMMA}
+STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Εμφάνιση {COMMA}
+STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}ΑντιγÏαφή στην εμφάνιση
+STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}ΑντιγÏαφή της πεÏιοχής της παγκόσμιας Ï€Ïοβολής σε αυτή την εμφάνιση
+STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Επικόλληση από εμφάνιση
+STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Επικόλληση της πεÏιοχής αυτής της εμφάνισης στην παγκόσμια Ï€Ïοβολή
STR_02E0_CURRENCY_UNITS :{BLACK}ÎομισματικÎÏ‚ μονάδες
STR_02E1 :{BLACK}{SKIP}{STRING}
STR_02E2_CURRENCY_UNITS_SELECTION :{BLACK}Επιλογή νομισματικών μονάδων
+STR_MEASURING_UNITS :{BLACK}Μονάδες μÎÏ„Ïησης
STR_02E4 :{BLACK}{SKIP}{SKIP}{STRING}
+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}Επιλογή πλευÏάς δÏόμου όπου τα οχήματα οδηγοÏν
@@ -729,10 +850,12 @@
STR_0312_FUND_CONSTRUCTION_OF_NEW :{BLACK}ΧÏηματοδοτήστε την κατασκευή νÎας βιομηχανίας
############ range for menu starts
+STR_INDUSTRY_DIR :Κατάλογος Βιομηχανιών
STR_0313_FUND_NEW_INDUSTRY :ΧÏηματοδότηση νÎας βιομηχανίας
############ range ends here
STR_0314_FUND_NEW_INDUSTRY :{WHITE}ΧÏηματοδότηση νÎας βιομηχανίας
+STR_JUST_STRING :{STRING}
STR_0316_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}...μποÏεί να χτιστεί μόνο σε πόλεις
STR_0317_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}...μποÏεί να χτιστεί μόνο σε δασώδεις πεÏιοχÎÏ‚
STR_0318_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}...μποÏεί να χτιστεί μόνο σε πεÏιοχÎÏ‚ με ÎÏημο
@@ -743,19 +866,70 @@
STR_0329_PURCHASE_LAND_FOR_FUTURE :{BLACK}ΑγοÏά γης για μελλοντική χÏήση
STR_032F_AUTOSAVE :{RED}ΑΥΤΟΜΑΤΗ ΑΠΟΘΗΚΕΥΣΗ
+STR_SAVING_GAME :{RED}* * ΑΠΟΘΗΚΕΥΣΗ ΠΑΙΧÎΙΔΙΟΥ * *
+STR_SAVE_STILL_IN_PROGRESS :{WHITE}Η αποθήκευση είναι σε εξÎλιξη,{}παÏακαλώ πεÏιμÎνετε να τελειώσει!
STR_0330_SELECT_EZY_STREET_STYLE :{BLACK}Επιλογή Ï€ÏογÏάμματος 'Ezy Street στυλ μουσικής'
STR_0335_6 :{BLACK}6
STR_0336_7 :{BLACK}7
############ start of townname region
+STR_TOWNNAME_ORIGINAL_ENGLISH :Αγγλικά (Αυθεντικά)
+STR_TOWNNAME_FRENCH :Γαλλικά
+STR_TOWNNAME_GERMAN :ΓεÏμανικά
+STR_TOWNNAME_ADDITIONAL_ENGLISH :Αγγλικά (Î Ïόσθετα)
+STR_TOWNNAME_LATIN_AMERICAN :ΛατινοαμεÏικάνικα
+STR_TOWNNAME_SILLY :Αστεία
+STR_TOWNNAME_SWEDISH :Σουηδικά
+STR_TOWNNAME_DUTCH :Ολλανδικά
+STR_TOWNNAME_FINNISH :Φινλανδικά
+STR_TOWNNAME_POLISH :Πολωνικά
+STR_TOWNNAME_SLOVAKISH :Σλοβάκικα
+STR_TOWNNAME_NORWEGIAN :ÎοÏβηγικά
+STR_TOWNNAME_HUNGARIAN :ΌυγγαÏικά
+STR_TOWNNAME_AUSTRIAN :ΑυστÏιακά
+STR_TOWNNAME_ROMANIAN :Ρουμάνικα
+STR_TOWNNAME_CZECH :ΤσÎχικα
+STR_TOWNNAME_SWISS :Ελβετικά
+STR_TOWNNAME_DANISH :ΔανÎζικα
+STR_TOWNNAME_TURKISH :ΤοÏÏκικα
+STR_TOWNNAME_ITALIAN :Ιταλικά
+STR_TOWNNAME_CATALAN :Καταλανικά
############ end of townname region
STR_CURR_GBP :Αγγλική ΛίÏα (£)
+STR_CURR_USD :ΔολλάÏια ($)
+STR_CURR_EUR :ΕυÏÏŽ (€)
+STR_CURR_YEN :Γιεν (¥)
+STR_CURR_ATS :ΑυστÏαικό Σελίνι (ATS)
+STR_CURR_BEF :Βελγικό ΦÏάγκο (BEF)
+STR_CURR_CHF :Ελβετικό ΦÏάγκο (CHF)
+STR_CURR_CZK :ΤσÎχικη ΚοÏώνα (CZK)
+STR_CURR_DEM :ΓεÏμανικό ΜάÏκο (DEM)
+STR_CURR_DKK :ΔανÎζικη ΚοÏώνα (DKK)
+STR_CURR_ESP :ΠεσÎτα (ESP)
+STR_CURR_FIM :Φινλανδικό ΜάÏκο (FIM)
+STR_CURR_FRF :ΦÏάγκο (FRF)
STR_CURR_GRD :ΔÏαχμή(δÏχ.)
+STR_CURR_HUF :ΟυγγÏικό ΦλουÏί (HUF)
+STR_CURR_ISK :Ισλανδική ΚοÏώνα (ISK)
+STR_CURR_ITL :Ιταλική ΛίÏα (ITL)
+STR_CURR_NLG :Ολλανδικό ΦιοÏίνι (NLG)
+STR_CURR_NOK :ÎοÏβηγική ΚοÏώνα (NOK)
+STR_CURR_PLN :Πολωνικό Zloty (PLN)
+STR_CURR_ROL :Ρουμάνικο Λευ (ROL)
+STR_CURR_RUR :Ρώσσικες ΡοÏβλες (RUR)
+STR_CURR_SIT :ΣλοβÎνικο Tolar (SIT)
+STR_CURR_SEK :Σουηδική ΚοÏώνα (SEK)
+STR_CURR_YTL :ΤοÏÏκικη ΛίÏα (YTL)
+STR_CURR_SKK :Σλοβάκικη ΚοÏώνα (SKK)
+STR_CURR_BRR :Î’Ïαζιλιάνικο Real (BRL)
+STR_CURR_CUSTOM :Άλλο...
+STR_OPTIONS_LANG :{BLACK}Γλώσσα
STR_OPTIONS_LANG_CBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
+STR_OPTIONS_LANG_TIP :{BLACK}Επιλογή της γλώσσας σε χÏήση
STR_OPTIONS_FULLSCREEN :{BLACK}Σε όλη την οθόνη
STR_OPTIONS_FULLSCREEN_TIP :{BLACK}ΤσεκάÏεται αυτό το κουτάκι ωστε να παίξετε το OpenTTD σε όλη την οθόνη
@@ -764,7 +938,9 @@
STR_OPTIONS_RES_CBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
STR_OPTIONS_RES_TIP :{BLACK}ΔιαλÎξτε την ανάλυση της οθόνης που θÎλετε
+STR_OPTIONS_SCREENSHOT_FORMAT :{BLACK}ΔιαμόÏφωση φωτογÏαφίας
STR_OPTIONS_SCREENSHOT_FORMAT_CBO :{BLACK}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{SKIP}{STRING}
+STR_OPTIONS_SCREENSHOT_FORMAT_TIP :{BLACK}Επιλογή της διαμόÏφωσης της φωτογÏαφίας σε χÏήση
STR_AUTOSAVE_1_MONTH :Κάθε μήνα
STR_AUTOSAVE_FAILED :{WHITE}Το αυτόματο σώσιμο απÎτυχε
@@ -791,55 +967,189 @@
STR_BAGS :Τσάντες
STR_TONS :Τόνοι
STR_LITERS :ΛίτÏα
+STR_ITEMS :αντικείμενα
STR_CRATES :Κουτιά
STR_RES_OTHER :άλλα
STR_NOTHING :
STR_SMALL_RIGHT_ARROW :{TINYFONT}{RIGHTARROW}
+STR_CANT_SHARE_ORDER_LIST :{WHITE}ΑδÏνατο να μοιÏαστεί η λίστα οδηγιών...
+STR_CANT_COPY_ORDER_LIST :{WHITE}ΑδÏνατο να αντιγÏαφεί η λίστα οδηγιών...
+STR_END_OF_SHARED_ORDERS :{SETX 10}- - ΤÎλος ΜοιÏασμÎνων Οδηγιών - -
STR_TRAIN_IS_LOST :{WHITE}Το Ï„Ïαίνο {COMMA} Χάθηκε
+STR_TRAIN_IS_UNPROFITABLE :{WHITE}Τα κÎÏδη του ΤÏÎνου {COMMA}το Ï€ÏοηγοÏμενο Îτος ήταν {CURRENCY}
+STR_EURO_INTRODUCE :{BLACK}{BIGFONT}ΕυÏωπαϊκή Οικονομική Ένωση!{}{}Το ΕυÏÏŽ είναι πλÎον το μοναδικό νόμισμα για τις καθημεÏινÎÏ‚ συναλλαγÎÏ‚ στην χώÏα σας!
# Start of order review system.
# DON'T ADD OR REMOVE LINES HERE
STR_TRAIN_HAS_TOO_FEW_ORDERS :{WHITE}Το Ï„Ïαίνο {COMMA} Îχει τόσες λίγες οδηγίες
+STR_TRAIN_HAS_VOID_ORDER :{WHITE}Το Ï„ÏÎνο {COMMA} Îχει κενÎÏ‚ εντολÎÏ‚
+STR_TRAIN_HAS_DUPLICATE_ENTRY :{WHITE}Το Ï„ÏÎνο {COMMA} Îχει διπλÎÏ‚ εντολÎÏ‚
+STR_TRAIN_HAS_INVALID_ENTRY :{WHITE}Το Ï„ÏÎνο {COMMA} Îχει Îναν λανθασμÎνο σταθμό στις οδηγίες του
STR_ROADVEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}Το Οδικό όχημα {COMMA} Îχει τόσες λίγες οδηγίες
+STR_ROADVEHICLE_HAS_VOID_ORDER :{WHITE}Το Όχημα {COMMA} Îχει μία κενή εντολή
+STR_ROADVEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}Το Όχημα {COMMA} Îχει διπλÎÏ‚ εντολÎÏ‚
+STR_ROADVEHICLE_HAS_INVALID_ENTRY :{WHITE}Το Όχημα {COMMA} Îχε Îναν λανθασμÎνο σταθμό στις οδηγίες του
STR_SHIP_HAS_TOO_FEW_ORDERS :{WHITE}Το πλοίο {COMMA} Îχει τόσες λίγες οδηγίες
+STR_SHIP_HAS_VOID_ORDER :{WHITE}Το Πλοίο {COMMA} Îχει μία κενή οδηγία
+STR_SHIP_HAS_DUPLICATE_ENTRY :{WHITE}Το Πλοίο {COMMA} Îχει διπλÎÏ‚ οδηγίες
+STR_SHIP_HAS_INVALID_ENTRY :{WHITE}Το Πλοίο {COMMA} Îχει Îναν λανθασμÎνο σταθμό στις οδηγίες του
STR_AIRCRAFT_HAS_TOO_FEW_ORDERS :{WHITE}Το αεÏοσκάφος {COMMA} has too few orders in the schedule
+STR_AIRCRAFT_HAS_VOID_ORDER :{WHITE}Το ΑεÏοσκάφος {COMMA} Îχει μία κενή οδηγία
+STR_AIRCRAFT_HAS_DUPLICATE_ENTRY :{WHITE}Το ΑεÏοσκάφος {COMMA} Îχει διπλÎÏ‚ οδηγίες
+STR_AIRCRAFT_HAS_INVALID_ENTRY :{WHITE}Το ΑεÏοσκάφος {COMMA} Îχει Îνα λανθασμÎνο σταθμό στις οδηγίες του
# end of order system
-
-
-
+STR_TRAIN_AUTORENEW_FAILED :{WHITE}Η Αυτόματη ΑνανÎωση απÎτυχε στο Ï„ÏÎνο {COMMA} (χÏηματικό ÏŒÏιο)
+STR_ROADVEHICLE_AUTORENEW_FAILED :{WHITE}Η Αυτόματη ΑνανÎωση απÎτυχε στο όχημα {COMMA} (χÏηματικό ÏŒÏιο)
+STR_SHIP_AUTORENEW_FAILED :{WHITE}Η Αυτόματη ΑνανÎωση απÎτυχε στο πλοίο {COMMA} (χÏηματικό ÏŒÏιο)
+STR_AIRCRAFT_AUTORENEW_FAILED :{WHITE}Η Αυτόματη ΑνανÎωση απÎτυχε στο αεÏοσκάφος {COMMA} (χÏηματικό ÏŒÏιο)
+STR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}Το Ï„ÏÎνο {COMMA} είναι Ï€Î¿Î»Ï Î¼Î±ÎºÏÏ Î¼ÎµÏ„Î¬ την αντικατάσταση
+STR_CONFIG_PATCHES :{BLACK}ΡÏθμιση ΔιοÏθώσεων
+STR_CONFIG_PATCHES_TIP :{BLACK}ΡÏθμιση των ΔιοÏθώσεων
+STR_CONFIG_PATCHES_CAPTION :{WHITE}ΡÏθμιση ΔιοÏθώσεων
+
+STR_CONFIG_PATCHES_OFF :Κλειστό
+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_EXTRADYNAMITE :{LTBLUE}ΕπιτÏÎπεται η αφαίÏεση πεÏισσότεÏων ιδιοκτησιών πόλεων: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MAMMOTHTRAINS :{LTBLUE}ΕπιτÏÎπεται η δημιουÏγία Ï€Î¿Î»Ï Î¼Î±ÎºÏιών Ï„ÏÎνων: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_REALISTICACCEL :{LTBLUE}ΕνεÏγοποίηση Ïεαλιστικής επιτάχυνσης για τα Ï„ÏÎνα: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_FORBID_90_DEG :{LTBLUE}ΑπαγόÏευση στÏοφών 90 μοιÏών για Ï„ÏÎνα και πλοία: {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_LONGBRIDGES :{LTBLUE}ΕπιτÏÎπεται να χτίζονται Ï€Î¿Î»Ï Î¼Î±ÎºÏιÎÏ‚ γÎφυÏες: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_GOTODEPOT :{LTBLUE}ΕπιτÏÎπονται οι εντολÎÏ‚ αποστολής σε αμαξοστάσιο: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_BUILDXTRAIND :{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}TTDPatch συμβατός απ'ευθείας χειÏισμός: {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_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_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_OFF :όχι
+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_ERRMSG_DURATION :{LTBLUE}ΔιάÏκεια μηνÏματος σφάλματος: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_POPULATION_IN_LABEL :{LTBLUE}Εμφάνιση Ï€Î»Î·Î¸Ï…ÏƒÎ¼Î¿Ï Ï€ÏŒÎ»Î·Ï‚ στο όνομα της πόλης: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_INVISIBLE_TREES :{LTBLUE}ΑόÏατα δÎντÏα (με διαφανή κτίÏια): {ORANGE}{STRING}
+STR_CONFIG_PATCHES_LAND_GENERATOR :{LTBLUE}ΓεννήτÏια Γης: {ORANGE}{STRING}
STR_CONFIG_PATCHES_LAND_GENERATOR_ORIGINAL :Αυθεντικό
+STR_CONFIG_PATCHES_LAND_GENERATOR_TERRA_GENESIS :ΤεÏαΓÎνεση
+STR_CONFIG_PATCHES_OIL_REF_EDGE_DISTANCE :{LTBLUE}ÎœÎγιστη απόσταση από την άκÏη για τα ΔιυλιστήÏια {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SNOWLINE_HEIGHT :{LTBLUE}ΚοÏυφογÏαμμή χιονιοÏ: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN :{LTBLUE}ΣκληÏότητα επιφάνειας (ΤεÏαΓÎννεση μόνο) : {ORANGE}{STRING}
STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :Î Î¿Î»Ï Î±Ï€Î±Î»ÏŒÏ‚
STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN_SMOOTH :Απαλός
+STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN_ROUGH :ΣκληÏή
STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN_VERY_ROUGH :Î Î¿Î»Ï Î±Î½ÏŽÎ¼Î±Î»Î¿Ï‚
+STR_CONFIG_PATCHES_TREE_PLACER :{LTBLUE}ΑλγόÏιθμος τοποθÎτησης ΔÎντÏων: {ORANGE}{STRING}
STR_CONFIG_PATCHES_TREE_PLACER_NONE :ΚανÎνας
STR_CONFIG_PATCHES_TREE_PLACER_ORIGINAL :Αυθεντικό
STR_CONFIG_PATCHES_TREE_PLACER_IMPROVED :ΒελτιωμÎνος
+STR_CONFIG_PATCHES_HEIGHTMAP_ROTATION :{LTBLUE}ΠεÏιστÏοφή Heightmap: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :Αντίθετη ΦοÏά ΡολογιοÏ
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_REVERSE_SCROLLING :{LTBLUE}Ανάποδη μετακίνηση οθόνης: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_MEASURE_TOOLTIP :{LTBLUE}Εμφάνιση εÏγαλείου μετÏήσεως όταν χÏησιμοποιοÏνται διάφοÏα εÏγαλεία: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_LIVERIES :{LTBLUE}Εμφάνιση χÏωμάτων των εταιÏειών: {ORANGE}{STRING}
STR_CONFIG_PATCHES_LIVERIES_NONE :ΚανÎνας
+STR_CONFIG_PATCHES_LIVERIES_OWN :Η ΕταιÏεία μου
STR_CONFIG_PATCHES_LIVERIES_ALL :Όλες οι εταιÏίες
-
+STR_CONFIG_PATCHES_PREFER_TEAMCHAT :{LTBLUE}Î Ïοτίμηση Î¿Î¼Î±Î´Î¹ÎºÎ¿Ï chat με <ENTER>: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING :{LTBLUE}ΛειτουÏγία ÏοδÎλας κÏλισης: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SCROLLWHEEL_ZOOM :Zoom στο χάÏτη
+STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLL :Μετακίνηση στο χάÏτη
+STR_CONFIG_PATCHES_SCROLLWHEEL_OFF :Κλειστό
+STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER :{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}
+STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT :{LTBLUE}ΑπενεÏγοποίηση αεÏοσκαφών υπολογιστή: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_AI_BUILDS_SHIPS :{LTBLUE}ΑπενεÏγοποίηση πλοίων υπολογιστή: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_AINEW_ACTIVE :{LTBLUE}Ενεγοποίηση νÎας AI (alpha): {ORANGE}{STRING}
+STR_CONFIG_PATCHES_AI_IN_MULTIPLAYER :{LTBLUE}ΕπιτÏÎπονται οι AI σε παιχνίδι για πολλοÏÏ‚ παίκτες (πειÏαματικό): {ORANGE}{STRING}
+STR_CONFIG_PATCHES_SERVINT_TRAINS :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για Ï„ÏÎνα: {ORANGE}{STRING} μÎÏες/%
+STR_CONFIG_PATCHES_SERVINT_TRAINS_DISABLED :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για Ï„ÏÎνα: {ORANGE}απενεÏγοποιημÎνο
+STR_CONFIG_PATCHES_SERVINT_ROADVEH :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για οχήματα: {ORANGE}{STRING} μÎÏες/%
+STR_CONFIG_PATCHES_SERVINT_ROADVEH_DISABLED :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για οχήματα:: {ORANGE}απενεÏγοποιημÎνο
+STR_CONFIG_PATCHES_SERVINT_AIRCRAFT :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για αεÏοσκάφη: {ORANGE}{STRING} μÎÏες/%
+STR_CONFIG_PATCHES_SERVINT_AIRCRAFT_DISABLED :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για αεÏοσκάφη: {ORANGE}απενεÏγοποιημÎνο
+STR_CONFIG_PATCHES_SERVINT_SHIPS :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για πλοία: {ORANGE}{STRING} μÎÏες/%
+STR_CONFIG_PATCHES_SERVINT_SHIPS_DISABLED :{LTBLUE}Î ÏοεπιλεγμÎνο διάστημα επισκευών για πλοία: {ORANGE}απενεÏγοποιημÎνο
+STR_CONFIG_PATCHES_NOSERVICE :{LTBLUE}ΑπενεÏγοποίηση επισκευών όταν οι βλάβες είναι απενεÏγοποιημÎνες: {ORANGE}{STRING}
+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_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_DRAG_SIGNALS_DENSITY :{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 :ΚÎντÏο
STR_CONFIG_PATCHES_TOOLBAR_POS_RIGHT :Δεξιά
+STR_CONFIG_PATCHES_SNAP_RADIUS :{LTBLUE}Ακτίνα επικόλλησης παÏαθÏÏου: {ORANGE}{STRING} px
+STR_CONFIG_PATCHES_SNAP_RADIUS_DISABLED :{LTBLUE}Ακτίνα επικόλλησης παÏαθÏÏου: {ORANGE}απενεÏγοποιημÎνο
+STR_CONFIG_PATCHES_GUI :{BLACK}ΣÏστημα Διεπαφής
+STR_CONFIG_PATCHES_CONSTRUCTION :{BLACK}Κατασκευή
+STR_CONFIG_PATCHES_VEHICLES :{BLACK}Οχήματα
+STR_CONFIG_PATCHES_STATIONS :{BLACK}Σταθμοί
+STR_CONFIG_PATCHES_ECONOMY :{BLACK}Οικονομία
STR_CONFIG_PATCHES_AI :{BLACK}ΑνταγωνιστÎÏ‚
+STR_CONFIG_PATCHES_DISABLED :απενεÏγοποιημÎνο
STR_CONFIG_PATCHES_INT32 :{NUM}
STR_CONFIG_PATCHES_CURRENCY :{CURRENCY}
+STR_CONFIG_PATCHES_QUERY_CAPT :{WHITE}Αλλαγή τιμής ÏÏθμισης
+STR_CONFIG_PATCHES_SERVICE_INTERVAL_INCOMPATIBLE :{WHITE}Κάποια ή όλα τα Ï€ÏοεπιλεγμÎνα διαστήματα επισκευών παÏακάτω δεν είναι συμβατά με την επιλεγμÎνη ÏÏθμιση! 5-90% και 30-800 μÎÏες είναι τα αποδεκτά
+STR_CONFIG_PATCHES_YAPF_SHIPS :{LTBLUE}ΧÏησιμοποίηση YAPF για τα πλοία: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_YAPF_ROAD :{LTBLUE}ΧÏησιμοποίηση YAPF για τα οχήματα: {ORANGE}{STRING}
+STR_CONFIG_PATCHES_YAPF_RAIL :{LTBLUE}ΧÏησιμοποίηση YAPF για τα Ï„ÏÎνα: {ORANGE}{STRING}
STR_TEMPERATE_LANDSCAPE :ΣυγκÏατημÎνο τοπίο
STR_SUB_ARCTIC_LANDSCAPE :Πολικό τοπίο
@@ -847,19 +1157,48 @@
STR_TOYLAND_LANDSCAPE :Παιχνιδιάστικο τοπίο
STR_CHEATS :{WHITE}ΚλεψιÎÏ‚
+STR_CHEATS_TIP :{BLACK}Τα κουτάκια δείχνουν αν Îχετε χÏησιμοποιήσει αυτό το κόλπο Ï€Ïίν
+STR_CHEATS_WARNING :{BLACK}Î Ïοσοχή! Είστε Îτοιμος να Ï€Ïοδώσετε τους φίλους ανταγωνιστÎÏ‚ σας. Θυμηθείτε ότι αυτή η ντÏοπή θα μείνει για πάντα.
+STR_CHEAT_MONEY :{LTBLUE}ΑÏξηση χÏημάτων κατά {CURRENCY64}
+STR_CHEAT_CHANGE_PLAYER :{LTBLUE}Παίξτε σαν παίκτης: {ORANGE}{COMMA}
+STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Μαγική μπουλντόζα (αφαιÏεί βιομηχανίες, αμετακίνητα): {ORANGE}{STRING}
+STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Τα τοÏνελ διασταυÏώνονται: {ORANGE}{STRING}
+STR_CHEAT_BUILD_IN_PAUSE :{LTBLUE}Χτήσιμο ενώ βÏίσκεστε σε παÏση: {ORANGE}{STRING}
+STR_CHEAT_NO_JETCRASH :{LTBLUE}Τα Jet δεν θα συγκÏοÏονται (συχνά) σε μικÏά αεÏοδÏόμια: {ORANGE} {STRING}
+STR_CHEAT_SWITCH_CLIMATE :{LTBLUE}Αλλαγή κλίματος: {ORANGE} {STRING}
+STR_CHEAT_CHANGE_DATE :{LTBLUE}Αλλαγή ημ/νίας: {ORANGE} {DATE_SHORT}
+STR_CHEAT_SETUP_PROD :{LTBLUE}ΕνεÏγοποίηση δυνατότητας αλλαγής τιμών παÏαγωγής: {ORANGE}{STRING}
STR_HEADING_FOR_WAYPOINT :{LTBLUE}Καθ' οδόν {WAYPOINT}
+STR_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}ΠοÏεία Ï€Ïος {WAYPOINT}, {VELOCITY}
STR_GO_TO_WAYPOINT :Πήγαινε δια μÎσου {WAYPOINT}
-
+STR_GO_NON_STOP_TO_WAYPOINT :Πήγαινε χωÏίς στάση μÎσω {WAYPOINT}
+STR_WAYPOINTNAME_CITY :Σημείο ποÏείας {TOWN}
+STR_WAYPOINTNAME_CITY_SERIAL :Σημείο ποÏείας {TOWN} #{COMMA}
+STR_LANDINFO_WAYPOINT :Σημείο ποÏείας
+STR_WAYPOINT :{WHITE}Σημείο ποÏείας
+STR_WAYPOINT_GRAPHICS_TIP :{BLACK}Επιλογή Ï„Ïπου σημείου ποÏείας
+STR_WAYPOINT_VIEWPORT :{WHITE}{WAYPOINT}
+STR_WAYPOINT_VIEWPORT_TINY :{TINYFONT}{WHITE}{WAYPOINT}
+STR_WAYPOINT_RAW :{WAYPOINT}
+STR_EDIT_WAYPOINT_NAME :{WHITE}ΔιαμόÏφωση ονόματος σημείου ποÏείας
+STR_CANT_CHANGE_WAYPOINT_NAME :{WHITE}ΑδÏνατο να αλλαχτεί το όνομα του σημείου ποÏείας...
+STR_CONVERT_RAIL_TO_WAYPOINT_TIP :{BLACK}ΜετατÏοπή γÏαμμής σε σημείο ποÏείας
+STR_CANT_BUILD_TRAIN_WAYPOINT :{WHITE}ΑδÏνατο να χτιστεί σημείο ποÏείας Ï„ÏÎνου εδώ...
+STR_CANT_REMOVE_TRAIN_WAYPOINT :{WHITE}ΑδÏνατο να αφαιÏεθεί το σημείο ποÏείας Ï„ÏÎνου εδώ...
+
+STR_BUILD_AUTORAIL_TIP :{BLACK}Κατασκευή σιδηÏοδÏομικής γÏαμμής χÏησιμοποιώντας την Αυτόματη ΓÏαμμή
STR_NO_TOWN_IN_SCENARIO :{WHITE}...δεν υπάÏχει καμία πόλη στην πίστα
+STR_GENERATE_RANDOM_LANDSCAPE :{WHITE}Είστε σίγουÏος ότι θÎλετε να δημιουÏγήσετε Îνα τυχαίο τοπίο;
STR_MANY_RANDOM_TOWNS :{BLACK}ΠολλÎÏ‚ τυχαίες πόλεις
+STR_RANDOM_TOWNS_TIP :{BLACK}Κάλυψη του χάÏτη με τυχαία τοποθετημÎνες πόλεις
STR_MANY_RANDOM_INDUSTRIES :{BLACK}ΠολλÎÏ‚ τυχαίες βιομηχανίες
--- a/src/lang/unfinished/latvian.txt Mon Mar 26 21:31:37 2007 +0000
+++ b/src/lang/unfinished/latvian.txt Mon Mar 26 22:15:38 2007 +0000
@@ -660,7 +660,6 @@
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Bu've't ba'ku
STR_028E_PLACE_TRANSMITTER :{BLACK}Bu've't raidi'ta'ju
STR_028F_DEFINE_DESERT_AREA :{BLACK}Nora'di't tuksnes'a plati'bu.{}Spiest un turet CTRL lai to izdze'stu
-STR_CREATE_LAKE :{BLACK}Nora'di't u'dens plati'bu.{}Ta' tiks appludina'ta ja bu's ju'ras li'meni'
STR_0290_DELETE :{BLACK}Izdzest
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Pilni'ba' izdze'st s'o pilse'tu
STR_0292_SAVE_SCENARIO :Saglaba't scena'riju
--- a/src/main_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/main_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1211,7 +1211,7 @@
static void EditorTerraformClick_DesertLightHouse(BaseWindow *w)
{
- HandlePlacePushButton(w, 10, SPR_CURSOR_LIGHTHOUSE, 1, (_opt.landscape == LT_DESERT) ? PlaceProc_DesertArea : PlaceProc_LightHouse);
+ HandlePlacePushButton(w, 10, SPR_CURSOR_LIGHTHOUSE, 1, (_opt.landscape == LT_TROPIC) ? PlaceProc_DesertArea : PlaceProc_LightHouse);
}
static void EditorTerraformClick_Transmitter(BaseWindow *w)
@@ -1275,7 +1275,7 @@
switch (e->event) {
case WE_CREATE:
/* 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;
+ w->widget[10].tooltips = (_opt.landscape == LT_TROPIC) ? STR_028F_DEFINE_DESERT_AREA : STR_028D_PLACE_LIGHTHOUSE;
break;
case WE_PAINT:
--- a/src/map.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/map.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -22,7 +22,8 @@
uint _map_tile_mask;
uint _map_size;
-Tile* _m = NULL;
+Tile *_m = NULL;
+TileExtended *_me = NULL;
void AllocateMap(uint size_x, uint size_y)
@@ -44,10 +45,16 @@
_map_tile_mask = _map_size - 1;
free(_m);
- _m = CallocT<Tile>(_map_size);
+ free(_me);
- /* XXX TODO handle memory shortage more gracefully */
- if (_m == NULL) error("Failed to allocate memory for the map");
+ _m = CallocT<Tile>(_map_size);
+ _me = CallocT<TileExtended>(_map_size);
+
+ /* XXX @todo handle memory shortage more gracefully
+ * Maybe some attemps could be made to try with smaller maps down to 64x64
+ * Maybe check for available memory before doing the calls, after all, we know how big
+ * the map is */
+ if ((_m == NULL) || (_me == NULL)) error("Failed to allocate memory for the map");
}
--- a/src/map.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/map.h Mon Mar 26 22:15:38 2007 +0000
@@ -28,7 +28,12 @@
byte m6;
};
-extern Tile* _m;
+struct TileExtended {
+ byte m7;
+};
+
+extern Tile *_m;
+extern TileExtended *_me;
void AllocateMap(uint size_x, uint size_y);
--- a/src/misc.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/misc.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -18,6 +18,7 @@
#include "vehicle_gui.h"
#include "variables.h"
#include "ai/ai.h"
+#include "newgrf_house.h"
#include "date.h"
#include "cargotype.h"
@@ -132,6 +133,7 @@
InitializeSigns();
InitializeStations();
InitializeIndustries();
+ InitializeBuildingCounts();
InitializeMainGui();
InitializeNameMgr();
@@ -241,7 +243,7 @@
{
if (only_constants) return;
- for (CargoID i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
_cargo_payment_rates[i] = GetCargo(i)->initial_payment;
_cargo_payment_rates_frac[i] = 0;
}
@@ -578,6 +580,34 @@
}
}
+static void Load_MAP7()
+{
+ uint size = MapSize();
+ uint i;
+
+ for (i = 0; i != size;) {
+ uint8 buf[4096];
+ uint j;
+
+ SlArray(buf, lengthof(buf), SLE_UINT8);
+ for (j = 0; j != lengthof(buf); j++) _me[i++].m7 = buf[j];
+ }
+}
+
+static void Save_MAP7()
+{
+ uint size = MapSize();
+ uint i;
+
+ SlSetLength(size);
+ for (i = 0; i != size;) {
+ uint8 buf[4096];
+ uint j;
+
+ for (j = 0; j != lengthof(buf); j++) buf[j] = _me[i++].m7;
+ SlArray(buf, lengthof(buf), SLE_UINT8);
+ }
+}
static void Save_CHTS()
{
@@ -614,6 +644,7 @@
{ 'M3HI', Save_MAP4, Load_MAP4, CH_RIFF },
{ 'MAP5', Save_MAP5, Load_MAP5, CH_RIFF },
{ 'MAPE', Save_MAP6, Load_MAP6, CH_RIFF },
+ { 'MAP7', Save_MAP7, Load_MAP7, CH_RIFF },
{ 'NAME', Save_NAME, Load_NAME, CH_ARRAY},
{ 'DATE', SaveLoad_DATE, SaveLoad_DATE, CH_RIFF},
--- a/src/misc/rect.hpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/misc/rect.hpp Mon Mar 26 22:15:38 2007 +0000
@@ -2,6 +2,8 @@
#ifndef RECT_H
#define RECT_H
+#include <limits>
+
/** Template based point without ctor/dtor (raw) for use in unions */
template <typename T> struct PointRawT {
T x, y;
--- a/src/misc_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/misc_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -141,11 +141,10 @@
GetString(_landinfo_data[4], STR_01A8_LOCAL_AUTHORITY, lastof(_landinfo_data[4]));
{
- int i;
char *p = GetString(_landinfo_data[5], STR_01CE_CARGO_ACCEPTED, lastof(_landinfo_data[5]));
bool found = false;
- for (i = 0; i < NUM_CARGO; ++i) {
+ for (CargoID i = 0; i < NUM_CARGO; ++i) {
if (ac[i] > 0) {
/* Add a comma between each item. */
if (found) {
@@ -188,6 +187,7 @@
DEBUG(misc, LANDINFOD_LEVEL, "m4 = %#x", _m[tile].m4);
DEBUG(misc, LANDINFOD_LEVEL, "m5 = %#x", _m[tile].m5);
DEBUG(misc, LANDINFOD_LEVEL, "m6 = %#x", _m[tile].m6);
+ DEBUG(misc, LANDINFOD_LEVEL, "m7 = %#x", _me[tile].m7);
#undef LANDINFOD_LEVEL
}
@@ -731,11 +731,10 @@
{
char *b = _userstring;
bool first = true;
- int i;
b = InlineString(b, STR_000D_ACCEPTS);
- for (i = 0; i != NUM_CARGO; i++, mask >>= 1) {
+ for (CargoID i = 0; i < NUM_CARGO; i++, mask >>= 1) {
if (b >= lastof(_userstring) - 5) break;
if (accepts[i] >= 8 && mask & 1) {
if (first) {
--- a/src/namegen.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/namegen.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file namegen.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "debug.h"
@@ -41,21 +43,21 @@
{
int i;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChanceBias(0, lengthof(name_original_english_1), seed, 50);
if (i >= 0)
strecat(buf, name_original_english_1[i], last);
- //mandatory middle segments
+ /* mandatory middle segments */
strecat(buf, name_original_english_2[SeedChance(4, lengthof(name_original_english_2), seed)], last);
strecat(buf, name_original_english_3[SeedChance(7, lengthof(name_original_english_3), seed)], last);
strecat(buf, name_original_english_4[SeedChance(10, lengthof(name_original_english_4), seed)], last);
strecat(buf, name_original_english_5[SeedChance(13, lengthof(name_original_english_5), seed)], last);
- //optional last segment
+ /* optional last segment */
i = SeedChanceBias(15, lengthof(name_original_english_6), seed, 60);
if (i >= 0)
strecat(buf, name_original_english_6[i], last);
@@ -82,10 +84,10 @@
{
int i;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChanceBias(0, lengthof(name_additional_english_prefix), seed, 50);
if (i >= 0)
strecat(buf,name_additional_english_prefix[i], last);
@@ -104,7 +106,7 @@
strecat(buf, name_additional_english_2[SeedChance(14, lengthof(name_additional_english_2), seed)], last);
- //optional last segment
+ /* optional last segment */
i = SeedChanceBias(15, lengthof(name_additional_english_3), seed, 60);
if (i >= 0)
strecat(buf, name_additional_english_3[i], last);
@@ -128,32 +130,32 @@
int i, j = 0;
strecpy(buf, "", last);
- // Bad, Maria, Gross, ...
+ /* Bad, Maria, Gross, ... */
i = SeedChanceBias(0, lengthof(name_austrian_a1), seed, 15);
if (i >= 0) strecat(buf, name_austrian_a1[i], last);
i = SeedChance(4, 6, seed);
if (i >= 4) {
- // Kaisers-kirchen
+ /* Kaisers-kirchen */
strecat(buf, name_austrian_a2[SeedChance( 7, lengthof(name_austrian_a2), seed)], last);
strecat(buf, name_austrian_a3[SeedChance(13, lengthof(name_austrian_a3), seed)], last);
} else if (i >= 2) {
- // St. Johann
+ /* St. Johann */
strecat(buf, name_austrian_a5[SeedChance( 7, lengthof(name_austrian_a5), seed)], last);
strecat(buf, name_austrian_a6[SeedChance( 9, lengthof(name_austrian_a6), seed)], last);
j = 1; // More likely to have a " an der " or " am "
} else {
- // Zell
+ /* Zell */
strecat(buf, name_austrian_a4[SeedChance( 7, lengthof(name_austrian_a4), seed)], last);
}
i = SeedChance(1, 6, seed);
if (i >= 4 - j) {
- // an der Donau (rivers)
+ /* an der Donau (rivers) */
strecat(buf, name_austrian_f1[SeedChance(4, lengthof(name_austrian_f1), seed)], last);
strecat(buf, name_austrian_f2[SeedChance(5, lengthof(name_austrian_f2), seed)], last);
} else if (i >= 2 - j) {
- // am Dachstein (mountains)
+ /* am Dachstein (mountains) */
strecat(buf, name_austrian_b1[SeedChance(4, lengthof(name_austrian_b1), seed)], last);
strecat(buf, name_austrian_b2[SeedChance(5, lengthof(name_austrian_b2), seed)], last);
}
@@ -166,18 +168,18 @@
uint i;
uint seed_derivative;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
seed_derivative = SeedChance(7, 28, seed);
- //optional prefix
+ /* optional prefix */
if (seed_derivative == 12 || seed_derivative == 19) {
i = SeedChance(2, lengthof(name_german_pre), seed);
strecat(buf,name_german_pre[i], last);
}
- // mandatory middle segments including option of hardcoded name
+ /* mandatory middle segments including option of hardcoded name */
i = SeedChance(3, lengthof(name_german_real) + lengthof(name_german_1), seed);
if (i < lengthof(name_german_real)) {
strecat(buf,name_german_real[i], last);
@@ -188,7 +190,7 @@
strecat(buf, name_german_2[i], last);
}
- // optional suffix
+ /* optional suffix */
if (seed_derivative == 24) {
i = SeedChance(9,
lengthof(name_german_4_an_der) + lengthof(name_german_4_am), seed);
@@ -226,15 +228,15 @@
{
int i;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChanceBias(0, lengthof(name_swedish_1), seed, 50);
if (i >= 0)
strecat(buf, name_swedish_1[i], last);
- // mandatory middle segments including option of hardcoded name
+ /* mandatory middle segments including option of hardcoded name */
if (SeedChance(4, 5, seed) >= 3) {
strecat(buf, name_swedish_2[SeedChance( 7, lengthof(name_swedish_2), seed)], last);
} else {
@@ -252,15 +254,15 @@
{
int i;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChanceBias(0, lengthof(name_dutch_1), seed, 50);
if (i >= 0)
strecat(buf, name_dutch_1[i], last);
- // mandatory middle segments including option of hardcoded name
+ /* mandatory middle segments including option of hardcoded name */
if (SeedChance(6, 9, seed) > 4) {
strecat(buf, name_dutch_2[SeedChance( 9, lengthof(name_dutch_2), seed)], last);
} else {
@@ -274,16 +276,16 @@
static byte MakeFinnishTownName(char *buf, uint32 seed, const char *last)
{
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // Select randomly if town name should consists of one or two parts.
+ /* Select randomly if town name should consists of one or two parts. */
if (SeedChance(0, 15, seed) >= 10) {
strecat(buf, name_finnish_real[SeedChance(2, lengthof(name_finnish_real), seed)], last);
} else if (SeedChance(0, 15, seed) >= 5) {
- // A two-part name by combining one of name_finnish_1 + "la"/"lä"
- // The reason for not having the contents of name_finnish_{1,2} in the same table is
- // that the ones in name_finnish_2 are not good for this purpose.
+ /* A two-part name by combining one of name_finnish_1 + "la"/"lä"
+ * The reason for not having the contents of name_finnish_{1,2} in the same table is
+ * that the ones in name_finnish_2 are not good for this purpose. */
uint sel = SeedChance( 0, lengthof(name_finnish_1), seed);
char *end;
strecat(buf, name_finnish_1[sel], last);
@@ -298,8 +300,8 @@
strecat(buf, "lä", last);
}
} else {
- // A two-part name by combining one of name_finnish_{1,2} + name_finnish_3.
- // Why aren't name_finnish_{1,2} just one table? See above.
+ /* A two-part name by combining one of name_finnish_{1,2} + name_finnish_3.
+ * Why aren't name_finnish_{1,2} just one table? See above. */
uint sel = SeedChance(2,
lengthof(name_finnish_1) + lengthof(name_finnish_2), seed);
if (sel >= lengthof(name_finnish_1)) {
@@ -318,10 +320,10 @@
uint i;
uint j;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChance(0,
lengthof(name_polish_2_o) + lengthof(name_polish_2_m) +
lengthof(name_polish_2_f) + lengthof(name_polish_2_n),
@@ -374,13 +376,13 @@
CzechChoose choose;
CzechAllow allow;
- // 1:3 chance to use a real name.
+ /* 1:3 chance to use a real name. */
if (SeedModChance(0, 4, seed) == 0) {
strecpy(buf, name_czech_real[SeedModChance(4, lengthof(name_czech_real), seed)], last);
return 0;
}
- // NUL terminates the string for strcat()
+ /* NUL terminates the string for strcat() */
strecpy(buf, "", last);
prob_tails = SeedModChance(2, 32, seed);
@@ -389,12 +391,12 @@
if (do_prefix) prefix = SeedModChance(5, lengthof(name_czech_adj) * 12, seed) / 12;
if (do_suffix) suffix = SeedModChance(7, lengthof(name_czech_suffix), seed);
- // 3:1 chance 3:1 to use dynamic substantive
+ /* 3:1 chance 3:1 to use dynamic substantive */
stem = SeedModChance(9,
lengthof(name_czech_subst_full) + 3 * lengthof(name_czech_subst_stem),
seed);
if (stem < lengthof(name_czech_subst_full)) {
- // That was easy!
+ /* That was easy! */
dynamic_subst = false;
gender = name_czech_subst_full[stem].gender;
choose = name_czech_subst_full[stem].choose;
@@ -404,7 +406,7 @@
int ending_start = -1, ending_stop = -1;
int i;
- // Load the substantive
+ /* Load the substantive */
dynamic_subst = true;
stem -= lengthof(name_czech_subst_full);
stem %= lengthof(name_czech_subst_stem);
@@ -412,15 +414,15 @@
choose = name_czech_subst_stem[stem].choose;
allow = name_czech_subst_stem[stem].allow;
- // Load the postfix (1:1 chance that a postfix will be inserted)
+ /* Load the postfix (1:1 chance that a postfix will be inserted) */
postfix = SeedModChance(14, lengthof(name_czech_subst_postfix) * 2, seed);
if (choose & CZC_POSTFIX) {
- // Always get a real postfix.
+ /* Always get a real postfix. */
postfix %= lengthof(name_czech_subst_postfix);
}
if (choose & CZC_NOPOSTFIX) {
- // Always drop a postfix.
+ /* Always drop a postfix. */
postfix += lengthof(name_czech_subst_postfix);
}
if (postfix < lengthof(name_czech_subst_postfix)) {
@@ -429,7 +431,7 @@
choose |= CZC_NOPOSTFIX;
}
- // Localize the array segment containing a good gender
+ /* Localize the array segment containing a good gender */
for (ending = 0; ending < (int) lengthof(name_czech_subst_ending); ending++) {
const CzechNameSubst *e = &name_czech_subst_ending[ending];
@@ -445,11 +447,11 @@
}
}
if (ending_stop < 0) {
- // Whoa. All the endings matched.
+ /* Whoa. All the endings matched. */
ending_stop = ending - 1;
}
- // Make a sequential map of the items with good mask
+ /* Make a sequential map of the items with good mask */
i = 0;
for (ending = ending_start; ending <= ending_stop; ending++) {
const CzechNameSubst *e = &name_czech_subst_ending[ending];
@@ -459,20 +461,20 @@
}
assert(i > 0);
- // Load the ending
+ /* Load the ending */
ending = map[SeedModChance(16, i, seed)];
- // Override possible CZG_*FREE; this must be a real gender,
- // otherwise we get overflow when modifying the adjectivum.
+ /* Override possible CZG_*FREE; this must be a real gender,
+ * otherwise we get overflow when modifying the adjectivum. */
gender = name_czech_subst_ending[ending].gender;
assert(gender != CZG_FREE && gender != CZG_NFREE);
}
if (do_prefix && (name_czech_adj[prefix].choose & choose) != choose) {
- // Throw away non-matching prefix.
+ /* Throw away non-matching prefix. */
do_prefix = false;
}
- // Now finally construct the name
+ /* Now finally construct the name */
if (do_prefix) {
CzechPattern pattern = name_czech_adj[prefix].pattern;
@@ -505,7 +507,7 @@
endlen = strlen(endstr);
assert(postlen > 0 && endlen > 0);
- // Kill the "avava" and "Jananna"-like cases
+ /* Kill the "avava" and "Jananna"-like cases */
if (postlen < 2 || postlen > endlen || (
(poststr[1] != 'v' || poststr[1] != endstr[1]) &&
poststr[2] != endstr[1])
@@ -514,7 +516,7 @@
strecat(buf, poststr, last);
buflen = strlen(buf);
- // k-i -> c-i, h-i -> z-i
+ /* k-i -> c-i, h-i -> z-i */
if (endstr[0] == 'i') {
switch (buf[buflen - 1]) {
case 'k': buf[buflen - 1] = 'c'; break;
@@ -553,15 +555,15 @@
{
strecpy(buf, "", last);
- // Use first 4 bit from seed to decide whether or not this town should
- // have a real name 3/16 chance. Bit 0-3
+ /* Use first 4 bit from seed to decide whether or not this town should
+ * have a real name 3/16 chance. Bit 0-3 */
if (SeedChance(0, 15, seed) < 3) {
- // Use 7bit for the realname table index. Bit 4-10
+ /* Use 7bit for the realname table index. Bit 4-10 */
strecat(buf, name_norwegian_real[SeedChance(4, lengthof(name_norwegian_real), seed)], last);
} else {
- // Use 7bit for the first fake part. Bit 4-10
+ /* Use 7bit for the first fake part. Bit 4-10 */
strecat(buf, name_norwegian_1[SeedChance(4, lengthof(name_norwegian_1), seed)], last);
- // Use 7bit for the last fake part. Bit 11-17
+ /* Use 7bit for the last fake part. Bit 11-17 */
strecat(buf, name_norwegian_2[SeedChance(11, lengthof(name_norwegian_2), seed)], last);
}
@@ -572,22 +574,22 @@
{
uint i;
- //null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
if (SeedChance(12, 15, seed) < 3) {
strecat(buf, name_hungarian_real[SeedChance(0, lengthof(name_hungarian_real), seed)], last);
} else {
- // optional first segment
+ /* optional first segment */
i = SeedChance(3, lengthof(name_hungarian_1) * 3, seed);
if (i < lengthof(name_hungarian_1))
strecat(buf, name_hungarian_1[i], last);
- // mandatory middle segments
+ /* mandatory middle segments */
strecat(buf, name_hungarian_2[SeedChance(3, lengthof(name_hungarian_2), seed)], last);
strecat(buf, name_hungarian_3[SeedChance(6, lengthof(name_hungarian_3), seed)], last);
- // optional last segment
+ /* optional last segment */
i = SeedChance(10, lengthof(name_hungarian_4) * 3, seed);
if (i < lengthof(name_hungarian_4)) {
strecat(buf, name_hungarian_4[i], last);
@@ -607,15 +609,15 @@
{
int i;
- // null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
- // optional first segment
+ /* optional first segment */
i = SeedChanceBias(0, lengthof(name_danish_1), seed, 50);
if (i >= 0)
strecat(buf, name_danish_1[i], last);
- // middle segments removed as this algorithm seems to create much more realistic names
+ /* middle segments removed as this algorithm seems to create much more realistic names */
strecat(buf, name_danish_2[SeedChance( 7, lengthof(name_danish_2), seed)], last);
strecat(buf, name_danish_3[SeedChance(16, lengthof(name_danish_3), seed)], last);
@@ -626,16 +628,16 @@
{
uint i;
- // null terminates the string for strcat
+ /* null terminates the string for strcat */
strecpy(buf, "", last);
if ((i = SeedModChance(0, 5, seed)) == 0) {
strecat(buf, name_turkish_prefix[SeedModChance( 2, lengthof(name_turkish_prefix), seed)], last);
- // middle segment
+ /* middle segment */
strecat(buf, name_turkish_middle[SeedModChance( 4, lengthof(name_turkish_middle), seed)], last);
- // optional suffix
+ /* optional suffix */
if (SeedModChance(0, 7, seed) == 0) {
strecat(buf, name_turkish_suffix[SeedModChance( 10, lengthof(name_turkish_suffix), seed)], last);
}
@@ -757,30 +759,30 @@
MakeCatalanTownName,
};
-// DO WE NEED THIS ANY MORE?
+/* DO WE NEED THIS ANY MORE? */
#define FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z)
uint32 GetOldTownName(uint32 townnameparts, byte old_town_name_type)
{
switch (old_town_name_type) {
- case 0: case 3: /* English, American */
+ case 0: case 3: // English, American
/* Already OK */
return townnameparts;
- case 1: /* French */
+ case 1: // French
/* For some reason 86 needs to be subtracted from townnameparts
* 0000 0000 0000 0000 0000 0000 1111 1111 */
return FIXNUM(townnameparts - 86, lengthof(name_french_real), 0);
- case 2: /* German */
+ case 2: // German
DEBUG(misc, 0, "German Townnames are buggy (%d)", townnameparts);
return townnameparts;
- case 4: /* Latin-American */
+ case 4: // Latin-American
/* 0000 0000 0000 0000 0000 0000 1111 1111 */
return FIXNUM(townnameparts, lengthof(name_spanish_real), 0);
- case 5: /* Silly */
+ case 5: // Silly
/* NUM_SILLY_1 - lower 16 bits
* NUM_SILLY_2 - upper 16 bits without leading 1 (first 8 bytes)
* 1000 0000 2222 2222 0000 0000 1111 1111 */
--- a/src/namegen.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/namegen.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file namegen.h */
+
#ifndef NAMEGEN_H
#define NAMEGEN_H
--- a/src/network/network.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/network/network.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -659,7 +659,7 @@
if (_network_server) {
// We just lost one client :(
- if (cs->status > STATUS_INACTIVE) _network_game_info.clients_on--;
+ if (cs->status >= STATUS_AUTH) _network_game_info.clients_on--;
_network_clients_connected--;
while ((cs + 1) != DEREF_CLIENT(MAX_CLIENTS) && (cs + 1)->sock != INVALID_SOCKET) {
--- a/src/newgrf.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf.cpp */
+
#include "stdafx.h"
#include <stdarg.h>
@@ -18,6 +20,7 @@
#include "string.h"
#include "table/strings.h"
#include "bridge.h"
+#include "town.h"
#include "economy.h"
#include "newgrf_engine.h"
#include "vehicle.h"
@@ -26,11 +29,14 @@
#include "fontcache.h"
#include "date.h"
#include "currency.h"
+#include "landscape.h"
#include "sound.h"
#include "newgrf_config.h"
+#include "newgrf_house.h"
#include "newgrf_sound.h"
#include "newgrf_spritegroup.h"
#include "helpers.hpp"
+#include "table/town_land.h"
#include "cargotype.h"
/* TTDPatch extended GRF format codec
@@ -68,9 +74,8 @@
/* Set if any vehicle is loaded which uses 2cc (two company colours) */
bool _have_2cc = false;
-/* Default cargo translation table. By default there are 27 possible cargo types */
-static const uint _default_cargo_max = 27;
-static CargoLabel _default_cargo_list[_default_cargo_max];
+/* Set if there are any newhouses loaded. */
+bool _have_newhouses = false;
enum GrfDataType {
@@ -227,6 +232,50 @@
}
+/** Used when setting an object's property to map to the GRF's strings
+ * while taking in consideration the "drift" between TTDPatch string system and OpenTTD's one
+ * @param str StringID that we want to have the equivalent in OoenTTD
+ * @return the properly adjusted StringID
+ */
+static StringID MapGRFStringID(uint32 grfid, StringID str)
+{
+ /* 0xD0 and 0xDC stand for all the TextIDs in the range
+ * of 0xD000 (misc graphics texts) and 0xDC00 (misc persistent texts).
+ * These strings are unique to each grf file, and thus require to be used with the
+ * grfid in which they are declared */
+ if (GB(str, 8, 8) == 0xD0 || GB(str, 8, 8) == 0xDC) {
+ return GetGRFStringID(grfid, str);
+ }
+
+ /* We have some changes in our cargo strings, resulting in some missing. */
+ if (str >= 0x006E && str <= 0x008D) return str - 0x20;
+ if (str >= 0x008E && str <= 0x00AD) return str - 0x20;
+
+ /* Map building names according to our lang file changes
+ * 0x200F = Tall Office Block, first house name in the original data, the one that TTDPatch stil uses
+ * 0x201F = Old houses is the last house name.
+ * OpenTTD does not have exactly the same order aymore, so, the code below allows
+ * to compensate for the difference */
+ if (str >= 0x200F && str <= 0x201F) return str + (STR_200F_TALL_OFFICE_BLOCK - 0x200F);
+
+ return str;
+}
+
+static uint8 MapDOSColour(uint8 colour)
+{
+ if (_use_dos_palette) return colour;
+
+ if (colour < 10) {
+ static uint8 dos_to_win_colour_map[] = { 0, 215, 216, 136, 88, 106, 32, 33, 40, 245 };
+ return dos_to_win_colour_map[colour];
+ }
+
+ if (colour >= 245 && colour < 254) return colour - 28;
+
+ return colour;
+}
+
+
typedef bool (*VCI_Handler)(uint engine, int numinfo, int prop, byte **buf, int len);
#define FOR_EACH_OBJECT for (i = 0; i < numinfo; i++)
@@ -255,7 +304,7 @@
bool ret = false;
switch (prop) {
- case 0x05: /* Track type */
+ case 0x05: // Track type
FOR_EACH_OBJECT {
uint8 tracktype = grf_load_byte(&buf);
@@ -270,13 +319,13 @@
}
break;
- case 0x08: /* AI passenger service */
- /* TODO */
+ case 0x08: // AI passenger service
+ /* @todo missing feature */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
- case 0x09: /* Speed (1 unit is 1 kmh) */
+ case 0x09: // Speed (1 unit is 1 kmh)
FOR_EACH_OBJECT {
uint16 speed = grf_load_word(&buf);
if (speed == 0xFFFF) speed = 0;
@@ -285,7 +334,7 @@
}
break;
- case 0x0B: /* Power */
+ case 0x0B: // Power
FOR_EACH_OBJECT {
uint16 power = grf_load_word(&buf);
@@ -296,7 +345,7 @@
}
break;
- case 0x0D: /* Running cost factor */
+ case 0x0D: // Running cost factor
FOR_EACH_OBJECT {
uint8 runcostfact = grf_load_byte(&buf);
@@ -306,7 +355,7 @@
}
break;
- case 0x0E: /* Running cost base */
+ case 0x0E: // Running cost base
FOR_EACH_OBJECT {
uint32 base = grf_load_dword(&buf);
@@ -314,7 +363,7 @@
case 0x4C30: rvi[i].running_cost_class = 0; break;
case 0x4C36: rvi[i].running_cost_class = 1; break;
case 0x4C3C: rvi[i].running_cost_class = 2; break;
- case 0: break; /* Used by wagons */
+ case 0: break; // Used by wagons
default:
grfmsg(1, "RailVehicleChangeInfo: Unsupported running cost base 0x%04X, ignoring", base);
break;
@@ -322,7 +371,7 @@
}
break;
- case 0x12: /* Sprite ID */
+ case 0x12: // Sprite ID
FOR_EACH_OBJECT {
uint8 spriteid = grf_load_byte(&buf);
@@ -334,7 +383,7 @@
}
break;
- case 0x13: /* Dual-headed */
+ case 0x13: // Dual-headed
FOR_EACH_OBJECT {
uint8 dual = grf_load_byte(&buf);
@@ -357,11 +406,11 @@
}
break;
- case 0x14: /* Cargo capacity */
+ case 0x14: // Cargo capacity
FOR_EACH_OBJECT rvi[i].capacity = grf_load_byte(&buf);
break;
- case 0x15: /* Cargo type */
+ case 0x15: // Cargo type
FOR_EACH_OBJECT {
uint8 ctype = grf_load_byte(&buf);
@@ -374,19 +423,19 @@
}
break;
- case 0x16: /* Weight */
+ case 0x16: // Weight
FOR_EACH_OBJECT SB(rvi[i].weight, 0, 8, grf_load_byte(&buf));
break;
- case 0x17: /* Cost factor */
+ case 0x17: // Cost factor
FOR_EACH_OBJECT rvi[i].base_cost = grf_load_byte(&buf);
break;
- case 0x18: /* AI rank */
+ case 0x18: // AI rank
FOR_EACH_OBJECT rvi[i].ai_rank = grf_load_byte(&buf);
break;
- case 0x19: /* Engine traction type */
+ case 0x19: // Engine traction type
/* What do the individual numbers mean?
* 0x00 .. 0x07: Steam
* 0x08 .. 0x27: Diesel
@@ -416,7 +465,7 @@
}
break;
- case 0x1A: /* Alter purchase list sort order */
+ case 0x1A: // Alter purchase list sort order
FOR_EACH_OBJECT {
EngineID pos = grf_load_byte(&buf);
@@ -428,40 +477,40 @@
}
break;
- case 0x1B: /* Powered wagons power bonus */
+ case 0x1B: // Powered wagons power bonus
FOR_EACH_OBJECT rvi[i].pow_wag_power = grf_load_word(&buf);
break;
- case 0x1C: /* Refit cost */
+ case 0x1C: // Refit cost
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
- case 0x1D: /* Refit cargo */
+ case 0x1D: // Refit cargo
FOR_EACH_OBJECT ei[i].refit_mask = grf_load_dword(&buf);
break;
- case 0x1E: /* Callback */
+ case 0x1E: // Callback
FOR_EACH_OBJECT ei[i].callbackmask = grf_load_byte(&buf);
break;
- case 0x1F: /* Tractive effort coefficient */
+ case 0x1F: // Tractive effort coefficient
FOR_EACH_OBJECT rvi[i].tractive_effort = grf_load_byte(&buf);
break;
- case 0x21: /* Shorter vehicle */
+ case 0x21: // Shorter vehicle
FOR_EACH_OBJECT rvi[i].shorten_factor = grf_load_byte(&buf);
break;
- case 0x22: /* Visual effect */
- // see note in engine.h about rvi->visual_effect
+ case 0x22: // Visual effect
+ /* see note in engine.h about rvi->visual_effect */
FOR_EACH_OBJECT rvi[i].visual_effect = grf_load_byte(&buf);
break;
- case 0x23: /* Powered wagons weight bonus */
+ case 0x23: // Powered wagons weight bonus
FOR_EACH_OBJECT rvi[i].pow_wag_weight = grf_load_byte(&buf);
break;
- case 0x24: /* High byte of vehicle weight */
+ case 0x24: // High byte of vehicle weight
FOR_EACH_OBJECT {
byte weight = grf_load_byte(&buf);
@@ -473,34 +522,33 @@
}
break;
- case 0x25: /* User-defined bit mask to set when checking veh. var. 42 */
+ case 0x25: // User-defined bit mask to set when checking veh. var. 42
FOR_EACH_OBJECT rvi[i].user_def_data = grf_load_byte(&buf);
break;
- case 0x27: /* Miscellaneous flags */
+ case 0x27: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true;
}
break;
- case 0x28: /* Cargo classes allowed */
+ case 0x28: // Cargo classes allowed
FOR_EACH_OBJECT cargo_allowed[engine + i] = grf_load_word(&buf);
break;
- case 0x29: /* Cargo classes disallowed */
+ case 0x29: // Cargo classes disallowed
FOR_EACH_OBJECT cargo_disallowed[engine + i] = grf_load_word(&buf);
break;
- case 0x2A: /* Long format introduction date (days since year 0) */
+ case 0x2A: // Long format introduction date (days since year 0)
FOR_EACH_OBJECT ei[i].base_intro = grf_load_dword(&buf);
break;
- /* TODO */
- /* Fall-through for unimplemented one byte long properties. */
- case 0x20: /* Air drag */
- case 0x26: /* Retire vehicle early */
- /* TODO */
+ /* @todo air drag and retire vehicle early
+ * Fall-through for unimplemented one byte long properties. */
+ case 0x20: // Air drag
+ case 0x26: // Retire vehicle early
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
@@ -522,25 +570,26 @@
bool ret = false;
switch (prop) {
- case 0x08: /* Speed (1 unit is 0.5 kmh) */
+ case 0x08: // Speed (1 unit is 0.5 kmh)
FOR_EACH_OBJECT rvi[i].max_speed = grf_load_byte(&buf);
break;
- case 0x09: /* Running cost factor */
+ case 0x09: // Running cost factor
FOR_EACH_OBJECT rvi[i].running_cost = grf_load_byte(&buf);
break;
- case 0x0A: /* Running cost base */
- /* TODO: I have no idea. --pasky */
+ case 0x0A: // Running cost base
+ /* @todo : I have no idea. --pasky
+ * I THINK it is used for overriding the base cost of all road vehicle (_price.roadveh_base) --belugas */
FOR_EACH_OBJECT grf_load_dword(&buf);
ret = true;
break;
- case 0x0E: /* Sprite ID */
+ case 0x0E: // Sprite ID
FOR_EACH_OBJECT {
uint8 spriteid = grf_load_byte(&buf);
- // cars have different custom id in the GRF file
+ /* cars have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
@@ -549,11 +598,11 @@
}
break;
- case 0x0F: /* Cargo capacity */
+ case 0x0F: // Cargo capacity
FOR_EACH_OBJECT rvi[i].capacity = grf_load_byte(&buf);
break;
- case 0x10: /* Cargo type */
+ case 0x10: // Cargo type
FOR_EACH_OBJECT {
uint8 cargo = grf_load_byte(&buf);
@@ -566,17 +615,17 @@
}
break;
- case 0x11: /* Cost factor */
+ case 0x11: // Cost factor
FOR_EACH_OBJECT rvi[i].base_cost = grf_load_byte(&buf); // ?? is it base_cost?
break;
- case 0x12: /* SFX */
+ case 0x12: // SFX
FOR_EACH_OBJECT rvi[i].sfx = (SoundFx)grf_load_byte(&buf);
break;
- case 0x13: /* Power in 10hp */
- case 0x14: /* Weight in 1/4 tons */
- case 0x15: /* Speed in mph*0.8 */
+ case 0x13: // Power in 10hp
+ case 0x14: // Weight in 1/4 tons
+ case 0x15: // Speed in mph*0.8
/* TODO: Support for road vehicles realistic power
* computations (called rvpower in TTDPatch) is just
* missing in OTTD yet. --pasky */
@@ -584,41 +633,41 @@
ret = true;
break;
- case 0x16: /* Cargos available for refitting */
+ case 0x16: // Cargos available for refitting
FOR_EACH_OBJECT ei[i].refit_mask = grf_load_dword(&buf);
break;
- case 0x17: /* Callback mask */
+ case 0x17: // Callback mask
FOR_EACH_OBJECT ei[i].callbackmask = grf_load_byte(&buf);
break;
- case 0x1A: /* Refit cost */
+ case 0x1A: // Refit cost
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
- case 0x1C: /* Miscellaneous flags */
+ case 0x1C: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true;
}
break;
- case 0x1D: /* Cargo classes allowed */
+ case 0x1D: // Cargo classes allowed
FOR_EACH_OBJECT cargo_allowed[ROAD_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x1E: /* Cargo classes disallowed */
+ case 0x1E: // Cargo classes disallowed
FOR_EACH_OBJECT cargo_disallowed[ROAD_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x1F: /* Long format introduction date (days since year 0) */
+ case 0x1F: // Long format introduction date (days since year 0)
FOR_EACH_OBJECT ei[i].base_intro = grf_load_dword(&buf);
break;
- case 0x18: /* Tractive effort */
- case 0x19: /* Air drag */
- case 0x1B: /* Retire vehicle early */
- /* TODO */
+ case 0x18: // Tractive effort
+ case 0x19: // Air drag
+ case 0x1B: // Retire vehicle early
+ /* @todo */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
@@ -642,11 +691,11 @@
//printf("e %x prop %x?\n", engine, prop);
switch (prop) {
- case 0x08: /* Sprite ID */
+ case 0x08: // Sprite ID
FOR_EACH_OBJECT {
uint8 spriteid = grf_load_byte(&buf);
- // ships have different custom id in the GRF file
+ /* ships have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
@@ -655,19 +704,19 @@
}
break;
- case 0x09: /* Refittable */
+ case 0x09: // Refittable
FOR_EACH_OBJECT svi[i].refittable = (grf_load_byte(&buf) != 0);
break;
- case 0x0A: /* Cost factor */
+ case 0x0A: // Cost factor
FOR_EACH_OBJECT svi[i].base_cost = grf_load_byte(&buf); // ?? is it base_cost?
break;
- case 0x0B: /* Speed (1 unit is 0.5 kmh) */
+ case 0x0B: // Speed (1 unit is 0.5 kmh)
FOR_EACH_OBJECT svi[i].max_speed = grf_load_byte(&buf);
break;
- case 0x0C: /* Cargo type */
+ case 0x0C: // Cargo type
FOR_EACH_OBJECT {
uint8 cargo = grf_load_byte(&buf);
@@ -680,53 +729,53 @@
}
break;
- case 0x0D: /* Cargo capacity */
+ case 0x0D: // Cargo capacity
FOR_EACH_OBJECT svi[i].capacity = grf_load_word(&buf);
break;
- case 0x0F: /* Running cost factor */
+ case 0x0F: // Running cost factor
FOR_EACH_OBJECT svi[i].running_cost = grf_load_byte(&buf);
break;
- case 0x10: /* SFX */
+ case 0x10: // SFX
FOR_EACH_OBJECT svi[i].sfx = (SoundFx)grf_load_byte(&buf);
break;
- case 0x11: /* Cargos available for refitting */
+ case 0x11: // Cargos available for refitting
FOR_EACH_OBJECT ei[i].refit_mask = grf_load_dword(&buf);
break;
- case 0x12: /* Callback mask */
+ case 0x12: // Callback mask
FOR_EACH_OBJECT ei[i].callbackmask = grf_load_byte(&buf);
break;
- case 0x13: /* Refit cost */
+ case 0x13: // Refit cost
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
- case 0x17: /* Miscellaneous flags */
+ case 0x17: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true;
}
break;
- case 0x18: /* Cargo classes allowed */
+ case 0x18: // Cargo classes allowed
FOR_EACH_OBJECT cargo_allowed[SHIP_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x19: /* Cargo classes disallowed */
+ case 0x19: // Cargo classes disallowed
FOR_EACH_OBJECT cargo_disallowed[SHIP_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x1A: /* Long format introduction date (days since year 0) */
+ case 0x1A: // Long format introduction date (days since year 0)
FOR_EACH_OBJECT ei[i].base_intro = grf_load_dword(&buf);
break;
- case 0x14: /* Ocean speed fraction */
- case 0x15: /* Canal speed fraction */
- case 0x16: /* Retire vehicle early */
- /* TODO */
+ case 0x14: // Ocean speed fraction
+ case 0x15: // Canal speed fraction
+ case 0x16: // Retire vehicle early
+ /* @todo */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
@@ -750,11 +799,11 @@
//printf("e %x prop %x?\n", engine, prop);
switch (prop) {
- case 0x08: /* Sprite ID */
+ case 0x08: // Sprite ID
FOR_EACH_OBJECT {
uint8 spriteid = grf_load_byte(&buf);
- // aircraft have different custom id in the GRF file
+ /* aircraft have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
@@ -763,7 +812,7 @@
}
break;
- case 0x09: /* Helicopter */
+ case 0x09: // Helicopter
FOR_EACH_OBJECT {
if (grf_load_byte(&buf) == 0) {
avi[i].subtype = AIR_HELI;
@@ -773,71 +822,71 @@
}
break;
- case 0x0A: /* Large */
+ case 0x0A: // Large
FOR_EACH_OBJECT SB(avi[i].subtype, 1, 1, (grf_load_byte(&buf) != 0 ? 1 : 0)); // AIR_FAST
break;
- case 0x0B: /* Cost factor */
+ case 0x0B: // Cost factor
FOR_EACH_OBJECT avi[i].base_cost = grf_load_byte(&buf); // ?? is it base_cost?
break;
- case 0x0C: /* Speed (1 unit is 8 mph, we translate to 1 unit is 1 km/h) */
+ 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 */
+ case 0x0D: // Acceleration
FOR_EACH_OBJECT avi[i].acceleration = (grf_load_byte(&buf) * 129) / 10;
break;
- case 0x0E: /* Running cost factor */
+ case 0x0E: // Running cost factor
FOR_EACH_OBJECT avi[i].running_cost = grf_load_byte(&buf);
break;
- case 0x0F: /* Passenger capacity */
+ case 0x0F: // Passenger capacity
FOR_EACH_OBJECT avi[i].passenger_capacity = grf_load_word(&buf);
break;
- case 0x11: /* Mail capacity */
+ case 0x11: // Mail capacity
FOR_EACH_OBJECT avi[i].mail_capacity = grf_load_byte(&buf);
break;
- case 0x12: /* SFX */
+ case 0x12: // SFX
FOR_EACH_OBJECT avi[i].sfx = (SoundFx)grf_load_byte(&buf);
break;
- case 0x13: /* Cargos available for refitting */
+ case 0x13: // Cargos available for refitting
FOR_EACH_OBJECT ei[i].refit_mask = grf_load_dword(&buf);
break;
- case 0x14: /* Callback mask */
+ case 0x14: // Callback mask
FOR_EACH_OBJECT ei[i].callbackmask = grf_load_byte(&buf);
break;
- case 0x15: /* Refit cost */
+ case 0x15: // Refit cost
FOR_EACH_OBJECT ei[i].refit_cost = grf_load_byte(&buf);
break;
- case 0x17: /* Miscellaneous flags */
+ case 0x17: // Miscellaneous flags
FOR_EACH_OBJECT {
ei[i].misc_flags = grf_load_byte(&buf);
if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true;
}
break;
- case 0x18: /* Cargo classes allowed */
+ case 0x18: // Cargo classes allowed
FOR_EACH_OBJECT cargo_allowed[AIRCRAFT_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x19: /* Cargo classes disallowed */
+ case 0x19: // Cargo classes disallowed
FOR_EACH_OBJECT cargo_disallowed[AIRCRAFT_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
break;
- case 0x1A: /* Long format introduction date (days since year 0) */
+ case 0x1A: // Long format introduction date (days since year 0)
FOR_EACH_OBJECT ei[i].base_intro = grf_load_dword(&buf);
break;
- case 0x16: /* Retire vehicle early */
- /* TODO */
+ case 0x16: // Retire vehicle early
+ /* @todo */
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
@@ -879,7 +928,7 @@
}
switch (prop) {
- case 0x08: /* Class ID */
+ case 0x08: // Class ID
FOR_EACH_OBJECT {
/* Property 0x08 is special; it is where the station is allocated */
if (statspec[i] == NULL) statspec[i] = CallocT<StationSpec>(1);
@@ -890,7 +939,7 @@
}
break;
- case 0x09: /* Define sprite layout */
+ case 0x09: // Define sprite layout
FOR_EACH_OBJECT {
StationSpec *statspec = _cur_grffile->stations[stid + i];
@@ -914,7 +963,7 @@
while (buf < *bufp + len) {
DrawTileSeqStruct *dtss;
- // no relative bounding box support
+ /* no relative bounding box support */
dts->seq = ReallocT((DrawTileSeqStruct*)dts->seq, ++seq_count);
dtss = (DrawTileSeqStruct*) &dts->seq[seq_count - 1];
@@ -947,7 +996,7 @@
}
break;
- case 0x0A: /* Copy sprite layout */
+ case 0x0A: // Copy sprite layout
FOR_EACH_OBJECT {
StationSpec *statspec = _cur_grffile->stations[stid + i];
byte srcid = grf_load_byte(&buf);
@@ -959,19 +1008,19 @@
}
break;
- case 0x0B: /* Callback mask */
+ case 0x0B: // Callback mask
FOR_EACH_OBJECT statspec[i]->callbackmask = grf_load_byte(&buf);
break;
- case 0x0C: /* Disallowed number of platforms */
+ case 0x0C: // Disallowed number of platforms
FOR_EACH_OBJECT statspec[i]->disallowed_platforms = grf_load_byte(&buf);
break;
- case 0x0D: /* Disallowed platform lengths */
+ case 0x0D: // Disallowed platform lengths
FOR_EACH_OBJECT statspec[i]->disallowed_lengths = grf_load_byte(&buf);
break;
- case 0x0E: /* Define custom layout */
+ case 0x0E: // Define custom layout
FOR_EACH_OBJECT {
StationSpec *statspec = _cur_grffile->stations[stid + i];
@@ -1001,7 +1050,7 @@
//debug("p %d > %d ?", number, stat->platforms[l]);
if (number > statspec->platforms[l]) {
statspec->layouts[l] = ReallocT(statspec->layouts[l], number);
- // We expect NULL being 0 here, but C99 guarantees that.
+ /* We expect NULL being 0 here, but C99 guarantees that. */
memset(statspec->layouts[l] + statspec->platforms[l], 0,
(number - statspec->platforms[l]) * sizeof(**statspec->layouts));
@@ -1024,7 +1073,7 @@
}
break;
- case 0x0F: /* Copy custom layout */
+ case 0x0F: // Copy custom layout
FOR_EACH_OBJECT {
StationSpec *statspec = _cur_grffile->stations[stid + i];
byte srcid = grf_load_byte(&buf);
@@ -1037,41 +1086,41 @@
}
break;
- case 0x10: /* Little/lots cargo threshold */
+ case 0x10: // Little/lots cargo threshold
FOR_EACH_OBJECT statspec[i]->cargo_threshold = grf_load_word(&buf);
break;
- case 0x11: /* Pylon placement */
+ case 0x11: // Pylon placement
FOR_EACH_OBJECT statspec[i]->pylons = grf_load_byte(&buf);
break;
- case 0x12: /* Cargo types for random triggers */
+ case 0x12: // Cargo types for random triggers
FOR_EACH_OBJECT statspec[i]->cargo_triggers = grf_load_dword(&buf);
break;
- case 0x13: /* General flags */
+ case 0x13: // General flags
FOR_EACH_OBJECT statspec[i]->flags = grf_load_byte(&buf);
break;
- case 0x14: /* Overhead wire placement */
+ case 0x14: // Overhead wire placement
FOR_EACH_OBJECT statspec[i]->wires = grf_load_byte(&buf);
break;
- case 0x15: /* Blocked tiles */
+ case 0x15: // Blocked tiles
FOR_EACH_OBJECT statspec[i]->blocked = grf_load_byte(&buf);
break;
- case 0x16: /* TODO Animation info */
+ case 0x16: // @todo Animation info
FOR_EACH_OBJECT grf_load_word(&buf);
ret = true;
break;
- case 0x17: /* TODO Animation speed */
+ case 0x17: // @todo Animation speed
FOR_EACH_OBJECT grf_load_byte(&buf);
ret = true;
break;
- case 0x18: /* TODO Animation triggers */
+ case 0x18: // @todo Animation triggers
FOR_EACH_OBJECT grf_load_word(&buf);
ret = true;
break;
@@ -1092,27 +1141,27 @@
bool ret = false;
switch (prop) {
- case 0x08: /* Year of availability */
+ case 0x08: // Year of availability
FOR_EACH_OBJECT _bridge[brid + i].avail_year = ORIGINAL_BASE_YEAR + grf_load_byte(&buf);
break;
- case 0x09: /* Minimum length */
+ case 0x09: // Minimum length
FOR_EACH_OBJECT _bridge[brid + i].min_length = grf_load_byte(&buf);
break;
- case 0x0A: /* Maximum length */
+ case 0x0A: // Maximum length
FOR_EACH_OBJECT _bridge[brid + i].max_length = grf_load_byte(&buf);
break;
- case 0x0B: /* Cost factor */
+ case 0x0B: // Cost factor
FOR_EACH_OBJECT _bridge[brid + i].price = grf_load_byte(&buf);
break;
- case 0x0C: /* Maximum speed */
+ case 0x0C: // Maximum speed
FOR_EACH_OBJECT _bridge[brid + i].speed = grf_load_word(&buf);
break;
- case 0x0D: /* Bridge sprite tables */
+ case 0x0D: // Bridge sprite tables
FOR_EACH_OBJECT {
Bridge *bridge = &_bridge[brid + i];
byte tableid = grf_load_byte(&buf);
@@ -1152,11 +1201,11 @@
}
break;
- case 0x0E: /* Flags; bit 0 - disable far pillars */
+ case 0x0E: // Flags; bit 0 - disable far pillars
FOR_EACH_OBJECT _bridge[brid + i].flags = grf_load_byte(&buf);
break;
- case 0x0F: /* Long format year of availability (year since year 0) */
+ case 0x0F: // Long format year of availability (year since year 0)
FOR_EACH_OBJECT _bridge[brid + i].avail_year = clamp(grf_load_dword(&buf), MIN_YEAR, MAX_YEAR);
break;
@@ -1168,6 +1217,205 @@
return ret;
}
+static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, int len)
+{
+ HouseSpec **housespec;
+ byte *buf = *bufp;
+ int i;
+ bool ret = false;
+
+ if (hid + numinfo >= HOUSE_MAX) {
+ grfmsg(1, "TownHouseChangeInfo: Too many houses loaded (%u), max (%u). Ignoring.", hid + numinfo, HOUSE_MAX-1);
+ return false;
+ }
+
+ /* Allocate house specs if they haven't been allocated already. */
+ if (_cur_grffile->housespec == NULL) {
+ _cur_grffile->housespec = CallocT<HouseSpec*>(HOUSE_MAX);
+
+ /* Reset any overrides that have been set. */
+ ResetHouseOverrides();
+ }
+
+ housespec = &_cur_grffile->housespec[hid];
+
+ if (prop != 0x08) {
+ /* Check that all the houses being modified have been defined. */
+ FOR_EACH_OBJECT {
+ if (housespec[i] == NULL) {
+ grfmsg(2, "TownHouseChangeInfo: Attempt to modify undefined house %u. Ignoring.", hid + i);
+ return false;
+ }
+ }
+ }
+
+ switch (prop) {
+ case 0x08: // Substitute building type, and definition of a new house
+ FOR_EACH_OBJECT {
+ byte subs_id = grf_load_byte(&buf);
+
+ if (subs_id == 0xFF) {
+ /* Instead of defining a new house, a substitute house id
+ * of 0xFF disables the old house with the current id. */
+ _house_specs[hid + i].enabled = false;
+ continue;
+ } else if (subs_id >= NEW_HOUSE_OFFSET) {
+ /* The substitute id must be one of the original houses. */
+ grfmsg(2, "TownHouseChangeInfo: Attempt to use new house %u as substitute house for %u. Ignoring.", subs_id, hid + i);
+ return false;
+ }
+
+ /* Allocate space for this house. */
+ if (housespec[i] == NULL) housespec[i] = CallocT<HouseSpec>(1);
+
+ memcpy(housespec[i], &_house_specs[subs_id], sizeof(_house_specs[subs_id]));
+
+ housespec[i]->enabled = true;
+ housespec[i]->local_id = hid + i;
+ housespec[i]->substitute_id = subs_id;
+ housespec[i]->grffile = _cur_grffile;
+ housespec[i]->random_colour[0] = 0x04; // those 4 random colours are the base colour
+ housespec[i]->random_colour[1] = 0x08; // for all new houses
+ housespec[i]->random_colour[2] = 0x0C; // they stand for red, blue, orange and green
+ housespec[i]->random_colour[3] = 0x06;
+
+ /* New houses do not (currently) expect to have a default start
+ * date before 1930, as this breaks the build date stuff. See
+ * FinaliseHouseArray() for more details. */
+ if (housespec[i]->min_date < 1930) housespec[i]->min_date = 1930;
+ }
+ _have_newhouses = true;
+ break;
+
+ case 0x09: // Building flags
+ FOR_EACH_OBJECT {
+ byte state = grf_load_byte(&buf);
+ housespec[i]->building_flags = (BuildingFlags)state;
+ }
+ break;
+
+ case 0x0A: // Availability years
+ FOR_EACH_OBJECT {
+ uint16 years = grf_load_word(&buf);
+ housespec[i]->min_date = GB(years, 0, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 0, 8);
+ housespec[i]->max_date = GB(years, 8, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 8, 8);
+ }
+ break;
+
+ case 0x0B: // Population
+ FOR_EACH_OBJECT housespec[i]->population = grf_load_byte(&buf);
+ break;
+
+ case 0x0C: // Mail generation multiplier
+ FOR_EACH_OBJECT housespec[i]->mail_generation = grf_load_byte(&buf);
+ break;
+
+ case 0x0D: // Passenger acceptance
+ case 0x0E: // Mail acceptance
+ FOR_EACH_OBJECT housespec[i]->cargo_acceptance[prop - 0x0D] = grf_load_byte(&buf);
+ break;
+ case 0x0F: // Goods/candy, food/fizzy drinks acceptance
+ FOR_EACH_OBJECT {
+ int8 goods = grf_load_byte(&buf);
+
+ /* If value of goods is negative, it means in fact food or, if in toyland, fizzy_drink acceptance.
+ * Else, we have "standard" 3rd cargo type, goods or candy, for toyland once more */
+ housespec[i]->accepts_cargo[2] = (goods >= 0) ? ((_opt.landscape == LT_TOYLAND) ? CT_CANDY : CT_GOODS) :
+ ((_opt.landscape == LT_TOYLAND) ? CT_FIZZY_DRINKS : CT_FOOD);
+
+ housespec[i]->cargo_acceptance[2] = abs(goods); // but we do need positive value here
+ }
+ break;
+
+ case 0x10: // Local authority rating decrease on removal
+ FOR_EACH_OBJECT housespec[i]->remove_rating_decrease = grf_load_word(&buf);
+ break;
+
+ case 0x11: // Removal cost multiplier
+ FOR_EACH_OBJECT housespec[i]->removal_cost = grf_load_byte(&buf);
+ break;
+
+ case 0x12: // Building name ID
+ FOR_EACH_OBJECT housespec[i]->building_name = MapGRFStringID(_cur_grffile->grfid, grf_load_word(&buf));
+ break;
+
+ case 0x13: // Building availability mask
+ FOR_EACH_OBJECT {
+ uint16 avail = grf_load_word(&buf);
+ housespec[i]->building_availability = (HouseZones)avail;
+ }
+ break;
+
+ case 0x14: // House callback flags
+ FOR_EACH_OBJECT housespec[i]->callback_mask = grf_load_byte(&buf);
+ break;
+
+ case 0x15: // House override byte
+ FOR_EACH_OBJECT {
+ byte override = grf_load_byte(&buf);
+
+ /* The house being overridden must be an original house. */
+ if (override >= NEW_HOUSE_OFFSET) {
+ grfmsg(2, "TownHouseChangeInfo: Attempt to override new house %u with house id %u. Ignoring.", override, hid);
+ return false;
+ }
+
+ AddHouseOverride(hid, override);
+ }
+ break;
+
+ case 0x16: // Periodic refresh multiplier
+ FOR_EACH_OBJECT housespec[i]->processing_time = grf_load_byte(&buf);
+ break;
+
+ case 0x17: // Four random colours to use
+ FOR_EACH_OBJECT {
+ uint j;
+ for (j = 0; j < 4; j++) housespec[i]->random_colour[j] = grf_load_byte(&buf);
+ }
+ break;
+
+ case 0x18: // Relative probability of appearing
+ FOR_EACH_OBJECT housespec[i]->probability = grf_load_byte(&buf);
+ break;
+
+ case 0x19: // Extra flags
+ FOR_EACH_OBJECT {
+ byte flags = grf_load_byte(&buf);
+ housespec[i]->extra_flags = (HouseExtraFlags)flags;
+ }
+ break;
+
+ case 0x1A: // Animation frames
+ FOR_EACH_OBJECT housespec[i]->animation_frames = grf_load_byte(&buf);
+ break;
+
+ case 0x1B: // Animation speed
+ FOR_EACH_OBJECT housespec[i]->animation_speed = clamp(grf_load_byte(&buf), 2, 16);
+ break;
+
+ case 0x1C: // Class of the building type
+ FOR_EACH_OBJECT housespec[i]->class_id = AllocateHouseClassID(grf_load_byte(&buf), _cur_grffile->grfid);
+ break;
+
+ case 0x1D: // Callback flags 2
+ FOR_EACH_OBJECT housespec[i]->callback_mask |= (grf_load_byte(&buf) << 8);
+ break;
+
+ case 0x1E: // Accepted cargo types
+ FOR_EACH_OBJECT grf_load_dword(&buf);
+ ret = true;
+ break;
+
+ default:
+ ret = true;
+ break;
+ }
+
+ *bufp = buf;
+ return ret;
+}
+
static bool GlobalVarChangeInfo(uint gvid, int numinfo, int prop, byte **bufp, int len)
{
byte *buf = *bufp;
@@ -1279,6 +1527,22 @@
break;
case 0x10: // 12 * 32 * B Snow line height table
+ if (numinfo > 1 || IsSnowLineSet()) {
+ grfmsg(1, "GlobalVarChangeInfo: The snowline can only be set once (%d)", numinfo);
+ } else if (len < SNOW_LINE_MONTHS * SNOW_LINE_DAYS) {
+ grfmsg(1, "GlobalVarChangeInfo: Not enough entries set in the snowline table (%d)", len);
+ } else {
+ byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS];
+
+ for (uint i = 0; i < SNOW_LINE_MONTHS; i++) {
+ for (uint j = 0; j < SNOW_LINE_DAYS; j++) {
+ table[i][j] = grf_load_byte(&buf);
+ }
+ }
+ SetSnowLine(table);
+ }
+ break;
+
default:
ret = true;
}
@@ -1287,6 +1551,129 @@
return ret;
}
+static bool CargoChangeInfo(uint cid, int numinfo, int prop, byte **bufp, int len)
+{
+ if (cid + numinfo > NUM_CARGO) {
+ grfmsg(2, "CargoChangeInfo: Cargo type %d out of range (max %d)", cid + numinfo, NUM_CARGO - 1);
+ return false;
+ }
+
+ CargoSpec *cs = &_cargo[cid];
+ byte *buf = *bufp;
+ int i;
+ bool ret = false;
+
+ switch (prop) {
+ case 0x08: /* Bit number of cargo */
+ FOR_EACH_OBJECT {
+ cs[i].bitnum = grf_load_byte(&buf);
+ cs[i].grfid = _cur_grffile->grfid;
+ if (cs->IsValid()) {
+ SETBIT(_cargo_mask, cid + i);
+ } else {
+ CLRBIT(_cargo_mask, cid + i);
+ }
+ }
+ break;
+
+ case 0x09: /* String ID for cargo type name */
+ FOR_EACH_OBJECT cs[i].name = grf_load_word(&buf);
+ break;
+
+ case 0x0A: /* String for cargo name, plural */
+ FOR_EACH_OBJECT cs[i].name_plural = grf_load_word(&buf);
+ break;
+
+ case 0x0B:
+ /* String for units of cargo. This is different in OpenTTD to TTDPatch
+ * (e.g. 10 tonnes of coal) */
+ FOR_EACH_OBJECT cs[i].units_volume = grf_load_word(&buf);
+ break;
+
+ case 0x0C: /* String for quantity of cargo (e.g. 10 tonnes of coal) */
+ FOR_EACH_OBJECT cs[i].quantifier = grf_load_word(&buf);
+ break;
+
+ case 0x0D: /* String for two letter cargo abbreviation */
+ FOR_EACH_OBJECT cs[i].abbrev = grf_load_word(&buf);
+ break;
+
+ case 0x0E: /* Sprite ID for cargo icon */
+ FOR_EACH_OBJECT cs[i].sprite = grf_load_word(&buf);
+ break;
+
+ case 0x0F: /* Weight of one unit of cargo */
+ FOR_EACH_OBJECT cs[i].weight = grf_load_byte(&buf);
+ break;
+
+ case 0x10: /* Used for payment calculation */
+ FOR_EACH_OBJECT cs[i].transit_days[0] = grf_load_byte(&buf);
+ break;
+
+ case 0x11: /* Used for payment calculation */
+ FOR_EACH_OBJECT cs[i].transit_days[1] = grf_load_byte(&buf);
+ break;
+
+ case 0x12: /* Base cargo price */
+ FOR_EACH_OBJECT cs[i].initial_payment = grf_load_dword(&buf);
+ break;
+
+ case 0x13: /* Colour for station rating bars */
+ FOR_EACH_OBJECT cs[i].rating_colour = MapDOSColour(grf_load_byte(&buf));
+ break;
+
+ case 0x14: /* Colour for cargo graph */
+ FOR_EACH_OBJECT cs[i].legend_colour = MapDOSColour(grf_load_byte(&buf));
+ break;
+
+ case 0x15: /* Freight status */
+ FOR_EACH_OBJECT cs[i].is_freight = grf_load_byte(&buf) != 0;
+ break;
+
+ case 0x16: /* Cargo classes */
+ FOR_EACH_OBJECT cs[i].classes = grf_load_word(&buf);
+ break;
+
+ case 0x17: /* Cargo label */
+ FOR_EACH_OBJECT {
+ cs[i].label = grf_load_dword(&buf);
+ cs[i].label = BSWAP32(cs[i].label);
+ }
+ break;
+
+ case 0x18: /* Town growth substitute type */
+ FOR_EACH_OBJECT {
+ uint8 substitute_type = grf_load_byte(&buf);
+ switch (substitute_type) {
+ case 0x00: cs[i].town_effect = TE_PASSENGERS; break;
+ case 0x02: cs[i].town_effect = TE_MAIL; break;
+ case 0x05: cs[i].town_effect = TE_GOODS; break;
+ case 0x09: cs[i].town_effect = TE_WATER; break;
+ case 0x0B: cs[i].town_effect = TE_FOOD; break;
+ default:
+ grfmsg(1, "CargoChangeInfo: Unknown town growth substitute value %d, setting to none.", substitute_type);
+ case 0xFF: cs[i].town_effect = TE_NONE; break;
+ }
+ }
+ break;
+
+ case 0x19: /* Town growth coefficient */
+ FOR_EACH_OBJECT cs[i].multipliertowngrowth = grf_load_word(&buf);
+ break;
+
+ case 0x1A: /* Bitmask of callbacks to use */
+ FOR_EACH_OBJECT cs[i].callback_mask = grf_load_byte(&buf);
+ break;
+
+ default:
+ ret = true;
+ }
+
+ *bufp = buf;
+ return ret;
+}
+
+
static bool SoundEffectChangeInfo(uint sid, int numinfo, int prop, byte **bufp, int len)
{
byte *buf = *bufp;
@@ -1299,7 +1686,7 @@
}
switch (prop) {
- case 0x08: /* Relative volume */
+ case 0x08: // Relative volume
FOR_EACH_OBJECT {
uint sound = sid + i + _cur_grffile->sound_offset - GetNumOriginalSounds();
@@ -1311,7 +1698,7 @@
}
break;
- case 0x09: /* Priority */
+ case 0x09: // Priority
FOR_EACH_OBJECT {
uint sound = sid + i + _cur_grffile->sound_offset - GetNumOriginalSounds();
@@ -1323,7 +1710,7 @@
}
break;
- case 0x0A: /* Override old sound */
+ case 0x0A: // Override old sound
FOR_EACH_OBJECT {
uint sound = sid + i + _cur_grffile->sound_offset - GetNumOriginalSounds();
uint orig_sound = grf_load_byte(&buf);
@@ -1352,7 +1739,7 @@
static void FeatureChangeInfo(byte *buf, int len)
{
byte *bufend = buf + len;
- int i;
+ uint i;
/* <00> <feature> <num-props> <num-info> <id> (<property <new-info>)...
*
@@ -1375,11 +1762,11 @@
/* GSF_STATION */ StationChangeInfo,
/* GSF_CANAL */ NULL,
/* GSF_BRIDGE */ BridgeChangeInfo,
- /* GSF_TOWNHOUSE */ NULL,
+ /* GSF_TOWNHOUSE */ TownHouseChangeInfo,
/* GSF_GLOBALVAR */ GlobalVarChangeInfo,
/* GSF_INDUSTRYTILES */NULL,
/* GSF_INDUSTRIES */ NULL,
- /* GSF_CARGOS */ NULL,
+ /* GSF_CARGOS */ NULL, /* Cargo is handled during reservation */
/* GSF_SOUNDFX */ SoundEffectChangeInfo,
};
@@ -1394,8 +1781,8 @@
buf++;
uint8 feature = grf_load_byte(&buf);
uint8 numprops = grf_load_byte(&buf);
- uint8 numinfo = grf_load_byte(&buf);
- uint8 engine = grf_load_byte(&buf);
+ uint numinfo = grf_load_byte(&buf);
+ uint engine = grf_load_byte(&buf);
grfmsg(6, "FeatureChangeInfo: feature %d, %d properties, to apply to %d+%d",
feature, numprops, engine, numinfo);
@@ -1424,27 +1811,27 @@
case GSF_AIRCRAFT:
/* Common properties for vehicles */
switch (prop) {
- case 0x00: /* Introduction date */
+ case 0x00: // Introduction date
FOR_EACH_OBJECT ei[i].base_intro = grf_load_word(&buf) + DAYS_TILL_ORIGINAL_BASE_YEAR;
break;
- case 0x02: /* Decay speed */
+ case 0x02: // Decay speed
FOR_EACH_OBJECT SB(ei[i].unk2, 0, 7, grf_load_byte(&buf) & 0x7F);
break;
- case 0x03: /* Vehicle life */
+ case 0x03: // Vehicle life
FOR_EACH_OBJECT ei[i].lifelength = grf_load_byte(&buf);
break;
- case 0x04: /* Model life */
+ case 0x04: // Model life
FOR_EACH_OBJECT ei[i].base_life = grf_load_byte(&buf);
break;
- case 0x06: /* Climates available */
+ case 0x06: // Climates available
FOR_EACH_OBJECT ei[i].climates = grf_load_byte(&buf);
break;
- case 0x07: /* Loading speed */
+ case 0x07: // Loading speed
/* Hyronymus explained me what does
* this mean and insists on having a
* credit ;-). --pasky */
@@ -1521,7 +1908,7 @@
switch (feature) {
case GSF_GLOBALVAR:
switch (prop) {
- case 0x09: /* Cargo Translation Table */
+ case 0x09: // Cargo Translation Table
if (index != 0) {
grfmsg(1, "InitChangeInfo: Cargo translation table must start at zero");
return;
@@ -1543,6 +1930,35 @@
}
}
+/* Action 0x00 (GLS_RESERVE) */
+static void ReserveChangeInfo(byte *buf, int len)
+{
+ byte *bufend = buf + len;
+
+ if (len == 1) {
+ grfmsg(8, "Silently ignoring one-byte special sprite 0x00");
+ return;
+ }
+
+ if (!check_length(len, 6, "InitChangeInfo")) return;
+ buf++;
+ uint8 feature = grf_load_byte(&buf);
+
+ if (feature != GSF_CARGOS) return;
+
+ uint8 numprops = grf_load_byte(&buf);
+ uint8 numinfo = grf_load_byte(&buf);
+ uint8 index = grf_load_byte(&buf);
+
+ while (numprops-- && buf < bufend) {
+ uint8 prop = grf_load_byte(&buf);
+
+ if (CargoChangeInfo(index, numinfo, prop, &buf, bufend - buf)) {
+ grfmsg(2, "FeatureChangeInfo: Ignoring property 0x%02X (not implemented)", prop);
+ }
+ }
+}
+
#undef FOR_EACH_OBJECT
/**
@@ -1556,8 +1972,8 @@
group->type = SGT_CALLBACK;
- // Old style callback results have the highest byte 0xFF so signify it is a callback result
- // New style ones only have the highest bit set (allows 15-bit results, instead of just 8)
+ /* Old style callback results have the highest byte 0xFF so signify it is a callback result
+ * New style ones only have the highest bit set (allows 15-bit results, instead of just 8) */
if ((value >> 8) == 0xFF) {
value &= ~0xFF00;
} else {
@@ -1614,7 +2030,7 @@
_cur_spriteid, feature, num_sets, num_ents, num_sets * num_ents
);
- for (uint i = 0; i < num_sets * num_ents; i++) {
+ for (uint16 i = 0; i < num_sets * num_ents; i++) {
LoadNextSprite(_cur_spriteid++, _file_index);
_nfo_line++;
}
@@ -1688,9 +2104,9 @@
uint8 type = grf_load_byte(&buf);
if (setid >= _cur_grffile->spritegroups_count) {
- // Allocate memory for new sprite group references.
+ /* Allocate memory for new sprite group references. */
_cur_grffile->spritegroups = ReallocT(_cur_grffile->spritegroups, setid + 1);
- // Initialise new space to NULL
+ /* Initialise new space to NULL */
for (; _cur_grffile->spritegroups_count < (setid + 1); _cur_grffile->spritegroups_count++)
_cur_grffile->spritegroups[_cur_grffile->spritegroups_count] = NULL;
}
@@ -1815,6 +2231,7 @@
case GSF_SHIP:
case GSF_AIRCRAFT:
case GSF_STATION:
+ case GSF_CARGOS:
{
byte sprites = _cur_grffile->spriteset_numents;
byte num_loaded = type;
@@ -1853,6 +2270,86 @@
break;
}
+ case GSF_TOWNHOUSE: {
+ byte sprites = _cur_grffile->spriteset_numents;
+ byte num_sprites = max((uint8)1, type);
+ uint i;
+
+ group = AllocateSpriteGroup();
+ group->type = SGT_TILELAYOUT;
+ group->g.layout.num_sprites = sprites;
+ group->g.layout.dts = CallocT<DrawTileSprites>(1);
+
+ /* Groundsprite */
+ group->g.layout.dts->ground_sprite = grf_load_word(&buf);
+ group->g.layout.dts->ground_pal = grf_load_word(&buf);
+ /* Remap transparent/colour modifier bits */
+ if (HASBIT(group->g.layout.dts->ground_sprite, 14)) {
+ CLRBIT(group->g.layout.dts->ground_sprite, 14);
+ SETBIT(group->g.layout.dts->ground_sprite, PALETTE_MODIFIER_TRANSPARENT);
+ }
+ if (HASBIT(group->g.layout.dts->ground_sprite, 15)) {
+ CLRBIT(group->g.layout.dts->ground_sprite, 15);
+ SETBIT(group->g.layout.dts->ground_sprite, PALETTE_MODIFIER_COLOR);
+ }
+ if (HASBIT(group->g.layout.dts->ground_pal, 14)) {
+ CLRBIT(group->g.layout.dts->ground_pal, 14);
+ SETBIT(group->g.layout.dts->ground_sprite, SPRITE_MODIFIER_OPAQUE);
+ }
+ if (HASBIT(group->g.layout.dts->ground_pal, 15)) {
+ /* Bit 31 set means this is a custom sprite, so rewrite it to the
+ * last spriteset defined. */
+ SpriteID sprite = _cur_grffile->spriteset_start + GB(group->g.layout.dts->ground_sprite, 0, 14) * sprites;
+ SB(group->g.layout.dts->ground_sprite, 0, SPRITE_WIDTH, sprite);
+ CLRBIT(group->g.layout.dts->ground_pal, 15);
+ }
+
+ group->g.layout.dts->seq = CallocT<DrawTileSeqStruct>(num_sprites + 1);
+
+ for (i = 0; i < num_sprites; i++) {
+ DrawTileSeqStruct *seq = (DrawTileSeqStruct*)&group->g.layout.dts->seq[i];
+
+ seq->image = grf_load_word(&buf);
+ seq->pal = grf_load_word(&buf);
+ seq->delta_x = grf_load_byte(&buf);
+ seq->delta_y = grf_load_byte(&buf);
+
+ if (HASBIT(seq->image, 14)) {
+ CLRBIT(seq->image, 14);
+ SETBIT(seq->image, PALETTE_MODIFIER_TRANSPARENT);
+ }
+ if (HASBIT(seq->image, 15)) {
+ CLRBIT(seq->image, 15);
+ SETBIT(seq->image, PALETTE_MODIFIER_COLOR);
+ }
+ if (HASBIT(seq->pal, 14)) {
+ CLRBIT(seq->pal, 14);
+ SETBIT(seq->image, SPRITE_MODIFIER_OPAQUE);
+ }
+ if (HASBIT(seq->pal, 15)) {
+ /* Bit 31 set means this is a custom sprite, so rewrite it to the
+ * last spriteset defined. */
+ SpriteID sprite = _cur_grffile->spriteset_start + GB(seq->image, 0, 14) * sprites;
+ SB(seq->image, 0, SPRITE_WIDTH, sprite);
+ CLRBIT(seq->pal, 15);
+ }
+
+ if (type > 0) {
+ seq->delta_z = grf_load_byte(&buf);
+ if ((byte)seq->delta_z == 0x80) continue;
+ }
+
+ seq->size_x = grf_load_byte(&buf);
+ seq->size_y = grf_load_byte(&buf);
+ seq->size_z = grf_load_byte(&buf);
+ }
+
+ /* Set the terminator value. */
+ ((DrawTileSeqStruct*)group->g.layout.dts->seq)[i].delta_x = (byte)0x80;
+
+ break;
+ }
+
/* Loading of Tile Layout and Production Callback groups would happen here */
default: grfmsg(1, "NewSpriteGroup: Unsupported feature %d, skipping", feature);
}
@@ -1868,14 +2365,35 @@
if (feature == GSF_STATION && ctype == 0xFE) return CT_DEFAULT_NA;
if (ctype == 0xFF) return CT_PURCHASE;
+ if (_cur_grffile->cargo_max == 0) {
+ /* No cargo table, so use bitnum values */
+ if (ctype >= 32) {
+ grfmsg(1, "FeatureMapSpriteGroup: Cargo bitnum %d out of range (max 31), skipping.", ctype);
+ return CT_INVALID;
+ }
+
+ for (CargoID c = 0; c < NUM_CARGO; c++) {
+ const CargoSpec *cs = GetCargo(c);
+ if (!cs->IsValid()) continue;
+
+ if (cs->bitnum == ctype) {
+ grfmsg(6, "FeatureMapSpriteGroup: Cargo bitnum %d mapped to cargo type %d.", ctype, c);
+ return c;
+ }
+ }
+
+ grfmsg(5, "FeatureMapSpriteGroup: Cargo bitnum %d not available in this climate, skipping.", ctype);
+ return CT_INVALID;
+ }
+
/* Check if the cargo type is out of bounds of the cargo translation table */
- if (ctype >= (_cur_grffile->cargo_max == 0 ? _default_cargo_max : _cur_grffile->cargo_max)) {
- grfmsg(1, "FeatureMapSpriteGroup: Cargo type %d out of range (max %d), skipping.", ctype, (_cur_grffile->cargo_max == 0 ? _default_cargo_max : _cur_grffile->cargo_max) - 1);
+ if (ctype >= _cur_grffile->cargo_max) {
+ grfmsg(1, "FeatureMapSpriteGroup: Cargo type %d out of range (max %d), skipping.", ctype, _cur_grffile->cargo_max - 1);
return CT_INVALID;
}
/* Look up the cargo label from the translation table */
- CargoLabel cl = _cur_grffile->cargo_max == 0 ? _default_cargo_list[ctype] : _cur_grffile->cargo_list[ctype];
+ CargoLabel cl = _cur_grffile->cargo_list[ctype];
if (cl == 0) {
grfmsg(5, "FeatureMapSpriteGroup: Cargo type %d not available in this climate, skipping.", ctype);
return CT_INVALID;
@@ -1891,127 +2409,27 @@
return ctype;
}
-/* Action 0x03 */
-static void FeatureMapSpriteGroup(byte *buf, int len)
+
+static void VehicleMapSpriteGroup(byte *buf, byte feature, uint8 idcount, uint8 cidcount, bool wagover)
{
- /* <03> <feature> <n-id> <ids>... <num-cid> [<cargo-type> <cid>]... <def-cid>
- * id-list := [<id>] [id-list]
- * cargo-list := <cargo-type> <cid> [cargo-list]
- *
- * B feature see action 0
- * B n-id bits 0-6: how many IDs this definition applies to
- * bit 7: if set, this is a wagon override definition (see below)
- * B ids the IDs for which this definition applies
- * B num-cid number of cargo IDs (sprite group IDs) in this definition
- * can be zero, in that case the def-cid is used always
- * B cargo-type type of this cargo type (e.g. mail=2, wood=7, see below)
- * W cid cargo ID (sprite group ID) for this type of cargo
- * W def-cid default cargo ID (sprite group ID) */
- /* TODO: Bridges, town houses. */
- /* TODO: Multiple cargo support could be useful even for trains/cars -
- * cargo id 0xff is used for showing images in the build train list. */
-
static byte *last_engines;
static int last_engines_count;
- if (!check_length(len, 6, "FeatureMapSpriteGroup")) return;
-
- uint8 feature = buf[1];
- uint8 idcount = buf[2] & 0x7F;
- bool wagover = (buf[2] & 0x80) == 0x80;
-
- if (!check_length(len, 3 + idcount, "FeatureMapSpriteGroup")) return;
-
- /* If idcount is zero, this is a feature callback */
- if (idcount == 0) {
- grfmsg(2, "FeatureMapSpriteGroup: Feature callbacks not implemented yet");
- return;
- }
-
- uint8 cidcount = buf[3 + idcount];
- if (!check_length(len, 4 + idcount + cidcount * 3, "FeatureMapSpriteGroup")) return;
-
- grfmsg(6, "FeatureMapSpriteGroup: Feature %d, %d ids, %d cids, wagon override %d",
- feature, idcount, cidcount, wagover);
-
- if (feature > GSF_STATION) {
- grfmsg(1, "FeatureMapSpriteGroup: Unsupported feature %d, skipping", feature);
- return;
- }
-
-
- if (feature == GSF_STATION) {
- // We do things differently for stations.
-
- for (uint i = 0; i < idcount; i++) {
- uint8 stid = buf[3 + i];
- StationSpec *statspec = _cur_grffile->stations[stid];
- byte *bp = &buf[4 + idcount];
-
- for (uint c = 0; c < cidcount; c++) {
- uint8 ctype = grf_load_byte(&bp);
- uint16 groupid = grf_load_word(&bp);
-
- if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
- grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping",
- groupid, _cur_grffile->spritegroups_count);
- return;
- }
-
- ctype = TranslateCargo(feature, ctype);
- if (ctype == CT_INVALID) continue;
-
- statspec->spritegroup[ctype] = _cur_grffile->spritegroups[groupid];
- }
+ if (!wagover) {
+ if (last_engines_count != idcount) {
+ last_engines = ReallocT(last_engines, idcount);
+ last_engines_count = idcount;
}
-
- {
- byte *bp = buf + 4 + idcount + cidcount * 3;
- uint16 groupid = grf_load_word(&bp);
-
- if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
- grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping",
- groupid, _cur_grffile->spritegroups_count);
- return;
- }
-
- for (uint i = 0; i < idcount; i++) {
- uint8 stid = buf[3 + i];
- StationSpec *statspec = _cur_grffile->stations[stid];
-
- statspec->spritegroup[CT_DEFAULT] = _cur_grffile->spritegroups[groupid];
- statspec->grfid = _cur_grffile->grfid;
- statspec->localidx = stid;
- SetCustomStationSpec(statspec);
- }
- }
- return;
- }
-
- // FIXME: Tropicset contains things like:
- // 03 00 01 19 01 00 00 00 00 - this is missing one 00 at the end,
- // what should we exactly do with that? --pasky
-
- if (_cur_grffile->spriteset_start == 0 || _cur_grffile->spritegroups == 0) {
- grfmsg(1, "FeatureMapSpriteGroup: No sprite set to work on! Skipping");
- return;
- }
-
- if (!wagover && last_engines_count != idcount) {
- last_engines = ReallocT(last_engines, idcount);
- last_engines_count = idcount;
- }
-
- if (wagover) {
+ } else {
if (last_engines_count == 0) {
grfmsg(0, "FeatureMapSpriteGroup: WagonOverride: No engine to do override with");
return;
}
+
grfmsg(6, "FeatureMapSpriteGroup: WagonOverride: %u engines, %u wagons",
last_engines_count, idcount);
}
-
for (uint i = 0; i < idcount; i++) {
uint8 engine_id = buf[3 + i];
uint8 engine = engine_id + _vehshifts[feature];
@@ -2032,7 +2450,7 @@
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping", groupid, _cur_grffile->spritegroups_count);
- return;
+ continue;
}
ctype = TranslateCargo(feature, ctype);
@@ -2048,7 +2466,7 @@
}
{
- byte *bp = buf + 4 + idcount + cidcount * 3;
+ byte *bp = &buf[4 + idcount + cidcount * 3];
uint16 groupid = grf_load_word(&bp);
grfmsg(8, "-- Default group id 0x%04X", groupid);
@@ -2056,19 +2474,20 @@
for (uint i = 0; i < idcount; i++) {
uint8 engine = buf[3 + i] + _vehshifts[feature];
- // Don't tell me you don't love duplicated code!
+ /* Don't tell me you don't love duplicated code! */
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
- grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping", groupid, _cur_grffile->spritegroups_count);
- return;
+ grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping",
+ groupid, _cur_grffile->spritegroups_count);
+ continue;
}
if (wagover) {
/* If the ID for this action 3 is the same as the vehicle ID,
- * this indicates we have a helicopter rotor override. */
+ * this indicates we have a helicopter rotor override. */
if (feature == GSF_AIRCRAFT && engine == last_engines[i]) {
SetRotorOverrideSprites(engine, _cur_grffile->spritegroups[groupid]);
} else {
- // TODO: No multiple cargo types per vehicle yet. --pasky
+ /* TODO: No multiple cargo types per vehicle yet. --pasky */
SetWagonOverrideSprites(engine, CT_DEFAULT, _cur_grffile->spritegroups[groupid], last_engines, last_engines_count);
}
} else {
@@ -2080,6 +2499,173 @@
}
}
+
+static void StationMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
+{
+ for (uint i = 0; i < idcount; i++) {
+ uint8 stid = buf[3 + i];
+ StationSpec *statspec = _cur_grffile->stations[stid];
+ byte *bp = &buf[4 + idcount];
+
+ for (uint c = 0; c < cidcount; c++) {
+ uint8 ctype = grf_load_byte(&bp);
+ uint16 groupid = grf_load_word(&bp);
+
+ if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
+ grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping",
+ groupid, _cur_grffile->spritegroups_count);
+ continue;
+ }
+
+ ctype = TranslateCargo(GSF_STATION, ctype);
+ if (ctype == CT_INVALID) continue;
+
+ statspec->spritegroup[ctype] = _cur_grffile->spritegroups[groupid];
+ }
+ }
+
+ {
+ byte *bp = &buf[4 + idcount + cidcount * 3];
+ uint16 groupid = grf_load_word(&bp);
+
+ if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
+ grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping",
+ groupid, _cur_grffile->spritegroups_count);
+ return;
+ }
+
+ for (uint i = 0; i < idcount; i++) {
+ uint8 stid = buf[3 + i];
+ StationSpec *statspec = _cur_grffile->stations[stid];
+
+ statspec->spritegroup[CT_DEFAULT] = _cur_grffile->spritegroups[groupid];
+ statspec->grfid = _cur_grffile->grfid;
+ statspec->localidx = stid;
+ SetCustomStationSpec(statspec);
+ }
+ }
+}
+
+
+static void TownHouseMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
+{
+ byte *bp = &buf[4 + idcount + cidcount * 3];
+ uint16 groupid = grf_load_word(&bp);
+
+ if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
+ grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.",
+ groupid, _cur_grffile->spritegroups_count);
+ return;
+ }
+
+ for (uint i = 0; i < idcount; i++) {
+ uint8 hid = buf[3 + i];
+ HouseSpec *hs = _cur_grffile->housespec[hid];
+
+ if (hs == NULL) {
+ grfmsg(1, "FeatureMapSpriteGroup: Too many houses defined, skipping");
+ return;
+ }
+
+ hs->spritegroup = _cur_grffile->spritegroups[groupid];
+ }
+}
+
+
+static void CargoMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
+{
+ byte *bp = &buf[4 + idcount + cidcount * 3];
+ uint16 groupid = grf_load_word(&bp);
+
+ if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
+ grfmsg(1, "FeatureMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.",
+ groupid, _cur_grffile->spritegroups_count);
+ return;
+ }
+
+ for (uint i = 0; i < idcount; i++) {
+ CargoID cid = buf[3 + i];
+
+ if (cid >= NUM_CARGO) {
+ grfmsg(1, "FeatureMapSpriteGroup: Cargo ID %d out of range, skipping");
+ continue;
+ }
+
+ CargoSpec *cs = &_cargo[cid];
+ cs->grfid = _cur_grffile->grfid;
+ cs->group = _cur_grffile->spritegroups[groupid];
+ }
+}
+
+
+/* Action 0x03 */
+static void FeatureMapSpriteGroup(byte *buf, int len)
+{
+ /* <03> <feature> <n-id> <ids>... <num-cid> [<cargo-type> <cid>]... <def-cid>
+ * id-list := [<id>] [id-list]
+ * cargo-list := <cargo-type> <cid> [cargo-list]
+ *
+ * B feature see action 0
+ * B n-id bits 0-6: how many IDs this definition applies to
+ * bit 7: if set, this is a wagon override definition (see below)
+ * B ids the IDs for which this definition applies
+ * B num-cid number of cargo IDs (sprite group IDs) in this definition
+ * can be zero, in that case the def-cid is used always
+ * B cargo-type type of this cargo type (e.g. mail=2, wood=7, see below)
+ * W cid cargo ID (sprite group ID) for this type of cargo
+ * W def-cid default cargo ID (sprite group ID) */
+
+ if (!check_length(len, 6, "FeatureMapSpriteGroup")) return;
+
+ uint8 feature = buf[1];
+ uint8 idcount = buf[2] & 0x7F;
+ bool wagover = (buf[2] & 0x80) == 0x80;
+
+ if (!check_length(len, 3 + idcount, "FeatureMapSpriteGroup")) return;
+
+ /* If idcount is zero, this is a feature callback */
+ if (idcount == 0) {
+ grfmsg(2, "FeatureMapSpriteGroup: Feature callbacks not implemented yet");
+ return;
+ }
+
+ uint8 cidcount = buf[3 + idcount];
+ if (!check_length(len, 4 + idcount + cidcount * 3, "FeatureMapSpriteGroup")) return;
+
+ grfmsg(6, "FeatureMapSpriteGroup: Feature %d, %d ids, %d cids, wagon override %d",
+ feature, idcount, cidcount, wagover);
+
+ if (_cur_grffile->spriteset_start == 0 || _cur_grffile->spritegroups == 0) {
+ grfmsg(1, "FeatureMapSpriteGroup: No sprite set to work on! Skipping");
+ return;
+ }
+
+ switch (feature) {
+ case GSF_TRAIN:
+ case GSF_ROAD:
+ case GSF_SHIP:
+ case GSF_AIRCRAFT:
+ VehicleMapSpriteGroup(buf, feature, idcount, cidcount, wagover);
+ return;
+
+ case GSF_STATION:
+ StationMapSpriteGroup(buf, idcount, cidcount);
+ return;
+
+ case GSF_TOWNHOUSE:
+ TownHouseMapSpriteGroup(buf, idcount, cidcount);
+ return;
+
+ case GSF_CARGOS:
+ CargoMapSpriteGroup(buf, idcount, cidcount);
+ return;
+
+ default:
+ grfmsg(1, "FeatureMapSpriteGroup: Unsupported feature %d, skipping", feature);
+ return;
+ }
+}
+
/* Action 0x04 */
static void FeatureNewName(byte *buf, int len)
{
@@ -2148,9 +2734,10 @@
break;
}
+ case GSF_TOWNHOUSE:
default:
switch (GB(id, 8, 8)) {
- case 0xC4: /* Station class name */
+ case 0xC4: // Station class name
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
@@ -2159,7 +2746,7 @@
}
break;
- case 0xC5: /* Station name */
+ case 0xC5: // Station name
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
@@ -2167,7 +2754,15 @@
}
break;
- case 0xC9:
+ case 0xC9: { // House name
+ if (_cur_grffile->housespec == NULL || _cur_grffile->housespec[GB(id, 0, 8)] == NULL) {
+ grfmsg(1, "FeatureNewName: Attempt to name undefined house 0x%X, ignoring.", GB(id, 0, 8));
+ } else {
+ _cur_grffile->housespec[GB(id, 0, 8)]->building_name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ }
+ break;
+ }
+
case 0xD0:
case 0xDC:
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
@@ -2182,17 +2777,16 @@
#if 0
case GSF_CANAL :
case GSF_BRIDGE :
- case GSF_TOWNHOUSE :
AddGRFString(_cur_spriteid, id, lang, name);
switch (GB(id, 8,8)) {
- case 0xC9: /* House name */
+ case 0xC9: // House name
default:
grfmsg(7, "FeatureNewName: Unsupported ID (0x%04X)", id);
}
break;
case GSF_INDUSTRIES :
- case 0x48 : /* for generic strings */
+ case 0x48 : // for generic strings
AddGRFString(_cur_spriteid, id, lang, name);
break;
default :
@@ -2222,7 +2816,7 @@
uint16 num = grf_load_extended(&buf);
switch (type) {
- case 0x04: /* Signal graphics */
+ case 0x04: // Signal graphics
if (num != 112 && num != 240) {
grfmsg(1, "GraphicsNews: Signal graphics sprite count must be 112 or 240, skipping");
return;
@@ -2230,7 +2824,7 @@
_signal_base = _cur_spriteid;
break;
- case 0x05: /* Catenary graphics */
+ case 0x05: // Catenary graphics
if (num != 48) {
grfmsg(1, "GraphicsNews: Catenary graphics sprite count must be 48, skipping");
return;
@@ -2238,7 +2832,7 @@
replace = SPR_ELRAIL_BASE + 3;
break;
- case 0x06: /* Foundations */
+ case 0x06: // Foundations
if (num != 74) {
grfmsg(1, "GraphicsNews: Foundation graphics sprite count must be 74, skipping");
return;
@@ -2246,7 +2840,7 @@
replace = SPR_SLOPES_BASE;
break;
- case 0x08: /* Canal graphics */
+ case 0x08: // Canal graphics
if (num != 65) {
grfmsg(1, "GraphicsNews: Canal graphics sprite count must be 65, skipping");
return;
@@ -2254,7 +2848,7 @@
replace = SPR_CANALS_BASE + 5;
break;
- case 0x0D: /* Coast graphics */
+ case 0x0D: // Coast graphics
if (num != 16) {
grfmsg(1, "GraphicsNews: Coast graphics sprite count must be 16, skipping");
return;
@@ -2283,16 +2877,16 @@
static uint32 GetParamVal(byte param, uint32 *cond_val)
{
switch (param) {
- case 0x81: /* current year */
+ case 0x81: // current year
return clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR;
- case 0x83: /* current climate, 0=temp, 1=arctic, 2=trop, 3=toyland */
+ case 0x83: // current climate, 0=temp, 1=arctic, 2=trop, 3=toyland
return _opt.landscape;
- case 0x84: /* GRF loading stage */
+ case 0x84: // GRF loading stage
return (_cur_stage > GLS_INIT) | ((_cur_stage == GLS_ACTIVATION) << 9);
- case 0x85: /* TTDPatch flags, only for bit tests */
+ case 0x85: // TTDPatch flags, only for bit tests
if (cond_val == NULL) {
/* Supported in Action 0x07 and 0x09, not 0x0D */
return 0;
@@ -2302,13 +2896,13 @@
return param_val;
}
- case 0x86: /* road traffic side, bit 4 clear=left, set=right */
+ case 0x86: // road traffic side, bit 4 clear=left, set=right
return _opt.road_side << 4;
- case 0x88: /* GRF ID check */
+ case 0x88: // GRF ID check
return 0;
- case 0x8B: { /* TTDPatch version */
+ case 0x8B: { // TTDPatch version
uint major = 2;
uint minor = 6;
uint revision = 0; // special case: 2.0.1 is 2.0.10
@@ -2316,22 +2910,22 @@
return (major << 24) | (minor << 20) | (revision << 16) | build;
}
- case 0x8D: /* TTD Version, 00=DOS, 01=Windows */
+ case 0x8D: // TTD Version, 00=DOS, 01=Windows
return !_use_dos_palette;
- case 0x8E: /* Y-offset for train sprites */
+ case 0x8E: // Y-offset for train sprites
return _traininfo_vehicle_pitch;
- case 0x92: /* Game mode */
+ case 0x92: // Game mode
return _game_mode;
- case 0x9A: /* Always -1 */
+ case 0x9A: // Always -1
return UINT_MAX;
- case 0x9D: /* TTD Platform, 00=TTDPatch, 01=OpenTTD */
+ case 0x9D: // TTD Platform, 00=TTDPatch, 01=OpenTTD
return 1;
- case 0x9E: /* Miscellaneous GRF features */
+ case 0x9E: // Miscellaneous GRF features
return _misc_grf_features;
default:
@@ -2479,23 +3073,23 @@
switch (condtype) {
/* Tests 6 to 10 are only for param 0x88, GRFID checks */
- case 6: /* Is GRFID active? */
+ case 6: // Is GRFID active?
result = c->status == GCS_ACTIVATED;
break;
- case 7: /* Is GRFID non-active? */
+ case 7: // Is GRFID non-active?
result = c->status != GCS_ACTIVATED;
break;
- case 8: /* GRFID is not but will be active? */
+ case 8: // GRFID is not but will be active?
result = c->status == GCS_INITIALISED;
break;
- case 9: /* GRFID is or will be active? */
+ case 9: // GRFID is or will be active?
result = c->status == GCS_ACTIVATED || c->status == GCS_INITIALISED;
break;
- case 10: /* GRFID is not nor will be active */
+ case 10: // GRFID is not nor will be active
/* This is the only condtype that doesn't get ignored if the GRFID is not found */
result = c == NULL || c->flags == GCS_DISABLED || c->status == GCS_NOT_FOUND;
break;
@@ -2562,7 +3156,7 @@
_skip_sprites = -1;
/* If an action 8 hasn't been encountered yet, disable the grf. */
- if (_cur_grfconfig->status != GCS_ACTIVATED) _cur_grfconfig->status = GCS_DISABLED;
+ if (_cur_stage != GLS_RESERVE && _cur_grfconfig->status != GCS_ACTIVATED) _cur_grfconfig->status = GCS_DISABLED;
}
}
@@ -2629,7 +3223,7 @@
* B num-sprites How many sprites are in this set
* W first-sprite First sprite number to replace */
- buf++; /* skip action byte */
+ buf++; // skip action byte
uint8 num_sets = grf_load_byte(&buf);
for (uint i = 0; i < num_sets; i++) {
@@ -2695,7 +3289,7 @@
/* For now we can only show one message per newgrf file. */
if (_cur_grfconfig->error != NULL) return;
- buf++; /* Skip the action byte. */
+ buf++; // Skip the action byte.
byte severity = grf_load_byte(&buf);
byte lang = grf_load_byte(&buf);
byte message_id = grf_load_byte(&buf);
@@ -2865,10 +3459,10 @@
uint16 count = GB(data, 16, 16);
switch (feature) {
- case 0x00: /* Trains */
- case 0x01: /* Road Vehicles */
- case 0x02: /* Ships */
- case 0x03: /* Aircraft */
+ case 0x00: // Trains
+ case 0x01: // Road Vehicles
+ case 0x02: // Ships
+ case 0x03: // Aircraft
{
uint start = 0;
uint size = 0;
@@ -2919,7 +3513,7 @@
break;
}
- case 0x08: /* General sprites */
+ case 0x08: // General sprites
switch (op) {
case 0:
/* Check if the allocated sprites will fit below the original sprite limit */
@@ -3013,15 +3607,15 @@
}
break;
- case 0x07: /* Bitwise AND */
+ case 0x07: // Bitwise AND
res = src1 & src2;
break;
- case 0x08: /* Bitwise OR */
+ case 0x08: // Bitwise OR
res = src1 | src2;
break;
- case 0x09: /* Unsigned division */
+ case 0x09: // Unsigned division
if (src2 == 0) {
res = src1;
} else {
@@ -3029,7 +3623,7 @@
}
break;
- case 0x0A: /* Signed divison */
+ case 0x0A: // Signed divison
if (src2 == 0) {
res = src1;
} else {
@@ -3037,7 +3631,7 @@
}
break;
- case 0x0B: /* Unsigned modulo */
+ case 0x0B: // Unsigned modulo
if (src2 == 0) {
res = src1;
} else {
@@ -3045,7 +3639,7 @@
}
break;
- case 0x0C: /* Signed modulo */
+ case 0x0C: // Signed modulo
if (src2 == 0) {
res = src1;
} else {
@@ -3061,7 +3655,7 @@
_traininfo_vehicle_pitch = res;
break;
- // TODO implement
+ /* @todo implement */
case 0x8F: // Rail track type cost factors
case 0x93: // Tile refresh offset to left
case 0x94: // Tile refresh offset to right
@@ -3072,7 +3666,7 @@
grfmsg(7, "ParamSet: Skipping unimplemented target 0x%02X", target);
break;
- case 0x9E: /* Miscellaneous GRF features */
+ case 0x9E: // Miscellaneous GRF features
_misc_grf_features = res;
/* Set train list engine width */
_traininfo_vehicle_width = HASBIT(res, 3) ? 32 : 29;
@@ -3266,7 +3860,7 @@
uint32 size = grf_load_dword(&buf);
switch (tag) {
- case ' tmf': /* 'fmt ' */
+ case ' tmf': // 'fmt '
/* Audio format, must be 1 (PCM) */
if (grf_load_word(&buf) != 1) {
grfmsg(1, "LoadGRFSound: Invalid audio format");
@@ -3282,7 +3876,7 @@
for (; size > 16; size--) grf_load_byte(&buf);
break;
- case 'atad': /* 'data' */
+ case 'atad': // 'data'
se->file_size = size;
se->file_offset = FioGetPos() - (len - (buf - buf_start)) + 1;
se->file_offset |= _file_index << 24;
@@ -3478,7 +4072,7 @@
| (1 << 0x16) // canals
| (1 << 0x17) // newstartyear
| (0 << 0x18) // freighttrains
- | (0 << 0x19) // newhouses
+ | (1 << 0x19) // newhouses
| (1 << 0x1A) // newbridges
| (0 << 0x1B) // newtownnames
| (0 << 0x1C) // moreanimations
@@ -3550,6 +4144,20 @@
}
}
+static void ResetCustomHouses()
+{
+ GRFFile *file;
+ uint i;
+
+ for (file = _first_grffile; file != NULL; file = file->next) {
+ if (file->housespec == NULL) continue;
+ for (i = 0; i < HOUSE_MAX; i++) free(file->housespec[i]);
+
+ free(file->housespec);
+ file->housespec = NULL;
+ }
+}
+
static void ResetNewGRF()
{
GRFFile *next;
@@ -3573,15 +4181,15 @@
{
CleanUpStrings();
- // Copy/reset original engine info data
+ /* Copy/reset original engine info data */
memcpy(&_engine_info, &orig_engine_info, sizeof(orig_engine_info));
memcpy(&_rail_vehicle_info, &orig_rail_vehicle_info, sizeof(orig_rail_vehicle_info));
memcpy(&_ship_vehicle_info, &orig_ship_vehicle_info, sizeof(orig_ship_vehicle_info));
memcpy(&_aircraft_vehicle_info, &orig_aircraft_vehicle_info, sizeof(orig_aircraft_vehicle_info));
memcpy(&_road_vehicle_info, &orig_road_vehicle_info, sizeof(orig_road_vehicle_info));
- // Copy/reset original bridge info data
- // First, free sprite table data
+ /* Copy/reset original bridge info data
+ * First, free sprite table data */
for (uint i = 0; i < MAX_BRIDGES; i++) {
if (_bridge[i].sprite_table != NULL) {
for (uint j = 0; j < 7; j++) free(_bridge[i].sprite_table[j]);
@@ -3590,51 +4198,52 @@
}
memcpy(&_bridge, &orig_bridge, sizeof(_bridge));
- // Reset refit/cargo class data
+ /* Reset refit/cargo class data */
memset(&cargo_allowed, 0, sizeof(cargo_allowed));
memset(&cargo_disallowed, 0, sizeof(cargo_disallowed));
- // Reset GRM reservations
+ /* Reset GRM reservations */
memset(&_grm_engines, 0, sizeof(_grm_engines));
- // Unload sprite group data
+ /* Unload sprite group data */
UnloadWagonOverrides();
UnloadRotorOverrideSprites();
UnloadCustomEngineSprites();
UnloadCustomEngineNames();
ResetEngineListOrder();
- // Reset price base data
+ /* Reset price base data */
ResetPriceBaseMultipliers();
/* Reset the curencies array */
ResetCurrencies();
- // Reset station classes
+ /* Reset the house array */
+ ResetCustomHouses();
+ ResetHouses();
+
+ /* Reset station classes */
ResetStationClasses();
ResetCustomStations();
+ /* Reset the snowline table. */
+ ClearSnowLine();
+
/* Reset NewGRF files */
ResetNewGRF();
- // Add engine type to engine data. This is needed for the refit precalculation.
+ /* Add engine type to engine data. This is needed for the refit precalculation. */
AddTypeToEngines();
/* Set up the default cargo types */
SetupCargoForClimate(_opt.landscape);
- /* Generate default cargo translation table */
- memset(_default_cargo_list, 0, sizeof(_default_cargo_list));
- for (CargoID c = 0; c != NUM_CARGO; c++) {
- const CargoSpec *cs = GetCargo(c);
- if (cs->IsValid()) _default_cargo_list[cs->bitnum] = cs->label;
- }
-
/* Reset misc GRF features and train list display variables */
_misc_grf_features = 0;
_traininfo_vehicle_pitch = 0;
_traininfo_vehicle_width = 29;
_have_2cc = false;
+ _have_newhouses = false;
_signal_base = 0;
_coast_base = 0;
@@ -3757,17 +4366,41 @@
uint32 mask = 0;
uint32 not_mask = 0;
- uint32 xor_mask = _engine_info[engine].refit_mask;
+ uint32 xor_mask = 0;
+
+ if (_engine_info[engine].refit_mask != 0) {
+ const GRFFile *file = GetEngineGRF(engine);
+ if (file != NULL && file->cargo_max != 0) {
+ /* Apply cargo translation table to the refit mask */
+ uint num_cargo = min(32, file->cargo_max);
+ for (uint i = 0; i < num_cargo; i++) {
+ if (!HASBIT(_engine_info[engine].refit_mask, i)) continue;
+
+ CargoID c = GetCargoIDByLabel(file->cargo_list[i]);
+ if (c == CT_INVALID) continue;
+
+ SETBIT(xor_mask, c);
+ }
+ } else {
+ /* No cargo table, so use the cargo bitnum values */
+ for (CargoID c = 0; c < NUM_CARGO; c++) {
+ const CargoSpec *cs = GetCargo(c);
+ if (!cs->IsValid()) continue;
+
+ if (HASBIT(_engine_info[engine].refit_mask, cs->bitnum)) SETBIT(xor_mask, c);
+ }
+ }
+ }
if (cargo_allowed[engine] != 0) {
- // Build up the list of cargo types from the set cargo classes.
+ /* Build up the list of cargo types from the set cargo classes. */
for (CargoID i = 0; i < NUM_CARGO; i++) {
const CargoSpec *cs = GetCargo(i);
if (cargo_allowed[engine] & cs->classes) SETBIT(mask, i);
if (cargo_disallowed[engine] & cs->classes) SETBIT(not_mask, i);
}
} else {
- // Don't apply default refit mask to wagons or engines with no capacity
+ /* Don't apply default refit mask to wagons or engines with no capacity */
if (xor_mask == 0 && (
GetEngine(engine)->type != VEH_TRAIN || (
RailVehInfo(engine)->capacity != 0 &&
@@ -3787,8 +4420,6 @@
}
_engine_info[engine].refit_mask = ((mask & ~not_mask) ^ xor_mask) & _cargo_mask;
- if (_engine_info[engine].refit_mask == 0) continue;
-
/* Check if this engine's cargo type is valid. If not, set to the first refittable
* cargo type. Apparently cargo_type isn't a common property... */
switch (GetEngine(engine)->type) {
@@ -3814,6 +4445,61 @@
}
}
+/** Add all new houses to the house array. House properties can be set at any
+ * time in the GRF file, so we can only add a house spec to the house array
+ * after the file has finished loading. We also need to check the dates, due to
+ * the TTDPatch behaviour described below that we need to emulate. */
+static void FinaliseHouseArray()
+{
+ /* If there are no houses with start dates before 1930, then all houses
+ * with start dates of 1930 have them reset to 0. This is in order to be
+ * compatible with TTDPatch, where if no houses have start dates before
+ * 1930 and the date is before 1930, the game pretends that this is 1930.
+ * If there have been any houses defined with start dates before 1930 then
+ * the dates are left alone. */
+ bool reset_dates = true;
+
+ for (GRFFile *file = _first_grffile; file != NULL; file = file->next) {
+ if (file->housespec == NULL) continue;
+
+ for (int i = 0; i < HOUSE_MAX; i++) {
+ HouseSpec *hs = file->housespec[i];
+ if (hs != NULL) {
+ SetHouseSpec(hs);
+ if (hs->min_date < 1930) reset_dates = false;
+ }
+ }
+ }
+
+ if (reset_dates) {
+ for (int i = NEW_HOUSE_OFFSET; i < HOUSE_MAX; i++) {
+ HouseSpec *hs = GetHouseSpecs(i);
+
+ if (hs->enabled && hs->min_date == 1930) hs->min_date = 0;
+ }
+ }
+}
+
+
+/** Each cargo string needs to be mapped from TTDPatch to OpenTTD string IDs.
+ * This is done after loading so that strings from Action 4 will be mapped
+ * properly. */
+static void MapNewCargoStrings()
+{
+ for (CargoID c = 0; c < NUM_CARGO; c++) {
+ CargoSpec *cs = &_cargo[c];
+ /* Don't map if the cargo is unavailable or not from NewGRF */
+ if (!cs->IsValid() || cs->grfid == 0) continue;
+
+ cs->name = MapGRFStringID(cs->grfid, cs->name);
+ cs->name_plural = MapGRFStringID(cs->grfid, cs->name_plural);
+ cs->units_volume = MapGRFStringID(cs->grfid, cs->units_volume);
+ cs->quantifier = MapGRFStringID(cs->grfid, cs->quantifier);
+ cs->abbrev = MapGRFStringID(cs->grfid, cs->abbrev);
+ }
+}
+
+
/* Here we perform initial decoding of some special sprites (as are they
* described at http://www.ttdpatch.net/src/newgrf.txt, but this is only a very
* partial implementation yet). */
@@ -3835,26 +4521,26 @@
* is not in memory and scanning the file every time would be too expensive.
* In other stages we skip action 0x10 since it's already dealt with. */
static const SpecialSpriteHandler handlers[][GLS_END] = {
- /* 0x00 */ { NULL, SafeChangeInfo, NULL, InitChangeInfo, FeatureChangeInfo, },
- /* 0x01 */ { NULL, GRFUnsafe, NULL, NULL, NewSpriteSet, },
- /* 0x02 */ { NULL, GRFUnsafe, NULL, NULL, NewSpriteGroup, },
- /* 0x03 */ { NULL, GRFUnsafe, NULL, NULL, FeatureMapSpriteGroup, },
- /* 0x04 */ { NULL, NULL, NULL, NULL, FeatureNewName, },
- /* 0x05 */ { NULL, NULL, NULL, NULL, GraphicsNew, },
- /* 0x06 */ { NULL, NULL, NULL, CfgApply, CfgApply, },
- /* 0x07 */ { NULL, NULL, NULL, NULL, SkipIf, },
- /* 0x08 */ { ScanInfo, NULL, NULL, GRFInfo, GRFInfo, },
- /* 0x09 */ { NULL, NULL, NULL, SkipIf, SkipIf, },
- /* 0x0A */ { NULL, NULL, NULL, NULL, SpriteReplace, },
- /* 0x0B */ { NULL, NULL, NULL, GRFLoadError, GRFLoadError, },
- /* 0x0C */ { NULL, NULL, NULL, GRFComment, GRFComment, },
- /* 0x0D */ { NULL, SafeParamSet, NULL, ParamSet, ParamSet, },
- /* 0x0E */ { NULL, SafeGRFInhibit, NULL, GRFInhibit, GRFInhibit, },
- /* 0x0F */ { NULL, NULL, NULL, NULL, NULL, },
- /* 0x10 */ { NULL, NULL, DefineGotoLabel, NULL, NULL, },
- /* 0x11 */ { NULL, GRFUnsafe, NULL, NULL, GRFSound, },
- /* 0x12 */ { NULL, NULL, NULL, NULL, LoadFontGlyph, },
- /* 0x13 */ { NULL, NULL, NULL, NULL, TranslateGRFStrings, },
+ /* 0x00 */ { NULL, SafeChangeInfo, NULL, InitChangeInfo, ReserveChangeInfo, FeatureChangeInfo, },
+ /* 0x01 */ { NULL, GRFUnsafe, NULL, NULL, NULL, NewSpriteSet, },
+ /* 0x02 */ { NULL, GRFUnsafe, NULL, NULL, NULL, NewSpriteGroup, },
+ /* 0x03 */ { NULL, GRFUnsafe, NULL, NULL, NULL, FeatureMapSpriteGroup, },
+ /* 0x04 */ { NULL, NULL, NULL, NULL, NULL, FeatureNewName, },
+ /* 0x05 */ { NULL, NULL, NULL, NULL, NULL, GraphicsNew, },
+ /* 0x06 */ { NULL, NULL, NULL, CfgApply, CfgApply, CfgApply, },
+ /* 0x07 */ { NULL, NULL, NULL, NULL, SkipIf, SkipIf, },
+ /* 0x08 */ { ScanInfo, NULL, NULL, GRFInfo, NULL, GRFInfo, },
+ /* 0x09 */ { NULL, NULL, NULL, SkipIf, SkipIf, SkipIf, },
+ /* 0x0A */ { NULL, NULL, NULL, NULL, NULL, SpriteReplace, },
+ /* 0x0B */ { NULL, NULL, NULL, GRFLoadError, GRFLoadError, GRFLoadError, },
+ /* 0x0C */ { NULL, NULL, NULL, GRFComment, NULL, GRFComment, },
+ /* 0x0D */ { NULL, SafeParamSet, NULL, ParamSet, ParamSet, ParamSet, },
+ /* 0x0E */ { NULL, SafeGRFInhibit, NULL, GRFInhibit, GRFInhibit, GRFInhibit, },
+ /* 0x0F */ { NULL, NULL, NULL, NULL, NULL, NULL, },
+ /* 0x10 */ { NULL, NULL, DefineGotoLabel, NULL, NULL, NULL, },
+ /* 0x11 */ { NULL, GRFUnsafe, NULL, NULL, NULL, GRFSound, },
+ /* 0x12 */ { NULL, NULL, NULL, NULL, NULL, LoadFontGlyph, },
+ /* 0x13 */ { NULL, NULL, NULL, NULL, NULL, TranslateGRFStrings, },
};
byte* buf;
@@ -3979,6 +4665,22 @@
void InitDepotWindowBlockSizes();
+static void AfterLoadGRFs()
+{
+ /* Pre-calculate all refit masks after loading GRF files. */
+ CalculateRefitMasks();
+
+ /* Set the block size in the depot windows based on vehicle sprite sizes */
+ InitDepotWindowBlockSizes();
+
+ /* Add all new houses to the house array. */
+ FinaliseHouseArray();
+
+ /* Map cargo strings. This is a separate step because cargos are
+ * loaded before strings... */
+ MapNewCargoStrings();
+}
+
void LoadNewGRF(uint load_index, uint file_index)
{
InitializeGRFSpecial();
@@ -3996,7 +4698,7 @@
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND) continue;
- // TODO usererror()
+ /* @todo usererror() */
if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
@@ -4009,9 +4711,6 @@
}
}
- // Pre-calculate all refit masks after loading GRF files
- CalculateRefitMasks();
-
- /* Set the block size in the depot windows based on vehicle sprite sizes */
- InitDepotWindowBlockSizes();
+ /* Call any functions that should be run after GRFs have been loaded. */
+ AfterLoadGRFs();
}
--- a/src/newgrf.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,9 +1,12 @@
/* $Id$ */
+/** @file newgrf.h */
+
#ifndef NEWGRF_H
#define NEWGRF_H
#include "station.h"
+#include "town.h"
#include "newgrf_config.h"
#include "helpers.hpp"
#include "cargotype.h"
@@ -13,6 +16,7 @@
GLS_SAFETYSCAN,
GLS_LABELSCAN,
GLS_INIT,
+ GLS_RESERVE,
GLS_ACTIVATION,
GLS_END,
};
@@ -56,9 +60,10 @@
uint sound_offset;
StationSpec **stations;
+ HouseSpec **housespec;
uint32 param[0x80];
- uint param_end; /// one more than the highest set parameter
+ uint param_end; ///< one more than the highest set parameter
GRFLabel *label; ///< Pointer to the first label. This is a linked list, not an array.
@@ -72,10 +77,11 @@
extern SpriteID _signal_base;
extern SpriteID _coast_base;
extern bool _have_2cc;
+extern bool _have_newhouses;
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage);
void LoadNewGRF(uint load_index, uint file_index);
-void ReloadNewGRFData(); // in openttd.c
+void ReloadNewGRFData(); // in openttd.cpp
void CDECL grfmsg(int severity, const char *str, ...);
--- a/src/newgrf_callbacks.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_callbacks.h Mon Mar 26 22:15:38 2007 +0000
@@ -11,12 +11,12 @@
* Names are formatted as CBID_<CLASS>_<CALLBACK>
*/
enum CallbackID {
- // Powered wagons, if the result is lower as 0x40 then the wagon is powered
- // TODO: interpret the rest of the result, aka "visual effects"
+ /* Powered wagons, if the result is lower as 0x40 then the wagon is powered
+ * @todo : interpret the rest of the result, aka "visual effects" */
CBID_TRAIN_WAGON_POWER = 0x10,
- // Vehicle length, returns the amount of 1/8's the vehicle is shorter
- // only for train vehicles
+ /* Vehicle length, returns the amount of 1/8's the vehicle is shorter
+ * only for train vehicles */
CBID_TRAIN_VEHICLE_LENGTH = 0x11,
/* Called (if appropriate bit in callback mask is set) to determine the
@@ -31,16 +31,48 @@
* to choose a sprite layout to draw, instead of the standard 0-7 range */
CBID_STATION_SPRITE_LAYOUT = 0x14,
- // Refit capacity, the passed vehicle needs to have its ->cargo_type set to
- // the cargo we are refitting to, returns the new cargo capacity
+ /* Refit capacity, the passed vehicle needs to have its ->cargo_type set to
+ * the cargo we are refitting to, returns the new cargo capacity */
CBID_VEHICLE_REFIT_CAPACITY = 0x15,
CBID_TRAIN_ARTIC_ENGINE = 0x16,
+ /* Called (if appropriate bit in callback mask is set) to determine whether
+ * the house can be built on the specified tile. */
+ CBID_HOUSE_ALLOW_CONSTRUCTION = 0x17,
+
CBID_VEHICLE_CARGO_SUFFIX = 0x19,
+ /* Called (if appropriate bit in callback mask is set) to determine
+ * the next animation frame. */
+ CBID_HOUSE_ANIMATION_NEXT_FRAME = 0x1A,
+
+ /* Called (if appropriate bit in callback mask is set) for periodically
+ * starting or stopping the animation. */
+ CBID_HOUSE_ANIMATION_START_STOP = 0x1B,
+
+ /* Called (if appropriate bit in callback mask is set) whenever the
+ * construction state of a house changes. */
+ CBID_CONSTRUCTION_STATE_CHANGE = 0x1C,
+
CBID_TRAIN_ALLOW_WAGON_ATTACH = 0x1D,
+ /* Called (if appropriate bit in callback mask is set) to determine the
+ * colour of a town building. */
+ CBID_BUILDING_COLOUR = 0x1E,
+
+ /* Called (if appropriate bit in callback mask is set) to decide how much
+ * cargo a town building can accept. */
+ CBID_HOUSE_CARGO_ACCEPTANCE = 0x1F, // not yet implemented
+
+ /* Called (if appropriate bit in callback mask is set) to indicate
+ * how long the current animation frame should last. */
+ CBID_HOUSE_ANIMATION_SPEED = 0x20,
+
+ /* Called (if appropriate bit in callback mask is set) periodically to
+ * determine if a house should be destroyed. */
+ CBID_HOUSE_DESTRUCTION = 0x21,
+
/* This callback is called from vehicle purchase lists. It returns a value to be
* used as a custom string ID in the 0xD000 range. */
CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
@@ -48,16 +80,34 @@
/* Called when building a station to customize the tile layout */
CBID_STATION_TILE_LAYOUT = 0x24,
+ /* Called (if appropriate bit in callback mask is set) to determine which
+ * cargoes a town building should accept. */
+ CBID_HOUSE_ACCEPT_CARGO = 0x2A, // not yet implemented
+
/* Called to determine if a specific colour map should be used for a vehicle
* instead of the default livery */
CBID_VEHICLE_COLOUR_MAPPING = 0x2D,
+ /* Called (if appropriate bit in callback mask is set) to determine how much
+ * cargo a town building produces. */
+ CBID_HOUSE_PRODUCE_CARGO = 0x2E, // not yet implemented
+
/* Called when the player (or AI) tries to start or stop a vehicle. Mainly
* used for preventing a vehicle from leaving the depot. */
CBID_VEHICLE_START_STOP_CHECK = 0x31,
/* Called to play a special sound effect */
CBID_VEHICLE_SOUND_EFFECT = 0x33,
+
+ /* Called to calculate the income of delivered cargo */
+ CBID_CARGO_PROFIT_CALC = 0x39,
+
+ /* Called (if appropriate bit in callback mask set) to determine whether a
+ * town building can be destroyed. */
+ CBID_HOUSE_DENY_DESTRUCTION = 0x143,
+
+ /* Called to calculate part of a station rating */
+ CBID_CARGO_STATION_RATING_CALC = 0x145,
};
/**
@@ -84,6 +134,31 @@
};
/**
+ * Callback masks for houses.
+ */
+enum HouseCallbackMask {
+ CBM_HOUSE_ALLOW_CONSTRUCTION = 0,
+ CBM_ANIMATION_NEXT_FRAME = 1,
+ CBM_ANIMATION_START_STOP = 2,
+ CBM_CONSTRUCTION_STATE_CHANGE = 3,
+ CBM_BUILDING_COLOUR = 4,
+ CBM_CARGO_ACCEPTANCE = 5,
+ CBM_ANIMATION_SPEED = 6,
+ CBM_HOUSE_DESTRUCTION = 7,
+ CBM_HOUSE_ACCEPT_CARGO = 8,
+ CBM_HOUSE_PRODUCE_CARGO = 9,
+ CBM_HOUSE_DENY_DESTRUCTION = 10,
+};
+
+/**
+ * Callback masks for cargos.
+ */
+enum CargoCallbackMask {
+ CBM_CARGO_PROFIT_CALC = 0,
+ CBM_CARGO_STATION_RATING_CALC = 1,
+};
+
+/**
* Result of a failed callback.
*/
enum {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/newgrf_cargo.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,96 @@
+/* $Id$ */
+
+#include "stdafx.h"
+#include "openttd.h"
+#include "debug.h"
+#include "cargotype.h"
+#include "newgrf.h"
+#include "newgrf_callbacks.h"
+#include "newgrf_spritegroup.h"
+#include "newgrf_cargo.h"
+
+
+static uint32 CargoGetRandomBits(const ResolverObject *object)
+{
+ return 0;
+}
+
+
+static uint32 CargoGetTriggers(const ResolverObject *object)
+{
+ return 0;
+}
+
+
+static void CargoSetTriggers(const ResolverObject *object, int triggers)
+{
+ return;
+}
+
+
+static uint32 CargoGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
+{
+ DEBUG(grf, 1, "Unhandled cargo property 0x%X", variable);
+
+ *available = false;
+ return 0;
+}
+
+
+static const SpriteGroup *CargoResolveReal(const ResolverObject *object, const SpriteGroup *group)
+{
+ /* Cargo action 2s should always have only 1 "loaded" state */
+ if (group->g.real.num_loaded == 0) return NULL;
+
+ return group->g.real.loaded[0];
+}
+
+
+static void NewCargoResolver(ResolverObject *res, const CargoSpec *cs)
+{
+ res->GetRandomBits = &CargoGetRandomBits;
+ res->GetTriggers = &CargoGetTriggers;
+ res->SetTriggers = &CargoSetTriggers;
+ res->GetVariable = &CargoGetVariable;
+ res->ResolveReal = &CargoResolveReal;
+
+ res->u.cargo.cs = cs;
+
+ res->callback = 0;
+ res->callback_param1 = 0;
+ res->callback_param2 = 0;
+ res->last_value = 0;
+ res->trigger = 0;
+ res->reseed = 0;
+}
+
+
+SpriteID GetCustomCargoSprite(const CargoSpec *cs)
+{
+ const SpriteGroup *group;
+ ResolverObject object;
+
+ NewCargoResolver(&object, cs);
+
+ group = Resolve(cs->group, &object);
+ if (group == NULL || group->type != SGT_RESULT) return 0;
+
+ return group->g.result.sprite;
+}
+
+
+uint16 GetCargoCallback(uint16 callback, uint32 param1, uint32 param2, const CargoSpec *cs)
+{
+ ResolverObject object;
+ const SpriteGroup *group;
+
+ NewCargoResolver(&object, cs);
+ object.callback = callback;
+ object.callback_param1 = param1;
+ object.callback_param2 = param2;
+
+ group = Resolve(cs->group, &object);
+ if (group == NULL || group->type != SGT_CALLBACK) return CALLBACK_FAILED;
+
+ return group->g.callback.result;
+}
--- a/src/newgrf_cargo.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_cargo.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_cargo.h */
+
#ifndef NEWGRF_CARGO_H
#define NEWGRF_CARGO_H
@@ -19,4 +21,9 @@
static const CargoID CT_PURCHASE = NUM_CARGO + 1;
static const CargoID CT_DEFAULT_NA = NUM_CARGO + 2;
+struct CargoSpec;
+
+SpriteID GetCustomCargoSprite(const CargoSpec *cs);
+uint16 GetCargoCallback(uint16 callback, uint32 param1, uint32 param2, const CargoSpec *cs);
+
#endif /* NEWGRF_CARGO_H */
--- a/src/newgrf_config.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_config.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgfr_config.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "functions.h"
@@ -481,3 +483,4 @@
};
+
--- a/src/newgrf_config.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_config.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_config.h */
+
#ifndef NEWGRF_CONFIG_H
#define NEWGRF_CONFIG_H
@@ -80,7 +82,7 @@
bool FillGRFDetails(GRFConfig *config, bool is_static);
char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);
-/* In newgrf_gui.c */
+/* In newgrf_gui.cpp */
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config);
#ifdef ENABLE_NETWORK
--- a/src/newgrf_engine.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_engine.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_engine.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "variables.h"
@@ -66,10 +68,10 @@
const WagonOverrides *wos = &_engine_wagon_overrides[engine];
int i;
- // XXX: This could turn out to be a timesink on profiles. We could
- // always just dedicate 65535 bytes for an [engine][train] trampoline
- // for O(1). Or O(logMlogN) and searching binary tree or smt. like
- // that. --pasky
+ /* XXX: This could turn out to be a timesink on profiles. We could
+ * always just dedicate 65535 bytes for an [engine][train] trampoline
+ * for O(1). Or O(logMlogN) and searching binary tree or smt. like
+ * that. --pasky */
for (i = 0; i < wos->overrides_count; i++) {
const WagonOverride *wo = &wos->overrides[i];
@@ -260,11 +262,11 @@
* to a landing by the hanger of an international airport. */
if (amdflag & AMED_SLOWTURN) return AMS_TTDP_FLIGHT_TO_TOWER;
- // The final two conditions apply to helicopters or aircraft.
- /* Has reached hanger? */
+ /* The final two conditions apply to helicopters or aircraft.
+ * Has reached hanger? */
if (amdflag & AMED_EXACTPOS) return AMS_TTDP_HANGAR;
- // Still moving towards hanger.
+ /* Still moving towards hanger. */
return AMS_TTDP_TO_HANGAR;
case TERM1:
@@ -318,7 +320,7 @@
case ENDLANDING: // On the runway braking
if (amdflag & AMED_BRAKE) return AMS_TTDP_BRAKING;
- // Landed - moving off runway
+ /* Landed - moving off runway */
return AMS_TTDP_TO_INWAY;
case HELILANDING:
@@ -393,7 +395,7 @@
case STARTTAKEOFF: // Accelerating down runway
case ENDTAKEOFF: // Ascent
case HELITAKEOFF:
- // TODO Need to find which terminal (or hanger) we've come from. How?
+ /* @todo Need to find which terminal (or hanger) we've come from. How? */
return AMA_TTDP_PAD1_TO_TAKEOFF;
case FLYING:
@@ -403,7 +405,7 @@
case ENDLANDING: // On the runway braking
case HELILANDING:
case HELIENDLANDING:
- // TODO Need to check terminal we're landing to. Is it known yet?
+ /* @todo Need to check terminal we're landing to. Is it known yet? */
return (v->current_order.type == OT_GOTO_DEPOT) ?
AMA_TTDP_LANDING_TO_HANGAR : AMA_TTDP_LANDING_TO_PAD1;
@@ -473,12 +475,12 @@
if (v == NULL) {
/* Vehicle does not exist, so we're in a purchase list */
switch (variable) {
- case 0x43: return _current_player; /* Owner information */
- case 0x46: return 0; /* Motion counter */
- 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 */
+ case 0x43: return _current_player; // Owner information
+ case 0x46: return 0; // Motion counter
+ 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
}
*available = false;
@@ -487,8 +489,8 @@
/* Calculated vehicle parameters */
switch (variable) {
- case 0x40: /* Get length of consist */
- case 0x41: /* Get length of same consecutive wagons */
+ case 0x40: // Get length of consist
+ case 0x41: // Get length of same consecutive wagons
if (v->type != VEH_TRAIN) return 1;
{
@@ -509,7 +511,7 @@
return chain_before | chain_after << 8 | (chain_before + chain_after + (variable == 0x41)) << 16;
}
- case 0x42: { /* Consist cargo information */
+ case 0x42: { // Consist cargo information
/* XXX Missing support for common refit cycle and property 25 */
const Vehicle *u;
byte cargo_classes = 0;
@@ -541,15 +543,15 @@
return cargo_classes | (common_cargo_type << 8) | (user_def_data << 24);
}
- case 0x43: /* Player information */
+ case 0x43: // Player information
return v->owner;
- case 0x44: /* Aircraft information */
+ case 0x44: // Aircraft information
if (v->type != VEH_AIRCRAFT) return UINT_MAX;
{
const Vehicle *w = v->next;
- uint16 altitude = v->z_pos - w->z_pos; /* Aircraft height - shadow height */
+ uint16 altitude = v->z_pos - w->z_pos; // Aircraft height - shadow height
byte airporttype;
switch (GetStation(v->u.air.targetairport)->airport_type) {
@@ -571,10 +573,10 @@
return (altitude << 8) | airporttype;
}
- case 0x46: /* Motion counter */
+ case 0x46: // Motion counter
return v->motion_counter;
- case 0x47: { /* Vehicle cargo info */
+ case 0x47: { // Vehicle cargo info
/* Format: ccccwwtt
* tt - the cargo type transported by the vehicle,
* translated if a translation table has been installed.
@@ -586,10 +588,10 @@
return (cs->classes << 16) | (cs->weight << 8) | GetEngineGRF(v->engine_type)->cargo_map[v->cargo_type];
}
- case 0x48: return GetEngine(v->engine_type)->flags; /* 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 */
+ case 0x60: // Count consist's engine ID occurance
if (v->type != VEH_TRAIN) return v->engine_type == parameter;
{
@@ -600,13 +602,13 @@
return count;
}
- case 0x7F: return GetGRFParameter(v->engine_type, parameter); /* Read GRF parameter */
+ 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:
+ /* @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.
@@ -992,7 +994,7 @@
void TriggerVehicle(Vehicle *v, VehicleTrigger trigger)
{
if (trigger == VEHICLE_TRIGGER_DEPOT) {
- // store that the vehicle entered a depot this tick
+ /* store that the vehicle entered a depot this tick */
VehicleEnteredDepotThisTick(v);
}
@@ -1020,8 +1022,8 @@
return _engine_custom_names[engine] == 0 ? _engine_name_strings[engine] : _engine_custom_names[engine];
}
-// Functions for changing the order of vehicle purchase lists
-// This is currently only implemented for rail vehicles.
+/* Functions for changing the order of vehicle purchase lists
+ * This is currently only implemented for rail vehicles. */
static EngineID _engine_list_order[NUM_TRAIN_ENGINES];
static byte _engine_list_position[NUM_TRAIN_ENGINES];
@@ -1066,13 +1068,13 @@
if (engine == target) return;
- // First, remove our ID from the list.
+ /* First, remove our ID from the list. */
for (i = 0; i < NUM_TRAIN_ENGINES - 1; i++) {
if (_engine_list_order[i] == engine) moving = true;
if (moving) _engine_list_order[i] = _engine_list_order[i + 1];
}
- // Now, insert it again, before the target engine.
+ /* Now, insert it again, before the target engine. */
for (i = NUM_TRAIN_ENGINES - 1; i > 0; i--) {
_engine_list_order[i] = _engine_list_order[i - 1];
if (_engine_list_order[i] == target) {
@@ -1081,7 +1083,7 @@
}
}
- // Update the engine list position (a reverse of engine list order)
+ /* Update the engine list position (a reverse of engine list order) */
for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
_engine_list_position[_engine_list_order[i]] = i;
}
--- a/src/newgrf_engine.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_engine.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_engine.h */
+
#ifndef NEWGRF_ENGINE_H
#define NEWGRF_ENGINE_H
@@ -7,9 +9,6 @@
#include "direction.h"
#include "newgrf_cargo.h"
-/** @file newgrf_engine.h
- */
-
extern int _traininfo_vehicle_pitch;
extern int _traininfo_vehicle_width;
@@ -38,11 +37,11 @@
enum VehicleTrigger {
VEHICLE_TRIGGER_NEW_CARGO = 1,
- // Externally triggered only for the first vehicle in chain
+ /* Externally triggered only for the first vehicle in chain */
VEHICLE_TRIGGER_DEPOT = 2,
- // Externally triggered only for the first vehicle in chain, only if whole chain is empty
+ /* Externally triggered only for the first vehicle in chain, only if whole chain is empty */
VEHICLE_TRIGGER_EMPTY = 4,
- // Not triggered externally (called for the whole chain if we got NEW_CARGO)
+ /* Not triggered externally (called for the whole chain if we got NEW_CARGO) */
VEHICLE_TRIGGER_ANY_NEW_CARGO = 8,
};
void TriggerVehicle(Vehicle *veh, VehicleTrigger trigger);
--- a/src/newgrf_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_gui.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "functions.h"
@@ -40,7 +42,7 @@
}
-static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, bool show_params)
+static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bottom, bool show_params)
{
char buff[256];
@@ -60,24 +62,24 @@
GetString(message, c->error->message, lastof(message));
SetDParamStr(0, message);
- y += DrawStringMultiLine(x, y, c->error->severity, w);
+ y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y);
}
/* Draw filename or not if it is not known (GRF sent over internet) */
if (c->filename != NULL) {
SetDParamStr(0, c->filename);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_FILENAME, w);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_FILENAME, w, bottom - y);
}
/* Prepare and draw GRF ID */
snprintf(buff, lengthof(buff), "%08X", BSWAP32(c->grfid));
SetDParamStr(0, buff);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_GRF_ID, w);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_GRF_ID, w, bottom - y);
/* Prepare and draw MD5 sum */
md5sumToString(buff, lastof(buff), c->md5sum);
SetDParamStr(0, buff);
- y += DrawStringMultiLine(x, y, STR_NEWGRF_MD5SUM, w);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_MD5SUM, w, bottom - y);
/* Show GRF parameter list */
if (show_params) {
@@ -87,20 +89,20 @@
} else {
SetDParam(0, STR_01A9_NONE);
}
- y += DrawStringMultiLine(x, y, STR_NEWGRF_PARAMETER, w);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_PARAMETER, w, bottom - y);
}
/* Show flags */
- if (c->status == GCS_NOT_FOUND) y += DrawStringMultiLine(x, y, STR_NEWGRF_NOT_FOUND, w);
- if (c->status == GCS_DISABLED) y += DrawStringMultiLine(x, y, STR_NEWGRF_DISABLED, w);
- if (HASBIT(c->flags, GCF_COMPATIBLE)) y += DrawStringMultiLine(x, y, STR_NEWGRF_COMPATIBLE_LOADED, w);
+ if (c->status == GCS_NOT_FOUND) y += DrawStringMultiLine(x, y, STR_NEWGRF_NOT_FOUND, w, bottom - y);
+ if (c->status == GCS_DISABLED) y += DrawStringMultiLine(x, y, STR_NEWGRF_DISABLED, w, bottom - y);
+ if (HASBIT(c->flags, GCF_COMPATIBLE)) y += DrawStringMultiLine(x, y, STR_NEWGRF_COMPATIBLE_LOADED, w, bottom - y);
/* Draw GRF info if it exists */
if (c->info != NULL && !StrEmpty(c->info)) {
SetDParamStr(0, c->info);
- y += DrawStringMultiLine(x, y, STR_02BD, w);
+ y += DrawStringMultiLine(x, y, STR_02BD, w, bottom - y);
} else {
- y += DrawStringMultiLine(x, y, STR_NEWGRF_NO_INFO, w);
+ y += DrawStringMultiLine(x, y, STR_NEWGRF_NO_INFO, w, bottom - y);
}
}
@@ -149,7 +151,7 @@
if (WP(w, newgrf_add_d).sel != NULL) {
const OldWidget *wi = &w->widget[5];
- ShowNewGRFInfo(WP(w, newgrf_add_d).sel, wi->left + 2, wi->top + 2, wi->right - wi->left - 2, false);
+ ShowNewGRFInfo(WP(w, newgrf_add_d).sel, wi->left + 2, wi->top + 2, wi->right - wi->left - 2, wi->bottom, false);
}
break;
}
@@ -157,7 +159,7 @@
case WE_CLICK:
switch (e->we.click.widget) {
case 3: {
- // Get row...
+ /* Get row... */
const GRFConfig *c;
uint i = (e->we.click.pt.y - w->widget[3].top) / 10 + w->vscroll.pos;
@@ -167,7 +169,7 @@
break;
}
- case 6: /* Add selection to list */
+ case 6: // Add selection to list
if (WP(w, newgrf_add_d).sel != NULL) {
const GRFConfig *src = WP(w, newgrf_add_d).sel;
GRFConfig **list;
@@ -196,7 +198,7 @@
}
break;
- case 7: /* Rescan list */
+ case 7: // Rescan list
WP(w, newgrf_add_d).sel = NULL;
ScanNewGRFFiles();
w->SetDirty();
@@ -364,7 +366,7 @@
if (WP(w, newgrf_d).sel != NULL) {
/* Draw NewGRF file info */
const OldWidget *wi = &w->widget[SNGRFS_NEWGRF_INFO];
- ShowNewGRFInfo(WP(w, newgrf_d).sel, wi->left + 2, wi->top + 2, wi->right - wi->left - 2, WP(w, newgrf_d).show_params);
+ ShowNewGRFInfo(WP(w, newgrf_d).sel, wi->left + 2, wi->top + 2, wi->right - wi->left - 2, wi->bottom, WP(w, newgrf_d).show_params);
}
break;
@@ -376,7 +378,7 @@
case WE_CLICK:
switch (e->we.click.widget) {
- case SNGRFS_ADD: { /* Add GRF */
+ case SNGRFS_ADD: { // Add GRF
GRFConfig **list = WP(w, newgrf_d).list;
BaseWindow *w;
@@ -388,7 +390,7 @@
break;
}
- case SNGRFS_REMOVE: { /* Remove GRF */
+ case SNGRFS_REMOVE: { // Remove GRF
GRFConfig **pc, *c, *newsel;
/* Choose the next GRF file to be the selected file */
@@ -412,7 +414,7 @@
break;
}
- case SNGRFS_MOVE_UP: { /* Move GRF up */
+ case SNGRFS_MOVE_UP: { // Move GRF up
GRFConfig **pc, *c;
if (WP(w, newgrf_d).sel == NULL) break;
@@ -428,7 +430,7 @@
break;
}
- case SNGRFS_MOVE_DOWN: { /* Move GRF down */
+ case SNGRFS_MOVE_DOWN: { // Move GRF down
GRFConfig **pc, *c;
if (WP(w, newgrf_d).sel == NULL) break;
@@ -444,7 +446,7 @@
break;
}
- case SNGRFS_FILE_LIST: { /* Select a GRF */
+ case SNGRFS_FILE_LIST: { // Select a GRF
GRFConfig *c;
uint i = (e->we.click.pt.y - w->widget[SNGRFS_FILE_LIST].top) / 14 + w->vscroll.pos;
@@ -455,7 +457,7 @@
break;
}
- case SNGRFS_APPLY_CHANGES: /* Apply changes made to GRF list */
+ case SNGRFS_APPLY_CHANGES: // Apply changes made to GRF list
if (WP(w, newgrf_d).execute) {
ShowQuery(
STR_POPUP_CAUTION_CAPTION,
@@ -468,7 +470,7 @@
}
break;
- case SNGRFS_SET_PARAMETERS: { /* Edit parameters */
+ case SNGRFS_SET_PARAMETERS: { // Edit parameters
char buff[512];
if (WP(w, newgrf_d).sel == NULL) break;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/newgrf_house.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,610 @@
+/* $Id$ */
+
+/** @file newgrf_house.cpp */
+
+#include "stdafx.h"
+#include "openttd.h"
+#include "functions.h"
+#include "variables.h"
+#include "debug.h"
+#include "viewport.h"
+#include "landscape.h"
+#include "date.h"
+#include "town.h"
+#include "town_map.h"
+#include "sound.h"
+#include "sprite.h"
+#include "strings.h"
+#include "table/strings.h"
+#include "table/sprites.h"
+#include "table/town_land.h"
+#include "newgrf.h"
+#include "newgrf_house.h"
+#include "newgrf_spritegroup.h"
+#include "newgrf_callbacks.h"
+#include "newgrf_town.h"
+#include "newgrf_sound.h"
+
+static BuildingCounts _building_counts;
+static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX];
+HouseIDMapping _house_id_mapping[HOUSE_MAX];
+
+/* Since the house IDs defined by the GRF file don't necessarily correlate
+ * to those used by the game, the IDs used for overriding old houses must be
+ * translated when the house spec is set. */
+static uint16 _house_overrides[NEW_HOUSE_OFFSET];
+
+void AddHouseOverride(uint8 local_id, uint house_type)
+{
+ assert(house_type < NEW_HOUSE_OFFSET);
+ _house_overrides[house_type] = local_id;
+}
+
+void ResetHouseOverrides()
+{
+ for (int i = 0; i != lengthof(_house_overrides); i++) {
+ _house_overrides[i] = INVALID_HOUSE_ID;
+ }
+}
+
+static HouseID GetHouseID(byte grf_local_id, uint32 grfid)
+{
+ const HouseIDMapping *map;
+
+ for (HouseID house_id = NEW_HOUSE_OFFSET; house_id != lengthof(_house_id_mapping); house_id++) {
+ map = &_house_id_mapping[house_id];
+ if (map->house_id == grf_local_id && map->grfid == grfid) return house_id;
+ }
+ return INVALID_HOUSE_ID;
+}
+
+static HouseID AddHouseID(byte grf_local_id, uint32 grfid, byte substitute_id)
+{
+ HouseID house_id;
+ HouseIDMapping *map;
+
+ /* Look to see if this house has already been added. This is done
+ * separately from the loop below in case a GRF has been deleted, and there
+ * are any gaps in the array. */
+ house_id = GetHouseID(grf_local_id, grfid);
+ if (house_id != INVALID_HOUSE_ID) return house_id;
+
+ /* This house hasn't been defined before, so give it an ID now. */
+ for (house_id = NEW_HOUSE_OFFSET; house_id != lengthof(_house_id_mapping); house_id++) {
+ map = &_house_id_mapping[house_id];
+
+ if (map->house_id == 0 && map->grfid == 0) {
+ map->house_id = grf_local_id;
+ map->grfid = grfid;
+ map->substitute_id = substitute_id;
+ return house_id;
+ }
+ }
+
+ return INVALID_HOUSE_ID;
+}
+
+void SetHouseSpec(const HouseSpec *hs)
+{
+ HouseID house_id = AddHouseID(hs->local_id, hs->grffile->grfid, hs->substitute_id);
+
+ if (house_id == INVALID_HOUSE_ID) {
+ grfmsg(1, "SetHouseSpec: Too many houses allocated. Ignoring.");
+ return;
+ }
+
+ memcpy(&_house_specs[house_id], hs, sizeof(*hs));
+
+ /* Now add the overrides. */
+ for (int i = 0; i != lengthof(_house_overrides); i++) {
+ HouseSpec *overridden_hs = GetHouseSpecs(i);
+
+ if (_house_overrides[i] != hs->local_id) continue;
+
+ overridden_hs->override = house_id;
+ _house_overrides[i] = INVALID_HOUSE_ID;
+ }
+}
+
+void ResetHouseIDMapping()
+{
+ memset(&_house_id_mapping, 0, sizeof(_house_id_mapping));
+}
+
+void CheckHouseIDs()
+{
+ for (TileIndex t = 0; t < MapSize(); t++) {
+ HouseID house_id;
+
+ if (!IsTileType(t, MP_HOUSE)) continue;
+
+ house_id = GetHouseType(t);
+ if (!GetHouseSpecs(house_id)->enabled && house_id >= NEW_HOUSE_OFFSET) {
+ /* The specs for this type of house are not available any more, so
+ * replace it with the substitute original house type. */
+ SetHouseType(t, _house_id_mapping[house_id].substitute_id);
+ }
+ }
+
+ InitializeBuildingCounts();
+ AfterLoadCountBuildings();
+
+}
+
+HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid)
+{
+ /* Start from 1 because 0 means that no class has been assigned. */
+ for (int i = 1; i != lengthof(_class_mapping); i++) {
+ HouseClassMapping *map = &_class_mapping[i];
+
+ if (map->class_id == grf_class_id && map->grfid == grfid) return (HouseClassID)i;
+
+ if (map->class_id == 0 && map->grfid == 0) {
+ map->class_id = grf_class_id;
+ map->grfid = grfid;
+ return (HouseClassID)i;
+ }
+ }
+ return HOUSE_NO_CLASS;
+}
+
+void InitializeBuildingCounts()
+{
+ memset(&_building_counts, 0, sizeof(_building_counts));
+}
+
+/**
+ * IncreaseBuildingCount()
+ * Increase the count of a building when it has been added by a town.
+ * @param t The town that the building is being built in
+ * @param house_id The id of the house being added
+ */
+void IncreaseBuildingCount(Town *t, HouseID house_id)
+{
+ HouseClassID class_id = GetHouseSpecs(house_id)->class_id;
+
+ if (!_have_newhouses) return;
+
+ /* If there are 255 buildings of this type in this town, there are also
+ * at least that many houses of the same class in the town, and
+ * therefore on the map as well. */
+ if (t->building_counts.id_count[house_id] == 255) return;
+
+ t->building_counts.id_count[house_id]++;
+ if (_building_counts.id_count[house_id] < 255) _building_counts.id_count[house_id]++;
+
+ /* Similarly, if there are 255 houses of this class in this town, there
+ * must be at least that number on the map too. */
+ if (class_id == HOUSE_NO_CLASS || t->building_counts.class_count[class_id] == 255) return;
+
+ t->building_counts.class_count[class_id]++;
+ if (_building_counts.class_count[class_id] < 255) _building_counts.class_count[class_id]++;
+}
+
+/**
+ * DecreaseBuildingCount()
+ * Decrease the number of a building when it is deleted.
+ * @param t The town that the building was built in
+ * @param house_id The id of the house being removed
+ */
+void DecreaseBuildingCount(Town *t, HouseID house_id)
+{
+ HouseClassID class_id = GetHouseSpecs(house_id)->class_id;
+
+ if (!_have_newhouses) return;
+
+ if (t->building_counts.id_count[house_id] > 0) t->building_counts.id_count[house_id]--;
+ if (_building_counts.id_count[house_id] > 0) _building_counts.id_count[house_id]--;
+
+ if (class_id == HOUSE_NO_CLASS) return;
+
+ if (t->building_counts.class_count[class_id] > 0) t->building_counts.class_count[class_id]--;
+ if (_building_counts.class_count[class_id] > 0) _building_counts.class_count[class_id]--;
+}
+
+/**
+ * AfterLoadCountBuildings()
+ *
+ * After a savegame has been loaded, count the number of buildings on the map.
+ */
+void AfterLoadCountBuildings()
+{
+ if (!_have_newhouses) return;
+
+ for (TileIndex t = 0; t < MapSize(); t++) {
+ if (!IsTileType(t, MP_HOUSE)) continue;
+ IncreaseBuildingCount(GetTownByTile(t), GetHouseType(t));
+ }
+}
+
+
+static uint32 HouseGetRandomBits(const ResolverObject *object)
+{
+ const TileIndex tile = object->u.house.tile;
+ return (tile == INVALID_TILE || !IsTileType(tile, MP_HOUSE)) ? 0 : GetHouseRandomBits(tile);
+}
+
+static uint32 HouseGetTriggers(const ResolverObject *object)
+{
+ const TileIndex tile = object->u.house.tile;
+ return (tile == INVALID_TILE || !IsTileType(tile, MP_HOUSE)) ? 0 : GetHouseTriggers(tile);
+}
+
+static void HouseSetTriggers(const ResolverObject *object, int triggers)
+{
+ const TileIndex tile = object->u.house.tile;
+ if (IsTileType(tile, MP_HOUSE)) SetHouseTriggers(tile, triggers);
+}
+
+static uint32 GetNumHouses(HouseID house_id, const Town *town)
+{
+ uint8 map_id_count, town_id_count, map_class_count, town_class_count;
+ HouseClassID class_id = GetHouseSpecs(house_id)->class_id;
+
+ map_id_count = _building_counts.id_count[house_id];
+ map_class_count = _building_counts.class_count[class_id];
+ town_id_count = town->building_counts.id_count[house_id];
+ town_class_count = town->building_counts.class_count[class_id];
+
+ return map_class_count << 24 | town_class_count << 16 | map_id_count << 8 | town_id_count;
+}
+
+static uint32 GetTerrainType(TileIndex tile)
+{
+ switch (_opt.landscape) {
+ case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2;
+ case LT_ARCTIC: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0;
+ default: return 0;
+ }
+}
+
+static uint32 GetGRFParameter(HouseID house_id, byte parameter)
+{
+ const HouseSpec *hs = GetHouseSpecs(house_id);
+ const GRFFile *file = hs->grffile;
+
+ if (parameter >= file->param_end) return 0;
+ return file->param[parameter];
+}
+
+/**
+ * HouseGetVariable():
+ *
+ * Used by the resolver to get values for feature 07 deterministic spritegroups.
+ */
+static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
+{
+ const Town *town = object->u.house.town;
+ TileIndex tile = object->u.house.tile;
+ HouseID house_id = object->u.house.house_id;
+
+ if (object->scope == VSG_SCOPE_PARENT) {
+ return TownGetVariable(variable, parameter, available, town);
+ }
+
+ switch (variable) {
+ /* Construction stage. */
+ case 0x40: return (IsTileType(tile, MP_HOUSE) ? GetHouseBuildingStage(tile) : 0) | OriginalTileRandomiser(TileX(tile), TileY(tile)) << 2;
+
+ /* Building age. */
+ case 0x41: return clamp(_cur_year - GetHouseConstructionYear(tile), 0, 0xFF);
+
+ /* Town zone */
+ case 0x42: return GetTownRadiusGroup(town, tile);
+
+ /* Terrain type */
+ case 0x43: return GetTerrainType(tile);
+
+ /* Number of this type of building on the map. */
+ case 0x44: return GetNumHouses(house_id, town);
+
+ /* Whether the town is being created or just expanded. */
+ case 0x45: return _generating_world ? 1 : 0;
+
+ /* Current animation frame. */
+ case 0x46: return IsTileType(tile, MP_HOUSE) ? GetHouseAnimationFrame(tile) : 0;
+
+
+ /* Building counts for old houses with id = parameter. */
+ case 0x60: return GetNumHouses(parameter, town);
+
+ /* Building counts for new houses with id = parameter. */
+ case 0x61: {
+ const HouseSpec *hs = GetHouseSpecs(house_id);
+ if (hs->grffile == NULL) return 0;
+
+ HouseID new_house = GetHouseID(parameter, hs->grffile->grfid);
+ return new_house == INVALID_HOUSE_ID ? 0 : GetNumHouses(new_house, town);
+ }
+
+ /* Land info for nearby tiles. */
+ case 0x62: {
+ int8 x = GB(parameter, 0, 4);
+ int8 y = GB(parameter, 4, 4);
+ byte tile_type;
+
+ if (x >= 8) x -= 16;
+ if (y >= 8) y -= 16;
+
+ tile += TileDiffXY(x, y);
+
+ tile_type = GetTerrainType(tile) << 2 | (IsTileType(tile, MP_WATER) ? 1 : 0) << 1;
+
+ return GetTileType(tile) << 24 | (TileHeight(tile) * 8) << 16 | tile_type << 8 | GetTileSlope(tile, NULL);
+ }
+
+ /* Read GRF parameter */
+ case 0x7F: return GetGRFParameter(object->u.house.house_id, parameter);
+ }
+
+ DEBUG(grf, 1, "Unhandled house property 0x%X", variable);
+
+ *available = false;
+ return UINT_MAX;
+}
+
+static const SpriteGroup *HouseResolveReal(const ResolverObject *object, const SpriteGroup *group)
+{
+ /* Houses do not have 'real' groups */
+ return NULL;
+}
+
+/**
+ * NewHouseResolver():
+ *
+ * Returns a resolver object to be used with feature 07 spritegroups.
+ */
+static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex tile, Town *town)
+{
+ res->GetRandomBits = HouseGetRandomBits;
+ res->GetTriggers = HouseGetTriggers;
+ res->SetTriggers = HouseSetTriggers;
+ res->GetVariable = HouseGetVariable;
+ res->ResolveReal = HouseResolveReal;
+
+ res->u.house.tile = tile;
+ res->u.house.town = town;
+ res->u.house.house_id = house_id;
+
+ res->callback = 0;
+ res->callback_param1 = 0;
+ res->callback_param2 = 0;
+ res->last_value = 0;
+ res->trigger = 0;
+ res->reseed = 0;
+}
+
+uint16 GetHouseCallback(uint16 callback, uint32 param1, HouseID house_id, Town *town, TileIndex tile)
+{
+ ResolverObject object;
+ const SpriteGroup *group;
+
+ NewHouseResolver(&object, house_id, tile, town);
+ object.callback = callback;
+ object.callback_param1 = param1;
+ object.callback_param2 = 0;
+
+ group = Resolve(GetHouseSpecs(house_id)->spritegroup, &object);
+ if (group == NULL || group->type != SGT_CALLBACK) return CALLBACK_FAILED;
+
+ return group->g.callback.result;
+}
+
+void DrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte stage, HouseID house_id)
+{
+ const DrawTileSprites *dts = group->g.layout.dts;
+ const DrawTileSeqStruct *dtss;
+
+ SpriteID image = dts->ground_sprite;
+ SpriteID pal = dts->ground_pal;
+
+ if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal);
+
+ foreach_draw_tile_seq(dtss, dts->seq) {
+ if (GB(dtss->image, 0, SPRITE_WIDTH) == 0) continue;
+
+ image = dtss->image + stage;
+ pal = dtss->pal;
+
+ if (!HASBIT(image, SPRITE_MODIFIER_OPAQUE) && ((_display_opt & DO_TRANS_BUILDINGS))) {
+ SETBIT(image, PALETTE_MODIFIER_TRANSPARENT);
+ pal = PALETTE_TO_TRANSPARENT;
+ } else if (HASBIT(image, PALETTE_MODIFIER_COLOR)) {
+ if (pal == 0) {
+ const HouseSpec *hs = GetHouseSpecs(house_id);
+ if (HASBIT(hs->callback_mask, CBM_BUILDING_COLOUR)) {
+ uint16 callback = GetHouseCallback(CBID_BUILDING_COLOUR, 0, house_id, GetTownByTile(ti->tile), ti->tile);
+ if (callback != CALLBACK_FAILED) {
+ /* If bit 14 is set, we should use a 2cc colour map, else use the callback value. */
+ pal = HASBIT(callback, 14) ? GB(callback, 0, 8) + SPR_2CCMAP_BASE : callback;
+ }
+ } else {
+ pal = hs->random_colour[OriginalTileRandomiser(ti->x, ti->y)] + PALETTE_RECOLOR_START;
+ }
+ }
+ } else {
+ pal = PAL_NONE;
+ }
+
+ if ((byte)dtss->delta_z != 0x80) {
+ AddSortableSpriteToDraw(
+ image, pal,
+ ti->x + dtss->delta_x, ti->y + dtss->delta_y,
+ dtss->size_x, dtss->size_y,
+ dtss->size_z, ti->z + dtss->delta_z
+ );
+ } else {
+ AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y);
+ }
+ }
+}
+
+void DrawNewHouseTile(TileInfo *ti, HouseID house_id)
+{
+ const HouseSpec *hs = GetHouseSpecs(house_id);
+ const SpriteGroup *group;
+ ResolverObject object;
+
+ if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
+
+ NewHouseResolver(&object, house_id, ti->tile, GetTownByTile(ti->tile));
+
+ group = Resolve(hs->spritegroup, &object);
+ if (group == NULL || group->type != SGT_TILELAYOUT) {
+ /* XXX: This is for debugging purposes really, and shouldn't stay. */
+ DrawGroundSprite(SPR_SHADOW_CELL, PAL_NONE);
+ } else {
+ /* Limit the building stage to the number of stages supplied. */
+ byte stage = GetHouseBuildingStage(ti->tile);
+ stage = clamp(stage - 4 + group->g.layout.num_sprites, 0, group->g.layout.num_sprites - 1);
+ DrawTileLayout(ti, group, stage, house_id);
+ }
+}
+
+void AnimateNewHouseTile(TileIndex tile)
+{
+ const HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
+ byte animation_speed = hs->animation_speed;
+ bool frame_set_by_callback = false;
+
+ if (HASBIT(hs->callback_mask, CBM_ANIMATION_SPEED)) {
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_ANIMATION_SPEED, 0, GetHouseType(tile), GetTownByTile(tile), tile);
+ if (callback_res != CALLBACK_FAILED) animation_speed = clamp(callback_res & 0xFF, 2, 16);
+ }
+
+ /* An animation speed of 2 means the animation frame changes 4 ticks, and
+ * increasing this value by one doubles the wait. 2 is the minimum value
+ * allowed for animation_speed, which corresponds to 120ms, and 16 is the
+ * maximum, corresponding to around 33 minutes. */
+ if (_tick_counter % (1 << animation_speed) != 0) return;
+
+ byte frame = GetHouseAnimationFrame(tile);
+ byte num_frames = GB(hs->animation_frames, 0, 7);
+
+ if (HASBIT(hs->callback_mask, CBM_ANIMATION_NEXT_FRAME)) {
+ uint32 param = (hs->extra_flags & CALLBACK_1A_RANDOM_BITS) ? Random() : 0;
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_ANIMATION_NEXT_FRAME, param, GetHouseType(tile), GetTownByTile(tile), tile);
+
+ if (callback_res != CALLBACK_FAILED) {
+ frame_set_by_callback = true;
+
+ switch (callback_res & 0xFF) {
+ case 0xFF:
+ DeleteAnimatedTile(tile);
+ break;
+ case 0xFE:
+ /* Carry on as normal. */
+ frame_set_by_callback = false;
+ break;
+ default:
+ frame = callback_res & 0xFF;
+ break;
+ }
+
+ /* If the lower 7 bits of the upper byte of the callback
+ * result are not empty, it is a sound effect. */
+ if (GB(callback_res, 8, 7) != 0) PlayHouseSound(GB(callback_res, 8, 7), tile);
+ }
+ }
+
+ if (!frame_set_by_callback) {
+ if (frame < num_frames) {
+ frame++;
+ } else if (frame == num_frames && HASBIT(hs->animation_frames, 7)) {
+ /* This animation loops, so start again from the beginning */
+ frame = 0;
+ } else {
+ /* This animation doesn't loop, so stay here */
+ DeleteAnimatedTile(tile);
+ }
+ }
+
+ SetHouseAnimationFrame(tile, frame);
+ MarkTileDirtyByTile(tile);
+}
+
+void ChangeHouseAnimationFrame(TileIndex tile, uint16 callback_result)
+{
+ switch (callback_result & 0xFF) {
+ case 0xFD: /* Do nothing. */ break;
+ case 0xFE: AddAnimatedTile(tile); break;
+ case 0xFF: DeleteAnimatedTile(tile); break;
+ default:
+ SetHouseAnimationFrame(tile, callback_result & 0xFF);
+ AddAnimatedTile(tile);
+ break;
+ }
+ /* If the lower 7 bits of the upper byte of the callback
+ * result are not empty, it is a sound effect. */
+ if (GB(callback_result, 8, 7) != 0) PlayHouseSound(GB(callback_result, 8, 7), tile);
+}
+
+bool CanDeleteHouse(TileIndex tile)
+{
+ const HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
+
+ /* Human players are always allowed to remove buildings, as is water and
+ * anyone using the scenario editor. */
+ if ((IsValidPlayer(_current_player) && IsHumanPlayer(_current_player))
+ || _current_player == OWNER_WATER || _current_player == OWNER_NONE) return true;
+
+ if (HASBIT(hs->callback_mask, CBM_HOUSE_DENY_DESTRUCTION)) {
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_DENY_DESTRUCTION, 0, GetHouseType(tile), GetTownByTile(tile), tile);
+ return (callback_res == CALLBACK_FAILED || callback_res == 0);
+ } else {
+ return !(hs->extra_flags & BUILDING_IS_PROTECTED);
+ }
+}
+
+static void AnimationControl(TileIndex tile, uint16 random_bits)
+{
+ const HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
+
+ if (HASBIT(hs->callback_mask, CBM_ANIMATION_START_STOP)) {
+ uint32 param = (hs->extra_flags & SYNCHRONISED_CALLBACK_1B) ? (GB(Random(), 0, 16) | random_bits << 16) : Random();
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_ANIMATION_START_STOP, param, GetHouseType(tile), GetTownByTile(tile), tile);
+
+ if (callback_res != CALLBACK_FAILED) ChangeHouseAnimationFrame(tile, callback_res);
+ }
+}
+
+bool NewHouseTileLoop(TileIndex tile)
+{
+ const HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
+
+ if (GetHouseProcessingTime(tile) > 0) {
+ DecHouseProcessingTime(tile);
+ return true;
+ }
+
+ /* @todo: Magic with triggers goes here. Got to implement that, one day. .. */
+
+ if (HASBIT(hs->callback_mask, CBM_ANIMATION_START_STOP)) {
+ /* If this house is marked as having a synchronised callback, all the
+ * tiles will have the callback called at once, rather than when the
+ * tile loop reaches them. This should only be enabled for the northern
+ * tile, or strange things will happen (here, and in TTDPatch). */
+ if (hs->extra_flags & SYNCHRONISED_CALLBACK_1B) {
+ uint16 random = GB(Random(), 0, 16);
+
+ if (hs->building_flags & BUILDING_HAS_1_TILE) AnimationControl(tile, random);
+ if (hs->building_flags & BUILDING_2_TILES_Y) AnimationControl(TILE_ADDXY(tile, 0, 1), random);
+ if (hs->building_flags & BUILDING_2_TILES_X) AnimationControl(TILE_ADDXY(tile, 1, 0), random);
+ if (hs->building_flags & BUILDING_HAS_4_TILES) AnimationControl(TILE_ADDXY(tile, 1, 1), random);
+ } else {
+ AnimationControl(tile, 0);
+ }
+ }
+
+ /* Check callback 21, which determines if a house should be destroyed. */
+ if (HASBIT(hs->callback_mask, CBM_HOUSE_DESTRUCTION)) {
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_DESTRUCTION, 0, GetHouseType(tile), GetTownByTile(tile), tile);
+ if (callback_res != CALLBACK_FAILED && callback_res > 0) {
+ ClearTownHouse(GetTownByTile(tile), tile);
+ return false;
+ }
+ }
+
+ SetHouseProcessingTime(tile, hs->processing_time);
+ return true;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/newgrf_house.h Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,71 @@
+/* $Id$ */
+
+/** @file newgrf_house.h */
+
+#ifndef NEWGRF_HOUSE_H
+#define NEWGRF_HOUSE_H
+
+#include "town.h"
+
+/**
+ * Maps a house id stored on the map to a GRF file.
+ * House IDs are stored on the map, so there needs to be a way to tie them to
+ * GRF files. An array of HouseIDMapping structs is saved with the savegame so
+ * that house GRFs can be loaded in a different order, or removed safely. The
+ * index in the array is the house ID stored on the map.
+ *
+ * The substitute ID is the ID of an original house that should be used instead
+ * if the GRF containing the new house is not available.
+ */
+struct HouseIDMapping {
+ uint32 grfid; ///< The GRF ID of the file this house belongs to
+ uint8 house_id; ///< The house ID within the GRF file
+ uint8 substitute_id; ///< The (original) house ID to use if this GRF is not available
+};
+
+/**
+ * Makes class IDs unique to each GRF file.
+ * Houses can be assigned class IDs which are only comparable within the GRF
+ * file they were defined in. This mapping ensures that if two houses have the
+ * same class as defined by the GRF file, the classes are different within the
+ * game. An array of HouseClassMapping structs is created, and the array index
+ * of the struct that matches both the GRF ID and the class ID is the class ID
+ * used in the game.
+ *
+ * Although similar to the HouseIDMapping struct above, this serves a different
+ * purpose. Since the class ID is not saved anywhere, this mapping does not
+ * need to be persistent; it just needs to keep class ids unique.
+ */
+struct HouseClassMapping {
+ uint32 grfid; ////< The GRF ID of the file this class belongs to
+ uint8 class_id; ////< The class id within the grf file
+};
+
+extern HouseIDMapping _house_id_mapping[HOUSE_MAX]; ///< Declared in newgrf_house.cpp
+
+void AddHouseOverride(uint8 local_id, uint house_type);
+void ResetHouseOverrides();
+
+void SetHouseSpec(const HouseSpec *hs);
+
+void CheckHouseIDs();
+void ResetHouseIDMapping();
+
+HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
+
+void InitializeBuildingCounts();
+void IncreaseBuildingCount(Town *t, HouseID house_id);
+void DecreaseBuildingCount(Town *t, HouseID house_id);
+void AfterLoadCountBuildings();
+
+void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
+void AnimateNewHouseTile(TileIndex tile);
+void ChangeHouseAnimationFrame(TileIndex tile, uint16 callback_result);
+
+uint16 GetHouseCallback(uint16 callback, uint32 param1, HouseID house_id, Town *town, TileIndex tile);
+
+bool CanDeleteHouse(TileIndex tile);
+
+bool NewHouseTileLoop(TileIndex tile);
+
+#endif /* NEWGRF_HOUSE_H */
--- a/src/newgrf_sound.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_sound.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_sound.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "oldpool.h"
@@ -66,3 +68,12 @@
if (callback < GetNumSounds()) SndPlayVehicleFx((SoundFx)callback, v);
return true;
}
+
+bool PlayHouseSound(uint16 sound_id, TileIndex tile)
+{
+ if (sound_id < GetNumOriginalSounds()) {
+ SndPlayTileFx((SoundFx)sound_id, tile);
+ return true;
+ }
+ return false;
+}
--- a/src/newgrf_sound.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_sound.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file newgrf_sound.h */
+
#ifndef NEWGRF_SOUND_H
#define NEWGRF_SOUND_H
@@ -21,5 +23,6 @@
FileEntry *GetSound(uint index);
uint GetNumSounds();
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event);
+bool PlayHouseSound(uint16 sound_id, TileIndex tile);
#endif /* NEWGRF_SOUND_H */
--- a/src/newgrf_spritegroup.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_spritegroup.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,13 +1,17 @@
/* $Id$ */
+/** @file newgrf_spritegroup.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "variables.h"
#include "macros.h"
+#include "landscape.h"
#include "oldpool.h"
#include "newgrf_callbacks.h"
#include "newgrf_spritegroup.h"
#include "date.h"
+#include "sprite.h"
static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item);
@@ -33,6 +37,11 @@
free((SpriteGroup**)group->g.random.groups);
break;
+ case SGT_TILELAYOUT:
+ free((void*)group->g.layout.dts->seq);
+ free(group->g.layout.dts);
+ break;
+
default:
break;
}
@@ -85,7 +94,7 @@
case 0x1A: return UINT_MAX;
case 0x1B: return GB(_display_opt, 0, 6);
case 0x1C: return object->last_value;
- case 0x20: return _opt.landscape == LT_HILLY ? _opt.snow_line : 0xFF;
+ case 0x20: return _opt.landscape == LT_ARCTIC ? GetSnowLine() : 0xFF;
/* Not a common variable, so evalute the feature specific variables */
default: return object->GetVariable(object, variable, parameter, available);
--- a/src/newgrf_spritegroup.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_spritegroup.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,8 +1,11 @@
/* $Id$ */
+/** @file newgrf_spritegroup.h */
+
#ifndef NEWGRF_SPRITEGROUP_H
#define NEWGRF_SPRITEGROUP_H
+#include "town.h"
struct SpriteGroup;
@@ -10,12 +13,12 @@
/* 'Real' sprite groups contain a list of other result or callback sprite
* groups. */
struct RealSpriteGroup {
- // Loaded = in motion, loading = not moving
- // Each group contains several spritesets, for various loading stages
+ /* Loaded = in motion, loading = not moving
+ * Each group contains several spritesets, for various loading stages */
- // XXX: For stations the meaning is different - loaded is for stations
- // with small amount of cargo whilst loading is for stations with a lot
- // of da stuff.
+ /* XXX: For stations the meaning is different - loaded is for stations
+ * with small amount of cargo whilst loading is for stations with a lot
+ * of da stuff. */
byte num_loaded; ///< Number of loaded groups
byte num_loading; ///< Number of loading groups
@@ -26,7 +29,7 @@
/* Shared by deterministic and random groups. */
enum VarSpriteGroupScope {
VSG_SCOPE_SELF,
- // Engine of consists for vehicles, city for stations.
+ /* Engine of consists for vehicles, city for stations. */
VSG_SCOPE_PARENT,
};
@@ -43,20 +46,20 @@
};
enum DeterministicSpriteGroupAdjustOperation {
- DSGA_OP_ADD, // a + b
- DSGA_OP_SUB, // a - b
- DSGA_OP_SMIN, // (signed) min(a, b)
- DSGA_OP_SMAX, // (signed) max(a, b)
- DSGA_OP_UMIN, // (unsigned) min(a, b)
- DSGA_OP_UMAX, // (unsigned) max(a, b)
- DSGA_OP_SDIV, // (signed) a / b
- DSGA_OP_SMOD, // (signed) a % b
- DSGA_OP_UDIV, // (unsigned) a / b
- DSGA_OP_UMOD, // (unsigned) a & b
- DSGA_OP_MUL, // a * b
- DSGA_OP_AND, // a & b
- DSGA_OP_OR, // a | b
- DSGA_OP_XOR, // a ^ b
+ DSGA_OP_ADD, ///< a + b
+ DSGA_OP_SUB, ///< a - b
+ DSGA_OP_SMIN, ///< (signed) min(a, b)
+ DSGA_OP_SMAX, ///< (signed) max(a, b)
+ DSGA_OP_UMIN, ///< (unsigned) min(a, b)
+ DSGA_OP_UMAX, ///< (unsigned) max(a, b)
+ DSGA_OP_SDIV, ///< (signed) a / b
+ DSGA_OP_SMOD, ///< (signed) a % b
+ DSGA_OP_UDIV, ///< (unsigned) a / b
+ DSGA_OP_UMOD, ///< (unsigned) a & b
+ DSGA_OP_MUL, ///< a * b
+ DSGA_OP_AND, ///< a & b
+ DSGA_OP_OR, ///< a | b
+ DSGA_OP_XOR, ///< a ^ b
};
@@ -88,7 +91,7 @@
DeterministicSpriteGroupAdjust *adjusts;
DeterministicSpriteGroupRange *ranges; // Dynamically allocated
- // Dynamically allocated, this is the sole owner
+ /* Dynamically allocated, this is the sole owner */
const SpriteGroup *default_group;
};
@@ -98,19 +101,15 @@
};
struct RandomizedSpriteGroup {
- // Take this object:
- VarSpriteGroupScope var_scope;
+ VarSpriteGroupScope var_scope; ///< Take this object:
- // Check for these triggers:
- RandomizedSpriteGroupCompareMode cmp_mode;
+ RandomizedSpriteGroupCompareMode cmp_mode; ///< Check for these triggers:
byte triggers;
- // Look for this in the per-object randomized bitmask:
- byte lowest_randbit;
- byte num_groups; // must be power of 2
+ byte lowest_randbit; ///< Look for this in the per-object randomized bitmask:
+ byte num_groups; ///< must be power of 2
- // Take the group with appropriate index:
- const SpriteGroup **groups;
+ const SpriteGroup **groups; ///< Take the group with appropriate index:
};
@@ -128,6 +127,11 @@
byte num_sprites;
};
+struct TileLayoutSpriteGroup {
+ byte num_sprites; ///< Number of sprites in the spriteset, used for loading stages
+ struct DrawTileSprites *dts;
+};
+
/* List of different sprite group types */
enum SpriteGroupType {
SGT_INVALID,
@@ -136,6 +140,7 @@
SGT_RANDOMIZED,
SGT_CALLBACK,
SGT_RESULT,
+ SGT_TILELAYOUT,
};
/* Common wrapper for all the different sprite group types */
@@ -148,6 +153,7 @@
RandomizedSpriteGroup random;
CallbackResultSpriteGroup callback;
ResultSpriteGroup result;
+ TileLayoutSpriteGroup layout;
} g;
};
@@ -180,6 +186,14 @@
const struct StationSpec *statspec;
CargoID cargo_type;
} station;
+ struct {
+ TileIndex tile;
+ Town *town;
+ HouseID house_id;
+ } house;
+ struct {
+ const struct CargoSpec *cs;
+ } cargo;
} u;
uint32 (*GetRandomBits)(const struct ResolverObject*);
--- a/src/newgrf_station.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_station.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -6,6 +6,7 @@
#include "openttd.h"
#include "variables.h"
#include "functions.h"
+#include "landscape.h"
#include "debug.h"
#include "sprite.h"
#include "table/sprites.h"
@@ -19,6 +20,8 @@
#include "date.h"
#include "helpers.hpp"
#include "cargotype.h"
+#include "town_map.h"
+#include "newgrf_town.h"
static StationClass station_classes[STAT_CLASS_MAX];
@@ -42,7 +45,7 @@
station_classes[i].spec = NULL;
}
- // Set up initial data
+ /* Set up initial data */
station_classes[0].id = 'DFLT';
station_classes[0].name = STR_STAT_CLASS_DFLT;
station_classes[0].stations = 1;
@@ -65,10 +68,10 @@
{
for (StationClassID i = STAT_CLASS_BEGIN; i < STAT_CLASS_MAX; i++) {
if (station_classes[i].id == cls) {
- // ClassID is already allocated, so reuse it.
+ /* ClassID is already allocated, so reuse it. */
return i;
} else if (station_classes[i].id == 0) {
- // This class is empty, so allocate it to the ClassID.
+ /* This class is empty, so allocate it to the ClassID. */
station_classes[i].id = cls;
return i;
}
@@ -167,8 +170,8 @@
if (station < station_classes[sclass].stations)
return station_classes[sclass].spec[station];
- // If the custom station isn't defined any more, then the GRF file
- // probably was not loaded.
+ /* If the custom station isn't defined any more, then the GRF file
+ * probably was not loaded. */
return NULL;
}
@@ -347,6 +350,22 @@
const Station *st = object->u.station.st;
TileIndex tile = object->u.station.tile;
+ if (object->scope == VSG_SCOPE_PARENT) {
+ /* Pass the request on to the town of the station */
+ Town *t;
+
+ if (st != NULL) {
+ t = st->town;
+ } else if (tile != INVALID_TILE) {
+ t = GetTownByTile(tile);
+ } else {
+ *available = false;
+ return UINT_MAX;
+ }
+
+ return TownGetVariable(variable, parameter, available, t);
+ }
+
if (st == NULL) {
/* Station does not exist, so we're in a purchase list */
switch (variable) {
@@ -354,11 +373,11 @@
case 0x41:
case 0x46:
case 0x47:
- case 0x49: return 0x2110000; /* Platforms, tracks & position */
- case 0x42: return 0; /* Rail type (XXX Get current type from GUI?) */
- case 0x43: return _current_player; /* Station owner */
- case 0x44: return 2; /* PBS status */
- case 0xFA: return max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); /* Build date */
+ case 0x49: return 0x2110000; // Platforms, tracks & position
+ case 0x42: return 0; // Rail type (XXX Get current type from GUI?)
+ case 0x43: return _current_player; // Station owner
+ case 0x44: return 2; // PBS status
+ case 0xFA: return max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0); // Build date
}
*available = false;
@@ -369,16 +388,16 @@
/* Calculated station variables */
case 0x40: return GetPlatformInfoHelper(tile, false, false, false);
case 0x41: return GetPlatformInfoHelper(tile, true, false, false);
- case 0x42: /* Terrain and rail type */
- return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) ? 4 : 0) |
- (_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) |
+ case 0x42: // Terrain and rail type
+ return ((_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
+ (_opt.landscape == LT_TROPIC ? GetTropicZone(tile) : 0) |
(GetRailType(tile) << 8);
- case 0x43: return st->owner; /* Station owner */
- case 0x44: return 2; /* PBS status */
+ case 0x43: return st->owner; // Station owner
+ case 0x44: return 2; // PBS status
case 0x45: return GetRailContinuationInfo(tile);
case 0x46: return GetPlatformInfoHelper(tile, false, false, true);
case 0x47: return GetPlatformInfoHelper(tile, true, false, true);
- case 0x48: { /* Accepted cargo types */
+ case 0x48: { // Accepted cargo types
CargoID cargo_type;
uint32 value = 0;
@@ -556,7 +575,7 @@
ResolverObject object;
NewStationResolver(&object, statspec, st, tile);
- object.callback_param1 = 1; /* Indicate we are resolving the ground sprite */
+ object.callback_param1 = 1; // Indicate we are resolving the ground sprite
group = ResolveStation(&object);
if (group == NULL || group->type != SGT_RESULT) return 0;
--- a/src/newgrf_text.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_text.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,6 +1,6 @@
/* $Id$ */
-/** @file
+/** @file newgrf_text.cpp
* Implementation of Action 04 "universal holder" structure and functions.
* This file implements a linked-lists of strings,
* holding everything that the newgrf action 04 will send over to OpenTTD.
@@ -122,7 +122,7 @@
{"sv_SE", GRFLX_SWEDISH},
{"tr_TR", GRFLX_TURKISH},
{"uk_UA", GRFLX_UKRAINIAN},
- {"gen", GRFLB_GENERIC} //this is not iso code, but there has to be something...
+ {"gen", GRFLB_GENERIC} ///< this is not iso code, but there has to be something...
};
@@ -180,12 +180,12 @@
static uint _num_grf_texts = 0;
static GRFTextEntry _grf_text[(1 << TABSIZE) * 3];
-static byte _currentLangID = GRFLX_ENGLISH; //by default, english is used.
+static byte _currentLangID = GRFLX_ENGLISH; ///< by default, english is used.
char *TranslateTTDPatchCodes(const char *str)
{
- char *tmp = MallocT<char>(strlen(str) * 10 + 1); /* Allocate space to allow for expansion */
+ char *tmp = MallocT<char>(strlen(str) * 10 + 1); // Allocate space to allow for expansion
char *d = tmp;
bool unicode = false;
WChar c;
@@ -198,7 +198,7 @@
}
for (;;) {
- const char *tmp = str; /* Used for UTF-8 decoding */
+ const char *tmp = str; // Used for UTF-8 decoding
c = (byte)*str++;
if (c == 0) break;
--- a/src/newgrf_text.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/newgrf_text.h Mon Mar 26 22:15:38 2007 +0000
@@ -2,7 +2,7 @@
#ifndef NEWGRF_TEXT_H
#define NEWGRF_TEXT_H
-/** @file
+/** @file newgrf_text.h
* Header of Action 04 "universal holder" structure and functions
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/newgrf_town.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,91 @@
+/* $Id$ */
+
+/** @file newgrf_town.cpp */
+
+#include "stdafx.h"
+#include "openttd.h"
+#include "debug.h"
+#include "functions.h"
+#include "town.h"
+
+/** This function implements the town variables that newGRF defines.
+ * @param variable that is queried
+ * @param parameter unused
+ * @param available will return false if ever the variable asked for does not exist
+ * @param t is of course the town we are inquiring
+ * @return the value stored in the corresponding variable*/
+uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t)
+{
+ switch (variable) {
+ /* Larger towns */
+ case 0x40: return 1;
+
+ /* Town index */
+ case 0x41: return t->index;
+
+ /* Town properties */
+ case 0x80: return t->xy;
+ case 0x81: return GB(t->xy, 8, 8);
+ case 0x82: return t->population;
+ case 0x83: return GB(t->population, 8, 8);
+ case 0x8A: return t->grow_counter;
+ case 0x92: return t->flags12; // In original game, 0x92 and 0x93 are really one word. Since flags12 is a byte, this is to adjust
+ case 0x93: return 0;
+ case 0x94: return t->radius[0];
+ case 0x95: return GB(t->radius[0], 8, 8);
+ case 0x96: return t->radius[1];
+ case 0x97: return GB(t->radius[1], 8, 8);
+ case 0x98: return t->radius[2];
+ case 0x99: return GB(t->radius[2], 8, 8);
+ case 0x9A: return t->radius[3];
+ case 0x9B: return GB(t->radius[3], 8, 8);
+ case 0x9C: return t->radius[4];
+ case 0x9D: return GB(t->radius[4], 8, 8);
+ case 0x9E: return t->ratings[0];
+ case 0x9F: return t->ratings[1];
+ case 0xA0: return t->ratings[2];
+ case 0xA1: return t->ratings[3];
+ case 0xA2: return t->ratings[4];
+ case 0xA3: return t->ratings[5];
+ case 0xA4: return t->ratings[6];
+ case 0xA5: return t->ratings[7];
+ case 0xA6: return t->ratings[8];
+ case 0xAE: return t->have_ratings;
+ case 0xB2: return t->statues;
+ case 0xB6: return t->num_houses;
+ case 0xB9: return t->growth_rate;
+ case 0xBA: return t->new_max_pass;
+ case 0xBB: return GB(t->new_max_pass, 8, 8);
+ case 0xBC: return t->new_max_mail;
+ case 0xBD: return GB(t->new_max_mail, 8, 8);
+ case 0xBE: return t->new_act_pass;
+ case 0xBF: return GB(t->new_act_pass, 8, 8);
+ case 0xC0: return t->new_act_mail;
+ case 0xC1: return GB(t->new_act_mail, 8, 8);
+ case 0xC2: return t->max_pass;
+ case 0xC3: return GB(t->max_pass, 8, 8);
+ case 0xC4: return t->max_mail;
+ case 0xC5: return GB(t->max_mail, 8, 8);
+ case 0xC6: return t->act_pass;
+ case 0xC7: return GB(t->act_pass, 8, 8);
+ case 0xC8: return t->act_mail;
+ case 0xC9: return GB(t->act_mail, 8, 8);
+ case 0xCA: return t->pct_pass_transported;
+ case 0xCB: return t->pct_mail_transported;
+ case 0xCC: return t->new_act_food;
+ case 0xCD: return GB(t->new_act_food, 8, 8);
+ case 0xCE: return t->new_act_water;
+ case 0xCF: return GB(t->new_act_water, 8, 8);
+ case 0xD0: return t->act_food;
+ case 0xD1: return GB(t->act_food, 8, 8);
+ case 0xD2: return t->act_water;
+ case 0xD3: return GB(t->act_water, 8, 8);
+ case 0xD4: return t->road_build_months;
+ case 0xD5: return t->fund_buildings_months;
+ }
+
+ DEBUG(grf, 1, "Unhandled town property 0x%X", variable);
+
+ *available = false;
+ return (uint32)-1;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/newgrf_town.h Mon Mar 26 22:15:38 2007 +0000
@@ -0,0 +1,13 @@
+/* $Id$ */
+
+/** @file newgrf_town.h */
+
+#ifndef NEWGRF_TOWN_H
+#define NEWGRF_TOWN_H
+
+/* Currently there is no direct town resolver; we only need to get town
+ * variable results from inside stations, house tiles and industry tiles. */
+
+uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t);
+
+#endif /* NEWGRF_TOWN_H */
--- a/src/news.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/news.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file news.h */
+
#ifndef NEWS_H
#define NEWS_H
--- a/src/news_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/news_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -64,14 +64,14 @@
StringID GetNewsStringBankrupcy(const NewsItem *ni);
static DrawNewsCallbackProc * const _draw_news_callback[] = {
- DrawNewsNewVehicleAvail, /* DNC_VEHICLEAVAIL */
- DrawNewsBankrupcy, /* DNC_BANKRUPCY */
+ DrawNewsNewVehicleAvail, //< DNC_VEHICLEAVAIL
+ DrawNewsBankrupcy, //< DNC_BANKRUPCY
};
extern GetNewsStringCallbackProc * const _get_news_string_callback[];
GetNewsStringCallbackProc * const _get_news_string_callback[] = {
- GetNewsStringNewVehicleAvail, /* DNC_VEHICLEAVAIL */
- GetNewsStringBankrupcy, /* DNC_BANKRUPCY */
+ GetNewsStringNewVehicleAvail, ///< DNC_VEHICLEAVAIL
+ GetNewsStringBankrupcy, ///< DNC_BANKRUPCY
};
void InitNewsItemStructs()
@@ -104,7 +104,7 @@
static void NewsWindowProc(BaseWindow *w, WindowEvent *e)
{
switch (e->event) {
- case WE_CREATE: { /* If chatbar is open at creation time, we need to go above it */
+ case WE_CREATE: { // If chatbar is open at creation time, we need to go above it
const BaseWindow *w1 = BaseWindow::FindById(WC_SEND_NETWORK_MSG, 0);
w->message.msg = (w1 != NULL) ? w1->Height() : 0;
} break;
@@ -189,20 +189,20 @@
case WE_KEYPRESS:
if (e->we.keypress.keycode == WKC_SPACE) {
- // Don't continue.
+ /* Don't continue. */
e->we.keypress.cont = false;
w->Close();
}
break;
- case WE_MESSAGE: /* The chatbar has notified us that is was either created or closed */
+ case WE_MESSAGE: // The chatbar has notified us that is was either created or closed
switch (e->we.message.msg) {
case WE_CREATE: w->message.msg = e->we.message.wparam; break;
case WE_DESTROY: w->message.msg = 0; break;
}
break;
- case WE_TICK: { /* Scroll up newsmessages from the bottom in steps of 4 pixels */
+ case WE_TICK: { // Scroll up newsmessages from the bottom in steps of 4 pixels
int y = max(w->Top() - 4, _screen.height - w->Height() - 12 - w->message.msg);
if (y == w->Top()) return;
@@ -259,7 +259,7 @@
if (_game_mode == GM_MENU) return;
- // check the rare case that the oldest (to be overwritten) news item is open
+ /* check the rare case that the oldest (to be overwritten) news item is open */
if (_total_news == MAX_NEWS && (_oldest_news == _current_news || _oldest_news == _forced_news))
MoveToNextItem();
@@ -280,7 +280,8 @@
/*DEBUG(misc, 0, "+cur %3d, old %2d, lat %3d, for %3d, tot %2d",
_current_news, _oldest_news, _latest_news, _forced_news, _total_news);*/
- { /* Add news to _latest_news */
+ /* Add news to _latest_news */
+ {
BaseWindow *w;
NewsItem *ni = &_news_items[_latest_news];
memset(ni, 0, sizeof(*ni));
@@ -289,7 +290,7 @@
ni->display_mode = (byte)flags;
ni->flags = (byte)(flags >> 8);
- // show this news message in color?
+ /* show this news message in color? */
if (_cur_year >= _patches.colored_news_year) ni->flags |= NF_INCOLOR;
ni->type = (byte)(flags >> 16);
@@ -404,7 +405,7 @@
SB(_news_display_opt, item * 2, 2, val);
}
-// open up an own newspaper window for the news item
+/* open up an own newspaper window for the news item */
static void ShowNewspaper(NewsItem *ni)
{
BaseWindow *w;
@@ -454,7 +455,7 @@
w->flags4 |= WF_DISABLE_VP_SCROLL;
}
-// show news item in the ticker
+/* show news item in the ticker */
static void ShowTicker(const NewsItem *ni)
{
BaseWindow *w;
@@ -467,8 +468,8 @@
}
-// Are we ready to show another news item?
-// Only if nothing is in the newsticker and no newspaper is displayed
+/** Are we ready to show another news item?
+ * Only if nothing is in the newsticker and no newspaper is displayed */
static bool ReadyForNextItem()
{
const BaseWindow *w;
@@ -478,15 +479,15 @@
if (item >= MAX_NEWS) return true;
ni = &_news_items[item];
- // Ticker message
- // Check if the status bar message is still being displayed?
+ /* Ticker message
+ * Check if the status bar message is still being displayed? */
w = BaseWindow::FindById(WC_STATUS_BAR, 0);
if (w != NULL && WP(w, const def_d).data_1 > -1280) return false;
- // Newspaper message, decrement duration counter
+ /* Newspaper message, decrement duration counter */
if (ni->duration != 0) ni->duration--;
- // neither newsticker nor newspaper are running
+ /* neither newsticker nor newspaper are running */
return (ni->duration == 0 || BaseWindow::FindById(WC_NEWS_WINDOW, 0) == NULL);
}
@@ -495,18 +496,18 @@
DeleteWindowById(WC_NEWS_WINDOW, 0);
_forced_news = INVALID_NEWS;
- // if we're not at the last item, then move on
+ /* if we're not at the last item, then move on */
if (_current_news != _latest_news) {
NewsItem *ni;
_current_news = (_current_news == INVALID_NEWS) ? _oldest_news : increaseIndex(_current_news);
ni = &_news_items[_current_news];
- // check the date, don't show too old items
+ /* check the date, don't show too old items */
if (_date - _news_items_age[ni->type] > ni->date) return;
switch (GetNewsDisplayValue(ni->type)) {
- case 0: { /* Off - show nothing only a small reminder in the status bar */
+ case 0: { // Off - show nothing only a small reminder in the status bar
BaseWindow *w = BaseWindow::FindById(WC_STATUS_BAR, 0);
if (w != NULL) {
@@ -516,14 +517,14 @@
break;
}
- case 1: /* Summary - show ticker, but if forced big, cascade to full */
+ case 1: // Summary - show ticker, but if forced big, cascade to full
if (!(ni->flags & NF_FORCE_BIG)) {
ShowTicker(ni);
break;
}
/* Fallthrough */
- case 2: /* Full - show newspaper*/
+ case 2: // Full - show newspaper
ShowNewspaper(ni);
break;
}
@@ -532,7 +533,7 @@
void NewsLoop()
{
- // no news item yet
+ /* no news item yet */
if (_total_news == 0) return;
if (ReadyForNextItem()) MoveToNextItem();
@@ -543,10 +544,10 @@
{
if (_total_news == 0) return;
- // Delete the news window
+ /* Delete the news window */
DeleteWindowById(WC_NEWS_WINDOW, 0);
- // setup forced news item
+ /* setup forced news item */
_forced_news = i;
if (_forced_news != INVALID_NEWS) {
@@ -648,7 +649,7 @@
show = min(_total_news, w->vscroll.cap);
for (p = w->vscroll.pos; p < w->vscroll.pos + show; p++) {
- // get news in correct order
+ /* get news in correct order */
const NewsItem *ni = &_news_items[getNews(p)];
SetDParam(0, ni->date);
@@ -753,11 +754,18 @@
switch (e->event) {
case WE_CREATE: {
uint32 val = _news_display_opt;
+ uint32 all_val;
int i;
- WP(w, def_d).data_1 = 0;
/* Set up the initial disabled buttons in the case of 'off' or 'full' */
- for (i = 0; i < NT_END; i++, val >>= 2) SetMessageButtonStates(w, val & 0x3, i);
+ all_val = val & 0x3;
+ for (i = 0; i < NT_END; i++, val >>= 2) {
+ SetMessageButtonStates(w, val & 0x3, i);
+ /* If the value doesn't match the ALL-button value, set the ALL-button value to 'off' */
+ if ((val & 0x3) != all_val) all_val = 0;
+ }
+ /* If all values are the same value, the ALL-button will take over this value */
+ WP(w, def_d).data_1 = all_val;
} break;
case WE_PAINT: {
--- a/src/npf.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/npf.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file npf.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "bridge_map.h"
@@ -99,14 +101,14 @@
uint x;
uint y;
- // we are going the aim for the x coordinate of the closest corner
- // but if we are between those coordinates, we will aim for our own x coordinate
+ /* we are going the aim for the x coordinate of the closest corner
+ * but if we are between those coordinates, we will aim for our own x coordinate */
x = clamp(TileX(tile), minx, maxx);
- // same for y coordinate, see above comment
+ /* same for y coordinate, see above comment */
y = clamp(TileY(tile), miny, maxy);
- // return the tile of our target coordinates
+ /* return the tile of our target coordinates */
return TileXY(x, y);
}
@@ -121,7 +123,7 @@
TileIndex to = fstd->dest_coords;
uint dist;
- // for train-stations, we are going to aim for the closest station tile
+ /* for train-stations, we are going to aim for the closest station tile */
if (as->user_data[NPF_TYPE] == TRANSPORT_RAIL && fstd->station_index != INVALID_STATION)
to = CalcClosestStationTile(fstd->station_index, from);
@@ -173,7 +175,7 @@
FindLengthOfTunnelResult flotr;
flotr = FindLengthOfTunnel(tile, ReverseDiagDir(exitdir));
return flotr.length * NPF_TILE_LENGTH;
- //TODO: Penalty for tunnels?
+ /* @todo: Penalty for tunnels? */
} else {
/* We are entering the tunnel, the enter tile is just a
* straight track */
@@ -244,19 +246,19 @@
static int32 NPFWaterPathCost(AyStar* as, AyStarNode* current, OpenListNode* parent)
{
- //TileIndex tile = current->tile;
+ /* TileIndex tile = current->tile; */
int32 cost = 0;
Trackdir trackdir = (Trackdir)current->direction;
- cost = _trackdir_length[trackdir]; /* Should be different for diagonal tracks */
+ cost = _trackdir_length[trackdir]; // Should be different for diagonal tracks
if (IsBuoyTile(current->tile) && IsDiagonalTrackdir(trackdir))
- cost += _patches.npf_buoy_penalty; /* A small penalty for going over buoys */
+ cost += _patches.npf_buoy_penalty; // A small penalty for going over buoys
if (current->direction != NextTrackdir((Trackdir)parent->path.node.direction))
cost += _patches.npf_water_curve_penalty;
- /* TODO More penalties? */
+ /* @todo More penalties? */
return cost;
}
@@ -385,8 +387,8 @@
/* Check for turns */
if (current->direction != NextTrackdir((Trackdir)parent->path.node.direction))
cost += _patches.npf_rail_curve_penalty;
- //TODO, with realistic acceleration, also the amount of straight track between
- // curves should be taken into account, as this affects the speed limit.
+ /*TODO, with realistic acceleration, also the amount of straight track between
+ * curves should be taken into account, as this affects the speed limit. */
/* Check for reverse in depot */
if (IsTileDepotType(tile, TRANSPORT_RAIL) && as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE) {
@@ -484,7 +486,7 @@
break;
}
- return true; /* no need to check */
+ return true; // no need to check
}
@@ -544,7 +546,7 @@
/* Find out the exit direction first */
if (IsRoadStopTile(src_tile)) {
exitdir = GetRoadStopDir(src_tile);
- } else { /* Train or road depot */
+ } else { // Train or road depot
exitdir = GetDepotDirection(src_tile, type);
}
@@ -610,7 +612,7 @@
DiagDirection exitdir;
if (IsRoadStopTile(dst_tile)) {
exitdir = GetRoadStopDir(dst_tile);
- } else { /* Road or train depot */
+ } else { // Road or train depot
exitdir = GetDepotDirection(dst_tile, type);
}
/* Find the trackdirs that are available for a depot or station with this
@@ -640,7 +642,7 @@
/* Check for oneway signal against us */
if (IsTileType(dst_tile, MP_RAILWAY) && GetRailTileType(dst_tile) == RAIL_TILE_SIGNALS) {
if (HasSignalOnTrackdir(dst_tile, ReverseTrackdir(dst_trackdir)) && !HasSignalOnTrackdir(dst_tile, dst_trackdir))
- // if one way signal not pointing towards us, stop going in this direction.
+ /* if one way signal not pointing towards us, stop going in this direction. */
break;
}
{
--- a/src/npf.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/npf.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file npf.h */
+
#ifndef NPF_H
#define NPF_H
@@ -9,9 +11,9 @@
#include "vehicle.h"
#include "tile.h"
-//mowing grass
+/* mowing grass */
enum {
- NPF_HASH_BITS = 12, /* The size of the hash used in pathfinding. Just changing this value should be sufficient to change the hash size. Should be an even value. */
+ NPF_HASH_BITS = 12, ///< The size of the hash used in pathfinding. Just changing this value should be sufficient to change the hash size. Should be an even value.
/* Do no change below values */
NPF_HASH_SIZE = 1 << NPF_HASH_BITS,
NPF_HASH_HALFBITS = NPF_HASH_BITS / 2,
@@ -35,33 +37,38 @@
NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH
};
-struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */
- TileIndex dest_coords; /* An indication of where the station is, for heuristic purposes, or the target tile */
- StationID station_index; /* station index we're heading for, or INVALID_STATION when we're heading for a tile */
+/* Meant to be stored in AyStar.targetdata */
+struct NPFFindStationOrTileData {
+ TileIndex dest_coords; ///< An indication of where the station is, for heuristic purposes, or the target tile
+ StationID station_index; ///< station index we're heading for, or INVALID_STATION when we're heading for a tile
};
-enum { /* Indices into AyStar.userdata[] */
- NPF_TYPE = 0, /* Contains a TransportTypes value */
- NPF_OWNER, /* Contains an Owner value */
- NPF_RAILTYPES, /* Contains a bitmask the compatible RailTypes of the engine when NPF_TYPE == TRANSPORT_RAIL. Unused otherwise. */
+/* Indices into AyStar.userdata[] */
+enum {
+ NPF_TYPE = 0, ///< Contains a TransportTypes value
+ NPF_OWNER, ///< Contains an Owner value
+ NPF_RAILTYPES, ///< Contains a bitmask the compatible RailTypes of the engine when NPF_TYPE == TRANSPORT_RAIL. Unused otherwise.
};
-enum { /* Indices into AyStarNode.userdata[] */
- NPF_TRACKDIR_CHOICE = 0, /* The trackdir chosen to get here */
+/* Indices into AyStarNode.userdata[] */
+enum {
+ NPF_TRACKDIR_CHOICE = 0, ///< The trackdir chosen to get here
NPF_NODE_FLAGS,
};
-enum NPFNodeFlag { /* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
- NPF_FLAG_SEEN_SIGNAL, /* Used to mark that a signal was seen on the way, for rail only */
- NPF_FLAG_REVERSE, /* Used to mark that this node was reached from the second start node, if applicable */
- NPF_FLAG_LAST_SIGNAL_RED, /* Used to mark that the last signal on this path was red */
+/* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
+enum NPFNodeFlag {
+ NPF_FLAG_SEEN_SIGNAL, ///< Used to mark that a signal was seen on the way, for rail only
+ NPF_FLAG_REVERSE, ///< Used to mark that this node was reached from the second start node, if applicable
+ NPF_FLAG_LAST_SIGNAL_RED, ///< Used to mark that the last signal on this path was red
};
-struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
- uint best_bird_dist; /* The best heuristic found. Is 0 if the target was found */
- uint best_path_dist; /* The shortest path. Is (uint)-1 if no path is found */
- Trackdir best_trackdir; /* The trackdir that leads to the shortest path/closest birds dist */
- AyStarNode node; /* The node within the target the search led us to */
+/* Meant to be stored in AyStar.userpath */
+struct NPFFoundTargetData {
+ uint best_bird_dist; ///< The best heuristic found. Is 0 if the target was found
+ uint best_path_dist; ///< The shortest path. Is (uint)-1 if no path is found
+ Trackdir best_trackdir; ///< The trackdir that leads to the shortest path/closest birds dist
+ AyStarNode node; ///< The node within the target the search led us to
};
/* These functions below are _not_ re-entrant, in favor of speed! */
--- a/src/oldloader.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/oldloader.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file oldloader.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "station_map.h"
@@ -415,11 +417,11 @@
OCL_SVAR( OC_UINT16, Town, townnametype ),
OCL_SVAR( OC_UINT32, Town, townnameparts ),
OCL_SVAR( OC_UINT8, Town, grow_counter ),
- OCL_NULL( 1 ), // sort_index, no longer in use
- OCL_NULL( 4 ), // sign-coordinates, no longer in use
- OCL_NULL( 2 ), // namewidth, no longer in use
+ OCL_NULL( 1 ), ///< sort_index, no longer in use
+ OCL_NULL( 4 ), ///< sign-coordinates, no longer in use
+ OCL_NULL( 2 ), ///< namewidth, no longer in use
OCL_SVAR( OC_UINT16, Town, flags12 ),
- OCL_NULL( 10 ), // radius, no longer in use
+ OCL_NULL( 10 ), ///< radius, no longer in use
OCL_SVAR( OC_UINT16, Town, ratings[0] ),
OCL_SVAR( OC_UINT16, Town, ratings[1] ),
@@ -458,7 +460,7 @@
OCL_SVAR( OC_UINT8, Town, road_build_months ),
OCL_SVAR( OC_UINT8, Town, fund_buildings_months ),
- OCL_NULL( 8 ), // some junk at the end of the record
+ OCL_NULL( 8 ), ///< some junk at the end of the record
OCL_END()
};
@@ -538,7 +540,7 @@
OCL_VAR ( OC_INT32, 1, &_old_price ),
OCL_VAR ( OC_UINT16, 1, &_old_price_frac ),
- OCL_NULL( 2 ), // Junk
+ OCL_NULL( 2 ), ///< Junk
OCL_END()
};
@@ -577,19 +579,19 @@
OCL_SVAR( OC_TILE, Station, xy ),
OCL_VAR ( OC_UINT32, 1, &_old_town_index ),
- OCL_NULL( 4 ), // bus/lorry tile
+ OCL_NULL( 4 ), ///< bus/lorry tile
OCL_SVAR( OC_TILE, Station, train_tile ),
OCL_SVAR( OC_TILE, Station, airport_tile ),
OCL_SVAR( OC_TILE, Station, dock_tile ),
OCL_VAR ( OC_UINT8, 1, &_old_platforms ),
- OCL_NULL( 1 ), // sort-index, no longer in use
- OCL_NULL( 2 ), // sign-width, no longer in use
+ OCL_NULL( 1 ), ///< sort-index, no longer in use
+ OCL_NULL( 2 ), ///< sign-width, no longer in use
OCL_VAR ( OC_UINT16, 1, &_old_string_id ),
- OCL_NULL( 4 ), // sign left/top, no longer in use
+ OCL_NULL( 4 ), ///< sign left/top, no longer in use
OCL_SVAR( OC_UINT16, Station, had_vehicle_of_type ),
@@ -607,9 +609,9 @@
*/
OCL_NULL( 4 ),
OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Station, airport_flags ),
- OCL_NULL( 2 ), // last_vehicle. now last_vehicle_type
+ OCL_NULL( 2 ), ///< last_vehicle. now last_vehicle_type
- OCL_NULL( 4 ), // Junk at end of chunk
+ OCL_NULL( 4 ), ///< Junk at end of chunk
OCL_END()
};
@@ -682,7 +684,7 @@
OCL_SVAR( OC_UINT16, Industry, counter ),
OCL_SVAR( OC_UINT8, Industry, was_cargo_delivered ),
- OCL_NULL( 9 ), // Random junk at the end of this chunk
+ OCL_NULL( 9 ), ///< Random junk at the end of this chunk
OCL_END()
};
@@ -769,7 +771,7 @@
OCL_SVAR( OC_UINT8, AiBuildRec, direction ),
OCL_SVAR( OC_UINT8, AiBuildRec, cargo ),
- OCL_NULL( 8 ), // Junk...
+ OCL_NULL( 8 ), ///< Junk...
OCL_END()
};
@@ -789,14 +791,14 @@
}
static const OldChunks player_ai_chunk[] = {
OCL_SVAR( OC_UINT8, PlayerAI, state ),
- OCL_NULL( 1 ), // Junk
+ OCL_NULL( 1 ), ///< Junk
OCL_SVAR( OC_UINT8, PlayerAI, state_mode ),
OCL_SVAR( OC_UINT16, PlayerAI, state_counter ),
OCL_SVAR( OC_UINT16, PlayerAI, timeout_counter ),
OCL_CHUNK( 4, OldLoadAIBuildRec ),
- OCL_NULL( 20 ), // More junk
+ OCL_NULL( 20 ), ///< More junk
OCL_SVAR( OC_UINT8, PlayerAI, cargo_type ),
OCL_SVAR( OC_UINT8, PlayerAI, num_wagons ),
@@ -805,9 +807,9 @@
OCL_SVAR( OC_UINT8, PlayerAI, num_loco_to_build ),
OCL_SVAR( OC_UINT8, PlayerAI, num_want_fullload ),
- OCL_NULL( 14 ), // Oh no more junk :|
+ OCL_NULL( 14 ), ///< Oh no more junk :|
- OCL_NULL( 2 ), // Loco-id, not used
+ OCL_NULL( 2 ), ///< Loco-id, not used
OCL_SVAR( OC_UINT16, PlayerAI, wagon_list[0] ),
OCL_SVAR( OC_UINT16, PlayerAI, wagon_list[1] ),
@@ -934,7 +936,7 @@
OCL_SVAR( OC_UINT8, Player, share_owners[2] ),
OCL_SVAR( OC_UINT8, Player, share_owners[3] ),
- OCL_NULL( 8 ), // junk at end of chunk
+ OCL_NULL( 8 ), ///< junk at end of chunk
OCL_END()
};
@@ -996,7 +998,7 @@
OCL_SVAR( OC_UINT16, VehicleRail, crash_anim_pos ),
OCL_SVAR( OC_UINT8, VehicleRail, railtype ),
- OCL_NULL( 5 ), // Junk
+ OCL_NULL( 5 ), ///< Junk
OCL_END()
};
@@ -1010,7 +1012,7 @@
OCL_SVAR( OC_UINT16, VehicleRoad, crashed_ctr ),
OCL_SVAR( OC_UINT8, VehicleRoad, reverse_ctr ),
- OCL_NULL( 1 ), // Junk
+ OCL_NULL( 1 ), ///< Junk
OCL_END()
};
@@ -1018,7 +1020,7 @@
static const OldChunks vehicle_ship_chunk[] = {
OCL_SVAR( OC_UINT8, VehicleShip, state ),
- OCL_NULL( 9 ), // Junk
+ OCL_NULL( 9 ), ///< Junk
OCL_END()
};
@@ -1029,7 +1031,7 @@
OCL_SVAR( OC_UINT16, VehicleAir, crashed_counter ),
OCL_SVAR( OC_UINT8, VehicleAir, state ),
- OCL_NULL( 5 ), // Junk
+ OCL_NULL( 5 ), ///< Junk
OCL_END()
};
@@ -1047,13 +1049,13 @@
OCL_SVAR( OC_UINT16, VehicleDisaster, image_override ),
OCL_SVAR( OC_UINT16, VehicleDisaster, unk2 ),
- OCL_NULL( 6 ), // Junk
+ OCL_NULL( 6 ), ///< Junk
OCL_END()
};
static const OldChunks vehicle_empty_chunk[] = {
- OCL_NULL( 10 ), // Junk
+ OCL_NULL( 10 ), ///< Junk
OCL_END()
};
@@ -1090,8 +1092,8 @@
OCL_SVAR( OC_UINT8, Vehicle, type ),
OCL_SVAR( OC_UINT8, Vehicle, subtype ),
- OCL_NULL( 2 ), // Hash, calculated automatically
- OCL_NULL( 2 ), // Index, calculated automatically
+ OCL_NULL( 2 ), ///< Hash, calculated automatically
+ OCL_NULL( 2 ), ///< Index, calculated automatically
OCL_VAR ( OC_UINT32, 1, &_old_order_ptr ),
OCL_VAR ( OC_UINT16, 1, &_old_order ),
@@ -1120,7 +1122,7 @@
OCL_SVAR( OC_TILE, Vehicle, tile ),
OCL_SVAR( OC_UINT16, Vehicle, cur_image ),
- OCL_NULL( 8 ), // Vehicle sprite box, calculated automatically
+ OCL_NULL( 8 ), ///< Vehicle sprite box, calculated automatically
OCL_SVAR( OC_FILE_U16 | OC_VAR_U8, Vehicle, vehstatus ),
OCL_SVAR( OC_UINT16, Vehicle, cur_speed ),
@@ -1163,7 +1165,7 @@
OCL_CHUNK( 1, LoadOldVehicleUnion ),
- OCL_NULL( 20 ), // Junk at end of struct (TTDPatch has some data in it)
+ OCL_NULL( 20 ), ///< Junk at end of struct (TTDPatch has some data in it)
OCL_END()
};
@@ -1221,7 +1223,7 @@
OCL_SVAR( OC_FILE_U16 | OC_VAR_I32,Sign, y ),
OCL_SVAR( OC_FILE_U16 | OC_VAR_I8, Sign, z ),
- OCL_NULL( 6 ), // Width of sign, no longer in use
+ OCL_NULL( 6 ), ///< Width of sign, no longer in use
OCL_END()
};
@@ -1252,7 +1254,7 @@
OCL_SVAR( OC_UINT8, Engine, preview_player ),
OCL_SVAR( OC_UINT8, Engine, preview_wait ),
- OCL_NULL( 2 ), // Junk
+ OCL_NULL( 2 ), ///< Junk
OCL_END()
};
@@ -1385,7 +1387,8 @@
AppendStaticGRFConfigs(&_grfconfig);
} break;
- case 0x3: { /* TTDPatch version and configuration */
+ /* TTDPatch version and configuration */
+ case 0x3: {
uint32 ttdpv = ReadUint32(ls);
DEBUG(oldloader, 3, "Game saved with TTDPatch version %d.%d.%d r%d", GB(ttdpv, 24, 8), GB(ttdpv, 20, 4), GB(ttdpv, 16, 4), GB(ttdpv, 0, 16));
len -= 4;
@@ -1407,7 +1410,7 @@
OCL_ASSERT( 0 ),
OCL_VAR ( OC_FILE_U16 | OC_VAR_U32, 1, &_date ),
OCL_VAR ( OC_UINT16, 1, &_date_fract ),
- OCL_NULL( 600 ), // TextEffects
+ OCL_NULL( 600 ), ///< TextEffects
OCL_VAR ( OC_UINT32, 2, &_random_seeds[0] ),
OCL_ASSERT( 0x264 ),
@@ -1417,14 +1420,14 @@
OCL_ASSERT( 0x4328 ),
OCL_VAR ( OC_TILE, 256, &_animated_tile_list[0] ),
- OCL_NULL( 4 ), // old end-of-order-list-pointer, no longer in use
+ OCL_NULL( 4 ), ///< old end-of-order-list-pointer, no longer in use
OCL_CHUNK( 255, LoadOldDepot ),
OCL_ASSERT( 0x4B26 ),
OCL_VAR ( OC_UINT32, 1, &_old_cur_town_ctr ),
- OCL_NULL( 2 ), // timer_counter, no longer in use
- OCL_NULL( 2 ), // land_code, no longer in use
+ OCL_NULL( 2 ), ///< timer_counter, no longer in use
+ OCL_NULL( 2 ), ///< land_code, no longer in use
OCL_VAR ( OC_FILE_U16 | OC_VAR_U8, 1, &_age_cargo_skip_counter ),
OCL_VAR ( OC_UINT16, 1, &_tick_counter ),
@@ -1451,7 +1454,7 @@
OCL_VAR ( OC_UINT8, 32 * 500, &_name_array[0] ),
- OCL_NULL( 0x2000 ), // Old hash-table, no longer in use
+ OCL_NULL( 0x2000 ), ///< Old hash-table, no longer in use
OCL_CHUNK( 40, LoadOldSign ),
OCL_CHUNK(256, LoadOldEngine ),
@@ -1471,12 +1474,12 @@
OCL_VAR ( OC_UINT16, 1, &_disaster_delay ),
- OCL_NULL( 144 ), // cargo-stuff, calculated in InitializeLandscapeVariables
+ OCL_NULL( 144 ), ///< cargo-stuff, calculated in InitializeLandscapeVariables
OCL_VAR ( OC_UINT16, 256, &_engine_name_strings[0] ),
- OCL_NULL( 144 ), // AI cargo-stuff, calculated in InitializeLandscapeVariables
- OCL_NULL( 2 ), // Company indexes of players, no longer in use
+ OCL_NULL( 144 ), ///< AI cargo-stuff, calculated in InitializeLandscapeVariables
+ OCL_NULL( 2 ), ///< Company indexes of players, no longer in use
OCL_VAR ( OC_FILE_U8 | OC_VAR_U16, 1, &_station_tick_ctr ),
@@ -1484,8 +1487,8 @@
OCL_VAR ( OC_UINT8, 1, &_opt.units ),
OCL_VAR ( OC_FILE_U8 | OC_VAR_U32, 1, &_cur_player_tick_index ),
- OCL_NULL( 2 ), // Date stuff, calculated automatically
- OCL_NULL( 8 ), // Player colors, calculated automatically
+ OCL_NULL( 2 ), ///< Date stuff, calculated automatically
+ OCL_NULL( 8 ), ///< Player colors, calculated automatically
OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount ),
OCL_VAR ( OC_UINT8, 1, &_economy.infl_amount_pr ),
@@ -1502,11 +1505,11 @@
OCL_VAR ( OC_UINT8, 1, &_opt.landscape ),
OCL_VAR ( OC_UINT8, 1, &_trees_tick_ctr ),
- OCL_NULL( 1 ), // Custom vehicle types yes/no, no longer used
+ OCL_NULL( 1 ), ///< Custom vehicle types yes/no, no longer used
OCL_VAR ( OC_UINT8, 1, &_opt.snow_line ),
- OCL_NULL( 32 ), // new_industry_randtable, no longer used (because of new design)
- OCL_NULL( 36 ), // cargo-stuff, calculated in InitializeLandscapeVariables
+ OCL_NULL( 32 ), ///< new_industry_randtable, no longer used (because of new design)
+ OCL_NULL( 36 ), ///< cargo-stuff, calculated in InitializeLandscapeVariables
OCL_ASSERT( 0x77179 ),
--- a/src/oldpool.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/oldpool.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file oldpool.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "debug.h"
--- a/src/oldpool.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/oldpool.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file oldpool.h */
+
#ifndef OLDPOOL_H
#define OLDPOOL_H
--- a/src/openttd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/openttd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file openttd.cpp */
+
#include "stdafx.h"
#define VARDEF
#include "string.h"
@@ -56,6 +58,7 @@
#include "clear_map.h"
#include "fontcache.h"
#include "newgrf_config.h"
+#include "newgrf_house.h"
#include "player_face.h"
#include "bridge_map.h"
@@ -219,17 +222,17 @@
md_continue_here:;
s++;
if (*s != 0) {
- // Found argument, try to locate it in options.
+ /* Found argument, try to locate it in options. */
if (*s == ':' || (r = strchr(md->options, *s)) == NULL) {
- // ERROR!
+ /* ERROR! */
return -2;
}
if (r[1] == ':') {
- // Item wants an argument. Check if the argument follows, or if it comes as a separate arg.
+ /* Item wants an argument. Check if the argument follows, or if it comes as a separate arg. */
if (!*(t = s + 1)) {
- // It comes as a separate arg. Check if out of args?
+ /* It comes as a separate arg. Check if out of args? */
if (--md->numleft < 0 || *(t = *md->argv) == '-') {
- // Check if item is optional?
+ /* Check if item is optional? */
if (r[2] != ':')
return -2;
md->numleft++;
@@ -247,7 +250,7 @@
return *s;
}
} else {
- // This is currently not supported.
+ /* This is currently not supported. */
return -2;
}
}
@@ -304,11 +307,11 @@
_opt_ptr = &_opt_newgame;
ResetGRFConfig(false);
- // Setup main window
+ /* Setup main window */
ResetWindowSystem();
SetupColorsAndInitialWindow();
- // Generate a world.
+ /* Generate a world. */
snprintf(filename, lengthof(filename), "%sopntitle.dat", _paths.data_dir);
#if defined SECOND_DATA_DIR
if (SaveOrLoad(filename, SL_LOAD) != SL_OK) {
@@ -327,7 +330,7 @@
_cursor.fix_at = false;
MarkWholeScreenDirty();
- // Play main theme
+ /* Play main theme */
if (_music_driver->is_song_playing()) ResetMusic();
}
@@ -361,10 +364,10 @@
_dedicated_forks = false;
_config_file = NULL;
- // The last param of the following function means this:
- // a letter means: it accepts that param (e.g.: -h)
- // a ':' behind it means: it need a param (e.g.: -m<driver>)
- // a '::' behind it means: it can optional have a param (e.g.: -d<debug>)
+ /* The last param of the following function means this:
+ * a letter means: it accepts that param (e.g.: -h)
+ * a ':' behind it means: it need a param (e.g.: -m<driver>)
+ * a '::' behind it means: it can optional have a param (e.g.: -d<debug>) */
optformat = "m:s:v:hD::n::eit:d::r:g::G:c:xl:"
#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(WIN32)
"f"
@@ -419,6 +422,8 @@
_switch_mode = SM_LOAD;
} else {
_switch_mode = SM_NEWGAME;
+ /* Give a random map */
+ generation_seed = InteractiveRandom();
}
break;
case 'G': generation_seed = atoi(mgo.opt); break;
@@ -431,11 +436,11 @@
}
}
- DeterminePaths();
+ DeterminePaths(argv[0]);
CheckExternalFiles();
#if defined(UNIX) && !defined(__MORPHOS__)
- // We must fork here, or we'll end up without some resources we need (like sockets)
+ /* We must fork here, or we'll end up without some resources we need (like sockets) */
if (_dedicated_forks)
DedicatedFork();
#endif
@@ -444,7 +449,7 @@
CheckConfig();
LoadFromHighScore();
- // override config?
+ /* override config? */
if (!StrEmpty(musicdriver)) ttd_strlcpy(_ini_musicdriver, musicdriver, sizeof(_ini_musicdriver));
if (!StrEmpty(sounddriver)) ttd_strlcpy(_ini_sounddriver, sounddriver, sizeof(_ini_sounddriver));
if (!StrEmpty(videodriver)) ttd_strlcpy(_ini_videodriver, videodriver, sizeof(_ini_videodriver));
@@ -458,13 +463,13 @@
if (_dedicated_forks && !dedicated) _dedicated_forks = false;
#endif /* ENABLE_NETWORK */
- // enumerate language files
+ /* enumerate language files */
InitializeLanguagePacks();
- // initialize screenshot formats
+ /* initialize screenshot formats */
InitializeScreenshotFormats();
- // initialize airport state machines
+ /* initialize airport state machines */
InitializeAirports();
/* initialize all variables that are allocated dynamically */
@@ -473,7 +478,7 @@
/* start the AI */
AI_Initialize();
- // Sample catalogue
+ /* Sample catalogue */
DEBUG(misc, 1, "Loading sound effects...");
MxInitialize(11025);
SoundInitialize("sample.cat");
@@ -481,7 +486,7 @@
/* Initialize FreeType */
InitFreeType();
- // This must be done early, since functions use the InvalidateWindow* calls
+ /* This must be done early, since functions use the InvalidateWindow* calls */
InitWindowSystem();
/* Initialize game palette */
@@ -493,7 +498,7 @@
LoadDriver(VIDEO_DRIVER, _ini_videodriver); // load video last, to prevent an empty window while sound and music loads
_savegame_sort_order = SORT_BY_DATE | SORT_DESCENDING;
- // restore saved music volume
+ /* restore saved music volume */
_music_driver->set_volume(msf.music_vol);
NetworkStartUp(); // initialize network-core
@@ -527,7 +532,7 @@
UpdatePatches();
}
- // initialize the ingame console
+ /* initialize the ingame console */
IConsoleInit();
_cursor.in_window = true;
InitializeGUI();
@@ -675,6 +680,7 @@
_game_mode = GM_NORMAL;
ResetGRFConfig(true);
+ ResetHouseIDMapping();
GenerateWorldSetCallback(&MakeNewGameDone);
GenerateWorld(from_heightmap ? GW_HEIGHTMAP : GW_NEWGAME, 1 << _patches.map_x, 1 << _patches.map_y);
@@ -710,7 +716,7 @@
{
_game_mode = GM_NORMAL;
- // invalid type
+ /* invalid type */
if (_file_to_saveload.mode == SL_INVALID) {
DEBUG(sl, 0, "Savegame is obsolete or invalid format: '%s'", _file_to_saveload.name);
ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0);
@@ -718,14 +724,14 @@
return;
}
- // Reinitialize windows
+ /* Reinitialize windows */
ResetWindowSystem();
SetupColorsAndInitialWindow();
ResetGRFConfig(true);
- // Load game
+ /* Load game */
if (SaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode) != SL_OK) {
LoadIntroGame();
ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0);
@@ -735,7 +741,7 @@
_opt_ptr->diff = _opt_newgame.diff;
_opt.diff_level = _opt_newgame.diff_level;
- // Inititalize data
+ /* Inititalize data */
StartupEconomy();
StartupPlayers();
StartupEngines();
@@ -773,9 +779,9 @@
void SwitchMode(int new_mode)
{
#ifdef ENABLE_NETWORK
- // If we are saving something, the network stays in his current state
+ /* If we are saving something, the network stays in his current state */
if (new_mode != SM_SAVE) {
- // If the network is active, make it not-active
+ /* If the network is active, make it not-active */
if (_networking) {
if (_network_server && (new_mode == SM_LOAD || new_mode == SM_NEWGAME)) {
NetworkReboot();
@@ -786,13 +792,13 @@
}
}
- // If we are a server, we restart the server
+ /* If we are a server, we restart the server */
if (_is_network_server) {
- // But not if we are going to the menu
+ /* But not if we are going to the menu */
if (new_mode != SM_MENU) {
NetworkServerStart();
} else {
- // This client no longer wants to be a network-server
+ /* This client no longer wants to be a network-server */
_is_network_server = false;
}
}
@@ -886,7 +892,7 @@
case SM_GENRANDLAND: /* Generate random land within scenario editor */
SetLocalPlayer(OWNER_NONE);
GenerateWorld(GW_RANDOM, 1 << _patches.map_x, 1 << _patches.map_y);
- // XXX: set date
+ /* XXX: set date */
MarkWholeScreenDirty();
break;
}
@@ -897,13 +903,13 @@
}
-// State controlling game loop.
-// The state must not be changed from anywhere
-// but here.
-// That check is enforced in DoCommand.
+/* State controlling game loop.
+ * The state must not be changed from anywhere
+ * but here.
+ * That check is enforced in DoCommand. */
void StateGameLoop()
{
- // dont execute the state loop during pause
+ /* dont execute the state loop during pause */
if (_pause_game) return;
if (IsGeneratingWorld()) return;
@@ -914,8 +920,8 @@
CallWindowTickEvent();
NewsLoop();
} else {
- // All these actions has to be done from OWNER_NONE
- // for multiplayer compatibility
+ /* All these actions has to be done from OWNER_NONE
+ * for multiplayer compatibility */
PlayerID p = _current_player;
_current_player = OWNER_NONE;
@@ -954,12 +960,12 @@
SetDParam(2, _date);
s = GetString(s, STR_4004, lastof(buf));
strecpy(s, ".sav", lastof(buf));
- } else { /* generate a savegame name and number according to _patches.max_num_autosaves */
+ } else { // generate a savegame name and number according to _patches.max_num_autosaves
snprintf(buf, lengthof(buf), "%s%sautosave%d.sav", _paths.autosave_dir, PATHSEP, _autosave_ctr);
_autosave_ctr++;
if (_autosave_ctr >= _patches.max_num_autosaves) {
- // we reached the limit for numbers of autosaves. We will start over
+ /* we reached the limit for numbers of autosaves. We will start over */
_autosave_ctr = 0;
}
}
@@ -982,21 +988,21 @@
static const int8 scrollamt[16][2] = {
{ 0, 0},
- {-2, 0}, // 1 : left
- { 0, -2}, // 2 : up
- {-2, -1}, // 3 : left + up
- { 2, 0}, // 4 : right
- { 0, 0}, // 5 : left + right
- { 2, -1}, // 6 : right + up
- { 0, -2}, // 7 : left + right + up = up
- { 0 ,2}, // 8 : down
- {-2 ,1}, // 9 : down+left
- { 0, 0}, // 10 : impossible
- {-2, 0}, // 11 : left + up + down = left
- { 2, 1}, // 12 : down+right
- { 0, 2}, // 13 : left + right + down = down
- { 0, -2}, // 14 : left + right + up = up
- { 0, 0}, // 15 : impossible
+ {-2, 0}, ///< 1 : left
+ { 0, -2}, ///< 2 : up
+ {-2, -1}, ///< 3 : left + up
+ { 2, 0}, ///< 4 : right
+ { 0, 0}, ///< 5 : left + right
+ { 2, -1}, ///< 6 : right + up
+ { 0, -2}, ///< 7 : left + right + up = up
+ { 0 ,2}, ///< 8 : down
+ {-2 ,1}, ///< 9 : down+left
+ { 0, 0}, ///< 10 : impossible
+ {-2, 0}, ///< 11 : left + up + down = left
+ { 2, 1}, ///< 12 : down+right
+ { 0, 2}, ///< 13 : left + right + down = down
+ { 0, -2}, ///< 14 : left + right + up = up
+ { 0, 0}, ///< 15 : impossible
};
static void HandleKeyScrolling()
@@ -1013,20 +1019,20 @@
if ((message = OTTD_PollThreadEvent()) != 0) ProcessSentMessage(message);
- // autosave game?
+ /* autosave game? */
if (_do_autosave) {
_do_autosave = false;
DoAutosave();
RedrawAutosave();
}
- // handle scrolling of the main window
+ /* handle scrolling of the main window */
HandleKeyScrolling();
- // make a screenshot?
+ /* make a screenshot? */
if (IsScreenshotRequested()) ShowScreenshotResult(MakeScreenshot());
- // switch game mode?
+ /* switch game mode? */
if (_switch_mode != SM_NONE) {
SwitchMode(_switch_mode);
_switch_mode = SM_NONE;
@@ -1046,19 +1052,19 @@
CursorTick();
#ifdef ENABLE_NETWORK
- // Check for UDP stuff
+ /* Check for UDP stuff */
if (_network_available) NetworkUDPGameLoop();
if (_networking && !IsGeneratingWorld()) {
- // Multiplayer
+ /* Multiplayer */
NetworkGameLoop();
} else {
if (_network_reconnect > 0 && --_network_reconnect == 0) {
- // This means that we want to reconnect to the last host
- // We do this here, because it means that the network is really closed
+ /* This means that we want to reconnect to the last host
+ * We do this here, because it means that the network is really closed */
NetworkClientConnectGame(_network_last_host, _network_last_port);
}
- // Singleplayer
+ /* Singleplayer */
StateGameLoop();
}
#else
@@ -1106,7 +1112,7 @@
}
}
-// before savegame version 4, the name of the company determined if it existed
+/* before savegame version 4, the name of the company determined if it existed */
static void CheckIsPlayerActive()
{
Player *p;
@@ -1116,7 +1122,7 @@
}
}
-// since savegame version 4.1, exclusive transport rights are stored at towns
+/* since savegame version 4.1, exclusive transport rights are stored at towns */
static void UpdateExclusiveRights()
{
Town *t;
@@ -1142,7 +1148,7 @@
16, 22, 21, 7, 15,
18, 2, 20, };
-// since savegame version 4.2 the currencies are arranged differently
+/* since savegame version 4.2 the currencies are arranged differently */
static void UpdateCurrencies()
{
_opt.currency = convert_currency[_opt.currency];
@@ -1159,7 +1165,7 @@
for (i = 0; i < MapSizeX(); ++i) MakeVoid(MapSizeX() * MapMaxY() + i);
}
-// since savegame version 6.0 each sign has an "owner", signs without owner (from old games are set to 255)
+/* since savegame version 6.0 each sign has an "owner", signs without owner (from old games are set to 255) */
static void UpdateSignOwner()
{
Sign *si;
@@ -1182,16 +1188,16 @@
ViewPort *vp;
Player *p;
- // in version 2.1 of the savegame, town owner was unified.
+ /* in version 2.1 of the savegame, town owner was unified. */
if (CheckSavegameVersionOldStyle(2, 1)) ConvertTownOwner();
- // from version 4.1 of the savegame, exclusive rights are stored at towns
+ /* from version 4.1 of the savegame, exclusive rights are stored at towns */
if (CheckSavegameVersionOldStyle(4, 1)) UpdateExclusiveRights();
- // from version 4.2 of the savegame, currencies are in a different order
+ /* from version 4.2 of the savegame, currencies are in a different order */
if (CheckSavegameVersionOldStyle(4, 2)) UpdateCurrencies();
- // from version 6.1 of the savegame, signs have an "owner"
+ /* from version 6.1 of the savegame, signs have an "owner" */
if (CheckSavegameVersionOldStyle(6, 1)) UpdateSignOwner();
/* In old version there seems to be a problem that water is owned by
@@ -1206,7 +1212,7 @@
}
}
- // convert road side to my format.
+ /* convert road side to my format. */
if (_opt.road_side) _opt.road_side = 1;
/* Check if all NewGRFs are present, we are very strict in MP mode */
@@ -1223,7 +1229,7 @@
* must be done before loading sprites as some newgrfs check it */
SetDate(_date);
- // Load the sprites
+ /* Load the sprites */
GfxLoadSprites();
LoadStringWidthTable();
@@ -1234,33 +1240,33 @@
/* Connect front and rear engines of multiheaded trains */
ConnectMultiheadedTrains();
- // reinit the landscape variables (landscape might have changed)
+ /* reinit the landscape variables (landscape might have changed) */
InitializeLandscapeVariables(true);
- // Update all vehicles
+ /* Update all vehicles */
AfterLoadVehicles();
- // Update all waypoints
+ /* Update all waypoints */
if (CheckSavegameVersion(12)) FixOldWaypoints();
UpdateAllWaypointSigns();
- // in version 2.2 of the savegame, we have new airports
+ /* in version 2.2 of the savegame, we have new airports */
if (CheckSavegameVersionOldStyle(2, 2)) UpdateOldAircraft();
UpdateAllStationVirtCoord();
- // Setup town coords
+ /* Setup town coords */
AfterLoadTown();
UpdateAllSignVirtCoords();
- // make sure there is a town in the game
+ /* make sure there is a town in the game */
if (_game_mode == GM_NORMAL && !ClosestTownFromTile(0, (uint)-1)) {
_error_message = STR_NO_TOWN_IN_SCENARIO;
return false;
}
- // Initialize windows
+ /* Initialize windows */
ResetWindowSystem();
SetupColorsAndInitialWindow();
@@ -1274,17 +1280,17 @@
vp->virtual_width = vp->width << vp->zoom;
vp->virtual_height = vp->height << vp->zoom;
- // in version 4.1 of the savegame, is_active was introduced to determine
- // if a player does exist, rather then checking name_1
+ /* in version 4.1 of the savegame, is_active was introduced to determine
+ * if a player does exist, rather then checking name_1 */
if (CheckSavegameVersionOldStyle(4, 1)) CheckIsPlayerActive();
- // the void tiles on the southern border used to belong to a wrong class (pre 4.3).
+ /* the void tiles on the southern border used to belong to a wrong class (pre 4.3). */
if (CheckSavegameVersionOldStyle(4, 3)) UpdateVoidTiles();
- // If Load Scenario / New (Scenario) Game is used,
- // a player does not exist yet. So create one here.
- // 1 exeption: network-games. Those can have 0 players
- // But this exeption is not true for network_servers!
+ /* If Load Scenario / New (Scenario) Game is used,
+ * a player does not exist yet. So create one here.
+ * 1 exeption: network-games. Those can have 0 players
+ * But this exeption is not true for network_servers! */
if (!_players[0].is_active && (!_networking || (_networking && _network_server)))
DoStartupNewPlayer(false);
@@ -1580,15 +1586,15 @@
wp->grfid = statspec->grfid;
wp->localidx = statspec->localidx;
} else {
- // No custom graphics set, so set to default.
+ /* No custom graphics set, so set to default. */
wp->stat_id = 0;
wp->grfid = 0;
wp->localidx = 0;
}
- // Move ground type bits from m2 to m4.
+ /* Move ground type bits from m2 to m4. */
_m[wp->xy].m4 = GB(_m[wp->xy].m2, 0, 4);
- // Store waypoint index in the tile.
+ /* Store waypoint index in the tile. */
_m[wp->xy].m2 = wp->index;
}
}
@@ -1605,15 +1611,15 @@
switch (GetTileType(t)) {
case MP_RAILWAY:
if (HasSignals(t)) {
- // convert PBS signals to combo-signals
+ /* convert PBS signals to combo-signals */
if (HASBIT(_m[t].m2, 2)) SetSignalType(t, SIGTYPE_COMBO);
- // move the signal variant back
+ /* move the signal variant back */
SetSignalVariant(t, HASBIT(_m[t].m2, 3) ? SIG_SEMAPHORE : SIG_ELECTRIC);
CLRBIT(_m[t].m2, 3);
}
- // Clear PBS reservation on track
+ /* Clear PBS reservation on track */
if (!IsTileDepotType(t, TRANSPORT_RAIL)) {
SB(_m[t].m4, 4, 4, 0);
} else {
@@ -1621,13 +1627,11 @@
}
break;
- case MP_STREET:
- // Clear PBS reservation on crossing
+ case MP_STREET: /* Clear PBS reservation on crossing */
if (IsLevelCrossing(t)) CLRBIT(_m[t].m5, 0);
break;
- case MP_STATION:
- // Clear PBS reservation on station
+ case MP_STATION: /* Clear PBS reservation on station */
CLRBIT(_m[t].m3, 6);
break;
@@ -1754,6 +1758,47 @@
/* do the same as when elrails were enabled/disabled manually just now */
SettingsDisableElrail(_patches.disable_elrails);
+ /* From version 53, the map array was changed for house tiles to allow
+ * space for newhouses grf features. A new byte, m7, was also added. */
+ if (CheckSavegameVersion(53)) {
+ for (TileIndex t = 0; t < map_size; t++) {
+ _me[t].m7 = 0;
+
+ if (IsTileType(t, MP_HOUSE)) {
+ if (GB(_m[t].m3, 6, 2) != TOWN_HOUSE_COMPLETED) {
+ /* Move the construction stage from m3[7..6] to m5[5..4].
+ * The construction counter does not have to move. */
+ SB(_m[t].m5, 3, 2, GB(_m[t].m3, 6, 2));
+ SB(_m[t].m3, 6, 2, 0);
+
+ /* The "house is completed" bit is now in m6[2]. */
+ SetHouseCompleted(t, false);
+ } else {
+ /* The "lift has destination" bit has been moved from
+ * m5[7] to m7[0]. */
+ SB(_me[t].m7, 0, 1, HASBIT(_m[t].m5, 7));
+ CLRBIT(_m[t].m5, 7);
+
+ /* The "lift is moving" bit has been removed, as it does
+ * the same job as the "lift has destination" bit. */
+ CLRBIT(_m[t].m1, 7);
+
+ /* The position of the lift goes from m1[7..0] to m6[7..2],
+ * making m1 totally free, now. The lift position does not
+ * have to be a full byte since the maximum value is 36. */
+ SetLiftPosition(t, GB(_m[t].m1, 0, 6 ));
+
+ _m[t].m1 = 0;
+ _m[t].m3 = 0;
+ SetHouseCompleted(t, true);
+ }
+ }
+ }
+ }
+
+ /* Count the buildings after updating the map array. */
+ AfterLoadCountBuildings();
+
if (CheckSavegameVersion(43)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_INDUSTRY)) {
@@ -1792,6 +1837,25 @@
FOR_ALL_VEHICLES(v) {
v->cargo_source_xy = IsValidStationID(v->cargo_source) ? GetStation(v->cargo_source)->xy : v->tile;
}
+
+ /* Store position of the station where the goods come from, so there
+ * are no very high payments when stations get removed. However, if the
+ * station where the goods came from is already removed, the source
+ * information is lost. In that case we set it to the position of this
+ * station */
+ Station *st;
+ FOR_ALL_STATIONS(st) {
+ for (CargoID c = 0; c < NUM_CARGO; c++) {
+ GoodsEntry *ge = &st->goods[c];
+
+ /* In old versions, enroute_from used 0xFF as INVALID_STATION */
+ if (CheckSavegameVersion(7) && ge->enroute_from == 0xFF) {
+ ge->enroute_from = INVALID_STATION;
+ }
+
+ ge->enroute_from_xy = IsValidStationID(ge->enroute_from) ? GetStation(ge->enroute_from)->xy : st->xy;
+ }
+ }
}
if (CheckSavegameVersion(45)) {
@@ -1865,6 +1929,8 @@
/* update station and waypoint graphics */
AfterLoadWaypoints();
AfterLoadStations();
+ /* check that house ids are still valid */
+ CheckHouseIDs();
/* redraw the whole screen */
MarkWholeScreenDirty();
}
--- a/src/openttd.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/openttd.h Mon Mar 26 22:15:38 2007 +0000
@@ -183,10 +183,10 @@
/* Landscape types */
enum {
- LT_NORMAL = 0,
- LT_HILLY = 1,
- LT_DESERT = 2,
- LT_CANDY = 3,
+ LT_TEMPERATE = 0,
+ LT_ARCTIC = 1,
+ LT_TROPIC = 2,
+ LT_TOYLAND = 3,
NUM_LANDSCAPE = 4,
};
--- a/src/order_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/order_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file order_cmd.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "order.h"
@@ -15,6 +17,7 @@
#include "news.h"
#include "saveload.h"
#include "vehicle_gui.h"
+#include "cargotype.h"
/**
* Called if a new block is added to the order-pool
@@ -218,7 +221,7 @@
break;
case VEH_ROAD:
- if (v->cargo_type == CT_PASSENGERS) {
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) {
if (!(st->facilities & FACIL_BUS_STOP)) return CMD_ERROR;
} else {
if (!(st->facilities & FACIL_TRUCK_STOP)) return CMD_ERROR;
@@ -454,6 +457,25 @@
return 0;
}
+/**
+ * Remove the VehicleList that shows all the vehicles with the same shared
+ * orders.
+ */
+static void RemoveSharedOrderVehicleList(Vehicle *v)
+{
+ assert(v->orders != NULL);
+ WindowClass window_class = WC_NONE;
+
+ switch (v->type) {
+ default: NOT_REACHED();
+ case VEH_TRAIN: window_class = WC_TRAINS_LIST; break;
+ case VEH_ROAD: window_class = WC_ROADVEH_LIST; break;
+ case VEH_SHIP: window_class = WC_SHIPS_LIST; break;
+ case VEH_AIRCRAFT: window_class = WC_AIRCRAFT_LIST; break;
+ }
+ DeleteWindowById(window_class, (v->orders->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner);
+}
+
/** Delete an order from the orderlist of a vehicle.
* @param tile unused
* @param p1 the ID of the vehicle
@@ -488,6 +510,10 @@
order = GetVehicleOrder(v, sel_ord + 1);
SwapOrders(v->orders, order);
} else {
+ /* XXX -- The system currently can't handle a shared-order vehicle list
+ * open when there aren't any orders in the list, so close the window
+ * in this case. Of course it needs a better fix later */
+ RemoveSharedOrderVehicleList(v);
/* Last item, so clean the list */
v->orders = NULL;
}
@@ -685,7 +711,7 @@
/* Trucks can't share orders with busses (and visa versa) */
if (src->type == VEH_ROAD) {
- if (src->cargo_type != dst->cargo_type && (src->cargo_type == CT_PASSENGERS || dst->cargo_type == CT_PASSENGERS))
+ if (src->cargo_type != dst->cargo_type && (IsCargoInClass(src->cargo_type, CC_PASSENGERS) || IsCargoInClass(dst->cargo_type, CC_PASSENGERS)))
return CMD_ERROR;
}
@@ -738,7 +764,7 @@
FOR_VEHICLE_ORDERS(src, order) {
if (order->type == OT_GOTO_STATION) {
const Station *st = GetStation(order->dest);
- if (dst->cargo_type == CT_PASSENGERS) {
+ if (IsCargoInClass(dst->cargo_type, CC_PASSENGERS)) {
if (st->bus_stops != NULL) required_dst = st->bus_stops->xy;
} else {
if (st->truck_stops != NULL) required_dst = st->truck_stops->xy;
@@ -953,7 +979,7 @@
case VEH_AIRCRAFT: return st->airport_tile;
case VEH_SHIP: return st->dock_tile;
case VEH_ROAD:
- if (v->cargo_type == CT_PASSENGERS) {
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) {
return (st->bus_stops != NULL) ? st->bus_stops->xy : 0;
} else {
return (st->truck_stops != NULL) ? st->truck_stops->xy : 0;
@@ -1115,7 +1141,7 @@
/* If we have a shared order-list, don't delete the list, but just
remove our pointer */
if (IsOrderListShared(v)) {
- const Vehicle *u = v;
+ Vehicle *u = v;
v->orders = NULL;
v->num_orders = 0;
@@ -1132,6 +1158,10 @@
v->prev_shared = NULL;
v->next_shared = NULL;
+ /* If we are the only one left in the Shared Order Vehicle List,
+ * remove it, as we are no longer a Shared Order Vehicle */
+ if (u->prev_shared == NULL && u->next_shared == NULL && u->orders != NULL) RemoveSharedOrderVehicleList(u);
+
/* We only need to update this-one, because if there is a third
* vehicle which shares the same order-list, nothing will change. If
* this is the last vehicle, the last line of the order-window
@@ -1143,22 +1173,12 @@
/* Remove the orders */
Order *cur = v->orders;
+ /* Delete the vehicle list of shared orders, if any */
+ if (cur != NULL) RemoveSharedOrderVehicleList(v);
v->orders = NULL;
v->num_orders = 0;
if (cur != NULL) {
- /* Delete the vehicle list of shared orders, if any */
- WindowClass window_class = WC_NONE;
-
- switch (v->type) {
- default: NOT_REACHED();
- case VEH_TRAIN: window_class = WC_TRAINS_LIST; break;
- case VEH_ROAD: window_class = WC_ROADVEH_LIST; break;
- case VEH_SHIP: window_class = WC_SHIPS_LIST; break;
- case VEH_AIRCRAFT: window_class = WC_AIRCRAFT_LIST; break;
- }
- DeleteWindowById(window_class, (cur->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner);
-
cur->FreeChain(); // Free the orders.
}
}
--- a/src/order_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/order_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file order_gui.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "road_map.h"
@@ -297,7 +299,7 @@
(facil=FACIL_DOCK, v->type == VEH_SHIP) ||
(facil=FACIL_TRAIN, v->type == VEH_TRAIN) ||
(facil=FACIL_AIRPORT, v->type == VEH_AIRCRAFT) ||
- (facil=FACIL_BUS_STOP, v->type == VEH_ROAD && v->cargo_type == CT_PASSENGERS) ||
+ (facil=FACIL_BUS_STOP, v->type == VEH_ROAD && IsCargoInClass(v->cargo_type, CC_PASSENGERS)) ||
(facil=FACIL_TRUCK_STOP, 1);
if (st->facilities & facil) {
order.type = OT_GOTO_STATION;
--- a/src/os2.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/os2.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file os2.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "variables.h"
@@ -9,7 +11,7 @@
#include "gui.h"
#include "functions.h"
#include "macros.h"
-#include "fios.h"
+#include "fileio.h"
#include <dirent.h>
#include <unistd.h>
@@ -122,18 +124,6 @@
return ent->d_name[0] == '.';
}
-
-static void ChangeWorkingDirectory(char *exe)
-{
- char *s = strrchr(exe, PATHSEPCHAR);
-
- if (s != NULL) {
- *s = '\0';
- chdir(exe);
- *s = PATHSEPCHAR;
- }
-}
-
void ShowInfo(const unsigned char *str)
{
HAB hab;
@@ -170,97 +160,11 @@
int CDECL main(int argc, char* argv[])
{
- // change the working directory to enable doubleclicking in UIs
- ChangeWorkingDirectory(argv[0]);
-
_random_seeds[1][1] = _random_seeds[1][0] = _random_seeds[0][1] = _random_seeds[0][0] = time(NULL);
return ttd_main(argc, argv);
}
-void DeterminePaths()
-{
- char *s;
-
- _paths.game_data_dir = (char *)malloc(MAX_PATH);
- ttd_strlcpy(_paths.game_data_dir, GAME_DATA_DIR, MAX_PATH);
-#if defined SECOND_DATA_DIR
- _paths.second_data_dir = malloc(MAX_PATH);
- ttd_strlcpy(_paths.second_data_dir, SECOND_DATA_DIR, MAX_PATH);
-#endif
-
-#if defined(USE_HOMEDIR)
- {
- const char *homedir = getenv("HOME");
-
- if (homedir == NULL) {
- const struct passwd *pw = getpwuid(getuid());
- if (pw != NULL) homedir = pw->pw_dir;
- }
-
- _paths.personal_dir = str_fmt("%s" PATHSEP "%s", homedir, PERSONAL_DIR);
- }
-
-#else /* not defined(USE_HOMEDIR) */
-
- _paths.personal_dir = (char *)malloc(MAX_PATH);
- ttd_strlcpy(_paths.personal_dir, PERSONAL_DIR, MAX_PATH);
-
- // check if absolute or relative path
- s = strchr(_paths.personal_dir, PATHSEPCHAR);
-
- // add absolute path
- if (s == NULL || _paths.personal_dir != s) {
- getcwd(_paths.personal_dir, MAX_PATH);
- s = strchr(_paths.personal_dir, 0);
- *s++ = PATHSEPCHAR;
- ttd_strlcpy(s, PERSONAL_DIR, MAX_PATH);
- }
-
-#endif /* defined(USE_HOMEDIR) */
-
- s = strchr(_paths.personal_dir, 0);
-
- // append a / ?
- if (s[-1] != PATHSEPCHAR) strcpy(s, PATHSEP);
-
- _paths.save_dir = str_fmt("%ssave", _paths.personal_dir);
- _paths.autosave_dir = str_fmt("%s" PATHSEP "autosave", _paths.save_dir);
- _paths.scenario_dir = str_fmt("%sscenario", _paths.personal_dir);
- _paths.heightmap_dir = str_fmt("%sscenario" PATHSEP "heightmap", _paths.personal_dir);
- _paths.gm_dir = str_fmt("%sgm" PATHSEP, _paths.game_data_dir);
- _paths.data_dir = str_fmt("%sdata" PATHSEP, _paths.game_data_dir);
-
- if (_config_file == NULL)
- _config_file = str_fmt("%sopenttd.cfg", _paths.personal_dir);
-
- _highscore_file = str_fmt("%shs.dat", _paths.personal_dir);
- _log_file = str_fmt("%sopenttd.log", _paths.personal_dir);
-
-#if defined CUSTOM_LANG_DIR
- // sets the search path for lng files to the custom one
- _paths.lang_dir = malloc( MAX_PATH );
- ttd_strlcpy( _paths.lang_dir, CUSTOM_LANG_DIR, MAX_PATH);
-#else
- _paths.lang_dir = str_fmt("%slang" PATHSEP, _paths.game_data_dir);
-#endif
-
- // create necessary folders
-#ifndef __INNOTEK_LIBC__
- mkdir(_paths.personal_dir);
- mkdir(_paths.save_dir);
- mkdir(_paths.autosave_dir);
- mkdir(_paths.scenario_dir);
- mkdir(_paths.heightmap_dir);
-#else
- mkdir(_paths.personal_dir, 0755);
- mkdir(_paths.save_dir, 0755);
- mkdir(_paths.autosave_dir, 0755);
- mkdir(_paths.scenario_dir, 0755);
- mkdir(_paths.heightmap_dir, 0755);
-#endif
-}
-
/**
* Insert a chunk of text from the clipboard onto the textbuffer. Get TEXT clipboard
* and append this up to the maximum length (either absolute or screenlength). If maxlength
--- a/src/os_timer.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/os_timer.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file os_timer.cpp */
+
#include "stdafx.h"
#undef RDTSC_AVAILABLE
--- a/src/pathfind.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/pathfind.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file pathfind.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "bridge_map.h"
@@ -15,7 +17,7 @@
#include "variables.h"
#include "depot.h"
-// remember which tiles we have already visited so we don't visit them again.
+/* remember which tiles we have already visited so we don't visit them again. */
static bool TPFSetTileBit(TrackPathFinder *tpf, TileIndex tile, int dir)
{
uint hash, val, offs;
@@ -65,7 +67,7 @@
tpf->hash_tile[hash] = PATHFIND_GET_LINK_OFFS(tpf, link);
link->flags = tpf->hash_head[hash];
- tpf->hash_head[hash] = 0xFFFF; /* multi link */
+ tpf->hash_head[hash] = 0xFFFF; // multi link
link->next = 0xFFFF;
}
@@ -142,9 +144,9 @@
assert(tpf->tracktype == TRANSPORT_WATER);
- // This addition will sometimes overflow by a single tile.
- // The use of TILE_MASK here makes sure that we still point at a valid
- // tile, and then this tile will be in the sentinel row/col, so GetTileTrackStatus will fail.
+ /* This addition will sometimes overflow by a single tile.
+ * The use of TILE_MASK here makes sure that we still point at a valid
+ * tile, and then this tile will be in the sentinel row/col, so GetTileTrackStatus will fail. */
tile = TILE_MASK(tile + TileOffsByDiagDir(direction));
if (++tpf->rd.cur_length > 50)
@@ -160,8 +162,8 @@
if ( (bits & (bits - 1)) == 0 ) {
/* only one direction */
i = 0;
- while (!(bits&1))
- i++, bits>>=1;
+ while (!(bits & 1))
+ i++, bits >>= 1;
rd = tpf->rd;
goto continue_here;
@@ -172,7 +174,7 @@
if (!(bits & 1)) continue;
rd = tpf->rd;
- // Change direction 4 times only
+ /* Change direction 4 times only */
if ((byte)i != tpf->rd.pft_var6) {
if (++tpf->rd.depth > 4) {
tpf->rd = rd;
@@ -189,7 +191,7 @@
}
tpf->rd = rd;
- } while (++i, bits>>=1);
+ } while (++i, bits >>= 1);
}
@@ -284,7 +286,7 @@
/* Check in case of rail if the owner is the same */
if (tpf->tracktype == TRANSPORT_RAIL) {
- // don't enter train depot from the back
+ /* don't enter train depot from the back */
if (IsTileDepotType(tile, TRANSPORT_RAIL) && GetRailDepotDirection(tile) == direction) return;
if (IsTileType(tile_org, MP_RAILWAY) || IsTileType(tile_org, MP_STATION) || IsTileType(tile_org, MP_TUNNELBRIDGE))
@@ -292,12 +294,12 @@
if (GetTileOwner(tile_org) != GetTileOwner(tile)) return;
}
- // check if the new tile can be entered from that direction
+ /* check if the new tile can be entered from that direction */
if (tpf->tracktype == TRANSPORT_ROAD) {
- // road stops and depots now have a track (r4419)
- // don't enter road stop from the back
+ /* road stops and depots now have a track (r4419)
+ * don't enter road stop from the back */
if (IsStandardRoadStopTile(tile) && ReverseDiagDir(GetRoadStopDir(tile)) != direction) return;
- // don't enter road depot from the back
+ /* don't enter road depot from the back */
if (IsTileDepotType(tile, TRANSPORT_ROAD) && ReverseDiagDir(GetRoadDepotDirection(tile)) != direction) return;
}
@@ -323,7 +325,7 @@
if ((byte)bits != tpf->var2) {
bits &= _tpfmode1_and[direction];
- bits = bits | (bits>>8);
+ bits = bits | (bits >> 8);
}
bits &= 0xBF;
@@ -333,7 +335,7 @@
i = FIND_FIRST_BIT(bits);
bits = KILL_FIRST_BIT(bits);
- tpf->the_dir = (Trackdir)((_otherdir_mask[direction] & (byte)(1 << i)) ? (i+8) : i);
+ tpf->the_dir = (Trackdir)((_otherdir_mask[direction] & (byte)(1 << i)) ? (i + 8) : i);
rd = tpf->rd;
if (TPFSetTileBit(tpf, tile, tpf->the_dir) &&
@@ -375,7 +377,7 @@
i = FIND_FIRST_BIT(bits);
bits = KILL_FIRST_BIT(bits);
- tpf->the_dir = (Trackdir)((_otherdir_mask[direction] & (byte)(1 << i)) ? (i+8) : i);
+ tpf->the_dir = (Trackdir)((_otherdir_mask[direction] & (byte)(1 << i)) ? (i + 8) : i);
rd = tpf->rd;
if (TPFSetTileBit(tpf, tile, tpf->the_dir) &&
!tpf->enum_proc(tile, tpf->userdata, tpf->the_dir, tpf->rd.cur_length, &tpf->rd.pft_var6) ) {
@@ -401,10 +403,10 @@
tpf.rd.depth = 0;
tpf.rd.pft_var6 = 0;
- tpf.var2 = HASBIT(flags, 15) ? 0x43 : 0xFF; /* 0x8000 */
+ tpf.var2 = HASBIT(flags, 15) ? 0x43 : 0xFF; // 0x8000
- tpf.disable_tile_hash = HASBIT(flags, 12); /* 0x1000 */
- tpf.hasbit_13 = HASBIT(flags, 13); /* 0x2000 */
+ tpf.disable_tile_hash = HASBIT(flags, 12); // 0x1000
+ tpf.hasbit_13 = HASBIT(flags, 13); // 0x2000
tpf.tracktype = (TransportType)(flags & 0xFF);
@@ -425,8 +427,8 @@
struct StackedItem {
TileIndex tile;
- uint16 cur_length; // This is the current length to this tile.
- uint16 priority; // This is the current length + estimated length to the goal.
+ uint16 cur_length; ///< This is the current length to this tile.
+ uint16 priority; ///< This is the current length + estimated length to the goal.
TrackdirByte track;
byte depth;
byte state;
@@ -461,12 +463,12 @@
uint num_links_left;
uint nstack;
- StackedItem stack[256]; // priority queue of stacked items
+ StackedItem stack[256]; ///< priority queue of stacked items
- uint16 hash_head[0x400]; // hash heads. 0 means unused. 0xFFFC = length, 0x3 = dir
- TileIndex hash_tile[0x400]; // tiles. or links.
+ uint16 hash_head[0x400]; ///< hash heads. 0 means unused. 0xFFFC = length, 0x3 = dir
+ TileIndex hash_tile[0x400]; ///< tiles. or links.
- HashLink links[0x400]; // hash links
+ HashLink links[0x400]; ///< hash links
};
#define NTP_GET_LINK_OFFS(tpf, link) ((byte*)(link) - (byte*)tpf->links)
@@ -474,22 +476,22 @@
#define ARR(i) tpf->stack[(i)-1]
-// called after a new element was added in the queue at the last index.
-// move it down to the proper position
+/** called after a new element was added in the queue at the last index.
+ * move it down to the proper position */
static inline void HeapifyUp(NewTrackPathFinder *tpf)
{
StackedItem si;
int i = ++tpf->nstack;
while (i != 1 && ARR(i).priority < ARR(i>>1).priority) {
- // the child element is larger than the parent item.
- // swap the child item and the parent item.
- si = ARR(i); ARR(i) = ARR(i>>1); ARR(i>>1) = si;
- i>>=1;
+ /* the child element is larger than the parent item.
+ * swap the child item and the parent item. */
+ si = ARR(i); ARR(i) = ARR(i >> 1); ARR(i >> 1) = si;
+ i >>= 1;
}
}
-// called after the element 0 was eaten. fill it with a new element
+/** called after the element 0 was eaten. fill it with a new element */
static inline void HeapifyDown(NewTrackPathFinder *tpf)
{
StackedItem si;
@@ -501,27 +503,27 @@
if (n == 0) return; // heap is empty so nothing to do?
- // copy the last item to index 0. we use it as base for heapify.
- ARR(1) = ARR(n+1);
+ /* copy the last item to index 0. we use it as base for heapify. */
+ ARR(1) = ARR(n + 1);
- while ((j=i*2) <= n) {
- // figure out which is smaller of the children.
- if (j != n && ARR(j).priority > ARR(j+1).priority)
+ while ((j = i * 2) <= n) {
+ /* figure out which is smaller of the children. */
+ if (j != n && ARR(j).priority > ARR(j + 1).priority)
j++; // right item is smaller
assert(i <= n && j <= n);
if (ARR(i).priority <= ARR(j).priority)
break; // base elem smaller than smallest, done!
- // swap parent with the child
+ /* swap parent with the child */
si = ARR(i); ARR(i) = ARR(j); ARR(j) = si;
i = j;
}
}
-// mark a tile as visited and store the length of the path.
-// if we already had a better path to this tile, return false.
-// otherwise return true.
+/** mark a tile as visited and store the length of the path.
+ * if we already had a better path to this tile, return false.
+ * otherwise return true. */
static bool NtpVisit(NewTrackPathFinder* tpf, TileIndex tile, DiagDirection dir, uint length)
{
uint hash,head;
@@ -531,7 +533,7 @@
hash = PATHFIND_HASH_TILE(tile);
- // never visited before?
+ /* never visited before? */
if ((head=tpf->hash_head[hash]) == 0) {
tpf->hash_tile[hash] = tile;
tpf->hash_head[hash] = dir | (length << 2);
@@ -541,15 +543,15 @@
if (head != 0xffff) {
if (tile == tpf->hash_tile[hash] && (head & 0x3) == (uint)dir) {
- // longer length
+ /* longer length */
if (length >= (head >> 2)) return false;
tpf->hash_head[hash] = dir | (length << 2);
return true;
}
- // two tiles with the same hash, need to make a link
- // allocate a link. if out of links, handle this by returning
- // that a tile was already visisted.
+ /* two tiles with the same hash, need to make a link
+ * allocate a link. if out of links, handle this by returning
+ * that a tile was already visisted. */
if (tpf->num_links_left == 0) {
DEBUG(ntp, 1, "No links left");
return false;
@@ -564,12 +566,12 @@
tpf->hash_tile[hash] = NTP_GET_LINK_OFFS(tpf, link);
link->typelength = tpf->hash_head[hash];
- tpf->hash_head[hash] = 0xFFFF; /* multi link */
+ tpf->hash_head[hash] = 0xFFFF; // multi link
link->next = 0xFFFF;
} else {
- // a linked list of many tiles,
- // find the one corresponding to the tile, if it exists.
- // otherwise make a new link
+ /* a linked list of many tiles,
+ * find the one corresponding to the tile, if it exists.
+ * otherwise make a new link */
uint offs = tpf->hash_tile[hash];
do {
@@ -623,7 +625,7 @@
return length == (head >> 2);
}
- // else it's a linked list of many tiles
+ /* else it's a linked list of many tiles */
offs = tpf->hash_tile[hash];
for (;;) {
link = NTP_GET_LINK_PTR(tpf, offs);
@@ -638,21 +640,21 @@
static const uint16 _is_upwards_slope[15] = {
- 0, // no tileh
- (1 << TRACKDIR_X_SW) | (1 << TRACKDIR_Y_NW), // 1
- (1 << TRACKDIR_X_SW) | (1 << TRACKDIR_Y_SE), // 2
- (1 << TRACKDIR_X_SW), // 3
- (1 << TRACKDIR_X_NE) | (1 << TRACKDIR_Y_SE), // 4
- 0, // 5
- (1 << TRACKDIR_Y_SE), // 6
- 0, // 7
- (1 << TRACKDIR_X_NE) | (1 << TRACKDIR_Y_NW), // 8,
- (1 << TRACKDIR_Y_NW), // 9
- 0, //10
- 0, //11,
- (1 << TRACKDIR_X_NE), //12
- 0, //13
- 0, //14
+ 0, ///< no tileh
+ (1 << TRACKDIR_X_SW) | (1 << TRACKDIR_Y_NW), ///< 1
+ (1 << TRACKDIR_X_SW) | (1 << TRACKDIR_Y_SE), ///< 2
+ (1 << TRACKDIR_X_SW), ///< 3
+ (1 << TRACKDIR_X_NE) | (1 << TRACKDIR_Y_SE), ///< 4
+ 0, ///< 5
+ (1 << TRACKDIR_Y_SE), ///< 6
+ 0, ///< 7
+ (1 << TRACKDIR_X_NE) | (1 << TRACKDIR_Y_NW), ///< 8,
+ (1 << TRACKDIR_Y_NW), ///< 9
+ 0, ///< 10
+ 0, ///< 11,
+ (1 << TRACKDIR_X_NE), ///< 12
+ 0, ///< 13
+ 0, ///< 14
};
static uint DistanceMoo(TileIndex t0, TileIndex t1)
@@ -660,27 +662,27 @@
const uint dx = delta(TileX(t0), TileX(t1));
const uint dy = delta(TileY(t0), TileY(t1));
- const uint straightTracks = 2 * min(dx, dy); /* The number of straight (not full length) tracks */
+ const uint straightTracks = 2 * min(dx, dy); // The number of straight (not full length) tracks
/* OPTIMISATION:
* Original: diagTracks = max(dx, dy) - min(dx,dy);
* Proof:
* (dx-dy) - straightTracks == (min + max) - straightTracks = min + // max - 2 * min = max - min */
- const uint diagTracks = dx + dy - straightTracks; /* The number of diagonal (full tile length) tracks. */
+ const uint diagTracks = dx + dy - straightTracks; // The number of diagonal (full tile length) tracks.
return diagTracks*DIAG_FACTOR + straightTracks*STR_FACTOR;
}
-// These has to be small cause the max length of a track
-// is currently limited to 16384
+/* These has to be small cause the max length of a track
+ * is currently limited to 16384 */
static const byte _length_of_track[16] = {
DIAG_FACTOR, DIAG_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, 0, 0,
DIAG_FACTOR, DIAG_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, STR_FACTOR, 0, 0
};
-// new more optimized pathfinder for trains...
-// Tile is the tile the train is at.
-// direction is the tile the train is moving towards.
+/* new more optimized pathfinder for trains...
+ * Tile is the tile the train is at.
+ * direction is the tile the train is moving towards. */
static void NTPEnum(NewTrackPathFinder* tpf, TileIndex tile, DiagDirection direction)
{
@@ -692,8 +694,8 @@
- // Need to have a special case for the start.
- // We shouldn't call the callback for the current tile.
+ /* Need to have a special case for the start.
+ * We shouldn't call the callback for the current tile. */
si.cur_length = 1; // Need to start at 1 cause 0 is a reserved value.
si.depth = 0;
si.state = 0;
@@ -701,7 +703,7 @@
goto start_at;
for (;;) {
- // Get the next item to search from from the priority queue
+ /* Get the next item to search from from the priority queue */
do {
if (tpf->nstack == 0)
return; // nothing left? then we're done!
@@ -709,10 +711,10 @@
tile = si.tile;
HeapifyDown(tpf);
- // Make sure we havn't already visited this tile.
+ /* Make sure we havn't already visited this tile. */
} while (!NtpCheck(tpf, tile, _tpf_prev_direction[si.track], si.cur_length));
- // Add the length of this track.
+ /* Add the length of this track. */
si.cur_length += _length_of_track[si.track];
callback_and_continue:
@@ -723,8 +725,8 @@
direction = _tpf_new_direction[si.track];
start_at:
- // If the tile is the entry tile of a tunnel, and we're not going out of the tunnel,
- // need to find the exit of the tunnel.
+ /* If the tile is the entry tile of a tunnel, and we're not going out of the tunnel,
+ * need to find the exit of the tunnel. */
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
if (IsTunnel(tile)) {
if (GetTunnelDirection(tile) != ReverseDiagDir(direction)) {
@@ -733,7 +735,7 @@
/* We are not just driving out of the tunnel */
if (GetTunnelDirection(tile) != direction ||
GetTunnelTransportType(tile) != tpf->tracktype) {
- // We are not driving into the tunnel, or it is an invalid tunnel
+ /* We are not driving into the tunnel, or it is an invalid tunnel */
continue;
}
if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
@@ -743,15 +745,15 @@
flotr = FindLengthOfTunnel(tile, direction);
si.cur_length += flotr.length * DIAG_FACTOR;
tile = flotr.tile;
- // tile now points to the exit tile of the tunnel
+ /* tile now points to the exit tile of the tunnel */
}
} else {
TileIndex tile_end;
if (GetBridgeRampDirection(tile) != ReverseDiagDir(direction)) {
- // We are not just leaving the bridge
+ /* We are not just leaving the bridge */
if (GetBridgeRampDirection(tile) != direction ||
GetBridgeTransportType(tile) != tpf->tracktype) {
- // Not entering the bridge or not compatible
+ /* Not entering the bridge or not compatible */
continue;
}
}
@@ -761,29 +763,29 @@
}
}
- // This is a special loop used to go through
- // a rail net and find the first intersection
+ /* This is a special loop used to go through
+ * a rail net and find the first intersection */
tile_org = tile;
for (;;) {
assert(direction <= 3);
tile += TileOffsByDiagDir(direction);
- // too long search length? bail out.
+ /* too long search length? bail out. */
if (si.cur_length >= tpf->maxlength) {
DEBUG(ntp, 1, "Cur_length too big");
bits = TRACK_BIT_NONE;
break;
}
- // Not a regular rail tile?
- // Then we can't use the code below, but revert to more general code.
+ /* Not a regular rail tile?
+ * Then we can't use the code below, but revert to more general code. */
if (!IsTileType(tile, MP_RAILWAY) || !IsPlainRailTile(tile)) {
- // We found a tile which is not a normal railway tile.
- // Determine which tracks that exist on this tile.
+ /* We found a tile which is not a normal railway tile.
+ * Determine which tracks that exist on this tile. */
uint32 ts = GetTileTrackStatus(tile, TRANSPORT_RAIL) & _tpfmode1_and[direction];
bits = TrackdirBitsToTrackBits((TrackdirBits)(ts & TRACKDIR_BIT_MASK));
- // Check that the tile contains exactly one track
+ /* Check that the tile contains exactly one track */
if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
@@ -791,12 +793,12 @@
break;
}
- ///////////////////
- // If we reach here, the tile has exactly one track.
- // tile - index to a tile that is not rail tile, but still straight (with optional signals)
- // bits - bitmask of which track that exist on the tile (exactly one bit is set)
- // direction - which direction are we moving in?
- ///////////////////
+ /*******************
+ * If we reach here, the tile has exactly one track.
+ * tile - index to a tile that is not rail tile, but still straight (with optional signals)
+ * bits - bitmask of which track that exist on the tile (exactly one bit is set)
+ * direction - which direction are we moving in?
+ *******************/
si.track = _new_trackdir[FIND_FIRST_BIT(bits)][direction];
si.cur_length += _length_of_track[si.track];
goto callback_and_continue;
@@ -825,89 +827,89 @@
si.cur_length += _length_of_track[track];
- // Check if this rail is an upwards slope. If it is, then add a penalty.
- // Small optimization here.. if (track&7)>1 then it can't be a slope so we avoid calling GetTileSlope
+ /* Check if this rail is an upwards slope. If it is, then add a penalty.
+ * Small optimization here.. if (track&7)>1 then it can't be a slope so we avoid calling GetTileSlope */
if ((track & 7) <= 1 && (_is_upwards_slope[GetTileSlope(tile, NULL)] & (1 << track)) ) {
// upwards slope. add some penalty.
- si.cur_length += 4*DIAG_FACTOR;
+ si.cur_length += 4 * DIAG_FACTOR;
}
- // railway tile with signals..?
+ /* railway tile with signals..? */
if (HasSignals(tile)) {
if (!HasSignalOnTrackdir(tile, track)) {
- // if one way signal not pointing towards us, stop going in this direction => End of rail segment.
+ /* if one way signal not pointing towards us, stop going in this direction => End of rail segment. */
if (HasSignalOnTrackdir(tile, ReverseTrackdir(track))) {
bits = TRACK_BIT_NONE;
break;
}
} else if (GetSignalStateByTrackdir(tile, track) == SIGNAL_STATE_GREEN) {
- // green signal in our direction. either one way or two way.
+ /* green signal in our direction. either one way or two way. */
si.state |= 3;
} else {
- // reached a red signal.
+ /* reached a red signal. */
if (HasSignalOnTrackdir(tile, ReverseTrackdir(track))) {
- // two way red signal. unless we passed another green signal on the way,
- // stop going in this direction => End of rail segment.
- // this is to prevent us from going into a full platform.
- if (!(si.state&1)) {
+ /* two way red signal. unless we passed another green signal on the way,
+ * stop going in this direction => End of rail segment.
+ * this is to prevent us from going into a full platform. */
+ if (!(si.state & 1)) {
bits = TRACK_BIT_NONE;
break;
}
}
if (!(si.state & 2)) {
- // Is this the first signal we see? And it's red... add penalty
- si.cur_length += 10*DIAG_FACTOR;
+ /* Is this the first signal we see? And it's red... add penalty */
+ si.cur_length += 10 * DIAG_FACTOR;
si.state += 2; // remember that we added penalty.
- // Because we added a penalty, we can't just continue as usual.
- // Need to get out and let A* do it's job with
- // possibly finding an even shorter path.
+ /* Because we added a penalty, we can't just continue as usual.
+ * Need to get out and let A* do it's job with
+ * possibly finding an even shorter path. */
break;
}
}
if (tpf->enum_proc(tile, tpf->userdata, si.first_track, si.cur_length))
- return; /* Don't process this tile any further */
+ return; // Don't process this tile any further
}
- // continue with the next track
+ /* continue with the next track */
direction = _tpf_new_direction[track];
- // safety check if we're running around chasing our tail... (infinite loop)
+ /* safety check if we're running around chasing our tail... (infinite loop) */
if (tile == tile_org) {
bits = TRACK_BIT_NONE;
break;
}
}
- // There are no tracks to choose between.
- // Stop searching in this direction
+ /* There are no tracks to choose between.
+ * Stop searching in this direction */
if (bits == TRACK_BIT_NONE)
continue;
- ////////////////
- // We got multiple tracks to choose between (intersection).
- // Branch the search space into several branches.
- ////////////////
+ /****************
+ * We got multiple tracks to choose between (intersection).
+ * Branch the search space into several branches.
+ ****************/
- // Check if we've already visited this intersection.
- // If we've already visited it with a better length, then
- // there's no point in visiting it again.
+ /* Check if we've already visited this intersection.
+ * If we've already visited it with a better length, then
+ * there's no point in visiting it again. */
if (!NtpVisit(tpf, tile, direction, si.cur_length))
continue;
- // Push all possible alternatives that we can reach from here
- // onto the priority heap.
- // 'bits' contains the tracks that we can choose between.
+ /* Push all possible alternatives that we can reach from here
+ * onto the priority heap.
+ * 'bits' contains the tracks that we can choose between. */
- // First compute the estimated distance to the target.
- // This is used to implement A*
+ /* First compute the estimated distance to the target.
+ * This is used to implement A* */
estimation = 0;
if (tpf->dest != 0)
estimation = DistanceMoo(tile, tpf->dest);
si.depth++;
if (si.depth == 0)
- continue; /* We overflowed our depth. No more searching in this direction. */
+ continue; // We overflowed our depth. No more searching in this direction.
si.tile = tile;
while (bits != TRACK_BIT_NONE) {
Track track = RemoveFirstTrack(&bits);
@@ -915,7 +917,7 @@
assert(si.track != 0xFF);
si.priority = si.cur_length + estimation;
- // out of stack items, bail out?
+ /* out of stack items, bail out? */
if (tpf->nstack >= lengthof(tpf->stack)) {
DEBUG(ntp, 1, "Out of stack");
break;
@@ -925,9 +927,9 @@
HeapifyUp(tpf);
};
- // If this is the first intersection, we need to fill the first_track member.
- // so the code outside knows which path is better.
- // also randomize the order in which we search through them.
+ /* If this is the first intersection, we need to fill the first_track member.
+ * so the code outside knows which path is better.
+ * also randomize the order in which we search through them. */
if (si.depth == 1) {
assert(tpf->nstack == 1 || tpf->nstack == 2 || tpf->nstack == 3);
if (tpf->nstack != 1) {
@@ -944,12 +946,12 @@
}
}
- // Continue with the next from the queue...
+ /* Continue with the next from the queue... */
}
}
-// new pathfinder for trains. better and faster.
+/** new pathfinder for trains. better and faster. */
void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypeMask railtypes, DiagDirection direction, NTPEnumProc* enum_proc, void* data)
{
NewTrackPathFinder tpf;
--- a/src/pathfind.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/pathfind.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file pathfind.h */
+
#ifndef PATHFIND_H
#define PATHFIND_H
@@ -60,9 +62,9 @@
bool hasbit_13;
uint16 hash_head[0x400];
- TileIndex hash_tile[0x400]; /* stores the link index when multi link. */
+ TileIndex hash_tile[0x400]; ///< stores the link index when multi link.
- TrackPathFinderLink links[0x400]; /* hopefully, this is enough. */
+ TrackPathFinderLink links[0x400]; ///< hopefully, this is enough.
};
void FollowTrack(TileIndex tile, uint16 flags, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data);
--- a/src/player.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/player.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file player.h */
+
#ifndef PLAYER_H
#define PLAYER_H
@@ -13,7 +15,7 @@
int32 income;
int32 expenses;
int32 delivered_cargo;
- int32 performance_history; // player score (scale 0-1000)
+ int32 performance_history; ///< player score (scale 0-1000)
int64 company_value;
};
@@ -32,8 +34,8 @@
struct PlayerAI {
byte state;
- byte tick; // Used to determine how often to move
- uint32 state_counter; // Can hold tile index!
+ byte tick; ///< Used to determine how often to move
+ uint32 state_counter; ///< Can hold tile index!
uint16 timeout_counter;
byte state_mode;
@@ -59,7 +61,7 @@
byte cur_dir_b;
byte start_dir_b;
- Vehicle *cur_veh; /* only used by some states */
+ Vehicle *cur_veh; ///< only used by some states
AiBuildRec src, dst, mid1, mid2;
@@ -71,22 +73,22 @@
};
struct Ai_PathFinderInfo {
- TileIndex start_tile_tl; // tl = top-left
- TileIndex start_tile_br; // br = bottom-right
- TileIndex end_tile_tl; // tl = top-left
- TileIndex end_tile_br; // br = bottom-right
- byte start_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION
- byte end_direction; // 0 to 3 or AI_PATHFINDER_NO_DIRECTION
+ TileIndex start_tile_tl; ///< tl = top-left
+ TileIndex start_tile_br; ///< br = bottom-right
+ TileIndex end_tile_tl; ///< tl = top-left
+ TileIndex end_tile_br; ///< br = bottom-right
+ byte start_direction; ///< 0 to 3 or AI_PATHFINDER_NO_DIRECTION
+ byte end_direction; ///< 0 to 3 or AI_PATHFINDER_NO_DIRECTION
TileIndex route[500];
- byte route_extra[500]; // Some extra information about the route like bridge/tunnel
+ byte route_extra[500]; ///< Some extra information about the route like bridge/tunnel
int route_length;
- int position; // Current position in the build-path, needed to build the path
+ int position; ///< Current position in the build-path, needed to build the path
- bool rail_or_road; // true = rail, false = road
+ bool rail_or_road; ///< true = rail, false = road
};
-// The amount of memory reserved for the AI-special-vehicles
+/* The amount of memory reserved for the AI-special-vehicles */
#define AI_MAX_SPECIAL_VEHICLES 100
struct Ai_SpecialVehicle {
@@ -99,28 +101,28 @@
uint tick;
uint idle;
- int temp; // A value used in more than one function, but it just temporary
- // The use is pretty simple: with this we can 'think' about stuff
- // in more than one tick, and more than one AI. A static will not
- // do, because they are not saved. This way, the AI is almost human ;)
- int counter; // For the same reason as temp, we have counter. It can count how
- // long we are trying something, and just abort if it takes too long
+ int temp; ///< A value used in more than one function, but it just temporary
+ ///< The use is pretty simple: with this we can 'think' about stuff
+ ///< in more than one tick, and more than one AI. A static will not
+ ///< do, because they are not saved. This way, the AI is almost human ;)
+ int counter; ///< For the same reason as temp, we have counter. It can count how
+ ///< long we are trying something, and just abort if it takes too long
- // Pathfinder stuff
+ /* Pathfinder stuff */
Ai_PathFinderInfo path_info;
AyStar *pathfinder;
- // Route stuff
+ /* Route stuff */
CargoID cargo;
- byte tbt; // train/bus/truck 0/1/2 AI_TRAIN/AI_BUS/AI_TRUCK
+ byte tbt; ///< train/bus/truck 0/1/2 AI_TRAIN/AI_BUS/AI_TRUCK
int new_cost;
byte action;
- int last_id; // here is stored the last id of the searched city/industry
+ int last_id; ///< here is stored the last id of the searched city/industry
Date last_vehiclecheck_date; // Used in CheckVehicle
- Ai_SpecialVehicle special_vehicles[AI_MAX_SPECIAL_VEHICLES]; // Some vehicles have some special flags
+ Ai_SpecialVehicle special_vehicles[AI_MAX_SPECIAL_VEHICLES]; ///< Some vehicles have some special flags
TileIndex from_tile;
TileIndex to_tile;
@@ -128,19 +130,19 @@
byte from_direction;
byte to_direction;
- bool from_deliver; // True if this is the station that GIVES cargo
+ bool from_deliver; ///< True if this is the station that GIVES cargo
bool to_deliver;
TileIndex depot_tile;
DiagDirectionByte depot_direction;
- byte amount_veh; // How many vehicles we are going to build in this route
- byte cur_veh; // How many vehicles did we bought?
- VehicleID veh_id; // Used when bought a vehicle
- VehicleID veh_main_id; // The ID of the first vehicle, for shared copy
+ byte amount_veh; ///< How many vehicles we are going to build in this route
+ byte cur_veh; ///< How many vehicles did we bought?
+ VehicleID veh_id; ///< Used when bought a vehicle
+ VehicleID veh_main_id; ///< The ID of the first vehicle, for shared copy
- int from_ic; // ic = industry/city. This is the ID of them
- byte from_type; // AI_NO_TYPE/AI_CITY/AI_INDUSTRY
+ int from_ic; ///< ic = industry/city. This is the ID of them
+ byte from_type; ///< AI_NO_TYPE/AI_CITY/AI_INDUSTRY
int to_ic;
byte to_type;
@@ -160,7 +162,7 @@
int32 player_money;
int32 current_loan;
- int64 money64; // internal 64-bit version of the money. the 32-bit field will be clamped to plus minus 2 billion
+ int64 money64; ///< internal 64-bit version of the money. the 32-bit field will be clamped to plus minus 2 billion
byte player_color;
Livery livery[LS_END];
@@ -169,7 +171,7 @@
byte block_preview;
PlayerByte index;
- uint16 cargo_types; /* which cargo types were transported the last year */
+ uint16 cargo_types; ///< which cargo types were transported the last year
TileIndex location_of_house;
TileIndex last_build_coordinate;
@@ -180,7 +182,7 @@
byte num_valid_stat_ent;
byte quarters_of_bankrupcy;
- byte bankrupt_asked; // which players were asked about buying it?
+ byte bankrupt_asked; ///< which players were asked about buying it?
int16 bankrupt_timeout;
int32 bankrupt_value;
@@ -192,12 +194,12 @@
int64 yearly_expenses[3][13];
PlayerEconomyEntry cur_economy;
PlayerEconomyEntry old_economy[24];
- EngineRenewList engine_renew_list; // Defined later
+ EngineRenewList engine_renew_list; ///< Defined later
bool engine_renew;
bool renew_keep_length;
int16 engine_renew_months;
uint32 engine_renew_money;
- uint16 num_engines[TOTAL_NUM_ENGINES]; // caches the number of engines of each type the player owns (no need to save this)
+ uint16 num_engines[TOTAL_NUM_ENGINES]; ///< caches the number of engines of each type the player owns (no need to save this)
};
uint16 GetDrawStringPlayerColor(PlayerID player);
@@ -214,7 +216,7 @@
VARDEF PlayerID _current_player;
VARDEF Player _players[MAX_PLAYERS];
-// NOSAVE: can be determined from player structs
+/* NOSAVE: can be determined from player structs */
VARDEF byte _player_colors[MAX_PLAYERS];
static inline byte ActivePlayerCount()
@@ -284,8 +286,8 @@
struct HighScore {
char company[100];
- StringID title; // NO_SAVE, has troubles with changing string-numbers.
- uint16 score; // do NOT change type, will break hs.dat
+ StringID title; ///< NO_SAVE, has troubles with changing string-numbers.
+ uint16 score; ///< do NOT change type, will break hs.dat
};
VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
--- a/src/player_face.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/player_face.h Mon Mar 26 22:15:38 2007 +0000
@@ -64,7 +64,7 @@
/* 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_LIPS */ { 13, 4, { 12, 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 } },
--- a/src/player_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/player_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file player_gui.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "table/sprites.h"
@@ -76,7 +78,7 @@
y = 171;
- // draw max loan aligned to loan below (y += 10)
+ /* draw max loan aligned to loan below (y += 10) */
SetDParam64(0, (uint64)_economy.max_loan);
DrawString(202, y+10, STR_MAX_LOAN, 0);
} else {
@@ -404,12 +406,12 @@
}
case 9:
- case 10: // First colour dropdown
+ case 10: /* First colour dropdown */
ShowColourDropDownMenu(w, 10);
break;
case 11:
- case 12: // Second colour dropdown
+ case 12: /* Second colour dropdown */
ShowColourDropDownMenu(w, 12);
break;
@@ -761,7 +763,7 @@
DrawPlayerVehiclesAmount((PlayerID)w->window_number);
DrawString(110,48, STR_7006_COLOR_SCHEME, 0);
- // Draw company-colour bus
+ /* Draw company-colour bus */
DrawSprite(SPR_VEH_BUS_SW_VIEW, PLAYER_SPRITE_COLOR(p->index), 215, 49);
DrawPlayerFace(p->face, p->player_color, 2, 16);
@@ -882,7 +884,7 @@
case WE_ON_EDIT_TEXT: {
char *b = e->we.edittext.str;
- // empty string is allowed for password
+ /* empty string is allowed for password */
if (*b == '\0' && WP(w,def_d).byte_1 != 2) return;
_cmd_text = b;
@@ -987,7 +989,7 @@
static void SetupHighScoreEndWindow(BaseWindow *w, uint *x, uint *y)
{
uint i;
- // resize window to "full-screen"
+ /* resize window to "full-screen" */
w->SetSize(Point(_screen.width, _screen.height));
w->widget[0].right = _screen.width - 1;
w->widget[0].bottom = _screen.height - 1;
@@ -1003,7 +1005,7 @@
extern StringID EndGameGetPerformanceTitleFromValue(uint value);
-/* End game window shown at the end of the game */
+/** End game window shown at the end of the game */
static void EndGameWndProc(BaseWindow *w, WindowEvent *e)
{
switch (e->event) {
@@ -1105,14 +1107,14 @@
EndGameWndProc
};
-/* Show the highscore table for a given difficulty. When called from
+/** Show the highscore table for a given difficulty. When called from
* endgame ranking is set to the top5 element that was newly added
* and is thus highlighted */
void ShowHighscoreTable(int difficulty, int8 ranking)
{
BaseWindow *w;
- // pause game to show the chart
+ /* pause game to show the chart */
if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
/* Close all always on-top windows to get a clean screen */
@@ -1129,7 +1131,7 @@
}
}
-/* Show the endgame victory screen in 2050. Update the new highscore
+/** Show the endgame victory screen in 2050. Update the new highscore
* if it was high enough */
void ShowEndGameChart()
{
@@ -1161,7 +1163,7 @@
w->window_number = lengthof(_highscore_table) - 1;
WP(w, highscore_d).rank = SaveHighScoreValueNetwork();
} else {
- // in single player _local player is always valid
+ /* in single player _local player is always valid */
const Player *p = GetPlayer(_local_player);
w->window_number = _opt.diff_level;
WP(w, highscore_d).rank = SaveHighScoreValue(p);
--- a/src/players.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/players.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -107,6 +107,7 @@
SetPlayerFaceBits(pf, PFV_MOUSTACHE, ge, max(lips, 1U) - 1);
} else {
if (!HASBIT(ge, GENDER_FEMALE)) {
+ lips = lips * 15 / 16;
lips -= 3;
if (HASBIT(ge, ETHNICITY_BLACK) && lips > 8) lips = 0;
} else {
@@ -218,7 +219,7 @@
if (cost != 0) SubtractMoneyFromAnyPlayer(p, cost);
}
-// the player_money field is kept as it is, but money64 contains the actual amount of money.
+/** the player_money field is kept as it is, but money64 contains the actual amount of money. */
void UpdatePlayerMoney32(Player *p)
{
if (p->money64 < -2000000000) {
@@ -271,7 +272,7 @@
if (owner == _current_player) return true;
_error_message = STR_013B_OWNED_BY;
- // no need to get the name of the owner unless we're the local player (saves some time)
+ /* no need to get the name of the owner unless we're the local player (saves some time) */
if (IsLocalPlayer()) GetNameOfOwner(owner, tile);
return false;
}
@@ -297,7 +298,7 @@
strp = t->townnameparts;
verify_name:;
- // No player must have this name already
+ /* No player must have this name already */
FOR_ALL_PLAYERS(pp) {
if (pp->name_1 == str && pp->name_2 == strp) goto bad_town_name;
}
@@ -344,17 +345,17 @@
uint32 r;
Player *p;
- // Initialize array
+ /* Initialize array */
for (i = 0; i != 16; i++) colors[i] = i;
- // And randomize it
+ /* And randomize it */
n = 100;
do {
r = Random();
COLOR_SWAP(GB(r, 0, 4), GB(r, 4, 4));
} while (--n);
- // Bubble sort it according to the values in table 1
+ /* Bubble sort it according to the values in table 1 */
i = 16;
do {
for (j = 0; j != 15; j++) {
@@ -364,7 +365,7 @@
}
} while (--i);
- // Move the colors that look similar to each player's color to the side
+ /* Move the colors that look similar to each player's color to the side */
FOR_ALL_PLAYERS(p) if (p->is_active) {
pcolor = p->player_color;
for (i=0; i!=16; i++) if (colors[i] == pcolor) {
@@ -391,7 +392,7 @@
}
}
- // Return the first available color
+ /* Return the first available color */
for (i = 0;; i++) {
if (colors[i] != 0xFF) return colors[i];
}
@@ -428,7 +429,7 @@
static Player *AllocatePlayer()
{
Player *p;
- // Find a free slot
+ /* Find a free slot */
FOR_ALL_PLAYERS(p) {
if (!p->is_active) {
PlayerID i = p->index;
@@ -456,7 +457,7 @@
p = AllocatePlayer();
if (p == NULL) return NULL;
- // Make a color
+ /* Make a color */
p->player_color = GeneratePlayerColor();
ResetPlayerLivery(p);
_player_colors[p->index] = p->player_color;
@@ -466,7 +467,7 @@
p->money64 = p->player_money = p->current_loan = 100000;
p->is_ai = is_ai;
- p->ai.state = 5; /* AIS_WANT_NEW_ROUTE */
+ p->ai.state = 5; // AIS_WANT_NEW_ROUTE
p->share_owners[0] = p->share_owners[1] = p->share_owners[2] = p->share_owners[3] = PLAYER_SPECTATOR;
p->avail_railtypes = GetPlayerRailtypes(p->index);
@@ -496,7 +497,7 @@
void StartupPlayers()
{
- // The AI starts like in the setting with +2 month max
+ /* The AI starts like in the setting with +2 month max */
_next_competitor_start = _opt.diff.competitor_start_time * 90 * DAY_TICKS + RandomRange(60 * DAY_TICKS) + 1;
}
@@ -505,13 +506,13 @@
uint n;
Player *p;
- // count number of competitors
+ /* count number of competitors */
n = 0;
FOR_ALL_PLAYERS(p) {
if (p->is_active && p->is_ai) n++;
}
- // when there's a lot of computers in game, the probability that a new one starts is lower
+ /* when there's a lot of computers in game, the probability that a new one starts is lower */
if (n < (uint)_opt.diff.max_no_competitors &&
n < (_network_server ?
InteractiveRandomRange(_opt.diff.max_no_competitors + 2) :
@@ -522,7 +523,7 @@
DoCommandP(0, 1, 0, NULL, CMD_PLAYER_CTRL);
}
- // The next AI starts like the difficulty setting said, with +2 month max
+ /* The next AI starts like the difficulty setting said, with +2 month max */
_next_competitor_start = _opt.diff.competitor_start_time * 90 * DAY_TICKS + 1;
_next_competitor_start += _network_server ? InteractiveRandomRange(60 * DAY_TICKS) : RandomRange(60 * DAY_TICKS);
}
@@ -548,7 +549,7 @@
MaybeStartNewPlayer();
}
-// index is the next parameter in _decode_parameters to set up
+/** index is the next parameter in _decode_parameters to set up */
StringID GetPlayerNameString(PlayerID player, uint index)
{
if (IsHumanPlayer(player) && IsValidPlayer(player)) {
@@ -564,7 +565,7 @@
{
Player *p;
- // Copy statistics
+ /* Copy statistics */
FOR_ALL_PLAYERS(p) {
if (p->is_active) {
memmove(&p->yearly_expenses[1], &p->yearly_expenses[0], sizeof(p->yearly_expenses) - sizeof(p->yearly_expenses[0]));
@@ -699,16 +700,16 @@
if (!IsEngineIndex(new_engine_type))
return CMD_ERROR;
- // check that the new vehicle type is the same as the original one
+ /* check that the new vehicle type is the same as the original one */
if (GetEngine(old_engine_type)->type != GetEngine(new_engine_type)->type)
return CMD_ERROR;
- // make sure that we do not replace a plane with a helicopter or vise versa
+ /* make sure that we do not replace a plane with a helicopter or vise versa */
if (GetEngine(new_engine_type)->type == VEH_AIRCRAFT &&
(AircraftVehInfo(old_engine_type)->subtype & AIR_CTOL) != (AircraftVehInfo(new_engine_type)->subtype & AIR_CTOL))
return CMD_ERROR;
- // make sure that the player can actually buy the new engine
+ /* make sure that the player can actually buy the new engine */
if (!HASBIT(GetEngine(new_engine_type)->player_avail, _current_player))
return CMD_ERROR;
@@ -945,7 +946,7 @@
return _endgame_perf_titles[value];
}
-/* Return true if any cheat has been used, false otherwise */
+/** Return true if any cheat has been used, false otherwise */
static bool CheatHasBeenUsed()
{
const Cheat* cht = (Cheat*)&_cheats;
@@ -958,7 +959,7 @@
return false;
}
-/* Save the highscore for the player */
+/** Save the highscore for the player */
int8 SaveHighScoreValue(const Player *p)
{
HighScore *hs = _highscore_table[_opt.diff_level];
@@ -971,7 +972,7 @@
for (i = 0; i < lengthof(_highscore_table[0]); i++) {
/* You are in the TOP5. Move all values one down and save us there */
if (hs[i].score <= score) {
- // move all elements one down starting from the replaced one
+ /* move all elements one down starting from the replaced one */
memmove(&hs[i + 1], &hs[i], sizeof(HighScore) * (lengthof(_highscore_table[0]) - i - 1));
SetDParam(0, p->president_name_1);
SetDParam(1, p->president_name_2);
@@ -987,7 +988,7 @@
return -1; // too bad; we did not make it into the top5
}
-/* Sort all players given their performance */
+/** Sort all players given their performance */
static int CDECL HighScoreSorter(const void *a, const void *b)
{
const Player *pa = *(const Player* const*)a;
@@ -1026,7 +1027,7 @@
hs->score = pl[i]->old_economy[0].performance_history;
hs->title = EndGameGetPerformanceTitleFromValue(hs->score);
- // get the ranking of the local player
+ /* get the ranking of the local player */
if (pl[i]->index == _local_player) player = i;
}
}
@@ -1035,7 +1036,7 @@
return player;
}
-/* Save HighScore table to file */
+/** Save HighScore table to file */
void SaveToHighScore()
{
FILE *fp = fopen(_highscore_file, "wb");
@@ -1052,14 +1053,14 @@
fwrite(&length, sizeof(length), 1, fp); // write away string length
fwrite(hs->company, length, 1, fp);
fwrite(&hs->score, sizeof(hs->score), 1, fp);
- fwrite("", 2, 1, fp); /* XXX - placeholder for hs->title, not saved anymore; compatibility */
+ fwrite("", 2, 1, fp); // XXX - placeholder for hs->title, not saved anymore; compatibility
}
}
fclose(fp);
}
}
-/* Initialize the highscore table to 0 and if any file exists, load in values */
+/** Initialize the highscore table to 0 and if any file exists, load in values */
void LoadFromHighScore()
{
FILE *fp = fopen(_highscore_file, "rb");
@@ -1077,7 +1078,7 @@
fread(hs->company, 1, length, fp);
fread(&hs->score, sizeof(hs->score), 1, fp);
- fseek(fp, 2, SEEK_CUR); /* XXX - placeholder for hs->title, not saved anymore; compatibility */
+ fseek(fp, 2, SEEK_CUR); // XXX - placeholder for hs->title, not saved anymore; compatibility
hs->title = EndGameGetPerformanceTitleFromValue(hs->score);
}
}
@@ -1088,7 +1089,7 @@
_patches.ending_year = 2051;
}
-// Save/load of players
+/* Save/load of players */
static const SaveLoad _player_desc[] = {
SLE_VAR(Player, name_2, SLE_UINT32),
SLE_VAR(Player, name_1, SLE_STRINGID),
@@ -1098,7 +1099,7 @@
SLE_VAR(Player, face, SLE_UINT32),
- // money was changed to a 64 bit field in savegame version 1.
+ /* money was changed to a 64 bit field in savegame version 1. */
SLE_CONDVAR(Player, money64, SLE_VAR_I64 | SLE_FILE_I32, 0, 0),
SLE_CONDVAR(Player, money64, SLE_INT64, 1, SL_MAX_VERSION),
@@ -1126,14 +1127,14 @@
SLE_VAR(Player, bankrupt_timeout, SLE_INT16),
SLE_VAR(Player, bankrupt_value, SLE_INT32),
- // yearly expenses was changed to 64-bit in savegame version 2.
+ /* yearly expenses was changed to 64-bit in savegame version 2. */
SLE_CONDARR(Player, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 1),
SLE_CONDARR(Player, yearly_expenses, SLE_INT64, 3 * 13, 2, SL_MAX_VERSION),
SLE_CONDVAR(Player, is_ai, SLE_BOOL, 2, SL_MAX_VERSION),
SLE_CONDVAR(Player, is_active, SLE_BOOL, 4, SL_MAX_VERSION),
- // Engine renewal settings
+ /* Engine renewal settings */
SLE_CONDNULL(512, 16, 18),
SLE_CONDREF(Player, engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION),
SLE_CONDVAR(Player, engine_renew, SLE_BOOL, 16, SL_MAX_VERSION),
@@ -1141,14 +1142,14 @@
SLE_CONDVAR(Player, engine_renew_money, SLE_UINT32, 16, SL_MAX_VERSION),
SLE_CONDVAR(Player, renew_keep_length, SLE_BOOL, 2, SL_MAX_VERSION), // added with 16.1, but was blank since 2
- // reserve extra space in savegame here. (currently 63 bytes)
+ /* reserve extra space in savegame here. (currently 63 bytes) */
SLE_CONDNULL(63, 2, SL_MAX_VERSION),
SLE_END()
};
static const SaveLoad _player_economy_desc[] = {
- // these were changed to 64-bit in savegame format 2
+ /* these were changed to 64-bit in savegame format 2 */
SLE_CONDVAR(PlayerEconomyEntry, income, SLE_INT32, 0, 1),
SLE_CONDVAR(PlayerEconomyEntry, expenses, SLE_INT32, 0, 1),
SLE_CONDVAR(PlayerEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1),
@@ -1235,7 +1236,7 @@
SlObject(p, _player_desc);
- // Write AI?
+ /* Write AI? */
if (!IsHumanPlayer(p->index)) {
SlObject(&p->ai, _player_ai_desc);
for (i = 0; i != p->ai.num_build_rec; i++) {
@@ -1243,15 +1244,15 @@
}
}
- // Write economy
+ /* Write economy */
SlObject(&p->cur_economy, _player_economy_desc);
- // Write old economy entries.
+ /* Write old economy entries. */
for (i = 0; i < p->num_valid_stat_ent; i++) {
SlObject(&p->old_economy[i], _player_economy_desc);
}
- // Write each livery entry.
+ /* Write each livery entry. */
for (i = 0; i < LS_END; i++) {
SlObject(&p->livery[i], _player_livery_desc);
}
--- a/src/queue.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/queue.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file queue.cpp */
+
#include "stdafx.h"
#include "openttd.h"
#include "queue.h"
@@ -91,10 +93,10 @@
#define BINARY_HEAP_BLOCKSIZE (1 << BINARY_HEAP_BLOCKSIZE_BITS)
#define BINARY_HEAP_BLOCKSIZE_MASK (BINARY_HEAP_BLOCKSIZE - 1)
-// To make our life easy, we make the next define
-// Because Binary Heaps works with array from 1 to n,
-// and C with array from 0 to n-1, and we don't like typing
-// q->data.binaryheap.elements[i - 1] every time, we use this define.
+/* To make our life easy, we make the next define
+ * Because Binary Heaps works with array from 1 to n,
+ * and C with array from 0 to n-1, and we don't like typing
+ * q->data.binaryheap.elements[i - 1] every time, we use this define. */
#define BIN_HEAP_ARR(i) q->data.binaryheap.elements[((i) - 1) >> BINARY_HEAP_BLOCKSIZE_BITS][((i) - 1) & BINARY_HEAP_BLOCKSIZE_MASK]
static void BinaryHeap_Clear(Queue* q, bool free_values)
@@ -114,7 +116,7 @@
/* For every element in the block */
if ((q->data.binaryheap.size >> BINARY_HEAP_BLOCKSIZE_BITS) == i &&
(q->data.binaryheap.size & BINARY_HEAP_BLOCKSIZE_MASK) == j) {
- break; /* We're past the last element */
+ break; // We're past the last element
}
free(q->data.binaryheap.elements[i][j].item);
}
@@ -160,13 +162,13 @@
#endif
}
- // Add the item at the end of the array
+ /* Add the item at the end of the array */
BIN_HEAP_ARR(q->data.binaryheap.size + 1).priority = priority;
BIN_HEAP_ARR(q->data.binaryheap.size + 1).item = item;
q->data.binaryheap.size++;
- // Now we are going to check where it belongs. As long as the parent is
- // bigger, we switch with the parent
+ /* Now we are going to check where it belongs. As long as the parent is
+ * bigger, we switch with the parent */
{
BinaryHeapNode temp;
int i;
@@ -174,16 +176,16 @@
i = q->data.binaryheap.size;
while (i > 1) {
- // Get the parent of this object (divide by 2)
+ /* Get the parent of this object (divide by 2) */
j = i / 2;
- // Is the parent bigger then the current, switch them
+ /* Is the parent bigger then the current, switch them */
if (BIN_HEAP_ARR(i).priority <= BIN_HEAP_ARR(j).priority) {
temp = BIN_HEAP_ARR(j);
BIN_HEAP_ARR(j) = BIN_HEAP_ARR(i);
BIN_HEAP_ARR(i) = temp;
i = j;
} else {
- // It is not, we're done!
+ /* It is not, we're done! */
break;
}
}
@@ -200,20 +202,20 @@
printf("[BinaryHeap] Deleting an element. There are %d elements left\n", q->data.binaryheap.size);
#endif
- // First, we try to find the item..
+ /* First, we try to find the item.. */
do {
if (BIN_HEAP_ARR(i + 1).item == item) break;
i++;
} while (i < q->data.binaryheap.size);
- // We did not find the item, so we return false
+ /* We did not find the item, so we return false */
if (i == q->data.binaryheap.size) return false;
- // Now we put the last item over the current item while decreasing the size of the elements
+ /* Now we put the last item over the current item while decreasing the size of the elements */
q->data.binaryheap.size--;
BIN_HEAP_ARR(i + 1) = BIN_HEAP_ARR(q->data.binaryheap.size + 1);
- // Now the only thing we have to do, is resort it..
- // On place i there is the item to be sorted.. let's start there
+ /* Now the only thing we have to do, is resort it..
+ * On place i there is the item to be sorted.. let's start there */
{
uint j;
BinaryHeapNode temp;
@@ -224,25 +226,25 @@
for (;;) {
j = i;
- // Check if we have 2 childs
+ /* Check if we have 2 childs */
if (2 * j + 1 <= q->data.binaryheap.size) {
- // Is this child smaller than the parent?
+ /* Is this child smaller than the parent? */
if (BIN_HEAP_ARR(j).priority >= BIN_HEAP_ARR(2 * j).priority) i = 2 * j;
- // Yes, we _need_ to use i here, not j, because we want to have the smallest child
- // This way we get that straight away!
+ /* Yes, we _need_ to use i here, not j, because we want to have the smallest child
+ * This way we get that straight away! */
if (BIN_HEAP_ARR(i).priority >= BIN_HEAP_ARR(2 * j + 1).priority) i = 2 * j + 1;
- // Do we have one child?
+ /* Do we have one child? */
} else if (2 * j <= q->data.binaryheap.size) {
if (BIN_HEAP_ARR(j).priority >= BIN_HEAP_ARR(2 * j).priority) i = 2 * j;
}
- // One of our childs is smaller than we are, switch
+ /* One of our childs is smaller than we are, switch */
if (i != j) {
temp = BIN_HEAP_ARR(j);
BIN_HEAP_ARR(j) = BIN_HEAP_ARR(i);
BIN_HEAP_ARR(i) = temp;
} else {
- // None of our childs is smaller, so we stay here.. stop :)
+ /* None of our childs is smaller, so we stay here.. stop :) */
break;
}
}
@@ -261,9 +263,9 @@
if (q->data.binaryheap.size == 0) return NULL;
- // The best item is always on top, so give that as result
+ /* The best item is always on top, so give that as result */
result = BIN_HEAP_ARR(1).item;
- // And now we should get rid of this item...
+ /* And now we should get rid of this item... */
BinaryHeap_Delete(q, BIN_HEAP_ARR(1).item, BIN_HEAP_ARR(1).priority);
return result;
@@ -279,8 +281,8 @@
q->free = BinaryHeap_Free;
q->data.binaryheap.max_size = max_size;
q->data.binaryheap.size = 0;
- // We malloc memory in block of BINARY_HEAP_BLOCKSIZE
- // It autosizes when it runs out of memory
+ /* We malloc memory in block of BINARY_HEAP_BLOCKSIZE
+ * It autosizes when it runs out of memory */
q->data.binaryheap.elements = CallocT<BinaryHeapNode*>((max_size - 1) / BINARY_HEAP_BLOCKSIZE + 1);
q->data.binaryheap.elements[0] = MallocT<BinaryHeapNode>(BINARY_HEAP_BLOCKSIZE);
q->data.binaryheap.blocks = 1;
@@ -428,7 +430,7 @@
h->size = 0;
}
-/* Finds the node that that saves this key pair. If it is not
+/** Finds the node that that saves this key pair. If it is not
* found, returns NULL. If it is found, *prev is set to the
* node before the one found, or if the node found was the first in the bucket
* to NULL. If it is not found, *prev is set to the last HashNode in the
@@ -482,7 +484,7 @@
void* Hash_Delete(Hash* h, uint key1, uint key2)
{
void* result;
- HashNode* prev; /* Used as output var for below function call */
+ HashNode* prev; // Used as output var for below function call
HashNode* node = Hash_FindNode(h, key1, key2, &prev);
if (node == NULL) {
--- a/src/queue.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/queue.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file queue.h */
+
#ifndef QUEUE_H
#define QUEUE_H
@@ -64,14 +66,14 @@
struct {
uint max_size;
uint size;
- uint blocks; /* The amount of blocks for which space is reserved in elements */
+ uint blocks; ///< The amount of blocks for which space is reserved in elements
BinaryHeapNode** elements;
} binaryheap;
} data;
};
-/*
+/**
* Insertion Sorter
*/
@@ -89,7 +91,7 @@
/* The amount of elements that will be malloc'd at a time */
#define BINARY_HEAP_BLOCKSIZE_BITS 10
-/* Initializes a binary heap and allocates internal memory for maximum of
+/** Initializes a binary heap and allocates internal memory for maximum of
* max_size elements */
void init_BinaryHeap(Queue* q, uint max_size);
@@ -124,33 +126,33 @@
/* Call these function to manipulate a hash */
-/* Deletes the value with the specified key pair from the hash and returns
+/** Deletes the value with the specified key pair from the hash and returns
* that value. Returns NULL when the value was not present. The value returned
* is _not_ free()'d! */
void* Hash_Delete(Hash* h, uint key1, uint key2);
-/* Sets the value associated with the given key pair to the given value.
+/** Sets the value associated with the given key pair to the given value.
* Returns the old value if the value was replaced, NULL when it was not yet present. */
void* Hash_Set(Hash* h, uint key1, uint key2, void* value);
-/* Gets the value associated with the given key pair, or NULL when it is not
+/** Gets the value associated with the given key pair, or NULL when it is not
* present. */
void* Hash_Get(const Hash* h, uint key1, uint key2);
/* Call these function to create/destroy a hash */
-/* Builds a new hash in an existing struct. Make sure that hash() always
+/** Builds a new hash in an existing struct. Make sure that hash() always
* returns a hash less than num_buckets! Call delete_hash after use */
void init_Hash(Hash* h, Hash_HashProc* hash, uint num_buckets);
-/*
+/**
* Deletes the hash and cleans up. Only cleans up memory allocated by new_Hash
* & friends. If free is true, it will call free() on all the values that
* are left in the hash.
*/
void delete_Hash(Hash* h, bool free_values);
-/*
+/**
* Cleans the hash, but keeps the memory allocated
*/
void clear_Hash(Hash* h, bool free_values);
-/*
+/**
* Gets the current size of the Hash
*/
uint Hash_Size(const Hash* h);
--- a/src/rail_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/rail_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -12,6 +12,7 @@
#include "table/sprites.h"
#include "table/strings.h"
#include "map.h"
+#include "landscape.h"
#include "tile.h"
#include "town_map.h"
#include "tunnel_map.h"
@@ -848,14 +849,23 @@
typedef int32 DoConvertRailProc(TileIndex tile, RailType totype, bool exec);
+/**
+ * Switches the rail type.
+ * Railtypes are stored on a per-tile basis, not on a per-track basis, so
+ * all the tracks in the given tile will be converted.
+ * @param tile The tile on which the railtype is to be convert.
+ * @param totype The railtype we want to convert to
+ * @param exec Switches between test and execute mode
+ * @return The cost and state of the operation
+ * @retval CMD_ERROR An error occured during the operation.
+ */
static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec)
{
if (!CheckTileOwnership(tile)) return CMD_ERROR;
- if (!EnsureNoVehicle(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;
+ if (GetRailType(tile) == totype) return CMD_ERROR;
- // tile is already of requested type?
- if (GetRailType(tile) == totype) return CMD_ERROR;
+ if (!EnsureNoVehicle(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;
// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
@@ -1293,7 +1303,7 @@
// adjust ground tile for desert
// don't adjust for snow, because snow in depots looks weird
- if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_DESERT) {
+ if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_TROPIC) {
if (image != SPR_FLAT_GRASS_TILE) {
image += rti->snow_offset; // tile with tracks
} else {
@@ -1737,14 +1747,14 @@
RailGroundType new_ground;
switch (_opt.landscape) {
- case LT_HILLY:
- if (GetTileZ(tile) > _opt.snow_line) {
+ case LT_ARCTIC:
+ if (GetTileZ(tile) > GetSnowLine()) {
new_ground = RAIL_GROUND_ICE_DESERT;
goto set_ground;
}
break;
- case LT_DESERT:
+ case LT_TROPIC:
if (GetTropicZone(tile) == TROPICZONE_DESERT) {
new_ground = RAIL_GROUND_ICE_DESERT;
goto set_ground;
--- a/src/road_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/road_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -12,6 +12,7 @@
#include "table/strings.h"
#include "functions.h"
#include "map.h"
+#include "landscape.h"
#include "tile.h"
#include "town_map.h"
#include "vehicle.h"
@@ -366,6 +367,14 @@
return cost;
}
+/**
+ * Switches the rail type on a level crossing.
+ * @param tile The tile on which the railtype is to be convert.
+ * @param totype The railtype we want to convert to
+ * @param exec Switches between test and execute mode
+ * @return The cost and state of the operation
+ * @retval CMD_ERROR An error occured during the operation.
+ */
int32 DoConvertStreetRail(TileIndex tile, RailType totype, bool exec)
{
// not a railroad crossing?
@@ -385,7 +394,7 @@
YapfNotifyTrackLayoutChange(tile, FindFirstTrack(GetCrossingRailBits(tile)));
}
- return _price.build_rail >> 1;
+ return _price.build_rail / 2;
}
@@ -863,14 +872,14 @@
static void TileLoop_Road(TileIndex tile)
{
switch (_opt.landscape) {
- case LT_HILLY:
- if (IsOnSnow(tile) != (GetTileZ(tile) > _opt.snow_line)) {
+ case LT_ARCTIC:
+ if (IsOnSnow(tile) != (GetTileZ(tile) > GetSnowLine())) {
ToggleSnow(tile);
MarkTileDirtyByTile(tile);
}
break;
- case LT_DESERT:
+ case LT_TROPIC:
if (GetTropicZone(tile) == TROPICZONE_DESERT && !IsOnDesert(tile)) {
ToggleDesert(tile);
MarkTileDirtyByTile(tile);
@@ -908,7 +917,7 @@
{
/* Adjust road ground type depending on 'grp' (grp is the distance to the center) */
- const Roadside* new_rs = (_opt.landscape == LT_CANDY) ? _town_road_types_2[grp] : _town_road_types[grp];
+ const Roadside* new_rs = (_opt.landscape == LT_TOYLAND) ? _town_road_types_2[grp] : _town_road_types[grp];
Roadside cur_rs = GetRoadside(tile);
/* We have our desired type, do nothing */
--- a/src/roadveh_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/roadveh_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -30,6 +30,7 @@
#include "newgrf_sound.h"
#include "yapf/yapf.h"
#include "date.h"
+#include "cargotype.h"
static const uint16 _roadveh_images[63] = {
0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14,
@@ -595,7 +596,7 @@
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
pass = 1;
- if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count;
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
v->cargo_count = 0;
SetDParam(0, pass);
@@ -638,7 +639,7 @@
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, v);
}
@@ -705,7 +706,7 @@
}
rs = GetStation(order->dest)->GetPrimaryRoadStop(
- v->cargo_type == CT_PASSENGERS ? RoadStop::BUS : RoadStop::TRUCK
+ IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK
);
if (rs != NULL) {
@@ -843,7 +844,7 @@
static void RoadVehArrivesAt(const Vehicle* v, Station* st)
{
- if (v->cargo_type == CT_PASSENGERS) {
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) {
/* Check if station was ever visited before */
if (!(st->had_vehicle_of_type & HVOT_BUS)) {
uint32 flags;
@@ -1091,7 +1092,7 @@
trackdirs = TRACKDIR_BIT_NONE;
} else {
/* Our station */
- RoadStop::Type rstype = (v->cargo_type == CT_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
+ RoadStop::Type rstype = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
if (GetRoadStopType(tile) != rstype) {
/* Wrong station type */
@@ -1546,7 +1547,7 @@
_road_veh_data_1[v->u.road.state - RVSB_IN_ROAD_STOP + (_opt.road_side << RVS_DRIVE_SIDE)] == v->u.road.frame) ||
(IS_BYTE_INSIDE(v->u.road.state, RVSB_IN_DT_ROAD_STOP, RVSB_IN_DT_ROAD_STOP_END) &&
v->current_order.dest == GetStationIndex(v->tile) &&
- GetRoadStopType(v->tile) == ((v->cargo_type == CT_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
+ GetRoadStopType(v->tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
v->u.road.frame == RVC_DRIVE_THROUGH_STOP_FRAME)) {
RoadStop *rs = GetRoadStopByTile(v->tile, GetRoadStopType(v->tile));
@@ -1562,7 +1563,7 @@
if (IsDriveThroughStopTile(v->tile)) {
TileIndex next_tile = TILE_ADD(v->tile, TileOffsByDir(v->direction));
- RoadStop::Type type = (v->cargo_type == CT_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
+ RoadStop::Type type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
assert(HASBIT(v->u.road.state, RVS_IS_STOPPING));
@@ -1754,7 +1755,7 @@
/* update destination */
if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot == NULL && !(v->vehstatus & VS_CRASHED)) {
Station* st = GetStation(v->current_order.dest);
- RoadStop* rs = st->GetPrimaryRoadStop(v->cargo_type == CT_PASSENGERS ? RoadStop::BUS : RoadStop::TRUCK);
+ RoadStop* rs = st->GetPrimaryRoadStop(IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK);
RoadStop* best = NULL;
if (rs != NULL) {
@@ -1857,7 +1858,7 @@
if (v->type != VEH_ROAD || !CheckOwnership(v->owner)) return CMD_ERROR;
if (!IsRoadVehInDepotStopped(v)) return_cmd_error(STR_9013_MUST_BE_STOPPED_INSIDE);
- if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
+ if (new_cid >= NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_ROADVEH_RUN);
--- a/src/saveload.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/saveload.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -28,7 +28,7 @@
#include "variables.h"
#include <setjmp.h>
-extern const uint16 SAVEGAME_VERSION = 52;
+extern const uint16 SAVEGAME_VERSION = 53;
uint16 _sl_version; ///< the major savegame version identifier
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
--- a/src/settings.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/settings.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -585,8 +585,11 @@
}
case SDT_ONEOFMANY: {
long r = lookup_oneofmany(desc->many, str, -1);
- if (r != -1) return (void*)r;
- ShowInfoF("ini: invalid value '%s' for '%s'", str, desc->name);
+ /* if the first attempt of conversion from string to the appropriate value fails,
+ * look if we have defined a converter from old value to new value. */
+ if (r == -1 && desc->proc_cnvt != NULL) r = desc->proc_cnvt(str);
+ if (r != -1) return (void*)r; //and here goes converted value
+ ShowInfoF("ini: invalid value '%s' for '%s'", str, desc->name); //sorry, we failed
return 0;
}
case SDT_MANYOFMANY: {
@@ -945,15 +948,22 @@
* If nothing fits you, you can use the GENERAL macros, but it exposes the
* internal structure somewhat so it needs a little looking. There are _NULL()
* macros as well, these fill up space so you can add more patches there (in
- * place) and you DON'T have to increase the savegame version. */
+ * place) and you DON'T have to increase the savegame version.
+ *
+ * While reading values from openttd.cfg, some values may not be converted
+ * properly, for any kind of reasons. In order to allow a process of self-cleaning
+ * mechanism, a callback procedure is made available. You will have to supply the function, which
+ * will work on a string, one function per patch. And of course, enable the callback param
+ * on the appropriate macro.
+ */
-#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, proc)\
- {name, (const void*)(def), {cmd}, {guiflags}, min, max, interval, many, str, proc}
+#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, proc, load)\
+ {name, (const void*)(def), {cmd}, {guiflags}, min, max, interval, many, str, proc, load}
/* Macros for various objects to go in the configuration file.
* This section is for global variables */
#define SDTG_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, proc, from, to)\
- {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc), SLEG_GENERAL(sle_cmd, var, type | flags, length, from, to)}
+ {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc, NULL), SLEG_GENERAL(sle_cmd, var, type | flags, length, from, to)}
#define SDTG_CONDVAR(name, type, flags, guiflags, var, def, min, max, interval, str, proc, from, to)\
SDTG_GENERAL(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, proc, from, to)
@@ -986,58 +996,58 @@
SDTG_CONDMMANY(name, type, flags, guiflags, var, def, full, str, proc, 0, SL_MAX_VERSION)
#define SDTG_CONDNULL(length, from, to)\
- {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL}, SLEG_CONDNULL(length, from, to)}
+ {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLEG_CONDNULL(length, from, to)}
-#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL}, SLEG_END()}
+#define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLEG_END()}
/* Macros for various objects to go in the configuration file.
* This section is for structures where their various members are saved */
-#define SDT_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, proc, from, to)\
- {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc), SLE_GENERAL(sle_cmd, base, var, type | flags, length, from, to)}
+#define SDT_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, proc, load, from, to)\
+ {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc, load), SLE_GENERAL(sle_cmd, base, var, type | flags, length, from, to)}
#define SDT_CONDVAR(base, var, type, from, to, flags, guiflags, def, min, max, interval, str, proc)\
- SDT_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, proc, NULL, from, to)
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, proc)\
SDT_CONDVAR(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, min, max, interval, str, proc)
#define SDT_CONDBOOL(base, var, from, to, flags, guiflags, def, str, proc)\
- SDT_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, base, var, 1, def, 0, 1, 0, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, base, var, 1, def, 0, 1, 0, NULL, str, proc, NULL, from, to)
#define SDT_BOOL(base, var, flags, guiflags, def, str, proc)\
SDT_CONDBOOL(base, var, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
#define SDT_CONDLIST(base, var, type, from, to, flags, guiflags, def, str, proc)\
- SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, NULL, from, to)
#define SDT_LIST(base, var, type, flags, guiflags, def, str, proc)\
SDT_CONDLIST(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
#define SDT_CONDLISTO(base, var, length, type, from, to, flags, guiflags, def, str, proc)\
- SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, length, def, 0, 0, 0, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, length, def, 0, 0, 0, NULL, str, proc, NULL, from, to)
#define SDT_CONDSTR(base, var, type, from, to, flags, guiflags, def, str, proc)\
- SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, NULL, from, to)
#define SDT_STR(base, var, type, flags, guiflags, def, str, proc)\
SDT_CONDSTR(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
#define SDT_CONDSTRO(base, var, length, type, from, to, flags, def, str, proc)\
SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, 0, base, var, length, def, 0, 0, NULL, str, proc, from, to)
#define SDT_CONDCHR(base, var, from, to, flags, guiflags, def, str, proc)\
- SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, proc, NULL, from, to)
#define SDT_CHR(base, var, flags, guiflags, def, str, proc)\
SDT_CONDCHR(base, var, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
-#define SDT_CONDOMANY(base, var, type, from, to, flags, guiflags, def, max, full, str, proc)\
- SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, proc, from, to)
-#define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, proc)\
- SDT_CONDOMANY(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, max, full, str, proc)
+#define SDT_CONDOMANY(base, var, type, from, to, flags, guiflags, def, max, full, str, proc, load)\
+ SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, proc, load, from, to)
+#define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, proc, load)\
+ SDT_CONDOMANY(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, max, full, str, proc, load)
#define SDT_CONDMMANY(base, var, type, from, to, flags, guiflags, def, full, str, proc)\
- SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, proc, from, to)
+ SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, proc, NULL, from, to)
#define SDT_MMANY(base, var, type, flags, guiflags, def, full, str, proc)\
SDT_CONDMMANY(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, full, str, proc)
#define SDT_CONDNULL(length, from, to)\
- {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL}, SLE_CONDNULL(length, from, to)}
+ {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLE_CONDNULL(length, from, to)}
-#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL}, SLE_END()}
+#define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLE_END()}
/* Shortcuts for macros below. Logically if we don't save the value
* we also don't sync it in a network game */
@@ -1149,6 +1159,18 @@
DoCommandP(0, 2, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
return 0;
}
+/** Conversion callback for _gameopt_settings.landscape
+ * It converts (or try) between old values and the new ones,
+ * without loosing initial setting of the user
+ * @param value that was read from config file
+ * @return the "hopefully" converted value
+ */
+static int32 ConvertLandscape(const char *value)
+{
+ /* try with the old values */
+ return lookup_oneofmany("normal|hilly|desert|candy", value, -1);
+}
+
/* End - Callback Functions */
#ifndef EXTERNAL_PLAYER
@@ -1241,17 +1263,17 @@
* XXX - To save file-space and since values are never bigger than about 10? only
* save the first 16 bits in the savegame. Question is why the values are still int32
* and why not byte for example? */
- SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, 0, 3),
- SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 18, 0, 0, 0, 0, NULL, STR_NULL, NULL, 4, SL_MAX_VERSION),
- SDT_VAR(GameOptions, diff_level,SLE_UINT8, 0, 0, 9, 0, 9, 0, STR_NULL, NULL),
- SDT_OMANY(GameOptions, currency, SLE_UINT8, N, 0, 0, CUSTOM_CURRENCY_ID, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SIT|SEK|YTL|SKK|BRR|custom", STR_NULL, NULL),
- SDT_OMANY(GameOptions, units, SLE_UINT8, N, 0, 1, 2, "imperial|metric|si", STR_NULL, NULL),
- SDT_OMANY(GameOptions, town_name, SLE_UINT8, 0, 0, 0, 20, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan", STR_NULL, NULL),
- SDT_OMANY(GameOptions, landscape, SLE_UINT8, 0, 0, 0, 3, "normal|hilly|desert|candy", STR_NULL, NULL),
- SDT_VAR(GameOptions, snow_line, SLE_UINT8, 0, 0, 1, 0, 56, 0, STR_NULL, NULL),
- SDT_CONDOMANY(GameOptions,autosave, SLE_UINT8, 0, 22, N, 0, 0, 0, "", STR_NULL, NULL),
- SDT_CONDOMANY(GameOptions,autosave, SLE_UINT8,23, SL_MAX_VERSION, S, 0, 1, 4, "off|monthly|quarterly|half year|yearly", STR_NULL, NULL),
- SDT_OMANY(GameOptions, road_side, SLE_UINT8, 0, 0, 1, 1, "left|right", STR_NULL, NULL),
+ SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 0, 3),
+ SDT_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, (SLE_FILE_I16 | SLE_VAR_I32), 0, 0, GameOptions, diff, 18, 0, 0, 0, 0, NULL, STR_NULL, NULL, NULL, 4, SL_MAX_VERSION),
+ SDT_VAR(GameOptions, diff_level,SLE_UINT8, 0, 0, 0, 0, 3, 0, STR_NULL, NULL),
+ SDT_OMANY(GameOptions, currency, SLE_UINT8, N, 0, 0, CUSTOM_CURRENCY_ID, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SIT|SEK|YTL|SKK|BRR|custom", STR_NULL, NULL, NULL),
+ SDT_OMANY(GameOptions, units, SLE_UINT8, N, 0, 1, 2, "imperial|metric|si", STR_NULL, NULL, NULL),
+ SDT_OMANY(GameOptions, town_name, SLE_UINT8, 0, 0, 0, 20, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan", STR_NULL, NULL, NULL),
+ SDT_OMANY(GameOptions, landscape, SLE_UINT8, 0, 0, 0, 3, "temperate|arctic|tropic|toyland", STR_NULL, NULL, ConvertLandscape),
+ SDT_VAR(GameOptions, snow_line, SLE_UINT8, 0, 0, 7 * TILE_HEIGHT, 2 * TILE_HEIGHT, 13 * TILE_HEIGHT, 0, STR_NULL, NULL),
+ SDT_CONDOMANY(GameOptions,autosave, SLE_UINT8, 0, 22, N, 0, 0, 0, "", STR_NULL, NULL, NULL),
+ SDT_CONDOMANY(GameOptions,autosave, SLE_UINT8,23, SL_MAX_VERSION, S, 0, 1, 4, "off|monthly|quarterly|half year|yearly", STR_NULL, NULL, NULL),
+ SDT_OMANY(GameOptions, road_side, SLE_UINT8, 0, 0, 1, 1, "left|right", STR_NULL, NULL, NULL),
SDT_END()
};
@@ -1283,6 +1305,8 @@
SDT_BOOL(Patches, link_terraform_toolbar, S, 0, false, STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR,NULL),
SDT_VAR(Patches, liveries, SLE_UINT8, S,MS, 2, 0, 2, 0, STR_CONFIG_PATCHES_LIVERIES, RedrawScreen),
SDT_BOOL(Patches, prefer_teamchat, S, 0, false, STR_CONFIG_PATCHES_PREFER_TEAMCHAT, NULL),
+ SDT_VAR(Patches, scrollwheel_scrolling,SLE_UINT8,S,MS, 0, 0, 2, 0, STR_CONFIG_PATCHES_SCROLLWHEEL_SCROLLING, NULL),
+ SDT_VAR(Patches,scrollwheel_multiplier,SLE_UINT8,S, 0, 5, 1, 15, 1, STR_CONFIG_PATCHES_SCROLLWHEEL_MULTIPLIER,NULL),
/***************************************************************************/
/* Construction section of the GUI-configure patches window */
@@ -1354,7 +1378,7 @@
SDT_VAR(Patches, starting_year, SLE_INT32, 0,NC, 1950, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_PATCHES_STARTING_YEAR,NULL),
SDT_VAR(Patches, ending_year, SLE_INT32,0,NC|NO,2051, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_PATCHES_ENDING_YEAR, NULL),
SDT_BOOL(Patches, smooth_economy, 0, 0, true, STR_CONFIG_PATCHES_SMOOTH_ECONOMY, NULL),
- SDT_BOOL(Patches, allow_shares, 0, 0, true, STR_CONFIG_PATCHES_ALLOW_SHARES, NULL),
+ SDT_BOOL(Patches, allow_shares, 0, 0, false, STR_CONFIG_PATCHES_ALLOW_SHARES, NULL),
/***************************************************************************/
/* AI section of the GUI-configure patches window */
@@ -1472,7 +1496,7 @@
/***************************************************************************/
/* Terrain genation related patch options */
SDT_CONDVAR(Patches, land_generator, SLE_UINT8, 30, SL_MAX_VERSION, 0, MS, 1, 0, 1, 0, STR_CONFIG_PATCHES_LAND_GENERATOR, NULL),
- SDT_CONDVAR(Patches, oil_refinery_limit, SLE_UINT8, 30, SL_MAX_VERSION, 0, 0, 16, 12, 48, 0, STR_CONFIG_PATCHES_OIL_REF_EDGE_DISTANCE, NULL),
+ SDT_CONDVAR(Patches, oil_refinery_limit, SLE_UINT8, 30, SL_MAX_VERSION, 0, 0, 32, 12, 48, 0, STR_CONFIG_PATCHES_OIL_REF_EDGE_DISTANCE, NULL),
SDT_CONDVAR(Patches, tgen_smoothness, SLE_UINT8, 30, SL_MAX_VERSION, 0, MS, 1, 0, 3, 0, STR_CONFIG_PATCHES_ROUGHNESS_OF_TERRAIN, NULL),
SDT_CONDVAR(Patches, generation_seed, SLE_UINT32, 30, SL_MAX_VERSION, 0, 0, GENERATE_NEW_SEED, 0, MAX_UVALUE(uint32), 0, STR_NULL, NULL),
SDT_CONDVAR(Patches, tree_placer, SLE_UINT8, 30, SL_MAX_VERSION, 0, MS, 2, 0, 2, 0, STR_CONFIG_PATCHES_TREE_PLACER, NULL),
@@ -1485,7 +1509,7 @@
static const SettingDesc _currency_settings[] = {
SDT_VAR(CurrencySpec, rate, SLE_UINT16, S, 0, 1, 0, 100, 0, STR_NULL, NULL),
SDT_CHR(CurrencySpec, separator, S, 0, ".", STR_NULL, NULL),
- SDT_VAR(CurrencySpec, to_euro, SLE_INT32, S, 0, 0, 0,1000, 0, STR_NULL, NULL),
+ SDT_VAR(CurrencySpec, to_euro, SLE_INT32, S, 0, 0, 0,3000, 0, STR_NULL, NULL),
SDT_STR(CurrencySpec, prefix, SLE_STRBQ, S, 0, NULL, STR_NULL, NULL),
SDT_STR(CurrencySpec, suffix, SLE_STRBQ, S, 0, " credits", STR_NULL, NULL),
SDT_END()
@@ -1655,14 +1679,18 @@
#endif /* ENABLE_NETWORK */
}
+extern void CheckDifficultyLevels();
+
/** Load the values from the configuration files */
void LoadFromConfig()
{
IniFile *ini = ini_load(_config_file);
+ ResetCurrencies(false); // Initialize the array of curencies, without preserving the custom one
HandleSettingDescs(ini, ini_load_settings, ini_load_setting_list);
_grfconfig_newgame = GRFLoadConfig(ini, "newgrf", false);
_grfconfig_static = GRFLoadConfig(ini, "newgrf-static", true);
_news_display_opt = NewsDisplayLoadConfig(ini, "news_display");
+ CheckDifficultyLevels();
ini_free(ini);
}
--- a/src/settings.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/settings.h Mon Mar 26 22:15:38 2007 +0000
@@ -44,7 +44,8 @@
typedef TinyEnumT<SettingGuiFlagLong> SettingGuiFlag;
-typedef int32 OnChange(int32 var);
+typedef int32 OnChange(int32 var); ///< callback prototype on data modification
+typedef int32 OnConvert(const char *value); ///< callback prototype for convertion error
struct SettingDescBase {
const char *name; ///< name of the setting. Used in configuration file and for console
@@ -56,6 +57,7 @@
const char *many; ///< ONE/MANY_OF_MANY: string of possible values for this type
StringID str; ///< (translated) string with descriptive text; gui and console
OnChange *proc; ///< callback procedure for when the value is changed
+ OnConvert *proc_cnvt; ///< callback procedure when loading value mechanism fails
};
struct SettingDesc {
--- a/src/settings_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/settings_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -369,6 +369,23 @@
}
}
+/**
+ * Checks the difficulty levels read from the configuration and
+ * forces them to be correct when invalid.
+ */
+void CheckDifficultyLevels()
+{
+ if (_opt_newgame.diff_level != 3) {
+ SetDifficultyLevel(_opt_newgame.diff_level, &_opt_newgame);
+ } else {
+ for (uint i = 0; i < GAME_DIFFICULTY_NUM; i++) {
+ int *diff = ((int*)&_opt_newgame.diff) + i;
+ *diff = clamp(*diff, _game_setting_info[i].min, _game_setting_info[i].max);
+ *diff -= *diff % _game_setting_info[i].step;
+ }
+ }
+}
+
extern void StartupEconomy();
enum {
@@ -392,6 +409,7 @@
w->SetWidgetDisabledState( 6, _game_mode == GM_NORMAL);
w->SetWidgetDisabledState( 7, _game_mode == GM_EDITOR || _networking); // highscore chart in multiplayer
w->SetWidgetDisabledState(10, _networking && !_network_server); // Save-button in multiplayer (and if client)
+ w->LowerWidget(_opt_mod_temp.diff_level + 3);
break;
case WE_PAINT: {
@@ -575,6 +593,11 @@
"link_terraform_toolbar",
"liveries",
"prefer_teamchat",
+ /* While the horizontal scrollwheel scrolling is written as general code, only
+ * the cocoa (OSX) driver generates input for it.
+ * Since it's also able to completely disable the scrollwheel will we display it on all platforms anyway */
+ "scrollwheel_scrolling",
+ "scrollwheel_multiplier",
};
static const char *_patches_construction[] = {
--- a/src/ship_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/ship_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -208,7 +208,7 @@
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
}
@@ -1098,7 +1098,7 @@
/* Check cargo */
if (!ShipVehInfo(v->engine_type)->refittable) return CMD_ERROR;
- if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
+ if (new_cid >= NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_SHIP_RUN);
--- a/src/smallmap_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/smallmap_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -492,7 +492,7 @@
case MP_TREES:
if (GetTreeGround(tile) == TREE_GROUND_SNOW_DESERT) {
- bits = (_opt.landscape == LT_HILLY) ? MKCOLOR(0x98575798) : MKCOLOR(0xC25757C2);
+ bits = (_opt.landscape == LT_ARCTIC) ? MKCOLOR(0x98575798) : MKCOLOR(0xC25757C2);
} else {
bits = MKCOLOR(0x54575754);
}
--- a/src/station_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/station_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -250,7 +250,7 @@
CountMapSquareAround(tile, MP_TREES, 0) >= 8 ||
CountMapSquareAround(tile, MP_INDUSTRY, IT_FOREST) >= 2)
) {
- found = _opt.landscape == LT_DESERT ?
+ found = _opt.landscape == LT_TROPIC ?
M(STR_SV_STNAME_FOREST) : M(STR_SV_STNAME_WOODS);
goto done;
}
@@ -352,7 +352,7 @@
{
uint mask = 0;
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
if (st->goods[i].waiting_acceptance & 0x8000) mask |= 1 << i;
}
return mask;
@@ -525,12 +525,13 @@
}
// Adjust in case our station only accepts fewer kinds of goods
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
uint amt = min(accepts[i], 15);
// Make sure the station can accept the goods type.
- if ((i != CT_PASSENGERS && !(st->facilities & (byte)~FACIL_BUS_STOP)) ||
- (i == CT_PASSENGERS && !(st->facilities & (byte)~FACIL_TRUCK_STOP)))
+ bool is_passengers = IsCargoInClass(i, CC_PASSENGERS);
+ if ((!is_passengers && !(st->facilities & (byte)~FACIL_BUS_STOP)) ||
+ (is_passengers && !(st->facilities & (byte)~FACIL_TRUCK_STOP)))
amt = 0;
SB(st->goods[i].waiting_acceptance, 12, 4, amt);
@@ -1119,6 +1120,14 @@
return cost;
}
+/**
+ * Switches the rail type at a railway station tile.
+ * @param tile The tile on which the railtype is to be convert.
+ * @param totype The railtype we want to convert to
+ * @param exec Switches between test and execute mode
+ * @return The cost and state of the operation
+ * @retval CMD_ERROR An error occured during the operation.
+ */
int32 DoConvertStationRail(TileIndex tile, RailType totype, bool exec)
{
const Station* st = GetStationByTile(tile);
@@ -1139,7 +1148,7 @@
YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile));
}
- return _price.build_rail >> 1;
+ return _price.build_rail / 2;
}
/**
@@ -1629,6 +1638,7 @@
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
if (!IsClearWaterTile(tile) || tile == 0) return_cmd_error(STR_304B_SITE_UNSUITABLE);
+ if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
/* allocate and initialize new station */
Station *st = new Station(tile);
@@ -1748,6 +1758,8 @@
if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile)) return CMD_ERROR;
+ if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
+
cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(cost)) return CMD_ERROR;
@@ -1757,6 +1769,8 @@
return_cmd_error(STR_304B_SITE_UNSUITABLE);
}
+ if (MayHaveBridgeAbove(tile_cur) && IsBridgeAbove(tile_cur)) return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
+
cost = DoCommand(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(cost)) return CMD_ERROR;
@@ -2158,7 +2172,7 @@
if (!rs->IsFreeBay(side)) return VETSB_CANNOT_ENTER;
/* Check if the vehicle is stopping at this road stop */
- if (GetRoadStopType(tile) == ((v->cargo_type == CT_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
+ if (GetRoadStopType(tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
v->current_order.dest == GetStationIndex(tile)) {
SETBIT(v->u.road.state, RVS_IS_STOPPING);
rs->AllocateDriveThroughBay(side);
@@ -2330,7 +2344,7 @@
FOR_ALL_STATIONS(st) {
if (st->owner == owner &&
DistanceManhattan(tile, st->xy) <= radius) {
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
GoodsEntry* ge = &st->goods[i];
if (ge->enroute_from != INVALID_STATION) {
@@ -2341,7 +2355,7 @@
}
}
-static void UpdateStationWaiting(Station *st, int type, uint amount)
+static void UpdateStationWaiting(Station *st, CargoID type, uint amount)
{
SB(st->goods[type].waiting_acceptance, 0, 12,
min(0xFFF, GB(st->goods[type].waiting_acceptance, 0, 12) + amount)
@@ -2385,7 +2399,7 @@
}
-uint MoveGoodsToStation(TileIndex tile, int w, int h, int type, uint amount)
+uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
{
Station* around[8];
@@ -2420,8 +2434,8 @@
(st->town->exclusive_counter == 0 || st->town->exclusivity == st->owner) && // check exclusive transport rights
st->goods[type].rating != 0 &&
(!_patches.selectgoods || st->goods[type].last_speed > 0) && // if last_speed is 0, no vehicle has been there.
- ((st->facilities & ~FACIL_BUS_STOP) != 0 || type == CT_PASSENGERS) && // if we have other fac. than a bus stop, or the cargo is passengers
- ((st->facilities & ~FACIL_TRUCK_STOP) != 0 || type != CT_PASSENGERS)) { // if we have other fac. than a cargo bay or the cargo is not passengers
+ ((st->facilities & ~FACIL_BUS_STOP) != 0 || IsCargoInClass(type, CC_PASSENGERS)) && // if we have other fac. than a bus stop, or the cargo is passengers
+ ((st->facilities & ~FACIL_TRUCK_STOP) != 0 || !IsCargoInClass(type, CC_PASSENGERS))) { // if we have other fac. than a cargo bay or the cargo is not passengers
if (_patches.modified_catchment) {
// min and max coordinates of the producer relative
const int x_min_prod = 9;
@@ -2547,7 +2561,7 @@
st->facilities = FACIL_AIRPORT | FACIL_DOCK;
st->build_date = _date;
- for (uint j = 0; j != NUM_CARGO; j++) {
+ for (CargoID j = 0; j < NUM_CARGO; j++) {
st->goods[j].waiting_acceptance = 0;
st->goods[j].days_since_pickup = 0;
st->goods[j].enroute_from = INVALID_STATION;
@@ -2795,20 +2809,8 @@
static void SaveLoad_STNS(Station *st)
{
SlObject(st, _station_desc);
- for (uint i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
SlObject(&st->goods[i], _goods_desc);
-
- /* In older versions, enroute_from had 0xFF as INVALID_STATION, is now 0xFFFF */
- if (CheckSavegameVersion(7) && st->goods[i].enroute_from == 0xFF) {
- st->goods[i].enroute_from = INVALID_STATION;
- }
- if (CheckSavegameVersion(44)) {
- /* Store position of the station where the goods come from, so there are no
- * very high payments when stations get removed. However, if the station
- * where the goods came from is already removed, the source information is
- * lost. In that case we set it to the position of this station */
- st->goods[i].enroute_from_xy = IsValidStationID(st->goods[i].enroute_from) ? GetStation(st->goods[i].enroute_from)->xy : st->xy;
- }
}
if (st->num_specs != 0) {
--- a/src/station_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/station_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -267,7 +267,8 @@
sl->flags &= ~SL_RESORT;
}
-static uint32 _cargo_filter = std::numeric_limits<uint32>::max();
+static const uint32 _cargo_filter_max = ~0;
+static uint32 _cargo_filter = _cargo_filter_max;
static void PlayerStationsWndProc(BaseWindow *w, WindowEvent *e)
{
@@ -280,7 +281,7 @@
switch (e->event) {
case WE_CREATE: /* set up resort timer */
- if (_cargo_filter == std::numeric_limits<uint32>::max()) _cargo_filter = _cargo_mask;
+ if (_cargo_filter == _cargo_filter_max) _cargo_filter = _cargo_mask;
for (uint i = 0; i < 5; i++) {
if (HASBIT(facilities, i)) w->LowerWidget(i + STATIONLIST_WIDGET_TRAIN);
@@ -362,7 +363,7 @@
x = DrawString(xb, y, STR_3049_0, 0) + 5;
// show cargo waiting and station ratings
- for (CargoID 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);
@@ -665,6 +666,30 @@
{ WIDGETS_END},
};
+
+static void DrawCargoIcons(CargoID i, uint waiting, int x, int y)
+{
+ uint num = min((waiting + 5) / 10, 23);
+ if (num == 0) return;
+
+ const CargoSpec *cs = GetCargo(i);
+ SpriteID sprite;
+
+ if (cs->sprite == 0xFFFF) {
+ /* A value of 0xFFFF indicates we should draw a custom icon */
+ sprite = GetCustomCargoSprite(cs);
+ } else {
+ sprite = cs->sprite;
+ }
+
+ if (sprite == 0) return;
+
+ do {
+ DrawSprite(sprite, PAL_NONE, x, y);
+ x += 10;
+ } while (--num);
+}
+
static void DrawStationViewWindow(BaseWindow *w)
{
StationID station_id = w->window_number;
@@ -675,7 +700,7 @@
StringID str;
num = 1;
- for (CargoID 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++;
@@ -699,7 +724,7 @@
if (--pos < 0) {
str = STR_00D0_NOTHING;
- for (CargoID 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);
@@ -707,22 +732,13 @@
y += 10;
}
- for (CargoID i = 0; i != NUM_CARGO && pos > -5; i++) {
+ for (CargoID i = 0; i < NUM_CARGO && pos > -5; i++) {
uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12);
if (waiting == 0) continue;
- num = (waiting + 5) / 10;
- if (num != 0) {
- int cur_x = x;
- num = min(num, 23);
- do {
- DrawSprite(GetCargo(i)->sprite, PAL_NONE, cur_x, y);
- cur_x += 10;
- } while (--num);
- }
-
if (st->goods[i].enroute_from == station_id) {
if (--pos < 0) {
+ DrawCargoIcons(i, waiting, x, y);
SetDParam(1, waiting);
SetDParam(0, i);
DrawStringRightAligned(x + 234, y, STR_0009, 0);
@@ -731,6 +747,7 @@
} else {
/* enroute */
if (--pos < 0) {
+ DrawCargoIcons(i, waiting, x, y);
SetDParam(1, waiting);
SetDParam(0, i);
DrawStringRightAligned(x + 234, y, STR_000A_EN_ROUTE_FROM, 0);
@@ -751,7 +768,7 @@
b = InlineString(b, STR_000C_ACCEPTS);
- for (CargoID 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) {
@@ -774,14 +791,18 @@
DrawString(2, 67, STR_3034_LOCAL_RATING_OF_TRANSPORT, 0);
y = 77;
- 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);
- SetDParam(1, STR_3035_APPALLING + (st->goods[i].rating >> 5));
- DrawString(8, y, STR_303D, 0);
- y += 10;
- }
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
+ const CargoSpec *cs = GetCargo(i);
+ if (!cs->IsValid()) continue;
+
+ const GoodsEntry *ge = &st->goods[i];
+ if (ge->enroute_from == INVALID_STATION) continue;
+
+ SetDParam(0, cs->name);
+ SetDParam(2, ge->rating * 101 >> 8);
+ SetDParam(1, STR_3035_APPALLING + (ge->rating >> 5));
+ DrawString(8, y, STR_303D, 0);
+ y += 10;
}
}
}
--- a/src/stdafx.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/stdafx.h Mon Mar 26 22:15:38 2007 +0000
@@ -20,8 +20,6 @@
# define INT64_MAX 9223372036854775807LL
#endif
-#include <limits>
-
#include <cstdio>
#include <cstddef>
#include <cstring>
--- a/src/strings.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/strings.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -27,6 +27,7 @@
/* for opendir/readdir/closedir */
# include "fios.h"
+DynamicLanguages _dynlang;
char _userstring[128];
static char *StationGetSpecialString(char *buff, int x, const char* last);
@@ -584,9 +585,15 @@
}
default:
- buff = FormatCommaNumber(buff, GetInt32(&argv), last);
- buff = strecpy(buff, " ", last);
- buff = strecpy(buff, GetStringPtr(cargo_str), last);
+ if (cargo_str >= 0xE000 && cargo_str < 0xF800) {
+ /* NewGRF strings from Action 4 use a different format here,
+ * of e.g. "x tonnes of coal", so process accordingly. */
+ buff = GetStringWithArgs(buff, cargo_str, argv++, last);
+ } else {
+ buff = FormatCommaNumber(buff, GetInt32(&argv), last);
+ buff = strecpy(buff, " ", last);
+ buff = strecpy(buff, GetStringPtr(cargo_str), last);
+ }
break;
}
} break;
@@ -952,7 +959,7 @@
const char* const* base;
uint num;
- if (_opt_ptr->landscape == LT_CANDY) {
+ if (_opt_ptr->landscape == LT_TOYLAND) {
base = _silly_surname_list;
num = lengthof(_silly_surname_list);
} else {
@@ -982,7 +989,7 @@
buff = strecpy(buff, initial, last);
}
- if (_opt_ptr->landscape == LT_CANDY) {
+ if (_opt_ptr->landscape == LT_TOYLAND) {
base = _silly_surname_list;
num = lengthof(_silly_surname_list);
} else {
@@ -1068,16 +1075,12 @@
bool ReadLanguagePack(int lang_index)
{
int tot_count, i;
- LanguagePack *lang_pack;
size_t len;
char **langpack_offs;
char *s;
- {
- char *lang = str_fmt("%s%s", _paths.lang_dir, _dynlang.ent[lang_index].file);
- lang_pack = (LanguagePack*)ReadFileToMem(lang, &len, 200000);
- free(lang);
- }
+ LanguagePack *lang_pack = (LanguagePack*)ReadFileToMem(_dynlang.ent[lang_index].file, &len, 200000);
+
if (lang_pack == NULL) return false;
if (len < sizeof(LanguagePack) ||
lang_pack->ident != TO_LE32(LANGUAGE_PACK_IDENT) ||
@@ -1119,7 +1122,8 @@
free(_langpack_offs);
_langpack_offs = langpack_offs;
- ttd_strlcpy(_dynlang.curr_file, _dynlang.ent[lang_index].file, sizeof(_dynlang.curr_file));
+ const char *c_file = strrchr(_dynlang.ent[lang_index].file, PATHSEPCHAR) + 1;
+ ttd_strlcpy(_dynlang.curr_file, c_file, lengthof(_dynlang.curr_file));
_dynlang.curr = lang_index;
SetCurrentGrfLangID(_langpack->isocode);
@@ -1152,96 +1156,146 @@
static int CDECL LanguageCompareFunc(const void *a, const void *b)
{
- return strcmp(*(const char* const *)a, *(const char* const *)b);
+ const Language *cmp1 = (const Language*)a;
+ const Language *cmp2 = (const Language*)b;
+
+ return strcmp(cmp1->file, cmp2->file);
}
-static int GetLanguageList(char **languages, int max)
+/**
+ * Checks whether the given language is already found.
+ * @param langs languages we've found so fa
+ * @param max the length of the language list
+ * @param language name of the language to check
+ * @return true if and only if a language file with the same name has not been found
+ */
+static bool UniqueLanguageFile(const Language *langs, uint max, const char *language)
{
- DIR *dir;
- struct dirent *dirent;
- int num = 0;
+ for (uint i = 0; i < max; i++) {
+ const char *f_name = strrchr(langs[i].file, PATHSEPCHAR) + 1;
+ if (strcmp(f_name, language) == 0) return false; // duplicates
+ }
- dir = ttd_opendir(_paths.lang_dir);
+ return true;
+}
+
+/**
+ * Reads the language file header and checks compatability.
+ * @param file the file to read
+ * @param hdr the place to write the header information to
+ * @return true if and only if the language file is of a compatible version
+ */
+static bool GetLanguageFileHeader(const char *file, LanguagePack *hdr)
+{
+ FILE *f = fopen(file, "rb");
+ if (f == NULL) return false;
+
+ size_t read = fread(hdr, sizeof(*hdr), 1, f);
+ fclose(f);
+
+ return read == 1 &&
+ hdr->ident == TO_LE32(LANGUAGE_PACK_IDENT) &&
+ hdr->version == TO_LE32(LANGUAGE_PACK_VERSION);
+}
+
+/**
+ * Gets a list of languages from the given directory.
+ * @param langs the list to write to
+ * @param start the initial offset in the list
+ * @param max the length of the language list
+ * @param path the base directory to search in
+ * @return the number of added languages
+ */
+static int GetLanguageList(Language *langs, int start, int max, const char *path)
+{
+ int i = start;
+
+ DIR *dir = ttd_opendir(path);
if (dir != NULL) {
- while ((dirent = readdir(dir)) != NULL) {
- const char *d_name = FS2OTTD(dirent->d_name);
- const char *t = strrchr(d_name, '.');
+ struct dirent *dirent;
+ while ((dirent = readdir(dir)) != NULL && i < max) {
+ const char *d_name = FS2OTTD(dirent->d_name);
+ const char *extension = strrchr(d_name, '.');
- if (t != NULL && strcmp(t, ".lng") == 0) {
- languages[num++] = strdup(d_name);
- if (num == max) break;
+ /* Not a language file */
+ if (extension == NULL || strcmp(extension, ".lng") != 0) continue;
+
+ /* Filter any duplicate language-files, first-come first-serve */
+ if (!UniqueLanguageFile(langs, i, d_name)) continue;
+
+ langs[i].file = str_fmt("%s%s", path, d_name);
+
+ /* Check whether the file is of the correct version */
+ LanguagePack hdr;
+ if (!GetLanguageFileHeader(langs[i].file, &hdr)) {
+ free(langs[i].file);
+ continue;
}
+
+ i++;
}
closedir(dir);
}
-
- qsort(languages, num, sizeof(char*), LanguageCompareFunc);
- return num;
+ return i - start;
}
-// make a list of the available language packs. put the data in _dynlang struct.
+/**
+ * Make a list of the available language packs. put the data in
+ * _dynlang struct.
+ */
void InitializeLanguagePacks()
{
- DynamicLanguages *dl = &_dynlang;
- int i;
- int n;
- int m;
- int def;
- int def2;
- int fallback;
- LanguagePack hdr;
- FILE *in;
- char *files[MAX_LANG];
- const char* lang;
+ Language files[MAX_LANG];
+ uint language_count = GetLanguageList(files, 0, lengthof(files), _paths.lang_dir);
+ if (language_count == 0) error("No available language packs (invalid versions?)");
- lang = GetCurrentLocale("LC_MESSAGES");
+ /* Sort the language names alphabetically */
+ qsort(files, language_count, sizeof(Language), LanguageCompareFunc);
+
+ /* Acquire the locale of the current system */
+ const char *lang = GetCurrentLocale("LC_MESSAGES");
if (lang == NULL) lang = "en_GB";
- n = GetLanguageList(files, lengthof(files));
-
- def = -1;
- def2 = -1;
- fallback = 0;
+ int chosen_language = -1; ///< Matching the language in the configuartion file or the current locale
+ int language_fallback = -1; ///< Using pt_PT for pt_BR locale when pt_BR is not available
+ int en_GB_fallback = 0; ///< Fallback when no locale-matching language has been found
- // go through the language files and make sure that they are valid.
- for (i = m = 0; i != n; i++) {
- size_t j;
+ DynamicLanguages *dl = &_dynlang;
+ dl->num = 0;
+ /* Fill the dynamic languages structures */
+ for (uint i = 0; i < language_count; i++) {
+ /* File read the language header */
+ LanguagePack hdr;
+ if (!GetLanguageFileHeader(files[i].file, &hdr)) continue;
- char *s = str_fmt("%s%s", _paths.lang_dir, files[i]);
- in = fopen(s, "rb");
- free(s);
- if (in == NULL ||
- (j = fread(&hdr, sizeof(hdr), 1, in), fclose(in), j) != 1 ||
- hdr.ident != TO_LE32(LANGUAGE_PACK_IDENT) ||
- hdr.version != TO_LE32(LANGUAGE_PACK_VERSION)) {
- free(files[i]);
- continue;
+ dl->ent[dl->num].file = files[i].file;
+ dl->ent[dl->num].name = strdup(hdr.name);
+ dl->dropdown[dl->num] = SPECSTR_LANGUAGE_START + dl->num;
+
+ /* We are trying to find a default language. The priority is by
+ * configuration file, local environment and last, if nothing found,
+ * english. If def equals -1, we have not picked a default language */
+ const char *lang_file = strrchr(dl->ent[dl->num].file, PATHSEPCHAR) + 1;
+ if (strcmp(lang_file, dl->curr_file) == 0) chosen_language = dl->num;
+
+ if (chosen_language == -1) {
+ if (strcmp (hdr.isocode, "en_GB") == 0) en_GB_fallback = dl->num;
+ if (strncmp(hdr.isocode, lang, 5) == 0) chosen_language = dl->num;
+ if (strncmp(hdr.isocode, lang, 2) == 0) language_fallback = dl->num;
}
- dl->ent[m].file = files[i];
- dl->ent[m].name = strdup(hdr.name);
-
- if (strcmp(hdr.isocode, "en_GB") == 0) fallback = m;
- if (strncmp(hdr.isocode, lang, 2) == 0) def2 = m;
- if (strncmp(hdr.isocode, lang, 5) == 0) def = m;
-
- m++;
+ dl->num++;
}
- if (def == -1) def = (def2 != -1 ? def2 : fallback);
+ /* Terminate the dropdown list */
+ dl->dropdown[dl->num] = INVALID_STRING_ID;
- if (m == 0)
- error(n == 0 ? "No available language packs" : "Invalid version of language packs");
-
- dl->num = m;
- for (i = 0; i != dl->num; i++) dl->dropdown[i] = SPECSTR_LANGUAGE_START + i;
- dl->dropdown[i] = INVALID_STRING_ID;
+ if (dl->num == 0) error("Invalid version of language packs");
- for (i = 0; i != dl->num; i++)
- if (strcmp(dl->ent[i].file, dl->curr_file) == 0) {
- def = i;
- break;
- }
+ /* We haven't found the language in the config nor the one in the locale.
+ * Now we set it to one of the fallback languages */
+ if (chosen_language == -1) {
+ chosen_language = (language_fallback != -1) ? language_fallback : en_GB_fallback;
+ }
- if (!ReadLanguagePack(def))
- error("can't read language pack '%s'", dl->ent[def].file);
+ if (!ReadLanguagePack(chosen_language)) error("Can't read language pack '%s'", dl->ent[chosen_language].file);
}
--- a/src/strings.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/strings.h Mon Mar 26 22:15:38 2007 +0000
@@ -11,4 +11,7 @@
void InjectDParam(int amount);
int32 GetParamInt32();
+bool ReadLanguagePack(int index);
+void InitializeLanguagePacks();
+
#endif /* STRINGS_H */
--- a/src/subsidy_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/subsidy_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -13,6 +13,7 @@
#include "economy.h"
#include "variables.h"
#include "date.h"
+#include "cargotype.h"
static void HandleSubsidyClick(int y)
{
@@ -50,22 +51,24 @@
handle_click:
+ TownEffect te = GetCargo(s->cargo_type)->town_effect;
+
/* determine from coordinate for subsidy and try to scroll to it */
offs = s->from;
if (s->age >= 12) {
xy = GetStation(offs)->xy;
- } else if (s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL) {
+ } else if (te == TE_PASSENGERS || te == TE_MAIL) {
xy = GetTown(offs)->xy;
} else {
xy = GetIndustry(offs)->xy;
+ }
- }
if (!ScrollMainWindowToTile(xy)) {
/* otherwise determine to coordinate for subsidy and scroll to it */
offs = s->to;
if (s->age >= 12) {
xy = GetStation(offs)->xy;
- } else if (s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL || s->cargo_type == CT_GOODS || s->cargo_type == CT_FOOD) {
+ } else if (te == TE_PASSENGERS || te == TE_MAIL || te == TE_GOODS || te == TE_FOOD) {
xy = GetTown(offs)->xy;
} else {
xy = GetIndustry(offs)->xy;
--- a/src/table/build_industry.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/build_industry.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file build_industry.h */
+
#ifndef BUILD_INDUSTRY_H
#define BUILD_INDUSTRY_H
@@ -1098,7 +1100,7 @@
IT_POWER_STATION, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_COAL, 15, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL | 1 << LT_HILLY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
STR_4802_COAL_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4836_NEW_COAL_SEAM_FOUND_AT, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1106,7 +1108,7 @@
IT_COAL_MINE, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_COAL, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_NORMAL | 1 << LT_HILLY,
+ INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
STR_4803_POWER_STATION, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1114,7 +1116,7 @@
IT_FOREST, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_WOOD, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_NORMAL,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
STR_4804_SAWMILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1122,7 +1124,7 @@
IT_SAWMILL, IT_PAPER_MILL, IT_INVALID, CHECK_FOREST,
CT_WOOD, 13, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL | 1 << LT_HILLY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
STR_4805_FOREST, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1130,7 +1132,7 @@
IT_OIL_RIG, IT_INVALID, IT_INVALID, CHECK_REFINERY,
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_OIL, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_NORMAL | 1 << LT_HILLY | 1 << LT_DESERT,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
STR_4806_OIL_REFINERY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1138,7 +1140,7 @@
IT_OIL_REFINERY, IT_INVALID, IT_INVALID, CHECK_OIL_RIG,
CT_OIL, 15, CT_PASSENGERS, 2, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE,
STR_4807_OIL_RIG, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1146,7 +1148,7 @@
IT_FARM, IT_STEEL_MILL, IT_INVALID, CHECK_NOTHING,
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_LIVESTOCK, CT_GRAIN, CT_STEEL,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_NORMAL,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
STR_4808_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1154,7 +1156,7 @@
IT_PAPER_MILL, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_PAPER, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_HILLY,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC,
STR_4809_PRINTING_WORKS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1162,7 +1164,7 @@
IT_IRON_MINE, IT_FACTORY, IT_INVALID, CHECK_NOTHING,
CT_STEEL, 0, CT_INVALID, 0, 5,
CT_IRON_ORE, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_NORMAL,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TEMPERATE,
STR_480A_STEEL_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1170,7 +1172,7 @@
IT_FACTORY, IT_FOOD_PROCESS, IT_INVALID, CHECK_FARM,
CT_GRAIN, 10, CT_LIVESTOCK, 10, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL | 1 << LT_HILLY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC,
STR_480B_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1178,7 +1180,7 @@
IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_COPPER_ORE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_480C_COPPER_ORE_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1186,7 +1188,7 @@
IT_OIL_REFINERY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_OIL, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL | 1 << LT_HILLY | 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
STR_480D_OIL_WELLS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4837_NEW_OIL_RESERVES_FOUND, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1194,7 +1196,7 @@
IT_BANK_TEMP, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_VALUABLES, 6, CT_INVALID, 0, 5,
CT_VALUABLES, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_NORMAL,
+ INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TEMPERATE,
STR_480E_BANK, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1202,7 +1204,7 @@
IT_FRUIT_PLANTATION, IT_FARM, IT_FARM_2, CHECK_NOTHING,
CT_FOOD, 0, CT_INVALID, 0, 5,
CT_FRUIT, CT_MAIZE, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_HILLY | 1 << LT_DESERT,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC | 1 << LT_TROPIC,
STR_480F_FOOD_PROCESSING_PLANT, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1210,7 +1212,7 @@
IT_FOREST, IT_PRINTING_WORKS, IT_INVALID, CHECK_NOTHING,
CT_PAPER, 0, CT_INVALID, 0, 5,
CT_WOOD, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_HILLY,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_ARCTIC,
STR_4810_PAPER_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1218,7 +1220,7 @@
IT_BANK_TROPIC_ARCTIC, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_GOLD, 7, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_4811_GOLD_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1226,7 +1228,7 @@
IT_GOLD_MINE, IT_DIAMOND_MINE, IT_INVALID, CHECK_NOTHING,
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_GOLD, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_HILLY | 1 << LT_DESERT,
+ INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_ARCTIC | 1 << LT_TROPIC,
STR_4812_BANK, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1234,7 +1236,7 @@
IT_BANK_TROPIC_ARCTIC, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_DIAMONDS, 7, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_4813_DIAMOND_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1242,7 +1244,7 @@
IT_STEEL_MILL, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_IRON_ORE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_NORMAL,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TEMPERATE,
STR_4814_IRON_ORE_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1250,7 +1252,7 @@
IT_FOOD_PROCESS, IT_INVALID, IT_INVALID, CHECK_PLANTATION,
CT_FRUIT, 10, CT_INVALID, 0, 15,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_4815_FRUIT_PLANTATION, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1258,7 +1260,7 @@
IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_PLANTATION,
CT_RUBBER, 10, CT_INVALID, 0, 15,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_4816_RUBBER_PLANTATION, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1266,7 +1268,7 @@
IT_WATER_TOWER, IT_INVALID, IT_INVALID, CHECK_WATER,
CT_WATER, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_4817_WATER_SUPPLY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1274,7 +1276,7 @@
IT_WATER_SUPPLY, IT_INVALID, IT_INVALID, CHECK_WATER,
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_WATER, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_DESERT,
+ INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TROPIC,
STR_4818_WATER_TOWER, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1282,7 +1284,7 @@
IT_RUBBER_PLANTATION, IT_COPPER_MINE, IT_LUMBER_MILL, CHECK_PLANTATION,
CT_GOODS, 0, CT_INVALID, 0, 5,
CT_RUBBER, CT_COPPER_ORE, CT_WOOD,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_DESERT,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TROPIC,
STR_4819_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1290,7 +1292,7 @@
IT_FOOD_PROCESS, IT_INVALID, IT_INVALID, CHECK_PLANTATION,
CT_MAIZE, 11, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_DESERT,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TROPIC,
STR_481A_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1298,7 +1300,7 @@
IT_FACTORY_2, IT_INVALID, IT_INVALID, CHECK_LUMBERMILL,
CT_WOOD, 0, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_DESERT,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TROPIC,
STR_481B_LUMBER_MILL, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4834_LACK_OF_NEARBY_TREES_CAUSES, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1306,7 +1308,7 @@
IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_COTTON_CANDY, 13, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_481C_COTTON_CANDY_FOREST, STR_482E_NEW_BEING_PLANTED_NEAR,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1314,7 +1316,7 @@
IT_COTTON_CANDY, IT_TOFFEE_QUARRY, IT_SUGAR_MINE, CHECK_NOTHING,
CT_CANDY, 0, CT_INVALID, 0, 5,
CT_SUGAR, CT_TOFFEE, CT_COTTON_CANDY,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_CANDY,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
STR_481D_CANDY_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1322,7 +1324,7 @@
IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_BATTERIES, 11, CT_INVALID, 0, 30,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_481E_BATTERY_FARM, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
@@ -1330,7 +1332,7 @@
IT_FIZZY_DRINK_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_COLA, 12, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_481F_COLA_WELLS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1338,7 +1340,7 @@
IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_INVALID, 0, CT_INVALID, 0, 5,
CT_TOYS, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_CANDY,
+ INDUSTRYLIFE_NOT_CLOSABLE, 1 << LT_TOYLAND,
STR_4820_TOY_SHOP, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1346,7 +1348,7 @@
IT_PLASTIC_FOUNTAINS, IT_BATTERY_FARM, IT_TOY_SHOP, CHECK_NOTHING,
CT_TOYS, 0, CT_INVALID, 0, 5,
CT_PLASTIC, CT_BATTERIES, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_CANDY,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
STR_4821_TOY_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1354,7 +1356,7 @@
IT_TOY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_PLASTIC, 14, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_4822_PLASTIC_FOUNTAINS, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1362,7 +1364,7 @@
IT_COLA_WELLS, IT_BUBBLE_GENERATOR, IT_INVALID, CHECK_NOTHING,
CT_FIZZY_DRINKS, 0, CT_INVALID, 0, 5,
CT_COLA, CT_BUBBLES, CT_INVALID,
- INDUSTRYLIFE_CLOSABLE, 1 << LT_CANDY,
+ INDUSTRYLIFE_CLOSABLE, 1 << LT_TOYLAND,
STR_4823_FIZZY_DRINK_FACTORY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4833_SUPPLY_PROBLEMS_CAUSE_TO, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1370,7 +1372,7 @@
IT_FIZZY_DRINK_FACTORY, IT_INVALID, IT_INVALID, CHECK_BUBBLEGEN,
CT_BUBBLES, 13, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_4824_BUBBLE_GENERATOR, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1378,7 +1380,7 @@
IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_TOFFEE, 10, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_4825_TOFFEE_QUARRY, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
@@ -1386,7 +1388,7 @@
IT_CANDY_FACTORY, IT_INVALID, IT_INVALID, CHECK_NOTHING,
CT_SUGAR, 11, CT_INVALID, 0, 5,
CT_INVALID, CT_INVALID, CT_INVALID,
- INDUSTRYLIFE_PRODUCTION, 1 << LT_CANDY,
+ INDUSTRYLIFE_PRODUCTION, 1 << LT_TOYLAND,
STR_4826_SUGAR_MINE, STR_482D_NEW_UNDER_CONSTRUCTION,
STR_4832_ANNOUNCES_IMMINENT_CLOSURE, STR_4835_INCREASES_PRODUCTION, STR_4839_PRODUCTION_DOWN_BY_50),
};
@@ -1461,256 +1463,263 @@
_industry_create_table_3,
};
-#define MK(c1, c2, c3, sl) \
- {{c1, c2, c3}, sl}
-
+/** Writes the properties of a industry tile into the IndustryTileSpec struct.
+ * @param c1 first type of cargo accepted for this tile
+ * @param c2 second cargo
+ * @param c3 and third cargo. Those three are in an array
+ * @param s1 slope refused upon choosing a place to build
+ * @param a1 animation frame on production
+ * @param a2 next frame of animation
+ * @param a3 chosses between animation of construction state
+ */
+#define MK(c1, c2, c3, sl, a1, a2, a3) {{c1, c2, c3}, sl, a1, a2, a3}
static const IndustryTileSpec _industry_tile_specs[] = {
/* Coal Mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Power Station */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_COAL, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_COAL, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Sawmill */
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Forest Artic, temperate */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, 17, INDUTILE_NOANIM, false), // Chopping forest
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, 16, false), // Growing forest
/* Oil refinery */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_OIL, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_OIL, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* oil Rig */
- MK(CT_INVALID, CT_INVALID, CT_PASSENGERS, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_MAIL, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_PASSENGERS, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_MAIL, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Oil Wells artic, temperate */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true ),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true ),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true ),
/* Farm tropic, arctic and temperate */
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Factory temperate */
- MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP),
+ MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_GRAIN, CT_STEEL, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Printing works */
- MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_PAPER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Copper ore mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true ),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Steel mill */
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
- MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_IRON_ORE, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Bank temperate*/
- MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_E),
- MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_S),
+ MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_E, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_PASSENGERS, CT_INVALID, CT_VALUABLES, SLOPE_S, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Food processing plant, tropic and arctic. CT_MAIZE or CT_WHEAT, CT_LIVESTOCK or CT_FRUIT*/
- MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP),
- MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP),
+ MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_MAIZE, CT_INVALID, CT_LIVESTOCK, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Paper mill */
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_WOOD, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Gold mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, true ),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Bank Sub Arctic */
- MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_E),
- MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_S),
+ MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_E, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_GOLD, SLOPE_S, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Diamond mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Iron ore Mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Fruit plantation */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Rubber plantation */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Water supply */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Water tower */
- MK(CT_INVALID, CT_INVALID, CT_WATER, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_WATER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Factory (sub-tropical) */
- MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP),
- MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP),
- MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP),
- MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP),
+ MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COPPER_ORE, CT_WOOD, CT_RUBBER, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Lumber mill */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Candyfloss forest */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, 130, INDUTILE_NOANIM, false), // Chopping candyfloss
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, 129, false), // Growing candyfloss
/* Sweet factory */
- MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP),
- MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP),
- MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP),
- MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP),
+ MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_COTTON_CANDY, CT_TOFFEE, CT_SUGAR, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Batter farm */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, 136, INDUTILE_NOANIM, false), // Reaping batteries
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, 135, false), // Growing batteries
/* Cola wells */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Toy shop */
- MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_TOYS, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Toy factory */
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
- MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BATTERIES, CT_INVALID, CT_PLASTIC, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Plastic Fountain */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Fizzy drink factory */
- MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP),
- MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP),
- MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP),
- MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP),
+ MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_BUBBLES, CT_INVALID, CT_COLA, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Bubble generator */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Toffee quarry */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
/* Sugar mine */
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
- MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
+ MK(CT_INVALID, CT_INVALID, CT_INVALID, SLOPE_STEEP, INDUTILE_NOANIM, INDUTILE_NOANIM, false),
};
#undef MK
--- a/src/table/cargo_const.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/cargo_const.h Mon Mar 26 22:15:38 2007 +0000
@@ -2,130 +2,130 @@
/* Table of all default cargo types */
-#define MK(bt, label, c, e, f, g, h, fr, ks1, ks2, ks3, ks4, ks5, l, m) \
- {bt, label, 0, c, c, e, f, {g, h}, fr, 0, 0, 0, ks1, ks2, ks3, ks4, ks5, l, m}
+#define MK(bt, label, c, e, f, g, h, fr, te, ks1, ks2, ks3, ks4, ks5, l, m) \
+ {bt, label, 0, c, c, e, f, {g, h}, fr, te, 0, 0, ks1, ks2, ks3, ks4, ks5, l, m, NULL}
static const CargoSpec _default_cargo[] = {
- MK( 0, 'PASS', 152, 1, 3185, 0, 24, false,
+ MK( 0, 'PASS', 152, 1, 3185, 0, 24, false, TE_PASSENGERS,
STR_000F_PASSENGERS, STR_002F_PASSENGER, STR_PASSENGERS, STR_QUANTITY_PASSENGERS, STR_ABBREV_PASSENGERS,
SPR_CARGO_PASSENGER, CC_PASSENGERS ),
- MK( 1, 'COAL', 32, 16, 5916, 7, 255, true,
+ MK( 1, 'COAL', 32, 16, 5916, 7, 255, true, TE_NONE,
STR_0010_COAL, STR_0030_COAL, STR_TONS, STR_QUANTITY_COAL, STR_ABBREV_COAL,
SPR_CARGO_COAL, CC_BULK ),
- MK( 2, 'MAIL', 15, 4, 4550, 20, 90, false,
+ MK( 2, 'MAIL', 15, 4, 4550, 20, 90, false, TE_MAIL,
STR_0011_MAIL, STR_0031_MAIL, STR_BAGS, STR_QUANTITY_MAIL, STR_ABBREV_MAIL,
SPR_CARGO_MAIL, CC_MAIL ),
- MK( 3, 'OIL_', 174, 16, 4437, 25, 255, true,
+ MK( 3, 'OIL_', 174, 16, 4437, 25, 255, true, TE_NONE,
STR_0012_OIL, STR_0032_OIL, STR_LITERS, STR_QUANTITY_OIL, STR_ABBREV_OIL,
SPR_CARGO_OIL, CC_LIQUID ),
- MK( 4, 'LVST', 208, 3, 4322, 4, 18, true,
+ MK( 4, 'LVST', 208, 3, 4322, 4, 18, true, TE_NONE,
STR_0013_LIVESTOCK, STR_0033_LIVESTOCK, STR_ITEMS, STR_QUANTITY_LIVESTOCK, STR_ABBREV_LIVESTOCK,
SPR_CARGO_LIVESTOCK, CC_PIECE_GOODS ),
- MK( 5, 'GOOD', 194, 8, 6144, 5, 28, true,
+ MK( 5, 'GOOD', 194, 8, 6144, 5, 28, true, TE_GOODS,
STR_0014_GOODS, STR_0034_GOODS, STR_CRATES, STR_QUANTITY_GOODS, STR_ABBREV_GOODS,
SPR_CARGO_GOODS, CC_EXPRESS ),
- MK( 6, 'GRAI', 191, 16, 4778, 4, 40, true,
+ MK( 6, 'GRAI', 191, 16, 4778, 4, 40, true, TE_NONE,
STR_0015_GRAIN, STR_0035_GRAIN, STR_TONS, STR_QUANTITY_GRAIN, STR_ABBREV_GRAIN,
SPR_CARGO_GRAIN, CC_BULK ),
- MK( 6, 'WHEA', 191, 16, 4778, 4, 40, true,
+ MK( 6, 'WHEA', 191, 16, 4778, 4, 40, true, TE_NONE,
STR_0022_WHEAT, STR_0042_WHEAT, STR_TONS, STR_QUANTITY_WHEAT, STR_ABBREV_WHEAT,
SPR_CARGO_GRAIN, CC_BULK ),
- MK( 6, 'MAIZ', 191, 6, 4778, 4, 40, true,
+ MK( 6, 'MAIZ', 191, 6, 4778, 4, 40, true, TE_NONE,
STR_001B_MAIZE, STR_003B_MAIZE, STR_TONS, STR_QUANTITY_MAIZE, STR_ABBREV_MAIZE,
SPR_CARGO_GRAIN, CC_BULK ),
- MK( 7, 'WOOD', 84, 16, 5005, 15, 255, true,
+ MK( 7, 'WOOD', 84, 16, 5005, 15, 255, true, TE_NONE,
STR_0016_WOOD, STR_0036_WOOD, STR_TONS, STR_QUANTITY_WOOD, STR_ABBREV_WOOD,
SPR_CARGO_WOOD, CC_PIECE_GOODS ),
- MK( 8, 'IORE', 184, 16, 5120, 9, 255, true,
+ MK( 8, 'IORE', 184, 16, 5120, 9, 255, true, TE_NONE,
STR_0017_IRON_ORE, STR_0037_IRON_ORE, STR_TONS, STR_QUANTITY_IRON_ORE, STR_ABBREV_IRON_ORE,
SPR_CARGO_IRON_ORE, CC_BULK ),
- MK( 9, 'STEL', 10, 16, 5688, 7, 255, true,
+ MK( 9, 'STEL', 10, 16, 5688, 7, 255, true, TE_NONE,
STR_0018_STEEL, STR_0038_STEEL, STR_TONS, STR_QUANTITY_STEEL, STR_ABBREV_STEEL,
SPR_CARGO_STEEL, CC_PIECE_GOODS ),
- MK( 10, 'VALU', 202, 2, 7509, 1, 32, true,
+ MK( 10, 'VALU', 202, 2, 7509, 1, 32, true, TE_NONE,
STR_0019_VALUABLES, STR_0039_VALUABLES, STR_BAGS, STR_QUANTITY_VALUABLES, STR_ABBREV_VALUABLES,
SPR_CARGO_VALUES_GOLD, CC_ARMOURED ),
- MK( 10, 'GOLD', 202, 8, 7509, 10, 40, true,
+ MK( 10, 'GOLD', 202, 8, 7509, 10, 40, true, TE_NONE,
STR_0020_GOLD, STR_0040_GOLD, STR_BAGS, STR_QUANTITY_GOLD, STR_ABBREV_GOLD,
SPR_CARGO_VALUES_GOLD, CC_ARMOURED ),
- MK( 10, 'DIAM', 202, 2, 7509, 10, 255, true,
+ MK( 10, 'DIAM', 202, 2, 7509, 10, 255, true, TE_NONE,
STR_001D_DIAMONDS, STR_003D_DIAMOND, STR_BAGS, STR_QUANTITY_DIAMONDS, STR_ABBREV_DIAMONDS,
SPR_CARGO_DIAMONDS, CC_ARMOURED ),
- MK( 11, 'PAPR', 10, 16, 5688, 7, 60, true,
+ MK( 11, 'PAPR', 10, 16, 5688, 7, 60, true, TE_NONE,
STR_001F_PAPER, STR_003F_PAPER, STR_TONS, STR_QUANTITY_PAPER, STR_ABBREV_PAPER,
SPR_CARGO_PAPER, CC_PIECE_GOODS ),
- MK( 12, 'FOOD', 48, 16, 5688, 0, 30, true,
+ MK( 12, 'FOOD', 48, 16, 5688, 0, 30, true, TE_FOOD,
STR_001E_FOOD, STR_003E_FOOD, STR_TONS, STR_QUANTITY_FOOD, STR_ABBREV_FOOD,
SPR_CARGO_FOOD, CC_EXPRESS | CC_REFRIGERATED),
- MK( 13, 'FRUT', 208, 6, 4322, 0, 15, true,
+ MK( 13, 'FRUT', 208, 6, 4322, 0, 15, true, TE_NONE,
STR_001C_FRUIT, STR_003C_FRUIT, STR_TONS, STR_QUANTITY_FRUIT, STR_ABBREV_FRUIT,
SPR_CARGO_FRUIT, CC_BULK | CC_REFRIGERATED),
- MK( 14, 'CORE', 184, 6, 5120, 12, 255, true,
+ MK( 14, 'CORE', 184, 6, 5120, 12, 255, true, TE_NONE,
STR_001A_COPPER_ORE, STR_003A_COPPER_ORE, STR_TONS, STR_QUANTITY_COPPER_ORE, STR_ABBREV_COPPER_ORE,
SPR_CARGO_COPPER_ORE, CC_BULK ),
- MK( 15, 'WATR', 10, 6, 5688, 20, 80, true,
+ MK( 15, 'WATR', 10, 6, 5688, 20, 80, true, TE_WATER,
STR_0021_WATER, STR_0041_WATER, STR_LITERS, STR_QUANTITY_WATER, STR_ABBREV_WATER,
SPR_CARGO_WATERCOLA, CC_LIQUID ),
- MK( 16, 'RUBR', 32, 6, 5916, 2, 20, true,
+ MK( 16, 'RUBR', 32, 6, 5916, 2, 20, true, TE_NONE,
STR_0023_RUBBER, STR_0043_RUBBER, STR_LITERS, STR_QUANTITY_RUBBER, STR_ABBREV_RUBBER,
SPR_CARGO_RUBBER, CC_LIQUID ),
- MK( 17, 'SUGR', 32, 16, 5916, 20, 255, true,
+ MK( 17, 'SUGR', 32, 16, 5916, 20, 255, true, TE_NONE,
STR_0024_SUGAR, STR_0044_SUGAR, STR_TONS, STR_QUANTITY_SUGAR, STR_ABBREV_SUGAR,
SPR_CARGO_SUGAR, CC_BULK ),
- MK( 18, 'TOYS', 174, 2, 4437, 25, 255, true,
+ MK( 18, 'TOYS', 174, 2, 4437, 25, 255, true, TE_NONE,
STR_0025_TOYS, STR_0045_TOY, STR_NOTHING, STR_QUANTITY_TOYS, STR_ABBREV_TOYS,
SPR_CARGO_TOYS, CC_PIECE_GOODS ),
- MK( 19, 'BATT', 208, 4, 4322, 2, 30, true,
+ MK( 19, 'BATT', 208, 4, 4322, 2, 30, true, TE_NONE,
STR_002B_BATTERIES, STR_004B_BATTERY, STR_NOTHING, STR_QUANTITY_BATTERIES, STR_ABBREV_BATTERIES,
SPR_CARGO_BATTERIES, CC_PIECE_GOODS ),
- MK( 20, 'SWET', 194, 5, 6144, 8, 40, true,
+ MK( 20, 'SWET', 194, 5, 6144, 8, 40, true, TE_GOODS,
STR_0026_CANDY, STR_0046_CANDY, STR_TONS, STR_QUANTITY_SWEETS, STR_ABBREV_SWEETS,
SPR_CARGO_CANDY, CC_EXPRESS ),
- MK( 21, 'TOFF', 191, 16, 4778, 14, 60, true,
+ MK( 21, 'TOFF', 191, 16, 4778, 14, 60, true, TE_NONE,
STR_002A_TOFFEE, STR_004A_TOFFEE, STR_TONS, STR_QUANTITY_TOFFEE, STR_ABBREV_TOFFEE,
SPR_CARGO_TOFFEE, CC_BULK ),
- MK( 22, 'COLA', 84, 16, 5005, 5, 75, true,
+ MK( 22, 'COLA', 84, 16, 5005, 5, 75, true, TE_NONE,
STR_0027_COLA, STR_0047_COLA, STR_LITERS, STR_QUANTITY_COLA, STR_ABBREV_COLA,
SPR_CARGO_WATERCOLA, CC_LIQUID ),
- MK( 23, 'CTCD', 184, 16, 5120, 10, 25, true,
+ MK( 23, 'CTCD', 184, 16, 5120, 10, 25, true, TE_NONE,
STR_0028_COTTON_CANDY, STR_0048_COTTON_CANDY, STR_TONS, STR_QUANTITY_CANDYFLOSS, STR_ABBREV_CANDYFLOSS,
SPR_CARGO_COTTONCANDY, CC_BULK ),
- MK( 24, 'BUBL', 10, 1, 5688, 20, 80, true,
+ MK( 24, 'BUBL', 10, 1, 5688, 20, 80, true, TE_NONE,
STR_0029_BUBBLES, STR_0049_BUBBLE, STR_NOTHING, STR_QUANTITY_BUBBLES, STR_ABBREV_BUBBLES,
SPR_CARGO_BUBBLES, CC_PIECE_GOODS ),
- MK( 25, 'PLST', 202, 16, 7509, 30, 255, true,
+ MK( 25, 'PLST', 202, 16, 7509, 30, 255, true, TE_NONE,
STR_002C_PLASTIC, STR_004C_PLASTIC, STR_LITERS, STR_QUANTITY_PLASTIC, STR_ABBREV_PLASTIC,
SPR_CARGO_PLASTIC, CC_LIQUID ),
- MK( 26, 'FZDR', 48, 2, 5688, 30, 50, true,
+ MK( 26, 'FZDR', 48, 2, 5688, 30, 50, true, TE_FOOD,
STR_002D_FIZZY_DRINKS, STR_004D_FIZZY_DRINK, STR_NOTHING, STR_QUANTITY_FIZZY_DRINKS, STR_ABBREV_FIZZY_DRINKS,
SPR_CARGO_FIZZYDRINK, CC_PIECE_GOODS ),
--- a/src/table/engines.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/engines.h Mon Mar 26 22:15:38 2007 +0000
@@ -553,9 +553,9 @@
AVI( 4, 26, 210, J, SND_09_JET, 40, 74, 20, 220 ), /* 21 */
AVI( 6, 16, 125, P, SND_09_JET, 50, 74, 10, 80 ), /* 22 */
AVI( 2, 17, 145, P, SND_09_JET, 40, 74, 10, 85 ), /* 23 */
- AVI( 11, 16, 130, J, SND_09_JET, 40, 74, 10, 75 ), /* 24 */
- AVI( 10, 16, 149, J, SND_09_JET, 40, 74, 10, 85 ), /* 25 */
- AVI( 15, 17, 170, J, SND_09_JET, 40, 74, 18, 65 ), /* 26 */
+ AVI( 11, 16, 130, P, SND_09_JET, 40, 74, 10, 75 ), /* 24 */
+ AVI( 10, 16, 149, P, SND_09_JET, 40, 74, 10, 85 ), /* 25 */
+ AVI( 15, 17, 170, P, SND_09_JET, 40, 74, 18, 65 ), /* 26 */
AVI( 12, 18, 210, J, SND_09_JET, 40, 74, 25, 110 ), /* 27 */
AVI( 13, 20, 230, J, SND_09_JET, 40, 74, 60, 180 ), /* 28 */
AVI( 14, 21, 220, J, SND_09_JET, 40, 74, 65, 150 ), /* 29 */
--- a/src/table/industry_land.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/industry_land.h Mon Mar 26 22:15:38 2007 +0000
@@ -1,5 +1,7 @@
/* $Id$ */
+/** @file industry_land.h */
+
struct DrawIndustrySpec1Struct {
byte x;
byte image_1;
@@ -718,6 +720,7 @@
M( 0xf8d, PAL_NONE, 0x12a5 | (1 << PALETTE_MODIFIER_COLOR), PAL_NONE, 0, 0, 16, 16, 50, 1),
};
+/* this is ONLY used for Sugar Mine*/
static const DrawIndustrySpec1Struct _draw_industry_spec1[96] = {
{ 8, 4, 0, 0},
{ 6, 0, 1, 0},
@@ -817,14 +820,17 @@
{ 10, 4, 0, 4},
};
+/* this is ONLY used for Sugar Mine*/
static const byte _drawtile_proc1_x[5] = {
22, 17, 14, 10, 8
};
+/* this is ONLY used for Sugar Mine*/
static const byte _drawtile_proc1_y[5] = {
73, 70, 69, 66, 41
};
+/* this is ONLY used for Toy Factory*/
static const DrawIndustrySpec4Struct _industry_anim_offs_3[] = {
{255, 255, 0},
{ 0, 255, 0},
@@ -878,6 +884,7 @@
{255, 255, 0},
};
+/* this is ONLY used for Toffee Quarry*/
static const byte _industry_anim_offs[] = {
255, 0, 0, 0, 2, 4, 6, 8, 10, 9,
7, 5, 3, 1, 255, 0, 0, 0, 2, 4,
@@ -888,6 +895,7 @@
2, 4, 6, 8, 10, 9, 7, 5, 3, 1
};
+/* this is ONLY used for the Bubble Generator*/
static const byte _industry_anim_offs_2[] = {
68, 69, 71, 74, 77, 80, 83, 85, 86, 86,
86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
@@ -895,100 +903,6 @@
77, 76, 75, 74, 73, 72, 71, 70, 69, 68,
};
+/* those are ONLY used for Power Station*/
static const byte _coal_plant_sparks_x[] = {11, 11, 14, 13, 18, 15};
static const byte _coal_plant_sparks_y[] = {23, 11, 6, 3, 1, 0};
-
-#define N 255
-/**
- * Next frame in an animation
- * The indices into this table are the ones as described by
- * the enum with GFX_*s in industry_map.h.
- */
-static const byte _industry_section_animation_next[NUM_INDUSTRY_GFXES] = {
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, 16, N, N, N, N, N, N, // <- growing forest
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, 129, N, N, N, N, N, // <- growing candyfloss
-135, N, N, N, N, N, N, N, // <- 'growing' batteries
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N,
-};
-
-/**
- * Animation to start when goods is produced
- * The indices into this table are the ones as described by
- * the enum with GFX_*s in industry_map.h.
- */
-static const byte _industry_produce_section[NUM_INDUSTRY_GFXES] = {
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-17, N, N, N, N, N, N, N, // <- chopping forest
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, 130, N, N, N, N, N, 136, // <- chopping candyfloss and reaping batteries
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N, N,
-N, N, N, N, N, N, N,
-};
-
-#undef N
-
-
-/**
- * When true, the tile has to be drawn using the animation
- * state instead of the construction state.
- * The indices into this table are the ones as described by
- * the enum with GFX_*s in industry_map.h.
- */
-static const bool _industry_section_draw_animation_state[NUM_INDUSTRY_GFXES] = {
- false, true, false, false, false, false, false, false, // <- animated wheel tower of coal mine
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, true, true, // <- animated oil well
- true, false, false, false, false, false, false, false, // <- animated oil well
- false, false, false, false, false, false, false, false,
- true, false, false, false, false, false, false, false, // <- animated wheel tower of copper mine
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- true, false, false, false, false, false, false, false, // <- animated wheel tower of gold mine
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false,
-};
--- a/src/table/sprites.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/sprites.h Mon Mar 26 22:15:38 2007 +0000
@@ -35,7 +35,6 @@
* @todo Split the "Sprites" enum into smaller chunks and document them
*/
-
enum Sprites {
SPR_SELECT_TILE = 752,
SPR_DOT = 774, // corner marker for lower/raise land
@@ -1324,6 +1323,7 @@
*/
enum Modifiers {
SPRITE_MODIFIER_USE_OFFSET = OFFSET_BIT,
+ SPRITE_MODIFIER_OPAQUE = OFFSET_BIT,
///when a sprite is to be displayed transparently, this bit needs to be set.
PALETTE_MODIFIER_TRANSPARENT = TRANSPARENT_BIT,
///this bit is set when a recoloring process is in action
@@ -1418,6 +1418,5 @@
PALETTE_59E = 0x59E,
PALETTE_59F = 0x59F,
};
-#undef PALETTE_RECOLOR_SPRITE
#endif /* SPRITES_H */
--- a/src/table/town_land.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/table/town_land.h Mon Mar 26 22:15:38 2007 +0000
@@ -2,17 +2,6 @@
/** @file town_land.h */
-enum {
- HOUSE_TEMP_CHURCH = 0x03,
- HOUSE_STADIUM = 0x14,
- HOUSE_MODERN_STADIUM = 0x20,
- HOUSE_ARCT_CHURCH = 0x3c,
- HOUSE_SNOW_CHURCH = 0x3d,
- HOUSE_TROP_CHURCH = 0x53,
- HOUSE_TOY_CHURCH = 0x5b,
-
- HOUSE_MAX = 110
-};
/** Writes the data into the Town Tile Drawing Struct
* @param s1 The first sprite of the building, mostly the ground sprite
@@ -1790,437 +1779,485 @@
M(0x1244, PAL_NONE, 0x125a, PAL_NONE, 0, 0, 16, 16, 50, 0),
};
#undef M
-// 4 variants * 4 build stages
-assert_compile(lengthof(_town_draw_tile_data) == HOUSE_MAX * 4 * 4);
-
-
-static const StringID _town_tile_names[] = {
- STR_200F_TALL_OFFICE_BLOCK,
- STR_2010_OFFICE_BLOCK,
- STR_2011_SMALL_BLOCK_OF_FLATS,
- STR_2012_CHURCH,
- STR_2013_LARGE_OFFICE_BLOCK,
- STR_2013_LARGE_OFFICE_BLOCK,
- STR_2014_TOWN_HOUSES,
- STR_2015_HOTEL,
- STR_2015_HOTEL,
- STR_2016_STATUE,
- STR_2017_FOUNTAIN,
- STR_2018_PARK,
- STR_2018_PARK,
- STR_2019_OFFICE_BLOCK,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201B_MODERN_OFFICE_BUILDING,
- STR_201C_WAREHOUSE,
- STR_201D_OFFICE_BLOCK,
- STR_201E_STADIUM,
- STR_201E_STADIUM,
- STR_201E_STADIUM,
- STR_201E_STADIUM,
- STR_201F_OLD_HOUSES,
- STR_2036_COTTAGES,
- STR_2037_HOUSES,
- STR_2038_FLATS,
- STR_2039_TALL_OFFICE_BLOCK,
- STR_203A_SHOPS_AND_OFFICES,
- STR_203B_SHOPS_AND_OFFICES,
- STR_203C_THEATER,
- STR_203D_STADIUM,
- STR_203D_STADIUM,
- STR_203D_STADIUM,
- STR_203D_STADIUM,
- STR_203E_OFFICES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_2040_CINEMA,
- STR_2041_SHOPPING_MALL,
- STR_2041_SHOPPING_MALL,
- STR_2041_SHOPPING_MALL,
- STR_2041_SHOPPING_MALL,
- STR_2038_FLATS,
- STR_2038_FLATS,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_2012_CHURCH,
- STR_2012_CHURCH,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_2015_HOTEL,
- STR_2015_HOTEL,
- STR_2015_HOTEL,
- STR_2015_HOTEL,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_2038_FLATS,
- STR_2012_CHURCH,
- STR_203F_HOUSES,
- STR_2038_FLATS,
- STR_2038_FLATS,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_2038_FLATS,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_2012_CHURCH,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_203F_HOUSES,
- STR_203F_HOUSES,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_2059_IGLOO,
- STR_205A_TEPEES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_201A_SHOPS_AND_OFFICES,
- STR_200F_TALL_OFFICE_BLOCK,
- STR_2016_STATUE,
- STR_205B_TEAPOT_HOUSE,
- STR_205C_PIGGY_BANK,
-};
-assert_compile(lengthof(_town_tile_names) == HOUSE_MAX);
-
-static const uint16 _housetype_flags[] = {
- 0x1010, 0x1018, 0x100E, 0x100F, 0x7010, 0x0810, 0x100F, 0x1014,
- 0x0000, 0x7018, 0x7010, 0x1004, 0x1008, 0x1018, 0x101C, 0x101C,
- 0x101C, 0x7010, 0x1010, 0x1010, 0x100F, 0x0000, 0x0000, 0x0000,
- 0x1003, 0x1001, 0x100F, 0x101C, 0x101C, 0x101C, 0x5014, 0x1018,
- 0x700F, 0x0000, 0x0000, 0x0000, 0x7018, 0x2003, 0x0803, 0x101C,
- 0x101E, 0x0000, 0x0000, 0x0000, 0x201C, 0x081C, 0x200F, 0x080F,
- 0x2007, 0x0807, 0x6018, 0x0818, 0x2018, 0x0818, 0x6018, 0x0818,
- 0x2001, 0x0801, 0x201E, 0x081E, 0x200F, 0x080F, 0x2007, 0x0807,
- 0x201C, 0x081C, 0x201C, 0x0000, 0x081C, 0x0000, 0x601C, 0x081C,
- 0x2018, 0x0818, 0x201C, 0x0000, 0x081C, 0x0000, 0x401E, 0x401E,
- 0x401E, 0x4001, 0x401C, 0x400E, 0x401E, 0x401C, 0x401C, 0x4018,
- 0x4000, 0x401C, 0x4018, 0x801F, 0x801F, 0x8003, 0x800F, 0x800F,
- 0x800F, 0x800F, 0x801C, 0x801F, 0x0000, 0x801C, 0x8001, 0x8001,
- 0x801C, 0x801C, 0x801C, 0x801C, 0x801F, 0x801F,
-};
-assert_compile(lengthof(_housetype_flags) == HOUSE_MAX);
-
-static const byte _housetype_extra_flags[] = {
- 0, 0, 0, 0, 32, 32, 0, 8,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 16, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 16, 0, 0, 0, 0, 0, 0, 0,
- 16, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 0, 8, 0, 0, 0,
- 0, 0, 4, 0, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 8, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,
-};
-assert_compile(lengthof(_housetype_extra_flags) == HOUSE_MAX);
-
-static const byte _housetype_population[] = {
- 187, 85, 40, 5, 220, 220, 30, 140,
- 0, 0, 0, 0, 0, 150, 95, 95,
- 95, 130, 6, 110, 65, 0, 0, 0,
- 15, 12, 13, 100, 170, 100, 180, 35,
- 65, 0, 0, 0, 140, 15, 15, 35,
- 180, 0, 0, 0, 80, 80, 16, 16,
- 14, 14, 135, 135, 170, 170, 210, 210,
- 10, 10, 25, 25, 6, 6, 17, 17,
- 90, 90, 140, 0, 140, 0, 105, 105,
- 190, 190, 250, 0, 250, 0, 16, 16,
- 16, 7, 45, 8, 18, 90, 120, 250,
- 0, 80, 180, 8, 18, 7, 15, 17,
- 19, 21, 75, 35, 0, 85, 11, 10,
- 67, 86, 95, 30, 25, 18,
-};
-assert_compile(lengthof(_housetype_population) == HOUSE_MAX);
-
-static const byte _housetype_mailamount[] = {
- 70, 55, 20, 2, 85, 85, 12, 22,
- 22, 0, 0, 0, 0, 65, 48, 48,
- 48, 50, 10, 55, 5, 5, 5, 5,
- 6, 7, 8, 35, 50, 40, 64, 23,
- 5, 5, 5, 5, 65, 6, 6, 23,
- 5, 5, 5, 5, 20, 20, 6, 6,
- 6, 6, 60, 60, 70, 70, 80, 80,
- 5, 5, 20, 20, 2, 2, 7, 7,
- 45, 45, 25, 25, 25, 25, 50, 50,
- 75, 75, 60, 60, 60, 60, 6, 6,
- 5, 4, 15, 3, 7, 24, 25, 80,
- 80, 23, 90, 3, 5, 3, 6, 6,
- 6, 6, 20, 9, 0, 18, 3, 3,
- 22, 23, 28, 10, 8, 7,
-};
-assert_compile(lengthof(_housetype_mailamount) == HOUSE_MAX);
-
-static const byte _housetype_remove_cost[] = {
- 150, 140, 100, 90, 160, 160, 80, 180,
- 180, 65, 65, 60, 60, 130, 110, 105,
- 107, 200, 145, 155, 250, 250, 250, 250,
- 70, 75, 71, 135, 145, 132, 155, 220,
- 250, 250, 250, 250, 170, 70, 70, 210,
- 250, 250, 250, 250, 100, 100, 70, 70,
- 80, 80, 150, 150, 170, 170, 200, 200,
- 60, 60, 100, 100, 85, 85, 80, 80,
- 140, 140, 160, 160, 160, 160, 130, 130,
- 190, 190, 140, 140, 140, 140, 80, 80,
- 80, 30, 130, 90, 80, 110, 120, 190,
- 190, 110, 180, 90, 90, 70, 80, 80,
- 80, 80, 160, 90, 90, 150, 60, 60,
- 140, 145, 165, 90, 75, 85,
-};
-assert_compile(lengthof(_housetype_remove_cost) == HOUSE_MAX);
+/* 4 variants * 4 build stages */
+assert_compile(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4);
-static const uint16 _housetype_remove_ratingmod[] = {
- 140, 130, 90, 230, 160, 160, 80, 150,
- 150, 40, 40, 75, 75, 110, 100, 100,
- 100, 150, 110, 110, 300, 300, 300, 300,
- 75, 75, 75, 100, 170, 135, 180, 230,
- 300, 300, 300, 300, 250, 75, 75, 230,
- 300, 300, 300, 300, 90, 90, 70, 70,
- 70, 70, 120, 120, 130, 130, 140, 140,
- 60, 60, 80, 80, 230, 230, 80, 80,
- 110, 110, 160, 160, 160, 160, 105, 105,
- 135, 135, 200, 200, 200, 200, 80, 80,
- 80, 30, 95, 200, 80, 95, 95, 140,
- 140, 95, 150, 200, 90, 50, 75, 75,
- 75, 75, 130, 80, 80, 130, 45, 45,
- 130, 130, 130, 70, 65, 95,
-};
-assert_compile(lengthof(_housetype_remove_ratingmod) == HOUSE_MAX);
-
-
-struct HousetypeYear {
- Year min, max;
+/** Describes the data that defines each house in the game
+ * @param mnd introduction year of the house
+ * @param mxd last year it can be built
+ * @param p population
+ * @param rc cost multiplier for removing it
+ * @param bn building name
+ * @param rr rating decrease if removed
+ * @param mg mail generation multiplier
+ * @param ca1 acceptance for 1st CargoID
+ * @param ca2 acceptance for 2nd CargoID
+ * @param ca3 acceptance for 3rd CargoID
+ * @param bf building flags (size, stadium etc...)
+ * @param ba building availability (zone, climate...)
+ * @param cg1 1st CargoID available
+ * @param cg2 2nd CargoID available
+ * @param cg3 3rd CargoID available
+ * @see HouseSpec
+ */
+#define M(mnd, mxd, p, rc, bn, rr, mg, ca1, ca2, ca3, bf, ba, cg1, cg2, cg3) \
+ {mnd, mxd, p, rc, bn, rr, mg, {ca1, ca2, ca3}, {cg1, cg2, cg3}, bf, ba, true, \
+ 0, NULL, 0, 0, {0, 0, 0, 0}, 16, NO_EXTRA_FLAG, HOUSE_NO_CLASS, 0, 2, 0, 0, NULL}
+static const HouseSpec _original_house_specs[] = {
+ /**
+ * remove_rating_decrease
+ * | mail_generation
+ * min_date | | 1st CargoID acceptance
+ * | max_date | | | 2nd CargoID acceptance
+ * | | population | | | | 3th CargoID acceptance
+ * | | | removal_cost | | | | |
+ * | | | | building_name | | | | |
+ * | | | | | | | | | |
+ * | | | | | | | | | |
+ * +-building_flags | | | | | | | |
+ * +-building_availability | | | | | | |
+ * +-cargoID accepted | | | | | | | |
+ * | | | | | | | | | | | */
+ M( 1963, MAX_YEAR, 187, 150, STR_200F_TALL_OFFICE_BLOCK, 140, 70, 8, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //00
+ M( 1957, MAX_YEAR, 85, 140, STR_2010_OFFICE_BLOCK, 130, 55, 8, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //01
+ M( 1968, MAX_YEAR, 40, 100, STR_2011_SMALL_BLOCK_OF_FLATS, 90, 20, 8, 3, 1,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //02
+ M( 0, MAX_YEAR, 5, 90, STR_2012_CHURCH, 230, 2, 2, 0, 0,
+ BUILDING_IS_CHURCH | TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //03
+ M( 1975, MAX_YEAR, 220, 160, STR_2013_LARGE_OFFICE_BLOCK, 160, 85, 10, 4, 6,
+ BUILDING_IS_ANIMATED | TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //04
+ M( 1975, MAX_YEAR, 220, 160, STR_2013_LARGE_OFFICE_BLOCK, 160, 85, 10, 4, 6,
+ BUILDING_IS_ANIMATED | TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //05
+ M( 0, MAX_YEAR, 30, 80, STR_2014_TOWN_HOUSES, 80, 12, 4, 1, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //06
+ M( 1959, MAX_YEAR, 140, 180, STR_2015_HOTEL, 150, 22, 6, 1, 2,
+ TILE_SIZE_1x2,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //07
+ M( 1959, MAX_YEAR, 0, 180, STR_2015_HOTEL, 150, 22, 6, 1, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //08
+ M( 1945, MAX_YEAR, 0, 65, STR_2016_STATUE, 40, 0, 2, 0, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //09
+ M( 1945, MAX_YEAR, 0, 65, STR_2017_FOUNTAIN, 40, 0, 2, 0, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0A
+ M( 0, MAX_YEAR, 0, 60, STR_2018_PARK, 75, 0, 2, 0, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0B
+ M( 1935, MAX_YEAR, 0, 60, STR_2018_PARK, 75, 0, 2, 0, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0C
+ M( 1951, MAX_YEAR, 150, 130, STR_2019_OFFICE_BLOCK, 110, 65, 8, 2, 4,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0D
+ M( 1930, 1960, 95, 110, STR_201A_SHOPS_AND_OFFICES, 100, 48, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0E
+ M( 1930, 1960, 95, 105, STR_201A_SHOPS_AND_OFFICES, 100, 48, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //0F
+ M( 1930, 1960, 95, 107, STR_201A_SHOPS_AND_OFFICES, 100, 48, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //10
+ M( 1977, MAX_YEAR, 130, 200, STR_201B_MODERN_OFFICE_BUILDING, 150, 50, 10, 3, 6,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //11
+ M( 1983, MAX_YEAR, 6, 145, STR_201C_WAREHOUSE, 110, 10, 6, 3, 8,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //12
+ M( 1985, MAX_YEAR, 110, 155, STR_201D_OFFICE_BLOCK, 110, 55, 6, 2, 6,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //13
+ M( 0, MAX_YEAR, 65, 250, STR_201E_STADIUM, 300, 5, 4, 0, 0,
+ BUILDING_IS_STADIUM | TILE_SIZE_2x2,
+ HZ_TEMP | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //14
+ M( 0, MAX_YEAR, 0, 250, STR_201E_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //15
+ M( 0, MAX_YEAR, 0, 250, STR_201E_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //16
+ M( 0, MAX_YEAR, 0, 250, STR_201E_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //17
+ M( 0, 1951, 15, 70, STR_201F_OLD_HOUSES, 75, 6, 3, 1, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //18
+ M( 0, 1952, 12, 75, STR_2036_COTTAGES, 75, 7, 3, 1, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //19
+ M( 1931, MAX_YEAR, 13, 71, STR_2037_HOUSES, 75, 8, 3, 1, 0,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1A
+ M( 1935, MAX_YEAR, 100, 135, STR_2038_FLATS, 100, 35, 7, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1B
+ M( 1963, MAX_YEAR, 170, 145, STR_2039_TALL_OFFICE_BLOCK, 170, 50, 8, 3, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1C
+ M( 0, 1955, 100, 132, STR_203A_SHOPS_AND_OFFICES, 135, 40, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1D
+ M( 1973, MAX_YEAR, 180, 155, STR_203B_SHOPS_AND_OFFICES, 180, 64, 8, 3, 3,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1E
+ M( 0, MAX_YEAR, 35, 220, STR_203C_THEATER, 230, 23, 8, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //1F
+ M( 1958, MAX_YEAR, 65, 250, STR_203D_STADIUM, 300, 5, 4, 0, 0,
+ BUILDING_IS_STADIUM | TILE_SIZE_2x2,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //20
+ M( 1958, MAX_YEAR, 0, 250, STR_203D_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //21
+ M( 1958, MAX_YEAR, 0, 250, STR_203D_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //22
+ M( 1958, MAX_YEAR, 0, 250, STR_203D_STADIUM, 300, 5, 4, 0, 0,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //23
+ M( 2000, MAX_YEAR, 140, 170, STR_203E_OFFICES, 250, 65, 8, 3, 2,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //24
+ M( 0, 1960, 15, 70, STR_203F_HOUSES, 75, 6, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //25
+ M( 0, 1960, 15, 70, STR_203F_HOUSES, 75, 6, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //26
+ M( 1945, MAX_YEAR, 35, 210, STR_2040_CINEMA, 230, 23, 8, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //27
+ M( 1983, MAX_YEAR, 180, 250, STR_2041_SHOPPING_MALL, 300, 5, 8, 2, 3,
+ TILE_SIZE_2x2,
+ HZ_TEMP | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 |HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //28
+ M( 1983, MAX_YEAR, 0, 250, STR_2041_SHOPPING_MALL, 300, 5, 8, 2, 3,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //29
+ M( 1983, MAX_YEAR, 0, 250, STR_2041_SHOPPING_MALL, 300, 5, 8, 2, 3,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //2A
+ M( 1983, MAX_YEAR, 0, 250, STR_2041_SHOPPING_MALL, 300, 5, 8, 2, 3,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //2B
+ M( 0, MAX_YEAR, 80, 100, STR_2038_FLATS, 90, 20, 5, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //2C
+ M( 0, MAX_YEAR, 80, 100, STR_2038_FLATS, 90, 20, 5, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //2D
+ M( 0, MAX_YEAR, 16, 70, STR_203F_HOUSES, 70, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //2E
+ M( 0, MAX_YEAR, 16, 70, STR_203F_HOUSES, 70, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //2F
+ M( 0, 1963, 14, 80, STR_203F_HOUSES, 70, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //30
+ M( 0, 1963, 14, 80, STR_203F_HOUSES, 70, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //31
+ M( 1966, MAX_YEAR, 135, 150, STR_200F_TALL_OFFICE_BLOCK, 120, 60, 8, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //32
+ M( 1966, MAX_YEAR, 135, 150, STR_200F_TALL_OFFICE_BLOCK, 120, 60, 8, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //33
+ M( 1970, MAX_YEAR, 170, 170, STR_200F_TALL_OFFICE_BLOCK, 130, 70, 9, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //34
+ M( 1970, MAX_YEAR, 170, 170, STR_200F_TALL_OFFICE_BLOCK, 130, 70, 9, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //35
+ M( 1974, MAX_YEAR, 210, 200, STR_200F_TALL_OFFICE_BLOCK, 140, 80, 10, 3, 5,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //36
+ M( 1974, MAX_YEAR, 210, 200, STR_200F_TALL_OFFICE_BLOCK, 140, 80, 10, 3, 5,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //37
+ M( 0, MAX_YEAR, 10, 60, STR_203F_HOUSES, 60, 5, 2, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //38
+ M( 0, MAX_YEAR, 10, 60, STR_203F_HOUSES, 60, 5, 2, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //39
+ M( 0, MAX_YEAR, 25, 100, STR_201A_SHOPS_AND_OFFICES, 80, 20, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //3A
+ M( 0, MAX_YEAR, 25, 100, STR_201A_SHOPS_AND_OFFICES, 80, 20, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //3B
+ M( 0, MAX_YEAR, 6, 85, STR_2012_CHURCH, 230, 2, 2, 0, 0,
+ BUILDING_IS_CHURCH | TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //3C
+ M( 0, MAX_YEAR, 6, 85, STR_2012_CHURCH, 230, 2, 2, 0, 0,
+ BUILDING_IS_CHURCH | TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //3D
+ M( 0, MAX_YEAR, 17, 80, STR_203F_HOUSES, 80, 7, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //3E
+ M( 0, MAX_YEAR, 17, 80, STR_203F_HOUSES, 80, 7, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //3F
+ M( 0, 1960, 90, 140, STR_201A_SHOPS_AND_OFFICES, 110, 45, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //40
+ M( 0, 1960, 90, 140, STR_201A_SHOPS_AND_OFFICES, 110, 45, 6, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //41
+ M( 1972, MAX_YEAR, 140, 160, STR_2015_HOTEL, 160, 25, 6, 1, 3,
+ TILE_SIZE_1x2,
+ HZ_SUBARTC_BELOW| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //42
+ M( 1972, MAX_YEAR, 0, 160, STR_2015_HOTEL, 160, 25, 6, 1, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //43
+ M( 1972, MAX_YEAR, 140, 160, STR_2015_HOTEL, 160, 25, 6, 1, 3,
+ TILE_SIZE_1x2,
+ HZ_SUBARTC_ABOVE| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //44
+ M( 1972, MAX_YEAR, 0, 160, STR_2015_HOTEL, 160, 25, 6, 1, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //45
+ M( 1963, MAX_YEAR, 105, 130, STR_201A_SHOPS_AND_OFFICES, 105, 50, 7, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //46
+ M( 1963, MAX_YEAR, 105, 130, STR_201A_SHOPS_AND_OFFICES, 105, 50, 7, 2, 3,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //47
+ M( 1978, MAX_YEAR, 190, 190, STR_200F_TALL_OFFICE_BLOCK, 135, 75, 9, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_BELOW | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //48
+ M( 1978, MAX_YEAR, 190, 190, STR_200F_TALL_OFFICE_BLOCK, 135, 75, 9, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //49
+ M( 1967, MAX_YEAR, 250, 140, STR_200F_TALL_OFFICE_BLOCK, 200, 60, 7, 2, 2,
+ TILE_SIZE_2x1,
+ HZ_SUBARTC_BELOW| HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //4A
+ M( 1967, MAX_YEAR, 0, 140, STR_200F_TALL_OFFICE_BLOCK, 200, 60, 7, 2, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //4B
+ M( 1967, MAX_YEAR, 250, 140, STR_200F_TALL_OFFICE_BLOCK, 200, 60, 7, 2, 2,
+ TILE_SIZE_2x1,
+ HZ_SUBARTC_ABOVE | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //4C
+ M( 1967, MAX_YEAR, 0, 140, STR_200F_TALL_OFFICE_BLOCK, 200, 60, 7, 2, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //4D
+ M( 0, MAX_YEAR, 16, 80, STR_203F_HOUSES, 80, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //4E
+ M( 0, MAX_YEAR, 16, 80, STR_203F_HOUSES, 80, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //4F
+ M( 0, MAX_YEAR, 16, 80, STR_203F_HOUSES, 80, 5, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //50
+ M( 0, MAX_YEAR, 7, 30, STR_203F_HOUSES, 30, 4, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //51
+ M( 0, MAX_YEAR, 45, 130, STR_2038_FLATS, 95, 15, 6, 2, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //52
+ M( 0, MAX_YEAR, 8, 90, STR_2012_CHURCH, 200, 3, 2, 0, 0,
+ BUILDING_IS_CHURCH | TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //53
+ M( 0, MAX_YEAR, 18, 80, STR_203F_HOUSES, 80, 7, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2,
+ CT_PASSENGERS, CT_MAIL, CT_FOOD), //54
+ M( 1973, MAX_YEAR, 90, 110, STR_2038_FLATS, 95, 24, 6, 2, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //55
+ M( 1962, MAX_YEAR, 120, 120, STR_2038_FLATS, 95, 25, 6, 2, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //56
+ M( 1984, MAX_YEAR, 250, 190, STR_200F_TALL_OFFICE_BLOCK, 140, 80, 8, 3, 4,
+ TILE_SIZE_2x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //57
+ M( 1984, MAX_YEAR, 0, 190, STR_200F_TALL_OFFICE_BLOCK, 140, 80, 8, 3, 4,
+ TILE_NO_FLAG,
+ HZ_SUBTROPIC,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //58
+ M( 0, MAX_YEAR, 80, 110, STR_2038_FLATS, 95, 23, 6, 2, 1,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //59
+ M( 1993, MAX_YEAR, 180, 180, STR_200F_TALL_OFFICE_BLOCK, 150, 90, 8, 3, 4,
+ TILE_SIZE_1x1,
+ HZ_SUBTROPIC | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_GOODS), //5A
+ M( 0, MAX_YEAR, 8, 90, STR_2012_CHURCH, 200, 3, 2, 0, 0,
+ BUILDING_IS_CHURCH | TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //5B
+ M( 0, MAX_YEAR, 18, 90, STR_203F_HOUSES, 90, 5, 6, 2, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //5C
+ M( 0, MAX_YEAR, 7, 70, STR_203F_HOUSES, 50, 3, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //5D
+ M( 0, MAX_YEAR, 15, 80, STR_203F_HOUSES, 75, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //5E
+ M( 0, MAX_YEAR, 17, 80, STR_203F_HOUSES, 75, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //5F
+ M( 0, MAX_YEAR, 19, 80, STR_203F_HOUSES, 75, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //60
+ M( 0, MAX_YEAR, 21, 80, STR_203F_HOUSES, 75, 6, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //61
+ M( 0, MAX_YEAR, 75, 160, STR_200F_TALL_OFFICE_BLOCK, 130, 20, 8, 4, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //62
+ M( 0, MAX_YEAR, 35, 90, STR_203F_HOUSES, 80, 9, 4, 1, 2,
+ TILE_SIZE_1x2,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //63
+ M( 0, MAX_YEAR, 0, 90, STR_203F_HOUSES, 80, 0, 4, 1, 2,
+ TILE_NO_FLAG,
+ HZ_NOZNS,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //64
+ M( 0, MAX_YEAR, 85, 150, STR_200F_TALL_OFFICE_BLOCK, 130, 18, 8, 4, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //65
+ M( 0, MAX_YEAR, 11, 60, STR_2059_IGLOO, 45, 3, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //66
+ M( 0, MAX_YEAR, 10, 60, STR_205A_TEPEES, 45, 3, 3, 1, 1,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //67
+ M( 0, MAX_YEAR, 67, 140, STR_201A_SHOPS_AND_OFFICES, 130, 22, 8, 4, 4,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FIZZY_DRINKS), //68
+ M( 0, MAX_YEAR, 86, 145, STR_201A_SHOPS_AND_OFFICES, 130, 23, 8, 4, 4,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_FIZZY_DRINKS), //69
+ M( 0, MAX_YEAR, 95, 165, STR_200F_TALL_OFFICE_BLOCK, 130, 28, 8, 4, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //6A
+ M( 0, MAX_YEAR, 30, 90, STR_2016_STATUE, 70, 10, 4, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //6B
+ M( 0, MAX_YEAR, 25, 75, STR_205B_TEAPOT_HOUSE, 65, 8, 3, 1, 2,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_CANDY), //6C
+ M( 0, MAX_YEAR, 18, 85, STR_205C_PIGGY_BANK, 95, 7, 3, 2, 4,
+ TILE_SIZE_1x1,
+ HZ_TOYLND | HZ_ZON5 | HZ_ZON4 | HZ_ZON3 | HZ_ZON2 | HZ_ZON1,
+ CT_PASSENGERS, CT_MAIL, CT_FIZZY_DRINKS), //6D
};
-
-static const HousetypeYear _housetype_years[] = {
- { 1963, MAX_YEAR },
- { 1957, MAX_YEAR },
- { 1968, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1975, MAX_YEAR },
- { 1975, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1959, MAX_YEAR },
- { 1959, MAX_YEAR },
- { 1945, MAX_YEAR },
- { 1945, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1935, MAX_YEAR },
- { 1951, MAX_YEAR },
- { 1930, 1960 },
- { 1930, 1960 },
- { 1930, 1960 },
- { 1977, MAX_YEAR },
- { 1983, MAX_YEAR },
- { 1985, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, 1951 },
- { 0, 1952 },
- { 1931, MAX_YEAR },
- { 1935, MAX_YEAR },
- { 1963, MAX_YEAR },
- { 0, 1955 },
- { 1973, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1958, MAX_YEAR },
- { 1958, MAX_YEAR },
- { 1958, MAX_YEAR },
- { 1958, MAX_YEAR },
- { 2000, MAX_YEAR },
- { 0, 1960 },
- { 0, 1960 },
- { 1945, MAX_YEAR },
- { 1983, MAX_YEAR },
- { 1983, MAX_YEAR },
- { 1983, MAX_YEAR },
- { 1983, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, 1963 },
- { 0, 1963 },
- { 1966, MAX_YEAR },
- { 1966, MAX_YEAR },
- { 1970, MAX_YEAR },
- { 1970, MAX_YEAR },
- { 1974, MAX_YEAR },
- { 1974, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, 1960 },
- { 0, 1960 },
- { 1972, MAX_YEAR },
- { 1972, MAX_YEAR },
- { 1972, MAX_YEAR },
- { 1972, MAX_YEAR },
- { 1963, MAX_YEAR },
- { 1963, MAX_YEAR },
- { 1978, MAX_YEAR },
- { 1978, MAX_YEAR },
- { 1967, MAX_YEAR },
- { 1967, MAX_YEAR },
- { 1967, MAX_YEAR },
- { 1967, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1973, MAX_YEAR },
- { 1962, MAX_YEAR },
- { 1984, MAX_YEAR },
- { 1984, MAX_YEAR },
- { 0, MAX_YEAR },
- { 1993, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
- { 0, MAX_YEAR },
-};
-assert_compile(lengthof(_housetype_years) == HOUSE_MAX);
-
-static const byte _housetype_cargo_passengers[] = {
- 8, 8, 8, 2, 10, 10, 4, 6,
- 6, 2, 2, 2, 2, 8, 6, 6,
- 6, 10, 6, 6, 4, 4, 4, 4,
- 3, 3, 3, 7, 8, 6, 8, 8,
- 4, 4, 4, 4, 8, 3, 3, 8,
- 8, 8, 8, 8, 5, 5, 3, 3,
- 3, 3, 8, 8, 9, 9, 10, 10,
- 2, 2, 3, 3, 2, 2, 3, 3,
- 6, 6, 6, 6, 6, 6, 7, 7,
- 9, 9, 7, 7, 7, 7, 3, 3,
- 3, 3, 6, 2, 3, 6, 6, 8,
- 8, 6, 8, 2, 6, 3, 3, 3,
- 3, 3, 8, 4, 4, 8, 3, 3,
- 8, 8, 8, 4, 3, 3,
-};
-assert_compile(lengthof(_housetype_cargo_passengers) == HOUSE_MAX);
-
-static const byte _housetype_cargo_mail[] = {
- 3, 3, 3, 0, 4, 4, 1, 1,
- 1, 0, 0, 0, 0, 2, 2, 2,
- 2, 3, 3, 2, 0, 0, 0, 0,
- 1, 1, 1, 2, 3, 2, 3, 2,
- 0, 0, 0, 0, 3, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 1, 1,
- 1, 1, 3, 3, 3, 3, 3, 3,
- 1, 1, 1, 1, 0, 0, 1, 1,
- 2, 2, 1, 1, 1, 1, 2, 2,
- 3, 3, 2, 2, 2, 2, 1, 1,
- 1, 1, 2, 0, 1, 2, 2, 3,
- 3, 2, 3, 0, 2, 1, 1, 1,
- 1, 1, 4, 1, 1, 4, 1, 1,
- 4, 4, 4, 1, 1, 2,
-};
-assert_compile(lengthof(_housetype_cargo_mail) == HOUSE_MAX);
-
-static const byte _housetype_cargo_goods[] = {
- 4, 4, 1, 0, 6, 6, 0, 2,
- 2, 0, 0, 0, 0, 4, 3, 3,
- 3, 6, 8, 6, 0, 0, 0, 0,
- 0, 0, 0, 2, 3, 3, 3, 2,
- 0, 0, 0, 0, 2, 0, 0, 2,
- 3, 3, 3, 3, 0, 0, 0, 0,
- 0, 0, 4, 4, 4, 4, 5, 5,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 3, 3, 0, 2, 0, 2, 3, 3,
- 4, 4, 2, 2, 2, 2, 0, 0,
- 0, 0, 1, 0, 0, 1, 1, 4,
- 4, 1, 4, 0, 2, 1, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 1,
- 0, 0, 2, 2, 2, 0
-};
-assert_compile(lengthof(_housetype_cargo_goods) == HOUSE_MAX);
-
-static const byte _housetype_cargo_food[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 0,
- 0, 0, 0, 0, 2, 2, 2, 2,
- 2, 2, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 1, 1,
- 0, 0, 3, 0, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 2,
- 2, 1, 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 0, 0, 0, 4
-};
-assert_compile(lengthof(_housetype_cargo_food) == HOUSE_MAX);
-
-static const byte _house_more_flags[] = {
- 8, 8, 8, 8, 8, 8, 8, 12,
- 0, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 15, 0, 0, 0,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 15, 0, 0, 0, 8, 8, 8, 8,
- 15, 0, 0, 0, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 12, 0, 12, 0, 8, 8,
- 8, 8, 10, 0, 10, 0, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 10,
- 0, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 12, 0, 8, 8, 8,
- 8, 8, 8, 8, 8, 8,
-};
-assert_compile(lengthof(_house_more_flags) == HOUSE_MAX);
+#undef M
+assert_compile(lengthof(_original_house_specs) == NEW_HOUSE_OFFSET);
--- a/src/texteff.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/texteff.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -145,15 +145,28 @@
}
}
+ int x = _textmsg_box.x;
+ int y = _screen.height - _textmsg_box.y - _textmsg_box.height;
+ int width = _textmsg_box.width;
+ int height = _textmsg_box.height;
+ if (y < 0) {
+ height = max(height + y, min(_textmsg_box.height, _screen.height));
+ y = 0;
+ }
+ if (x + width >= _screen.width) {
+ width = _screen.width - x;
+ }
+ if (width <= 0 || height <= 0) return;
+
_textmessage_visible = false;
/* Put our 'shot' back to the screen */
memcpy_pitch(
- _screen.dst_ptr + _textmsg_box.x + (_screen.height - _textmsg_box.y - _textmsg_box.height) * _screen.pitch,
+ _screen.dst_ptr + x + y * _screen.pitch,
_textmessage_backup,
- _textmsg_box.width, _textmsg_box.height, _textmsg_box.width, _screen.pitch);
+ width, height, _textmsg_box.width, _screen.pitch);
/* And make sure it is updated next time */
- _video_driver->make_dirty(_textmsg_box.x, _screen.height - _textmsg_box.y - _textmsg_box.height, _textmsg_box.width, _textmsg_box.height);
+ _video_driver->make_dirty(x, y, width, height);
_textmessage_dirty = true;
}
@@ -186,8 +199,6 @@
/* Draw the textmessage-box */
void DrawTextMessage()
{
- uint y, count;
-
if (!_textmessage_dirty) return;
/* First undraw if needed */
@@ -196,14 +207,27 @@
if (_iconsole_mode == ICONSOLE_FULL) return;
/* Check if we have anything to draw at all */
- count = GetTextMessageCount();
+ uint count = GetTextMessageCount();
if (count == 0) return;
+ int x = _textmsg_box.x;
+ int y = _screen.height - _textmsg_box.y - _textmsg_box.height;
+ int width = _textmsg_box.width;
+ int height = _textmsg_box.height;
+ if (y < 0) {
+ height = max(height + y, min(_textmsg_box.height, _screen.height));
+ y = 0;
+ }
+ if (x + width >= _screen.width) {
+ width = _screen.width - x;
+ }
+ if (width <= 0 || height <= 0) return;
+
/* Make a copy of the screen as it is before painting (for undraw) */
memcpy_pitch(
_textmessage_backup,
- _screen.dst_ptr + _textmsg_box.x + (_screen.height - _textmsg_box.y - _textmsg_box.height) * _screen.pitch,
- _textmsg_box.width, _textmsg_box.height, _screen.pitch, _textmsg_box.width);
+ _screen.dst_ptr + x + y * _screen.pitch,
+ width, height, _screen.pitch, _textmsg_box.width);
_cur_dpi = &_screen; // switch to _screen painting
@@ -217,12 +241,12 @@
);
/* Paint the messages starting with the lowest at the bottom */
- for (y = 13; count-- != 0; y += 13) {
+ for (uint y = 13; count-- != 0; y += 13) {
DoDrawString(_textmsg_list[count].message, _textmsg_box.x + 3, _screen.height - _textmsg_box.y - y + 1, _textmsg_list[count].color);
}
/* Make sure the data is updated next flush */
- _video_driver->make_dirty(_textmsg_box.x, _screen.height - _textmsg_box.y - _textmsg_box.height, _textmsg_box.width, _textmsg_box.height);
+ _video_driver->make_dirty(x, y, width, height);
_textmessage_visible = true;
_textmessage_dirty = false;
--- a/src/tgp.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/tgp.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -398,8 +398,8 @@
fheight = (double)(*h - h_min) / (double)(h_max - h_min);
/* Apply sine transform depending on landscape type */
switch(_opt.landscape) {
- case LT_CANDY:
- case LT_NORMAL:
+ case LT_TOYLAND:
+ case LT_TEMPERATE:
/* Move and scale 0..1 into -1..+1 */
fheight = 2 * fheight - 1;
/* Sine transform */
@@ -408,7 +408,7 @@
fheight = 0.5 * (fheight + 1);
break;
- case LT_HILLY:
+ case LT_ARCTIC:
{
/* Arctic terrain needs special height distribution.
* Redistribute heights to have more tiles at highest (75%..100%) range */
@@ -429,7 +429,7 @@
}
break;
- case LT_DESERT:
+ case LT_TROPIC:
{
/* Desert terrain needs special height distribution.
* Half of tiles should be at lowest (0..25%) heights */
--- a/src/town.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/town.h Mon Mar 26 22:15:38 2007 +0000
@@ -5,9 +5,72 @@
#include "oldpool.h"
#include "player.h"
+#include "functions.h"
+#include "helpers.hpp"
enum {
- INVALID_TOWN = 0xFFFF,
+ HOUSE_NO_CLASS = 0,
+ NEW_HOUSE_OFFSET = 110,
+ HOUSE_MAX = 512,
+ INVALID_TOWN = 0xFFFF,
+ INVALID_HOUSE_ID = 0xFFFF,
+
+ /* There can only be as many classes as there are new houses, plus one for
+ * NO_CLASS, as the original houses don't have classes. */
+ HOUSE_CLASS_MAX = HOUSE_MAX - NEW_HOUSE_OFFSET + 1,
+};
+
+enum BuildingFlags {
+ TILE_NO_FLAG = 0,
+ TILE_SIZE_1x1 = 1U << 0,
+ TILE_NOT_SLOPED = 1U << 1,
+ TILE_SIZE_2x1 = 1U << 2,
+ TILE_SIZE_1x2 = 1U << 3,
+ TILE_SIZE_2x2 = 1U << 4,
+ BUILDING_IS_ANIMATED = 1U << 5,
+ BUILDING_IS_CHURCH = 1U << 6,
+ BUILDING_IS_STADIUM = 1U << 7,
+ BUILDING_HAS_1_TILE = TILE_SIZE_1x1 | TILE_SIZE_2x1 | TILE_SIZE_1x2 | TILE_SIZE_2x2,
+ BUILDING_2_TILES_X = TILE_SIZE_2x1 | TILE_SIZE_2x2,
+ BUILDING_2_TILES_Y = TILE_SIZE_1x2 | TILE_SIZE_2x2,
+ BUILDING_HAS_4_TILES = TILE_SIZE_2x2,
+};
+
+DECLARE_ENUM_AS_BIT_SET(BuildingFlags)
+
+enum HouseZones { ///< Bit Value Meaning
+ HZ_NOZNS = 0x0000, ///< 0 This is just to get rid of zeros, meaning none
+ HZ_ZON1 = 0x0001, ///< 0..4 1,2,4,8,10 which town zones the building can be built in, Zone1 been the further suburb
+ HZ_ZON2 = 0x0002,
+ HZ_ZON3 = 0x0004,
+ HZ_ZON4 = 0x0008,
+ HZ_ZON5 = 0x0010, ///< center of town
+ HZ_ZONALL = 0x001F, ///< 1F This is just to englobe all above types at once
+ HZ_SUBARTC_ABOVE = 0x0800, ///< 11 800 can appear in sub-arctic climate above the snow line
+ HZ_TEMP = 0x1000, ///< 12 1000 can appear in temperate climate
+ HZ_SUBARTC_BELOW = 0x2000, ///< 13 2000 can appear in sub-arctic climate below the snow line
+ HZ_SUBTROPIC = 0x4000, ///< 14 4000 can appear in subtropical climate
+ HZ_TOYLND = 0x8000 ///< 15 8000 can appear in toyland climate
+};
+
+DECLARE_ENUM_AS_BIT_SET(HouseZones)
+
+enum HouseExtraFlags {
+ NO_EXTRA_FLAG = 0,
+ BUILDING_IS_HISTORICAL = 1U << 0, ///< this house will only appear during town generation in random games, thus the historical
+ BUILDING_IS_PROTECTED = 1U << 1, ///< towns and AI will not remove this house, while human players will be able tp
+ SYNCHRONISED_CALLBACK_1B = 1U << 2, ///< synchronized callback 1B will be performed, on multi tile houses
+ CALLBACK_1A_RANDOM_BITS = 1U << 3, ///< callback 1A needs random bits
+};
+
+DECLARE_ENUM_AS_BIT_SET(HouseExtraFlags)
+
+typedef uint16 HouseID;
+typedef uint16 HouseClassID;
+
+struct BuildingCounts {
+ uint8 id_count[HOUSE_MAX];
+ uint8 class_count[HOUSE_CLASS_MAX];
};
struct Town {
@@ -78,8 +141,46 @@
// NOSAVE: UpdateTownRadius updates this given the house count.
uint16 radius[5];
+
+ // NOSAVE: The number of each type of building in the town.
+ BuildingCounts building_counts;
};
+struct HouseSpec {
+ /* Standard properties */
+ Year min_date; ///< introduction year of the house
+ Year max_date; ///< last year it can be built
+ byte population; ///< population (Zero on other tiles in multi tile house.)
+ byte removal_cost; ///< cost multiplier for removing it
+ StringID building_name; ///< building name
+ uint16 remove_rating_decrease; ///< rating decrease if removed
+ byte mail_generation; ///< mail generation multiplier (tile based, as the acceptances below)
+ byte cargo_acceptance[3]; ///< acceptance level for the cargo slots
+ CargoID accepts_cargo[3]; ///< 3 input cargo slots
+ BuildingFlags building_flags; ///< some flags that describe the house (size, stadium etc...)
+ HouseZones building_availability; ///< where can it be built (climates, zones)
+ bool enabled; ///< the house is still avaible (by default, true.newgrf can disable it, though)
+
+ /* NewHouses properties */
+ HouseID substitute_id; ///< which house this one is based on
+ struct SpriteGroup *spritegroup; ///< pointer to the different sprites of the house
+ HouseID override; ///< which house this one replaces
+ uint16 callback_mask; ///< House callback flags
+ byte random_colour[4]; ///< 4 "random" colours
+ byte probability; ///< Relative probability of appearing (16 is the standard value)
+ HouseExtraFlags extra_flags; ///< some more flags
+ HouseClassID class_id; ///< defines the class this house has (grf file based) @See HouseGetVariable, prop 0x44
+ byte animation_frames; ///< number of animation frames
+ byte animation_speed; ///< amount of time between each of those frames
+ byte processing_time; ///< Periodic refresh multiplier
+
+ /* grf file related properties*/
+ uint8 local_id; ///< id defined by the grf file for this house
+ const struct GRFFile *grffile; ///< grf file that introduced this house
+};
+
+VARDEF HouseSpec _house_specs[HOUSE_MAX];
+
uint32 GetWorldPopulation();
void UpdateTownVirtCoord(Town *t);
@@ -158,6 +259,12 @@
DECLARE_OLD_POOL(Town, Town, 3, 8000)
+static inline HouseSpec *GetHouseSpecs(HouseID house_id)
+{
+ assert(house_id < HOUSE_MAX);
+ return &_house_specs[house_id];
+}
+
/**
* Check if a Town really exists.
*/
@@ -229,4 +336,9 @@
VARDEF Town *_cleared_town;
VARDEF int _cleared_town_rating;
+uint OriginalTileRandomiser(uint x, uint y);
+void ResetHouses();
+
+void ClearTownHouse(Town *t, TileIndex tile);
+
#endif /* TOWN_H */
--- a/src/town_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/town_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -5,11 +5,13 @@
#include "stdafx.h"
#include "openttd.h"
#include "functions.h"
+#include "debug.h"
#include "strings.h"
#include "road_map.h"
#include "table/strings.h"
#include "table/sprites.h"
#include "map.h"
+#include "landscape.h"
#include "tile.h"
#include "town_map.h"
#include "tunnel_map.h"
@@ -19,6 +21,7 @@
#include "gfx.h"
#include "industry.h"
#include "station.h"
+#include "vehicle.h"
#include "player.h"
#include "news.h"
#include "saveload.h"
@@ -32,6 +35,9 @@
#include "date.h"
#include "table/town_land.h"
#include "genworld.h"
+#include "newgrf.h"
+#include "newgrf_callbacks.h"
+#include "newgrf_house.h"
/**
* Called if a new block is added to the town-pool
@@ -91,7 +97,6 @@
static int _grow_town_result;
static bool BuildTownHouse(Town *t, TileIndex tile);
-static void ClearTownHouse(Town *t, TileIndex tile);
static void DoBuildTownHouse(Town *t, TileIndex tile);
static void TownDrawHouseLift(const TileInfo *ti)
@@ -104,24 +109,38 @@
TownDrawHouseLift
};
+uint OriginalTileRandomiser(uint x, uint y)
+{
+ uint variant;
+ variant = x >> 4;
+ variant ^= x >> 6;
+ variant ^= y >> 4;
+ variant -= y >> 6;
+ variant &= 3;
+ return variant;
+}
static void DrawTile_Town(TileInfo *ti)
{
const DrawBuildingsTileStruct *dcts;
SpriteID image;
SpriteID pal;
+ HouseID house_id = GetHouseType(ti->tile);
+
+ if (house_id >= NEW_HOUSE_OFFSET) {
+ /* Houses don't necessarily need new graphics. If they don't have a
+ * spritegroup associated with them, then the sprite for the substitute
+ * house id is drawn instead. */
+ if (GetHouseSpecs(house_id)->spritegroup != NULL) {
+ DrawNewHouseTile(ti, house_id);
+ return;
+ } else {
+ house_id = GetHouseSpecs(house_id)->substitute_id;
+ }
+ }
/* Retrieve pointer to the draw town tile struct */
- {
- /* this "randomizes" on the (up to) 4 variants of a building */
- uint variant;
- variant = ti->x >> 4;
- variant ^= ti->x >> 6;
- variant ^= ti->y >> 4;
- variant -= ti->y >> 6;
- variant &= 3;
- dcts = &_town_draw_tile_data[GetHouseType(ti->tile) << 4 | variant << 2 | GetHouseBuildingStage(ti->tile)];
- }
+ dcts = &_town_draw_tile_data[house_id << 4 | OriginalTileRandomiser(ti->x, ti->y) << 2 | GetHouseBuildingStage(ti->tile)];
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
@@ -172,18 +191,23 @@
{
int pos, dest;
+ if (GetHouseType(tile) >= NEW_HOUSE_OFFSET) {
+ AnimateNewHouseTile(tile);
+ return;
+ }
+
if (_tick_counter & 3) return;
// If the house is not one with a lift anymore, then stop this animating.
// Not exactly sure when this happens, but probably when a house changes.
// Before this was just a return...so it'd leak animated tiles..
// That bug seems to have been here since day 1??
- if (!(_housetype_extra_flags[GetHouseType(tile)] & 0x20)) {
+ if (!(GetHouseSpecs(GetHouseType(tile))->building_flags & BUILDING_IS_ANIMATED)) {
DeleteAnimatedTile(tile);
return;
}
- if (!IsLiftMoving(tile)) {
+ if (!LiftHasDestination(tile)) {
int i;
/** Building has 6 floors, number 0 .. 6, where 1 is illegal.
@@ -270,44 +294,53 @@
IncHouseConstructionTick(tile);
if (GetHouseConstructionTick(tile) != 0) return;
- IncHouseBuildingStage(tile); /*increase construction stage of one more step*/
+ if (HASBIT(GetHouseSpecs(GetHouseType(tile))->callback_mask, CBM_CONSTRUCTION_STATE_CHANGE)) {
+ uint16 callback_res = GetHouseCallback(CBID_CONSTRUCTION_STATE_CHANGE, 0, GetHouseType(tile), GetTownByTile(tile), tile);
+ if (callback_res != CALLBACK_FAILED) ChangeHouseAnimationFrame(tile, callback_res);
+ }
- if (GetHouseBuildingStage(tile) == TOWN_HOUSE_COMPLETED){
- /*Now, construction is completed. Can add population of building to the town*/
- ChangePopulation(GetTownByTile(tile), _housetype_population[GetHouseType(tile)]);
+ if (IsHouseCompleted(tile)) {
+ /* Now that construction is complete, we can add the population of the
+ * building to the town. */
+ ChangePopulation(GetTownByTile(tile), GetHouseSpecs(GetHouseType(tile))->population);
}
MarkTileDirtyByTile(tile);
}
static void MakeTownHouseBigger(TileIndex tile)
{
- uint flags = _house_more_flags[GetHouseType(tile)];
- if (flags & 8) MakeSingleHouseBigger(TILE_ADDXY(tile, 0, 0));
- if (flags & 4) MakeSingleHouseBigger(TILE_ADDXY(tile, 0, 1));
- if (flags & 2) MakeSingleHouseBigger(TILE_ADDXY(tile, 1, 0));
- if (flags & 1) MakeSingleHouseBigger(TILE_ADDXY(tile, 1, 1));
+ uint flags = GetHouseSpecs(GetHouseType(tile))->building_flags;
+ if (flags & BUILDING_HAS_1_TILE) MakeSingleHouseBigger(TILE_ADDXY(tile, 0, 0));
+ if (flags & BUILDING_2_TILES_Y) MakeSingleHouseBigger(TILE_ADDXY(tile, 0, 1));
+ if (flags & BUILDING_2_TILES_X) MakeSingleHouseBigger(TILE_ADDXY(tile, 1, 0));
+ if (flags & BUILDING_HAS_4_TILES) MakeSingleHouseBigger(TILE_ADDXY(tile, 1, 1));
}
static void TileLoop_Town(TileIndex tile)
{
- int house;
Town *t;
uint32 r;
+ HouseID house_id = GetHouseType(tile);
+ HouseSpec *hs = GetHouseSpecs(house_id);
- if (GetHouseBuildingStage(tile) != TOWN_HOUSE_COMPLETED) {
+ /* NewHouseTileLoop returns false if Callback 21 succeeded, i.e. the house
+ * doesn't exist any more, so don't continue here. */
+ if (house_id >= NEW_HOUSE_OFFSET && !NewHouseTileLoop(tile)) return;
+
+ if (!IsHouseCompleted(tile)) {
/*Construction is not completed. See if we can go further in construction*/
MakeTownHouseBigger(tile);
return;
}
- house = GetHouseType(tile);
- if ((_housetype_extra_flags[house] & 0x20) && !LiftHasDestination(tile) && CHANCE16(1, 2) && AddAnimatedTile(tile)) BeginLiftMovement(tile);
+ /* If the lift has a destination, it is already an animated tile. */
+ if ((hs->building_flags & BUILDING_IS_ANIMATED) && house_id < NEW_HOUSE_OFFSET && !LiftHasDestination(tile) && CHANCE16(1, 2)) AddAnimatedTile(tile);
t = GetTownByTile(tile);
r = Random();
- if (GB(r, 0, 8) < _housetype_population[house]) {
+ if (GB(r, 0, 8) < hs->population) {
uint amt = GB(r, 0, 8) / 8 + 1;
uint moved;
@@ -317,7 +350,7 @@
t->new_act_pass += moved;
}
- if (GB(r, 8, 8) < _housetype_mailamount[house] ) {
+ if (GB(r, 8, 8) < hs->mail_generation) {
uint amt = GB(r, 8, 8) / 8 + 1;
uint moved;
@@ -327,18 +360,18 @@
t->new_act_mail += moved;
}
- if (_house_more_flags[house] & 8 && HASBIT(t->flags12, TOWN_IS_FUNDED) && --t->time_until_rebuild == 0) {
+ _current_player = OWNER_TOWN;
+
+ if (hs->building_flags & BUILDING_HAS_1_TILE && HASBIT(t->flags12, TOWN_IS_FUNDED) && CanDeleteHouse(tile) && --t->time_until_rebuild == 0) {
t->time_until_rebuild = GB(r, 16, 6) + 130;
- _current_player = OWNER_TOWN;
-
ClearTownHouse(t, tile);
// rebuild with another house?
if (GB(r, 24, 8) >= 12) DoBuildTownHouse(t, tile);
+ }
- _current_player = OWNER_NONE;
- }
+ _current_player = OWNER_NONE;
}
static void ClickTile_Town(TileIndex tile)
@@ -348,16 +381,17 @@
static int32 ClearTile_Town(TileIndex tile, byte flags)
{
- int house, rating;
+ int rating;
int32 cost;
Town *t;
+ HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
if (flags&DC_AUTO && !(flags&DC_AI_BUILDING)) return_cmd_error(STR_2004_BUILDING_MUST_BE_DEMOLISHED);
+ if (!CanDeleteHouse(tile)) return CMD_ERROR;
- house = GetHouseType(tile);
- cost = _price.remove_house * _housetype_remove_cost[house] >> 8;
+ cost = _price.remove_house * hs->removal_cost >> 8;
- rating = _housetype_remove_ratingmod[house];
+ rating = hs->remove_rating_decrease;
_cleared_town_rating += rating;
_cleared_town = t = GetTownByTile(tile);
@@ -378,18 +412,15 @@
static void GetAcceptedCargo_Town(TileIndex tile, AcceptedCargo ac)
{
- byte type = GetHouseType(tile);
+ HouseSpec *hs = GetHouseSpecs(GetHouseType(tile));
- ac[CT_PASSENGERS] = _housetype_cargo_passengers[type];
- ac[CT_MAIL] = _housetype_cargo_mail[type];
- ac[CT_GOODS] = _housetype_cargo_goods[type];
- ac[CT_FOOD] = _housetype_cargo_food[type];
+ for (uint8 i = 0; i < 3; i++) ac[hs->accepts_cargo[i]] = hs->cargo_acceptance[i];
}
static void GetTileDesc_Town(TileIndex tile, TileDesc *td)
{
- td->str = _town_tile_names[GetHouseType(tile)];
- if (GetHouseBuildingStage(tile) != TOWN_HOUSE_COMPLETED) {
+ td->str = GetHouseSpecs(GetHouseType(tile))->building_name;
+ if (!IsHouseCompleted(tile)) {
SetDParamX(td->dparam, 0, td->str);
td->str = STR_2058_UNDER_CONSTRUCTION;
}
@@ -1186,10 +1217,11 @@
{
int i;
uint bitmask;
- int house;
+ HouseID house;
Slope slope;
uint z;
uint oneof = 0;
+ HouseSpec *hs;
// Above snow?
slope = GetTileSlope(tile, &z);
@@ -1199,7 +1231,7 @@
uint rad = GetTownRadiusGroup(t, tile);
int land = _opt.landscape;
- if (land == LT_HILLY && z >= _opt.snow_line) land = -1;
+ if (land == LT_ARCTIC && z >= _opt.snow_line) land = -1;
bitmask = (1 << rad) + (1 << (land + 12));
}
@@ -1208,45 +1240,63 @@
// bits 11-15 are used
// bits 5-10 are not used.
{
- byte houses[lengthof(_housetype_flags)];
+ HouseID houses[HOUSE_MAX];
int num = 0;
+ uint cumulative_probs[HOUSE_MAX];
+ uint probability_max = 0;
// Generate a list of all possible houses that can be built.
- for (i=0; i!=lengthof(_housetype_flags); i++) {
- if ((~_housetype_flags[i] & bitmask) == 0)
- houses[num++] = (byte)i;
+ for (i = 0; i < HOUSE_MAX; i++) {
+ hs = GetHouseSpecs(i);
+ if ((~hs->building_availability & bitmask) == 0 && hs->enabled) {
+ if (_have_newhouses) {
+ probability_max += hs->probability;
+ cumulative_probs[num] = probability_max;
+ }
+ houses[num++] = (HouseID)i;
+ }
}
for (;;) {
- house = houses[RandomRange(num)];
+ if (_have_newhouses) {
+ uint r = RandomRange(probability_max);
+ for (i = 0; i < num; i++) if (cumulative_probs[i] >= r) break;
- if (_cur_year < _housetype_years[house].min || _cur_year > _housetype_years[house].max)
- continue;
+ house = houses[i];
+ } else {
+ house = houses[RandomRange(num)];
+ }
+
+ hs = GetHouseSpecs(house);
+
+ if (_have_newhouses) {
+ if (hs->override != 0) hs = GetHouseSpecs(hs->override);
+
+ if ((hs->extra_flags & BUILDING_IS_HISTORICAL) && !_generating_world) continue;
+
+ if (HASBIT(hs->callback_mask, CBM_HOUSE_ALLOW_CONSTRUCTION)) {
+ uint16 callback_res = GetHouseCallback(CBID_HOUSE_ALLOW_CONSTRUCTION, 0, house, t, tile);
+ if (callback_res != CALLBACK_FAILED && callback_res == 0) continue;
+ }
+ }
+
+ if (_cur_year < hs->min_date || _cur_year > hs->max_date) continue;
// Special houses that there can be only one of.
- switch (house) {
- case HOUSE_TEMP_CHURCH:
- case HOUSE_ARCT_CHURCH:
- case HOUSE_SNOW_CHURCH:
- case HOUSE_TROP_CHURCH:
- case HOUSE_TOY_CHURCH:
- SETBIT(oneof, TOWN_HAS_CHURCH);
- break;
- case HOUSE_STADIUM:
- case HOUSE_MODERN_STADIUM:
- SETBIT(oneof, TOWN_HAS_STADIUM);
- break;
- default:
- oneof = 0;
- break;
+ if (hs->building_flags & BUILDING_IS_CHURCH) {
+ SETBIT(oneof, TOWN_HAS_CHURCH);
+ } else if (hs->building_flags & BUILDING_IS_STADIUM) {
+ SETBIT(oneof, TOWN_HAS_STADIUM);
+ } else {
+ oneof = 0;
}
if (HASBITS(t->flags12 , oneof)) continue;
// Make sure there is no slope?
- if (_housetype_extra_flags[house] & 0x12 && slope != SLOPE_FLAT) continue;
+ if (hs->building_flags & TILE_NOT_SLOPED && slope != SLOPE_FLAT) continue;
- if (_housetype_extra_flags[house] & 0x10) {
+ if (hs->building_flags & TILE_SIZE_2x2) {
if (CheckFree2x2Area(tile) ||
CheckFree2x2Area(tile += TileDiffXY(-1, 0)) ||
CheckFree2x2Area(tile += TileDiffXY( 0, -1)) ||
@@ -1254,14 +1304,14 @@
break;
}
tile += TileDiffXY(0, 1);
- } else if (_housetype_extra_flags[house] & 4) {
+ } else if (hs->building_flags & TILE_SIZE_2x1) {
if (CheckBuildHouseMode(tile + TileDiffXY(1, 0), slope, 0)) break;
if (CheckBuildHouseMode(tile + TileDiffXY(-1, 0), slope, 1)) {
tile += TileDiffXY(-1, 0);
break;
}
- } else if (_housetype_extra_flags[house] & 8) {
+ } else if (hs->building_flags & TILE_SIZE_1x2) {
if (CheckBuildHouseMode(tile + TileDiffXY(0, 1), slope, 2)) break;
if (CheckBuildHouseMode(tile + TileDiffXY(0, -1), slope, 3)) {
@@ -1275,12 +1325,13 @@
}
t->num_houses++;
+ IncreaseBuildingCount(t, house);
// Special houses that there can be only one of.
t->flags12 |= oneof;
{
- byte construction_counter = 0, construction_stage = 0, size_flags;
+ byte construction_counter = 0, construction_stage = 0;
if (_generating_world) {
uint32 r = Random();
@@ -1289,13 +1340,12 @@
if (CHANCE16(1, 7)) construction_stage = GB(r, 0, 2);
if (construction_stage == TOWN_HOUSE_COMPLETED) {
- ChangePopulation(t, _housetype_population[house]);
+ ChangePopulation(t, hs->population);
} else {
construction_counter = GB(r, 2, 2);
}
}
- size_flags = GB(_housetype_extra_flags[house], 2, 3);
- MakeTownHouse(tile, t->index, construction_counter, construction_stage, size_flags, house);
+ MakeTownHouse(tile, t->index, construction_counter, construction_stage, house, VehicleRandomBits());
}
}
@@ -1321,60 +1371,54 @@
DeleteAnimatedTile(tile);
}
-static void ClearTownHouse(Town *t, TileIndex tile)
+void ClearTownHouse(Town *t, TileIndex tile)
{
- uint house = GetHouseType(tile);
+ HouseID house = GetHouseType(tile);
uint eflags;
+ HouseSpec *hs;
assert(IsTileType(tile, MP_HOUSE));
// need to align the tile to point to the upper left corner of the house
if (house >= 3) { // house id 0,1,2 MUST be single tile houses, or this code breaks.
- if (_housetype_extra_flags[house-1] & 0x04) {
+ if (GetHouseSpecs(house-1)->building_flags & TILE_SIZE_2x1) {
house--;
tile += TileDiffXY(-1, 0);
- } else if (_housetype_extra_flags[house-1] & 0x18) {
+ } else if (GetHouseSpecs(house-1)->building_flags & BUILDING_2_TILES_Y) {
house--;
tile += TileDiffXY(0, -1);
- } else if (_housetype_extra_flags[house-2] & 0x10) {
+ } else if (GetHouseSpecs(house-2)->building_flags & BUILDING_HAS_4_TILES) {
house-=2;
tile += TileDiffXY(-1, 0);
- } else if (_housetype_extra_flags[house-3] & 0x10) {
+ } else if (GetHouseSpecs(house-3)->building_flags & BUILDING_HAS_4_TILES) {
house-=3;
tile += TileDiffXY(-1, -1);
}
}
+ hs = GetHouseSpecs(house);
+
// Remove population from the town if the house is finished.
- if (GetHouseBuildingStage(tile) == TOWN_HOUSE_COMPLETED) {
- ChangePopulation(t, -_housetype_population[house]);
+ if (IsHouseCompleted(tile)) {
+ ChangePopulation(t, -hs->population);
}
t->num_houses--;
+ DecreaseBuildingCount(t, house);
// Clear flags for houses that only may exist once/town.
- switch (house) {
- case HOUSE_TEMP_CHURCH:
- case HOUSE_ARCT_CHURCH:
- case HOUSE_SNOW_CHURCH:
- case HOUSE_TROP_CHURCH:
- case HOUSE_TOY_CHURCH:
- CLRBIT(t->flags12, TOWN_HAS_CHURCH);
- break;
- case HOUSE_STADIUM:
- case HOUSE_MODERN_STADIUM:
- CLRBIT(t->flags12, TOWN_HAS_STADIUM);
- break;
- default:
- break;
+ if (hs->building_flags & BUILDING_IS_CHURCH) {
+ CLRBIT(t->flags12, TOWN_HAS_CHURCH);
+ } else if (hs->building_flags & BUILDING_IS_STADIUM) {
+ CLRBIT(t->flags12, TOWN_HAS_STADIUM);
}
// Do the actual clearing of tiles
- eflags = _housetype_extra_flags[house];
+ eflags = hs->building_flags;
DoClearTownHouseHelper(tile);
- if (eflags & 0x14) DoClearTownHouseHelper(tile + TileDiffXY(1, 0));
- if (eflags & 0x18) DoClearTownHouseHelper(tile + TileDiffXY(0, 1));
- if (eflags & 0x10) DoClearTownHouseHelper(tile + TileDiffXY(1, 1));
+ if (eflags & BUILDING_2_TILES_X) DoClearTownHouseHelper(tile + TileDiffXY(1, 0));
+ if (eflags & BUILDING_2_TILES_Y) DoClearTownHouseHelper(tile + TileDiffXY(0, 1));
+ if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1));
}
/** Rename a town (server-only).
@@ -1543,9 +1587,7 @@
// set all close by station ratings to 0
FOR_ALL_STATIONS(st) {
if (st->town == t && st->owner == _current_player) {
- uint i;
-
- for (i = 0; i != NUM_CARGO; i++) st->goods[i].rating = 0;
+ for (CargoID i = 0; i < NUM_CARGO; i++) st->goods[i].rating = 0;
}
}
@@ -1656,10 +1698,10 @@
m = _grow_count_values[min(n, 5) - 1];
}
- if (_opt.landscape == LT_HILLY) {
- if (TilePixelHeight(t->xy) >= _opt.snow_line && t->act_food == 0 && t->population > 90)
+ if (_opt.landscape == LT_ARCTIC) {
+ if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90)
return;
- } else if (_opt.landscape == LT_DESERT) {
+ } else if (_opt.landscape == LT_TROPIC) {
if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60)
return;
}
@@ -1922,6 +1964,37 @@
SLE_END()
};
+/* Save and load the mapping between the house id on the map, and the grf file
+ * it came from. */
+static const SaveLoad _house_id_mapping_desc[] = {
+ SLE_VAR(HouseIDMapping, grfid, SLE_UINT32),
+ SLE_VAR(HouseIDMapping, house_id, SLE_UINT8),
+ SLE_VAR(HouseIDMapping, substitute_id, SLE_UINT8),
+ SLE_END()
+};
+
+static void Save_HOUSEIDS()
+{
+ uint i;
+
+ for (i = 0; i != lengthof(_house_id_mapping); i++) {
+ SlSetArrayIndex(i);
+ SlObject(&_house_id_mapping[i], _house_id_mapping_desc);
+ }
+}
+
+static void Load_HOUSEIDS()
+{
+ int index;
+
+ ResetHouseIDMapping();
+
+ while ((index = SlIterateArray()) != -1) {
+ if ((uint)index >= lengthof(_house_id_mapping)) break;
+ SlObject(&_house_id_mapping[index], _house_id_mapping_desc);
+ }
+}
+
static void Save_TOWN()
{
Town *t;
@@ -1966,7 +2039,13 @@
_town_sort_dirty = true;
}
-
extern const ChunkHandler _town_chunk_handlers[] = {
- { 'CITY', Save_TOWN, Load_TOWN, CH_ARRAY | CH_LAST},
+ { 'HIDS', Save_HOUSEIDS, Load_HOUSEIDS, CH_ARRAY },
+ { 'CITY', Save_TOWN, Load_TOWN, CH_ARRAY | CH_LAST},
};
+
+void ResetHouses()
+{
+ memset(&_house_specs, 0, sizeof(_house_specs));
+ memcpy(&_house_specs, &_original_house_specs, sizeof(_original_house_specs));
+}
--- a/src/town_map.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/town_map.h Mon Mar 26 22:15:38 2007 +0000
@@ -6,7 +6,14 @@
#define TOWN_MAP_H
#include "town.h"
+#include "date.h"
+/**
+ * Get the index of which town this house/street is attached to.
+ * @param t the tile
+ * @pre IsTileType(t, MP_HOUSE) or IsTileType(t, MP_STREET)
+ * @return TownID
+ */
static inline TownID GetTownIndex(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE) || IsTileType(t, MP_STREET)); // XXX incomplete
@@ -15,13 +22,14 @@
/**
* Set the town index for a road or house tile.
- * @param tile the tile
+ * @param t the tile
+ * @pre IsTileType(t, MP_HOUSE) or IsTileType(t, MP_STREET)
* @param index the index of the town
* @pre IsTileType(t, MP_STREET) || IsTileType(t, MP_HOUSE)
*/
static inline void SetTownIndex(TileIndex t, TownID index)
{
- assert(IsTileType(t, MP_STREET) || IsTileType(t, MP_HOUSE));
+ assert(IsTileType(t, MP_HOUSE) || IsTileType(t, MP_STREET));
_m[t].m2 = index;
}
@@ -35,84 +43,189 @@
return GetTown(GetTownIndex(t));
}
-
-static inline int GetHouseType(TileIndex t)
+/**
+ * Get the type of this house, which is an index into the house spec array
+ * Since m4 is only a byte and we want to support 512 houses, we use the bit 6
+ * of m3 as an additional bit to house type.
+ * @param t the tile
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return house type
+ */
+static inline HouseID GetHouseType(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE));
- return _m[t].m4;
-}
-
-static inline bool LiftHasDestination(TileIndex t)
-{
- return HASBIT(_m[t].m5, 7);
-}
-
-static inline void SetLiftDestination(TileIndex t, byte dest)
-{
- SB(_m[t].m5, 0, 6, dest);
- SETBIT(_m[t].m1, 7); /* Start moving */
+ return _m[t].m4 | (GB(_m[t].m3, 6, 1) << 8);
}
-static inline byte GetLiftDestination(TileIndex t)
+/**
+ * Set the house type.
+ * @param t the tile
+ * @param house_id the new house type
+ * @pre IsTileType(t, MP_HOUSE)
+ */
+static inline void SetHouseType(TileIndex t, HouseID house_id)
{
- return GB(_m[t].m5, 0, 6);
-}
-
-static inline bool IsLiftMoving(TileIndex t)
-{
- return HASBIT(_m[t].m1, 7);
+ assert(IsTileType(t, MP_HOUSE));
+ _m[t].m4 = GB(house_id, 0, 8);
+ SB(_m[t].m3, 6, 1, GB(house_id, 8, 1));
}
-static inline void BeginLiftMovement(TileIndex t)
+/**
+ * Check if the lift of this animated house has a destination
+ * @param t the tile
+ * @return has destination
+ */
+static inline bool LiftHasDestination(TileIndex t)
{
- SETBIT(_m[t].m5, 7);
+ return HASBIT(_me[t].m7, 0);
}
+/**
+ * Set the new destination of the lift for this animated house, and activate
+ * the LiftHasDestination bit.
+ * @param t the tile
+ * @param dest new destination
+ */
+static inline void SetLiftDestination(TileIndex t, byte dest)
+{
+ SETBIT(_me[t].m7, 0);
+ SB(_me[t].m7, 1, 3, dest);
+}
+
+/**
+ * Get the current destination for this lift
+ * @param t the tile
+ * @return destination
+ */
+static inline byte GetLiftDestination(TileIndex t)
+{
+ return GB(_me[t].m7, 1, 3);
+}
+
+/**
+ * Stop the lift of this animated house from moving.
+ * Clears the first 4 bits of m7 at once, clearing the LiftHasDestination bit
+ * and the destination.
+ * @param t the tile
+ */
static inline void HaltLift(TileIndex t)
{
- CLRBIT(_m[t].m1, 7);
- CLRBIT(_m[t].m5, 7);
- SB(_m[t].m5, 0, 6, 0);
-
+ SB(_me[t].m7, 0, 4, 0);
DeleteAnimatedTile(t);
}
+/**
+ * Get the position of the lift on this animated house
+ * @param t the tile
+ * @return position, from 0 to 36
+ */
static inline byte GetLiftPosition(TileIndex t)
{
- return GB(_m[t].m1, 0, 7);
+ return GB(_m[t].m6, 2, 6);
}
+/**
+ * Set the position of the lift on this animated house
+ * @param t the tile
+ * @param pos, from 0 to 36
+ */
static inline void SetLiftPosition(TileIndex t, byte pos)
{
- SB(_m[t].m1, 0, 7, pos);
+ SB(_m[t].m6, 2, 6, pos);
}
-static inline void MakeHouseTile(TileIndex t, TownID tid, byte counter, byte stage, byte type)
+/**
+ * Get the current animation frame for this house
+ * @param t the tile
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return frame number
+ */
+static inline byte GetHouseAnimationFrame(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return GB(_m[t].m6, 3, 5);
+}
+
+/**
+ * Set a new animation frame for this house
+ * @param t the tile
+ * @param frame the new frame number
+ * @pre IsTileType(t, MP_HOUSE)
+ */
+static inline void SetHouseAnimationFrame(TileIndex t, byte frame)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ SB(_m[t].m6, 3, 5, frame);
+}
+
+/**
+ * Get the completion of this house
+ * @param t the tile
+ * @return true if it is, false if it is not
+ */
+static inline bool IsHouseCompleted(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return HASBIT(_m[t].m3, 7);
+}
+
+/**
+ * Mark this house as been completed
+ * @param t the tile
+ * @param status
+ */
+static inline void SetHouseCompleted(TileIndex t, bool status)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ SB(_m[t].m3, 7, 1, !!status);
+}
+
+/**
+ * Make the tile a house.
+ * @param t tile index
+ * @param tid Town index
+ * @param counter of construction step
+ * @param stage of construction (used for drawing)
+ * @param type of house. Index into house specs array
+ * @param random_bits required for newgrf houses
+ * @pre IsTileType(t, MP_CLEAR)
+ */
+static inline void MakeHouseTile(TileIndex t, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
{
assert(IsTileType(t, MP_CLEAR));
SetTileType(t, MP_HOUSE);
- _m[t].m1 = 0;
+ _m[t].m1 = random_bits;
_m[t].m2 = tid;
- SB(_m[t].m3, 6, 2, stage);
- _m[t].m4 = type;
- SB(_m[t].m5, 0, 2, counter);
+ _m[t].m3 = 0;
+ SetHouseType(t, type);
+ SetHouseCompleted(t, stage == TOWN_HOUSE_COMPLETED);
+ _m[t].m5 = IsHouseCompleted(t) ? 0 : (stage << 3 | counter);
+ SetHouseAnimationFrame(t, 0);
+ _me[t].m7 = GetHouseSpecs(type)->processing_time;
+ if (GetHouseSpecs(type)->building_flags & BUILDING_IS_ANIMATED) AddAnimatedTile(t);
MarkTileDirtyByTile(t);
}
-enum {
- TWO_BY_TWO_BIT = 2, ///< House is two tiles in X and Y directions
- ONE_BY_TWO_BIT = 1, ///< House is two tiles in Y direction
- TWO_BY_ONE_BIT = 0, ///< House is two tiles in X direction
-};
-
-static inline void MakeTownHouse(TileIndex t, TownID tid, byte counter, byte stage, byte size, byte type)
+/**
+ * Helper function for MakeHouseTile.
+ * It is called for each tile of a multi-tile house.
+ * Parametes are the same.
+ * @param t tile index
+ * @param tid Town index
+ * @param counter of construction step
+ * @param stage of construction (used for drawing)
+ * @param type of house. Index into house specs array
+ * @param random_bits required for newgrf houses
+ */
+static inline void MakeTownHouse(TileIndex t, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
{
- MakeHouseTile(t, tid, counter, stage, type);
- if (HASBIT(size, TWO_BY_TWO_BIT) || HASBIT(size, ONE_BY_TWO_BIT)) MakeHouseTile(t + TileDiffXY(0, 1), tid, counter, stage, ++type);
- if (HASBIT(size, TWO_BY_TWO_BIT) || HASBIT(size, TWO_BY_ONE_BIT)) MakeHouseTile(t + TileDiffXY(1, 0), tid, counter, stage, ++type);
- if (HASBIT(size, TWO_BY_TWO_BIT)) MakeHouseTile(t + TileDiffXY(1, 1), tid, counter, stage, ++type);
+ BuildingFlags size = GetHouseSpecs(type)->building_flags;
+ MakeHouseTile(t, tid, counter, stage, type, random_bits);
+ if (size & BUILDING_2_TILES_Y) MakeHouseTile(t + TileDiffXY(0, 1), tid, counter, stage, ++type, random_bits);
+ if (size & BUILDING_2_TILES_X) MakeHouseTile(t + TileDiffXY(1, 0), tid, counter, stage, ++type, random_bits);
+ if (size & BUILDING_HAS_4_TILES) MakeHouseTile(t + TileDiffXY(1, 1), tid, counter, stage, ++type, random_bits);
}
/**
@@ -120,81 +233,143 @@
* Construction counter, for buildings under construction. Incremented on every
* periodic tile processing.
* On wraparound, the stage of building in is increased.
- * (Get|Set|Inc)HouseBuildingStage are taking care of the real stages,
+ * GetHouseBuildingStage is taking care of the real stages,
* (as the sprite for the next phase of house building)
- * (Get|Set|Inc)HouseConstructionTick is simply a tick counter between the
+ * (Get|Inc)HouseConstructionTick is simply a tick counter between the
* different stages
*/
/**
* Gets the building stage of a house
- * @param tile the tile of the house to get the building stage of
+ * Since the stage is used for determining what sprite to use,
+ * if the house is complete (and that stage no longuer is available),
+ * fool the system by returning the TOWN_HOUSE_COMPLETE (3),
+ * thus showing a beautiful complete house.
+ * @param t the tile of the house to get the building stage of
* @pre IsTileType(t, MP_HOUSE)
* @return the building stage of the house
*/
static inline byte GetHouseBuildingStage(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE));
- return GB(_m[t].m3, 6, 2);
-}
-
-/**
- * Sets the building stage of a house
- * @param tile the tile of the house to set the building stage of
- * @param stage the new stage
- * @pre IsTileType(t, MP_HOUSE)
- */
-static inline void SetHouseBuildingStage(TileIndex t, byte stage)
-{
- assert(IsTileType(t, MP_HOUSE));
- SB(_m[t].m3, 6, 2, stage);
-}
-
-/**
- * Increments the building stage of a house
- * @param tile the tile of the house to increment the building stage of
- * @pre IsTileType(t, MP_HOUSE)
- */
-static inline void IncHouseBuildingStage( TileIndex t )
-{
- assert(IsTileType(t, MP_HOUSE));
- AB(_m[t].m3, 6, 2, 1);
+ return IsHouseCompleted(t) ? (byte)TOWN_HOUSE_COMPLETED : GB(_m[t].m5, 3, 2);
}
/**
* Gets the construction stage of a house
- * @param tile the tile of the house to get the construction stage of
+ * @param t the tile of the house to get the construction stage of
* @pre IsTileType(t, MP_HOUSE)
* @return the construction stage of the house
*/
static inline byte GetHouseConstructionTick(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE));
- return GB(_m[t].m5, 0, 3);
-}
-
-/**
- * Sets the construction stage of a house
- * @param tile the tile of the house to set the construction stage of
- * @param stage the new stage
- * @pre IsTileType(t, MP_HOUSE)
- */
-static inline void SetHouseConstructionTick(TileIndex t, byte stage)
-{
- assert(IsTileType(t, MP_HOUSE));
- SB(_m[t].m5, 0, 3, stage);
+ return IsHouseCompleted(t) ? 0 : GB(_m[t].m5, 0, 3);
}
/**
* Sets the increment stage of a house
- * @param tile the tile of the house to increment the construction stage of
+ * It is working with the whole counter + stage 5 bits, making it
+ * easier to work: the wraparound is automatic.
+ * @param t the tile of the house to increment the construction stage of
* @pre IsTileType(t, MP_HOUSE)
*/
static inline void IncHouseConstructionTick(TileIndex t)
{
assert(IsTileType(t, MP_HOUSE));
- AB(_m[t].m5, 0, 3, 1);
+ AB(_m[t].m5, 0, 5, 1);
+
+ if (GB(_m[t].m5, 3, 2) == TOWN_HOUSE_COMPLETED) {
+ /* House is now completed.
+ * Store the year of construction as well, for newgrf house purpose */
+ SetHouseCompleted(t, true);
+ _m[t].m5 = clamp(_cur_year - ORIGINAL_BASE_YEAR, 0, 0xFF);
+ }
}
+/**
+ * Get the year that this house was constructed (between 1920 and 2175).
+ * @param t the tile of this house
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return year
+ */
+static inline Year GetHouseConstructionYear(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return IsHouseCompleted(t) ? _m[t].m5 + ORIGINAL_BASE_YEAR : 0;
+}
+
+/**
+ * Get the random bits for this house.
+ * This is required for newgrf house
+ * @param t the tile of this house
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return random bits
+ */
+static inline byte GetHouseRandomBits(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return _m[t].m1;
+}
+
+/**
+ * Set the activated triggers bits for this house.
+ * This is required for newgrf house
+ * @param t the tile of this house
+ * @pre IsTileType(t, MP_HOUSE)
+ */
+static inline void SetHouseTriggers(TileIndex t, byte triggers)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ SB(_m[t].m3, 0, 5, triggers);
+}
+
+/**
+ * Get the already activated triggers bits for this house.
+ * This is required for newgrf house
+ * @param t the tile of this house
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return triggers
+ */
+static inline byte GetHouseTriggers(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return GB(_m[t].m3, 0, 5);
+}
+
+/**
+ * Get the amount of time remaining before the tile loop processes this tile.
+ * @param t the house tile
+ * @pre IsTileType(t, MP_HOUSE)
+ * @return time remaining
+ */
+static inline byte GetHouseProcessingTime(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ return _me[t].m7;
+}
+
+/**
+ * Set the amount of time remaining before the tile loop processes this tile.
+ * @param t the house tile
+ * @param time the time to be set
+ * @pre IsTileType(t, MP_HOUSE)
+ */
+static inline void SetHouseProcessingTime(TileIndex t, byte time)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ _me[t].m7 = time;
+}
+
+/**
+ * Decrease the amount of time remaining before the tile loop processes this tile.
+ * @param t the house tile
+ * @pre IsTileType(t, MP_HOUSE)
+ */
+static inline void DecHouseProcessingTime(TileIndex t)
+{
+ assert(IsTileType(t, MP_HOUSE));
+ _me[t].m7--;
+}
#endif /* TOWN_MAP_H */
--- a/src/train_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/train_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1334,30 +1334,37 @@
for (Vehicle *tmp = first; tmp != NULL; tmp = tmp->next) tmp->first = NULL;
/* 2.2 If there are wagons present after the deleted front engine, check
- * if the second wagon (which will be first) is an engine. If it is one,
- * promote it as a new train, retaining the unitnumber, orders */
- if (new_f != NULL) {
- if (IsTrainEngine(new_f)) {
- switch_engine = true;
- /* Copy important data from the front engine */
- new_f->unitnumber = first->unitnumber;
- new_f->current_order = first->current_order;
- new_f->cur_order_index = first->cur_order_index;
- new_f->orders = first->orders;
- if (first->prev_shared != NULL) {
- first->prev_shared->next_shared = new_f;
- new_f->prev_shared = first->prev_shared;
- }
-
- if (first->next_shared != NULL) {
- first->next_shared->prev_shared = new_f;
- new_f->next_shared = first->next_shared;
- }
-
- new_f->num_orders = first->num_orders;
- first->orders = NULL; // XXX - to not to delete the orders */
- if (IsLocalPlayer()) ShowTrainViewWindow(new_f);
+ * if the second wagon (which will be first) is an engine. If it is one,
+ * promote it as a new train, retaining the unitnumber, orders */
+ if (new_f != NULL && IsTrainEngine(new_f)) {
+ switch_engine = true;
+ /* Copy important data from the front engine */
+ new_f->unitnumber = first->unitnumber;
+ new_f->current_order = first->current_order;
+ new_f->cur_order_index = first->cur_order_index;
+ new_f->orders = first->orders;
+ new_f->num_orders = first->num_orders;
+
+ if (first->prev_shared != NULL) {
+ first->prev_shared->next_shared = new_f;
+ new_f->prev_shared = first->prev_shared;
}
+
+ if (first->next_shared != NULL) {
+ first->next_shared->prev_shared = new_f;
+ new_f->next_shared = first->next_shared;
+ }
+
+ /*
+ * Remove all order information from the front train, to
+ * prevent the order and the shared order list to be
+ * destroyed by Destroy/DeleteVehicle.
+ */
+ first->orders = NULL;
+ first->prev_shared = NULL;
+ first->next_shared = NULL;
+
+ if (IsLocalPlayer()) ShowTrainViewWindow(new_f);
}
}
@@ -1744,7 +1751,7 @@
if (CheckTrainStoppedInDepot(v) < 0) return_cmd_error(STR_TRAIN_MUST_BE_STOPPED);
/* Check cargo */
- if (new_cid > NUM_CARGO) return CMD_ERROR;
+ if (new_cid >= NUM_CARGO) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_TRAIN_RUN);
@@ -2158,6 +2165,7 @@
* approximation of where the station is */
// found station
ttfd->best_track = track;
+ ttfd->best_bird_dist = 0;
return true;
} else {
// didn't find station, keep track of the best path so far.
@@ -2807,7 +2815,7 @@
{
uint num = 0;
BEGIN_ENUM_WAGONS(v)
- if (v->cargo_type == CT_PASSENGERS) num += v->cargo_count;
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) num += v->cargo_count;
END_ENUM_WAGONS(v)
return num;
}
@@ -3206,7 +3214,7 @@
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
- SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
+ SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
}
--- a/src/train_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/train_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -371,7 +371,6 @@
const Vehicle *u;
AcceptedCargo act_cargo;
AcceptedCargo max_cargo;
- uint i;
int num;
int x;
int y;
@@ -380,7 +379,7 @@
num = 0;
u = v = GetVehicle(w->window_number);
if (det_tab == 3) { // Total cargo tab
- for (i = 0; i < lengthof(act_cargo); i++) {
+ for (CargoID i = 0; i < lengthof(act_cargo); i++) {
act_cargo[i] = 0;
max_cargo[i] = 0;
}
@@ -393,7 +392,7 @@
/* Set scroll-amount seperately from counting, as to not compute num double
* for more carriages of the same type
*/
- for (i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
if (max_cargo[i] > 0) num++; // only count carriages that the train has
}
num++; // needs one more because first line is description string
@@ -492,7 +491,7 @@
} else {
// draw total cargo tab
DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY_TEXT, 0);
- for (i = 0; i != NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
if (max_cargo[i] > 0 && --sel < 0 && sel > -w->vscroll.cap) {
y += 14;
SetDParam(0, i); // {CARGO} #1
--- a/src/tree_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/tree_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -9,6 +9,7 @@
#include "table/tree_land.h"
#include "functions.h"
#include "map.h"
+#include "landscape.h"
#include "tile.h"
#include "tree_map.h"
#include "viewport.h"
@@ -27,13 +28,13 @@
static TreeType GetRandomTreeType(TileIndex tile, uint seed)
{
switch (_opt.landscape) {
- case LT_NORMAL:
+ case LT_TEMPERATE:
return (TreeType)(seed * TREE_COUNT_TEMPERATE / 256 + TREE_TEMPERATE);
- case LT_HILLY:
+ case LT_ARCTIC:
return (TreeType)(seed * TREE_COUNT_SUB_ARCTIC / 256 + TREE_SUB_ARCTIC);
- case LT_DESERT:
+ case LT_TROPIC:
switch (GetTropicZone(tile)) {
case TROPICZONE_INVALID: return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL);
case TROPICZONE_DESERT: return (TreeType)((seed > 12) ? TREE_INVALID : TREE_CACTUS);
@@ -53,7 +54,7 @@
MakeTree(tile, tree, GB(r, 22, 2), min(GB(r, 16, 3), 6), TREE_GROUND_GRASS, 0);
// above snowline?
- if (_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) {
+ if (_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) {
SetTreeGroundDensity(tile, TREE_GROUND_SNOW_DESERT, 3);
SetTreeCounter(tile, (TreeGround)GB(r, 24, 3));
} else {
@@ -150,7 +151,7 @@
j = GetTileZ(tile) / TILE_HEIGHT * 2;
while (j--) {
/* Above snowline more trees! */
- if (_opt.landscape == LT_HILLY && ht > _opt.snow_line) {
+ if (_opt.landscape == LT_ARCTIC && ht > GetSnowLine()) {
PlaceTreeAtSameHeight(tile, ht);
PlaceTreeAtSameHeight(tile, ht);
};
@@ -161,7 +162,7 @@
} while (--i);
/* place extra trees at rainforest area */
- if (_opt.landscape == LT_DESERT) {
+ if (_opt.landscape == LT_TROPIC) {
i = ScaleByMapSize(15000);
do {
@@ -186,16 +187,16 @@
if (_patches.tree_placer == TP_NONE) return;
- if (_opt.landscape != LT_CANDY) PlaceMoreTrees();
+ if (_opt.landscape != LT_TOYLAND) PlaceMoreTrees();
switch (_patches.tree_placer) {
- case TP_ORIGINAL: i = _opt.landscape == LT_HILLY ? 15 : 6; break;
- case TP_IMPROVED: i = _opt.landscape == LT_HILLY ? 4 : 2; break;
+ case TP_ORIGINAL: i = _opt.landscape == LT_ARCTIC ? 15 : 6; break;
+ case TP_IMPROVED: i = _opt.landscape == LT_ARCTIC ? 4 : 2; break;
default: NOT_REACHED(); return;
}
total = ScaleByMapSize(1000);
- if (_opt.landscape == LT_DESERT) total += ScaleByMapSize(15000);
+ if (_opt.landscape == LT_TROPIC) total += ScaleByMapSize(15000);
total *= i;
SetGeneratingWorldProgress(GWP_TREE, total);
@@ -496,7 +497,7 @@
static void TileLoopTreesAlps(TileIndex tile)
{
- int k = GetTileZ(tile) - _opt.snow_line + TILE_HEIGHT;
+ int k = GetTileZ(tile) - GetSnowLine() + TILE_HEIGHT;
if (k < 0) {
if (GetTreeGround(tile) != TREE_GROUND_SNOW_DESERT) return;
@@ -523,8 +524,8 @@
static void TileLoop_Trees(TileIndex tile)
{
switch (_opt.landscape) {
- case LT_DESERT: TileLoopTreesDesert(tile); break;
- case LT_HILLY: TileLoopTreesAlps(tile); break;
+ case LT_TROPIC: TileLoopTreesDesert(tile); break;
+ case LT_ARCTIC: TileLoopTreesAlps(tile); break;
}
TileLoopClearHelper(tile);
@@ -537,7 +538,7 @@
switch (GetTreeGrowth(tile)) {
case 3: /* regular sized tree */
- if (_opt.landscape == LT_DESERT &&
+ if (_opt.landscape == LT_TROPIC &&
GetTreeType(tile) != TREE_CACTUS &&
GetTropicZone(tile) == TROPICZONE_DESERT) {
AddTreeGrowth(tile, 1);
@@ -612,7 +613,7 @@
TreeType tree;
/* place a tree at a random rainforest spot */
- if (_opt.landscape == LT_DESERT &&
+ if (_opt.landscape == LT_TROPIC &&
(r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
IsTileType(tile, MP_CLEAR) &&
!IsBridgeAbove(tile) &&
--- a/src/tunnelbridge_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/tunnelbridge_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -14,6 +14,7 @@
#include "table/strings.h"
#include "functions.h"
#include "map.h"
+#include "landscape.h"
#include "tile.h"
#include "tunnel_map.h"
#include "unmovable_map.h"
@@ -695,6 +696,16 @@
return CMD_ERROR;
}
+/**
+ * Switches the rail type for a tunnel or a bridgehead. As the railtype
+ * on the bridge are determined by the one of the bridgehead, this
+ * functions converts the railtype on the entire bridge.
+ * @param tile The tile on which the railtype is to be convert.
+ * @param totype The railtype we want to convert to
+ * @param exec Switches between test and execute mode
+ * @return The cost and state of the operation
+ * @retval CMD_ERROR An error occured during the operation.
+ */
int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
{
TileIndex endtile;
@@ -723,7 +734,7 @@
YapfNotifyTrackLayoutChange(tile, track);
YapfNotifyTrackLayoutChange(endtile, track);
}
- return (length + 1) * (_price.build_rail >> 1);
+ return (length + 1) * (_price.build_rail / 2);
} else if (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) {
if (!CheckTileOwnership(tile)) return CMD_ERROR;
@@ -757,7 +768,7 @@
}
}
- return (DistanceManhattan(tile, endtile) + 1) * (_price.build_rail >> 1);
+ return (DistanceManhattan(tile, endtile) + 1) * (_price.build_rail / 2);
} else {
return CMD_ERROR;
}
@@ -1177,8 +1188,8 @@
{
bool snow_or_desert = IsTunnelTile(tile) ? HasTunnelSnowOrDesert(tile) : HasBridgeSnowOrDesert(tile);
switch (_opt.landscape) {
- case LT_HILLY:
- if (snow_or_desert != (GetTileZ(tile) > _opt.snow_line)) {
+ case LT_ARCTIC:
+ if (snow_or_desert != (GetTileZ(tile) > GetSnowLine())) {
if (IsTunnelTile(tile)) {
SetTunnelSnowOrDesert(tile, !snow_or_desert);
} else {
@@ -1188,7 +1199,7 @@
}
break;
- case LT_DESERT:
+ case LT_TROPIC:
if (GetTropicZone(tile) == TROPICZONE_DESERT && !snow_or_desert) {
if (IsTunnelTile(tile)) {
SetTunnelSnowOrDesert(tile, true);
--- a/src/unix.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/unix.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -14,10 +14,6 @@
#include <time.h>
#include <signal.h>
-#ifdef USE_HOMEDIR
-#include <pwd.h>
-#endif
-
#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__GLIBC__)
#define HAS_STATVFS
#endif
@@ -100,18 +96,6 @@
return ent->d_name[0] == '.';
}
-#if defined(__BEOS__) || defined(__linux__)
-static void ChangeWorkingDirectory(char *exe)
-{
- char *s = strrchr(exe, '/');
- if (s != NULL) {
- *s = '\0';
- chdir(exe);
- *s = '/';
- }
-}
-#endif
-
void ShowInfo(const char *str)
{
fprintf(stderr, "%s\n", str);
@@ -130,7 +114,6 @@
}
#ifdef WITH_COCOA
-void cocoaSetWorkingDirectory();
void cocoaSetupAutoreleasePool();
void cocoaReleaseAutoreleasePool();
#endif
@@ -145,15 +128,9 @@
if (argc >= 2 && strncmp(argv[1], "-psn", 4) == 0) {
argv[1] = NULL;
argc = 1;
- cocoaSetWorkingDirectory();
}
#endif
- // change the working directory to enable doubleclicking in UIs
-#if defined(__BEOS__) || defined(__linux__)
- ChangeWorkingDirectory(argv[0]);
-#endif
-
_random_seeds[1][1] = _random_seeds[1][0] = _random_seeds[0][1] = _random_seeds[0][0] = time(NULL);
SeedMT(_random_seeds[0][1]);
@@ -168,81 +145,6 @@
return ret;
}
-void DeterminePaths()
-{
- char *s;
-
- _paths.game_data_dir = MallocT<char>(MAX_PATH);
- ttd_strlcpy(_paths.game_data_dir, GAME_DATA_DIR, MAX_PATH);
- #if defined SECOND_DATA_DIR
- _paths.second_data_dir = MallocT<char>(MAX_PATH);
- ttd_strlcpy(_paths.second_data_dir, SECOND_DATA_DIR, MAX_PATH);
- #endif
-
-#if defined(USE_HOMEDIR)
- {
- const char *homedir = getenv("HOME");
-
- if (homedir == NULL) {
- const struct passwd *pw = getpwuid(getuid());
- if (pw != NULL) homedir = pw->pw_dir;
- }
-
- _paths.personal_dir = str_fmt("%s" PATHSEP "%s", homedir, PERSONAL_DIR);
- }
-
-#else /* not defined(USE_HOMEDIR) */
-
- _paths.personal_dir = MallocT<char>(MAX_PATH);
- ttd_strlcpy(_paths.personal_dir, PERSONAL_DIR, MAX_PATH);
-
- // check if absolute or relative path
- s = strchr(_paths.personal_dir, '/');
-
- // add absolute path
- if (s == NULL || _paths.personal_dir != s) {
- getcwd(_paths.personal_dir, MAX_PATH);
- s = strchr(_paths.personal_dir, 0);
- *s++ = '/';
- ttd_strlcpy(s, PERSONAL_DIR, MAX_PATH);
- }
-
-#endif /* defined(USE_HOMEDIR) */
-
- s = strchr(_paths.personal_dir, 0);
-
- // append a / ?
- if (s[-1] != '/') strcpy(s, "/");
-
- _paths.save_dir = str_fmt("%ssave", _paths.personal_dir);
- _paths.autosave_dir = str_fmt("%s/autosave", _paths.save_dir);
- _paths.scenario_dir = str_fmt("%sscenario", _paths.personal_dir);
- _paths.heightmap_dir = str_fmt("%sscenario/heightmap", _paths.personal_dir);
- _paths.gm_dir = str_fmt("%sgm/", _paths.game_data_dir);
- _paths.data_dir = str_fmt("%sdata/", _paths.game_data_dir);
-
- if (_config_file == NULL)
- _config_file = str_fmt("%sopenttd.cfg", _paths.personal_dir);
-
- _highscore_file = str_fmt("%shs.dat", _paths.personal_dir);
- _log_file = str_fmt("%sopenttd.log", _paths.personal_dir);
-
-#if defined CUSTOM_LANG_DIR
- // sets the search path for lng files to the custom one
- _paths.lang_dir = MallocT<char>(MAX_PATH);
- ttd_strlcpy( _paths.lang_dir, CUSTOM_LANG_DIR, MAX_PATH);
-#else
- _paths.lang_dir = str_fmt("%slang/", _paths.game_data_dir);
-#endif
-
- // create necessary folders
- mkdir(_paths.personal_dir, 0755);
- mkdir(_paths.save_dir, 0755);
- mkdir(_paths.autosave_dir, 0755);
- mkdir(_paths.scenario_dir, 0755);
- mkdir(_paths.heightmap_dir, 0755);
-}
-
bool InsertTextBufferClipboard(Textbuf *tb)
{
return false;
--- a/src/unmovable_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/unmovable_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -344,7 +344,7 @@
uint maxx;
uint maxy;
- if (_opt.landscape == LT_CANDY) return;
+ if (_opt.landscape == LT_TOYLAND) return;
/* add radio tower */
i = ScaleByMapSize(1000);
@@ -362,7 +362,7 @@
}
} while (--i);
- if (_opt.landscape == LT_DESERT) return;
+ if (_opt.landscape == LT_TROPIC) return;
/* add lighthouses */
i = li;
--- a/src/variables.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/variables.h Mon Mar 26 22:15:38 2007 +0000
@@ -221,6 +221,8 @@
/** YAPF settings */
YapfSettings yapf;
+ uint8 scrollwheel_scrolling;
+ uint8 scrollwheel_multiplier;
};
VARDEF Patches _patches;
@@ -313,19 +315,22 @@
VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32];
-// Used for dynamic language support
-struct DynamicLanguages {
- int num; // number of languages
- int curr; // currently selected language index
- char curr_file[MAX_LANG]; // currently selected language file
- StringID dropdown[MAX_LANG + 1]; // used in settings dialog
- struct {
- char *name;
- char *file;
- } ent[MAX_LANG];
+/** Information about a language */
+struct Language {
+ char *name; ///< The internal name of the language
+ char *file; ///< The name of the language as it appears on disk
};
-VARDEF DynamicLanguages _dynlang;
+/** Used for dynamic language support */
+struct DynamicLanguages {
+ int num; ///< Number of languages
+ int curr; ///< Currently selected language index
+ char curr_file[MAX_PATH]; ///< Currently selected language file name without path (needed for saving the filename of the loaded language).
+ StringID dropdown[MAX_LANG + 1]; ///< List of languages in the settings gui
+ Language ent[MAX_LANG]; ///< Information about the languages
+};
+
+extern DynamicLanguages _dynlang; // defined in strings.cpp
VARDEF int _num_resolutions;
VARDEF uint16 _resolutions[32][2];
--- a/src/vehicle.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/vehicle.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -700,7 +700,7 @@
//if the aircraft carries passengers and is NOT full, then
//continue loading, no matter how much mail is in
if (v->type == VEH_AIRCRAFT &&
- v->cargo_type == CT_PASSENGERS &&
+ IsCargoInClass(v->cargo_type, CC_PASSENGERS) &&
v->cargo_cap != v->cargo_count) {
return true;
}
@@ -772,7 +772,7 @@
uint32 refit_mask = EngInfo(engine_type)->refit_mask;
if (refit_mask != 0) {
- for (CargoID cid = CT_PASSENGERS; cid < NUM_CARGO; cid++) {
+ for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
if (HASBIT(refit_mask, cid)) return cid;
}
}
@@ -2508,14 +2508,14 @@
case VEH_ROAD: {
const RoadVehicleInfo *rvi = RoadVehInfo(engine_type);
if (cargo_type == CT_INVALID) cargo_type = rvi->cargo_type;
- scheme = (cargo_type == CT_PASSENGERS) ? LS_BUS : LS_TRUCK;
+ scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_BUS : LS_TRUCK;
break;
}
case VEH_SHIP: {
const ShipVehicleInfo *svi = ShipVehInfo(engine_type);
if (cargo_type == CT_INVALID) cargo_type = svi->cargo_type;
- scheme = (cargo_type == CT_PASSENGERS) ? LS_PASSENGER_SHIP : LS_FREIGHT_SHIP;
+ scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_PASSENGER_SHIP : LS_FREIGHT_SHIP;
break;
}
--- a/src/vehicle_gui.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/vehicle_gui.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -206,7 +206,7 @@
if (u->cargo_cap == 0) continue;
/* Loop through all cargos in the refit mask */
- for (CargoID cid = 0; cid != NUM_CARGO && num_lines < max_lines; cid++) {
+ for (CargoID cid = 0; cid < NUM_CARGO && num_lines < max_lines; cid++) {
/* Skip cargo type if it's not listed */
if (!HASBIT(cmask, cid)) continue;
@@ -613,14 +613,13 @@
AcceptedCargo cargoa;
AcceptedCargo cargob;
int r = 0;
- int i;
memset(cargoa, 0, sizeof(cargoa));
memset(cargob, 0, sizeof(cargob));
for (v = va; v != NULL; v = v->next) cargoa[v->cargo_type] += v->cargo_cap;
for (v = vb; v != NULL; v = v->next) cargob[v->cargo_type] += v->cargo_cap;
- for (i = 0; i < NUM_CARGO; i++) {
+ for (CargoID i = 0; i < NUM_CARGO; i++) {
r = cargoa[i] - cargob[i];
if (r != 0) break;
}
--- a/src/vehicle_gui.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/vehicle_gui.h Mon Mar 26 22:15:38 2007 +0000
@@ -32,7 +32,7 @@
void PlayerVehWndProc(BaseWindow *w, WindowEvent *e);
-void DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number);
+int DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number);
void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, VehicleID selection);
void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection);
--- a/src/video/cocoa_v.mm Mon Mar 26 21:31:37 2007 +0000
+++ b/src/video/cocoa_v.mm Mon Mar 26 22:15:38 2007 +0000
@@ -68,6 +68,7 @@
#include "../debug.h"
#include "../macros.h"
#include "../os/macosx/splash.h"
+#include "../variables.h"
#include "cocoa_v.h"
#include "cocoa_keys.h"
@@ -653,6 +654,10 @@
} else if ([ event deltaY ] < 0.0) { /* Scroll down */
_cursor.wheel++;
} /* else: deltaY was 0.0 and we don't want to do anything */
+
+ /* Set the scroll count for scrollwheel scrolling */
+ _cursor.h_wheel -= (int)([ event deltaX ]* 5 * _patches.scrollwheel_multiplier);
+ _cursor.v_wheel -= (int)([ event deltaY ]* 5 * _patches.scrollwheel_multiplier);
break;
default:
@@ -2042,22 +2047,6 @@
_cocoa_video_dialog = false;
}
-
-/* This is needed since OS X applications are started with the working dir set to / when double-clicked */
-void cocoaSetWorkingDirectory()
-{
- char parentdir[MAXPATHLEN];
- int chdir_ret;
- CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
- CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
- if (CFURLGetFileSystemRepresentation(url2, true, (unsigned char*)parentdir, MAXPATHLEN)) {
- chdir_ret = chdir(parentdir); /* chdir to the binary app's parent */
- assert(chdir_ret == 0);
- }
- CFRelease(url);
- CFRelease(url2);
-}
-
/* These are called from main() to prevent a _NSAutoreleaseNoPool error when
* exiting before the cocoa video driver has been loaded
*/
--- a/src/void_map.h Mon Mar 26 21:31:37 2007 +0000
+++ b/src/void_map.h Mon Mar 26 22:15:38 2007 +0000
@@ -13,6 +13,7 @@
_m[t].m4 = 0;
_m[t].m5 = 0;
_m[t].m6 = 0;
+ _me[t].m7 = 0;
}
#endif /* VOID_MAP_H */
--- a/src/water_cmd.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/water_cmd.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -212,7 +212,7 @@
/** Build a piece of canal.
* @param tile end tile of stretch-dragging
* @param p1 start tile of stretch-dragging
- * @param p2 ctrl pressed - toggles ocean / canals at sealevel
+ * @param p2 ctrl pressed - toggles ocean / canals at sealevel (ocean only allowed in the scenario editor)
*/
int32 CmdBuildCanal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
@@ -223,6 +223,8 @@
int sx, sy;
if (p1 >= MapSize()) return CMD_ERROR;
+ /* Outside of the editor you can only build canals, not oceans */
+ if (HASBIT(p2, 0) && _game_mode != GM_EDITOR) return CMD_ERROR;
x = TileX(tile);
y = TileY(tile);
@@ -612,8 +614,7 @@
if (v->type == VEH_ROAD) { // flood bus/truck
pass = 1; // driver
- if (v->cargo_type == CT_PASSENGERS)
- pass += v->cargo_count;
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
v->vehstatus |= VS_CRASHED;
v->u.road.crashed_ctr = 2000; // max 2220, disappear pretty fast
@@ -627,7 +628,7 @@
// crash all wagons, and count passangers
BEGIN_ENUM_WAGONS(v)
- if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count;
+ if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
v->vehstatus |= VS_CRASHED;
MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1);
END_ENUM_WAGONS(v)
--- a/src/win32.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/win32.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -13,6 +13,7 @@
#include "string.h"
#include "gfx.h"
#include "window.h"
+#include "fileio.h"
#include <windows.h>
#include <winnt.h>
#include <wininet.h>
@@ -942,42 +943,19 @@
}
#endif
-void DeterminePaths()
+void DetermineBasePaths(const char *exe)
{
- char *s, *cfg;
-
- _paths.personal_dir = _paths.game_data_dir = cfg = (char*)malloc(MAX_PATH);
+ _paths.personal_dir = _paths.game_data_dir = MallocT<char>(MAX_PATH);
#if defined(UNICODE)
TCHAR path[MAX_PATH];
GetCurrentDirectory(MAX_PATH - 1, path);
- convert_from_fs(path, cfg, MAX_PATH);
+ convert_from_fs(path, _paths.personal_dir, MAX_PATH);
#else
- GetCurrentDirectory(MAX_PATH - 1, cfg);
+ GetCurrentDirectory(MAX_PATH - 1, _paths.personal_dir);
#endif
- cfg[0] = toupper(cfg[0]);
- s = strchr(cfg, '\0');
- if (s[-1] != '\\') strcpy(s, "\\");
-
- _paths.save_dir = str_fmt("%ssave", cfg);
- _paths.autosave_dir = str_fmt("%s\\autosave", _paths.save_dir);
- _paths.scenario_dir = str_fmt("%sscenario", cfg);
- _paths.heightmap_dir = str_fmt("%sscenario\\heightmap", cfg);
- _paths.gm_dir = str_fmt("%sgm\\", cfg);
- _paths.data_dir = str_fmt("%sdata\\", cfg);
- _paths.lang_dir = str_fmt("%slang\\", cfg);
-
- if (_config_file == NULL)
- _config_file = str_fmt("%sopenttd.cfg", _paths.personal_dir);
-
- _highscore_file = str_fmt("%shs.dat", _paths.personal_dir);
- _log_file = str_fmt("%sopenttd.log", _paths.personal_dir);
-
- // make (auto)save and scenario folder
- CreateDirectory(OTTD2FS(_paths.save_dir), NULL);
- CreateDirectory(OTTD2FS(_paths.autosave_dir), NULL);
- CreateDirectory(OTTD2FS(_paths.scenario_dir), NULL);
- CreateDirectory(OTTD2FS(_paths.heightmap_dir), NULL);
+ _paths.personal_dir[0] = toupper(_paths.personal_dir[0]);
+ AppendPathSeparator(_paths.personal_dir, MAX_PATH);
}
/**
--- a/src/window.cpp Mon Mar 26 21:31:37 2007 +0000
+++ b/src/window.cpp Mon Mar 26 22:15:38 2007 +0000
@@ -1699,11 +1699,13 @@
WindowEvent e;
BaseWindow *w;
+ bool scrollwheel_scrolling = _patches.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
+
if (!_scrolling_viewport) return true;
w = BaseWindow::FindFromPt(_cursor.pos.x, _cursor.pos.y);
- if (!_right_button_down || w == NULL) {
+ if (!(_right_button_down || scrollwheel_scrolling) || w == NULL) {
_cursor.fix_at = false;
_scrolling_viewport = false;
return true;
@@ -1717,6 +1719,14 @@
e.we.scroll.delta.y = _cursor.delta.y;
}
+ if (scrollwheel_scrolling) {
+ /* We are using scrollwheels for scrolling */
+ e.we.scroll.delta.x = _cursor.h_wheel;
+ e.we.scroll.delta.y = _cursor.v_wheel;
+ _cursor.v_wheel = 0;
+ _cursor.h_wheel = 0;
+ }
+
/* Create a scroll-event and send it to the window */
e.event = WE_SCROLL;
w->wndproc(w, &e);
@@ -1933,6 +1943,7 @@
int x,y;
BaseWindow *w;
ViewPort *vp;
+ bool scrollwheel_scrolling = _patches.scrollwheel_scrolling == 1 && (_cursor.v_wheel != 0 || _cursor.h_wheel != 0);
DecreaseWindowCounters();
HandlePlacePresize();
@@ -1948,7 +1959,7 @@
x = _cursor.pos.x;
y = _cursor.pos.y;
- if (click == 0 && mousewheel == 0) return;
+ if (click == 0 && mousewheel == 0 && !scrollwheel_scrolling) return;
w = BaseWindow::FindFromPt(x, y);
if (w == NULL) return;
@@ -1959,18 +1970,22 @@
if (vp != NULL && (_game_mode == GM_MENU || IsGeneratingWorld())) return;
if (mousewheel != 0) {
- WindowEvent e;
+ if (_patches.scrollwheel_scrolling == 0) {
+ /* Scrollwheel is in zoom mode. Make the zoom event. */
+ WindowEvent e;
- /* Send WE_MOUSEWHEEL event to window */
- e.event = WE_MOUSEWHEEL;
- e.we.wheel.wheel = mousewheel;
- w->wndproc(w, &e);
+ /* Send WE_MOUSEWHEEL event to window */
+ e.event = WE_MOUSEWHEEL;
+ e.we.wheel.wheel = mousewheel;
+ w->wndproc(w, &e);
+ }
/* Dispatch a MouseWheelEvent for widgets if it is not a viewport */
if (vp == NULL) w->DispatchMouseWheelEvent(w->GetWidgetFromPos(x - w->Left(), y - w->Top()), mousewheel);
}
if (vp != NULL) {
+ if (scrollwheel_scrolling) click = 2; // we are using the scrollwheel in a viewport, so we emulate right mouse button
switch (click) {
case 1:
DEBUG(misc, 2, "Cursor: 0x%X (%d)", _cursor.sprite, _cursor.sprite);
@@ -1999,7 +2014,12 @@
}
} else {
switch (click) {
- case 1: w->DispatchLeftClickEvent (x - w->Left(), y - w->Top()); break;
+ case 1: w->DispatchLeftClickEvent(x - w->Left(), y - w->Top()); break;
+ default:
+ if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break;
+ /* We try to use the scrollwheel to scroll since we didn't touch any of the buttons.
+ * Simulate a right button click so we can get started. */
+ /* fallthough */
case 2: w->DispatchRightClickEvent(x - w->Left(), y - w->Top()); break;
}
}