mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-09-15 12:59:45 +00:00
Compare commits
191
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41e8be2835 | ||
|
|
698d840581 | ||
|
|
060b2b736b | ||
|
|
2d6ebd3bf4 | ||
|
|
fa64ae9b3a | ||
|
|
289206b033 | ||
|
|
4682434bc9 | ||
|
|
2f6c840ebf | ||
|
|
6a2ae92811 | ||
|
|
89a135293a | ||
|
|
6435a89c28 | ||
|
|
d426906a01 | ||
|
|
be44f1306f | ||
|
|
b5468e7a80 | ||
|
|
613743538d | ||
|
|
cfbbcf1597 | ||
|
|
10a7678beb | ||
|
|
22922414eb | ||
|
|
3f9fa65a42 | ||
|
|
795a528328 | ||
|
|
e54a1f6721 | ||
|
|
e95718bf43 | ||
|
|
c9609bbbc2 | ||
|
|
a82118f360 | ||
|
|
2707186f6a | ||
|
|
07e14525b8 | ||
|
|
922d60f516 | ||
|
|
9ca4b629cd | ||
|
|
7efd7e19ed | ||
|
|
6c9078fd30 | ||
|
|
d89095b3ec | ||
|
|
b8c9988d9f | ||
|
|
6371b75bcc | ||
|
|
5f28591610 | ||
|
|
73da045f50 | ||
|
|
561449992a | ||
|
|
22d17aa745 | ||
|
|
c0b051eb33 | ||
|
|
772de6b52d | ||
|
|
488b525161 | ||
|
|
6a17bf91e3 | ||
|
|
3f900d3580 | ||
|
|
39d7f3b2bd | ||
|
|
ff6aeb8791 | ||
|
|
39c5cfc5d1 | ||
|
|
2f4a77f47e | ||
|
|
b3fdf69ab5 | ||
|
|
62128e8263 | ||
|
|
805afdb002 | ||
|
|
92b90d877e | ||
|
|
82346d4608 | ||
|
|
32cd182ecc | ||
|
|
4a203e8a49 | ||
|
|
1e7c3fd2ff | ||
|
|
a2297dc594 | ||
|
|
b8559492b5 | ||
|
|
7ab524b048 | ||
|
|
9b4beb0a5c | ||
|
|
7645c5ac43 | ||
|
|
6e4dd56158 | ||
|
|
4d8a93c870 | ||
|
|
a1df4bea68 | ||
|
|
89f245ab2f | ||
|
|
1d3ce9ef1b | ||
|
|
bd9f07e5a0 | ||
|
|
4784c3ac3c | ||
|
|
bc9afec3b0 | ||
|
|
53c9846f14 | ||
|
|
93b26e8e3d | ||
|
|
0ab078158e | ||
|
|
679cd3c21b | ||
|
|
2709454040 | ||
|
|
7be31ee03e | ||
|
|
0c497dd113 | ||
|
|
1b3e2309df | ||
|
|
804542b3f3 | ||
|
|
6b86ee9888 | ||
|
|
080a941eda | ||
|
|
85255ea001 | ||
|
|
75351f4043 | ||
|
|
110e25e859 | ||
|
|
26eb9eb7e2 | ||
|
|
c6b46725db | ||
|
|
c58a910c8e | ||
|
|
fad00367ae | ||
|
|
93ae848b0a | ||
|
|
6cb017456a | ||
|
|
c53c869556 | ||
|
|
d811238dd0 | ||
|
|
ff469ab352 | ||
|
|
ee67d10c80 | ||
|
|
3d1008318b | ||
|
|
09d7f172a6 | ||
|
|
28676531b0 | ||
|
|
1b237216a8 | ||
|
|
eb2b510e01 | ||
|
|
87dade4698 | ||
|
|
998246430a | ||
|
|
e8e535f58c | ||
|
|
ab91d8eb4f | ||
|
|
313654f18d | ||
|
|
b1546da65e | ||
|
|
00f9a36645 | ||
|
|
0e802c462d | ||
|
|
49e191cc8e | ||
|
|
12b4fa7dba | ||
|
|
7e6ccf3a0a | ||
|
|
60874f88d0 | ||
|
|
4eb4aad54f | ||
|
|
57c6133c3b | ||
|
|
da09ebc59a | ||
|
|
beb7f63746 | ||
|
|
91e95dfd53 | ||
|
|
352fd000ea | ||
|
|
f5364269b5 | ||
|
|
9d8496e65e | ||
|
|
3281b91c48 | ||
|
|
0a16e4ee91 | ||
|
|
dbef775e76 | ||
|
|
d8567d2699 | ||
|
|
ec54970058 | ||
|
|
bd72b9d2a4 | ||
|
|
9845f10668 | ||
|
|
e898a6a9f6 | ||
|
|
63319e4658 | ||
|
|
ade2f29f5d | ||
|
|
35be634974 | ||
|
|
8ffc288901 | ||
|
|
716f4e924e | ||
|
|
c8a4d122c5 | ||
|
|
2da2b57631 | ||
|
|
51b97aa3c1 | ||
|
|
f420b5a66a | ||
|
|
e2ef4aff46 | ||
|
|
be106c77a9 | ||
|
|
29a0dd65a9 | ||
|
|
4863d934af | ||
|
|
c597237032 | ||
|
|
ce9a7acc8f | ||
|
|
03088dadda | ||
|
|
68412eebec | ||
|
|
4cc2d71d6d | ||
|
|
b890bcb840 | ||
|
|
0b27228d9a | ||
|
|
eab47d2227 | ||
|
|
7dafd04f4b | ||
|
|
ace917f872 | ||
|
|
995e80ba57 | ||
|
|
aac2289bf8 | ||
|
|
38ed740e80 | ||
|
|
bf45eacd97 | ||
|
|
7e6e7a6737 | ||
|
|
b621e4545c | ||
|
|
4f1e96acf1 | ||
|
|
2103f7e91a | ||
|
|
e4b8a4e3bf | ||
|
|
ebb360f48c | ||
|
|
5268d03abd | ||
|
|
73d26d3831 | ||
|
|
017a7f902b | ||
|
|
868d035b45 | ||
|
|
6a38f88bd1 | ||
|
|
1b61d234a1 | ||
|
|
3408814169 | ||
|
|
d9305ef99d | ||
|
|
80591d73c1 | ||
|
|
b68d37f2aa | ||
|
|
7daf2a4ec0 | ||
|
|
810873ff33 | ||
|
|
8e3e93b96f | ||
|
|
37b9c31118 | ||
|
|
b25cf57542 | ||
|
|
1c2d56d314 | ||
|
|
6b5992788c | ||
|
|
ad15cd37a6 | ||
|
|
4ec6c19d44 | ||
|
|
b22945350f | ||
|
|
3ca65ab7b3 | ||
|
|
a25d6c64dd | ||
|
|
c6a90361fc | ||
|
|
8b6a8a8935 | ||
|
|
13456934b1 | ||
|
|
7814e6e792 | ||
|
|
2d17f09902 | ||
|
|
cae28bf8eb | ||
|
|
666fbb28c2 | ||
|
|
62bc55cf7b | ||
|
|
36f55a8823 | ||
|
|
9ddcbaf9b7 | ||
|
|
675f1376e0 | ||
|
|
f1a4bad7f7 |
+66
-1
@@ -1,3 +1,68 @@
|
||||
1.1.0-beta4 (2011-01-21)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [NewGRF] Rail type property to influence sorting of rail types in the drop down list [FS#4394] (r21866)
|
||||
- Feature: [Network] Console command to change the password of other companies for servers [FS#4368] (r21855)
|
||||
- Feature: [NewGRF] Introduction dates/required types for rail types; e.g. introduce a particular rail type in 1960 (or when a vehicle using it is introduced), but also allow limiting its introduction to only happen when the required railtypes are available [FS#4393] (r21842)
|
||||
- Feature: Limit vehicle lateness to the length of a full timetable cycle, e.g. when a cycle takes 50 days and the vehicle is 65 days later reduce the lateness to 15 days (r21832)
|
||||
- Feature: After building a road or tram bridge/tunnel, connect it to any existing road or tram (r21778, r21777)
|
||||
- Feature: Display NewGRF object sprites during object picking (r21772)
|
||||
- Feature: Display NewGRF station sprites during station picking (r21755)
|
||||
- Change: Allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge (r21838)
|
||||
- Change: Only show rail/road types that will eventually be available in-game. For example do not show trams when there is no tram NewGRF loaded (r21817)
|
||||
- Change: Keep aqueducts and road/tram tunnels and bridges after removing a company (r21780)
|
||||
- Fix: Distant-join station would build at the wrong location when having persistent building turned on and selecting a 'second' location for the station tile [FS#4430] (r21864)
|
||||
- Fix: Slowing down of trains was done by reducing the speed by 10%, but also when you are just 1% too fast, so limit the slowdown till the new maximum speed [FS#4423] (r21847)
|
||||
- Fix: Left-mouse-button dragging would switch over to other viewports instead of staying locked to the viewport you started on [FS#4419] (r21837)
|
||||
- Fix: When a train was reversed while inside a tunnel/bridge, it would not have (re)set the GOINGUP/DOWN bits after leaving the tunnel/bridge (r21836)
|
||||
- Fix: Desync debug savegames might not be actually saved in case threading is enabled, which is enabled by default [FS#4427] (r21833)
|
||||
- Fix: Service orders for trains/aircraft would (sometimes) not get a time when autofilling [FS#4414] (r21831)
|
||||
- Fix: Crash with the small map window on big endian platforms [FS#4417] (r21830)
|
||||
- Fix: The expectations from the 'always build infrastructure' setting name/description did not match the behaviour [FS#4007] (r21826)
|
||||
- Fix: Allow dragging of combo signals (again) [FS#4378] (r21816)
|
||||
- Fix: [YAPF] Apply a pathfinder penalty for back of one-way path signals so those arenot preferred over other possibilities [FS#3908] (r21815)
|
||||
- Fix: Check GRF version from action 8, and disallow usage of GRFs with versions above 7 (r21814)
|
||||
- Fix: Crash when displaying the owner view [FS#4411] (r21813)
|
||||
- Fix: Do not create automatic orders when there are no manual orders, and remove unreached automatic orders when reaching an ordered waypoint or depot [FS#4404] (r21809, r21808)
|
||||
- Fix: Loading a TTO savegame failed after loading a TTDP savegame (r21799, r21798)
|
||||
- Fix: The size (in characters) of the string inputs was too small for loading some TTD savegames (r21797)
|
||||
- Fix: Drive through road stop state was not properly converted from TTDPatch savegames [FS#4398] (r21796)
|
||||
- Fix: Broken usage of GetTileOwner() caused wrong conversion of old savegames (r21793)
|
||||
- Fix: Terraforming limit was off-by-one when terraforming a single tile height [FS#4407] (r21791)
|
||||
- Fix: TTDPatch savegames can have train waypoints encoded as buoys [FS#4398] (r21790)
|
||||
- Fix: When the font misses the fallback character '?', use the sprite font's '?' instead [FS#4405] (r21789)
|
||||
- Fix: Crash due to invalid rail station width and height data stored in TTDPatch savegames [FS#4398] (r21786)
|
||||
- Fix: Crash when converting savegame with custom waypoint name (r21784)
|
||||
- Fix: Diagonal tile iterator failed for A * 0 selections [FS#4396] (r21768)
|
||||
- Fix: Do not limit tile clearing during bankruptcy [FS#4397] (r21767)
|
||||
- Fix: PBS reservation was not shown on road crossings with NewGRF railtypes [FS#4369] (r21765)
|
||||
- Remove: The 'stopall' console command, as its functionality was broken. Group start/stop commands can be used instead [FS#4409] (r21804)
|
||||
|
||||
|
||||
1.1.0-beta3 (2011-01-09)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Configurable limit amount of tiles that can be cleared/terraformed by a company [FS#4331] (r21728)
|
||||
- Feature: Show a list of companies in the owner legend and allow them to be toggled for visibility (r21720, r21718)
|
||||
- Feature: Console command 'list_ai_libs' to get a list of recognized AI libraries [FS#4372] (r21703)
|
||||
- Feature: Allow changing the AI configuration in the scenario editor / in game [FS#4362] (r21696)
|
||||
- Change: Tune 'realistic' acceleration even more to make more trains reach their top speed, and make it behave more like TTDPatch (r21712)
|
||||
- Change: Display the minimum height of the tile in the LandInfo window instead of the height of the northern corner. So it is more useful for NewGRF and AI developers, and maybe more transparent for players (r21711)
|
||||
- Fix: The diagonal iterator would iterate twice over some tiles [FS#4395] (r21747)
|
||||
- Fix: [NewGRF] Canal variable 83 accessed water random bits also for non-water tiles (e.g. watery industries or objects) (r21746)
|
||||
- Fix: [NewGRF] Canal variable 80 shall return consistent heights within a lock (r21745)
|
||||
- Fix: Allow Ctrl+Clicking automatic orders for scrolling to their destination (r21744)
|
||||
- Fix: Coast tiles were not drawn under bridges [FS#4386] (r21743)
|
||||
- Fix: Make clearing refit orders work again [FS#4388] (r21739)
|
||||
- Fix: Start loading when cur_order_index points to the destination station, i.e. after deleting not-reached automatic orders [FS#4384] (r21738)
|
||||
- Fix: A loading order was also marked as 'not part of orders' when the order before the current order was deleted (r21737)
|
||||
- Fix: Admin bots were not always notified of password changes [FS#4377] (r21727)
|
||||
- Fix: Vehicle sprite was cached into a 16 bit variable, causing incorrect sprites to be displayed (r21709)
|
||||
- Fix: [NewGRF] Report TTDPatch flag 4A (newobjects) as set (r21708)
|
||||
- Fix: The old ship pathfinder is too stupid to provide 'lost' notices; it would even get lost while following its own path [FS#4370] (r21706)
|
||||
- Fix: Do not perform any more checks after the connection is closed [FS#4374] (r21704)
|
||||
- Fix: Changing AI settings ingame was impossible when the difficulty level was other than custom (r21694)
|
||||
- Fix: Due to an error in the Debian changelog building of Debian/Ubuntu packages failed (r21682)
|
||||
|
||||
|
||||
1.1.0-beta2 (2010-12-31)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: Command logging using the admin interface (r21668)
|
||||
@@ -2321,7 +2386,7 @@
|
||||
- Fix: Several desync fixes (incorrect roadstop update of old games, autoreplace bugs) [FS#551] (r8137, r8147, r8157)
|
||||
- Fix: Some disaster-events fixed: combat chopper shoots from right position, submarine once again moves around (r8140, r8158)
|
||||
- Fix: 'out of sprite memory' warning messages due to incorrect assumption of requested memory for sprites (r8133)
|
||||
- Fix: Bouys are now built and numbered 1..9 not 9..1 [FS#538] (r8123)
|
||||
- Fix: Buoys are now built and numbered 1..9 not 9..1 [FS#538] (r8123)
|
||||
- Fix: Clicking for more news properly cycles through the news history backwards, and does not show the first item doubly if it's already open (r8049)
|
||||
- Fix: Crash when removing a town in the scenario editor while the query window is open for one of the town's tiles (r8030)
|
||||
- Fix: Overflow of system-ticks was not handled properly, resulting in a possibly unresponsive server/client (r8028)
|
||||
|
||||
+13
-5
@@ -1,15 +1,24 @@
|
||||
32bpp and OpenTTD
|
||||
=================
|
||||
Last updated: 2007-06-13
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) About
|
||||
2.0) The format
|
||||
|
||||
|
||||
1.0) About
|
||||
---- -----
|
||||
OpenTTD has 32bpp support. This means: OpenTTD still is 8bpp, but it has the
|
||||
posibility to override the graphics with 32bpp. This means that it isn't a
|
||||
replacement of grf or newgrf, but simply an addition. If you want to use 32bpp
|
||||
graphics of a newgrf, you do need the newgrf itself too (with 8bpp graphics).
|
||||
|
||||
|
||||
The Format
|
||||
----------
|
||||
|
||||
2.0) The format
|
||||
---- ----------
|
||||
32bpp images are stored in PNG. They should go in:
|
||||
data/sprites/<grfname>/<SpriteID>.png
|
||||
|
||||
@@ -33,4 +42,3 @@ to add this information. Sadly enough most graphical editors trashes those
|
||||
chunks upon save, so you have to readd it every time you save your image.
|
||||
|
||||
Your images should be the same as the grf, in size.
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
STRGEN USAGE
|
||||
------------
|
||||
OpenTTD and strgen
|
||||
Last updated: 2009-06-30
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) strgen usage
|
||||
* 1.1) Examples
|
||||
* 1.2) strgen command switches
|
||||
|
||||
|
||||
1.0) strgen usage
|
||||
---- ------------
|
||||
This guide is only interesting for people who want to alter something
|
||||
themselves without access to translator.openttd.org. Please note that
|
||||
your compiled language file will only be compatible with the OpenTTD version
|
||||
@@ -14,8 +26,8 @@ strgen takes as argument a txt file and translates it to a lng file, allowing
|
||||
it to be used inside OpenTTD. strgen needs the master language file
|
||||
english.txt to work. Below are some examples of strgen usage.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
1.1) Examples
|
||||
---- --------
|
||||
Example 1:
|
||||
if you are in the root of your working copy (svn code), you should type
|
||||
strgen/strgen -s lang lang/english.txt
|
||||
@@ -35,8 +47,8 @@ resulting language file to go to /tmp. Use
|
||||
You can interchange english.txt to whichever language you want to generate a
|
||||
.lng file for.
|
||||
|
||||
STRGEN COMMAND SWITCHES
|
||||
-----------------------
|
||||
1.2) strgen command switches
|
||||
---- -----------------------
|
||||
-v | --version
|
||||
strgen will tell what svn revision it was last modified
|
||||
|
||||
|
||||
+37
-40
@@ -1,19 +1,23 @@
|
||||
Admin Network
|
||||
|
||||
Preface
|
||||
1. Joining the network
|
||||
2. Asking for updates
|
||||
3. Polling manually
|
||||
4. Sending rcon commands
|
||||
5. Sending chat
|
||||
6. Receiving chat
|
||||
7. Disconnecting
|
||||
8. Certain packet information
|
||||
OpenTTD's admin network
|
||||
Last updated: 2011-01-20
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Preface
|
||||
----------
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) Preface
|
||||
2.0) Joining the network
|
||||
3.0) Asking for updates
|
||||
* 3.1) Polling manually
|
||||
4.0) Sending rcon commands
|
||||
5.0) Sending chat
|
||||
* 5.1) Receiving chat
|
||||
6.0) Disconnecting
|
||||
7.0) Certain packet information
|
||||
|
||||
|
||||
1.0) Preface
|
||||
---- -------
|
||||
The admin network provides a dedicated network protocol designed for other
|
||||
applications to communicate with OpenTTD. Connected applications can execute
|
||||
console commands remotely (rcon commands) with no further authentication.
|
||||
@@ -33,12 +37,14 @@ Admin Network
|
||||
removed from packets in later versions, except the possibility that complete
|
||||
packets are dropped in favour of a new packet.
|
||||
This though will be reflected in the protocol version as announced in the
|
||||
ADMIN_PACKET_SERVER_PROTOCOL in section 1.
|
||||
ADMIN_PACKET_SERVER_PROTOCOL in section 2.0).
|
||||
|
||||
A reference implementation in Java for a client connecting to the admin interface
|
||||
can be found at: http://dev.openttdcoop.org/projects/joan
|
||||
|
||||
|
||||
1. Joining the network
|
||||
----------------------
|
||||
|
||||
2.0) Joining the network
|
||||
---- -------------------
|
||||
Create a TCP connection to the server on port 3977. The application is
|
||||
expected to authenticate within 10 seconds.
|
||||
|
||||
@@ -68,9 +74,8 @@ Admin Network
|
||||
However, ADMIN_PACKET_SERVER_WELCOME only after a ADMIN_PACKET_SERVER_NEWGAME
|
||||
|
||||
|
||||
2. Asking for updates
|
||||
---------------------
|
||||
|
||||
3.0) Asking for updates
|
||||
---- ------------------
|
||||
Asking for updates is done with ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY.
|
||||
With this packet you define which update you wish to receive at which
|
||||
frequency.
|
||||
@@ -116,9 +121,8 @@ Admin Network
|
||||
ADMIN_UPDATE_CMD_LOGGING results in the server sending:
|
||||
- ADMIN_PACKET_SERVER_CMD_LOGGING
|
||||
|
||||
3. Polling manually
|
||||
-------------------
|
||||
|
||||
3.1) Polling manually
|
||||
---- ----------------
|
||||
Certain AdminUpdateTypes can also be polled:
|
||||
- ADMIN_UPDATE_DATE
|
||||
- ADMIN_UPDATE_CLIENT_INFO
|
||||
@@ -138,9 +142,8 @@ Admin Network
|
||||
Additional debug information can be found with a debug level of net=3.
|
||||
|
||||
|
||||
4. Sending rcon commands
|
||||
------------------------
|
||||
|
||||
4.0) Sending rcon commands
|
||||
---- ---------------------
|
||||
Rcon runs separate from the ADMIN_UPDATE_CONSOLE AdminUpdateType. Requesting
|
||||
the execution of a remote console command is done with the packet
|
||||
ADMIN_PACKET_ADMIN_RCON.
|
||||
@@ -158,9 +161,8 @@ Admin Network
|
||||
was not sent from the admin network.
|
||||
|
||||
|
||||
5. Sending Chat
|
||||
---------------
|
||||
|
||||
5.0) Sending chat
|
||||
---- ------------
|
||||
Sending a ADMIN_PACKET_ADMIN_CHAT results in chat originating from the server.
|
||||
|
||||
Currently four types of chat are supported:
|
||||
@@ -173,10 +175,8 @@ Admin Network
|
||||
using the respective DestType and ID.
|
||||
This is a message prefixed with the 3 stars, e.g. *** foo has joined the game
|
||||
|
||||
|
||||
6. Receiving chat
|
||||
-----------------
|
||||
|
||||
5.1) Receiving chat
|
||||
---- -------------
|
||||
Register ADMIN_UPDATE_CHAT at ADMIN_FREQUENCY_AUTOMATIC to receive chat.
|
||||
The application will be able to receive all chat the server can see.
|
||||
|
||||
@@ -184,16 +184,14 @@ Admin Network
|
||||
private chat for to the server is distributed into the admin network.
|
||||
|
||||
|
||||
7. Disconnecting
|
||||
----------------
|
||||
|
||||
6.0) Disconnecting
|
||||
---- -------------
|
||||
It is a kind thing to say good bye before leaving. Do this by sending the
|
||||
ADMIN_PACKET_ADMIN_QUIT packet.
|
||||
|
||||
|
||||
8. Certain packet information
|
||||
-----------------------------
|
||||
|
||||
7.0) Certain packet information
|
||||
---- --------------------------
|
||||
All ADMIN_PACKET_SERVER_* packets have an enum value greater 100.
|
||||
|
||||
ADMIN_PACKET_SERVER_WELCOME
|
||||
@@ -211,4 +209,3 @@ Admin Network
|
||||
treated as such. Do not rely on IDs or names to be constant
|
||||
across different versions / revisions of OpenTTD.
|
||||
Data provided in this packet is for logging purposes only.
|
||||
|
||||
|
||||
+68
-22
@@ -1,9 +1,22 @@
|
||||
Multiplayer Manual for OpenTTD
|
||||
==============================
|
||||
Multiplayer manual for OpenTTD
|
||||
Last updated: 2011-01-20
|
||||
------------------------------------------------------------------------
|
||||
|
||||
1. Starting a Server
|
||||
---------------------
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) Starting a server
|
||||
2.0) Connecting to a server
|
||||
* 2.1) Connecting to a server over the console
|
||||
3.0) Playing internet games
|
||||
4.0) Tips for servers
|
||||
* 4.1) Imposing landscaping limits
|
||||
5.0) Some useful things
|
||||
6.0) Troubleshooting
|
||||
|
||||
|
||||
1.0) Starting a server
|
||||
---- -----------------
|
||||
- Click "multiplayer" on the startup screen
|
||||
- Click "start server"
|
||||
- Type in a game name
|
||||
@@ -14,9 +27,8 @@ Multiplayer Manual for OpenTTD
|
||||
- Start playing
|
||||
|
||||
|
||||
2. Connecting to a Server
|
||||
--------------------------
|
||||
|
||||
2.0) Connecting to a server
|
||||
---- ----------------------
|
||||
- Click "multiplayer" on the startup screen
|
||||
|
||||
- If you want to connect to any network game in your LAN click on 'LAN', then
|
||||
@@ -43,17 +55,14 @@ Multiplayer Manual for OpenTTD
|
||||
|
||||
- Happy playing
|
||||
|
||||
|
||||
3. Connecting to a Server over the Console
|
||||
-------------------------------------------
|
||||
|
||||
2.1) Connecting to a server over the console
|
||||
---- ---------------------------------------
|
||||
- Open the console and type in the following command:
|
||||
connect <ip/host>:<port>#<company-no>
|
||||
|
||||
|
||||
4. Playing Internet-Games
|
||||
--------------------------
|
||||
|
||||
3.0) Playing internet games
|
||||
---- ----------------------
|
||||
- Servers with a red dot behind it have a different version then you have. You
|
||||
will not be able to join those servers.
|
||||
|
||||
@@ -83,9 +92,8 @@ Multiplayer Manual for OpenTTD
|
||||
NB: changing frame_freq has more effect on the bandwidth then sync_freq.
|
||||
|
||||
|
||||
5. Tips for servers
|
||||
--------------------
|
||||
|
||||
4.0) Tips for servers
|
||||
---- ----------------
|
||||
- You can launch a dedicated server by adding -D as parameter.
|
||||
- In UNIX like systems, you can fork your dedicated server by adding -f as
|
||||
parameter.
|
||||
@@ -141,10 +149,49 @@ Multiplayer Manual for OpenTTD
|
||||
maximum memory usage for packets is:
|
||||
#max_clients * #max_clients * bytes_per_frame * 10 KiB.
|
||||
|
||||
4.1) Imposing landscaping limits
|
||||
---- ---------------------------
|
||||
- You can impose limits on companies by the following 4 settings:
|
||||
- terraform_per_64k_frames
|
||||
- terraform_frame_burst
|
||||
- clear_per_64k_frames
|
||||
- clear_frame_burst
|
||||
|
||||
6. Some useful things
|
||||
----------------------
|
||||
- Explaining 'per_64K_frames' and 'burst'
|
||||
- 'burst' defines 3 things, the maximum limit, the limit of a single action,
|
||||
and the initial value for the limit assigned to a new company.
|
||||
This setting is fairly simple and requires no math.
|
||||
|
||||
A value of 1 means a single tile can be affected by a single action.
|
||||
This results in having to click 400 times when wanting to cover an area
|
||||
of 20 x 20 tiles.
|
||||
|
||||
The default value 4096 covers an area of 64 x 64 tiles.
|
||||
|
||||
- 'per_64k_frames' defines the number of tiles added to each companies limit
|
||||
per frame (however not past the possible maximum value,the 'burst').
|
||||
64k rather resembles the exact number of 65536 frames. So setting this
|
||||
variable to 65536 means: 65536 / 65536 = 1 tile per frame.
|
||||
As a day consists of 74 frames, a company's limit is increased by 74
|
||||
tiles during the course of a single day (2.22 seconds).
|
||||
|
||||
To achieve a 1 tile per day increase the following calculation is needed:
|
||||
1 / 74 (frames per day) * 65536 (per_64k_frames) = 885.62...
|
||||
after rounding: a value of 886 means adding a bit over 1 tile per day.
|
||||
|
||||
There is still enough space to scale this value downwards:
|
||||
decreasing this value to 127 results in a bit over 1 tile added to the
|
||||
allowance per week (7 days).
|
||||
|
||||
To create a setup in which a company gets an initial allowance only,
|
||||
set the value to 0 - no increase of the allowance per frame.
|
||||
|
||||
- Even though construction actions include a clear tile action, they are not
|
||||
affected by the above settings.
|
||||
|
||||
|
||||
5.0) Some useful things
|
||||
---- ------------------
|
||||
- You can protect your company so nobody else can join uninvited. To do this,
|
||||
set a password in your Company Screen
|
||||
|
||||
@@ -156,9 +203,8 @@ Multiplayer Manual for OpenTTD
|
||||
- Servers can now kick players, so don't make them use it!
|
||||
|
||||
|
||||
7. Troubleshooting
|
||||
------------------
|
||||
|
||||
6.0) Troubleshooting
|
||||
---- ---------------
|
||||
- My advertising server does not show up in list at servers.openttd.org
|
||||
Run openttd with the '-d net=2' parameter, as this will show whether it
|
||||
receives replies from the master server. If it does not receive replies it
|
||||
|
||||
+17
-3
@@ -93,12 +93,17 @@ elif [ -d "$ROOT_DIR/.git" ]; then
|
||||
fi
|
||||
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`
|
||||
REV="g`echo $HASH | cut -c1-8`"
|
||||
BRANCH=`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@;s@^master$@@'`
|
||||
BRANCH="`git symbolic-ref -q HEAD 2>/dev/null | sed 's@.*/@@;s@^master$@@'`"
|
||||
REV_NR=`LC_ALL=C git log --pretty=format:%s --grep="^(svn r[0-9]*)" -1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
|
||||
if [ -z "$REV_NR" ]; then
|
||||
# No rev? Maybe it is a custom git-svn clone
|
||||
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
|
||||
fi
|
||||
TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null`"
|
||||
if [ -n "$TAG" ]; then
|
||||
BRANCH=""
|
||||
REV="$TAG"
|
||||
fi
|
||||
elif [ -d "$ROOT_DIR/.hg" ]; then
|
||||
# We are a hg checkout
|
||||
if [ -n "`hg status | grep -v '^?'`" ]; then
|
||||
@@ -106,8 +111,17 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
|
||||
fi
|
||||
HASH=`LC_ALL=C hg id -i | cut -c1-12`
|
||||
REV="h`echo $HASH | cut -c1-8`"
|
||||
BRANCH=`hg branch | sed 's@^default$@@'`
|
||||
REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc}\n" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
|
||||
BRANCH="`hg branch | sed 's@^default$@@'`"
|
||||
TAG="`hg id -t | grep -v 'tip$'`"
|
||||
if [ -n "$TAG" ]; then
|
||||
BRANCH=""
|
||||
REV="$TAG"
|
||||
fi
|
||||
REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc|firstline}\n" | grep "^(svn r[0-9]*)" | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
|
||||
if [ -z "$REV_NR" ]; then
|
||||
# No rev? Maybe it is a custom hgsubversion clone
|
||||
REV_NR=`LC_ALL=C hg parent --template="{svnrev}"`
|
||||
fi
|
||||
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
|
||||
# We are an exported source bundle
|
||||
cat $ROOT_DIR/.ottdrev
|
||||
|
||||
+44
-19
@@ -1,18 +1,18 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2010-12-31
|
||||
Release version: 1.1.0-beta2
|
||||
Last updated: 2011-01-21
|
||||
Release version: 1.1.0-beta4
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of Contents:
|
||||
------------------
|
||||
1) About
|
||||
2) Known bugs in the this stable release
|
||||
3) Known bugs that will not be solved
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) About
|
||||
2.0) Known bugs in this release
|
||||
* 2.1) Known bugs that will not be solved
|
||||
|
||||
|
||||
1) About:
|
||||
-- ------
|
||||
1.0) About
|
||||
---- -----
|
||||
All bugs listed below are marked as known. Please do not submit any bugs
|
||||
that are the same as these. If you do, do not act surprised, because
|
||||
we WILL flame you!!
|
||||
@@ -22,12 +22,12 @@ specifics, we welcome you to report them. React to the given bug indicated
|
||||
by the number below on http://bugs.openttd.org.
|
||||
|
||||
|
||||
2) Known bugs in this stable release:
|
||||
-- ----------------------------------
|
||||
The following bugs are known to exist in this stable release and
|
||||
we intend to fix them. Some bugs are known but are not fixable or
|
||||
fixing them would cause further problems. Those bugs can be found
|
||||
in the "Known bugs that will not be solved" section.
|
||||
2.0) Known bugs in this release
|
||||
---- --------------------------
|
||||
The following bugs are known to exist in this release and we intend to
|
||||
fix them. Some bugs are known but are not fixable or fixing them would
|
||||
cause further problems. Those bugs can be found in the "Known bugs that
|
||||
will not be solved" section.
|
||||
|
||||
The bugs in this section all refer to a ticket in our bug tracking system
|
||||
that you can find at: http://bugs.openttd.org
|
||||
@@ -39,13 +39,11 @@ officially supporting Mac OS X again. For now it remains unsupported and
|
||||
we only apply bug fixes provided by the community but we are unable to fix
|
||||
these bugs ourselves.
|
||||
|
||||
- 3569 Location of wagons can be outside of the wagon
|
||||
- 3447 [OSX] SDL port is unuseable
|
||||
- 2484 [OSX] Cannot enter CJK characters
|
||||
|
||||
|
||||
3) Known bugs that will not be solved:
|
||||
-- -----------------------------------
|
||||
2.1) Known bugs that will not be solved
|
||||
---- ----------------------------------
|
||||
This section lists all known bugs that we do not intend to fix and the
|
||||
reasons why we think that fixing them is infeasible. We might make some
|
||||
minor improvements that reduce the scope of these bugs, but we will not
|
||||
@@ -259,3 +257,30 @@ OpenTTD hangs when started on 32 bits Windows [FS#4083]
|
||||
The reason we do not use the "win32" music driver as default are
|
||||
described in the "Long delay between switching music/song" section
|
||||
of this document.
|
||||
|
||||
Pre- and exit signals are not dragged [FS#4378]
|
||||
Unlike all other signal types, the entry- and exit signals are not
|
||||
dragged but instead normal signals are placed on subsequent track
|
||||
sections. This is done on purpose as this is the usually more con-
|
||||
venient solution. There are little to no occasions where more than
|
||||
one entry or exit signal in a row are useful. This is different
|
||||
for all other signal types where several in a row can serve one
|
||||
purpose or another.
|
||||
|
||||
Station build date is incorrect [FS#4415]
|
||||
The tile query tool will show the date of the last (re)construction
|
||||
at the station and not the date of the first construction. This is
|
||||
due to compatability reasons with NewGRFs and the fact that it is
|
||||
wrong to say that the station is built in a particular year when it
|
||||
was completely destroyed/rebuilt later on.
|
||||
The tile query tool can be fixed by changing the "Build date" text
|
||||
to "Date at which the last (re)construction took place" but this is
|
||||
deemed too specific and long for that window.
|
||||
|
||||
Can't change volume inside OpenTTD [FS#4416]
|
||||
Some backends do not provide a means to change the volume of sound
|
||||
effects or music. The mixing of music and sound is left to external
|
||||
libraries/the operating system we can't handle the volume control
|
||||
in OpenTTD. As a result you can't change the volume inside OpenTTD
|
||||
for backends such as SDL; just use the volume control provided by
|
||||
your operating system.
|
||||
|
||||
+14
-2
@@ -1,10 +1,22 @@
|
||||
openttd (1.1.0~beta2); urgency=low
|
||||
openttd (1.1.0~beta4) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta4
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 21 Jan 2011 00:00:00 +0100
|
||||
|
||||
openttd (1.1.0~beta3) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta3
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 09 Jan 2011 18:00:00 +0100
|
||||
|
||||
openttd (1.1.0~beta2) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta2
|
||||
|
||||
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 31 Dec 2010 18:00:00 +0100
|
||||
|
||||
openttd (1.1.0~beta1); urgency=low
|
||||
openttd (1.1.0~beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.1.0-beta1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set OPENTTD_VERSION=1.1.0-beta2
|
||||
set OPENTTD_VERSION=1.1.0-beta4
|
||||
set OPENSFX_VERSION=0.8.0
|
||||
set NOSOUND_VERSION=0.8.0
|
||||
set OPENGFX_VERSION=0.7.0
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# spec file for the openttd rpm package
|
||||
#
|
||||
# Copyright (c) 2007-2010 The OpenTTD developers
|
||||
# Copyright (c) 2007-2011 The OpenTTD developers
|
||||
#
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 1
|
||||
!define APPV_MAINT 0
|
||||
!define APPV_BUILD 1
|
||||
!define APPV_EXTRA "-beta2"
|
||||
!define APPV_BUILD 3
|
||||
!define APPV_EXTRA "-beta4"
|
||||
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
|
||||
|
||||
@@ -201,7 +201,7 @@ Function DetermineSVNVersion()
|
||||
End If ' line <> "master"
|
||||
End If ' Err.Number = 0
|
||||
|
||||
Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1 ../")
|
||||
Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1")
|
||||
if Err.Number = 0 Then
|
||||
revision = Mid(oExec.StdOut.ReadLine(), 7)
|
||||
revision = Mid(revision, 1, InStr(revision, ")") - 1)
|
||||
@@ -210,13 +210,26 @@ Function DetermineSVNVersion()
|
||||
' No revision? Maybe it is a custom git-svn clone
|
||||
' Reset error number as WshShell.Exec will not do that on success
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("git log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1 ../")
|
||||
Set oExec = WshShell.Exec("git log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1")
|
||||
If Err.Number = 0 Then
|
||||
revision = oExec.StdOut.ReadLine()
|
||||
revision = Mid(revision, InStr(revision, "@") + 1)
|
||||
revision = Mid(revision, 1, InStr(revision, " ") - 1)
|
||||
End If ' Err.Number = 0
|
||||
End If ' revision = ""
|
||||
|
||||
' Check if a tag is currently checked out
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("git name-rev --name-only --tags --no-undefined HEAD")
|
||||
If Err.Number = 0 Then
|
||||
' Wait till the application is finished ...
|
||||
Do While oExec.Status = 0
|
||||
Loop
|
||||
If oExec.ExitCode = 0 Then
|
||||
version = oExec.StdOut.ReadLine()
|
||||
branch = ""
|
||||
End If ' oExec.ExitCode = 0
|
||||
End If ' Err.Number = 0
|
||||
End If ' Err.Number = 0
|
||||
End If ' oExec.ExitCode = 0
|
||||
End If ' Err.Number = 0
|
||||
@@ -224,7 +237,7 @@ Function DetermineSVNVersion()
|
||||
If version = "norev000" Then
|
||||
' git detection failed, reset error and try mercurial (hg)
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("hg parents")
|
||||
Set oExec = WshShell.Exec("hg id -i")
|
||||
If Err.Number = 0 Then
|
||||
' Wait till the application is finished ...
|
||||
Do While oExec.Status = 0
|
||||
@@ -232,8 +245,21 @@ Function DetermineSVNVersion()
|
||||
|
||||
If oExec.ExitCode = 0 Then
|
||||
line = OExec.StdOut.ReadLine()
|
||||
hash = Mid(line, InStrRev(line, ":") + 1)
|
||||
hash = Left(line, 12)
|
||||
version = "h" & Mid(hash, 1, 8)
|
||||
|
||||
' Check if a tag is currently checked out
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("hg id -t")
|
||||
If Err.Number = 0 Then
|
||||
line = oExec.StdOut.ReadLine()
|
||||
If Len(line) > 0 And Right(line, 3) <> "tip" Then
|
||||
version = line
|
||||
branch = ""
|
||||
End If ' Len(line) > 0 And Right(line, 3) <> "tip"
|
||||
End If ' Err.Number = 0
|
||||
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("hg status ../")
|
||||
If Err.Number = 0 Then
|
||||
Do
|
||||
@@ -252,11 +278,23 @@ Function DetermineSVNVersion()
|
||||
End If ' line <> "default"
|
||||
End If ' Err.Number = 0
|
||||
|
||||
Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " --cwd ../")
|
||||
Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc|firstline}\n" & Chr(34) & " --cwd ../")
|
||||
If Err.Number = 0 Then
|
||||
revision = Mid(OExec.StdOut.ReadLine(), 7)
|
||||
revision = Mid(revision, 1, InStr(revision, ")") - 1)
|
||||
line = oExec.StdOut.ReadLine()
|
||||
If Left(line, 6) = "(svn r" Then
|
||||
revision = Mid(line, 7)
|
||||
revision = Mid(revision, 1, InStr(revision, ")") - 1)
|
||||
End If 'Left(line, 6) = "(svn r"
|
||||
End If ' Err.Number = 0
|
||||
|
||||
If revision = "" Then
|
||||
' No rev? Maybe it is a custom hgsubversion clone
|
||||
Err.Clear
|
||||
Set oExec = WshShell.Exec("hg parent --template=" & Chr(34) & "{svnrev}" & Chr(34))
|
||||
If Err.Number = 0 Then
|
||||
revision = oExec.StdOut.ReadLine()
|
||||
End If ' Err.Number = 0
|
||||
End If ' revision = ""
|
||||
End If ' Err.Number = 0
|
||||
End If ' oExec.ExitCode = 0
|
||||
End If ' Err.Number = 0
|
||||
|
||||
+54
-58
@@ -1,34 +1,35 @@
|
||||
OpenTTD README
|
||||
Last updated: 2010-12-31
|
||||
Release version: 1.1.0-beta2
|
||||
OpenTTD readme
|
||||
Last updated: 2011-01-21
|
||||
Release version: 1.1.0-beta4
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of Contents:
|
||||
------------------
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) About
|
||||
2.0) Contacting
|
||||
* 2.1 Reporting Bugs
|
||||
* 2.2 Reporting Desyncs
|
||||
3.0) Supported Platforms
|
||||
* 2.1) Reporting bugs
|
||||
* 2.2) Reporting desyncs
|
||||
3.0) Supported platforms
|
||||
4.0) Installing and running OpenTTD
|
||||
* 4.1 (Required) 3rd party files
|
||||
* 4.2 OpenTTD directories
|
||||
* 4.3 Portable Installations (External Media)
|
||||
* 4.1) (Required) 3rd party files
|
||||
* 4.2) OpenTTD directories
|
||||
* 4.3) Portable installations (portable media)
|
||||
5.0) OpenTTD features
|
||||
6.0) Configuration File
|
||||
* 5.1) Logging of potentially dangerous actions
|
||||
6.0) Configuration file
|
||||
7.0) Compiling
|
||||
* 7.1) Required/optional libraries
|
||||
* 7.2) Supported compilers
|
||||
8.0) Translating
|
||||
* 8.1 Translation
|
||||
* 8.2 Previewing
|
||||
* 8.1) Translation
|
||||
* 8.2) Previewing
|
||||
9.0) Troubleshooting
|
||||
X.X) Credits
|
||||
|
||||
|
||||
1.0) About:
|
||||
---- ------
|
||||
1.0) About
|
||||
---- -----
|
||||
OpenTTD is a transport simulation game based upon the popular game Transport
|
||||
Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original
|
||||
game as closely as possible while extending it with new features.
|
||||
@@ -36,7 +37,8 @@ game as closely as possible while extending it with new features.
|
||||
OpenTTD is licensed under the GNU General Public License version 2.0. For
|
||||
more information, see the file 'COPYING'.
|
||||
|
||||
2.0) Contacting:
|
||||
|
||||
2.0) Contacting
|
||||
---- ----------
|
||||
The easiest way to contact the OpenTTD team is by submitting bug reports or
|
||||
posting comments in our forums. You can also chat with us on IRC (#openttd
|
||||
@@ -47,9 +49,8 @@ The OpenTTD homepage is http://www.openttd.org/.
|
||||
You can also find the OpenTTD forums at
|
||||
http://forum.openttd.org/
|
||||
|
||||
|
||||
2.1) Reporting Bugs:
|
||||
---- ---------------
|
||||
2.1) Reporting bugs
|
||||
---- --------------
|
||||
First of all, check whether the bug is not already known. Do this by looking
|
||||
through the file called 'known-bugs.txt' which is distributed with OpenTTD
|
||||
like this readme.
|
||||
@@ -87,8 +88,8 @@ following information in your bug report:
|
||||
* Attach crash.dmp, crash.log and crash.sav. These files are usually created
|
||||
next to your openttd.cfg. The crash handler will tell you the location.
|
||||
|
||||
2.2) Reporting Desyncs:
|
||||
---- ------------------
|
||||
2.2) Reporting desyncs
|
||||
---- -----------------
|
||||
As desyncs are hard to make reproducible OpenTTD has the ability to log all
|
||||
actions done by clients so we can replay the whole game in an effort to make
|
||||
desyncs better reproducible. You need to turn this ability on. When turned
|
||||
@@ -140,8 +141,9 @@ Do NOT remove the dmp_cmds savegames of a desync you have reported until the
|
||||
desync has been fixed; if you, by accident, send us the wrong savegames we
|
||||
will not be able to reproduce the desync and thus will be unable to fix it.
|
||||
|
||||
3.0) Supported Platforms:
|
||||
---- --------------------
|
||||
|
||||
3.0) Supported platforms
|
||||
---- -------------------
|
||||
OpenTTD has been ported to several platforms and operating systems. It shouldn't
|
||||
be very difficult to port it to a new platform. The currently working platforms
|
||||
are:
|
||||
@@ -157,9 +159,8 @@ are:
|
||||
Windows - Win32 GDI (faster) or SDL or Allegro
|
||||
|
||||
|
||||
4.0) Installing and running OpenTTD:
|
||||
---- -------------------------------
|
||||
|
||||
4.0) Installing and running OpenTTD
|
||||
---- ------------------------------
|
||||
Installing OpenTTD is fairly straightforward. Either you have downloaded an
|
||||
archive which you have to extract to a directory where you want OpenTTD to
|
||||
be installed, or you have downloaded an installer, which will automatically
|
||||
@@ -186,9 +187,8 @@ automatically selected (and downloaded) if you get the AIs via the "Check
|
||||
Online Content". If you do not have an AI but have configured OpenTTD to start
|
||||
an AI a message will be shown that the 'dummy' AI has been started.
|
||||
|
||||
4.1) (Required) 3rd party files:
|
||||
---- ---------------------------
|
||||
|
||||
4.1) (Required) 3rd party files
|
||||
---- --------------------------
|
||||
Before you run OpenTTD, you need to put the game's data files into a data/
|
||||
directory which can be located in various places addressed in the following
|
||||
section.
|
||||
@@ -248,8 +248,7 @@ wait for an error message to pop up. The error message will tell you
|
||||
"couldn't find library 'lib-name'". Download that library and try again.
|
||||
|
||||
4.2) OpenTTD directories
|
||||
---- -------------------------------
|
||||
|
||||
---- -------------------
|
||||
The required 3rd party files listed in the section 4.1 "(Required) 3rd party files"
|
||||
as well as other non-compulsory extensions (NewGRFs, AI, heightmaps, scenarios) can be
|
||||
placed in a few different locations:
|
||||
@@ -289,10 +288,8 @@ Place 3rd party files in shared directory (or in personal directory if you don't
|
||||
have write access on shared directory) and have your openttd.cfg config file in
|
||||
personal directory (where the game will then also place savegames and screenshots).
|
||||
|
||||
|
||||
4.3) Portable Installations (External Media):
|
||||
---- ----------------------------------------
|
||||
|
||||
4.3) Portable installations (portable media)
|
||||
---- ---------------------------------------
|
||||
You can install OpenTTD on external media so you can take it with you, i.e.
|
||||
using a USB key, or a USB HDD, etc.
|
||||
Create a directory where you shall store the game in (i.e. OpenTTD/).
|
||||
@@ -305,9 +302,8 @@ As always - additional grf files are stored in the data/ dir (for details,
|
||||
again, see section 4.1).
|
||||
|
||||
|
||||
5.0) OpenTTD features:
|
||||
---- -----------------
|
||||
|
||||
5.0) OpenTTD features
|
||||
---- ----------------
|
||||
OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe
|
||||
emulation. Unfortunately, there is currently no comprehensive list of features,
|
||||
but there is a basic features list on the web, and some optional features can be
|
||||
@@ -326,10 +322,8 @@ Several important non-standard controls:
|
||||
* Hovering over a GUI element shows tooltips. This can be changed to right click
|
||||
via the advanced settings.
|
||||
|
||||
|
||||
5.1) Logging of potentially dangerous actions:
|
||||
5.1) Logging of potentially dangerous actions
|
||||
---- ----------------------------------------
|
||||
|
||||
OpenTTD is a complex program, and together with NewGRF, it may show a buggy
|
||||
behaviour. But not only bugs in code can cause problems. There are several
|
||||
ways to affect game state possibly resulting in program crash or multiplayer
|
||||
@@ -358,8 +352,8 @@ You can show the game log by typing 'gamelog' in the console or by running
|
||||
OpenTTD in debug mode.
|
||||
|
||||
|
||||
6.0) Configuration File:
|
||||
---- -------------------
|
||||
6.0) Configuration file
|
||||
---- ------------------
|
||||
The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like
|
||||
.INI format. It's mostly undocumented. Almost all settings can be changed
|
||||
ingame by using the 'Advanced Settings' window.
|
||||
@@ -368,8 +362,8 @@ described in section 4.2. If you do not have an openttd.cfg OpenTTD will
|
||||
create one after closing.
|
||||
|
||||
|
||||
7.0) Compiling:
|
||||
---- ----------
|
||||
7.0) Compiling
|
||||
---- ---------
|
||||
Windows:
|
||||
You need Microsoft Visual Studio .NET. Open the project file
|
||||
and it should build automatically. In case you want to build with SDL support
|
||||
@@ -421,8 +415,8 @@ DOS:
|
||||
will be generated that does not need cwsdpmi.exe by adding the cswdstub.exe
|
||||
to the created OpenTTD binary.
|
||||
|
||||
7.1) Required/optional libraries:
|
||||
---- -------------------
|
||||
7.1) Required/optional libraries
|
||||
---- ---------------------------
|
||||
The following libraries are used by OpenTTD for:
|
||||
- libSDL/liballegro: hardware access (video, sound, mouse)
|
||||
- zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads, heightmaps
|
||||
@@ -446,7 +440,7 @@ GRFCodec can be found at: http://www.openttd.org/download-grfcodec
|
||||
The compilation of these extra graphics does generally not happen, unless
|
||||
you remove the graphics file using "make maintainer-clean".
|
||||
|
||||
7.2) Supported compilers:
|
||||
7.2) Supported compilers
|
||||
---- -------------------
|
||||
The following compilers are known to compile OpenTTD:
|
||||
- Microsoft Visual C++ (MSVC) 2005, 2008 and 2010.
|
||||
@@ -470,8 +464,9 @@ The following compilers are known not to compile OpenTTD:
|
||||
If any of these compilers can compile OpenTTD again, please let us know.
|
||||
Patches to support more compilers are welcome.
|
||||
|
||||
8.0) Translating:
|
||||
---- -------------------
|
||||
|
||||
8.0) Translating
|
||||
---- -----------
|
||||
See http://www.openttd.org/development for up-to-date information.
|
||||
|
||||
The use of the online Translator service, located at
|
||||
@@ -485,8 +480,8 @@ Please contact the translations manager (http://www.openttd.org/contact)
|
||||
before beginning the translation process! This avoids double work, as
|
||||
someone else may have already started translating to the same language.
|
||||
|
||||
8.1) Translation:
|
||||
---- -------------------
|
||||
8.1) Translation
|
||||
---- -----------
|
||||
So, now that you've notified the development team about your intention to
|
||||
translate (You did, right? Of course you did.) you can pick up english.txt
|
||||
(found in the SVN repository under /src/lang) and translate.
|
||||
@@ -503,8 +498,8 @@ Note: Do not alter the following parts of the file:
|
||||
* Lines beginning with ## (such as ##id), other than the first two lines of
|
||||
the file
|
||||
|
||||
8.2) Previewing:
|
||||
---- -------------------
|
||||
8.2) Previewing
|
||||
---- ----------
|
||||
In order to view the translation in the game, you need to compile your language
|
||||
file with the strgen utility. You can download the precompiled strgen from:
|
||||
http://www.openttd.org/download-strgen
|
||||
@@ -523,9 +518,9 @@ should also be.
|
||||
|
||||
That's all! You should now be able to select the language in the game options.
|
||||
|
||||
|
||||
9.0) Troubleshooting
|
||||
---- ---------------
|
||||
|
||||
To see all startup options available to you, start OpenTTD with the
|
||||
"./openttd -h" option. This might help you tweak some of the settings.
|
||||
|
||||
@@ -558,8 +553,9 @@ will be output to the console at the moment, so use the '-d' flag (on windows)
|
||||
to see this list. You just have to find the files (http://grfcrawler.tt-forums.net/)
|
||||
put them in the data/ folder and you're set to go.
|
||||
|
||||
X.X) Credits:
|
||||
---- --------
|
||||
|
||||
X.X) Credits
|
||||
---- -------
|
||||
The OpenTTD team (in alphabetical order):
|
||||
Albert Hofkamp (Alberth) - GUI expert
|
||||
Jean-François Claeys (Belugas) - GUI, newindustries and more
|
||||
|
||||
@@ -126,6 +126,8 @@ public:
|
||||
|
||||
/** Wrapper function for AIScanner::GetAIConsoleList */
|
||||
static char *GetConsoleList(char *p, const char *last);
|
||||
/** Wrapper function for AIScanner::GetAIConsoleLibraryList */
|
||||
static char *GetConsoleLibraryList(char *p, const char *last);
|
||||
/** Wrapper function for AIScanner::GetAIInfoList */
|
||||
static const AIInfoList *GetInfoList();
|
||||
/** Wrapper function for AIScanner::GetUniqueAIInfoList */
|
||||
|
||||
@@ -108,10 +108,10 @@ int AIConfig::GetSetting(const char *name) const
|
||||
{
|
||||
SettingValueList::const_iterator it = this->settings.find(name);
|
||||
/* Return the default value if the setting is not set, or if we are in a not-custom difficult level */
|
||||
if (it == this->settings.end() || ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) != 3) {
|
||||
if (it == this->settings.end() || GetGameSettings().difficulty.diff_level != 3) {
|
||||
if (this->info == NULL) {
|
||||
assert(strcmp("start_date", name) == 0);
|
||||
switch ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) {
|
||||
switch (GetGameSettings().difficulty.diff_level) {
|
||||
case 0: return AI::START_NEXT_EASY;
|
||||
case 1: return AI::START_NEXT_MEDIUM;
|
||||
case 2: return AI::START_NEXT_HARD;
|
||||
|
||||
@@ -294,6 +294,11 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
return AI::ai_scanner->GetAIConsoleList(p, last);
|
||||
}
|
||||
|
||||
/* static */ char *AI::GetConsoleLibraryList(char *p, const char *last)
|
||||
{
|
||||
return AI::ai_scanner->GetAIConsoleLibraryList(p, last);
|
||||
}
|
||||
|
||||
/* static */ const AIInfoList *AI::GetInfoList()
|
||||
{
|
||||
return AI::ai_scanner->GetAIInfoList();
|
||||
|
||||
+53
-21
@@ -185,6 +185,11 @@ struct AIListWindow : public Window {
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) {
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
this->vscroll->SetCount((int)this->ai_info_list->size() + 1);
|
||||
|
||||
/* selected goes from -1 .. length of ai list - 1. */
|
||||
@@ -263,7 +268,7 @@ struct AISettingsWindow : public Window {
|
||||
this->vscroll = this->GetScrollbar(AIS_WIDGET_SCROLLBAR);
|
||||
this->FinishInitNested(desc, slot); // Initializes 'this->line_height' as side effect.
|
||||
|
||||
this->SetWidgetDisabledState(AIS_WIDGET_RESET, _game_mode != GM_MENU);
|
||||
this->SetWidgetDisabledState(AIS_WIDGET_RESET, _game_mode != GM_MENU && Company::IsValidID(this->slot));
|
||||
|
||||
this->vscroll->SetCount((int)this->ai_config->GetConfigList()->size());
|
||||
}
|
||||
@@ -297,7 +302,7 @@ struct AISettingsWindow : public Window {
|
||||
int y = r.top;
|
||||
for (; this->vscroll->IsVisible(i) && it != config->GetConfigList()->end(); i++, it++) {
|
||||
int current_value = config->GetSetting((*it).name);
|
||||
bool editable = (_game_mode == GM_MENU) || ((it->flags & AICONFIG_INGAME) != 0);
|
||||
bool editable = _game_mode == GM_MENU || !Company::IsValidID(this->slot) || (it->flags & AICONFIG_INGAME) != 0;
|
||||
|
||||
StringID str;
|
||||
TextColour colour;
|
||||
@@ -353,7 +358,7 @@ struct AISettingsWindow : public Window {
|
||||
AIConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
|
||||
for (int i = 0; i < num; i++) it++;
|
||||
AIConfigItem config_item = *it;
|
||||
if (_game_mode != GM_MENU && (config_item.flags & AICONFIG_INGAME) == 0) return;
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot) && (config_item.flags & AICONFIG_INGAME) == 0) return;
|
||||
|
||||
bool bool_item = (config_item.flags & AICONFIG_BOOLEAN) != 0;
|
||||
|
||||
@@ -398,8 +403,10 @@ struct AISettingsWindow : public Window {
|
||||
break;
|
||||
|
||||
case AIS_WIDGET_RESET:
|
||||
this->ai_config->ResetSettings();
|
||||
this->SetDirty();
|
||||
if (_game_mode == GM_MENU || !Company::IsValidID(this->slot)) {
|
||||
this->ai_config->ResetSettings();
|
||||
this->SetDirty();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -409,6 +416,7 @@ struct AISettingsWindow : public Window {
|
||||
if (StrEmpty(str)) return;
|
||||
AIConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
|
||||
for (int i = 0; i < this->clicked_row; i++) it++;
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot) && (it->flags & AICONFIG_INGAME) == 0) return;
|
||||
int32 value = atoi(str);
|
||||
this->ai_config->SetSetting((*it).name, value);
|
||||
this->CheckDifficultyLevel();
|
||||
@@ -429,6 +437,11 @@ struct AISettingsWindow : public Window {
|
||||
this->SetDirty();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) delete this;
|
||||
}
|
||||
};
|
||||
|
||||
/** Widgets for the AI settings window. */
|
||||
@@ -556,7 +569,7 @@ struct AIConfigWindow : public Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case AIC_WIDGET_NUMBER:
|
||||
SetDParam(0, _settings_newgame.difficulty.max_no_competitors);
|
||||
SetDParam(0, GetGameSettings().difficulty.max_no_competitors);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -571,6 +584,25 @@ struct AIConfigWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the AI config in the given company slot be edited?
|
||||
* @param slot The slot to query.
|
||||
* @return True if and only if the given AI Config slot can e edited.
|
||||
*/
|
||||
static bool IsEditable(CompanyID slot)
|
||||
{
|
||||
if (_game_mode != GM_NORMAL) {
|
||||
return slot > 0 && slot <= GetGameSettings().difficulty.max_no_competitors;
|
||||
}
|
||||
if (Company::IsValidID(slot) || slot < 0) return false;
|
||||
|
||||
int max_slot = GetGameSettings().difficulty.max_no_competitors;
|
||||
for (CompanyID cid = COMPANY_FIRST; cid < (CompanyID)max_slot && cid < MAX_COMPANIES; cid++) {
|
||||
if (Company::IsValidHumanID(cid)) max_slot++;
|
||||
}
|
||||
return slot < max_slot;
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const
|
||||
{
|
||||
switch (widget) {
|
||||
@@ -579,16 +611,16 @@ struct AIConfigWindow : public Window {
|
||||
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) {
|
||||
StringID text;
|
||||
|
||||
if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) {
|
||||
if ((_game_mode != GM_NORMAL && i == 0) || (_game_mode == GM_NORMAL && Company::IsValidHumanID(i))) {
|
||||
text = STR_AI_CONFIG_HUMAN_PLAYER;
|
||||
} else if (AIConfig::GetConfig((CompanyID)i)->GetInfo() != NULL) {
|
||||
SetDParamStr(0, AIConfig::GetConfig((CompanyID)i)->GetInfo()->GetName());
|
||||
text = STR_JUST_RAW_STRING;
|
||||
} else if (i == 0) {
|
||||
text = STR_AI_CONFIG_HUMAN_PLAYER;
|
||||
} else {
|
||||
text = STR_AI_CONFIG_RANDOM_AI;
|
||||
}
|
||||
DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, text,
|
||||
(this->selected_slot == i) ? TC_WHITE : ((i > _settings_newgame.difficulty.max_no_competitors || i == 0) ? TC_SILVER : TC_ORANGE));
|
||||
(this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER));
|
||||
y += this->line_height;
|
||||
}
|
||||
break;
|
||||
@@ -603,9 +635,9 @@ struct AIConfigWindow : public Window {
|
||||
case AIC_WIDGET_INCREASE: {
|
||||
int new_value;
|
||||
if (widget == AIC_WIDGET_DECREASE) {
|
||||
new_value = max(0, _settings_newgame.difficulty.max_no_competitors - 1);
|
||||
new_value = max(0, GetGameSettings().difficulty.max_no_competitors - 1);
|
||||
} else {
|
||||
new_value = min(MAX_COMPANIES - 1, _settings_newgame.difficulty.max_no_competitors + 1);
|
||||
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
|
||||
}
|
||||
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
|
||||
this->InvalidateData();
|
||||
@@ -620,8 +652,8 @@ struct AIConfigWindow : public Window {
|
||||
}
|
||||
|
||||
case AIC_WIDGET_MOVE_UP:
|
||||
if (this->selected_slot > 1) {
|
||||
Swap(_settings_newgame.ai_config[this->selected_slot], _settings_newgame.ai_config[this->selected_slot - 1]);
|
||||
if (IsEditable(this->selected_slot) && IsEditable((CompanyID)(this->selected_slot - 1))) {
|
||||
Swap(GetGameSettings().ai_config[this->selected_slot], GetGameSettings().ai_config[this->selected_slot - 1]);
|
||||
this->selected_slot--;
|
||||
this->vscroll->ScrollTowards(this->selected_slot);
|
||||
this->InvalidateData();
|
||||
@@ -629,8 +661,8 @@ struct AIConfigWindow : public Window {
|
||||
break;
|
||||
|
||||
case AIC_WIDGET_MOVE_DOWN:
|
||||
if (this->selected_slot < _settings_newgame.difficulty.max_no_competitors) {
|
||||
Swap(_settings_newgame.ai_config[this->selected_slot], _settings_newgame.ai_config[this->selected_slot + 1]);
|
||||
if (IsEditable(this->selected_slot) && IsEditable((CompanyID)(this->selected_slot + 1))) {
|
||||
Swap(GetGameSettings().ai_config[this->selected_slot], GetGameSettings().ai_config[this->selected_slot + 1]);
|
||||
this->selected_slot++;
|
||||
this->vscroll->ScrollTowards(this->selected_slot);
|
||||
this->InvalidateData();
|
||||
@@ -663,16 +695,16 @@ struct AIConfigWindow : public Window {
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
if (this->selected_slot == 0 || this->selected_slot > _settings_newgame.difficulty.max_no_competitors) {
|
||||
if (!IsEditable(this->selected_slot)) {
|
||||
this->selected_slot = INVALID_COMPANY;
|
||||
}
|
||||
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_DECREASE, _settings_newgame.difficulty.max_no_competitors == 0);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_INCREASE, _settings_newgame.difficulty.max_no_competitors == MAX_COMPANIES - 1);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_DECREASE, GetGameSettings().difficulty.max_no_competitors == 0);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_INCREASE, GetGameSettings().difficulty.max_no_competitors == MAX_COMPANIES - 1);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_CHANGE, this->selected_slot == INVALID_COMPANY);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_CONFIGURE, this->selected_slot == INVALID_COMPANY);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_UP, this->selected_slot == INVALID_COMPANY || this->selected_slot == 1);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_DOWN, this->selected_slot == INVALID_COMPANY || this->selected_slot == _settings_newgame.difficulty.max_no_competitors);
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_UP, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot - 1)));
|
||||
this->SetWidgetDisabledState(AIC_WIDGET_MOVE_DOWN, this->selected_slot == INVALID_COMPANY || !IsEditable((CompanyID)(this->selected_slot + 1)));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -338,7 +338,7 @@ int AIInfo::GetSettingDefaultValue(const char *name) const
|
||||
for (AIConfigItemList::const_iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
|
||||
if (strcmp((*it).name, name) != 0) continue;
|
||||
/* The default value depends on the difficulty level */
|
||||
switch ((_game_mode == GM_MENU) ? _settings_newgame.difficulty.diff_level : _settings_game.difficulty.diff_level) {
|
||||
switch (GetGameSettings().difficulty.diff_level) {
|
||||
case 0: return (*it).easy_value;
|
||||
case 1: return (*it).medium_value;
|
||||
case 2: return (*it).hard_value;
|
||||
|
||||
@@ -343,6 +343,19 @@ char *AIScanner::GetAIConsoleList(char *p, const char *last) const
|
||||
return p;
|
||||
}
|
||||
|
||||
char *AIScanner::GetAIConsoleLibraryList(char *p, const char *last) const
|
||||
{
|
||||
p += seprintf(p, last, "List of AI Libraries:\n");
|
||||
AILibraryList::const_iterator it = this->library_list.begin();
|
||||
for (; it != this->library_list.end(); it++) {
|
||||
AILibrary *i = (*it).second;
|
||||
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
|
||||
}
|
||||
p += seprintf(p, last, "\n");
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_NETWORK)
|
||||
#include "../network/network_content.h"
|
||||
#include "../3rdparty/md5/md5.h"
|
||||
|
||||
@@ -58,6 +58,11 @@ public:
|
||||
*/
|
||||
char *GetAIConsoleList(char *p, const char *last) const;
|
||||
|
||||
/**
|
||||
* Get the list of available AI Libraries for the console.
|
||||
*/
|
||||
char *GetAIConsoleLibraryList(char *p, const char *last) const;
|
||||
|
||||
/**
|
||||
* Get the list of all registered AIs.
|
||||
*/
|
||||
|
||||
@@ -26,31 +26,9 @@ enum AircraftSubType {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handle Aircraft specific tasks when an Aircraft enters a hangar
|
||||
* @param *v Vehicle that enters the hangar
|
||||
*/
|
||||
void HandleAircraftEnterHangar(Aircraft *v);
|
||||
|
||||
/**
|
||||
* Get the size of the sprite of an aircraft sprite heading west (used for lists)
|
||||
* @param engine The engine to get the sprite from
|
||||
* @param width The width of the sprite
|
||||
* @param height The height of the sprite
|
||||
*/
|
||||
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height);
|
||||
|
||||
/**
|
||||
* Updates the status of the Aircraft heading or in the station
|
||||
* @param st Station been updated
|
||||
*/
|
||||
void UpdateAirplanesOnNewStation(const Station *st);
|
||||
|
||||
/**
|
||||
* Update cached values of an aircraft.
|
||||
* Currently caches callback 36 max speed.
|
||||
* @param v Vehicle
|
||||
*/
|
||||
void UpdateAircraftCache(Aircraft *v);
|
||||
|
||||
void AircraftLeaveHangar(Aircraft *v);
|
||||
|
||||
@@ -533,6 +533,11 @@ static void PlayAircraftSound(const Vehicle *v)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update cached values of an aircraft.
|
||||
* Currently caches callback 36 max speed.
|
||||
* @param v Vehicle
|
||||
*/
|
||||
void UpdateAircraftCache(Aircraft *v)
|
||||
{
|
||||
uint max_speed = GetVehicleProperty(v, PROP_AIRCRAFT_SPEED, 0);
|
||||
@@ -1664,7 +1669,7 @@ static bool AirportSetBlocks(Aircraft *v, const AirportFTA *current_pos, const A
|
||||
break;
|
||||
}
|
||||
current = current->next;
|
||||
};
|
||||
}
|
||||
|
||||
/* if the block to be checked is in the next position, then exclude that from
|
||||
* checking, because it has been set by the airplane before */
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ AirportFTAClass::~AirportFTAClass()
|
||||
AirportFTA *next = current->next;
|
||||
free(current);
|
||||
current = next;
|
||||
};
|
||||
}
|
||||
}
|
||||
free(layout);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ static const uint MAX_ARTICULATED_PARTS = 100; ///< Maximum of articulated parts
|
||||
* @param mirrored Returns whether the part shall be flipped.
|
||||
* @return engine to add or INVALID_ENGINE
|
||||
*/
|
||||
static EngineID GetNextArticPart(uint index, EngineID front_type, Vehicle *front = NULL, bool *mirrored = NULL)
|
||||
static EngineID GetNextArticulatedPart(uint index, EngineID front_type, Vehicle *front = NULL, bool *mirrored = NULL)
|
||||
{
|
||||
assert(front == NULL || front->engine_type == front_type);
|
||||
|
||||
@@ -55,7 +55,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
|
||||
|
||||
uint i;
|
||||
for (i = 1; i < MAX_ARTICULATED_PARTS; i++) {
|
||||
if (GetNextArticPart(i, engine_type, v) == INVALID_ENGINE) break;
|
||||
if (GetNextArticulatedPart(i, engine_type, v) == INVALID_ENGINE) break;
|
||||
}
|
||||
|
||||
delete v;
|
||||
@@ -113,7 +113,7 @@ CargoArray GetCapacityOfArticulatedParts(EngineID engine)
|
||||
if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return capacity;
|
||||
|
||||
for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
|
||||
EngineID artic_engine = GetNextArticPart(i, engine);
|
||||
EngineID artic_engine = GetNextArticulatedPart(i, engine);
|
||||
if (artic_engine == INVALID_ENGINE) break;
|
||||
|
||||
cargo_capacity = GetVehicleDefaultCapacity(artic_engine, &cargo_type);
|
||||
@@ -138,7 +138,7 @@ bool IsArticulatedVehicleRefittable(EngineID engine)
|
||||
if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return false;
|
||||
|
||||
for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
|
||||
EngineID artic_engine = GetNextArticPart(i, engine);
|
||||
EngineID artic_engine = GetNextArticulatedPart(i, engine);
|
||||
if (artic_engine == INVALID_ENGINE) break;
|
||||
|
||||
if (IsEngineRefittable(artic_engine)) return true;
|
||||
@@ -165,7 +165,7 @@ void GetArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type,
|
||||
if (!HasBit(e->info.callback_mask, CBM_VEHICLE_ARTIC_ENGINE)) return;
|
||||
|
||||
for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
|
||||
EngineID artic_engine = GetNextArticPart(i, engine);
|
||||
EngineID artic_engine = GetNextArticulatedPart(i, engine);
|
||||
if (artic_engine == INVALID_ENGINE) break;
|
||||
|
||||
veh_cargos = GetAvailableVehicleCargoTypes(artic_engine, include_initial_cargo_type);
|
||||
@@ -223,7 +223,7 @@ bool IsArticulatedVehicleCarryingDifferentCargos(const Vehicle *v, CargoID *carg
|
||||
|
||||
switch (v->type) {
|
||||
case VEH_TRAIN:
|
||||
v = Train::From(v)->HasArticulatedPart() ? Train::From(v)->GetNextArticPart() : NULL;
|
||||
v = Train::From(v)->HasArticulatedPart() ? Train::From(v)->GetNextArticulatedPart() : NULL;
|
||||
break;
|
||||
|
||||
case VEH_ROAD:
|
||||
@@ -270,7 +270,7 @@ void CheckConsistencyOfArticulatedVehicle(const Vehicle *v)
|
||||
|
||||
switch (v->type) {
|
||||
case VEH_TRAIN:
|
||||
v = Train::From(v)->HasArticulatedPart() ? Train::From(v)->GetNextArticPart() : NULL;
|
||||
v = Train::From(v)->HasArticulatedPart() ? Train::From(v)->GetNextArticulatedPart() : NULL;
|
||||
break;
|
||||
|
||||
case VEH_ROAD:
|
||||
@@ -306,7 +306,7 @@ void AddArticulatedParts(Vehicle *first)
|
||||
Vehicle *v = first;
|
||||
for (uint i = 1; i < MAX_ARTICULATED_PARTS; i++) {
|
||||
bool flip_image;
|
||||
EngineID engine_type = GetNextArticPart(i, first->engine_type, first, &flip_image);
|
||||
EngineID engine_type = GetNextArticulatedPart(i, first->engine_type, first, &flip_image);
|
||||
if (engine_type == INVALID_ENGINE) return;
|
||||
|
||||
/* In the (very rare) case the GRF reported wrong number of articulated parts
|
||||
|
||||
@@ -33,6 +33,11 @@ static EngineRenew *GetEngineReplacement(EngineRenewList erl, EngineID engine, G
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all engine replacement settings for the company.
|
||||
* @param erl The renewlist for a given company.
|
||||
* @return The new renewlist for the company.
|
||||
*/
|
||||
void RemoveAllEngineReplacement(EngineRenewList *erl)
|
||||
{
|
||||
EngineRenew *er = (EngineRenew *)(*erl);
|
||||
@@ -46,6 +51,14 @@ void RemoveAllEngineReplacement(EngineRenewList *erl)
|
||||
*erl = NULL; // Empty list
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the engine replacement in a given renewlist for an original engine type.
|
||||
* @param erl The renewlist to search in.
|
||||
* @param engine Engine type to be replaced.
|
||||
* @param group The group related to this replacement.
|
||||
* @return The engine type to replace with, or INVALID_ENGINE if no
|
||||
* replacement is in the list.
|
||||
*/
|
||||
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group)
|
||||
{
|
||||
const EngineRenew *er = GetEngineReplacement(erl, engine, group);
|
||||
@@ -56,6 +69,15 @@ EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group)
|
||||
return er == NULL ? INVALID_ENGINE : er->to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an engine replacement to the given renewlist.
|
||||
* @param erl The renewlist to add to.
|
||||
* @param old_engine The original engine type.
|
||||
* @param new_engine The replacement engine type.
|
||||
* @param group The group related to this replacement.
|
||||
* @param flags The calling command flags.
|
||||
* @return 0 on success, CMD_ERROR on failure.
|
||||
*/
|
||||
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags)
|
||||
{
|
||||
/* Check if the old vehicle is already in the list */
|
||||
@@ -79,6 +101,14 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an engine replacement from a given renewlist.
|
||||
* @param erl The renewlist from which to remove the replacement
|
||||
* @param engine The original engine type.
|
||||
* @param group The group related to this replacement.
|
||||
* @param flags The calling command flags.
|
||||
* @return 0 on success, CMD_ERROR on failure.
|
||||
*/
|
||||
CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, GroupID group, DoCommandFlag flags)
|
||||
{
|
||||
EngineRenew *er = (EngineRenew *)(*erl);
|
||||
|
||||
@@ -17,42 +17,9 @@
|
||||
#include "engine_type.h"
|
||||
#include "group_type.h"
|
||||
|
||||
/**
|
||||
* Remove all engine replacement settings for the company.
|
||||
* @param erl The renewlist for a given company.
|
||||
* @return The new renewlist for the company.
|
||||
*/
|
||||
void RemoveAllEngineReplacement(EngineRenewList *erl);
|
||||
|
||||
/**
|
||||
* Retrieve the engine replacement in a given renewlist for an original engine type.
|
||||
* @param erl The renewlist to search in.
|
||||
* @param engine Engine type to be replaced.
|
||||
* @param group The group related to this replacement.
|
||||
* @return The engine type to replace with, or INVALID_ENGINE if no
|
||||
* replacement is in the list.
|
||||
*/
|
||||
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group);
|
||||
|
||||
/**
|
||||
* Add an engine replacement to the given renewlist.
|
||||
* @param erl The renewlist to add to.
|
||||
* @param old_engine The original engine type.
|
||||
* @param new_engine The replacement engine type.
|
||||
* @param group The group related to this replacement.
|
||||
* @param flags The calling command flags.
|
||||
* @return 0 on success, CMD_ERROR on failure.
|
||||
*/
|
||||
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags);
|
||||
|
||||
/**
|
||||
* Remove an engine replacement from a given renewlist.
|
||||
* @param erl The renewlist from which to remove the replacement
|
||||
* @param engine The original engine type.
|
||||
* @param group The group related to this replacement.
|
||||
* @param flags The calling command flags.
|
||||
* @return 0 on success, CMD_ERROR on failure.
|
||||
*/
|
||||
CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, GroupID group, DoCommandFlag flags);
|
||||
|
||||
/**
|
||||
|
||||
+3
-11
@@ -25,6 +25,7 @@
|
||||
#include "engine_gui.h"
|
||||
#include "settings_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "rail_gui.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -420,18 +421,9 @@ public:
|
||||
this->SetDirty();
|
||||
break;
|
||||
|
||||
case RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN: { // Railtype selection dropdown menu
|
||||
const Company *c = Company::Get(_local_company);
|
||||
DropDownList *list = new DropDownList();
|
||||
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
|
||||
const RailtypeInfo *rti = GetRailTypeInfo(rt);
|
||||
/* Skip rail type if it has no label */
|
||||
if (rti->label == 0) continue;
|
||||
list->push_back(new DropDownListStringItem(rti->strings.replace_text, rt, !HasBit(c->avail_railtypes, rt)));
|
||||
}
|
||||
ShowDropDownList(this, list, sel_railtype, RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN);
|
||||
case RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN: // Railtype selection dropdown menu
|
||||
ShowDropDownList(this, GetRailTypeDropDownList(true), sel_railtype, RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
case RVW_WIDGET_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
|
||||
DoCommandP(0, GetCompanySettingIndex("company.renew_keep_length"), Company::Get(_local_company)->settings.renew_keep_length ? 0 : 1, CMD_CHANGE_COMPANY_SETTING);
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#include "group_type.h"
|
||||
#include "vehicle_type.h"
|
||||
|
||||
/**
|
||||
* When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
|
||||
* @param type The type of engine
|
||||
*/
|
||||
void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type);
|
||||
void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g);
|
||||
void ShowReplaceGroupVehicleWindow(GroupID group, VehicleType veh);
|
||||
|
||||
@@ -104,14 +104,6 @@ struct BaseSet {
|
||||
return Tnum_files - this->valid_files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the set information from a loaded ini.
|
||||
* @param ini the ini to read from
|
||||
* @param path the path to this ini file (for filenames)
|
||||
* @param full_filename the full filename of the loaded file (for error reporting purposes)
|
||||
* @param allow_empty_filename empty filenames are valid
|
||||
* @return true if loading was successful.
|
||||
*/
|
||||
bool FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename = true);
|
||||
|
||||
/**
|
||||
@@ -177,42 +169,11 @@ public:
|
||||
return fs.Scan(GetExtension(), Tbase_set::SUBDIR, Tbase_set::SUBDIR != GM_DIR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the set to be used.
|
||||
* @param name of the set to use
|
||||
* @return true if it could be loaded
|
||||
*/
|
||||
static bool SetSet(const char *name);
|
||||
|
||||
/**
|
||||
* Returns a list with the sets.
|
||||
* @param p where to print to
|
||||
* @param last the last character to print to
|
||||
* @return the last printed character
|
||||
*/
|
||||
static char *GetSetsList(char *p, const char *last);
|
||||
|
||||
/**
|
||||
* Count the number of available graphics sets.
|
||||
* @return the number of sets
|
||||
*/
|
||||
static int GetNumSets();
|
||||
|
||||
/**
|
||||
* Get the index of the currently active graphics set
|
||||
* @return the current set's index
|
||||
*/
|
||||
static int GetIndexOfUsedSet();
|
||||
|
||||
/**
|
||||
* Get the name of the graphics set at the specified index
|
||||
* @return the name of the set
|
||||
*/
|
||||
static const Tbase_set *GetSet(int index);
|
||||
/**
|
||||
* Return the used set.
|
||||
* @return the used set.
|
||||
*/
|
||||
static const Tbase_set *GetUsedSet();
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,14 @@ template <class Tbase_set> /* static */ Tbase_set *BaseMedia<Tbase_set>::duplica
|
||||
return false; \
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the set information from a loaded ini.
|
||||
* @param ini the ini to read from
|
||||
* @param path the path to this ini file (for filenames)
|
||||
* @param full_filename the full filename of the loaded file (for error reporting purposes)
|
||||
* @param allow_empty_filename empty filenames are valid
|
||||
* @return true if loading was successful.
|
||||
*/
|
||||
template <class T, size_t Tnum_files, Subdirectory Tsubdir>
|
||||
bool BaseSet<T, Tnum_files, Tsubdir>::FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename)
|
||||
{
|
||||
@@ -208,6 +216,11 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the set to be used.
|
||||
* @param name of the set to use
|
||||
* @return true if it could be loaded
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ bool BaseMedia<Tbase_set>::SetSet(const char *name)
|
||||
{
|
||||
@@ -229,6 +242,12 @@ template <class Tbase_set>
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list with the sets.
|
||||
* @param p where to print to
|
||||
* @param last the last character to print to
|
||||
* @return the last printed character
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ char *BaseMedia<Tbase_set>::GetSetsList(char *p, const char *last)
|
||||
{
|
||||
@@ -293,6 +312,10 @@ template <class Tbase_set>
|
||||
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
/**
|
||||
* Count the number of available graphics sets.
|
||||
* @return the number of sets
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ int BaseMedia<Tbase_set>::GetNumSets()
|
||||
{
|
||||
@@ -304,6 +327,10 @@ template <class Tbase_set>
|
||||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the index of the currently active graphics set
|
||||
* @return the current set's index
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ int BaseMedia<Tbase_set>::GetIndexOfUsedSet()
|
||||
{
|
||||
@@ -316,6 +343,10 @@ template <class Tbase_set>
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the graphics set at the specified index
|
||||
* @return the name of the set
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ const Tbase_set *BaseMedia<Tbase_set>::GetSet(int index)
|
||||
{
|
||||
@@ -327,6 +358,10 @@ template <class Tbase_set>
|
||||
error("Base" SET_TYPE "::GetSet(): index %d out of range", index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the used set.
|
||||
* @return the used set.
|
||||
*/
|
||||
template <class Tbase_set>
|
||||
/* static */ const Tbase_set *BaseMedia<Tbase_set>::GetUsedSet()
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 32; }
|
||||
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
// /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
||||
|
||||
@@ -255,7 +255,7 @@ static const SpriteLoader::Sprite *ResizeSprite(const SpriteLoader::Sprite *spri
|
||||
return sprite;
|
||||
}
|
||||
|
||||
Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
/* streams of pixels (a, r, g, b channels)
|
||||
*
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
};
|
||||
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "32bpp-optimized"; }
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height
|
||||
DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal);
|
||||
}
|
||||
|
||||
Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
Sprite *dest_sprite;
|
||||
SpriteLoader::CommonPixel *dst;
|
||||
|
||||
@@ -19,7 +19,7 @@ class Blitter_32bppSimple : public Blitter_32bppBase {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "32bpp-simple"; }
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 8; }
|
||||
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
||||
|
||||
@@ -41,7 +41,7 @@ void Blitter_8bppDebug::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL
|
||||
}
|
||||
}
|
||||
|
||||
Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
Sprite *dest_sprite;
|
||||
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + sprite->height * sprite->width);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class Blitter_8bppDebug : public Blitter_8bppBase {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "8bpp-debug"; }
|
||||
};
|
||||
|
||||
@@ -110,7 +110,7 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
|
||||
}
|
||||
}
|
||||
|
||||
Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
/* Make memory for all zoom-levels */
|
||||
uint memory = sizeof(SpriteData);
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
};
|
||||
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "8bpp-optimized"; }
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
|
||||
}
|
||||
}
|
||||
|
||||
Sprite *Blitter_8bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_8bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
Sprite *dest_sprite;
|
||||
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + sprite->height * sprite->width);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class Blitter_8bppSimple : public Blitter_8bppBase {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "8bpp-simple"; }
|
||||
};
|
||||
|
||||
@@ -46,8 +46,6 @@ public:
|
||||
PALETTE_ANIMATION_BLITTER, ///< The blitter takes care of the palette animation
|
||||
};
|
||||
|
||||
typedef void *AllocatorProc(size_t size);
|
||||
|
||||
/**
|
||||
* Get the screen depth this blitter works for.
|
||||
* This is either: 8, 16, 24 or 32.
|
||||
@@ -73,7 +71,7 @@ public:
|
||||
/**
|
||||
* Convert a sprite from the loader to our own format.
|
||||
*/
|
||||
virtual Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) = 0;
|
||||
virtual Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) = 0;
|
||||
|
||||
/**
|
||||
* Move the destination pointer the requested amount x and y, keeping in mind
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
static FBlitter_Null iFBlitter_Null;
|
||||
|
||||
Sprite *Blitter_Null::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
Sprite *Blitter_Null::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
Sprite *dest_sprite;
|
||||
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite));
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 0; }
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) {};
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {};
|
||||
|
||||
+22
-5
@@ -23,6 +23,9 @@
|
||||
#include "widgets/dropdown_func.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "openttd.h"
|
||||
#include "cmd_helper.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "road_gui.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -46,13 +49,27 @@ typedef GUIList<BuildBridgeData> GUIBridgeList; ///< List of bridges, used in #B
|
||||
* Callback executed after a build Bridge CMD has been called
|
||||
*
|
||||
* @param result Whether the build succeeded
|
||||
* @param tile The tile where the command has been executed
|
||||
* @param p1 not used
|
||||
* @param p2 not used
|
||||
* @param end_tile End tile of the bridge.
|
||||
* @param p1 packed start tile coords (~ dx)
|
||||
* @param p2 various bitstuffed elements
|
||||
* - p2 = (bit 0- 7) - bridge type (hi bh)
|
||||
* - p2 = (bit 8-11) - rail type or road types.
|
||||
* - p2 = (bit 15-16) - transport type.
|
||||
*/
|
||||
void CcBuildBridge(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Succeeded()) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, tile);
|
||||
if (result.Failed()) return;
|
||||
SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, end_tile);
|
||||
|
||||
TransportType transport_type = Extract<TransportType, 15, 2>(p2);
|
||||
|
||||
if (transport_type == TRANSPORT_ROAD) {
|
||||
DiagDirection end_direction = ReverseDiagDir(GetTunnelBridgeDirection(end_tile));
|
||||
ConnectRoadToStructure(end_tile, end_direction);
|
||||
|
||||
DiagDirection start_direction = ReverseDiagDir(GetTunnelBridgeDirection(p1));
|
||||
ConnectRoadToStructure(p1, start_direction);
|
||||
}
|
||||
}
|
||||
|
||||
/** Names of the widgets of the build-bridge selection window. */
|
||||
|
||||
@@ -32,24 +32,41 @@ static TileIndex GetBridgeEnd(TileIndex tile, DiagDirection dir)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds the northern end of a bridge starting at a middle tile
|
||||
* @param t the bridge tile to find the bridge ramp for
|
||||
*/
|
||||
TileIndex GetNorthernBridgeEnd(TileIndex t)
|
||||
{
|
||||
return GetBridgeEnd(t, ReverseDiagDir(AxisToDiagDir(GetBridgeAxis(t))));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds the southern end of a bridge starting at a middle tile
|
||||
* @param t the bridge tile to find the bridge ramp for
|
||||
*/
|
||||
TileIndex GetSouthernBridgeEnd(TileIndex t)
|
||||
{
|
||||
return GetBridgeEnd(t, AxisToDiagDir(GetBridgeAxis(t)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Starting at one bridge end finds the other bridge end
|
||||
* @param t the bridge ramp tile to find the other bridge ramp for
|
||||
*/
|
||||
TileIndex GetOtherBridgeEnd(TileIndex tile)
|
||||
{
|
||||
assert(IsBridgeTile(tile));
|
||||
return GetBridgeEnd(tile, GetTunnelBridgeDirection(tile));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the height ('z') of a bridge in pixels.
|
||||
* @param tile the bridge ramp tile to get the bridge height from
|
||||
* @return the height of the bridge in pixels
|
||||
*/
|
||||
uint GetBridgeHeight(TileIndex t)
|
||||
{
|
||||
uint h;
|
||||
|
||||
@@ -85,30 +85,10 @@ static inline Axis GetBridgeAxis(TileIndex t)
|
||||
return (Axis)(GB(_m[t].m6, 6, 2) - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the northern end of a bridge starting at a middle tile
|
||||
* @param t the bridge tile to find the bridge ramp for
|
||||
*/
|
||||
TileIndex GetNorthernBridgeEnd(TileIndex t);
|
||||
|
||||
/**
|
||||
* Finds the southern end of a bridge starting at a middle tile
|
||||
* @param t the bridge tile to find the bridge ramp for
|
||||
*/
|
||||
TileIndex GetSouthernBridgeEnd(TileIndex t);
|
||||
|
||||
|
||||
/**
|
||||
* Starting at one bridge end finds the other bridge end
|
||||
* @param t the bridge ramp tile to find the other bridge ramp for
|
||||
*/
|
||||
TileIndex GetOtherBridgeEnd(TileIndex t);
|
||||
|
||||
/**
|
||||
* Get the height ('z') of a bridge in pixels.
|
||||
* @param tile the bridge ramp tile to get the bridge height from
|
||||
* @return the height of the bridge in pixels
|
||||
*/
|
||||
uint GetBridgeHeight(TileIndex tile);
|
||||
|
||||
/**
|
||||
|
||||
@@ -609,7 +609,7 @@ static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engin
|
||||
SetDParam(1, rvi->pow_wag_weight);
|
||||
DrawString(left, right, y, STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT);
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
};
|
||||
}
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
+128
-21
@@ -7,7 +7,7 @@
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file cargopacket.cpp Implementation of the cargo packets */
|
||||
/** @file cargopacket.cpp Implementation of the cargo packets. */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "core/pool_func.hpp"
|
||||
@@ -25,14 +25,26 @@ void InitializeCargoPackets()
|
||||
_cargopacket_pool.CleanPool();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new packet for savegame loading.
|
||||
*/
|
||||
CargoPacket::CargoPacket()
|
||||
{
|
||||
this->source_type = ST_INDUSTRY;
|
||||
this->source_id = INVALID_SOURCE;
|
||||
}
|
||||
|
||||
/* NOTE: We have to zero memory ourselves here because we are using a 'new'
|
||||
* that, in contrary to all other pools, does not memset to 0. */
|
||||
/**
|
||||
* Creates a new cargo packet.
|
||||
* @param source Source station of the packet.
|
||||
* @param source_xy Source location of the packet.
|
||||
* @param count Number of cargo entities to put in this packet.
|
||||
* @param source_type 'Type' of source the packet comes from (for subsidies).
|
||||
* @param source_id Actual source of the packet (for subsidies).
|
||||
* @pre count != 0
|
||||
* @note We have to zero memory ourselves here because we are using a 'new'
|
||||
* that, in contrary to all other pools, does not memset to 0.
|
||||
*/
|
||||
CargoPacket::CargoPacket(StationID source, TileIndex source_xy, uint16 count, SourceType source_type, SourceID source_id) :
|
||||
feeder_share(0),
|
||||
count(count),
|
||||
@@ -46,6 +58,20 @@ CargoPacket::CargoPacket(StationID source, TileIndex source_xy, uint16 count, So
|
||||
this->source_type = source_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new cargo packet. Initializes the fields that cannot be changed later.
|
||||
* Used when loading or splitting packets.
|
||||
* @param count Number of cargo entities to put in this packet.
|
||||
* @param days_in_transit Number of days the cargo has been in transit.
|
||||
* @param source Station the cargo was initially loaded.
|
||||
* @param source_xy Station location the cargo was initially loaded.
|
||||
* @param loaded_at_xy Location the cargo was loaded last.
|
||||
* @param feeder_share Feeder share the packet has already accumulated.
|
||||
* @param source_type 'Type' of source the packet comes from (for subsidies).
|
||||
* @param source_id Actual source of the packet (for subsidies).
|
||||
* @note We have to zero memory ourselves here because we are using a 'new'
|
||||
* that, in contrary to all other pools, does not memset to 0.
|
||||
*/
|
||||
CargoPacket::CargoPacket(uint16 count, byte days_in_transit, StationID source, TileIndex source_xy, TileIndex loaded_at_xy, Money feeder_share, SourceType source_type, SourceID source_id) :
|
||||
feeder_share(feeder_share),
|
||||
count(count),
|
||||
@@ -60,9 +86,34 @@ CargoPacket::CargoPacket(uint16 count, byte days_in_transit, StationID source, T
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates (sets source_id to INVALID_SOURCE) all cargo packets from given source
|
||||
* @param src_type type of source
|
||||
* @param src index of source
|
||||
* Split this packet in two and return the split off part.
|
||||
* @param new_size Size of the remaining part.
|
||||
* @return Split off part.
|
||||
*/
|
||||
FORCEINLINE CargoPacket *CargoPacket::Split(uint new_size)
|
||||
{
|
||||
Money fs = this->feeder_share * new_size / static_cast<uint>(this->count);
|
||||
CargoPacket *cp_new = new CargoPacket(new_size, this->days_in_transit, this->source, this->source_xy, this->loaded_at_xy, fs, this->source_type, this->source_id);
|
||||
this->feeder_share -= fs;
|
||||
this->count -= new_size;
|
||||
return cp_new;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge another packet into this one.
|
||||
* @param cp Packet to be merged in.
|
||||
*/
|
||||
FORCEINLINE void CargoPacket::Merge(CargoPacket *cp)
|
||||
{
|
||||
this->count += cp->count;
|
||||
this->feeder_share += cp->feeder_share;
|
||||
delete cp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates (sets source_id to INVALID_SOURCE) all cargo packets from given source.
|
||||
* @param src_type Type of source.
|
||||
* @param src Index of source.
|
||||
*/
|
||||
/* static */ void CargoPacket::InvalidateAllFrom(SourceType src_type, SourceID src)
|
||||
{
|
||||
@@ -73,8 +124,8 @@ CargoPacket::CargoPacket(uint16 count, byte days_in_transit, StationID source, T
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates (sets source to INVALID_STATION) all cargo packets from given station
|
||||
* @param sid the station that gets removed
|
||||
* Invalidates (sets source to INVALID_STATION) all cargo packets from given station.
|
||||
* @param sid Station that gets removed.
|
||||
*/
|
||||
/* static */ void CargoPacket::InvalidateAllFrom(StationID sid)
|
||||
{
|
||||
@@ -90,6 +141,9 @@ CargoPacket::CargoPacket(uint16 count, byte days_in_transit, StationID source, T
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Destroy the cargolist ("frees" all cargo packets).
|
||||
*/
|
||||
template <class Tinst>
|
||||
CargoList<Tinst>::~CargoList()
|
||||
{
|
||||
@@ -98,6 +152,11 @@ CargoList<Tinst>::~CargoList()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the cached values to reflect the removal of this packet.
|
||||
* Decreases count and days_in_transit.
|
||||
* @param cp Packet to be removed from cache.
|
||||
*/
|
||||
template <class Tinst>
|
||||
void CargoList<Tinst>::RemoveFromCache(const CargoPacket *cp)
|
||||
{
|
||||
@@ -105,6 +164,11 @@ void CargoList<Tinst>::RemoveFromCache(const CargoPacket *cp)
|
||||
this->cargo_days_in_transit -= cp->days_in_transit * cp->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the cache to reflect adding of this packet.
|
||||
* Increases count and days_in_transit.
|
||||
* @param cp New packet to be inserted.
|
||||
*/
|
||||
template <class Tinst>
|
||||
void CargoList<Tinst>::AddToCache(const CargoPacket *cp)
|
||||
{
|
||||
@@ -112,6 +176,14 @@ void CargoList<Tinst>::AddToCache(const CargoPacket *cp)
|
||||
this->cargo_days_in_transit += cp->days_in_transit * cp->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the given cargo packet. Tries to merge it with another one in the
|
||||
* packets list. If no fitting packet is found, appends it.
|
||||
* @warning After appending this packet may not exist anymore!
|
||||
* @note Do not use the cargo packet anymore after it has been appended to this CargoList!
|
||||
* @param cp Cargo packet to add.
|
||||
* @pre cp != NULL
|
||||
*/
|
||||
template <class Tinst>
|
||||
void CargoList<Tinst>::Append(CargoPacket *cp)
|
||||
{
|
||||
@@ -121,10 +193,7 @@ void CargoList<Tinst>::Append(CargoPacket *cp)
|
||||
for (List::reverse_iterator it(this->packets.rbegin()); it != this->packets.rend(); it++) {
|
||||
CargoPacket *icp = *it;
|
||||
if (Tinst::AreMergable(icp, cp) && icp->count + cp->count <= CargoPacket::MAX_COUNT) {
|
||||
icp->count += cp->count;
|
||||
icp->feeder_share += cp->feeder_share;
|
||||
|
||||
delete cp;
|
||||
icp->Merge(cp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -133,7 +202,11 @@ void CargoList<Tinst>::Append(CargoPacket *cp)
|
||||
this->packets.push_back(cp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Truncates the cargo in this list to the given amount. It leaves the
|
||||
* first count cargo entities and removes the rest.
|
||||
* @param max_remaining Maximum amount of entities to be in the list after the command.
|
||||
*/
|
||||
template <class Tinst>
|
||||
void CargoList<Tinst>::Truncate(uint max_remaining)
|
||||
{
|
||||
@@ -161,6 +234,27 @@ void CargoList<Tinst>::Truncate(uint max_remaining)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the given amount of cargo to another list.
|
||||
* Depending on the value of mta the side effects of this function differ:
|
||||
* - MTA_FINAL_DELIVERY: Destroys the packets that do not originate from a specific station.
|
||||
* - MTA_CARGO_LOAD: Sets the loaded_at_xy value of the moved packets.
|
||||
* - MTA_TRANSFER: Just move without side effects.
|
||||
* - MTA_UNLOAD: Just move without side effects.
|
||||
* @param dest Destination to move the cargo to.
|
||||
* @param count Amount of cargo entities to move.
|
||||
* @param mta How to handle the moving (side effects).
|
||||
* @param data Depending on mta the data of this variable differs:
|
||||
* - MTA_FINAL_DELIVERY - Station ID of packet's origin not to remove.
|
||||
* - MTA_CARGO_LOAD - Station's tile index of load.
|
||||
* - MTA_TRANSFER - Unused.
|
||||
* - MTA_UNLOAD - Unused.
|
||||
* @param payment The payment helper.
|
||||
*
|
||||
* @pre mta == MTA_FINAL_DELIVERY || dest != NULL
|
||||
* @pre mta == MTA_UNLOAD || mta == MTA_CARGO_LOAD || payment != NULL
|
||||
* @return True if there are still packets that might be moved from this cargo list.
|
||||
*/
|
||||
template <class Tinst>
|
||||
template <class Tother_inst>
|
||||
bool CargoList<Tinst>::MoveTo(Tother_inst *dest, uint max_move, MoveToAction mta, CargoPayment *payment, uint data)
|
||||
@@ -219,16 +313,15 @@ bool CargoList<Tinst>::MoveTo(Tother_inst *dest, uint max_move, MoveToAction mta
|
||||
cp->count = left;
|
||||
} else {
|
||||
/* But... the rest needs package splitting. */
|
||||
Money fs = cp->feeder_share * max_move / static_cast<uint>(cp->count);
|
||||
cp->feeder_share -= fs;
|
||||
cp->count -= max_move;
|
||||
CargoPacket *cp_new = cp->Split(max_move);
|
||||
|
||||
CargoPacket *cp_new = new CargoPacket(max_move, cp->days_in_transit, cp->source, cp->source_xy, (mta == MTA_CARGO_LOAD) ? data : cp->loaded_at_xy, fs, cp->source_type, cp->source_id);
|
||||
static_cast<Tinst *>(this)->RemoveFromCache(cp_new); // this reflects the changes in cp.
|
||||
|
||||
if (mta == MTA_TRANSFER) {
|
||||
/* Add the feeder share before inserting in dest. */
|
||||
cp_new->feeder_share += payment->PayTransfer(cp_new, max_move);
|
||||
} else if (mta == MTA_CARGO_LOAD) {
|
||||
cp_new->loaded_at_xy = data;
|
||||
}
|
||||
|
||||
dest->Append(cp_new);
|
||||
@@ -240,6 +333,7 @@ bool CargoList<Tinst>::MoveTo(Tother_inst *dest, uint max_move, MoveToAction mta
|
||||
return it != packets.end();
|
||||
}
|
||||
|
||||
/** Invalidates the cached data and rebuilds it. */
|
||||
template <class Tinst>
|
||||
void CargoList<Tinst>::InvalidateCache()
|
||||
{
|
||||
@@ -251,19 +345,31 @@ void CargoList<Tinst>::InvalidateCache()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the cached values to reflect the removal of this packet.
|
||||
* Decreases count, feeder share and days_in_transit.
|
||||
* @param cp Packet to be removed from cache.
|
||||
*/
|
||||
void VehicleCargoList::RemoveFromCache(const CargoPacket *cp)
|
||||
{
|
||||
this->feeder_share -= cp->feeder_share;
|
||||
this->Parent::RemoveFromCache(cp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the cache to reflect adding of this packet.
|
||||
* Increases count, feeder share and days_in_transit.
|
||||
* @param cp New packet to be inserted.
|
||||
*/
|
||||
void VehicleCargoList::AddToCache(const CargoPacket *cp)
|
||||
{
|
||||
this->feeder_share += cp->feeder_share;
|
||||
this->Parent::AddToCache(cp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ages the all cargo in this list.
|
||||
*/
|
||||
void VehicleCargoList::AgeCargo()
|
||||
{
|
||||
for (ConstIterator it(this->packets.begin()); it != this->packets.end(); it++) {
|
||||
@@ -276,6 +382,7 @@ void VehicleCargoList::AgeCargo()
|
||||
}
|
||||
}
|
||||
|
||||
/** Invalidates the cached data and rebuild it. */
|
||||
void VehicleCargoList::InvalidateCache()
|
||||
{
|
||||
this->feeder_share = 0;
|
||||
@@ -288,9 +395,9 @@ void VehicleCargoList::InvalidateCache()
|
||||
template class CargoList<VehicleCargoList>;
|
||||
template class CargoList<StationCargoList>;
|
||||
|
||||
/** Autoreplace Vehicle -> Vehicle 'transfer' */
|
||||
/** Autoreplace Vehicle -> Vehicle 'transfer'. */
|
||||
template bool CargoList<VehicleCargoList>::MoveTo(VehicleCargoList *, uint max_move, MoveToAction mta, CargoPayment *payment, uint data);
|
||||
/** Cargo unloading at a station */
|
||||
/** Cargo unloading at a station. */
|
||||
template bool CargoList<VehicleCargoList>::MoveTo(StationCargoList *, uint max_move, MoveToAction mta, CargoPayment *payment, uint data);
|
||||
/** Cargo loading at a station */
|
||||
/** Cargo loading at a station. */
|
||||
template bool CargoList<StationCargoList>::MoveTo(VehicleCargoList *, uint max_move, MoveToAction mta, CargoPayment *payment, uint data);
|
||||
|
||||
+67
-151
@@ -25,25 +25,25 @@ struct CargoPacket;
|
||||
|
||||
/** Type of the pool for cargo packets for a little over 16 million packets. */
|
||||
typedef Pool<CargoPacket, CargoPacketID, 1024, 0xFFF000, true, false> CargoPacketPool;
|
||||
/** The actual pool with cargo packets */
|
||||
/** The actual pool with cargo packets. */
|
||||
extern CargoPacketPool _cargopacket_pool;
|
||||
|
||||
template <class Tinst> class CargoList;
|
||||
extern const struct SaveLoad *GetCargoPacketDesc();
|
||||
|
||||
/**
|
||||
* Container for cargo from the same location and time
|
||||
* Container for cargo from the same location and time.
|
||||
*/
|
||||
struct CargoPacket : CargoPacketPool::PoolItem<&_cargopacket_pool> {
|
||||
private:
|
||||
Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo
|
||||
uint16 count; ///< The amount of cargo in this packet
|
||||
byte days_in_transit; ///< Amount of days this packet has been in transit
|
||||
SourceTypeByte source_type; ///< Type of \c source_id
|
||||
SourceID source_id; ///< Index of source, INVALID_SOURCE if unknown/invalid
|
||||
StationID source; ///< The station where the cargo came from first
|
||||
TileIndex source_xy; ///< The origin of the cargo (first station in feeder chain)
|
||||
TileIndex loaded_at_xy; ///< Location where this cargo has been loaded into the vehicle
|
||||
Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo.
|
||||
uint16 count; ///< The amount of cargo in this packet.
|
||||
byte days_in_transit; ///< Amount of days this packet has been in transit.
|
||||
SourceTypeByte source_type; ///< Type of \c source_id.
|
||||
SourceID source_id; ///< Index of source, INVALID_SOURCE if unknown/invalid.
|
||||
StationID source; ///< The station where the cargo came from first.
|
||||
TileIndex source_xy; ///< The origin of the cargo (first station in feeder chain).
|
||||
TileIndex loaded_at_xy; ///< Location where this cargo has been loaded into the vehicle.
|
||||
|
||||
/** The CargoList caches, thus needs to know about it. */
|
||||
template <class Tinst> friend class CargoList;
|
||||
@@ -55,43 +55,19 @@ public:
|
||||
/** Maximum number of items in a single cargo packet. */
|
||||
static const uint16 MAX_COUNT = UINT16_MAX;
|
||||
|
||||
/**
|
||||
* Create a new packet for savegame loading.
|
||||
*/
|
||||
CargoPacket();
|
||||
|
||||
/**
|
||||
* Creates a new cargo packet
|
||||
* @param source the source station of the packet
|
||||
* @param source_xy the source location of the packet
|
||||
* @param count the number of cargo entities to put in this packet
|
||||
* @param source_type the 'type' of source the packet comes from (for subsidies)
|
||||
* @param source_id the actual source of the packet (for subsidies)
|
||||
* @pre count != 0
|
||||
*/
|
||||
CargoPacket(StationID source, TileIndex source_xy, uint16 count, SourceType source_type, SourceID source_id);
|
||||
|
||||
/**
|
||||
* Creates a new cargo packet. Initializes the fields that cannot be changed later.
|
||||
* Used when loading or splitting packets.
|
||||
* @param count the number of cargo entities to put in this packet
|
||||
* @param days_in_transit number of days the cargo has been in transit
|
||||
* @param source the station the cargo was initially loaded
|
||||
* @param source_xy the station location the cargo was initially loaded
|
||||
* @param loaded_at_xy the location the cargo was loaded last
|
||||
* @param feeder_share feeder share the packet has already accumulated
|
||||
* @param source_type the 'type' of source the packet comes from (for subsidies)
|
||||
* @param source_id the actual source of the packet (for subsidies)
|
||||
*/
|
||||
CargoPacket(uint16 count, byte days_in_transit, StationID source, TileIndex source_xy, TileIndex loaded_at_xy, Money feeder_share = 0, SourceType source_type = ST_INDUSTRY, SourceID source_id = INVALID_SOURCE);
|
||||
|
||||
/** Destroy the packet */
|
||||
/** Destroy the packet. */
|
||||
~CargoPacket() { }
|
||||
|
||||
CargoPacket *Split(uint new_size);
|
||||
void Merge(CargoPacket *cp);
|
||||
|
||||
/**
|
||||
* Gets the number of 'items' in this packet.
|
||||
* @return the item count
|
||||
* @return Item count.
|
||||
*/
|
||||
FORCEINLINE uint16 Count() const
|
||||
{
|
||||
@@ -101,7 +77,7 @@ public:
|
||||
/**
|
||||
* Gets the amount of money already paid to earlier vehicles in
|
||||
* the feeder chain.
|
||||
* @return the feeder share
|
||||
* @return Feeder share.
|
||||
*/
|
||||
FORCEINLINE Money FeederShare() const
|
||||
{
|
||||
@@ -112,7 +88,7 @@ public:
|
||||
* Gets the number of days this cargo has been in transit.
|
||||
* This number isn't really in days, but in 2.5 days (185 ticks) and
|
||||
* it is capped at 255.
|
||||
* @return the length this cargo has been in transit
|
||||
* @return Length this cargo has been in transit.
|
||||
*/
|
||||
FORCEINLINE byte DaysInTransit() const
|
||||
{
|
||||
@@ -120,8 +96,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type of the cargo's source. industry, town or head quarter
|
||||
* @return the source type
|
||||
* Gets the type of the cargo's source. industry, town or head quarter.
|
||||
* @return Source type.
|
||||
*/
|
||||
FORCEINLINE SourceType SourceSubsidyType() const
|
||||
{
|
||||
@@ -129,8 +105,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of the cargo's source. An IndustryID, TownID or CompanyID
|
||||
* @return the source ID
|
||||
* Gets the ID of the cargo's source. An IndustryID, TownID or CompanyID.
|
||||
* @return Source ID.
|
||||
*/
|
||||
FORCEINLINE SourceID SourceSubsidyID() const
|
||||
{
|
||||
@@ -138,8 +114,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of the station where the cargo was loaded for the first time
|
||||
* @return the StationID
|
||||
* Gets the ID of the station where the cargo was loaded for the first time.
|
||||
* @return StationID.
|
||||
*/
|
||||
FORCEINLINE SourceID SourceStation() const
|
||||
{
|
||||
@@ -147,8 +123,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the coordinates of the cargo's source station
|
||||
* @return the source station's coordinates
|
||||
* Gets the coordinates of the cargo's source station.
|
||||
* @return Source station's coordinates.
|
||||
*/
|
||||
FORCEINLINE TileIndex SourceStationXY() const
|
||||
{
|
||||
@@ -156,8 +132,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the coordinates of the cargo's last loading station
|
||||
* @return the last loading station's coordinates
|
||||
* Gets the coordinates of the cargo's last loading station.
|
||||
* @return Last loading station's coordinates.
|
||||
*/
|
||||
FORCEINLINE TileIndex LoadedAtXY() const
|
||||
{
|
||||
@@ -171,69 +147,59 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* Iterate over all _valid_ cargo packets from the given start
|
||||
* @param var the variable used as "iterator"
|
||||
* @param start the cargo packet ID of the first packet to iterate over
|
||||
* Iterate over all _valid_ cargo packets from the given start.
|
||||
* @param var Variable used as "iterator".
|
||||
* @param start Cargo packet ID of the first packet to iterate over.
|
||||
*/
|
||||
#define FOR_ALL_CARGOPACKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(CargoPacket, cargopacket_index, var, start)
|
||||
|
||||
/**
|
||||
* Iterate over all _valid_ cargo packets from the begin of the pool
|
||||
* @param var the variable used as "iterator"
|
||||
* Iterate over all _valid_ cargo packets from the begin of the pool.
|
||||
* @param var Variable used as "iterator".
|
||||
*/
|
||||
#define FOR_ALL_CARGOPACKETS(var) FOR_ALL_CARGOPACKETS_FROM(var, 0)
|
||||
|
||||
/**
|
||||
* Simple collection class for a list of cargo packets
|
||||
* @tparam Tinst The actual instantation of this cargo list
|
||||
* Simple collection class for a list of cargo packets.
|
||||
* @tparam Tinst Actual instantation of this cargo list.
|
||||
*/
|
||||
template <class Tinst>
|
||||
class CargoList {
|
||||
public:
|
||||
/** Container with cargo packets */
|
||||
/** Container with cargo packets. */
|
||||
typedef std::list<CargoPacket *> List;
|
||||
/** The iterator for our container */
|
||||
/** The iterator for our container. */
|
||||
typedef List::iterator Iterator;
|
||||
/** The const iterator for our container */
|
||||
/** The const iterator for our container. */
|
||||
typedef List::const_iterator ConstIterator;
|
||||
|
||||
/** Kind of actions that could be done with packets on move */
|
||||
/** Kind of actions that could be done with packets on move. */
|
||||
enum MoveToAction {
|
||||
MTA_FINAL_DELIVERY, ///< "Deliver" the packet to the final destination, i.e. destroy the packet
|
||||
MTA_CARGO_LOAD, ///< Load the packet onto a vehicle, i.e. set the last loaded station ID
|
||||
MTA_TRANSFER, ///< The cargo is moved as part of a transfer
|
||||
MTA_UNLOAD, ///< The cargo is moved as part of a forced unload
|
||||
MTA_FINAL_DELIVERY, ///< "Deliver" the packet to the final destination, i.e. destroy the packet.
|
||||
MTA_CARGO_LOAD, ///< Load the packet onto a vehicle, i.e. set the last loaded station ID.
|
||||
MTA_TRANSFER, ///< The cargo is moved as part of a transfer.
|
||||
MTA_UNLOAD, ///< The cargo is moved as part of a forced unload.
|
||||
};
|
||||
|
||||
protected:
|
||||
uint count; ///< Cache for the number of cargo entities
|
||||
uint cargo_days_in_transit; ///< Cache for the sum of number of days in transit of each entity; comparable to man-hours
|
||||
uint count; ///< Cache for the number of cargo entities.
|
||||
uint cargo_days_in_transit; ///< Cache for the sum of number of days in transit of each entity; comparable to man-hours.
|
||||
|
||||
List packets; ///< The cargo packets in this list
|
||||
List packets; ///< The cargo packets in this list.
|
||||
|
||||
/**
|
||||
* Update the cache to reflect adding of this packet.
|
||||
* Increases count and days_in_transit
|
||||
* @param cp a new packet to be inserted
|
||||
*/
|
||||
void AddToCache(const CargoPacket *cp);
|
||||
|
||||
/**
|
||||
* Update the cached values to reflect the removal of this packet.
|
||||
* Decreases count and days_in_transit
|
||||
* @param cp Packet to be removed from cache
|
||||
*/
|
||||
void RemoveFromCache(const CargoPacket *cp);
|
||||
|
||||
public:
|
||||
/** Create the cargo list */
|
||||
/** Create the cargo list. */
|
||||
CargoList() {}
|
||||
/** And destroy it ("frees" all cargo packets) */
|
||||
|
||||
~CargoList();
|
||||
|
||||
/**
|
||||
* Returns a pointer to the cargo packet list (so you can iterate over it etc).
|
||||
* @return pointer to the packet list
|
||||
* @return Pointer to the packet list.
|
||||
*/
|
||||
FORCEINLINE const List *Packets() const
|
||||
{
|
||||
@@ -241,8 +207,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this list is empty
|
||||
* @return true if and only if the list is empty
|
||||
* Checks whether this list is empty.
|
||||
* @return True if and only if the list is empty.
|
||||
*/
|
||||
FORCEINLINE bool Empty() const
|
||||
{
|
||||
@@ -250,8 +216,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of cargo entities in this list
|
||||
* @return the before mentioned number
|
||||
* Returns the number of cargo entities in this list.
|
||||
* @return The before mentioned number.
|
||||
*/
|
||||
FORCEINLINE uint Count() const
|
||||
{
|
||||
@@ -259,8 +225,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns source of the first cargo packet in this list
|
||||
* @return the before mentioned source
|
||||
* Returns source of the first cargo packet in this list.
|
||||
* @return The before mentioned source.
|
||||
*/
|
||||
FORCEINLINE StationID Source() const
|
||||
{
|
||||
@@ -268,8 +234,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns average number of days in transit for a cargo entity
|
||||
* @return the before mentioned number
|
||||
* Returns average number of days in transit for a cargo entity.
|
||||
* @return The before mentioned number.
|
||||
*/
|
||||
FORCEINLINE uint DaysInTransit() const
|
||||
{
|
||||
@@ -277,47 +243,12 @@ public:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Appends the given cargo packet
|
||||
* @warning After appending this packet may not exist anymore!
|
||||
* @note Do not use the cargo packet anymore after it has been appended to this CargoList!
|
||||
* @param cp the cargo packet to add
|
||||
* @pre cp != NULL
|
||||
*/
|
||||
void Append(CargoPacket *cp);
|
||||
|
||||
/**
|
||||
* Truncates the cargo in this list to the given amount. It leaves the
|
||||
* first count cargo entities and removes the rest.
|
||||
* @param max_remaining the maximum amount of entities to be in the list after the command
|
||||
*/
|
||||
void Truncate(uint max_remaining);
|
||||
|
||||
/**
|
||||
* Moves the given amount of cargo to another list.
|
||||
* Depending on the value of mta the side effects of this function differ:
|
||||
* - MTA_FINAL_DELIVERY: destroys the packets that do not originate from a specific station
|
||||
* - MTA_CARGO_LOAD: sets the loaded_at_xy value of the moved packets
|
||||
* - MTA_TRANSFER: just move without side effects
|
||||
* - MTA_UNLOAD: just move without side effects
|
||||
* @param dest the destination to move the cargo to
|
||||
* @param count the amount of cargo entities to move
|
||||
* @param mta how to handle the moving (side effects)
|
||||
* @param data Depending on mta the data of this variable differs:
|
||||
* - MTA_FINAL_DELIVERY - station ID of packet's origin not to remove
|
||||
* - MTA_CARGO_LOAD - station's tile index of load
|
||||
* - MTA_TRANSFER - unused
|
||||
* - MTA_UNLOAD - unused
|
||||
* @param payment The payment helper
|
||||
*
|
||||
* @pre mta == MTA_FINAL_DELIVERY || dest != NULL
|
||||
* @pre mta == MTA_UNLOAD || mta == MTA_CARGO_LOAD || payment != NULL
|
||||
* @return true if there are still packets that might be moved from this cargo list
|
||||
*/
|
||||
template <class Tother_inst>
|
||||
bool MoveTo(Tother_inst *dest, uint count, MoveToAction mta, CargoPayment *payment, uint data = 0);
|
||||
|
||||
/** Invalidates the cached data and rebuild it */
|
||||
void InvalidateCache();
|
||||
};
|
||||
|
||||
@@ -326,54 +257,39 @@ public:
|
||||
*/
|
||||
class VehicleCargoList : public CargoList<VehicleCargoList> {
|
||||
protected:
|
||||
/** The (direct) parent of this class */
|
||||
/** The (direct) parent of this class. */
|
||||
typedef CargoList<VehicleCargoList> Parent;
|
||||
|
||||
Money feeder_share; ///< Cache for the feeder share
|
||||
Money feeder_share; ///< Cache for the feeder share.
|
||||
|
||||
/**
|
||||
* Update the cache to reflect adding of this packet.
|
||||
* Increases count, feeder share and days_in_transit
|
||||
* @param cp a new packet to be inserted
|
||||
*/
|
||||
void AddToCache(const CargoPacket *cp);
|
||||
|
||||
/**
|
||||
* Update the cached values to reflect the removal of this packet.
|
||||
* Decreases count, feeder share and days_in_transit
|
||||
* @param cp Packet to be removed from cache
|
||||
*/
|
||||
void RemoveFromCache(const CargoPacket *cp);
|
||||
|
||||
public:
|
||||
/** The super class ought to know what it's doing */
|
||||
/** The super class ought to know what it's doing. */
|
||||
friend class CargoList<VehicleCargoList>;
|
||||
/** The vehicles have a cargo list (and we want that saved). */
|
||||
friend const struct SaveLoad *GetVehicleDescription(VehicleType vt);
|
||||
|
||||
/**
|
||||
* Returns total sum of the feeder share for all packets
|
||||
* @return the before mentioned number
|
||||
* Returns total sum of the feeder share for all packets.
|
||||
* @return The before mentioned number.
|
||||
*/
|
||||
FORCEINLINE Money FeederShare() const
|
||||
{
|
||||
return this->feeder_share;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ages the all cargo in this list
|
||||
*/
|
||||
void AgeCargo();
|
||||
|
||||
/** Invalidates the cached data and rebuild it */
|
||||
void InvalidateCache();
|
||||
|
||||
/**
|
||||
* Are two the two CargoPackets mergeable in the context of
|
||||
* a list of CargoPackets for a Vehicle?
|
||||
* @param cp1 the first CargoPacket
|
||||
* @param cp2 the second CargoPacket
|
||||
* @return true if they are mergeable
|
||||
* @param cp1 First CargoPacket.
|
||||
* @param cp2 Second CargoPacket.
|
||||
* @return True if they are mergeable.
|
||||
*/
|
||||
static bool AreMergable(const CargoPacket *cp1, const CargoPacket *cp2)
|
||||
{
|
||||
@@ -390,7 +306,7 @@ public:
|
||||
*/
|
||||
class StationCargoList : public CargoList<StationCargoList> {
|
||||
public:
|
||||
/** The super class ought to know what it's doing */
|
||||
/** The super class ought to know what it's doing. */
|
||||
friend class CargoList<StationCargoList>;
|
||||
/** The stations, via GoodsEntry, have a CargoList. */
|
||||
friend const struct SaveLoad *GetGoodsDesc();
|
||||
@@ -398,9 +314,9 @@ public:
|
||||
/**
|
||||
* Are two the two CargoPackets mergeable in the context of
|
||||
* a list of CargoPackets for a Vehicle?
|
||||
* @param cp1 the first CargoPacket
|
||||
* @param cp2 the second CargoPacket
|
||||
* @return true if they are mergeable
|
||||
* @param cp1 First CargoPacket.
|
||||
* @param cp2 Second CargoPacket.
|
||||
* @return True if they are mergeable.
|
||||
*/
|
||||
static bool AreMergable(const CargoPacket *cp1, const CargoPacket *cp2)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,10 @@ void InitializeCheats()
|
||||
memset(&_cheats, 0, sizeof(Cheats));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if any cheat has been used, false otherwise
|
||||
* @return has a cheat been used?
|
||||
*/
|
||||
bool CheatHasBeenUsed()
|
||||
{
|
||||
/* Cannot use lengthof because _cheats is of type Cheats, not Cheat */
|
||||
|
||||
@@ -18,10 +18,6 @@ extern Cheats _cheats;
|
||||
|
||||
void ShowCheatWindow();
|
||||
|
||||
/**
|
||||
* Return true if any cheat has been used, false otherwise
|
||||
* @return has a cheat been used?
|
||||
*/
|
||||
bool CheatHasBeenUsed();
|
||||
|
||||
#endif /* CHEAT_FUNC_H */
|
||||
|
||||
@@ -34,47 +34,24 @@ static const CommandCost CMD_ERROR = CommandCost(INVALID_STRING_ID);
|
||||
*/
|
||||
#define return_cmd_error(errcode) return CommandCost(errcode);
|
||||
|
||||
/**
|
||||
* Execute a command
|
||||
*/
|
||||
CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags, uint32 cmd, const char *text = NULL);
|
||||
CommandCost DoCommand(const CommandContainer *container, DoCommandFlag flags);
|
||||
|
||||
/**
|
||||
* Execute a network safe DoCommand function
|
||||
*/
|
||||
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback = NULL, const char *text = NULL, bool my_cmd = true);
|
||||
bool DoCommandP(const CommandContainer *container, bool my_cmd = true);
|
||||
|
||||
/** Internal helper function for DoCommandP. Do not use. */
|
||||
CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd, bool estimate_only);
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
/**
|
||||
* Send a command over the network
|
||||
*/
|
||||
void NetworkSendCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
extern Money _additional_cash_required;
|
||||
|
||||
/**
|
||||
* Checks if a integer value belongs to a command.
|
||||
*/
|
||||
bool IsValidCommand(uint32 cmd);
|
||||
/**
|
||||
* Returns the flags from a given command.
|
||||
*/
|
||||
byte GetCommandFlags(uint32 cmd);
|
||||
/**
|
||||
* Returns the name of a given command.
|
||||
*/
|
||||
const char *GetCommandName(uint32 cmd);
|
||||
/**
|
||||
* Returns the current money available which can be used for a command.
|
||||
*/
|
||||
Money GetAvailableMoneyForCommand();
|
||||
|
||||
bool IsCommandAllowedWhilePaused(uint32 cmd);
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,6 +69,9 @@ struct CompanyProperties {
|
||||
int16 bankrupt_timeout; ///< If bigger than \c 0, amount of time to wait for an answer on an offer to buy this company.
|
||||
Money bankrupt_value;
|
||||
|
||||
uint32 terraform_limit; ///< Amount of tileheights we can (still) terraform (times 65536).
|
||||
uint32 clear_limit; ///< Amount of tiles we can (still) clear (times 65536).
|
||||
|
||||
/**
|
||||
* If \c true, the company is (also) controlled by the computer (a NoAI program).
|
||||
* @note It is possible that the user is also participating in such a company.
|
||||
|
||||
+30
-5
@@ -34,6 +34,7 @@
|
||||
#include "vehicle_base.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "sprite.h"
|
||||
#include "smallmap_gui.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -57,6 +58,9 @@ Company::Company(uint16 name_1, bool is_ai)
|
||||
this->name_1 = name_1;
|
||||
this->location_of_HQ = INVALID_TILE;
|
||||
this->is_ai = is_ai;
|
||||
this->terraform_limit = _settings_game.construction.terraform_frame_burst << 16;
|
||||
this->clear_limit = _settings_game.construction.clear_frame_burst << 16;
|
||||
|
||||
for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR;
|
||||
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, INVALID_COMPANY);
|
||||
}
|
||||
@@ -116,10 +120,10 @@ void SetLocalCompany(CompanyID new_company)
|
||||
* @param company Company to get the colour of.
|
||||
* @return Colour of \a company.
|
||||
*/
|
||||
uint16 GetDrawStringCompanyColour(CompanyID company)
|
||||
TextColour GetDrawStringCompanyColour(CompanyID company)
|
||||
{
|
||||
if (!Company::IsValidID(company)) return _colour_gradient[COLOUR_WHITE][4] | TC_IS_PALETTE_COLOUR;
|
||||
return (_colour_gradient[_company_colours[company]][4]) | TC_IS_PALETTE_COLOUR;
|
||||
if (!Company::IsValidID(company)) return (TextColour)_colour_gradient[COLOUR_WHITE][4] | TC_IS_PALETTE_COLOUR;
|
||||
return (TextColour)_colour_gradient[_company_colours[company]][4] | TC_IS_PALETTE_COLOUR;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,6 +255,16 @@ void SubtractMoneyFromCompanyFract(CompanyID company, CommandCost cst)
|
||||
if (cost != 0) SubtractMoneyFromAnyCompany(c, CommandCost(cst.GetExpensesType(), cost));
|
||||
}
|
||||
|
||||
/** Update the landscaping limits per company. */
|
||||
void UpdateLandscapingLimits()
|
||||
{
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
c->terraform_limit = min(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint32)_settings_game.construction.terraform_frame_burst << 16);
|
||||
c->clear_limit = min(c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint32)_settings_game.construction.clear_frame_burst << 16);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the right DParams to get the name of an owner.
|
||||
* @param owner the owner to get the name of.
|
||||
@@ -423,7 +437,7 @@ static Colours GenerateCompanyColour()
|
||||
Swap(colours[j - 1], colours[j]);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* Move the colours that look similar to each company's colour to the side */
|
||||
Company *c;
|
||||
@@ -487,6 +501,11 @@ restart:;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the livery schemes to the company's primary colour.
|
||||
* This is used on loading games without livery information and on new company start up.
|
||||
* @param c Company to reset.
|
||||
*/
|
||||
void ResetCompanyLivery(Company *c)
|
||||
{
|
||||
for (LiveryScheme scheme = LS_BEGIN; scheme < LS_END; scheme++) {
|
||||
@@ -539,6 +558,8 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
|
||||
SetWindowDirty(WC_GRAPH_LEGEND, 0);
|
||||
SetWindowDirty(WC_TOOLBAR_MENU, 0);
|
||||
SetWindowDirty(WC_CLIENT_LIST, 0);
|
||||
BuildOwnerLegend();
|
||||
InvalidateWindowData(WC_SMALLMAP, 0, 1);
|
||||
|
||||
if (is_ai && (!_networking || _network_server)) AI::StartNew(c->index);
|
||||
|
||||
@@ -814,7 +835,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
assert(_local_company == COMPANY_SPECTATOR);
|
||||
SetLocalCompany(c->index);
|
||||
if (!StrEmpty(_settings_client.network.default_company_pass)) {
|
||||
NetworkChangeCompanyPassword(_settings_client.network.default_company_pass);
|
||||
NetworkChangeCompanyPassword(_local_company, _settings_client.network.default_company_pass);
|
||||
}
|
||||
|
||||
/* Now that we have a new company, broadcast our company settings to
|
||||
@@ -896,6 +917,10 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
default: return CMD_ERROR;
|
||||
}
|
||||
|
||||
InvalidateWindowClassesData(WC_GAME_OPTIONS);
|
||||
InvalidateWindowClassesData(WC_AI_SETTINGS);
|
||||
InvalidateWindowClassesData(WC_AI_LIST);
|
||||
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ void SetLocalCompany(CompanyID new_company);
|
||||
void ShowBuyCompanyDialog(CompanyID company);
|
||||
void CompanyAdminUpdate(const Company *company);
|
||||
void CompanyAdminBankrupt(CompanyID company_id);
|
||||
void UpdateLandscapingLimits();
|
||||
|
||||
extern CompanyByte _local_company;
|
||||
extern CompanyByte _current_company;
|
||||
|
||||
+2
-1
@@ -13,8 +13,9 @@
|
||||
#define COMPANY_GUI_H
|
||||
|
||||
#include "company_type.h"
|
||||
#include "gfx_type.h"
|
||||
|
||||
uint16 GetDrawStringCompanyColour(CompanyID company);
|
||||
TextColour GetDrawStringCompanyColour(CompanyID company);
|
||||
void DrawCompanyIcon(CompanyID c, int x, int y);
|
||||
|
||||
void ShowCompanyStations(CompanyID company);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ enum Owner {
|
||||
};
|
||||
DECLARE_POSTFIX_INCREMENT(Owner)
|
||||
|
||||
static const uint MAX_LENGTH_PRESIDENT_NAME_CHARS = 31; ///< The maximum length of a president name in characters including '\0'
|
||||
static const uint MAX_LENGTH_PRESIDENT_NAME_CHARS = 32; ///< The maximum length of a president name in characters including '\0'
|
||||
static const uint MAX_LENGTH_PRESIDENT_NAME_PIXELS = 94; ///< The maximum length of a president name in pixels
|
||||
static const uint MAX_LENGTH_COMPANY_NAME_CHARS = 32; ///< The maximum length of a company name in characters including '\0'
|
||||
static const uint MAX_LENGTH_COMPANY_NAME_PIXELS = 150; ///< The maximum length of a company name in pixels
|
||||
|
||||
+8
-9
@@ -20,13 +20,8 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define ICON_BUFFER 79
|
||||
#define ICON_HISTORY_SIZE 20
|
||||
#define ICON_LINE_HEIGHT 12
|
||||
#define ICON_RIGHT_BORDERWIDTH 10
|
||||
#define ICON_BOTTOM_BORDERWIDTH 12
|
||||
#define ICON_MAX_ALIAS_LINES 40
|
||||
#define ICON_TOKEN_COUNT 20
|
||||
static const uint ICON_TOKEN_COUNT = 20; ///< Maximum number of tokens in one command
|
||||
static const uint ICON_MAX_ALIAS_LINES = 40; ///< Maximum number of commands executed by one alias
|
||||
|
||||
/* console parser */
|
||||
IConsoleCmd *_iconsole_cmds; ///< list of registered commands
|
||||
@@ -89,8 +84,10 @@ void IConsoleFree()
|
||||
* @param colour_code the colour of the command. Red in case of errors, etc.
|
||||
* @param string the message entered or output on the console (notice, error, etc.)
|
||||
*/
|
||||
void IConsolePrint(ConsoleColour colour_code, const char *string)
|
||||
void IConsolePrint(TextColour colour_code, const char *string)
|
||||
{
|
||||
assert(IsValidConsoleColour(colour_code));
|
||||
|
||||
char *str;
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (_redirect_console_to_client != INVALID_CLIENT_ID) {
|
||||
@@ -131,8 +128,10 @@ void IConsolePrint(ConsoleColour colour_code, const char *string)
|
||||
* by any other means. Uses printf() style format, for more information look
|
||||
* at IConsolePrint()
|
||||
*/
|
||||
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...)
|
||||
void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...)
|
||||
{
|
||||
assert(IsValidConsoleColour(colour_code));
|
||||
|
||||
va_list va;
|
||||
char buf[ICON_MAX_STREAMSIZE];
|
||||
|
||||
|
||||
+58
-28
@@ -161,17 +161,6 @@ DEF_CONSOLE_CMD(ConResetTile)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConStopAllVehicles)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Stops all vehicles in the game. For debugging only! Use at your own risk... Usage: 'stopall'");
|
||||
return true;
|
||||
}
|
||||
|
||||
StopAllVehicles();
|
||||
return true;
|
||||
}
|
||||
#endif /* _DEBUG */
|
||||
|
||||
DEF_CONSOLE_CMD(ConScrollToTile)
|
||||
@@ -958,7 +947,7 @@ DEF_CONSOLE_CMD(ConEchoC)
|
||||
}
|
||||
|
||||
if (argc < 3) return false;
|
||||
IConsolePrint((ConsoleColour)atoi(argv[1]), argv[2]);
|
||||
IConsolePrint((TextColour)Clamp(atoi(argv[1]), TC_BEGIN, TC_END - 1), argv[2]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -995,21 +984,40 @@ DEF_CONSOLE_CMD(ConRestart)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_AI
|
||||
DEF_CONSOLE_CMD(ConListAI)
|
||||
/**
|
||||
* Print a text buffer line by line to the console. Lines are seperated by '\n'.
|
||||
* @param buf The buffer to print.
|
||||
* @note All newlines are replace by '\0' characters.
|
||||
*/
|
||||
static void PrintLineByLine(char *buf)
|
||||
{
|
||||
char buf[4096];
|
||||
char *p = &buf[0];
|
||||
p = AI::GetConsoleList(p, lastof(buf));
|
||||
|
||||
p = &buf[0];
|
||||
char *p = buf;
|
||||
/* Print output line by line */
|
||||
for (char *p2 = &buf[0]; *p2 != '\0'; p2++) {
|
||||
for (char *p2 = buf; *p2 != '\0'; p2++) {
|
||||
if (*p2 == '\n') {
|
||||
*p2 = '\0';
|
||||
IConsolePrintF(CC_DEFAULT, "%s", p);
|
||||
p = p2 + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConListAILibs)
|
||||
{
|
||||
char buf[4096];
|
||||
AI::GetConsoleLibraryList(buf, lastof(buf));
|
||||
|
||||
PrintLineByLine(buf);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConListAI)
|
||||
{
|
||||
char buf[4096];
|
||||
AI::GetConsoleList(buf, lastof(buf));
|
||||
|
||||
PrintLineByLine(buf);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1507,24 +1515,46 @@ DEF_CONSOLE_CMD(ConSayClient)
|
||||
return true;
|
||||
}
|
||||
|
||||
extern void HashCurrentCompanyPassword(const char *password);
|
||||
|
||||
DEF_CONSOLE_CMD(ConCompanyPassword)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Change the password of your company. Usage: 'company_pw \"<password>\"'");
|
||||
const char *helpmsg;
|
||||
|
||||
if (_network_dedicated) {
|
||||
helpmsg = "Change the password of a company. Usage: 'company_pw <company-no> \"<password>\"";
|
||||
} else if (_network_server) {
|
||||
helpmsg = "Change the password of your or any other company. Usage: 'company_pw [<company-no>] \"<password>\"'";
|
||||
} else {
|
||||
helpmsg = "Change the password of your company. Usage: 'company_pw \"<password>\"'";
|
||||
}
|
||||
|
||||
IConsoleHelp(helpmsg);
|
||||
IConsoleHelp("Use \"*\" to disable the password.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argc != 2) return false;
|
||||
CompanyID company_id;
|
||||
const char *password;
|
||||
const char *errormsg;
|
||||
|
||||
if (!Company::IsValidID(_local_company)) {
|
||||
IConsoleError("You have to own a company to make use of this command.");
|
||||
if (argc == 2) {
|
||||
company_id = _local_company;
|
||||
password = argv[1];
|
||||
errormsg = "You have to own a company to make use of this command.";
|
||||
} else if (argc == 3 && _network_server) {
|
||||
company_id = (CompanyID)(atoi(argv[1]) - 1);
|
||||
password = argv[2];
|
||||
errormsg = "You have to specify the ID of a valid human controlled company.";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *password = NetworkChangeCompanyPassword(argv[1]);
|
||||
if (!Company::IsValidHumanID(company_id)) {
|
||||
IConsoleError(errormsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
password = NetworkChangeCompanyPassword(company_id, password, false);
|
||||
|
||||
if (StrEmpty(password)) {
|
||||
IConsolePrintF(CC_WARNING, "Company password cleared");
|
||||
@@ -1628,7 +1658,7 @@ DEF_CONSOLE_CMD(ConContent)
|
||||
static const char * const types[] = { "Base graphics", "NewGRF", "AI", "AI library", "Scenario", "Heightmap", "Base sound", "Base music" };
|
||||
assert_compile(lengthof(types) == CONTENT_TYPE_END - CONTENT_TYPE_BEGIN);
|
||||
static const char * const states[] = { "Not selected", "Selected", "Dep Selected", "Installed", "Unknown" };
|
||||
static const ConsoleColour state_to_colour[] = { CC_COMMAND, CC_INFO, CC_INFO, CC_WHITE, CC_ERROR };
|
||||
static const TextColour state_to_colour[] = { CC_COMMAND, CC_INFO, CC_INFO, CC_WHITE, CC_ERROR };
|
||||
|
||||
const ContentInfo *ci = *iter;
|
||||
IConsolePrintF(state_to_colour[ci->state], "%d, %s, %s, %s", ci->id, types[ci->type - 1], states[ci->state], ci->name);
|
||||
@@ -1725,7 +1755,6 @@ DEF_CONSOLE_CMD(ConNewGRFReload)
|
||||
static void IConsoleDebugLibRegister()
|
||||
{
|
||||
IConsoleCmdRegister("resettile", ConResetTile);
|
||||
IConsoleCmdRegister("stopall", ConStopAllVehicles);
|
||||
IConsoleAliasRegister("dbg_echo", "echo %A; echo %B");
|
||||
IConsoleAliasRegister("dbg_echo2", "echo %!");
|
||||
}
|
||||
@@ -1782,6 +1811,7 @@ void IConsoleStdLibRegister()
|
||||
IConsoleAliasRegister("developer", "setting developer %+");
|
||||
|
||||
#ifdef ENABLE_AI
|
||||
IConsoleCmdRegister("list_ai_libs", ConListAILibs);
|
||||
IConsoleCmdRegister("list_ai", ConListAI);
|
||||
IConsoleCmdRegister("reload_ai", ConReloadAI);
|
||||
IConsoleCmdRegister("rescan_ai", ConRescanAI);
|
||||
|
||||
+4
-2
@@ -23,8 +23,8 @@ void IConsoleFree();
|
||||
void IConsoleClose();
|
||||
|
||||
/* console output */
|
||||
void IConsolePrint(ConsoleColour colour_code, const char *string);
|
||||
void CDECL IConsolePrintF(ConsoleColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
|
||||
void IConsolePrint(TextColour colour_code, const char *string);
|
||||
void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
|
||||
void IConsoleDebug(const char *dbg, const char *string);
|
||||
void IConsoleWarning(const char *string);
|
||||
void IConsoleError(const char *string);
|
||||
@@ -32,4 +32,6 @@ void IConsoleError(const char *string);
|
||||
/* Parser */
|
||||
void IConsoleCmdExec(const char *cmdstr);
|
||||
|
||||
bool IsValidConsoleColour(TextColour c);
|
||||
|
||||
#endif /* CONSOLE_FUNC_H */
|
||||
|
||||
+23
-2
@@ -489,8 +489,29 @@ static void IConsoleHistoryNavigate(int direction)
|
||||
* @param colour_code the colour of the command. Red in case of errors, etc.
|
||||
* @param str the message entered or output on the console (notice, error, etc.)
|
||||
*/
|
||||
void IConsoleGUIPrint(ConsoleColour colour_code, char *str)
|
||||
void IConsoleGUIPrint(TextColour colour_code, char *str)
|
||||
{
|
||||
new IConsoleLine(str, (TextColour)colour_code);
|
||||
new IConsoleLine(str, colour_code);
|
||||
SetWindowDirty(WC_CONSOLE, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check whether the given TextColour is valid for console usage.
|
||||
* @param c The text colour to compare to.
|
||||
* @return true iff the TextColour is valid for console usage.
|
||||
*/
|
||||
bool IsValidConsoleColour(TextColour c)
|
||||
{
|
||||
/* A normal text colour is used. */
|
||||
if (!(c & TC_IS_PALETTE_COLOUR)) return TC_BEGIN <= c && c < TC_END;
|
||||
|
||||
/* A text colour from the palette is used; must be the company
|
||||
* colour gradient, so it must be one of those. */
|
||||
c &= ~TC_IS_PALETTE_COLOUR;
|
||||
for (uint i = TC_BEGIN; i < TC_END; i++) {
|
||||
if (_colour_gradient[i][4] == c) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ bool GetArgumentInteger(uint32 *value, const char *arg);
|
||||
|
||||
void IConsoleGUIInit();
|
||||
void IConsoleGUIFree();
|
||||
void IConsoleGUIPrint(ConsoleColour colour_code, char *string);
|
||||
void IConsoleGUIPrint(TextColour colour_code, char *string);
|
||||
char *RemoveUnderscores(char *name);
|
||||
|
||||
#endif /* CONSOLE_INTERNAL_H */
|
||||
|
||||
+10
-10
@@ -12,6 +12,8 @@
|
||||
#ifndef CONSOLE_TYPE_H
|
||||
#define CONSOLE_TYPE_H
|
||||
|
||||
#include "gfx_type.h"
|
||||
|
||||
/** Modes of the in-game console. */
|
||||
enum IConsoleModes {
|
||||
ICONSOLE_FULL, ///< In-game console is closed.
|
||||
@@ -19,15 +21,13 @@ enum IConsoleModes {
|
||||
ICONSOLE_CLOSED ///< In-game console is opened, whole screen.
|
||||
};
|
||||
|
||||
/** Colours of the console messages. */
|
||||
enum ConsoleColour {
|
||||
CC_DEFAULT = 1,
|
||||
CC_ERROR = 3,
|
||||
CC_WARNING = 13,
|
||||
CC_INFO = 8,
|
||||
CC_DEBUG = 5,
|
||||
CC_COMMAND = 2,
|
||||
CC_WHITE = 12,
|
||||
};
|
||||
/* Colours of the console messages. */
|
||||
static const TextColour CC_DEFAULT = TC_SILVER; ///< Default colour of the console.
|
||||
static const TextColour CC_ERROR = TC_RED; ///< Colour for error lines.
|
||||
static const TextColour CC_WARNING = TC_LIGHT_BLUE; ///< Colour for warning lines.
|
||||
static const TextColour CC_INFO = TC_YELLOW; ///< Colour for information lines.
|
||||
static const TextColour CC_DEBUG = TC_LIGHT_BROWN; ///< Colour for debug output.
|
||||
static const TextColour CC_COMMAND = TC_GOLD; ///< Colour for the console's commands.
|
||||
static const TextColour CC_WHITE = TC_WHITE; ///< White console lines for various things such as the welcome.
|
||||
|
||||
#endif /* CONSOLE_TYPE_H */
|
||||
|
||||
@@ -73,6 +73,12 @@ char *CrashLog::LogCompiler(char *buffer, const char *last) const
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes OpenTTD's version to the buffer.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
||||
{
|
||||
return buffer + seprintf(buffer, last,
|
||||
@@ -105,6 +111,13 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the (important) configuration settings to the buffer.
|
||||
* E.g. graphics set, sound set, blitter and AIs.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
||||
{
|
||||
buffer += seprintf(buffer, last,
|
||||
@@ -181,6 +194,12 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
||||
# include <zlib.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Writes information (versions) of the used libraries.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *CrashLog::LogLibraries(char *buffer, const char *last) const
|
||||
{
|
||||
buffer += seprintf(buffer, last, "Libraries:\n");
|
||||
@@ -243,11 +262,21 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for printing the gamelog.
|
||||
* @param s the string to print.
|
||||
*/
|
||||
/* static */ void CrashLog::GamelogFillCrashLog(const char *s)
|
||||
{
|
||||
CrashLog::gamelog_buffer += seprintf(CrashLog::gamelog_buffer, CrashLog::gamelog_last, "%s\n", s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the gamelog data to the buffer.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *CrashLog::LogGamelog(char *buffer, const char *last) const
|
||||
{
|
||||
CrashLog::gamelog_buffer = buffer;
|
||||
@@ -256,6 +285,12 @@ char *CrashLog::LogGamelog(char *buffer, const char *last) const
|
||||
return CrashLog::gamelog_buffer + seprintf(CrashLog::gamelog_buffer, last, "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill the crash log buffer with all data of a crash log.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *CrashLog::FillCrashLog(char *buffer, const char *last) const
|
||||
{
|
||||
time_t cur_time = time(NULL);
|
||||
@@ -281,6 +316,15 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the crash log to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* crash log file. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param buffer The begin of the buffer to write to the disk.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash log was successfully written.
|
||||
*/
|
||||
bool CrashLog::WriteCrashLog(const char *buffer, char *filename, const char *filename_last) const
|
||||
{
|
||||
seprintf(filename, filename_last, "%scrash.log", _personal_dir);
|
||||
@@ -301,6 +345,14 @@ bool CrashLog::WriteCrashLog(const char *buffer, char *filename, const char *fil
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the (crash) savegame to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* crash save file. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash save was successfully made.
|
||||
*/
|
||||
bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const
|
||||
{
|
||||
/* If the map array doesn't exist, saving will fail too. If the map got
|
||||
@@ -319,6 +371,14 @@ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the (crash) screenshot to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* screenshot. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash screenshot was successfully made.
|
||||
*/
|
||||
bool CrashLog::WriteScreenshot(char *filename, const char *filename_last) const
|
||||
{
|
||||
/* Don't draw when we have invalid screen size */
|
||||
@@ -329,6 +389,12 @@ bool CrashLog::WriteScreenshot(char *filename, const char *filename_last) const
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the crash log, writes it to a file and then subsequently tries
|
||||
* to make a crash dump and crash savegame. It uses DEBUG to write
|
||||
* information like paths to the console.
|
||||
* @return true when everything is made successfully.
|
||||
*/
|
||||
bool CrashLog::MakeCrashLog() const
|
||||
{
|
||||
/* Don't keep looping logging crashes. */
|
||||
@@ -384,11 +450,19 @@ bool CrashLog::MakeCrashLog() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a message for the error message handler.
|
||||
* @param message The error message of the error.
|
||||
*/
|
||||
/* static */ void CrashLog::SetErrorMessage(const char *message)
|
||||
{
|
||||
CrashLog::message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to close the sound/video stuff so it doesn't keep lingering around
|
||||
* incorrect video states or so, e.g. keeping dpmi disabled.
|
||||
*/
|
||||
/* static */ void CrashLog::AfterCrashLogCleanup()
|
||||
{
|
||||
if (_music_driver != NULL) _music_driver->Stop();
|
||||
|
||||
@@ -26,10 +26,6 @@ private:
|
||||
/** Temporary 'local' location of the end of the buffer. */
|
||||
static const char *gamelog_last;
|
||||
|
||||
/**
|
||||
* Helper function for printing the gamelog.
|
||||
* @param s the string to print.
|
||||
*/
|
||||
static void GamelogFillCrashLog(const char *s);
|
||||
protected:
|
||||
/**
|
||||
@@ -85,60 +81,16 @@ protected:
|
||||
virtual char *LogModules(char *buffer, const char *last) const;
|
||||
|
||||
|
||||
/**
|
||||
* Writes OpenTTD's version to the buffer.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *LogOpenTTDVersion(char *buffer, const char *last) const;
|
||||
|
||||
/**
|
||||
* Writes the (important) configuration settings to the buffer.
|
||||
* E.g. graphics set, sound set, blitter and AIs.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *LogConfiguration(char *buffer, const char *last) const;
|
||||
|
||||
/**
|
||||
* Writes information (versions) of the used libraries.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *LogLibraries(char *buffer, const char *last) const;
|
||||
|
||||
/**
|
||||
* Writes the gamelog data to the buffer.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *LogGamelog(char *buffer, const char *last) const;
|
||||
|
||||
public:
|
||||
/** Stub destructor to silence some compilers. */
|
||||
virtual ~CrashLog() {}
|
||||
|
||||
/**
|
||||
* Fill the crash log buffer with all data of a crash log.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
*/
|
||||
char *FillCrashLog(char *buffer, const char *last) const;
|
||||
|
||||
/**
|
||||
* Write the crash log to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* crash log file. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param buffer The begin of the buffer to write to the disk.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash log was successfully written.
|
||||
*/
|
||||
bool WriteCrashLog(const char *buffer, char *filename, const char *filename_last) const;
|
||||
|
||||
/**
|
||||
@@ -151,33 +103,9 @@ public:
|
||||
* was successful (not all OSes support dumping files).
|
||||
*/
|
||||
virtual int WriteCrashDump(char *filename, const char *filename_last) const;
|
||||
|
||||
/**
|
||||
* Write the (crash) savegame to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* crash save file. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash save was successfully made.
|
||||
*/
|
||||
bool WriteSavegame(char *filename, const char *filename_last) const;
|
||||
|
||||
/**
|
||||
* Write the (crash) screenshot to a file.
|
||||
* @note On success the filename will be filled with the full path of the
|
||||
* screenshot. Make sure filename is at least \c MAX_PATH big.
|
||||
* @param filename Output for the filename of the written file.
|
||||
* @param filename_last The last position in the filename buffer.
|
||||
* @return true when the crash screenshot was successfully made.
|
||||
*/
|
||||
bool WriteScreenshot(char *filename, const char *filename_last) const;
|
||||
|
||||
/**
|
||||
* Makes the crash log, writes it to a file and then subsequently tries
|
||||
* to make a crash dump and crash savegame. It uses DEBUG to write
|
||||
* information like paths to the console.
|
||||
* @return true when everything is made successfully.
|
||||
*/
|
||||
bool MakeCrashLog() const;
|
||||
|
||||
/**
|
||||
@@ -187,16 +115,7 @@ public:
|
||||
*/
|
||||
static void InitialiseCrashLog();
|
||||
|
||||
/**
|
||||
* Sets a message for the error message handler.
|
||||
* @param message The error message of the error.
|
||||
*/
|
||||
static void SetErrorMessage(const char *message);
|
||||
|
||||
/**
|
||||
* Try to close the sound/video stuff so it doesn't keep lingering around
|
||||
* incorrect video states or so, e.g. keeping dpmi disabled.
|
||||
*/
|
||||
static void AfterCrashLogCleanup();
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ extern CurrencySpec _currency_specs[NUM_CURRENCY];
|
||||
|
||||
/* XXX small hack, but makes the rest of the code a bit nicer to read */
|
||||
#define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID])
|
||||
#define _currency ((const CurrencySpec*)&_currency_specs[_game_mode == GM_MENU ? _settings_newgame.locale.currency : _settings_game.locale.currency])
|
||||
#define _currency ((const CurrencySpec*)&_currency_specs[GetGameSettings().locale.currency])
|
||||
|
||||
uint GetMaskOfAllowedCurrencies();
|
||||
void CheckSwitchToEuro();
|
||||
|
||||
+1
-1
@@ -849,7 +849,7 @@ struct DepotWindow : Window {
|
||||
this->sel = INVALID_VEHICLE;
|
||||
this->vehicle_over = INVALID_VEHICLE;
|
||||
this->SetWidgetDirty(DEPOT_WIDGET_MATRIX);
|
||||
};
|
||||
}
|
||||
|
||||
virtual void OnMouseDrag(Point pt, int widget)
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
typedef uint16 DepotID;
|
||||
struct Depot;
|
||||
|
||||
static const uint MAX_LENGTH_DEPOT_NAME_CHARS = 31; ///< The maximum length of a depot name in characters including '\0'
|
||||
static const uint MAX_LENGTH_DEPOT_NAME_CHARS = 32; ///< The maximum length of a depot name in characters including '\0'
|
||||
static const uint MAX_LENGTH_DEPOT_NAME_PIXELS = 180; ///< The maximum length of a depot name in pixels
|
||||
|
||||
#endif /* DEPOT_TYPE_H */
|
||||
|
||||
@@ -307,7 +307,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
|
||||
|
||||
RoadVehicle *u;
|
||||
FOR_ALL_ROADVEHICLES(u) {
|
||||
if (u->IsRoadVehFront()) {
|
||||
if (u->IsFrontEngine()) {
|
||||
v->dest_tile = u->index;
|
||||
v->age = 0;
|
||||
return true;
|
||||
@@ -319,7 +319,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
|
||||
} else {
|
||||
/* Target a vehicle */
|
||||
RoadVehicle *u = RoadVehicle::Get(v->dest_tile);
|
||||
assert(u != NULL && u->type == VEH_ROAD && u->IsRoadVehFront());
|
||||
assert(u != NULL && u->type == VEH_ROAD && u->IsFrontEngine());
|
||||
|
||||
uint dist = Delta(v->x_pos, u->x_pos) + Delta(v->y_pos, u->y_pos);
|
||||
|
||||
|
||||
+2
-2
@@ -157,7 +157,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
|
||||
case DTW_BUOY: // Build buoy button
|
||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||
HandlePlacePushButton(this, DTW_BUOY, SPR_CURSOR_BOUY, HT_RECT);
|
||||
HandlePlacePushButton(this, DTW_BUOY, SPR_CURSOR_BUOY, HT_RECT);
|
||||
break;
|
||||
|
||||
case DTW_RIVER: // Build river button (in scenario editor)
|
||||
@@ -318,7 +318,7 @@ static const NWidgetPart _nested_build_docks_toolbar_widgets[] = {
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_DEMOLISH), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_DEPOT), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIP_DEPOT, STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP),
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_STATION), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SHIP_DOCK, STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP),
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_BUOY), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BOUY, STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP),
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_BUOY), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BUOY, STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP),
|
||||
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, DTW_BUILD_AQUEDUCT), SetMinimalSize(23, 22), SetFill(0, 1), SetDataTip(SPR_IMG_AQUEDUCT, STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -473,6 +473,13 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws wires on a tunnel tile
|
||||
*
|
||||
* DrawTile_TunnelBridge() calls this function to draw the wires on the bridge.
|
||||
*
|
||||
* @param ti The Tileinfo to draw the tile for
|
||||
*/
|
||||
void DrawCatenaryOnBridge(const TileInfo *ti)
|
||||
{
|
||||
TileIndex end = GetSouthernBridgeEnd(ti->tile);
|
||||
@@ -530,6 +537,11 @@ void DrawCatenaryOnBridge(const TileInfo *ti)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws overhead wires and pylons for electric railways.
|
||||
* @param ti The TileInfo struct of the tile being drawn
|
||||
* @see DrawCatenaryRailway
|
||||
*/
|
||||
void DrawCatenary(const TileInfo *ti)
|
||||
{
|
||||
switch (GetTileType(ti->tile)) {
|
||||
|
||||
@@ -34,11 +34,6 @@ static inline bool HasCatenaryDrawn(RailType rt)
|
||||
return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws overhead wires and pylons for electric railways.
|
||||
* @param ti The TileInfo struct of the tile being drawn
|
||||
* @see DrawCatenaryRailway
|
||||
*/
|
||||
void DrawCatenary(const TileInfo *ti);
|
||||
void DrawCatenaryOnTunnel(const TileInfo *ti);
|
||||
void DrawCatenaryOnBridge(const TileInfo *ti);
|
||||
|
||||
+44
-2
@@ -44,6 +44,11 @@ EngineOverrideManager _engine_mngr;
|
||||
*/
|
||||
static Year _year_engine_aging_stops;
|
||||
|
||||
/**
|
||||
* The railtypes that have been or never will be introduced, or
|
||||
* an inverse bitmap of rail types that have to be introduced. */
|
||||
static uint16 _introduced_railtypes;
|
||||
|
||||
/** Number of engines of each vehicle type in original engine data */
|
||||
const uint8 _engine_counts[4] = {
|
||||
lengthof(_orig_rail_vehicle_info),
|
||||
@@ -474,8 +479,30 @@ void SetupEngines()
|
||||
const Engine *e = new Engine(eid->type, eid->internal_id);
|
||||
assert(e->index == index);
|
||||
}
|
||||
|
||||
_introduced_railtypes = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the railtypes should be introduced.
|
||||
*/
|
||||
static void CheckRailIntroduction()
|
||||
{
|
||||
/* All railtypes have been introduced. */
|
||||
if (_introduced_railtypes == UINT16_MAX || Company::GetPoolSize() == 0) return;
|
||||
|
||||
/* We need to find the railtypes that are known to all companies. */
|
||||
RailTypes rts = (RailTypes)UINT16_MAX;
|
||||
|
||||
/* We are at, or past the introduction date of the rail. */
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, _date);
|
||||
rts &= c->avail_railtypes;
|
||||
}
|
||||
|
||||
_introduced_railtypes |= rts;
|
||||
}
|
||||
|
||||
void ShowEnginePreviewWindow(EngineID engine);
|
||||
|
||||
@@ -602,6 +629,19 @@ void StartupEngines()
|
||||
c->avail_roadtypes = GetCompanyRoadtypes(c->index);
|
||||
}
|
||||
|
||||
/* Rail types that are invalid or never introduced are marked as
|
||||
* being introduced upon start. That way we can easily check whether
|
||||
* there is any date related introduction that is still going to
|
||||
* happen somewhere in the future. */
|
||||
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
|
||||
const RailtypeInfo *rti = GetRailTypeInfo(rt);
|
||||
if (rti->label != 0 && IsInsideMM(rti->introduction_date, 0, MAX_DAY)) continue;
|
||||
|
||||
SetBit(_introduced_railtypes, rt);
|
||||
}
|
||||
|
||||
CheckRailIntroduction();
|
||||
|
||||
/* Invalidate any open purchase lists */
|
||||
InvalidateWindowClassesData(WC_BUILD_VEHICLE);
|
||||
}
|
||||
@@ -614,7 +654,7 @@ static void AcceptEnginePreview(EngineID eid, CompanyID company)
|
||||
SetBit(e->company_avail, company);
|
||||
if (e->type == VEH_TRAIN) {
|
||||
assert(e->u.rail.railtype < RAILTYPE_END);
|
||||
SetBit(c->avail_railtypes, e->u.rail.railtype);
|
||||
c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date);
|
||||
} else if (e->type == VEH_ROAD) {
|
||||
SetBit(c->avail_roadtypes, HasBit(e->info.misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
|
||||
}
|
||||
@@ -663,6 +703,8 @@ static CompanyID GetBestCompany(uint8 pp)
|
||||
/** Daily check to offer an exclusive engine preview to the companies. */
|
||||
void EnginesDailyLoop()
|
||||
{
|
||||
CheckRailIntroduction();
|
||||
|
||||
if (_cur_year >= _year_engine_aging_stops) return;
|
||||
|
||||
Engine *e;
|
||||
@@ -760,7 +802,7 @@ static void NewVehicleAvailable(Engine *e)
|
||||
/* maybe make another rail type available */
|
||||
RailType railtype = e->u.rail.railtype;
|
||||
assert(railtype < RAILTYPE_END);
|
||||
FOR_ALL_COMPANIES(c) SetBit(c->avail_railtypes, railtype);
|
||||
FOR_ALL_COMPANIES(c) c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date);
|
||||
} else if (e->type == VEH_ROAD) {
|
||||
/* maybe make another road type available */
|
||||
FOR_ALL_COMPANIES(c) SetBit(c->avail_roadtypes, HasBit(e->info.misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ enum EngineFlags {
|
||||
};
|
||||
|
||||
static const uint NUM_VEHICLE_TYPES = 6;
|
||||
static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 31; ///< The maximum length of an engine name in characters including '\0'
|
||||
static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 32; ///< The maximum length of an engine name in characters including '\0'
|
||||
static const uint MAX_LENGTH_ENGINE_NAME_PIXELS = 160; ///< The maximum length of an engine name in pixels
|
||||
|
||||
static const EngineID INVALID_ENGINE = 0xFFFF;
|
||||
|
||||
+16
-4
@@ -1007,10 +1007,22 @@ const Sprite *GetGlyph(FontSize size, WChar key)
|
||||
|
||||
FT_UInt glyph_index = FT_Get_Char_Index(face, key);
|
||||
if (glyph_index == 0) {
|
||||
GetGlyph(size, '?');
|
||||
glyph = GetGlyphPtr(size, '?');
|
||||
SetGlyphPtr(size, key, glyph, true);
|
||||
return glyph->sprite;
|
||||
if (key == '?') {
|
||||
/* The font misses the '?' character. Use sprite font. */
|
||||
SpriteID sprite = GetUnicodeGlyph(size, key);
|
||||
Sprite *spr = (Sprite*)GetRawSprite(sprite, ST_FONT, AllocateFont);
|
||||
assert(spr != NULL);
|
||||
new_glyph.sprite = spr;
|
||||
new_glyph.width = spr->width + (size != FS_NORMAL);
|
||||
SetGlyphPtr(size, key, &new_glyph, false);
|
||||
return new_glyph.sprite;
|
||||
} else {
|
||||
/* Use '?' for missing characters. */
|
||||
GetGlyph(size, '?');
|
||||
glyph = GetGlyphPtr(size, '?');
|
||||
SetGlyphPtr(size, key, glyph, true);
|
||||
return glyph->sprite;
|
||||
}
|
||||
}
|
||||
FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
|
||||
FT_Render_Glyph(face->glyph, aa ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
|
||||
|
||||
@@ -28,11 +28,6 @@ CommandCost CheckOwnership(Owner owner, TileIndex tile = 0);
|
||||
CommandCost CheckTileOwnership(TileIndex tile);
|
||||
|
||||
/* misc functions */
|
||||
/**
|
||||
* Mark a tile given by its index dirty for repaint.
|
||||
*
|
||||
* @ingroup dirty
|
||||
*/
|
||||
void MarkTileDirtyByTile(TileIndex tile);
|
||||
|
||||
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ static void _GenerateWorld(void *)
|
||||
if (_debug_desync_level > 0) {
|
||||
char name[MAX_PATH];
|
||||
snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
|
||||
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
|
||||
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR, false);
|
||||
}
|
||||
} catch (...) {
|
||||
if (_cur_company.IsValid()) _cur_company.Restore();
|
||||
|
||||
@@ -755,7 +755,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||
this->widget_id = widget;
|
||||
SetDParam(0, _settings_newgame.game_creation.custom_town_number);
|
||||
ShowQueryString(STR_JUST_INT, STR_MAPGEN_NUMBER_OF_TOWNS, 5, 50, this, CS_NUMERAL, QSF_NONE);
|
||||
};
|
||||
}
|
||||
IConsoleSetSetting("difficulty.number_towns", index);
|
||||
break;
|
||||
|
||||
@@ -776,7 +776,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||
this->widget_id = widget;
|
||||
SetDParam(0, _settings_newgame.game_creation.custom_sea_level);
|
||||
ShowQueryString(STR_JUST_INT, STR_MAPGEN_QUANTITY_OF_SEA_LAKES, 3, 50, this, CS_NUMERAL, QSF_NONE);
|
||||
};
|
||||
}
|
||||
GameMode old_gm = _game_mode;
|
||||
_game_mode = GM_MENU;
|
||||
IConsoleSetSetting("difficulty.quantity_sea_lakes", index);
|
||||
|
||||
+4
-3
@@ -1559,7 +1559,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
|
||||
_video_driver->MakeDirty(left, top, right - left, bottom - top);
|
||||
}
|
||||
|
||||
/*!
|
||||
/**
|
||||
* Repaints the rectangle blocks which are marked as 'dirty'.
|
||||
*
|
||||
* @see SetDirtyBlocks
|
||||
@@ -1653,7 +1653,7 @@ void DrawDirtyBlocks()
|
||||
_invalid_rect.bottom = 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
/**
|
||||
* This function extends the internal _invalid_rect rectangle as it
|
||||
* now contains the rectangle defined by the given parameters. Note
|
||||
* the point (0,0) is top left.
|
||||
@@ -1705,10 +1705,11 @@ void SetDirtyBlocks(int left, int top, int right, int bottom)
|
||||
} while (--height != 0);
|
||||
}
|
||||
|
||||
/*!
|
||||
/**
|
||||
* This function mark the whole screen as dirty. This results in repainting
|
||||
* the whole screen. Use this with care as this function will break the
|
||||
* idea about marking only parts of the screen as 'dirty'.
|
||||
* @ingroup dirty
|
||||
*/
|
||||
void MarkWholeScreenDirty()
|
||||
{
|
||||
|
||||
@@ -128,25 +128,8 @@ int GetStringHeight(StringID str, int maxw);
|
||||
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion);
|
||||
void LoadStringWidthTable();
|
||||
|
||||
/**
|
||||
* Let the dirty blocks repainting by the video driver.
|
||||
*
|
||||
* @ingroup dirty
|
||||
*/
|
||||
void DrawDirtyBlocks();
|
||||
|
||||
/**
|
||||
* Set a new dirty block.
|
||||
*
|
||||
* @ingroup dirty
|
||||
*/
|
||||
void SetDirtyBlocks(int left, int top, int right, int bottom);
|
||||
|
||||
/**
|
||||
* Marks the whole screen as dirty.
|
||||
*
|
||||
* @ingroup dirty
|
||||
*/
|
||||
void MarkWholeScreenDirty();
|
||||
|
||||
void GfxInitPalettes();
|
||||
|
||||
@@ -204,6 +204,7 @@ template <> struct EnumPropsT<Colours> : MakeEnumPropsT<Colours, byte, COLOUR_DA
|
||||
|
||||
/** Colour of the strings, see _string_colourmap in table/palettes.h or docs/ottd-colourtext-palette.png */
|
||||
enum TextColour {
|
||||
TC_BEGIN = 0x00,
|
||||
TC_FROMSTRING = 0x00,
|
||||
TC_BLUE = 0x00,
|
||||
TC_SILVER = 0x01,
|
||||
@@ -222,6 +223,7 @@ enum TextColour {
|
||||
TC_GREY = 0x0E,
|
||||
TC_DARK_BLUE = 0x0F,
|
||||
TC_BLACK = 0x10,
|
||||
TC_END,
|
||||
TC_INVALID = 0xFF,
|
||||
|
||||
TC_IS_PALETTE_COLOUR = 0x100, ///< Colour value is already a real palette colour index, not an index of a StringColour.
|
||||
|
||||
@@ -127,7 +127,7 @@ int GroundVehicle<T, Type>::GetAcceleration() const
|
||||
}
|
||||
/* Air drag; the air drag coefficient is in an arbitrary NewGRF-unit,
|
||||
* so we need some magic conversion factor. */
|
||||
resistance += (area * this->gcache.cached_air_drag * speed * speed) / 500;
|
||||
resistance += (area * this->gcache.cached_air_drag * speed * speed) / 1000;
|
||||
|
||||
resistance += this->GetSlopeResistance();
|
||||
|
||||
@@ -151,7 +151,8 @@ int GroundVehicle<T, Type>::GetAcceleration() const
|
||||
}
|
||||
|
||||
if (mode == AS_ACCEL) {
|
||||
return (force - resistance) / (mass * 2);
|
||||
/* Divide by 4 to compensate for the wacky game scale. */
|
||||
return (force - resistance) / (mass * 4);
|
||||
} else {
|
||||
return min(-force - resistance, -10000) / mass;
|
||||
}
|
||||
|
||||
+134
-1
@@ -112,9 +112,9 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
|
||||
FORCEINLINE byte UpdateInclination(bool new_tile, bool turned)
|
||||
{
|
||||
byte old_z = this->z_pos;
|
||||
this->z_pos = GetSlopeZ(this->x_pos, this->y_pos);
|
||||
|
||||
if (new_tile) {
|
||||
this->z_pos = GetSlopeZ(this->x_pos, this->y_pos);
|
||||
ClrBit(this->gv_flags, GVF_GOINGUP_BIT);
|
||||
ClrBit(this->gv_flags, GVF_GOINGDOWN_BIT);
|
||||
|
||||
@@ -132,11 +132,144 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
|
||||
SetBit(this->gv_flags, (middle_z > old_z) ? GVF_GOINGUP_BIT : GVF_GOINGDOWN_BIT);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Flat tile, tile with two opposing corners raised and tile with 3 corners
|
||||
* raised can never have sloped track ... */
|
||||
static const uint32 never_sloped = 1 << SLOPE_FLAT | 1 << SLOPE_EW | 1 << SLOPE_NS | 1 << SLOPE_NWS | 1 << SLOPE_WSE | 1 << SLOPE_SEN | 1 << SLOPE_ENW;
|
||||
/* ... unless it's a bridge head. */
|
||||
if (IsTileType(this->tile, MP_TUNNELBRIDGE) || // the following check would be true for tunnels anyway
|
||||
(T::From(this)->TileMayHaveSlopedTrack() && !HasBit(never_sloped, GetTileSlope(this->tile, NULL)))) {
|
||||
this->z_pos = GetSlopeZ(this->x_pos, this->y_pos);
|
||||
} else {
|
||||
/* Verify that assumption. */
|
||||
assert(this->z_pos == GetSlopeZ(this->x_pos, this->y_pos));
|
||||
}
|
||||
}
|
||||
|
||||
this->UpdateViewport(true, turned);
|
||||
return old_z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum to handle ground vehicle subtypes.
|
||||
* Do not access it directly unless you have to. Use the subtype access functions.
|
||||
*/
|
||||
enum GroundVehicleSubtypeFlags {
|
||||
GVSF_FRONT = 0, ///< Leading engine of a consist.
|
||||
GVSF_ARTICULATED_PART = 1, ///< Articulated part of an engine.
|
||||
GVSF_WAGON = 2, ///< Wagon (not used for road vehicles).
|
||||
GVSF_ENGINE = 3, ///< Engine that can be front engine, but might be placed behind another engine (not used for road vehicles).
|
||||
GVSF_FREE_WAGON = 4, ///< First in a wagon chain (in depot) (not used for road vehicles).
|
||||
GVSF_MULTIHEADED = 5, ///< Engine is multiheaded (not used for road vehicles).
|
||||
};
|
||||
|
||||
/**
|
||||
* Set front engine state.
|
||||
*/
|
||||
FORCEINLINE void SetFrontEngine() { SetBit(this->subtype, GVSF_FRONT); }
|
||||
|
||||
/**
|
||||
* Remove the front engine state.
|
||||
*/
|
||||
FORCEINLINE void ClearFrontEngine() { ClrBit(this->subtype, GVSF_FRONT); }
|
||||
|
||||
/**
|
||||
* Set a vehicle to be an articulated part.
|
||||
*/
|
||||
FORCEINLINE void SetArticulatedPart() { SetBit(this->subtype, GVSF_ARTICULATED_PART); }
|
||||
|
||||
/**
|
||||
* Clear a vehicle from being an articulated part.
|
||||
*/
|
||||
FORCEINLINE void ClearArticulatedPart() { ClrBit(this->subtype, GVSF_ARTICULATED_PART); }
|
||||
|
||||
/**
|
||||
* Set a vehicle to be a wagon.
|
||||
*/
|
||||
FORCEINLINE void SetWagon() { SetBit(this->subtype, GVSF_WAGON); }
|
||||
|
||||
/**
|
||||
* Clear wagon property.
|
||||
*/
|
||||
FORCEINLINE void ClearWagon() { ClrBit(this->subtype, GVSF_WAGON); }
|
||||
|
||||
/**
|
||||
* Set engine status.
|
||||
*/
|
||||
FORCEINLINE void SetEngine() { SetBit(this->subtype, GVSF_ENGINE); }
|
||||
|
||||
/**
|
||||
* Clear engine status.
|
||||
*/
|
||||
FORCEINLINE void ClearEngine() { ClrBit(this->subtype, GVSF_ENGINE); }
|
||||
|
||||
/**
|
||||
* Set a vehicle as a free wagon.
|
||||
*/
|
||||
FORCEINLINE void SetFreeWagon() { SetBit(this->subtype, GVSF_FREE_WAGON); }
|
||||
|
||||
/**
|
||||
* Clear a vehicle from being a free wagon.
|
||||
*/
|
||||
FORCEINLINE void ClearFreeWagon() { ClrBit(this->subtype, GVSF_FREE_WAGON); }
|
||||
|
||||
/**
|
||||
* Set a vehicle as a multiheaded engine.
|
||||
*/
|
||||
FORCEINLINE void SetMultiheaded() { SetBit(this->subtype, GVSF_MULTIHEADED); }
|
||||
|
||||
/**
|
||||
* Clear multiheaded engine property.
|
||||
*/
|
||||
FORCEINLINE void ClearMultiheaded() { ClrBit(this->subtype, GVSF_MULTIHEADED); }
|
||||
|
||||
/**
|
||||
* Check if the vehicle is a front engine.
|
||||
* @return Returns true if the vehicle is a front engine.
|
||||
*/
|
||||
FORCEINLINE bool IsFrontEngine() const { return HasBit(this->subtype, GVSF_FRONT); }
|
||||
|
||||
/**
|
||||
* Check if the vehicle is a free wagon (got no engine in front of it).
|
||||
* @return Returns true if the vehicle is a free wagon.
|
||||
*/
|
||||
FORCEINLINE bool IsFreeWagon() const { return HasBit(this->subtype, GVSF_FREE_WAGON); }
|
||||
|
||||
/**
|
||||
* Check if a vehicle is an engine (can be first in a consist).
|
||||
* @return Returns true if vehicle is an engine.
|
||||
*/
|
||||
FORCEINLINE bool IsEngine() const { return HasBit(this->subtype, GVSF_ENGINE); }
|
||||
|
||||
/**
|
||||
* Check if a vehicle is a wagon.
|
||||
* @return Returns true if vehicle is a wagon.
|
||||
*/
|
||||
FORCEINLINE bool IsWagon() const { return HasBit(this->subtype, GVSF_WAGON); }
|
||||
|
||||
/**
|
||||
* Check if the vehicle is a multiheaded engine.
|
||||
* @return Returns true if the vehicle is a multiheaded engine.
|
||||
*/
|
||||
FORCEINLINE bool IsMultiheaded() const { return HasBit(this->subtype, GVSF_MULTIHEADED); }
|
||||
|
||||
/**
|
||||
* Tell if we are dealing with the rear end of a multiheaded engine.
|
||||
* @return True if the engine is the rear part of a dualheaded engine.
|
||||
*/
|
||||
FORCEINLINE bool IsRearDualheaded() const { return this->IsMultiheaded() && !this->IsEngine(); }
|
||||
|
||||
/**
|
||||
* Check if the vehicle is an articulated part of an engine.
|
||||
* @return Returns true if the vehicle is an articulated part.
|
||||
*/
|
||||
FORCEINLINE bool IsArticulatedPart() const { return HasBit(this->subtype, GVSF_ARTICULATED_PART); }
|
||||
|
||||
/**
|
||||
* Check if an engine has an articulated part.
|
||||
* @return True if the engine has an articulated part.
|
||||
*/
|
||||
FORCEINLINE bool HasArticulatedPart() const { return this->Next() != NULL && this->Next()->IsArticulatedPart(); }
|
||||
};
|
||||
|
||||
#endif /* GROUND_VEHICLE_HPP */
|
||||
|
||||
@@ -67,14 +67,6 @@ static inline uint GetGroupArraySize()
|
||||
return num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of engines with EngineID id_e in the group with GroupID
|
||||
* id_g
|
||||
* @param company The company the group belongs to
|
||||
* @param id_g The GroupID of the group used
|
||||
* @param id_e The EngineID of the engine to count
|
||||
* @return The number of engines with EngineID id_e in the group
|
||||
*/
|
||||
uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e);
|
||||
|
||||
static inline void IncreaseGroupNumVehicle(GroupID id_g)
|
||||
|
||||
@@ -409,6 +409,14 @@ void UpdateTrainGroupID(Train *v)
|
||||
SetWindowDirty(WC_REPLACE_VEHICLE, VEH_TRAIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of engines with EngineID id_e in the group with GroupID
|
||||
* id_g
|
||||
* @param company The company the group belongs to
|
||||
* @param id_g The GroupID of the group used
|
||||
* @param id_e The EngineID of the engine to count
|
||||
* @return The number of engines with EngineID id_e in the group
|
||||
*/
|
||||
uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e)
|
||||
{
|
||||
if (Group::IsValidID(id_g)) return Group::Get(id_g)->num_engines[id_e];
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ static const GroupID ALL_GROUP = 0xFFFD;
|
||||
static const GroupID DEFAULT_GROUP = 0xFFFE; ///< ungrouped vehicles are in this group.
|
||||
static const GroupID INVALID_GROUP = 0xFFFF;
|
||||
|
||||
static const uint MAX_LENGTH_GROUP_NAME_CHARS = 31; ///< The maximum length of a group name in characters including '\0'
|
||||
static const uint MAX_LENGTH_GROUP_NAME_CHARS = 32; ///< The maximum length of a group name in characters including '\0'
|
||||
static const uint MAX_LENGTH_GROUP_NAME_PIXELS = 150; ///< The maximum length of a group name in pixels
|
||||
|
||||
struct Group;
|
||||
|
||||
@@ -430,11 +430,24 @@ static bool ReadHeightMap(char *filename, uint *x, uint *y, byte **map)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dimensions of a heightmap.
|
||||
* @param filename to query
|
||||
* @param x dimension x
|
||||
* @param y dimension y
|
||||
* @return Returns false if loading of the image failed.
|
||||
*/
|
||||
bool GetHeightmapDimensions(char *filename, uint *x, uint *y)
|
||||
{
|
||||
return ReadHeightMap(filename, x, y, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a heightmap from file and change the map in his current dimensions
|
||||
* to a landscape representing the heightmap.
|
||||
* It converts pixels to height. The brighter, the higher.
|
||||
* @param filename of the heighmap file to be imported
|
||||
*/
|
||||
void LoadHeightmap(char *filename)
|
||||
{
|
||||
uint x, y;
|
||||
@@ -452,6 +465,10 @@ void LoadHeightmap(char *filename)
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an empty world where all tiles are of height 'tile_height'.
|
||||
* @param tile_height of the desired new empty world
|
||||
*/
|
||||
void FlatEmptyWorld(byte tile_height)
|
||||
{
|
||||
int edge_distance = _settings_game.construction.freeform_edges ? 0 : 2;
|
||||
|
||||
+1
-25
@@ -12,7 +12,7 @@
|
||||
#ifndef HEIGHTMAP_H
|
||||
#define HEIGHTMAP_H
|
||||
|
||||
/*
|
||||
/**
|
||||
* Order of these enums has to be the same as in lang/english.txt
|
||||
* Otherwise you will get inconsistent behaviour.
|
||||
*/
|
||||
@@ -21,33 +21,9 @@ enum HeightmapRotation {
|
||||
HM_CLOCKWISE, ///< Rotate the map clockwise 45 degrees
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the dimensions of a heightmap.
|
||||
* @param filename to query
|
||||
* @param x dimension x
|
||||
* @param y dimension y
|
||||
* @return Returns false if loading of the image failed.
|
||||
*/
|
||||
bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
|
||||
|
||||
/**
|
||||
* Load a heightmap from file and change the map in his current dimensions
|
||||
* to a landscape representing the heightmap.
|
||||
* It converts pixels to height. The brighter, the higher.
|
||||
* @param filename of the heighmap file to be imported
|
||||
*/
|
||||
void LoadHeightmap(char *filename);
|
||||
|
||||
/**
|
||||
* Make an empty world where all tiles are of height 'tile_height'.
|
||||
* @param tile_height of the desired new empty world
|
||||
*/
|
||||
void FlatEmptyWorld(byte tile_height);
|
||||
|
||||
/**
|
||||
* This function takes care of the fact that land in OpenTTD can never differ
|
||||
* more than 1 in height
|
||||
*/
|
||||
void FixSlopes();
|
||||
|
||||
#endif /* HEIGHTMAP_H */
|
||||
|
||||
@@ -121,10 +121,6 @@ struct HouseSpec {
|
||||
byte processing_time; ///< Periodic refresh multiplier
|
||||
byte minimum_life; ///< The minimum number of years this house will survive before the town rebuilds it
|
||||
|
||||
/**
|
||||
* Get the cost for removing this house
|
||||
* @return the cost (inflation corrected etc)
|
||||
*/
|
||||
Money GetRemovalCost() const;
|
||||
|
||||
static FORCEINLINE HouseSpec *Get(size_t house_id)
|
||||
|
||||
@@ -2644,6 +2644,10 @@ void InitializeIndustries()
|
||||
_industry_builder.Reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is an industry with the spec a raw industry?
|
||||
* @return true if it should be handled as a raw industry
|
||||
*/
|
||||
bool IndustrySpec::IsRawIndustry() const
|
||||
{
|
||||
/* Lumber mills are extractive/organic, but can always be built like a non-raw industry */
|
||||
@@ -2651,6 +2655,10 @@ bool IndustrySpec::IsRawIndustry() const
|
||||
(this->behaviour & INDUSTRYBEH_CUT_TREES) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cost for constructing this industry
|
||||
* @return the cost (inflation corrected etc)
|
||||
*/
|
||||
Money IndustrySpec::GetConstructionCost() const
|
||||
{
|
||||
/* Building raw industries like secondary uses different price base */
|
||||
@@ -2658,11 +2666,21 @@ Money IndustrySpec::GetConstructionCost() const
|
||||
PR_BUILD_INDUSTRY_RAW : PR_BUILD_INDUSTRY] * this->cost_multiplier) >> 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cost for removing this industry
|
||||
* Take note that the cost will always be zero for non-grf industries.
|
||||
* Only if the grf author did specified a cost will it be applicable.
|
||||
* @return the cost (inflation corrected etc)
|
||||
*/
|
||||
Money IndustrySpec::GetRemovalCost() const
|
||||
{
|
||||
return (_price[PR_CLEAR_INDUSTRY] * this->removal_cost_multiplier) >> 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this industrytype uses smooth economy or whether it uses standard/newgrf production changes.
|
||||
* @return true if smooth economy is used.
|
||||
*/
|
||||
bool IndustrySpec::UsesSmoothEconomy() const
|
||||
{
|
||||
return _settings_game.economy.smooth_economy &&
|
||||
|
||||
@@ -134,30 +134,9 @@ struct IndustrySpec {
|
||||
bool enabled; ///< entity still available (by default true).newgrf can disable it, though
|
||||
GRFFileProps grf_prop; ///< properties related to the grf file
|
||||
|
||||
/**
|
||||
* Is an industry with the spec a raw industry?
|
||||
* @return true if it should be handled as a raw industry
|
||||
*/
|
||||
bool IsRawIndustry() const;
|
||||
|
||||
/**
|
||||
* Get the cost for constructing this industry
|
||||
* @return the cost (inflation corrected etc)
|
||||
*/
|
||||
Money GetConstructionCost() const;
|
||||
|
||||
/**
|
||||
* Get the cost for removing this industry
|
||||
* Take note that the cost will always be zero for non-grf industries.
|
||||
* Only if the grf author did specified a cost will it be applicable.
|
||||
* @return the cost (inflation corrected etc)
|
||||
*/
|
||||
Money GetRemovalCost() const;
|
||||
|
||||
/**
|
||||
* Determines whether this industrytype uses smooth economy or whether it uses standard/newgrf production changes.
|
||||
* @return true if smooth economy is used.
|
||||
*/
|
||||
bool UsesSmoothEconomy() const;
|
||||
};
|
||||
|
||||
|
||||
+55
@@ -26,6 +26,12 @@
|
||||
# include <shellapi.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Construct a new in-memory item of an Ini file.
|
||||
* @param parent the group we belong to
|
||||
* @param name the name of the item
|
||||
* @param len the length of the name of the item
|
||||
*/
|
||||
IniItem::IniItem(IniGroup *parent, const char *name, size_t len) : next(NULL), value(NULL), comment(NULL)
|
||||
{
|
||||
if (len == 0) len = strlen(name);
|
||||
@@ -35,6 +41,7 @@ IniItem::IniItem(IniGroup *parent, const char *name, size_t len) : next(NULL), v
|
||||
parent->last_item = &this->next;
|
||||
}
|
||||
|
||||
/** Free everything we loaded. */
|
||||
IniItem::~IniItem()
|
||||
{
|
||||
free(this->name);
|
||||
@@ -44,12 +51,22 @@ IniItem::~IniItem()
|
||||
delete this->next;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the current value with another value.
|
||||
* @param value the value to replace with.
|
||||
*/
|
||||
void IniItem::SetValue(const char *value)
|
||||
{
|
||||
free(this->value);
|
||||
this->value = strdup(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new in-memory group of an Ini file.
|
||||
* @param parent the file we belong to
|
||||
* @param name the name of the group
|
||||
* @param len the length of the name of the group
|
||||
*/
|
||||
IniGroup::IniGroup(IniFile *parent, const char *name, size_t len) : next(NULL), type(IGT_VARIABLES), item(NULL), comment(NULL)
|
||||
{
|
||||
if (len == 0) len = strlen(name);
|
||||
@@ -69,6 +86,7 @@ IniGroup::IniGroup(IniFile *parent, const char *name, size_t len) : next(NULL),
|
||||
}
|
||||
}
|
||||
|
||||
/** Free everything we loaded. */
|
||||
IniGroup::~IniGroup()
|
||||
{
|
||||
free(this->name);
|
||||
@@ -78,6 +96,13 @@ IniGroup::~IniGroup()
|
||||
delete this->next;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the item with the given name, and if it doesn't exist
|
||||
* and create is true it creates a new item.
|
||||
* @param name name of the item to find.
|
||||
* @param create whether to create an item when not found or not.
|
||||
* @return the requested item or NULL if not found.
|
||||
*/
|
||||
IniItem *IniGroup::GetItem(const char *name, bool create)
|
||||
{
|
||||
for (IniItem *item = this->item; item != NULL; item = item->next) {
|
||||
@@ -90,6 +115,9 @@ IniItem *IniGroup::GetItem(const char *name, bool create)
|
||||
return new IniItem(this, name, strlen(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items in the group
|
||||
*/
|
||||
void IniGroup::Clear()
|
||||
{
|
||||
delete this->item;
|
||||
@@ -97,17 +125,30 @@ void IniGroup::Clear()
|
||||
this->last_item = &this->item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new in-memory Ini file representation.
|
||||
* @param list_group_names A NULL terminated list with groups that should be
|
||||
* loaded as lists instead of variables.
|
||||
*/
|
||||
IniFile::IniFile(const char * const *list_group_names) : group(NULL), comment(NULL), list_group_names(list_group_names)
|
||||
{
|
||||
this->last_group = &this->group;
|
||||
}
|
||||
|
||||
/** Free everything we loaded. */
|
||||
IniFile::~IniFile()
|
||||
{
|
||||
free(this->comment);
|
||||
delete this->group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the group with the given name, and if it doesn't exist
|
||||
* create a new group.
|
||||
* @param name name of the group to find.
|
||||
* @param len the maximum length of said name.
|
||||
* @return the requested group.
|
||||
*/
|
||||
IniGroup *IniFile::GetGroup(const char *name, size_t len)
|
||||
{
|
||||
if (len == 0) len = strlen(name);
|
||||
@@ -125,6 +166,10 @@ IniGroup *IniFile::GetGroup(const char *name, size_t len)
|
||||
return group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the group with the given name.
|
||||
* @param name name of the group to remove.
|
||||
*/
|
||||
void IniFile::RemoveGroup(const char *name)
|
||||
{
|
||||
size_t len = strlen(name);
|
||||
@@ -152,6 +197,11 @@ void IniFile::RemoveGroup(const char *name)
|
||||
delete group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Ini file's data from the disk.
|
||||
* @param filename the file to load.
|
||||
* @pre nothing has been loaded yet.
|
||||
*/
|
||||
void IniFile::LoadFromDisk(const char *filename)
|
||||
{
|
||||
assert(this->last_group == &this->group);
|
||||
@@ -268,6 +318,11 @@ void IniFile::LoadFromDisk(const char *filename)
|
||||
fclose(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the Ini file's data to the disk.
|
||||
* @param filename the file to save to.
|
||||
* @return true if saving succeeded.
|
||||
*/
|
||||
bool IniFile::SaveToDisk(const char *filename)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -25,21 +25,9 @@ struct IniItem {
|
||||
char *value; ///< The value of this item
|
||||
char *comment; ///< The comment associated with this item
|
||||
|
||||
/**
|
||||
* Construct a new in-memory item of an Ini file.
|
||||
* @param parent the group we belong to
|
||||
* @param name the name of the item
|
||||
* @param len the length of the name of the item
|
||||
*/
|
||||
IniItem(struct IniGroup *parent, const char *name, size_t len = 0);
|
||||
|
||||
/** Free everything we loaded. */
|
||||
~IniItem();
|
||||
|
||||
/**
|
||||
* Replace the current value with another value.
|
||||
* @param value the value to replace with.
|
||||
*/
|
||||
void SetValue(const char *value);
|
||||
};
|
||||
|
||||
@@ -52,29 +40,10 @@ struct IniGroup {
|
||||
char *name; ///< name of group
|
||||
char *comment; ///< comment for group
|
||||
|
||||
/**
|
||||
* Construct a new in-memory group of an Ini file.
|
||||
* @param parent the file we belong to
|
||||
* @param name the name of the group
|
||||
* @param len the length of the name of the group
|
||||
*/
|
||||
IniGroup(struct IniFile *parent, const char *name, size_t len = 0);
|
||||
|
||||
/** Free everything we loaded. */
|
||||
~IniGroup();
|
||||
|
||||
/**
|
||||
* Get the item with the given name, and if it doesn't exist
|
||||
* and create is true it creates a new item.
|
||||
* @param name name of the item to find.
|
||||
* @param create whether to create an item when not found or not.
|
||||
* @return the requested item or NULL if not found.
|
||||
*/
|
||||
IniItem *GetItem(const char *name, bool create);
|
||||
|
||||
/**
|
||||
* Clear all items in the group
|
||||
*/
|
||||
void Clear();
|
||||
};
|
||||
|
||||
@@ -85,43 +54,13 @@ struct IniFile {
|
||||
char *comment; ///< last comment in file
|
||||
const char * const *list_group_names; ///< NULL terminated list with group names that are lists
|
||||
|
||||
/**
|
||||
* Construct a new in-memory Ini file representation.
|
||||
* @param list_group_names A NULL terminated list with groups that should be
|
||||
* loaded as lists instead of variables.
|
||||
*/
|
||||
IniFile(const char * const *list_group_names = NULL);
|
||||
|
||||
/** Free everything we loaded. */
|
||||
~IniFile();
|
||||
|
||||
/**
|
||||
* Get the group with the given name, and if it doesn't exist
|
||||
* create a new group.
|
||||
* @param name name of the group to find.
|
||||
* @param len the maximum length of said name.
|
||||
* @return the requested group.
|
||||
*/
|
||||
IniGroup *GetGroup(const char *name, size_t len = 0);
|
||||
|
||||
/**
|
||||
* Remove the group with the given name.
|
||||
* @param name name of the group to remove.
|
||||
*/
|
||||
void RemoveGroup(const char *name);
|
||||
|
||||
/**
|
||||
* Load the Ini file's data from the disk.
|
||||
* @param filename the file to load.
|
||||
* @pre nothing has been loaded yet.
|
||||
*/
|
||||
void LoadFromDisk(const char *filename);
|
||||
|
||||
/**
|
||||
* Save the Ini file's data to the disk.
|
||||
* @param filename the file to save to.
|
||||
* @return true if saving succeeded.
|
||||
*/
|
||||
bool SaveToDisk(const char *filename);
|
||||
};
|
||||
|
||||
|
||||
+22
-4
@@ -32,6 +32,7 @@
|
||||
#include "object_base.h"
|
||||
#include "water_map.h"
|
||||
#include "economy_func.h"
|
||||
#include "company_func.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -616,6 +617,11 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
cost.AddCost(GetWaterClass(tile) == WATER_CLASS_CANAL ? _price[PR_CLEAR_CANAL] : _price[PR_CLEAR_WATER]);
|
||||
}
|
||||
|
||||
Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? NULL : Company::GetIfValid(_current_company);
|
||||
if (c != NULL && (int)GB(c->clear_limit, 16, 16) < 1) {
|
||||
return_cmd_error(STR_ERROR_CLEARING_LIMIT_REACHED);
|
||||
}
|
||||
|
||||
const ClearedObjectArea *coa = FindClearedObject(tile);
|
||||
|
||||
/* If this tile was the first tile which caused object destruction, always
|
||||
@@ -629,11 +635,14 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
if ((flags & DC_NO_WATER) && HasTileWaterClass(tile) && IsTileOnWater(tile)) {
|
||||
return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
||||
}
|
||||
if (do_clear && (flags & DC_EXEC)) DoClearSquare(tile);
|
||||
return cost;
|
||||
} else {
|
||||
cost.AddCost(_tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags));
|
||||
}
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (c != NULL) c->clear_limit -= 1 << 16;
|
||||
if (do_clear) DoClearSquare(tile);
|
||||
}
|
||||
cost.AddCost(_tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags));
|
||||
if (do_clear && (flags & DC_EXEC)) DoClearSquare(tile);
|
||||
return cost;
|
||||
}
|
||||
|
||||
@@ -656,6 +665,9 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
CommandCost last_error = CMD_ERROR;
|
||||
bool had_success = false;
|
||||
|
||||
const Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? NULL : Company::GetIfValid(_current_company);
|
||||
int limit = (c == NULL ? INT32_MAX : GB(c->clear_limit, 16, 16));
|
||||
|
||||
TileArea ta(tile, p1);
|
||||
TileIterator *iter = HasBit(p2, 0) ? (TileIterator *)new DiagonalTileIterator(tile, p1) : new OrthogonalTileIterator(ta);
|
||||
for (; *iter != INVALID_TILE; ++(*iter)) {
|
||||
@@ -663,6 +675,9 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
CommandCost ret = DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR);
|
||||
if (ret.Failed()) {
|
||||
last_error = ret;
|
||||
|
||||
/* We may not clear more tiles. */
|
||||
if (c != NULL && GB(c->clear_limit, 16, 16) < 1) break;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -684,6 +699,9 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
ta.w == 1 && ta.h == 1 ? EV_EXPLOSION_SMALL : EV_EXPLOSION_LARGE
|
||||
);
|
||||
}
|
||||
} else {
|
||||
/* When we're at the clearing limit we better bail (unneed) testing as well. */
|
||||
if (ret.GetCost() != 0 && --limit <= 0) break;
|
||||
}
|
||||
cost.AddCost(ret);
|
||||
}
|
||||
|
||||
@@ -689,8 +689,8 @@ STR_SMALLMAP_TOWN :{TINYFONT}{WHIT
|
||||
STR_SMALLMAP_DISABLE_ALL :{BLACK}Sper alle
|
||||
STR_SMALLMAP_ENABLE_ALL :{BLACK}Ontsper alle
|
||||
STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Vertoon hoogte
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL :{BLACK}Moet nie enige nywerheide op die kaart vertoon
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL :{BLACK}Vertoon alle nywerheide op die kaart
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Moet nie enige nywerheide op die kaart vertoon
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Vertoon alle nywerheide op die kaart
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Tokkel vertooning van hoogtekaart
|
||||
|
||||
# Status bar messages
|
||||
@@ -1214,7 +1214,6 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :{LTBLUE}Wys ger
|
||||
STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :{LTBLUE}Hou bou gereedskap aktief na gebruik: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EXPENSES_LAYOUT :{LTBLUE}Groep uitgawes in maatskappy finansies venster: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}Toon gebou gereedskap wanneer geen geskik voertuie is beskikbaar : {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_TRAINS :{LTBLUE}Max treine per speler: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :{LTBLUE}Max pad voertuie per speler: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_AIRCRAFT :{LTBLUE}Max vliegtuie per speler: {ORANGE}{STRING}
|
||||
@@ -2221,7 +2220,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Maatskappy-besi
|
||||
STR_ABOUT_OPENTTD :{WHITE}Oor OpenTTD
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Oorspronklike kopiereg {COPYRIGHT} 1995 Chris Sawyer, Alle regte voorbehou
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD uitgawe {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2010 Die OpenTTD span
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2011 Die OpenTTD span
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spaar Spel
|
||||
|
||||
@@ -700,8 +700,8 @@ STR_SMALLMAP_TOWN :{TINYFONT}{WHIT
|
||||
STR_SMALLMAP_DISABLE_ALL :{BLACK}تعطيل الكل
|
||||
STR_SMALLMAP_ENABLE_ALL :{BLACK}تفعيل الكل
|
||||
STR_SMALLMAP_SHOW_HEIGHT :{BLACK}عرض الارتفاع
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL :{BLACK}عدم عرض اي مصنع في الخريطة
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL :{BLACK}عرض جميع المصانع في الخريطة
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}عدم عرض اي مصنع في الخريطة
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}عرض جميع المصانع في الخريطة
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}بدل عرض خريطة التضاريس
|
||||
|
||||
# Status bar messages
|
||||
@@ -1235,7 +1235,6 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :{LTBLUE}اظه
|
||||
STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :{LTBLUE} ابقاء ادوات البناء فعالة بعد استخدامها: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EXPENSES_LAYOUT :{LTBLUE} النفقات للمجموعة في النافذة المالية: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}عرض ادوات البناء عندما لا توجد مركبات متاحة بعد: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_TRAINS :{LTBLUE}الحد الأعلى لعدد القطارات لكل لاعب: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :{LTBLUE}الحد الأعلى لعدد العربات لكل لاعب: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_AIRCRAFT :{LTBLUE}الحد الأعلى لعدد الطائرات لكل لاعب: {ORANGE}{STRING}
|
||||
@@ -2067,7 +2066,6 @@ STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}شاء
|
||||
# Object construction window
|
||||
STR_OBJECT_BUILD_CAPTION :{WHITE}اختيار الاجسام
|
||||
STR_OBJECT_BUILD_TOOLTIP :{BLACK}اختر جسم لبنائة
|
||||
STR_OBJECT_BUILD_CLASS_LABEL :{BLACK}فئة الجسم
|
||||
STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}عرض الجسم
|
||||
STR_OBJECT_BUILD_SIZE :{BLACK}حجم: {GOLD}{NUM} x {NUM} مربع
|
||||
|
||||
@@ -2270,7 +2268,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :ارض مملو
|
||||
STR_ABOUT_OPENTTD :{WHITE}حول النسخة المفتوحة
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}الحقوق الأصلية {COPYRIGHT} كريس سوير 1995 , جميع الحقوق محفوظة
|
||||
STR_ABOUT_VERSION :{BLACK}النسخة المفتوحة رقم {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2010 فريق النسخة المفتوحة
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2011 فريق النسخة المفتوحة
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}حفظ اللعبة
|
||||
|
||||
+70
-59
@@ -606,7 +606,7 @@ STR_SORT_BY_CARGO_CAPACITY :Ёмiстась
|
||||
STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Паўза
|
||||
STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Паскорыць гульню
|
||||
STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Наладкі
|
||||
STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Захаванне гульні{}Галоўнае мэню{}Выхад
|
||||
STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Захаваньне гульні{}Галоўнае мэню{}Выхад
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Паказаць мапу, вакно прагляду цi сьпiс знакаў
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Сьпiс гарадоў
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Паказаць субсыдыі
|
||||
@@ -661,6 +661,7 @@ STR_SCENEDIT_FILE_MENU_QUIT :Выхад
|
||||
STR_SETTINGS_MENU_GAME_OPTIONS :Наладкі гульні
|
||||
STR_SETTINGS_MENU_DIFFICULTY_SETTINGS :Наладкі складанасцi
|
||||
STR_SETTINGS_MENU_CONFIG_SETTINGS :Пашыраныя наладкі
|
||||
STR_SETTINGS_MENU_AI_SETTINGS :Наладки ШI (AI)
|
||||
STR_SETTINGS_MENU_NEWGRF_SETTINGS :Наладкі NewGRF
|
||||
STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Наладкі празрыстасьці
|
||||
STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Паказваць назвы гарадоў
|
||||
@@ -976,6 +977,8 @@ STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Пака
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Паказаць на мапе маршруты
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Паказаць на мапе расьліннасьць
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Паказаць на мапе уладальнікаў зямлі
|
||||
STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Клiк па тыпе прадпрыемства пераключае яго паказ на мапе. Ctrl+клiк адключае ўсе тыпы, акрамя аднаго выбранага. Паўторны Ctrl+клiк уключае ўсе тыпы прадпрыемстваў.
|
||||
STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Клiк па назьве кампанii пераключае паказ яе маёмасьцi на мапе. Ctrl+клiк адключае ўсе кампанii, акрамя адной выбранай.
|
||||
|
||||
STR_SMALLMAP_LEGENDA_ROADS :{TINYFONT}{BLACK}Дарогі
|
||||
STR_SMALLMAP_LEGENDA_RAILROADS :{TINYFONT}{BLACK}Чыгункі
|
||||
@@ -1009,13 +1012,16 @@ STR_SMALLMAP_LEGENDA_SNOW :{TINYFONT}{BLAC
|
||||
STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Паказаць/схаваць назвы гарадоў на мапе
|
||||
STR_SMALLMAP_CENTER :{BLACK}Цэнтраваць мінімапу па гэтай пазыцыі
|
||||
STR_SMALLMAP_INDUSTRY :{TINYFONT}{STRING} ({NUM})
|
||||
STR_SMALLMAP_COMPANY :{TINYFONT}{COMPANY}
|
||||
STR_SMALLMAP_TOWN :{TINYFONT}{WHITE}{TOWN}
|
||||
STR_SMALLMAP_DISABLE_ALL :{BLACK}Выключыць усё
|
||||
STR_SMALLMAP_ENABLE_ALL :{BLACK}Уключыць усё
|
||||
STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Паказаць рэльеф
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL :{BLACK}Не паказваць прамысловасьць на мапе
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL :{BLACK}Паказаць усе прадпрыемствы на мапе
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Не паказваць прамысловасьць на мапе
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Паказаць усе прадпрыемствы на мапе
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Адлюстроўваць рэльеф на мапе
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Паказаць маёмасьць, якая не належыць кампанii
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Паказаць усю маёмасьць кампанii на мапе
|
||||
|
||||
# Status bar messages
|
||||
STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Паказаць апошняе паведамленьне ці навіну
|
||||
@@ -1126,7 +1132,7 @@ STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE
|
||||
STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} састарэў
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} цалкам састарэў
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD_AND :{WHITE}{VEHICLE} цалкам састарэў і патрабуе безадкладнай замены
|
||||
STR_NEWS_TRAIN_IS_STUCK :{WHITE}{VEHICLE} ня можа знайсці шлях для працягу руху
|
||||
STR_NEWS_TRAIN_IS_STUCK :{WHITE}{VEHICLE} ня можа знайсьці шлях для працягу руху
|
||||
STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE} заблудзіўся.
|
||||
STR_NEWS_VEHICLE_IS_UNPROFITABLE :{WHITE}{VEHICLE}: леташні прыбытак склаў {CURRENCY}
|
||||
|
||||
@@ -1155,9 +1161,9 @@ STR_NEWS_ROAD_REBUILDING :{BIGFONT}{BLACK
|
||||
# Extra view window
|
||||
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_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}Перайсьці да гэтага месца ў асноўным вакне
|
||||
|
||||
# Game options window
|
||||
STR_GAME_OPTIONS_CAPTION :{WHITE}Наладкі гульні
|
||||
@@ -1324,7 +1330,7 @@ STR_DIFFICULTY_LEVEL_SETTING_NO_OF_TOWNS :{LTBLUE}Кол
|
||||
STR_DIFFICULTY_LEVEL_SETTING_NO_OF_INDUSTRIES :{LTBLUE}Колькасьць прадпрыемстваў: {ORANGE}{STRING}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_INITIAL_LOAN_000 :{LTBLUE}Максымальная пачатковая пазыка: {ORANGE}{CURRENCY}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_INITIAL_INTEREST_RATE :{LTBLUE}Пачатковая працэнтовая стаўка: {ORANGE}{COMMA}%
|
||||
STR_DIFFICULTY_LEVEL_SETTING_VEHICLE_RUNNING_COSTS :{LTBLUE}Выдаткі на ўтрыманне транспарту: {ORANGE}{STRING.p}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_VEHICLE_RUNNING_COSTS :{LTBLUE}Выдаткі на ўтрыманьне транспарту: {ORANGE}{STRING.p}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_CONSTRUCTION_SPEED_OF_COMPETITOR :{LTBLUE}Хуткасьць будаўніцтва канкурэнтаў: {ORANGE}{STRING}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_VEHICLE_BREAKDOWNS :{LTBLUE}Паломкі транспарту: {ORANGE}{STRING}
|
||||
STR_DIFFICULTY_LEVEL_SETTING_SUBSIDY_MULTIPLIER :{LTBLUE}Множнік даходу ад субсыдыяў: {ORANGE}{STRING}
|
||||
@@ -1403,7 +1409,7 @@ STR_CONFIG_SETTING_ON :так
|
||||
STR_CONFIG_SETTING_DISABLED :адключана
|
||||
STR_CONFIG_SETTING_VEHICLESPEED :{LTBLUE}Паказваць хуткасьць транспарту ў панэлі статусу: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_BUILDONSLOPES :{LTBLUE}Дазволіць будаўніцтва на сьхілах і на беразе: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_AUTOSLOPE :{LTBLUE}Дазволіць тэраформінг пад будынкамі, дарогамі і г.д. (аўтасьхіл): {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_AUTOSLOPE :{LTBLUE}Дазволіць зьмену ляндшафту пад будынкамі, дарогамі й г. д. (аўтаспускі): {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_CATCHMENT :{LTBLUE}Зона пакрыцьця залежыць ад тыпу станцыі: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EXTRADYNAMITE :{LTBLUE}Дазволіць знос амаль усіх гарадзкіх аб'ектаў: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAMMOTHTRAINS :{LTBLUE}Дазволіць вельмі доўгія цягнікі: {ORANGE}{STRING}
|
||||
@@ -1458,7 +1464,7 @@ STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :{LTBLUE}Даз
|
||||
STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :{LTBLUE}Дазволіць будаўніцтва прыпынкаў Ro-Ro на дарогах канкурэнтаў: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_ADJACENT_STATIONS :{LTBLUE}Дазволіць будаўніцтва сумежных станцыяў: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_DYNAMIC_ENGINES :{LTBLUE}Уключыць падтрымку некалькіх транспартных набораў NewGRF: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Зьмена гэтага параметру немагчыма, калі ў гульні ёсць транспартныя сродкі.
|
||||
STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Зьмена гэтага парамэтру немагчыма, калі ў гульні ёсць транспартныя сродкі.
|
||||
|
||||
STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :{LTBLUE}Малыя аэрапорты ніколі не састарэюць: {ORANGE}{STRING}
|
||||
|
||||
@@ -1472,9 +1478,9 @@ STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :{LTBLUE}Тра
|
||||
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :{LTBLUE}Аўтазамена старых транспартных сродкаў: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_AUTORENEW_MONTHS :{LTBLUE}Замена праз {ORANGE}{STRING}{LTBLUE} месяц{P 0:1 "" ы аў} да/пасьля сканчэньня тэрміну службы
|
||||
STR_CONFIG_SETTING_AUTORENEW_MONEY :{LTBLUE}Сума, неабходная для аўтазамены: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_ERRMSG_DURATION :{LTBLUE}Макс. працягласьць паведамленьня аб памылцы: {ORANGE}{STRING} секунд{P 0:1 а ы ""}
|
||||
STR_CONFIG_SETTING_HOVER_DELAY :{LTBLUE}Затрымка з'яўленьня падказкі пры навядзеньні курсора: {ORANGE}{STRING} cекунд{P 0:1 а ы ""}
|
||||
STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :{LTBLUE}Затрымка з'яўленьня падказкі пры навядзеньні курсора: {ORANGE}адключана
|
||||
STR_CONFIG_SETTING_ERRMSG_DURATION :{LTBLUE}Макс. працягласьць паведамленьня аб памылцы: {ORANGE}{STRING} сэкунд{P 0:1 а ы ""}
|
||||
STR_CONFIG_SETTING_HOVER_DELAY :{LTBLUE}Паказваць падказкі: {ORANGE}Навядзеньнем і затрымкай на {STRING} секунд{P 0:1 у ы ""}
|
||||
STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :{LTBLUE}Паказваць падказкі: {ORANGE}Правай пстрычкай
|
||||
STR_CONFIG_SETTING_POPULATION_IN_LABEL :{LTBLUE}Паказваць колькасьць жыхароў горада ў назьве: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_LAND_GENERATOR :{LTBLUE}Генэратар зямлі: {ORANGE}{STRING}
|
||||
@@ -1495,7 +1501,7 @@ STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :{LTBLUE}Кру
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :супраць руху гадзіньнікавай стрэлкі
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE :па гадзіньнікавай стрэлцы
|
||||
STR_CONFIG_SETTING_SE_FLAT_WORLD_HEIGHT :{LTBLUE}Ўзровень вышыні для мапаў з пляскатым рэльефам: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_ENABLE_FREEFORM_EDGES :{LTBLUE}Дазволіць тэраформінг на краі мапы: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_ENABLE_FREEFORM_EDGES :{LTBLUE}Дазволіць зьмену ляндшафту на краю мапы: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EDGES_NOT_EMPTY :{WHITE}Адна ці некалькі клетак ў паўночным куце мапы не пустыя
|
||||
STR_CONFIG_SETTING_EDGES_NOT_WATER :{WHITE}Адна ці некалькі клетак берага без вады
|
||||
|
||||
@@ -1536,7 +1542,7 @@ STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME :{LTBLUE}Аўт
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL :{LTBLUE}Падчас паўзы дазволiць: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS :нiчога
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_CONSTRUCTION :усе дзеяньнi, акрамя будаўнiцтва
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :усе дзеяньнi, акрамя зьмяненьня ландшафту
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :усе дзеяньнi, акрамя зьмяненьня ляндшафту
|
||||
STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_ACTIONS :усе дзеяньнi
|
||||
STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :{LTBLUE}Выкарыстоўваць пашыраны сьпіс транспорту: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_OFF :не
|
||||
@@ -1558,7 +1564,7 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :{LTBLUE}Пак
|
||||
STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :{LTBLUE}Захоўваць актыўнымі інструмэнты будаўніцтва пасьля ўжываньня: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EXPENSES_LAYOUT :{LTBLUE}Групаваць выдаткі ў вакне фінансаў кампаніі: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}Паказваць вакно будаўніцтва, калі няма прыдатнага адпаведнага транспарту: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :{LTBLUE}Адключыць стварэньне інфраструктуры, калі няма прыдатных даступных ТС: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_TRAINS :{LTBLUE}Максымальная колькасьць цягнікоў на гульца: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :{LTBLUE}Максымальная колькасьць аўтатранспарту на гульца: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_AIRCRAFT :{LTBLUE}Максымальная колькасьць самалётаў на гульца: {ORANGE}{STRING}
|
||||
@@ -1626,7 +1632,7 @@ STR_CONFIG_SETTING_TOOLBAR_POS_LEFT :леваруч
|
||||
STR_CONFIG_SETTING_TOOLBAR_POS_CENTER :ў цэнтры
|
||||
STR_CONFIG_SETTING_TOOLBAR_POS_RIGHT :праваруч
|
||||
STR_CONFIG_SETTING_STATUSBAR_POS :{LTBLUE}Размяшчэньне радка стану: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_STATUSBAR_POS_LEFT :Злева
|
||||
STR_CONFIG_SETTING_STATUSBAR_POS_LEFT :Зьлева
|
||||
STR_CONFIG_SETTING_STATUSBAR_POS_CENTER :Пасярэдзiне
|
||||
STR_CONFIG_SETTING_STATUSBAR_POS_RIGHT :Зправа
|
||||
STR_CONFIG_SETTING_SNAP_RADIUS :{LTBLUE}Радыюс прыліпаньня вокнаў: {ORANGE}{STRING} пікс.
|
||||
@@ -1896,9 +1902,9 @@ STR_NETWORK_SERVER_LIST_REFRESH_TOOLTIP :{BLACK}Абна
|
||||
STR_NETWORK_SERVER_LIST_FIND_SERVER :{BLACK}Знайсьці сэрвэр
|
||||
STR_NETWORK_SERVER_LIST_FIND_SERVER_TOOLTIP :{BLACK}Знайсьці сэрвэры, якія зараз ёсьць у сетцы
|
||||
STR_NETWORK_SERVER_LIST_ADD_SERVER :{BLACK}Дадаць сэрвэр
|
||||
STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}Дадаць сервер у спіс, які будзе аўтаматычна правярацца на ідучыя гульні
|
||||
STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}Дадаць сэрвэр у сьпіс, які будзе аўтаматычна правярацца на ідучыя гульні
|
||||
STR_NETWORK_SERVER_LIST_START_SERVER :{BLACK}Запуск сэрвэра
|
||||
STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP :{BLACK}Запуск сервера на вашым кампутары. Да гэтае гульні змогуць далучыцца іншыя гульцы.
|
||||
STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP :{BLACK}Запуск сэрвэра на вашым кампутары. Да гэтае гульні змогуць далучыцца іншыя гульцы.
|
||||
|
||||
STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}Увядзіце вашае імя
|
||||
STR_NETWORK_SERVER_LIST_ENTER_IP :{BLACK}Увядзiце адрас сэрвэра
|
||||
@@ -2011,12 +2017,12 @@ STR_NETWORK_CONNECTING_4 :{BLACK}(4/6) З
|
||||
STR_NETWORK_CONNECTING_5 :{BLACK}(5/6) Апрацоўка даных...
|
||||
STR_NETWORK_CONNECTING_6 :{BLACK}(6/6) Рэгістрацыя...
|
||||
|
||||
STR_NETWORK_CONNECTING_SPECIAL_1 :{BLACK}Здабыццё інфармацыі аб гульні...
|
||||
STR_NETWORK_CONNECTING_SPECIAL_2 :{BLACK}Здабыццё інфармацыі пра кампаніі...
|
||||
STR_NETWORK_CONNECTING_SPECIAL_1 :{BLACK}Здабыцьцё інфармацыі аб гульні...
|
||||
STR_NETWORK_CONNECTING_SPECIAL_2 :{BLACK}Здабыцьцё інфармацыі пра кампаніі...
|
||||
############ End of leave-in-this-order
|
||||
STR_NETWORK_CONNECTING_WAITING :{BLACK}{NUM} кліент{P "" ы аў} рыхтуецца далучыцца
|
||||
STR_NETWORK_CONNECTING_DOWNLOADING_1 :{BLACK}{BYTES} запампована
|
||||
STR_NETWORK_CONNECTING_DOWNLOADING_2 :{BLACK}Запампована {BYTES} / {BYTES}
|
||||
STR_NETWORK_CONNECTING_DOWNLOADING_1 :{BLACK}{BYTES} запампавана
|
||||
STR_NETWORK_CONNECTING_DOWNLOADING_2 :{BLACK}Запампавана {BYTES} / {BYTES}
|
||||
|
||||
STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Адлучыцца
|
||||
|
||||
@@ -2087,7 +2093,7 @@ STR_NETWORK_ERROR_SERVER_FULL :{WHITE}Сэрв
|
||||
STR_NETWORK_ERROR_SERVER_BANNED :{WHITE}Доступ на гэты сэрвэр вам забаронены
|
||||
STR_NETWORK_ERROR_KICKED :{WHITE}Вас выкінулі з гульні
|
||||
STR_NETWORK_ERROR_CHEATER :{WHITE}Махлярства не дазволена на гэтым сэрвэры
|
||||
STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}Вы дасылалi да серверу занадта шмат каманд
|
||||
STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}Вы дасылалi да сэрвэра занадта шмат камандаў
|
||||
|
||||
############ Leave those lines in this order!!
|
||||
STR_NETWORK_ERROR_CLIENT_GENERAL :агульная памылка
|
||||
@@ -2109,7 +2115,7 @@ STR_NETWORK_ERROR_CLIENT_TOO_MANY_COMMANDS :дасылаў
|
||||
############ End of leave-in-this-order
|
||||
|
||||
STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION_CAPTION :{WHITE}Падключэньне згублена
|
||||
STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION :{WHITE}У працягу {NUM} секунд{P ы "" ""} не атрымана ніякіх дадзеных з боку сервера
|
||||
STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION :{WHITE}На працягу {NUM} сэкунд{P ы аў аў} не атрымана ніякіх дадзеных з боку сэрвэра
|
||||
|
||||
# Network related errors
|
||||
STR_NETWORK_SERVER_MESSAGE :*** {1:STRING}
|
||||
@@ -2256,7 +2262,7 @@ STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Уста
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Будаўніцтва чыгуначных мастоў. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Будаўніцтва чыгуначных тунэляў. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Пераключэньне паміж будаўніцтвам і выдаленьнем чыгуначных рэйкаў, сыгналаў, станцыяў. Пры націснутым Ctrl станцыі ліквідуюцца разам з рэйкамі.
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Канвертаваць/мадэрнізаваць тып каляіны. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Канвэртаваць/мадэрнізаваць тып каляінаў. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
|
||||
# Rail depot construction window
|
||||
STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Кірунак дэпо
|
||||
@@ -2297,7 +2303,7 @@ STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Выха
|
||||
STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Камбінаваны сьветлафор (прэсыгнал).{}Працуе адначасова як уваходны і выхадны сьветлафор. Гэта дазваляе будаваць вялікія «дрэвы» каляінаў з прэсыгналамі.
|
||||
STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Маршрутны сьветлафор (PMS).{}Дазваляе некалькім цягнікам знаходзіцца ў адным сыгнальным блёку, калі кожны з іх можа зарэзэрваваць сабе бясьпечны шлях. Дазваляе праходжаньне цягнікоў у абодва бакі.
|
||||
STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Аднабаковы маршрутны сьветлафор (PMS).{}Дазваляе некалькім цягнікам знаходзіцца ў адным сыгнальным блёку, калі кожны з іх можа зарэзэрваваць сабе бясьпечны шлях. Не дазваляе цягнікам праходзіць з адваротнага боку.
|
||||
STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Зьмяненьне тыпаў сыгналаў.{}Калі кнопка націснута, пстрыкніце для пераўтварэньня існуючага сыгнала ў сыгнал выбранага тыпу й віду, або пстрыкніце з націснутым Ctrl для перабіраньня існуючых варыянтаў. Shift+пстрычка - ацэнка кошту пераўтварэння.
|
||||
STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Зьмяненьне тыпаў сыгналаў.{}Калі кнопка націснута, пстрыкніце для пераўтварэньня існуючага сыгнала ў сыгнал выбранага тыпу й віду, або пстрыкніце з націснутым Ctrl для перабіраньня існуючых варыянтаў. Shift+пстрычка - ацэнка кошту пераўтварэньня.
|
||||
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Шчыльнасьць аўтаматычнай расстаноўкі сыгналаў пры цягненьні
|
||||
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Паменшыць шчыльнасьць расстаноўкі сыгналаў
|
||||
STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Павялічыць шчыльнасьць расстаноўкі сыгналаў
|
||||
@@ -2307,6 +2313,7 @@ STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Выбе
|
||||
STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Выберыце аўтамабiльны мост
|
||||
STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Выбар моста - пстрыкніце па малюнку моста, які Вы хочаце пабудаваць
|
||||
STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY}
|
||||
STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY}
|
||||
STR_BRIDGE_NAME_SUSPENSION_STEEL :Падвесны сталёвы
|
||||
STR_BRIDGE_NAME_GIRDER_STEEL :Бэлечны сталёвы
|
||||
STR_BRIDGE_NAME_CANTILEVER_STEEL :Кансольны сталёвы
|
||||
@@ -2406,15 +2413,15 @@ STR_STATION_BUILD_NOISE :{BLACK}Узро
|
||||
|
||||
# Landscaping toolbar
|
||||
STR_LANDSCAPING_TOOLBAR :{WHITE}Земляныя работы
|
||||
STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Апусціць кут зямлі. Перацягванне апускае першы абраны кут і выраўноўвае выбраную вобласьць да новай вышыні кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Падняць кут зямлі. Перацягванне падымае першы абраны кут і выраўноўвае выбраную вобласьць да новай вышыні кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Выраўнаваць зямлю да вышыні першага абранага кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту выраўноўвання.
|
||||
STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Набыццё зямлі. Пры націснутым Shift - ацэнка кошту набыцця.
|
||||
STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Апусціць кут зямлі. Перацягваньне апускае першы абраны кут і выраўноўвае выбраную вобласьць да новай вышыні кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Падняць кут зямлі. Перацягваньне падымае першы абраны кут і выраўноўвае выбраную вобласьць да новай вышыні кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту будаўніцтва.
|
||||
STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Выраўнаваць зямлю да вышыні першага абранага кута. Ctrl выбірае вобласьць па дыяганалі. Пры націснутым Shift - ацэнка кошту выраўноўваньня.
|
||||
STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Набыцьцё зямлі. Пры націснутым Shift - ацэнка кошту набыцьця.
|
||||
|
||||
# Object construction window
|
||||
STR_OBJECT_BUILD_CAPTION :{WHITE}Выбар аб'екта
|
||||
STR_OBJECT_BUILD_TOOLTIP :{BLACK}Абярыце ствараны аб'ект. Пры націснутым Shift - ацэнка кошту пабудовы.
|
||||
STR_OBJECT_BUILD_CLASS_LABEL :{BLACK}Кляса аб'екта
|
||||
STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Абярыце клас аб'екта для будаўніцтва
|
||||
STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Прагляд аб'екта
|
||||
STR_OBJECT_BUILD_SIZE :{BLACK}Памер: {GOLD}{NUM} x {NUM} клетак
|
||||
|
||||
@@ -2446,7 +2453,7 @@ STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Вы ў
|
||||
# Town generation window (SE)
|
||||
STR_FOUND_TOWN_CAPTION :{WHITE}Стварэньне гарадоў
|
||||
STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}Новы горад
|
||||
STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Заснаваць новы горад. Shift+пстрычка - ацэнка кошту заснавання.
|
||||
STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Заснаваць новы горад. Shift+пстрычка - ацэнка кошту заснаваньня.
|
||||
STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Выпадковы горад
|
||||
STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Заснаваць горад у выпадковым месцы
|
||||
STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Шмат выпадковых гарадоў
|
||||
@@ -2617,7 +2624,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Зямля на
|
||||
STR_ABOUT_OPENTTD :{WHITE}Аб OpenTTD
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Арыгінальныя аўтарскія правы {COPYRIGHT} 1995 Chris Sawyer. Усе правы абароненыя
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD вэрсія {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2010 Каманда распрацоўнікаў OpenTTD
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2011 Каманда распрацоўнікаў OpenTTD
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Захаваць гульню
|
||||
@@ -2747,7 +2754,7 @@ STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_TOOLTIP :{BLACK}Адзн
|
||||
STR_NEWGRF_SETTINGS_FILENAME :{BLACK}Імя файла: {SILVER}{STRING}
|
||||
STR_NEWGRF_SETTINGS_GRF_ID :{BLACK}GRF ID: {SILVER}{STRING}
|
||||
STR_NEWGRF_SETTINGS_VERSION :{BLACK}Вэрсiя: {SILVER}{NUM}
|
||||
STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Трэба версія гульні не ніжэй за {SILVER}{NUM}
|
||||
STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Патрэбна вэрсiя гульнi не ніжэй за {SILVER}{NUM}
|
||||
STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}Сума MD5: {SILVER}{STRING}
|
||||
STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Палітра: {SILVER}{STRING}
|
||||
STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Парамэтры: {SILVER}{STRING}
|
||||
@@ -2755,6 +2762,7 @@ STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Пара
|
||||
STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Няма даступнай інфармацыі
|
||||
STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Файл ня знойдзены
|
||||
STR_NEWGRF_SETTINGS_DISABLED :{RED}Адключана
|
||||
STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Несумяшчальна з дадзенай версіяй OpenTTD
|
||||
|
||||
STR_NEWGRF_SETTINGS_PARAMETER_QUERY :{BLACK}Увядзіце парамэтры файла NewGRF
|
||||
|
||||
@@ -2871,7 +2879,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Увяд
|
||||
STR_TOWN_DIRECTORY_CAPTION :{WHITE}Гарады
|
||||
STR_TOWN_DIRECTORY_NONE :{ORANGE}- Няма -
|
||||
STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA})
|
||||
STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Сьпіс гарадоў - клiк па назьве паказвае горад у асноўным вакне. Ctrl+клiк паказвае ў дадатковым акне.
|
||||
STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Сьпіс гарадоў - клiк па назьве паказвае горад у асноўным вакне. Ctrl+клiк паказвае ў дадатковым вакне.
|
||||
STR_TOWN_POPULATION :{BLACK}Насельніцтва: {COMMA}
|
||||
|
||||
# Town view window
|
||||
@@ -2885,7 +2893,7 @@ STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED :{ORANGE}{STRING
|
||||
STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} патрабу{G 0 е e e ю}цца ўзімку
|
||||
STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH :{ORANGE}{CARGO}{BLACK} дастаўлена ў мінулым месяцы
|
||||
STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Узровень шуму ў горадзе: {ORANGE}{COMMA}{BLACK} Макс: {ORANGE}{COMMA}
|
||||
STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Паказаць горад у асноўным вакне. Ctrl+клік - паказаць у дадатковым акне.
|
||||
STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Паказаць горад у асноўным вакне. Ctrl+клік - паказаць у дадатковым вакне.
|
||||
STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Мясцовыя ўлады
|
||||
STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Інфармацыя аб мясцовай адміністрацыі
|
||||
STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Перайменаваць горад
|
||||
@@ -2931,10 +2939,10 @@ STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING
|
||||
STR_SUBSIDIES_NONE :{ORANGE}- Няма -
|
||||
STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Маршруты, якія ўжо субсыдуюцца:
|
||||
STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} па маршруце з {STRING} у {STRING}{YELLOW} ({COMPANY}{YELLOW}, да {DATE_SHORT})
|
||||
STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Націсьніце на маршрут для адлюстраваньня прадпрыемства/горада. Ctrl+клік паказвае ў дадатковым вакне.
|
||||
STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Націсьніце на маршрут для адлюстраваньня прадпрыемства/горада. Ctrl+пстрычка паказвае ў дадатковым вакне.
|
||||
|
||||
# Station list window
|
||||
STR_STATION_LIST_TOOLTIP :{BLACK}Сьпіс станцыяў - пстрычка па назве паказвае станцыю ў асноўным вакне. Ctrl+клiк паказвае ў дадатковым акне.
|
||||
STR_STATION_LIST_TOOLTIP :{BLACK}Сьпіс станцыяў - пстрычка па назьве паказвае станцыю ў асноўным вакне. Ctrl+клiк паказвае ў дадатковым вакне.
|
||||
STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Націсьніце й ўтрымлівайце Ctrl для выбару больш за адзін варыянт
|
||||
STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} станцы{P я i яў}
|
||||
STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATIONFEATURES}
|
||||
@@ -3038,7 +3046,7 @@ STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Пабу
|
||||
STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}Агледзець штаб
|
||||
STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}Агледзець штаб-кватэру кампаніі
|
||||
STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Перамясьціць
|
||||
STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Перамясціць штаб-кватэру кампаніі ў іншае месца за 1% ацэнкавага кошту капіталу кампаніі. Shift+пстрычка - ацэнка кошту пераносу.
|
||||
STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Перамясьціць штаб-кватэру кампаніі ў іншае месца за 1% ацэнкавага кошту капіталу кампаніі. Shift+пстрычка - ацэнка кошту пераносу.
|
||||
|
||||
STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Знешнасьць
|
||||
STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Зьмяніць знешнасьць дырэктара
|
||||
@@ -3065,7 +3073,7 @@ STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ня
|
||||
STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}{STRING}){YELLOW} ({COMMA}% перавезена)
|
||||
STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO}{STRING}/{CARGO}{STRING}){YELLOW} ({COMMA}%/{COMMA}% перавезена)
|
||||
STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY}
|
||||
STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Сьпіс прадпрыемстваў - пстрычка па назве паказвае прадпрыемства ў асноўным вакне. Ctrl+клік - у дадатковым вакне.
|
||||
STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Сьпіс прадпрыемстваў - пстрычка па назьве паказвае прадпрыемства ў асноўным вакне. Ctrl+клік - у дадатковым вакне.
|
||||
|
||||
# Industry view
|
||||
STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY}
|
||||
@@ -3088,7 +3096,7 @@ STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Выра
|
||||
############ range for produces ends
|
||||
|
||||
STR_CONFIG_GAME_PRODUCTION :{WHITE}Зьмяніць прадукцыйнасьць (кратна 8, да 2040)
|
||||
STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Змяніць прадукцыйнасьць (у працэнтах, да 800%)
|
||||
STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Зьмяніць прадукцыйнасьць (у адсотках, да 800%)
|
||||
|
||||
# Vehicle lists
|
||||
STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} цягнiк{P "" i оў}
|
||||
@@ -3185,10 +3193,10 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Купi
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Купiць
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Купiць
|
||||
|
||||
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны лякаматыў/вагон. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны аўтамабіль. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны карабель. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны авіятранспарт. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны лякаматыў/вагон. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны аўтамабіль. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны карабель. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Набыць абраны авіятранспарт. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
|
||||
STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Перайменаваць
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Перайменаваць
|
||||
@@ -3253,10 +3261,10 @@ STR_DEPOT_CLONE_ROAD_VEHICLE :{BLACK}Капі
|
||||
STR_DEPOT_CLONE_SHIP :{BLACK}Капіяваць карабель
|
||||
STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Капіяваць авіятранспарт
|
||||
|
||||
STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Стварыць копію састава. Націсьніце на кнопку, а затым на цягнік унутры ці звонку дэпо. Ctrl+пстрычка створыць цягнік з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Стварыць копію аўтамабіля. Націсьніце на кнопку, а затым на машыну ўнутры ці звонку гаража. Ctrl+пстрычка створыць аўтамабіль з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Стварыць копію карабля. Націсьніце на кнопку, а затым на карабель унутры ці звонку дока. Ctrl+пстрычка створыць карабель з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Стварыць копію паветр. судна. Націсьніце на кнопку, а потым на паветр. судна ўнутры ці звонку ангара. Ctrl+пстрычка створыць копію з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Стварыць копію састава. Націсьніце на кнопку, а затым на цягнік унутры ці звонку дэпо. Ctrl+пстрычка створыць цягнік з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Стварыць копію аўтамабіля. Націсьніце на кнопку, а затым на машыну ўнутры ці звонку гаража. Ctrl+пстрычка створыць аўтамабіль з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Стварыць копію карабля. Націсьніце на кнопку, а затым на карабель унутры ці звонку дока. Ctrl+пстрычка створыць карабель з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Стварыць копію паветр. судна. Націсьніце на кнопку, а потым на паветр. судна ўнутры ці звонку ангара. Ctrl+пстрычка створыць копію з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
|
||||
STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Паказаць дэпо ў галоўным вакне. Ctrl+клік - паказаць у дадатковым вакне.
|
||||
STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Паказаць гараж у галоўным вакне. Ctrl+клік - паказаць у дадатковым вакне.
|
||||
@@ -3352,7 +3360,7 @@ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE
|
||||
|
||||
STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP :{BLACK}Паказаць цягнiк у галоўным вакне. Ctrl+клік - сачыць за цягнiком у галоўным вакне.
|
||||
STR_VEHICLE_VIEW_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Паказаць аўтамабiль у галоўным вакне. Ctrl+клік - сачыць за аўтамабiлем у галоўным вакне.
|
||||
STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Паказаць карабель у галоўным акне. Ctrl+клік будзе сачыць за караблём у галоўным акне.
|
||||
STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Паказаць карабель у галоўным вакне. Ctrl+клік будзе сачыць за караблём у галоўным вакне.
|
||||
STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Паказаць самалёт у галоўным вакне. Ctrl+клік - сачыць за самалётам у галоўным вакне.
|
||||
|
||||
STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Паслаць цягнiк у дэпо. Ctrl+клік - толькі для абслугоўваньня.
|
||||
@@ -3360,10 +3368,10 @@ STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Пасл
|
||||
STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Паслаць карабель у док. Ctrl+клік - толькі для абслугоўваньня.
|
||||
STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Паслаць авiятранспарт у ангар. Ctrl+клік - толькі для абслугоўваньня.
|
||||
|
||||
STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Стварыць копію састава. Ctrl+пстрычка створыць цягнік з агульнымі заданнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Стварыць копію аўтамабіля. Ctrl+пстрычка створыць аўтамабіль з агульнымі заданнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Стварыць копію карабля. Ctrl+пстрычка створыць карабель з агульнымі заданнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Стварыць копію паветр. судна. Ctrl+пстрычка створыць копію з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцця.
|
||||
STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Стварыць копію састава. Ctrl+пстрычка створыць цягнік з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Стварыць копію аўтамабіля. Ctrl+пстрычка створыць аўтамабіль з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Стварыць копію карабля. Ctrl+пстрычка створыць карабель з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Стварыць копію паветр. судна. Ctrl+пстрычка створыць копію з агульнымі заданьнямі. Shift+пстрычка - ацэнка кошту набыцьця.
|
||||
|
||||
STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Прымусіць цягнік праехаць чырвоны сыгнал святлафора
|
||||
|
||||
@@ -3430,7 +3438,7 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Пера
|
||||
STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Перайменаваць карабель
|
||||
STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Перайменаваць паветранае судна
|
||||
|
||||
STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Узрост: {LTBLUE}{STRING}{BLACK} Кошт абслугоўвання: {LTBLUE}{CURRENCY}/год
|
||||
STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Узрост: {LTBLUE}{STRING}{BLACK} Кошт абслугоўваньня: {LTBLUE}{CURRENCY}/год
|
||||
# The next two need to stay in this order
|
||||
STR_VEHICLE_INFO_AGE :{COMMA} г{P од ады адоў} ({COMMA})
|
||||
STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} г{P од ады адоў} ({COMMA})
|
||||
@@ -3488,7 +3496,7 @@ STR_REFIT_CAPTION :{WHITE}{VEHICLE
|
||||
STR_REFIT_TITLE :{GOLD}Выберыце тып грузу для перавозкі:
|
||||
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}Новая ёмістасьць: {GOLD}{CARGO}{}{BLACK}Кошт пераабсталяваньня: {GOLD}{CURRENCY}
|
||||
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}Новая ёмістасць: {GOLD}{CARGO}, {GOLD}{CARGO}{}{BLACK}Кошт пераабсталяваньня: {GOLD}{CURRENCY}
|
||||
STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Абярыце вагоны для пераабсталяваньня. Можна абвесці мышшу некалькі вагонаў. Пстрычка за межамі састава абярэ ўвесь састаў. Ctrl+пстрычка абярэ вагоны да канца састава.
|
||||
STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Абярыце вагоны для пераабсталяваньня. Можна абвесьці мышшу некалькі вагонаў. Пстрычка па-за межамі састава абярэ ўвесь састаў. Ctrl+пстрычка абярэ вагоны да канца састава.
|
||||
|
||||
STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Выберыце тып грузу для перавозкі
|
||||
STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Выберыце тып грузу для перавозкі
|
||||
@@ -3510,7 +3518,7 @@ STR_ORDERS_CAPTION :{WHITE}{VEHICLE
|
||||
STR_ORDERS_TIMETABLE_VIEW :{BLACK}Расклад
|
||||
STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Прагляд раскладу руху
|
||||
|
||||
STR_ORDERS_LIST_TOOLTIP :{BLACK}Сьпіс заданьняў - пстрыкніце заданьне для вылучэньня. Ctrl+пстрычка - агляд станцыі прызначэння.
|
||||
STR_ORDERS_LIST_TOOLTIP :{BLACK}Сьпіс заданьняў - пстрыкніце заданьне для вылучэньня. Ctrl+пстрычка - агляд станцыі прызначэньня.
|
||||
STR_ORDER_INDEX :{COMMA}:{NBSP}
|
||||
STR_ORDER_TEXT :{STRING} {STRING}
|
||||
|
||||
@@ -3826,6 +3834,8 @@ STR_ERROR_SITE_UNSUITABLE :{WHITE}... не
|
||||
STR_ERROR_ALREADY_BUILT :{WHITE}... ужо пабудавана
|
||||
STR_ERROR_OWNED_BY :{WHITE}... належыць {STRING}
|
||||
STR_ERROR_AREA_IS_OWNED_BY_ANOTHER :{WHITE}... участак належыць іншай кампаніі
|
||||
STR_ERROR_TERRAFORM_LIMIT_REACHED :{WHITE}... дасягнуты лiмiт ляндшафтных зьменаў
|
||||
STR_ERROR_CLEARING_LIMIT_REACHED :{WHITE}... лiмiт ачышчаных клетак дасягнуты
|
||||
STR_ERROR_NAME_MUST_BE_UNIQUE :{WHITE}Імя павінна быць унікальным
|
||||
STR_ERROR_GENERIC_OBJECT_IN_THE_WAY :{WHITE}{1:STRING} на шляху
|
||||
STR_ERROR_NOT_ALLOWED_WHILE_PAUSED :{WHITE}Забаронена падчас паўзы
|
||||
@@ -3871,7 +3881,7 @@ STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB :{WHITE}... за
|
||||
STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}... занадта блізка да іншага горада
|
||||
STR_ERROR_TOO_MANY_TOWNS :{WHITE}... занадта шмат гарадоў
|
||||
STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... няма месца на мапе
|
||||
STR_ERROR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}Гарады ня будуць будаваць дарогі. Вы можаце ўключыць будаўніцтва дарог у Пашыр. налады->Эканоміка->Гарады.
|
||||
STR_ERROR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}Гарады ня будуць будаваць дарогі. Вы можаце ўключыць будаўніцтва дарог у мэню: Пашыр. наладкi->Эканоміка->Гарады.
|
||||
STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Ідуць дарожныя работы...
|
||||
STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Немагчыма зьнішчыць горад:{}да яго адносіцца станцыя або дэпо, альбо немагчыма ачысьціць адну з занятых ім клетак.
|
||||
STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... у цэнтры горада няма месца для статуі
|
||||
@@ -4738,6 +4748,7 @@ STR_TINY_BLACK_STATION :{TINYFONT}{BLAC
|
||||
STR_BLACK_STRING :{BLACK}{STRING}
|
||||
STR_BLACK_RAW_STRING :{BLACK}{STRING}
|
||||
STR_GREEN_STRING :{GREEN}{STRING}
|
||||
STR_ORANGE_STRING :{ORANGE}{STRING}
|
||||
STR_RED_STRING :{RED}{STRING}
|
||||
STR_WHITE_STRING :{WHITE}{STRING}
|
||||
STR_TINY_BLACK_HEIGHT :{TINYFONT}{BLACK}{HEIGHT}
|
||||
|
||||
@@ -701,8 +701,8 @@ STR_SMALLMAP_TOWN :{TINYFONT}{WHIT
|
||||
STR_SMALLMAP_DISABLE_ALL :{BLACK}Desativar tudo
|
||||
STR_SMALLMAP_ENABLE_ALL :{BLACK}Ativar tudo
|
||||
STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Mostra altitudes
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL :{BLACK}Não mostrar nenhuma indústria no mapa
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL :{BLACK}Mostrar todas as indústrias no mapa
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Não mostrar nenhuma indústria no mapa
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Mostrar todas as indústrias no mapa
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Alterna a exibição do mapa de altitudes
|
||||
|
||||
# Status bar messages
|
||||
@@ -1242,7 +1242,6 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :{LTBLUE}Exibir
|
||||
STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :{LTBLUE}Manter a barra de construção aberta: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_EXPENSES_LAYOUT :{LTBLUE}Agrupar despesas na janela de financas da companhia: {ORANGE}{STRING}
|
||||
|
||||
STR_CONFIG_SETTING_ALWAYS_BUILD_INFRASTRUCTURE :{LTBLUE}Exibe ferramentas de construção na falta de veículos adequados: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_TRAINS :{LTBLUE}Máximo de trens por companhia: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :{LTBLUE}Máximo de automóveis por companhia: {ORANGE}{STRING}
|
||||
STR_CONFIG_SETTING_MAX_AIRCRAFT :{LTBLUE}Máximo de aeronaves por companhia: {ORANGE}{STRING}
|
||||
@@ -2078,7 +2077,6 @@ STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Comprar
|
||||
# Object construction window
|
||||
STR_OBJECT_BUILD_CAPTION :{WHITE}Seleção de Objeto
|
||||
STR_OBJECT_BUILD_TOOLTIP :{BLACK}Selecione o objeto a ser construído. Shift altera construção/estimação de custo
|
||||
STR_OBJECT_BUILD_CLASS_LABEL :{BLACK}Classe do objeto
|
||||
STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Pré-visualização do objeto
|
||||
STR_OBJECT_BUILD_SIZE :{BLACK}Tamanho: {GOLD}{NUM} x {NUM} ladrilhos
|
||||
|
||||
@@ -2281,7 +2279,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :O terreno é pr
|
||||
STR_ABOUT_OPENTTD :{WHITE}Sobre o OpenTTD...
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Copyright original {COPYRIGHT} 1995 Chris Sawyer, Todos os direitos reservados
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD versão {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2010 A equipe do OpenTTD
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2011 A equipe do OpenTTD
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Salvar Jogo
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user