Compare commits

..

481 Commits
1.6 ... 1.7

Author SHA1 Message Date
Sergii Pylypenko
c029120a7b Updated translations, updated settigns GUI 2018-01-29 21:46:42 +02:00
Sergii Pylypenko
93a3bc7cab Updated translations 2018-01-29 21:29:31 +02:00
Sergii Pylypenko
d7c590dc18 More debug logs 2018-01-29 21:23:41 +02:00
Sergii Pylypenko
71bc6bcc17 Updated todo 2018-01-29 17:19:20 +02:00
Sergii Pylypenko
bbeaad03e4 Updated todo 2018-01-15 21:01:00 +02:00
Sergii Pylypenko
d7de3b0dbe Fixed pinch-zoom, again 2017-12-26 21:59:22 +02:00
Sergii Pylypenko
d8edc654f6 Updated version files 2017-12-26 21:25:29 +02:00
Sergii Pylypenko
aa6f149224 Fixed compilation with clang 2017-12-26 21:16:44 +02:00
Sergii Pylypenko
9732544d81 Updated Android translations 2017-12-26 21:08:54 +02:00
frosch
b6b4c24b87 (svn r27948) [1.7] -Update: Documentation 2017-12-26 21:04:31 +02:00
frosch
0aab694253 (svn r27942) [1.7] -Update: Documentation 2017-12-26 21:04:31 +02:00
frosch
69040d6ea5 (svn r27941) [1.7] -Backport from trunk: translation updates 2017-12-26 21:04:30 +02:00
frosch
ae64743448 (svn r27940) [1.7] -Backport from trunk:
- Change: When train depots have a horizontal scrollbar, allow scrolling 1 tile beyond the longest train, so you can actually attach a wagon at the end (r27937)
- Fix: When moving wagons in the depot, the drag highlight did not exactly match the length of the dragged wagon chain (r27936)
- Fix: [Win32] Right mouse scrolling didn't work properly with the Windows 10 Fall Creators Update [FS#6629] (r27935)
- Fix: Forest, candyfloss forest and battery farm skipped the first animation frame [FS#6639] (r27932)
- Fix: Glyphs in range U+0020 to U+00FF may only be defined in orig_extra.grf, not in openttd.grf [FS#6620] (r27915)
2017-12-26 21:04:30 +02:00
frosch
9f078c357d (svn r27939) [1.7] -Backport from trunk:
- Fix: 'unban' console command was not handling IPv6 adresses properly (r27914, r27913)
- Fix: Keep the 'link' between industry chain and smallmap windows whenever possible [FS#6585] (r27905)
- Fix: When the last vehicle is removed from a shared orders group, hide the 'Stop sharing' button in the vehicle orders window [FS#6593] (r27904)
- Fix: Tooltip of 'increase service interval' said 'decrease' [FS#6606] (r27895)
- Fix: Console command parser passed invalid strings to the debug output, if command lines had many parameters [FS#6576] (r27884, r27883)
2017-12-26 21:04:30 +02:00
Sergii Pylypenko
f82a4bf45a Fixed multitouch events 2017-10-02 20:39:12 +03:00
Sergii Pylypenko
aa2de610f4 Updated todo 2017-09-28 22:04:43 +03:00
pelya
429d476be8 Async Android text input 2017-09-27 15:55:53 +03:00
Sergii Pylypenko
ebaa3964ed Always put terraform toolbar below the tool windiw 2017-09-25 21:55:45 +03:00
Sergii Pylypenko
04651ae69f JGRPP patch sync 2017-09-25 21:46:56 +03:00
Sergii Pylypenko
bf0403be84 Fixed Group GUI 2017-09-25 20:22:48 +03:00
Sergii Pylypenko
3797cbb166 Updated todo 2017-09-22 23:34:00 +03:00
Sergii Pylypenko
728a6a430b More Android patches reverted 2017-09-22 23:30:07 +03:00
Sergii Pylypenko
7f3ac7c344 Reverted some Android patches 2017-09-22 22:39:07 +03:00
Sergii Pylypenko
03cace6d82 Hide system mouse pointer in Android Nougat and higher 2017-09-20 21:34:42 +03:00
Sergii Pylypenko
ca629a74c8 Updated Android strings 2017-08-03 22:11:00 +03:00
Sergii Pylypenko
406121dae2 Fixed Android strings 2017-08-03 22:07:10 +03:00
Sergii Pylypenko
8ce5694417 Compact toolbar enabled by default for Windows build 2017-06-27 22:15:46 +03:00
Sergii Pylypenko
565cf4687a Another fix 2017-06-27 22:11:08 +03:00
Sergii Pylypenko
abeaba735a Fixed classic mobile toolbar 2017-06-27 22:01:01 +03:00
Sergii Pylypenko
479472fe7d Updated translations 2017-06-27 20:53:34 +03:00
Sergii Pylypenko
84bb80dc1c Removed non-working restart code 2017-06-27 20:06:02 +03:00
Sergii Pylypenko
19022439f3 Fixed terraform toolbar position 2017-06-27 20:00:14 +03:00
Sergii Pylypenko
e91431046a Finalized compact toolbar 2017-06-27 19:39:33 +03:00
Sergii Pylypenko
d4f850a325 Updated translations 2017-06-27 19:39:06 +03:00
Sergii Pylypenko
c1d21ce505 Reverted back some strings 2017-06-27 19:34:54 +03:00
Sergii Pylypenko
c1492ea540 Always show terraform menu in compact toolbar mode 2017-06-27 19:11:52 +03:00
Sergii Pylypenko
6ab394e941 Updated todo 2017-06-26 23:45:30 +03:00
Sergii Pylypenko
ade411bf41 Moved two buttons to Help/About menu 2017-06-26 23:44:46 +03:00
Sergii Pylypenko
11371eb7d1 lang: Updated text style for Android tutorial strings 2017-06-26 23:23:27 +03:00
Sergii Pylypenko
b0b26f31ef More items in graphs menu 2017-06-26 23:10:45 +03:00
Sergii Pylypenko
3eff380398 Fixed dropdown scrollbar 2017-06-26 22:58:41 +03:00
Sergii Pylypenko
e8eafe008b Compact build menu implementation 2017-06-23 23:45:05 +03:00
Sergii Pylypenko
26a657ea01 Updated Android strings in all translations 2017-06-23 20:17:35 +03:00
Sergii Pylypenko
fb5afa8b0d Removed unused string from all lang files 2017-06-23 20:03:23 +03:00
Sergii Pylypenko
5652be7007 Updated Android settings strings 2017-06-23 19:49:21 +03:00
Sergii Pylypenko
2a9275900a Setting for a compact vertical toolbar, no implementation yet 2017-06-23 19:46:19 +03:00
Sergii Pylypenko
7b6bfad6c1 Enabled windows decorations by default, it looks pretty and no one complained 2017-06-23 19:31:43 +03:00
Sergii Pylypenko
06ba21d834 Oops, fixed zoom-in gesture again 2017-06-23 19:20:35 +03:00
Sergii Pylypenko
3688f73576 Fixed zoom-in multitouch gesture center point coordinates 2017-06-23 19:09:16 +03:00
Sergii Pylypenko
06ffec3f90 Updated version files 2017-06-21 18:16:16 +03:00
Sergii Pylypenko
656b375e03 Fixed compilation 2017-06-20 20:19:17 +03:00
Sergii Pylypenko
af63fa103f Updated translations 2017-06-20 20:13:26 +03:00
frosch
6959749aea (svn r27880) [1.7] -Update: Documentation 2017-06-20 20:01:37 +03:00
frosch
c65cb4a2cf (svn r27866) [1.7] -Update: Documentation 2017-06-20 20:01:37 +03:00
frosch
7b9842c9fe (svn r27865) [1.7] -Backport from trunk: translation updates 2017-06-20 20:01:36 +03:00
frosch
307e17be4d (svn r27864) [1.7] -Backport from trunk:
- Fix: Add missing game script event for ships arriving at a station [FS#6560] (r27859, r27858)
- Fix: StringID truncation to 16 bits broke string remapping test [FS#6555] (r27851)
- Fix: Infinite loop in pathfinder when checking safe waiting position from a waypoint [FS#5926] (r27846)
- Fix: [YAPF] Consider depot as destination before reversing path and applying penalty (r27843)
- Fix: Don't consider locks or ship depots as clear water when placing industries (r27841)
- Fix: Small news window's fake caption was not sized to fit its text (r27838)
2017-06-20 20:01:36 +03:00
frosch
08c73115dd (svn r27863) [1.7] -Backport from trunk:
- Fix: Black remap did nothing in 8bpp-simple blitter (r27837)
- Fix: Misaligned resize icon due to widget bounds being inclusive (r27831)
- Fix: Update viewport sign dimensions when changing GUI zoom level (r27827, r27819)
- Fix: Vehicle viewport is not user scrollable so flag window as such (r27823)
- Fix: Allow dropdown to be drawn above origin widget even with scrollbar (r27820)
- Fix: 32bpp-anim blitters assumed that pitch and width of the screen were equal [FS#6545] (r27796)
- Fix: Chat text background overflowed due to missing padding [FS#6526] (r27794)
2017-06-20 20:01:25 +03:00
frosch
1affb01a81 (svn r27862) [1.7] -Backport from trunk:
- Fix: Failed to load lzo compressed savegames sometimes [FS#6450] (r27793)
- Fix: [Win32] Mark OpenTTD as DPI-aware to avoid OS window scaling that breaks mouse input [FS#6366] (r27791, r27790)
- Fix: [NewGRF] Get vehicle load amount after executing new cargo trigger [FS#6536] (r27788)
- Fix: AI configuration changed incorrect parameter when some parameters are hidden [FS#6479] (r27787, r27786)
- Fix: Buoys not always drawn after being placed depending on zoom level [FS#6508] (r27785)
- Fix: Allow rail conversion even if ship is on tile [FS#6505] (r27784)
2017-06-19 20:50:51 +03:00
pelya
650e372710 Attempt to restart the app using Linux shell 2017-04-07 23:42:25 +03:00
pelya
3e069251c9 Better fix for hiding error message window after clicking 'Cancel' 2017-04-07 22:01:18 +03:00
pelya
736a6ad1f5 Oops 2017-04-07 21:54:46 +03:00
pelya
2757f1844c Hide error message if user clicked 'Cancel' in buiuld confirmation window 2017-04-07 21:53:48 +03:00
pelya
7a5e2b454e Added 'OK' button to error message dialog 2017-04-07 21:52:47 +03:00
pelya
f2405b6e3e Toned down window closing by dragging, dim window when it's closed 2017-04-07 21:29:43 +03:00
pelya
99df613d97 Re-added Ctrl and Shift button to horizontal toolbar 2017-04-07 20:43:26 +03:00
pelya
2f31a81021 April 1-st is already passed 2017-04-05 23:30:38 +03:00
pelya
3364c4288d Bad fix for changing video depth resetting all settings to zero 2017-04-05 23:19:14 +03:00
pelya
0f8a3bdfb7 Fix for loading savegame from network that actually works 2017-04-04 23:34:43 +03:00
pelya
d904e0155d Fixed load savegame from network 2017-04-04 23:14:30 +03:00
pelya
376dbd4d66 Fixed minimap. That's good enough for release 2017-04-02 23:39:38 +03:00
pelya
2db4a9f8b8 Improved fast forward code a bit 2017-04-02 23:26:23 +03:00
pelya
c4d53e04d8 Fixed left-button-up event handled with one second delay if the game does not redraw the screen 2017-04-02 23:16:11 +03:00
pelya
f2c61803d9 Updated todo 2017-04-02 20:52:34 +03:00
pelya
73a9161869 April 1st, fools! 2017-04-02 02:12:42 +03:00
pelya
c53950b12e Fixed windows unable to be dragged beyond the right part of the screen 2017-04-02 02:04:46 +03:00
pelya
8375a7edf8 Revert "Revert "Revert "Async Android text input"""
This reverts commit 181b5f363b.
2017-04-02 01:58:06 +03:00
pelya
1c8ca0ca4f Revert "Attempt to fix Android async text input"
This reverts commit e48232345a.
2017-04-02 01:58:00 +03:00
pelya
e48232345a Attempt to fix Android async text input 2017-04-02 01:57:35 +03:00
pelya
181b5f363b Revert "Revert "Async Android text input""
This reverts commit 7b27195e9e.
2017-04-02 00:51:49 +03:00
pelya
22e7a437c4 no-toolbars: misclicks should be fixed 2017-04-02 00:50:59 +03:00
pelya
859ec2c025 Updated translations 2017-04-01 20:48:24 +03:00
pelya
2dbddf0e31 1.7.0 release: updated version files 2017-04-01 20:46:20 +03:00
frosch
4976bbc3e1 (svn r27839) [1.7] -Update: Documentation 2017-04-01 20:45:23 +03:00
pelya
c11ec69cd6 Updated TODO 2017-03-31 23:25:03 +03:00
pelya
7b27195e9e Revert "Async Android text input"
This reverts commit 3ed747e0ab.
2017-03-31 23:24:39 +03:00
pelya
3ed747e0ab Async Android text input 2017-03-31 23:24:14 +03:00
pelya
ce56dd8023 Another fix for main menu 2017-03-31 23:11:37 +03:00
pelya
6dcd0f280f Fix for main menu dragged off screen 2017-03-31 22:53:01 +03:00
pelya
c207359d2d Fixed 'New game' dialog 2017-03-31 22:50:57 +03:00
pelya
f4a2317c39 no-titlebars: fixed windows not draggable over the top of the screen, for real now 2017-03-31 22:35:10 +03:00
pelya
205ef47f73 Fixed combobox popups not reaching the top of the screen 2017-03-31 22:30:07 +03:00
pelya
0a7a095b92 Updated todo 2017-03-31 04:17:22 +03:00
pelya
a13b40e0c8 no-titlebars: fixed dragon droppings 2017-03-31 04:16:47 +03:00
pelya
7aef2e6897 Added back old mouse processing code for reference 2017-03-31 03:42:16 +03:00
pelya
e5cd6ce45c Clicking widgets is broken, the focus changes at random 2017-03-31 03:38:06 +03:00
pelya
86337b4ef7 no-titlebars: Fixed windows not dragged above the top of the screen 2017-03-31 03:21:18 +03:00
pelya
1329335de0 Option in settings for window decorations 2017-03-31 02:48:56 +03:00
pelya
4f16bf6047 Also draw ornaments on window captions 2017-03-31 02:38:01 +03:00
pelya
93aa9f4bbc Removed unused ornament images 2017-03-31 01:47:19 +03:00
pelya
55d3fdfa32 Draw ornament on all edges 2017-03-31 01:46:31 +03:00
pelya
d6ab2f7052 I can tweak the ornament forever 2017-03-31 00:40:56 +03:00
pelya
a42af29db7 New ornament pattern 2017-03-31 00:33:18 +03:00
pelya
7539839412 Updated edge ornament 2017-03-29 23:52:06 +03:00
pelya
d62c992a8f Edge ornaments, not finished 2017-03-29 23:45:06 +03:00
pelya
0f94e05bb1 Updated todo 2017-03-29 20:34:49 +03:00
pelya
ae99eac3ad Disabled showing tutorial window on the first start 2017-03-29 20:34:02 +03:00
pelya
fd943b8856 Updated todo 2017-03-29 20:31:48 +03:00
pelya
329fa15163 Updated todo 2017-03-28 23:48:36 +03:00
pelya
2aa35f7dd3 no-titlebars: allow window to be dragged above top of the screen 2017-03-28 23:47:39 +03:00
pelya
ef3a4e5de6 Disabled warning about missing translations, it messes up UI 2017-03-28 23:24:13 +03:00
pelya
dec2f899ad Updated todo 2017-03-28 15:54:16 +03:00
pelya
4c908f2f84 Updated translations 2017-03-28 15:35:55 +03:00
pelya
4588cae722 Updated todo 2017-03-27 23:52:12 +03:00
pelya
c2544e5c32 Updated toolbar buttons arrangement - Station List button is now on the permanent part of the toolbar 2017-03-27 23:47:14 +03:00
pelya
a69d58e4fe Old button layout for toolbar 2017-03-27 00:36:41 +03:00
pelya
3c2afedd7c Fix to settings dialog 2017-03-27 00:31:28 +03:00
pelya
90f9e91222 Fixed cancelling building bridges 2017-03-27 00:24:10 +03:00
pelya
343933e5eb Partial fix for building bridges 2017-03-27 00:19:28 +03:00
pelya
ed7ec153fc Put tooltip above the cursor 2017-03-26 23:34:52 +03:00
pelya
41b4fbaa67 Updated todo 2017-03-26 23:25:34 +03:00
pelya
6a82576c87 Updated todo 2017-03-26 23:16:42 +03:00
pelya
ab64ba4828 Close windows by dragging them off screen 2017-03-26 23:15:55 +03:00
pelya
f7d8ba3694 no-titlebars: Fixed scrollbars dragging whole windows 2017-03-26 22:39:38 +03:00
pelya
e5348843c4 no-titlebars: fixed toolbar buttons missing first click 2017-03-26 22:26:45 +03:00
pelya
e54b83e66f no-toolbars: move all windows by dragging anywhere, this breaks drag&drop, and toolbar buttons do not respond on the first click 2017-03-26 22:14:33 +03:00
pelya
5603daecc5 no-toolbars: Send OnClick event to window on mouse-up 2017-03-26 19:21:41 +03:00
pelya
6159de9626 Tooltip will hide itself in no-titlebar mode 2017-03-26 00:31:46 +02:00
pelya
bfd0157107 Improvements to network chat 2017-03-25 23:48:11 +02:00
pelya
5bb92c1e8a Updated version file 2017-03-25 23:24:10 +02:00
pelya
928fbf00d1 Updated translation script 2017-03-25 23:18:16 +02:00
pelya
39bb32ee90 Fixed timetable window 2017-03-23 23:38:35 +02:00
pelya
0ed45f178a Fixed graph windows 2017-03-23 23:27:41 +02:00
pelya
c0115b1264 Fixed windows resizing with no titlebars 2017-03-23 23:12:47 +02:00
pelya
5e238bdd73 Re-centered start/stop vehicle string 2017-03-23 23:09:32 +02:00
pelya
7b33872d79 Fixed more non-hideable window titles 2017-03-23 22:58:04 +02:00
pelya
c27c828eaf Fixed few UI bugs in titlebarless windows 2017-03-22 23:33:03 +02:00
pelya
7c16f1417f Small refactoring 2017-03-22 23:13:59 +02:00
pelya
d18a9995ce Hide title bars for all windows when 'title bars' option is de-selected 2017-03-22 22:55:10 +02:00
pelya
cee6057bf2 Setting to disable windows titlebars 2017-03-22 22:26:20 +02:00
pelya
1b49cf0050 Updated todo 2017-03-22 00:12:08 +02:00
pelya
ac4527c25d All windows can cover status bar 2017-03-21 21:40:37 +02:00
pelya
1c4dcd494f Fixed compiation with clang 2017-03-20 23:07:29 +02:00
pelya
158655211e Updated todo 2017-03-20 22:52:38 +02:00
pelya
8e684c5806 Updated todo 2017-03-20 22:45:35 +02:00
pelya
25a8e0f967 Adjusted future compact toolbar 2017-03-20 22:44:47 +02:00
pelya
842a9d8a48 Compact vertical bar button arrangement, not used yet 2017-03-20 22:30:17 +02:00
pelya
2e2ea93f63 Replaced magic numbers for vertical toolbar 2017-03-20 22:19:05 +02:00
pelya
528bb4ea32 Fixed autoreplace dialog, fixed compilation 2017-03-20 21:57:52 +02:00
Sergii Pylypenko
dee012cf87 Fixed badly merged spanish_MX.txt 2017-03-17 23:20:09 +02:00
frosch
07d225d85b (svn r27782) [1.7] -Update: Documentation 2017-03-17 23:18:03 +02:00
frosch
fd3def339c (svn r27781) [1.7] -Change: New titlegame (HvS) 2017-03-17 23:17:53 +02:00
Sergii Pylypenko
b4cc822085 Merge svn r27779
Conflicts:
	src/autoreplace_gui.cpp
	src/economy.cpp
	src/fios_gui.cpp
	src/lang/spanish_MX.txt
	src/network/network_gui.cpp
	src/rev.cpp.in
	src/road_gui.cpp
	src/toolbar_gui.cpp
	src/window.cpp
2017-03-17 23:14:41 +02:00
Sergii Pylypenko
8f78427f03 Updated TODO 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
cd865fc77a Windows compilation fixes 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
9b363c59f0 Tutorial: fix for win32 2017-03-17 22:41:29 +02:00
pelya
34ffe3eec9 Updated todo 2017-03-17 22:41:29 +02:00
pelya
f87f657e4d Button size goes up to 100 2017-03-17 22:41:29 +02:00
pelya
a3969f84bb Definite fix for libtimidity.cpp not included into compilation 2017-03-17 22:41:29 +02:00
pelya
22e97e4666 Revert "Fixed libtimidity not detected on Android"
This reverts commit fe24baa15d.
2017-03-17 22:41:29 +02:00
pelya
e16c85f53a Fixed libtimidity not detected on Android 2017-03-17 22:41:29 +02:00
pelya
d35d97c4a5 Adjusted default video settings for touchscreen 2017-03-17 22:41:29 +02:00
pelya
01ba6e32d5 Reverted to using extmidi for PC build 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
226eaa198c Updated todo 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
7e93ca0d25 Changed default options to touchscreen-friendly 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
0eec38eb5b Updated TODO 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
5a5f2db080 Save all settings immediately when closing the Settings dialog, because users tend to kill the app instead of pressing 'Quit' button 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
11eb95aae9 Code style 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
76a063e8e2 Fixed crash in tutorial 2017-03-17 22:41:29 +02:00
Sergii Pylypenko
6004032ba2 Updated translations 2017-03-17 22:41:28 +02:00
pelya
fc607d314f Updated todo 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
8faceb03d7 Updated Android translations 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
c9b0eea04c Smallmap: disabled show/hide legend button 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
7a0d500529 Fixed build tools leaving random uncloseable station dialogs 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
1d04aef406 Fixed left/right arrows on scroller buttons in advanced settings 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
f2097e7448 Fixed advanced settings UI 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
a36d05567e Updated todo 2017-03-17 22:41:28 +02:00
Sergii Pylypenko
ed1e09edea Updated version numbers 2017-03-17 22:41:28 +02:00
pelya
c0f71fb65c Fixed a crash in my own tooltip code 2017-03-17 22:40:05 +02:00
Sergii Pylypenko
be8d17f217 Updated todo 2017-03-17 22:40:05 +02:00
Sergii Pylypenko
f9a464512c Updated todo 2017-03-17 22:40:05 +02:00
Sergii Pylypenko
db042040c2 Fixed bridges not building when confirmation is disabled, rearranged tooltip position to not obscure buttons 2017-03-17 22:40:05 +02:00
pelya
ca80f71f45 Rearranged rail station window, to allow space for NewGRF stations 2017-03-17 22:40:05 +02:00
pelya
a724419cc9 Fixed joining stations, broken by confirmation dialog 2017-03-17 22:40:05 +02:00
pelya
ff28829393 Fixed bridge GUI broken due to confirmation dialog 2017-03-17 22:40:04 +02:00
pelya
09b1a4cf5d Fixed remove and one-way buttons for road and rail, broken by confirmation UI 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
21c13781e4 Fixed a crash in confirmation dialog 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
96501e9f08 Warning: crashes! Confirmation dialog will also show estimated cost 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
f7b1a0abd3 Show station information in confirmation mode only if coverage area highlight is enabled, it will show incorrect info otherwise 2017-03-17 22:40:04 +02:00
pelya
3b79284608 Fixed multiplayer client list not drawn when it's too narrow 2017-03-17 22:40:04 +02:00
pelya
1f95adba77 Fixed multiplayer client list 2017-03-17 22:40:04 +02:00
pelya
091e208807 Updated Andorid translations 2017-03-17 22:40:04 +02:00
pelya
b5aa062ce5 Backported Spanish Mexican translation from upstream master branch 2017-03-17 22:40:04 +02:00
pelya
8d0391bf9c Change video color depth from game options 2017-03-17 22:40:04 +02:00
pelya
7252c08e50 Also disable Ctrl hotkey for road stations 2017-03-17 22:40:04 +02:00
pelya
4909bdbecc Fixed joining rail stations broken 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
24a9d18717 Added vertical toolbar setting to advanced settings dialog 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
3dd6167192 Confirmation dialog: show what goods the station accepts using a tooltip 2017-03-17 22:40:04 +02:00
Sergii Pylypenko
6c6c78752a Fixed crash when selecting different font size 2017-03-17 22:40:04 +02:00
pelya
c1908fcda5 Updated todo 2017-03-17 22:40:04 +02:00
pelya
4206d8a84a Updated translations 2017-03-17 22:40:04 +02:00
pelya
615ad710de Fixed wrong minimap legend clicks items after few minimap usages 2017-03-17 22:40:04 +02:00
pelya
7da54512d1 Fixed station catchment area not shown when using confirmation dialog 2017-03-17 22:40:04 +02:00
pelya
9cf2149c78 Fixed UI when building with non-autorail tool with confirmation window 2017-03-17 22:40:04 +02:00
pelya
8a27d0bb1e Fixed non-autorail building with confirmation dialog, UI is still slightly broken 2017-03-17 22:40:04 +02:00
pelya
bea8807de7 Updated todo 2017-03-17 22:40:04 +02:00
frosch
d3de080883 (svn r27778) -Change [FS#6442-ish]: Convenience savegame bump to distinguish 1.7 savegames from 1.6 savegames. 2017-03-11 20:37:32 +00:00
frosch
bc61ff380a (svn r27777) -Doc: Yearly increment 2017-03-11 16:49:51 +00:00
frosch
ffcdd47321 (svn r27776) -Merge: Documentation updates from 1.6 branch 2017-03-11 13:34:01 +00:00
frosch
51c6ae62d1 (svn r27775) -Fix [FS#6510]: Insufficient thread synchronisation when switching blitters. (JGR) 2017-03-11 13:05:54 +00:00
frosch
5b7a04ca27 (svn r27774) -Fix [FS#5889]: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows.
-Revert (r23978): No SDL-specific fix required anymore. The new fix applies to all backends.
2017-03-11 12:52:26 +00:00
frosch
f2af019eb7 (svn r27773) -Update: Baseset translations 2017-03-11 12:20:50 +00:00
frosch
5e28cc4757 (svn r27772) -Fix [FS#5819]: If the intro game had a savegame version which contains a NewGRF configuration, then townname NewGRFs would not be activated in the game options. 2017-03-07 20:18:54 +00:00
translators
4d12cce1c4 (svn r27771) -Update from Eints:
malay: 27 changes by stress_043
2017-03-07 18:45:38 +00:00
fonsinchen
0d5ee772fc (svn r27770) -Fix [FS#6540]: Initialize variables in station_sl.cpp (JGR) 2017-03-05 17:06:14 +00:00
frosch
bc2382af06 (svn r27769) -Change: [NewGRF] Extend the DCxx range to D800-DFFF. 2017-03-05 14:45:13 +00:00
frosch
724f1f3b69 (svn r27768) -Codechange: Use if and IsInsideMM instead of switch-case sequences to test for consecutive values. 2017-03-05 14:44:15 +00:00
frosch
f469b0be3e (svn r27767) -Codechange: Industries and houses should just use the default-case in Action 4. 2017-03-05 14:43:21 +00:00
frosch
4180276c81 (svn r27766) -Fix: Obiwan opposed translations for text id D3FF and DCFF in Action 13. 2017-03-05 14:42:41 +00:00
translators
3342c5a367 (svn r27765) -Update from Eints:
russian: 4 changes by Lone_Wolf
2017-03-04 18:45:36 +00:00
translators
d22b80779b (svn r27764) -Update from Eints:
russian: 3 changes by Lone_Wolf
french: 6 changes by glx
2017-03-02 18:45:38 +00:00
translators
a8f9520bbd (svn r27763) -Update from Eints:
korean: 6 changes by telk5093
frisian: 2 changes by Fopper
russian: 5 changes by Lone_Wolf
2017-03-01 18:45:37 +00:00
translators
a192fa74a7 (svn r27762) -Update from Eints:
catalan: 5 changes by juanjo
greek: 29 changes by kyrm
croatian: 2 changes by UnderwaterHesus
japanese: 4 changes by nex259
2017-02-28 18:45:37 +00:00
translators
9071d5f07f (svn r27761) -Update from Eints:
croatian: 3 changes by VoyagerOne
italian: 5 changes by lorenzodv
english (us): 4 changes by Supercheese
latin: 4 changes by Supercheese
2017-02-27 18:45:37 +00:00
frosch
60f7168c22 (svn r27760) -Change: Enable realisitic train and road vehicle acceleration by default. 2017-02-26 20:31:02 +00:00
frosch
40eee1e3a2 (svn r27759) -Fix: strgen compilation 2017-02-26 20:10:41 +00:00
frosch
ce32ca4dc6 (svn r27758) -Change: Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k. 2017-02-26 19:41:30 +00:00
frosch
0c1fcc02ec (svn r27757) -Change: Make StringID 32bit. 2017-02-26 19:41:14 +00:00
frosch
49b940f69c (svn r27756) -Codechange: Add StringTab enum 2017-02-26 19:40:53 +00:00
frosch
b54a79f13e (svn r27755) -Codechange: Move TAB_SIZE to strings_type.h and use it consistently. 2017-02-26 19:40:32 +00:00
frosch
02967c3c08 (svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs. 2017-02-26 19:39:58 +00:00
translators
d5c6760c85 (svn r27753) -Update from Eints: 2017-02-26 18:45:43 +00:00
alberth
fa81e20390 (svn r27752) -Cleanup: Remove obsolete strings from other languages as well. 2017-02-26 15:34:57 +00:00
alberth
34ca88c098 (svn r27751) -Feature: Display cargo suffix of accepted cargoes in industry view based on cb37 result type.
Industry-sets that have no stockpiling get better control over the displayed accepted cargo information.
- result 0401 only prints the accepted cargo
- results 0800-0BFF prints the accepted cargo and a string (but not the amount)
2017-02-26 15:34:15 +00:00
alberth
5bcca41ace (svn r27750) -Codechange: Add cb37 result type to the cargo suffix. 2017-02-26 15:33:39 +00:00
alberth
c9a8360419 (svn r27749) -Codechange: Fold cb37 cargo suffix text in a structure. 2017-02-26 15:30:25 +00:00
translators
04040a6a6d (svn r27748) -Update from Eints:
polish: 1 change by wojteks86
2017-02-25 18:45:38 +00:00
translators
9eff17e66b (svn r27747) -Update from Eints:
korean: 7 changes by telk5093
2017-02-17 18:45:37 +00:00
frosch
9d85de4d3e (svn r27746) -Fix [FS#6538]: PR_CLEAR_ROAD refers to cost per roadbit. Removing secondary roadtypes from bridges was too cheap. (JGR) 2017-02-12 12:03:07 +00:00
frosch
c46e51449e (svn r27745) -Update: Baseset translations 2017-02-12 12:01:03 +00:00
translators
594b328c7e (svn r27744) -Update from Eints:
basque: 20 changes by Thadah
dutch: 4 changes by habell
2017-02-09 18:45:40 +00:00
frosch
30637d1580 (svn r27743) -Fix [FS#6537]: Extra viewports did not center on the selected tile. (hackalittlebit) 2017-02-05 17:54:46 +00:00
translators
31d4b1e8d6 (svn r27742) -Update from Eints:
spanish (mexican): 1 change by Absay
2017-02-03 18:45:39 +00:00
translators
0fc88ade9f (svn r27741) -Update from Eints:
luxembourgish: 26 changes by Phreeze
russian: 1 change by Lone_Wolf
2017-01-26 18:45:36 +00:00
translators
cd18f2c10c (svn r27740) -Update from Eints:
korean: 1 change by telk5093
2017-01-25 18:45:36 +00:00
frosch
6c573dc3b5 (svn r27739) -Cleanup/Revert (r12162): Clearing MP_HOUSE with DC_EXEC always fails, so there is no effect in testing for houses first. (adf88) 2017-01-22 13:13:15 +00:00
translators
3245922407 (svn r27738) -Update from Eints:
croatian: 1 change by VoyagerOne
2017-01-20 18:45:37 +00:00
translators
1d6f3fda80 (svn r27737) -Update from Eints:
czech: 27 changes by djst
2017-01-18 18:45:37 +00:00
translators
2335acdc16 (svn r27736) -Update from Eints:
italian: 1 change by lorenzodv
2017-01-16 18:45:36 +00:00
translators
140bb8409a (svn r27735) -Update from Eints:
catalan: 1 change by juanjo
2017-01-15 18:45:39 +00:00
frosch
2f5cc263c7 (svn r27734) -Change: Hide the drive-in stops from the tram station picker. 2017-01-15 14:27:54 +00:00
frosch
a2e53d5ab4 (svn r27733) -Codechange: Pass NPF user data as void* instead of as array of integers. 2017-01-15 13:59:46 +00:00
frosch
050271ed2d (svn r27732) -Change: Turn the message about 'missing baseset sprites' from a popup into a static message that only shows in non-release versions, just like the 'missing translations' message. 2017-01-14 18:30:26 +00:00
frosch
c72f21e410 (svn r27731) -Fix (r27730): Missed some sprites which also belong into orig_extra.grf 2017-01-14 18:00:02 +00:00
frosch
79027cbf9d (svn r27730) -Change: Split openttd.grf into openttd.grf and orig_extra.grf
openttd.grf is now always loaded and provides all extra graphics in case the (possibly outdated) baseset does not.
  orig_extra.grf contains graphics specific to the original baseset only.
2017-01-14 15:48:19 +00:00
frosch
8bd3a8a991 (svn r27729) -Codechange: Do not count static NewGRF when checking for the maximum number of NewGRFs in a game.
-Codechange: Remove LAST_GRF_SLOT and MAX_NEWGRFS. Now NETWORK_MAX_GRF_COUNT is the only constant to specify the maximum number of non-static NewGRF.
-Codechange: Increase the number of file slots, effectively increasing the maximum number of static NewGRF and baseset GRFs.
2017-01-14 13:12:49 +00:00
translators
9f858cefd1 (svn r27728) -Update from Eints:
latin: 1 change by Supercheese
2017-01-08 18:45:37 +00:00
michi_cc
3e7bdb0c73 (svn r27727) -Fix(-or-not) [FS#6295]: [OSX] Out-of-the-box compilation on newer OSX versions (dunn). 2017-01-08 17:00:18 +00:00
frosch
b276dd7c63 (svn r27726) -Fix: Improve error message when trying to build rail track over a depot. (adf88) 2017-01-08 11:45:08 +00:00
frosch
a76847f362 (svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG instead, which does the same in all use-cases. 2017-01-07 21:36:25 +00:00
frosch
dc024f0e3a (svn r27724) -Cleanup: Remove pointless usage of IsOpenTTDBaseGRF. System GRFs are never listed in the NewGRF GUI. 2017-01-07 21:28:03 +00:00
frosch
373a6d3497 (svn r27723) -Codechange: Simplify tests by using GCF_SYSTEM. 2017-01-07 21:22:26 +00:00
frosch
ca329cd275 (svn r27722) -Fix (r7490): GCF_SYSTEM was never set correctly. 2017-01-07 21:20:02 +00:00
frosch
4955e71ee0 (svn r27721) -Fix: Testing GRFs for static-safety (when reloading the config) invalidated file slot 62, which may be in use by an active GRF. 2017-01-07 21:18:17 +00:00
translators
43ee8e8d38 (svn r27720) -Update from Eints:
turkish: 25 changes by barisdemirdelen
2017-01-07 18:45:37 +00:00
translators
12d17ed62b (svn r27719) -Update from Eints:
polish: 25 changes by nouwak
2016-12-31 18:45:36 +00:00
translators
a8496153d6 (svn r27718) -Update from Eints:
spanish (mexican): 25 changes by Absay
2016-12-30 18:45:38 +00:00
translators
151956d471 (svn r27717) -Update from Eints:
spanish: 2 changes by SilverSurferZzZ
2016-12-29 18:45:38 +00:00
translators
9bbc6e7ab5 (svn r27716) -Update from Eints:
catalan: 1 change by juanjo
2016-12-27 18:45:39 +00:00
translators
db6e65f4f3 (svn r27715) -Update from Eints:
spanish: 2 changes by SilverSurferZzZ
2016-12-26 18:45:38 +00:00
translators
1c7e978b09 (svn r27714) -Update from Eints:
catalan: 2 changes by juanjo
russian: 1 change by Lone_Wolf
2016-12-25 18:45:37 +00:00
frosch
d1c64315cd (svn r27713) -Fix [FS#6527]: Setup clipping areas for individual widgets when drawing. (adf88) 2016-12-25 17:57:47 +00:00
frosch
dbe969087d (svn r27712) -Codechange: Reduce recursions in DrawOverlappedWindow by limiting the area to the window bounds first. (adf88) 2016-12-25 17:56:57 +00:00
frosch
60a79b599e (svn r27711) -Doc: Fontsizes (adf88) 2016-12-25 17:55:10 +00:00
frosch
14dba9764b (svn r27710) -Change: Limit waypoint area by maximum station spread already when dragging. (adf88) 2016-12-25 14:59:53 +00:00
frosch
d8a316d7c5 (svn r27709) -Fix-ish: Silence some warnings. (adf88) 2016-12-25 13:26:15 +00:00
translators
c917ed2112 (svn r27708) -Update from Eints:
catalan: 26 changes by juanjo
russian: 9 changes by Lone_Wolf
2016-12-24 18:45:38 +00:00
frosch
2be42dadea (svn r27707) -Fix: Make the result of NewGRF's CARGO_NAME string code reliably print 'Nothing', if an invalid type is provided. 2016-12-23 22:13:38 +00:00
frosch
9145e5d2b5 (svn r27706) -Feature: [NewGRF] String command 9A 1E to print the name of a cargo type. 2016-12-23 13:38:50 +00:00
frosch
124f386fd1 (svn r27705) -Doc: Add the hex codes to the SCC_NEWGRF_ enum entries. 2016-12-22 20:47:40 +00:00
translators
2507487877 (svn r27704) -Update from Eints:
welsh: 29 changes by kazzie
spanish: 2 changes by SilverSurferZzZ
russian: 13 changes by Lone_Wolf
2016-12-22 18:45:38 +00:00
frosch
ab3d5305a5 (svn r27703) -Change [FS#6532]: [gcc] Wnarrowing and Wfree-nonheap-object do no longer trigger in gcc 4.9.2, so reenable them. 2016-12-22 12:59:46 +00:00
translators
6de1225894 (svn r27702) -Update from Eints:
russian: 16 changes by Lone_Wolf
2016-12-21 18:45:40 +00:00
translators
ca65ea003d (svn r27701) -Update from Eints:
russian: 37 changes by Lone_Wolf
2016-12-20 18:45:37 +00:00
frosch
1522558cf7 (svn r27700) -Codechange: Simplify railtype date introduction. A check that is safe to run every day before the last railtype has been introduced, is also safe to run after the last railtype has been introduced. 2016-12-20 12:35:36 +00:00
translators
be21109989 (svn r27699) -Update from Eints:
russian: 1 change by Lone_Wolf
2016-12-19 18:45:38 +00:00
translators
2171a56c15 (svn r27698) -Update from Eints:
spanish: 3 changes by SilverSurferZzZ
russian: 3 changes by Lone_Wolf
2016-12-18 18:45:38 +00:00
translators
37b6bd5702 (svn r27697) -Update from Eints:
urdu: 9 changes by siphr
spanish: 3 changes by SilverSurferZzZ
2016-12-17 18:45:36 +00:00
translators
5d5d020103 (svn r27696) -Update from Eints:
urdu: 11 changes by siphr
spanish: 6 changes by SilverSurferZzZ
russian: 10 changes by Lone_Wolf
2016-12-16 18:45:36 +00:00
translators
8a41b36cd8 (svn r27695) -Update from Eints:
spanish: 4 changes by SilverSurferZzZ
french: 26 changes by glx
2016-12-14 18:45:37 +00:00
translators
1808557b45 (svn r27694) -Update from Eints:
spanish: 4 changes by SilverSurferZzZ
2016-12-13 18:45:35 +00:00
translators
01059a7f75 (svn r27693) -Update from Eints:
korean: 2 changes by telk5093
spanish: 21 changes by SilverSurferZzZ
russian: 14 changes by Lone_Wolf
2016-12-12 18:45:37 +00:00
translators
3f78d271b2 (svn r27692) -Update from Eints:
croatian: 25 changes by VoyagerOne
english (us): 2 changes by Supercheese
russian: 1 change by Lone_Wolf
latin: 25 changes by Supercheese
2016-12-11 18:45:39 +00:00
translators
7c7913c986 (svn r27691) -Update from Eints:
italian: 9 changes by lorenzodv
2016-12-10 18:45:38 +00:00
frosch
4e2ecbb5a1 (svn r27690) -Fix: Old compilers do not zero-initialise POD members when explicitly calling implicitly created default constructors. 2016-12-10 15:49:25 +00:00
frosch
1db921bedb (svn r27689) -Fix: MSVC warnings. 2016-12-10 14:33:58 +00:00
frosch
0360e61dae (svn r27688) -Fix-ish: Initialise new railtypes with the original railtype data, though strictly NewGRF could only have modified 'label' and 'alternate_labels' at the time AllocateRailType is called, which are reset anyway. 2016-12-10 13:28:47 +00:00
frosch
00b422712e (svn r27687) -Fix: RailtypeInfo::alternate_labels leaked when reloading NewGRF. (adf88) 2016-12-10 13:26:29 +00:00
frosch
4753097c3d (svn r27686) -Change: List railtype of rail tiles explicitly in the tile info window. 2016-12-09 21:27:22 +00:00
frosch
f294258b18 (svn r27685) -Change: Preemptively invalidate translation changes of next commit for eints. 2016-12-09 21:26:37 +00:00
translators
cf04ca5db3 (svn r27684) -Update from Eints:
italian: 1 change by lorenzodv
2016-12-09 18:45:36 +00:00
frosch
da76191afc (svn r27683) -Change: Rearrange the autoreplace GUI for trains, and do not filter it by railtype by default. 2016-12-08 20:21:39 +00:00
fonsinchen
cdbb864725 (svn r27682) -Fix: Don't check if links are alive for manually routed cargo 2016-12-04 19:59:17 +00:00
fonsinchen
aa26edfa48 (svn r27681) -Fix: When deleting stale links, iterate through order lists before iterating through vehicles 2016-12-04 19:53:38 +00:00
translators
fd7852cbdf (svn r27680) -Update from Eints:
romanian: 1 change by kneekoo
2016-11-12 18:45:38 +00:00
translators
4ea93bc8ef (svn r27679) -Update from Eints:
romanian: 10 changes by kneekoo
2016-11-09 18:45:35 +00:00
translators
7e2e63094b (svn r27678) -Update from Eints:
romanian: 20 changes by kneekoo
2016-11-08 18:45:38 +00:00
frosch
9d8c04b0cc (svn r27677) -Codechange: Remove implicit VehicleListIdentifier from uint32 constructor, to make conversions more explicit. 2016-11-05 19:16:59 +00:00
frosch
616c02c42e (svn r27676) -Codechange: Rename catenary functions, so that they refer unambiguously to either RoadCatenary or RailCatenary. 2016-11-05 11:53:03 +00:00
michi_cc
4436f96f9f (svn r27675) -Fix [FS#6502]: [OSX] Building with 10.11 or 10.12 SDKs. 2016-10-31 19:29:01 +00:00
michi_cc
221c84be66 (svn r27674) -Fix (r27673): Mingw... 2016-10-30 19:27:07 +00:00
michi_cc
36cbb54a9d (svn r27673) -Add: [Win32] Thread names for windows debuggers. 2016-10-30 18:22:55 +00:00
frosch
a08df612be (svn r27672) -Doc [FS#6489]: Fix comment. (Yho) 2016-10-30 18:04:20 +00:00
frosch
77b790cd5a (svn r27671) -Codechange: Replace magic numbers in the toolbar with the already existing WID_TN_xxx. (Wolf01) 2016-10-30 17:36:57 +00:00
frosch
3f75b8bca2 (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 2016-10-30 17:29:33 +00:00
translators
f8f2c9d3a5 (svn r27669) -Update from Eints:
thai: 11 changes by angelix
2016-10-19 17:45:35 +00:00
frosch
ba566e9126 (svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites. 2016-10-16 14:59:44 +00:00
frosch
a37bb32fd6 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 2016-10-16 14:58:38 +00:00
frosch
f36539837e (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
frosch
8321c2d0fa (svn r27665) -Fix: When dragging crashed vehicles, also draw them as crashed at the mouse cursor. 2016-10-16 14:57:13 +00:00
frosch
fe12488232 (svn r27664) -Codechange: Deduplicate code for animating effect vehicles. 2016-10-16 14:56:52 +00:00
frosch
2a1e955fee (svn r27663) -Codechange: Deduplicate code when rotating crashed vehicles. 2016-10-16 14:56:33 +00:00
frosch
3b9cc70553 (svn r27662) -Codechange: Deduplicate code using GetSingleVehicleWidth. 2016-10-16 14:56:05 +00:00
translators
8c1bf8f16d (svn r27661) -Update from Eints:
portuguese: 1 change by Samu
2016-10-12 17:45:36 +00:00
translators
b080b86574 (svn r27660) -Update from Eints:
portuguese: 7 changes by Samu
2016-10-10 17:45:36 +00:00
translators
3ee07f37d8 (svn r27659) -Update from Eints:
portuguese: 25 changes by Samu
2016-10-09 17:45:39 +00:00
translators
169468a857 (svn r27658) -Update from Eints:
danish: 1 change by Knogle
2016-10-06 17:45:36 +00:00
frosch
db38de3b7e (svn r27657) -Change: Replace another occurence of the ancient tilehash function with the newer one. This time to make rough land appear more random. 2016-10-02 13:41:56 +00:00
frosch
740534440e (svn r27656) -Fix [FS#6511]: When removing objects of bankrupt companies the tiles may revert to canal. In that case also check the ownership of the canal. 2016-09-18 14:07:52 +00:00
translators
737897653a (svn r27655) -Update from Eints:
romanian: 2 changes by kkmic
2016-09-06 17:45:36 +00:00
frosch
533cb7c156 (svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro) 2016-09-05 19:11:01 +00:00
alberth
f286ba8db2 (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 2016-09-04 16:06:50 +00:00
alberth
0b8869930f (svn r27652) -Fix(r27650): Use the file operation being performed to set the _sl.action variable. 2016-09-04 15:10:41 +00:00
alberth
e735bbebce (svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload. 2016-09-04 12:58:04 +00:00
alberth
a959c0c965 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 2016-09-04 12:57:43 +00:00
alberth
c3bed437ee (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 2016-09-04 12:57:20 +00:00
alberth
3b84827773 (svn r27648) -Codechange: Remove remaining _saveload_mode usage. 2016-09-04 12:56:56 +00:00
alberth
ec2b2fad58 (svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode 2016-09-04 12:56:23 +00:00
alberth
ac72a6b1ed (svn r27646) -Codechange: Move _fios_items variable into the SaveLoadWindow class. 2016-09-04 12:55:54 +00:00
alberth
76cd96e709 (svn r27645) -Add: Give console commands their own file list storage. 2016-09-04 12:55:21 +00:00
alberth
8a9e9f838b (svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList. 2016-09-04 12:54:52 +00:00
alberth
f618c0d0a5 (svn r27643) -Codechange: FiosGetDrives function also takes a destination file list. 2016-09-04 12:54:30 +00:00
alberth
93baf192a0 (svn r27642) -Codechange: FiosGet* file query functions take a destination file list. 2016-09-04 12:54:03 +00:00
alberth
a38cdeccc0 (svn r27641) -Codechange: Fold the _fios_items file list vector into its own class. 2016-09-04 12:50:22 +00:00
alberth
c530f89761 (svn r27640) -Codechange: Remove another use of _saveload_mode in the loading code. 2016-09-04 12:48:28 +00:00
alberth
b6c29ae4eb (svn r27639) -Codechange: Also always set the abstract FileToSaveLoad::filetype when setting a mode. 2016-09-04 12:47:39 +00:00
alberth
e78627f2f1 (svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function. 2016-09-04 12:47:07 +00:00
alberth
b5eb50da7b (svn r27637) -Codechange: Don't use _saveload_mode for scenario loading detection. 2016-09-04 12:46:29 +00:00
alberth
757bc0a97b (svn r27636) -Codechange: Rename FileType to AbstractFileType. 2016-09-04 12:46:07 +00:00
alberth
a35e970ab0 (svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions. 2016-09-04 12:45:40 +00:00
alberth
df2221ba7e (svn r27634) -Codechange: Improve name of the SmallFiosItem struct. 2016-09-04 12:45:11 +00:00
alberth
55c7c21c5d (svn r27633) -Codechange: Extract _saveload_mode use from BuildFileList 2016-09-04 12:44:42 +00:00
frosch
f46996243b (svn r27632) -Feature: When dragging vehicles in group or depot GUI, draw the complete articulated vehicle. 2016-08-15 18:34:31 +00:00
frosch
0829753fd0 (svn r27631) -Codechange: Split GetSingleVehicleWidth from GetVehicleWidth. 2016-08-15 18:34:09 +00:00
frosch
caa9bffb56 (svn r27630) -Codechange: Deduplicate code to attach vehicle to cursor. 2016-08-15 18:33:52 +00:00
frosch
0214caaac2 (svn r27629) -Fix: When dragging multiple vehicles in the depot, make the destination gap as long as the chain instead of just considering the first vehicle. 2016-08-15 18:33:29 +00:00
frosch
0e3e4eeb53 (svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites. 2016-08-15 18:33:08 +00:00
frosch
2337d169e8 (svn r27627) -Codechange: Deduplicate some cursor magic into SetMouseCursorBusy. 2016-08-15 18:32:48 +00:00
frosch
93d5995bed (svn r27626) -Codechange: Do not use the cursor sprite as PlaceObject status in the main toolbar. 2016-08-15 18:32:25 +00:00
frosch
2257d782b0 (svn r27625) -Doc: CursorVars 2016-08-15 18:30:50 +00:00
translators
9d5ed2c469 (svn r27624) -Update from Eints:
spanish (mexican): 24 changes by Absay
2016-08-07 17:45:36 +00:00
frosch
a2a69c1480 (svn r27623) -Fix (r27616) [FS#6492]: Missed two version checks, and messed one up. 2016-07-24 09:13:51 +00:00
frosch
cc18df4cb7 (svn r27622) -Change: In industry map view, give visible industry types the highest tile priority, and hidden industry types a lower one. This way filtered and highlighted industries are not hidden by overlapping tiles in zoomed-out smallmap. (adf88) 2016-07-22 21:44:54 +00:00
frosch
46aeed3817 (svn r27621) -Fix (r27620): Committed too early. 2016-07-22 21:38:49 +00:00
frosch
bd6799a9f8 (svn r27620) -Codechange: Inline GetEffectiveTileType (adf88) 2016-07-22 21:29:04 +00:00
frosch
2c403c8a80 (svn r27619) -Update: Baseset translations 2016-07-22 21:25:37 +00:00
translators
aa140bb928 (svn r27618) -Update from Eints:
latvian: 19 changes by Parastais
2016-07-18 17:45:36 +00:00
translators
c6ac52e71a (svn r27617) -Update from Eints:
latvian: 6 changes by Parastais
2016-07-17 17:45:36 +00:00
frosch
f7a7f141d3 (svn r27616) -Codechange [FS#6487]: [Build] Change the GCC version detection so that it works with two-digit and truncated versions. 2016-07-17 11:10:21 +00:00
translators
18bbe02337 (svn r27615) -Update from Eints:
spanish: 7 changes by SilverSurferZzZ
2016-07-12 17:45:35 +00:00
fonsinchen
ff96590312 (svn r27614) -Codechange: Use a fixed array instead of a map for link refresher cargo capacities. (JGR) 2016-07-10 12:17:00 +00:00
fonsinchen
a81b7a24a6 (svn r27613) -Codechange: Use a flat vector instead of a map in FlowEdgeIterator. (JGR) 2016-07-10 12:03:23 +00:00
fonsinchen
6b2eed0a70 (svn r27612) -Codechange: Replace three uses of std::list with std::queue/vector. (JGR) 2016-07-10 11:57:16 +00:00
fonsinchen
8d5566651b (svn r27611) -Codechange: Cache the calculated value of CapacityAnnotation 2016-07-10 11:53:43 +00:00
translators
8f2461cdfb (svn r27610) -Update from Eints:
korean: 1 change by telk5093
2016-07-02 17:45:35 +00:00
rubidium
fe0d3761f7 (svn r27606) -Change/fix: GCC6 defaults to C++14, but our configure limits it to C++0x just because we want to use features from C++0x (which are also in C++14), so use the C++ standard that's the GCC6 default 2016-06-27 17:54:05 +00:00
rubidium
dd5e3d9f33 (svn r27605) -Fix: GCC 6 warning about misleading indentation 2016-06-27 17:52:30 +00:00
translators
932951982f (svn r27604) -Update from Eints:
spanish: 3 changes by SilverSurferZzZ
2016-06-24 17:45:37 +00:00
translators
60d05aa27d (svn r27603) -Update from Eints:
spanish: 12 changes by SilverSurferZzZ
2016-06-19 17:45:36 +00:00
frosch
5973140ac2 (svn r27602) -Fix [FS#6481]: Compilation with --disable-network. (Deranged) 2016-06-17 18:56:19 +00:00
translators
3d54c33180 (svn r27601) -Update from Eints:
spanish (mexican): 4 changes by Absay
2016-06-13 17:45:37 +00:00
frosch
a073b276ba (svn r27600) -Fix: [NewGRF] shift-and-add-divide/modulo varadjusts use signed division/modulo. 2016-06-13 17:34:18 +00:00
translators
1234b7d0f8 (svn r27599) -Update from Eints:
persian: 2 changes by rkarimabadi
2016-06-12 17:45:36 +00:00
frosch
9a7618aeb6 (svn r27598) -Fix: Company 0 could accept engine previews before they were offered. 2016-06-09 19:04:53 +00:00
smatz
5ac736ec00 (svn r27595) -Fix: prevent GCC 6 over-optimization 2016-05-31 19:33:33 +00:00
frosch
842aaf7cdd (svn r27594) -Fix [FS#6473]: [Script] Kill scripts, when a non-suspendable valuator call takes way too long. 2016-05-30 21:03:11 +00:00
frosch
05a91106b8 (svn r27586) -Fix [FS#6410]: Automatic servicing of road vehicles compared path finder costs with tile distances, thus vehicles went to depots which were factor 100 too far away. (juanjo) 2016-05-29 14:14:52 +00:00
frosch
0b2f8c13a2 (svn r27585) -Fix [FS#6437]: Enforce a non-zero load amount for all vehicles, so that vehicles can process their cargo reservations. 2016-05-29 13:35:17 +00:00
frosch
a66e0ff1f4 (svn r27584) -Codechange: Add some assertions about Vehicle::cargo_payment. 2016-05-29 13:33:20 +00:00
frosch
c5ae45c764 (svn r27583) -Fix [FS#6415]: Do not decrease the column width of depot windows when vehicles with high unitnumbers leave. (Airbus) 2016-05-29 12:21:40 +00:00
translators
39d588fa60 (svn r27582) -Update from Eints:
spanish (mexican): 18 changes by Absay
2016-05-22 17:45:36 +00:00
frosch
65ff8ef539 (svn r27581) -Fix [FS#6461]: Button size computation in script configuration window. (adf88) 2016-05-22 12:00:36 +00:00
frosch
c9f68ede59 (svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts. 2016-05-22 11:45:03 +00:00
frosch
51e274a523 (svn r27579) -Change [FS#6402]: Performance improvement for dedicated servers by skipping drawing calls earlier in the process. (JGR) 2016-05-22 11:30:25 +00:00
frosch
6981fee459 (svn r27578) -Fix [FS#6454]: Vehicles could not be hidden from the purchase list when they were in exclusive preview. 2016-05-22 11:04:34 +00:00
frosch
b1272ee714 (svn r27577) -Fix [FS#6386]: Dock and roadstop picker, client list and town authority window did not auto-resize according to their content when they were positioned at the bottom of the screen. (Eearslya) 2016-05-22 10:52:02 +00:00
frosch
9aa9d7e898 (svn r27576) -Fix (r27570): Compilation failure with all compilers but mine. 2016-05-22 10:45:46 +00:00
frosch
7108b0aa3b (svn r27575) -Fix [FS#6404]: Memory leak when disabling palette animation. (JGR) 2016-05-22 10:28:57 +00:00
frosch
1124c15ccd (svn r27574) -Fix [FS#6432]: The house id as returned by house variable 66 was incorrect when querying neighboured tiles. (adf88) 2016-05-22 10:23:22 +00:00
frosch
6fafa3d93a (svn r27573) -Fix [FS#6467]: Compilation failure with gcc 6.1 due to headers included after safeguards.h (JGR) 2016-05-22 10:15:35 +00:00
frosch
2de4652d09 (svn r27572) -Fix [FS#6442]: Convenience savegame bump to distinguish 1.6 savegames from 1.5 savegames. 2016-05-22 10:10:17 +00:00
frosch
14c1a7ad0b (svn r27571) -Codechange: Consistent naming for command callbacks which play a sound effect. 2016-05-22 10:07:48 +00:00
frosch
998a6c1302 (svn r27570) -Fix [FS#6449]: Various incorrect but uncritical size computations in the content client. 2016-05-22 10:04:41 +00:00
translators
f5c5783fac (svn r27569) -Update from Eints:
spanish (mexican): 3 changes by Absay
2016-05-20 17:45:35 +00:00
translators
dd2f369e9d (svn r27568) -Update from Eints:
dutch: 1 change by habell
2016-05-18 17:45:35 +00:00
translators
e71afa0c10 (svn r27567) -Update from Eints:
finnish: 1 change by jpx_
2016-05-17 17:45:37 +00:00
translators
101a63c3f5 (svn r27566) -Update from Eints:
spanish (mexican): 6 changes by Absay
2016-05-14 17:45:37 +00:00
translators
724dd44355 (svn r27565) -Update from Eints:
spanish (mexican): 13 changes by Absay
2016-05-13 17:45:33 +00:00
frosch
bd71bcc616 (svn r27564) -Update: Ownname of es_MX. 2016-05-12 19:14:06 +00:00
translators
edfe26f2ee (svn r27563) -Update from Eints:
korean: 1 change by Gimel3830
spanish (mexican): 93 changes by Absay
2016-05-12 17:45:36 +00:00
rubidium
49b69a5705 (svn r27562) -Fix: forgot one (hidden) case to force sorting to be locale independent 2016-05-12 17:24:06 +00:00
matthijs
7e06cdb455 (svn r27561) -Fix [Squirrel]: Fix typos in error messages 2016-05-11 21:28:39 +00:00
matthijs
91ddd32c20 (svn r27560) -Fix: typos in comments and string 2016-05-11 20:48:46 +00:00
rubidium
baa11c8b0f (svn r27559) -Update: baseset translations 2016-05-11 18:42:32 +00:00
rubidium
6da8fede43 (svn r27558) -Fix: force sorting to be locale independent, so files are always ordered the same and by that token better diff-able 2016-05-11 18:39:18 +00:00
rubidium
b892103747 (svn r27557) -Fix: bashism that caused different CFLAGS with bash vs dash 2016-05-11 18:38:44 +00:00
translators
f0db8a16d5 (svn r27556) -Update from Eints:
spanish (mexican): 36 changes by Absay
2016-05-11 17:45:36 +00:00
translators
3d476cf432 (svn r27555) -Update from Eints:
croatian: 3 changes by VoyagerOne
2016-05-08 17:45:37 +00:00
translators
3ae6dab58b (svn r27554) -Update from Eints:
korean: 1 change by Gimel3830
2016-05-07 17:45:33 +00:00
frosch
b21e13a2a4 (svn r27553) -Update: Project files 2016-04-30 14:33:36 +00:00
frosch
a3ffac0025 (svn r27552) -Feature: Mexican Spanish (Absay) 2016-04-30 08:28:40 +00:00
translators
806d97435e (svn r27551) -Update from Eints:
ukrainian: 3 changes by odisseus
2016-04-28 17:45:35 +00:00
translators
729a03ea67 (svn r27550) -Update from Eints:
frisian: 7 changes by BAJansen
2016-04-25 17:45:36 +00:00
translators
d23bcc13b1 (svn r27549) -Update from Eints:
chinese (traditional): 1 change by ww9980
2016-04-23 17:45:37 +00:00
translators
fa83b145c8 (svn r27548) -Update from Eints:
korean: 1 change by telk5093
2016-04-21 17:45:38 +00:00
frosch
34b68c7a82 (svn r27547) -Fix: Use a more appropiate sound effect for convert-rail. (andythenorth) 2016-04-19 20:39:08 +00:00
frosch
732260853e (svn r27546) -Fix: Remove SetFill from vehicle GUI buttons, so that the viewport is resized instead of them in case of long window titles. 2016-04-17 20:20:52 +00:00
frosch
e9fea1738a (svn r27545) -Fix: Remove special handling of classes with virtual methods from squirrel_export.awk. It seems to serve no purpose, except to break on 3 classes. 2016-04-17 19:51:42 +00:00
frosch
507e7135ec (svn r27544) -Fix-ish: Mark ScriptText::GetEncodedText as not part of any API, instead of relying on the export script to break on '/*'. 2016-04-17 19:50:27 +00:00
frosch
d70da28365 (svn r27543) -Fix (r27379): ScriptExec/TestMode::FinalRelease is not part of the API. 2016-04-17 17:10:07 +00:00
frosch
e7e6b45d89 (svn r27542) -Fix (r27367) [FS#6427]: ICU got disabled for Windows builds. 2016-04-17 16:50:37 +00:00
frosch
4cfa482786 (svn r27541) -Update: Baseset translations 2016-04-17 16:30:45 +00:00
translators
c723ef85ff (svn r27540) -Update from Eints:
hebrew: 40 changes by dnd_man
2016-04-16 17:45:37 +00:00
translators
35aa952c36 (svn r27539) -Update from Eints:
hebrew: 66 changes by dnd_man
2016-04-14 17:45:35 +00:00
translators
bff29d86b5 (svn r27538) -Update from Eints:
hebrew: 18 changes by dnd_man
luxembourgish: 1 change by Phreeze
2016-04-13 17:45:37 +00:00
translators
6ed602fab2 (svn r27537) -Update from Eints:
korean: 2 changes by telk5093
2016-04-09 17:45:38 +00:00
Sergii Pylypenko
e004c5e6fe Oops 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
30004ef2c4 Show smallmap legend by default 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
4928cc3022 Fixed legend in minimap 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
7412338eb4 Fixed subsidies window list height 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
1601b87325 Option to disable build confirmation dialog 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
e006df1226 Reverted some unnecessary changes 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
fd0a3f9ffc Proper transparent confirmation window 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
67d27d79b0 Making transparent window is hard 2016-04-08 21:45:30 +03:00
Sergii Pylypenko
a1a662782c Keep building area highlighted when confirmation window is shown 2016-04-08 21:45:29 +03:00
Sergii Pylypenko
d49e71d803 Build confirmation window, for each build action on the map 2016-04-08 21:45:29 +03:00
Sergii Pylypenko
c8f3f3c4a0 Bigger list items in vehicle orders dialog 2016-04-08 21:45:29 +03:00
Sergii Pylypenko
cfa1c18469 Fixed bridge UI 2016-04-08 21:45:29 +03:00
Sergii Pylypenko
ad5599aed8 Hide all windows when building anything on the map 2016-04-08 21:45:29 +03:00
Sergii Pylypenko
595727c438 Fix for vehicles unable to fully load 2016-04-08 21:45:29 +03:00
pelya
0516d3518f Updated Android translations 2016-04-08 21:45:29 +03:00
pelya
bf3ae8d3d0 Fixed crash in "Available vehicles" window 2016-04-08 21:45:28 +03:00
pelya
dbdf6273a3 Lazy fix for crash https://bugs.openttd.org/task/6437 2016-04-08 21:45:28 +03:00
translators
0badab6d8e (svn r27536) -Update from Eints:
belarusian: 1 change by KorneySan
malay: 1 change by rionix88
2016-04-07 17:45:37 +00:00
translators
9a5db2063b (svn r27535) -Update from Eints:
norwegian (bokmal): 16 changes by Leifbk
2016-04-06 17:45:35 +00:00
pelya
fd95276926 Updated todo 2016-04-03 00:57:18 +03:00
pelya
44453a4f3d Fixed minimap scrolling 2016-04-03 00:57:18 +03:00
pelya
655bb98974 Fixed sign list window 2016-04-03 00:57:18 +03:00
pelya
ecd7e7f4b1 Fixed 'Sort by' widget 2016-04-03 00:57:18 +03:00
pelya
3f4beeb212 Fixed text input widget too small and bottom bar too wide 2016-04-03 00:57:18 +03:00
pelya
079c97d994 Bump version files 2016-04-03 00:57:18 +03:00
pelya
59c99e3224 Libtimidity is excluded from build on Android, probably due to broken configure script 2016-04-03 00:57:18 +03:00
pelya
568a135848 Removed a separate empty panel on the Extra Viewport window 2016-04-03 00:57:18 +03:00
Sergii Pylypenko
e70cc80e44 Updated tutorial dialog with more videos 2016-04-03 00:56:18 +03:00
Sergii Pylypenko
c1a6abf3b1 Added todo 2016-04-03 00:56:18 +03:00
Sergii Pylypenko
48f3615bab Rough post-merge GUI fix 2016-04-03 00:56:18 +03:00
Sergii Pylypenko
758b4cf151 Cleaning up old files 2016-04-03 00:56:18 +03:00
Sergii Pylypenko
d72e0d2fb5 Do not translate close button symbol 2016-04-03 00:56:18 +03:00
Sergii Pylypenko
090a8f3f16 Android translation scripts 2016-04-03 00:56:18 +03:00
frosch
76fc242666 (svn r27534) -Fix [FS#6435]: [NewGRF] Station spritelayouts did not accept the var10 flag for the palette. 2016-04-02 16:02:22 +00:00
frosch
e580d9e623 (svn r27533) -Update: Baseset translations 2016-04-02 15:59:14 +00:00
translators
05b5c945cc (svn r27530) -Update from Eints:
catalan: 2 changes by juanjo
2016-04-01 17:45:37 +00:00
translators
db8d95b1a0 (svn r27529) -Update from Eints:
scottish gaelic: 3 changes by GunChleoc
frisian: 6 changes by BAJansen
spanish: 13 changes by SilverSurferZzZ
portuguese (brazilian): 1 change by Tucalipe
2016-03-31 17:45:35 +00:00
translators
c5aee2ac52 (svn r27528) -Update from Eints:
catalan: 233 changes by juanjo
portuguese (brazilian): 1 change by Tucalipe
2016-03-30 17:45:37 +00:00
translators
692458d8f5 (svn r27527) -Update from Eints:
tamil: 13 changes by aswn
2016-03-27 17:45:35 +00:00
translators
927d1a9490 (svn r27526) -Update from Eints:
malay: 2 changes by rionix88
2016-03-26 18:45:36 +00:00
translators
518eeac55f (svn r27525) -Update from Eints:
latin: 18 changes by Supercheese
2016-03-21 18:45:36 +00:00
translators
177c61477a (svn r27524) -Update from Eints:
esperanto: 3 changes by LaPingvino
2016-03-20 18:45:37 +00:00
translators
fe4d076dd8 (svn r27523) -Update from Eints:
latvian: 1 change by Jancs
2016-03-13 18:45:37 +00:00
translators
20373af117 (svn r27522) -Update from Eints:
slovenian: 72 changes by Necrolyte
2016-03-08 18:45:36 +00:00
translators
3912258035 (svn r27521) -Update from Eints:
malay: 5 changes by rionix88
2016-03-05 18:45:38 +00:00
frosch
fbd79d88f0 (svn r27518) -Update: Numbers 2016-03-01 20:00:22 +00:00
299 changed files with 7905 additions and 5052 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ bin/ai/*
bin/baseset/*
!bin/baseset/openttd.grf
!bin/baseset/opntitle.dat
!bin/baseset/orig_extra.grf
!bin/baseset/orig_*.obg
!bin/baseset/orig_*.obs
!bin/baseset/no_sound.obs

View File

@@ -1 +1 @@
1.6.1 27609 0 1.6.1
1.7.2 27949 0 1.7.2

View File

@@ -44,22 +44,18 @@ PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png
# Build the GRF.
ifdef GRFCODEC
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm
else
all:
endif
# Make sure the sprites directory exists.
$(OBJS_DIR)/sprites:
$(Q)-mkdir "$@"
$(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt
$(E) '$(STAGE) Collecting baseset translations'
$(Q) cat $^ > $@
$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/openttd.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/orig_extra.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
$(E) '$(STAGE) Updating $(notdir $@)'
$(Q) sed 's/^OPENTTD.GRF = *[0-9a-f]*$$/OPENTTD.GRF = '`$(MD5SUM) $(BIN_DIR)/openttd.grf | sed 's@ .*@@'`'/' $< > $@.tmp
$(Q) sed 's/^ORIG_EXTRA.GRF = *[0-9a-f]*$$/ORIG_EXTRA.GRF = '`$(MD5SUM) $(BIN_DIR)/orig_extra.grf | sed 's@ .*@@'`'/' $< > $@.tmp
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $@.tmp >$@
$(Q) rm $@.tmp
@@ -72,8 +68,9 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
# Compile extra grf
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites $(GRF_DIR)/assemble_nfo.awk
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-mkdir -p $(OBJS_DIR)/sprites
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
@@ -81,6 +78,17 @@ $(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites $(GRF_DIR)
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf
$(Q)cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf
# The copy operation of PNG_FILES is duplicated from the target 'openttd.grf', thus those targets may not run in parallel.
$(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk | $(BIN_DIR)/openttd.grf
$(E) '$(STAGE) Assembling orig_extra.nfo'
$(Q)-mkdir -p $(OBJS_DIR)/sprites
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/orig_extra.nfo > $(OBJS_DIR)/sprites/orig_extra.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/orig_extra.nfo
$(E) '$(STAGE) Compiling orig_extra.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf
$(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf
# Clean up temporary files.
clean:
$(Q)rm -f *.bak *.grf

View File

@@ -152,7 +152,7 @@ mrproper:
distclean: mrproper
maintainer-clean: distclean
$(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm
$(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/orig_extra.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm
depend:
@for dir in $(SRC_DIRS); do \

View File

@@ -1,7 +1,7 @@
#!/bin/sh
mkdir -p ../translations/lang
git diff 1.6/master -- src/lang/english.txt | tail -n +5 | grep '^[+]' | cut -b 2- | \
git diff 1.7/master -- src/lang/english.txt | tail -n +5 | grep '^[+]' | cut -b 2- | \
grep -v "^STR_TABLET_CLOSE\b" | \
grep -v "^STR_TABLET_SHIFT\b" | \
grep -v "^STR_TABLET_CTRL\b" | \

View File

@@ -6,3 +6,5 @@
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
AILog.Info("1.6 API compatibility in effect.");

8
bin/ai/compat_1.7.nut Normal file
View File

@@ -0,0 +1,8 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@@ -6,7 +6,7 @@ class Regression extends AIInfo {
function GetShortName() { return "REGR"; }
function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
function GetVersion() { return 1; }
function GetAPIVersion() { return "1.6"; }
function GetAPIVersion() { return "1.7"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}

View File

@@ -23,6 +23,7 @@ description.en_US = A music pack without actual music.
description.es_ES = Un conjunto de música vacío.
description.es_MX = Paquete de música vacío
description.et_EE = Muusikakogu ilma muusikata.
description.eu_ES = Musika gabeko musika paketea.
description.fi_FI = Musiikkipaketti, jossa ei ole musiikkia.
description.fr_FR = Un pack de musiques sans musiques.
description.ga_IE = Pacáiste ceoil gan aon cheol iarbhír ann.
@@ -40,6 +41,7 @@ description.la_VA = Sarcina musicae sine ulla musica.
description.lb_LU = E Musikpack ouni aktuell Musik.
description.lt_LT = Muzikos pakas be muzikos.
description.lv_LV = Mūzikas kopa bez mūzikas
description.ms_MY = Pek muzik tanpa muzik sebenar.
description.nb_NO = En musikkpakke uten noe musikk.
description.nl_NL = Een muziekset zonder muziek.
description.nn_NO = Ei musikkpakke utan noko musikk.

View File

@@ -40,6 +40,7 @@ description.ko_KR = 아무런 효과음도 없는 효과음 팩입니다.
description.la_VA = Sarcina sonorum sine ullis sonis.
description.lb_LU = E Soundpack ouni iergendee Sound.
description.lt_LT = Garsų pakas be jokių garsų.
description.lv_LV = Skaņu kopa bez skaņas.
description.nb_NO = En lydpakke uten noen lyder.
description.nl_NL = Een geluidset zonder geluid.
description.nn_NO = Ei lydpakke utan nokon lydar.

Binary file not shown.

Binary file not shown.

View File

@@ -24,6 +24,7 @@ description.en_US = Original Transport Tycoon Deluxe DOS edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS.
description.es_MX = Gráficos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni graafika.
description.eu_ES = Transport Tycoon Deluxe originaleko DOS edizioko grafikoak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán DOS.
@@ -40,6 +41,7 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS.
description.lb_LU = Original Transport Tycoon Deluxe DOS Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS izdevuma grafika.
description.ms_MY = Grafik asal Transport Tycoon Deluxe DOS edition.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe DOS-versie.
@@ -62,21 +64,21 @@ description.zh_CN = 运输大亨DOS豪华版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版的圖形。
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

View File

@@ -23,6 +23,7 @@ description.en_US = Original Transport Tycoon Deluxe DOS edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión DOS.
description.es_MX = Sonidos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni helid.
description.eu_ES = Transport Tycoon Deluxe originaleko DOS edizioko soinuak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán DOS.

View File

@@ -40,6 +40,7 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS (Germanica).
description.lb_LU = Original Transport Tycoon Deluxe DOS (Däitsch) Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS (Vokiečių) leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS (vācu) izdevuma grafika.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS (tysk).
description.nl_NL = Originele graphics van de Duitse Transport Tycoon Deluxe DOS-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS (tysk).
@@ -61,21 +62,21 @@ description.zh_CN = 运输大亨DOS豪华德语版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版 (德國版) 的圖形。
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

BIN
bin/baseset/orig_extra.grf Normal file

Binary file not shown.

View File

@@ -40,6 +40,7 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe Windows.
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma grafika.
description.ms_MY = Grafik asal Transport Tycoon Deluxe edisi Windows.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for Windows.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe Windows-versie.
@@ -62,21 +63,21 @@ description.zh_CN = 运输大亨Windows豪华版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe Windows 版的圖形。
[files]
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = OPENTTD.GRF
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

View File

@@ -40,6 +40,7 @@ description.la_VA = Musica ex editione originale Transport Tycoon Deluxe Windows
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Musik.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo muzika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma mūzika.
description.ms_MY = Muzik asal Transport Tycoon Deluxe edisi Windows.
description.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows.
description.nl_NL = Originele muziek van de Transport Tycoon Deluxe Windows-versie.
description.nn_NO = Original musikk frå Transport Tycoon Deluxe for Windows.

View File

@@ -23,6 +23,7 @@ description.en_US = Original Transport Tycoon Deluxe Windows edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión Windows.
description.es_MX = Sonidos originales de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni helid.
description.eu_ES = Transport Tycoon Deluxe originaleko Windows edizioko grafikoak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen Windows-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán Windows.

View File

@@ -6,3 +6,5 @@
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
GSLog.Info("1.6 API compatibility in effect.");

8
bin/game/compat_1.7.nut Normal file
View File

@@ -0,0 +1,8 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@@ -1,3 +1,94 @@
1.7.2 (2017-12-24)
------------------------------------------------------------------------
(None)
1.7.2-RC1 (2017-12-11)
------------------------------------------------------------------------
- Change: When train depots have a horizontal scrollbar, allow scrolling 1 tile beyond the longest train, so you can actually attach a wagon at the end (r27937)
- Fix: When moving wagons in the depot, the drag highlight did not exactly match the length of the dragged wagon chain (r27936)
- Fix: [Win32] Right mouse scrolling didn't work properly with the Windows 10 Fall Creators Update [FS#6629] (r27935)
- Fix: Forest, candyfloss forest and battery farm skipped the first animation frame [FS#6639] (r27932)
- Fix: Glyphs in range U+0020 to U+00FF may only be defined in orig_extra.grf, not in openttd.grf [FS#6620] (r27915)
- Fix: 'unban' console command was not handling IPv6 adresses properly (r27914, r27913)
- Fix: Keep the 'link' between industry chain and smallmap windows whenever possible [FS#6585] (r27905)
- Fix: When the last vehicle is removed from a shared orders group, hide the 'Stop sharing' button in the vehicle orders window [FS#6593] (r27904)
- Fix: Tooltip of 'increase service interval' said 'decrease' [FS#6606] (r27895)
- Fix: Console command parser passed invalid strings to the debug output, if command lines had many parameters [FS#6576] (r27884, r27883)
1.7.1 (2017-06-13)
------------------------------------------------------------------------
(None)
1.7.1-RC1 (2017-05-04)
------------------------------------------------------------------------
- Fix: Add missing game script event for ships arriving at a station [FS#6560] (r27859, r27858)
- Fix: StringID truncation to 16 bits broke string remapping test [FS#6555] (r27851)
- Fix: Infinite loop in pathfinder when checking safe waiting position from a waypoint [FS#5926] (r27846)
- Fix: [YAPF] Consider depot as destination before reversing path and applying penalty (r27843)
- Fix: Don't consider locks or ship depots as clear water when placing industries (r27841)
- Fix: Small news window's fake caption was not sized to fit its text (r27838)
- Fix: Black remap did nothing in 8bpp-simple blitter (r27837)
- Fix: Misaligned resize icon due to widget bounds being inclusive (r27831)
- Fix: Update viewport sign dimensions when changing GUI zoom level (r27827, r27819)
- Fix: Vehicle viewport is not user scrollable so flag window as such (r27823)
- Fix: Allow dropdown to be drawn above origin widget even with scrollbar (r27820)
- Fix: 32bpp-anim blitters assumed that pitch and width of the screen were equal [FS#6545] (r27796)
- Fix: Chat text background overflowed due to missing padding [FS#6526] (r27794)
- Fix: Failed to load lzo compressed savegames sometimes [FS#6450] (r27793)
- Fix: [Win32] Mark OpenTTD as DPI-aware to avoid OS window scaling that breaks mouse input [FS#6366] (r27791, r27790)
- Fix: [NewGRF] Get vehicle load amount after executing new cargo trigger [FS#6536] (r27788)
- Fix: AI configuration changed incorrect parameter when some parameters are hidden [FS#6479] (r27787, r27786)
- Fix: Buoys not always drawn after being placed depending on zoom level [FS#6508] (r27785)
- Fix: Allow rail conversion even if ship is on tile [FS#6505] (r27784)
1.7.0 (2017-04-01)
------------------------------------------------------------------------
(None)
1.7.0-RC1 (2017-03-11)
------------------------------------------------------------------------
- Feature: [NewGRF] Extend the DCxx range to D800-DFFF (r27769)
- Feature: [NewGRF, script] Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k (r27758)
- Feature: [NewGRF] CB 37 results 0x0401 and 0x0800-0BFF for improved control of display of input cargos in the industry GUI (r27751)
- Feature: Sprites missing in outdated basesets are now provided by openttd.grf (r27732, r27731, r27730)
- Feature: [NewGRF] String command 9A 1E to print the name of a cargo type (r27707, r27706)
- Feature: [Debug] Assign descriptive names to threads [FS#6471] (r27674, r27673, r27670)
- Feature: [NewGRF] Allow composing vehicles from multiple sprites (r27668)
- Change: Enable realistic train and road vehicle acceleration by default (r27760)
- Change: Hide the drive-in stops from the tram station picker (r27734)
- Change: Do not count static NewGRF when checking for the maximum number of NewGRFs in a game (r27729)
- Change: Limit waypoint area by maximum station spread during dragging (r27710)
- Change: [Build] Re-enable Wnarrowing for gcc 4.9+ [FS#6532] (r27709, r27703)
- Change: List railtype of rail tiles explicitly in the tile info window (r27686)
- Change: Re-arrange the autoreplace GUI for trains, and do not filter it by railtype by default (r27683)
- Change: Various performance improvements to CargoDist and LinkGraphs (r27682, r27681, r27614, r27613, r27612, r27611)
- Change: Improve randomisation of rough land appearance (r27657)
- Change: [Build] Enable C++11 for clang 3.3 (r27654)
- Fix: Insufficient thread synchronisation when switching blitters lead to crashes [FS#6510] (r27775)
- Fix: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows [FS#5889] (r27774)
- Fix: Intro games other than the traditional nightly one would cause townname NewGRFs to not get activated in the game options [FS#5819] (r27772)
- Fix: Some variables were not reset between loading old savegames, which made loading them fail [FS#6540] (r27770)
- Fix: Removing secondary roadtypes from bridges was factor 2 too cheap [FS#6538] (r27746)
- Fix: Extra viewports did not center on the selected tile [FS#6537] (r27743)
- Fix: [Build] Building on newer OSX versions with newer SDKs [FS#6295, FS#6502] (r27727, r27675)
- Fix: Improve error message when trying to build rail track over a depot (r27726)
- Fix: Rescanning NewGRF in-game could break the loaded NewGRF, if very many NewGRF were in use (r27721)
- Fix: Text could overflow various GUI elements [FS#6527] (r27713)
- Fix: Memory leak when reloading NewGRF (r27690, r27688, r27687)
- Fix: When removing objects of bankrupt companies the tiles may revert to canal. In that case also check the ownership of the canal [FS#6511] (r27656)
- Fix: Make the console file commands operate independent of the save/load GUI (r27645)
- Fix: When dragging vehicles in group or depot GUI, draw the complete articulated vehicle (r27632)
- Fix: When dragging multiple vehicles in the depot, make the destination gap as long as the chain instead of just considering the first vehicle (r27629)
- Fix: [Build] Change the GCC version detection so that it works with two-digit and truncated versions [FS#6487] (r27623, r27616)
- Fix: Do not hide filtered and highlighted industries by overlapping tiles in the zoomed-out smallmap (r27622, r27621, r27620)
- Fix: [Script] Kill scripts, when a non-suspendable valuator call takes way too long [FS#6473] (r27594)
1.6.1 (2016-07-01)
------------------------------------------------------------------------
- Fix: Compilation and optimisation issues with GCC6 (r27606, r27605, r27595)

View File

@@ -1285,7 +1285,7 @@ make_compiler_cflags() {
# -W alone doesn't enable all warnings enabled by -Wall; on the other hand,
# -Weverything enables too many useless warnings that can't be disabled (as of 3.0)
flags="$flags -Wall -W"
flags="$flags -Wall -W -Wextra"
# warning: unused parameter '...'
flags="$flags -Wno-unused-parameter"
@@ -1326,13 +1326,20 @@ make_compiler_cflags() {
flags="$flags -Wno-unused-variable"
fi
if [ "$cc_version" -ge "33" ]; then
# clang completed C++11 support in version 3.3
flags="$flags -std=c++11"
fi
# rdynamic is used to get useful stack traces from crash reports.
ldflags="$ldflags -rdynamic"
else
# Enable some things only for certain GCC versions
cc_version=`$1 -dumpversion | cut -c 1,3`
# cc_version = major_version * 100 + minor_version
# For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305
cc_version=`$1 -dumpversion | $awk -F . '{printf "%d%02d", $1, $2}'`
if [ $cc_version -lt 33 ]; then
if [ $cc_version -lt 303 ]; then
log 1 "configure: error: gcc older than 3.3 can't compile OpenTTD because of its poor template support"
exit 1
fi
@@ -1345,20 +1352,20 @@ make_compiler_cflags() {
if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
flags="$flags -Wno-unused-variable"
if [ $cc_version -ge 46 ]; then
if [ $cc_version -ge 406 ]; then
# GCC 4.6 gives more warnings, disable them too
flags="$flags -Wno-unused-but-set-variable"
flags="$flags -Wno-unused-but-set-parameter"
fi
fi
if [ $cc_version -ge 34 ]; then
if [ $cc_version -ge 304 ]; then
# Warn when a variable is used to initialise itself:
# int a = a;
flags="$flags -Winit-self"
fi
if [ $cc_version -ge 40 ]; then
if [ $cc_version -ge 400 ]; then
# GCC 4.0+ complains about that we break strict-aliasing.
# On most places we don't see how to fix it, and it doesn't
# break anything. So disable strict-aliasing to make the
@@ -1369,7 +1376,7 @@ make_compiler_cflags() {
flags="$flags -Wcast-qual"
fi
if [ $cc_version -ge 42 ]; then
if [ $cc_version -ge 402 ]; then
# GCC 4.2+ automatically assumes that signed overflows do
# not occur in signed arithmetics, whereas we are not
# sure that they will not happen. It furthermore complains
@@ -1380,28 +1387,31 @@ make_compiler_cflags() {
flags="$flags -Wnon-virtual-dtor"
fi
if [ $cc_version -ge 43 ] && [ $cc_version -lt 60 ]; then
if [ $cc_version -ge 403 ] && [ $cc_version -lt 600 ]; then
# Use gnu++0x mode so static_assert() is available.
# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
cxxflags="$cxxflags -std=gnu++0x"
fi
if [ $cc_version -eq 45 ]; then
if [ $cc_version -eq 405 ]; then
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680
flags="$flags -fno-tree-vrp"
fi
if [ $cc_version -ge 47 ]; then
if [ $cc_version -eq 407 ]; then
# Disable -Wnarrowing which gives many warnings, such as:
# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
# They are valid according to the C++ standard, but useless.
cxxflags="$cxxflags -Wno-narrowing"
fi
if [ $cc_version -ge 407 ]; then
# Disable bogus 'attempt to free a non-heap object' warning
flags="$flags -Wno-free-nonheap-object"
fi
if [ $cc_version -ge 60 ]; then
if [ $cc_version -ge 600 ]; then
# -flifetime-dse=2 (default since GCC 6) doesn't play
# well with our custom pool item allocator
cxxflags="$cxxflags -flifetime-dse=1 -std=gnu++14"
@@ -1412,7 +1422,7 @@ make_compiler_cflags() {
has_lto=`$1 -dumpspecs | grep '\%{flto'`
if [ -n "$has_lto" ]; then
# Use LTO only if we see LTO exists and is requested
if [ $cc_version -lt 46 ]; then
if [ $cc_version -lt 406 ]; then
flags="$flags -flto"
else
flags="$flags -flto=jobserver"
@@ -1511,7 +1521,7 @@ make_cflags_and_ldflags() {
fi
fi
if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
if [ "$os" = "OSX" ] && [ $cc_version -eq 400 ]; then
# Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization,
# wrongly optimizing ^= in loops. This disables the failing optimisation.
CFLAGS="$CFLAGS -fno-expensive-optimizations"
@@ -1535,7 +1545,7 @@ make_cflags_and_ldflags() {
LDFLAGS="$LDFLAGS -mwin32"
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
if [ $cc_version -lt 46 ]; then
if [ $cc_version -lt 406 ]; then
flags="$flags -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
fi
@@ -1548,10 +1558,10 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32"
if [ $cc_version -ge 44 ]; then
if [ $cc_version -ge 404 ]; then
LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
fi
if [ $cc_version -ge 47 ]; then
if [ $cc_version -ge 407 ]; then
CFLAGS="$CFLAGS -mno-ms-bitfields"
fi
fi
@@ -1601,23 +1611,6 @@ make_cflags_and_ldflags() {
CFLAGS="$OSX_SYSROOT $CFLAGS"
LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS"
fi
if [ "$enable_universal" = "0" ] && [ $cc_version -gt 40 ]; then
# Only set the min version when not doing an universal build.
# Universal builds set the version elsewhere.
if [ "$cpu_type" = "64" ]; then
CFLAGS="$CFLAGS -mmacosx-version-min=10.5"
else
gcc_cpu=`$cc_host -dumpmachine`
if [ "`echo $gcc_cpu | cut -c 1-3`" = "ppc" -o "`echo $gcc_cpu | cut -c 1-7`" = "powerpc" ]; then
# PowerPC build can run on 10.3
CFLAGS="$CFLAGS -mmacosx-version-min=10.3"
else
# Intel is only available starting from 10.4
CFLAGS="$CFLAGS -mmacosx-version-min=10.4"
fi
fi
fi
fi
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ]; then
@@ -1780,7 +1773,7 @@ make_cflags_and_ldflags() {
# GCC 4.0+ doesn't like the DirectX includes (gives tons of
# warnings on it we won't be able to fix). For now just
# suppress those warnings.
if [ $cc_version -ge 40 ]; then
if [ $cc_version -ge 400 ]; then
CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
fi
fi

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2016-07-01
Release version: 1.6.1
Last updated: 2017-12-24
Release version: 1.7.2
------------------------------------------------------------------------

View File

@@ -11,21 +11,21 @@ palette = DOS
!! description STR_BASEGRAPHICS_DOS_DESCRIPTION
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF =
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
ORIG_EXTRA.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

View File

@@ -11,21 +11,21 @@ palette = DOS
!! description STR_BASEGRAPHICS_DOS_DE_DESCRIPTION
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF =
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
ORIG_EXTRA.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

View File

@@ -11,21 +11,21 @@ palette = Windows
!! description STR_BASEGRAPHICS_WIN_DESCRIPTION
[files]
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = OPENTTD.GRF
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = ORIG_EXTRA.GRF
[md5s]
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF =
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
ORIG_EXTRA.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.

View File

@@ -6,7 +6,7 @@
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Canal graphics by George / PaulC"
-1 * 0 0C "Canal graphics by George"
-1 * 3 05 08 41
// Canal slopes
-1 sprites/canal_locks.png 8bpp 66 8 64 23 -31 0 normal
@@ -77,95 +77,3 @@
-1 sprites/canals.png 8bpp 446 10 24 16 -11 -6 normal
// Canal icon
-1 sprites/canal_locks.png 8bpp 50 232 20 20 0 0 normal
// Differentiation for the climates starts here
// Canal edges (arctic snowy)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 40 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 40 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 40 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 40 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 40 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 40 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 40 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 40 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 40 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 40 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 40 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 40 24 16 -11 -6 normal
-1 * 7 02 05 10 01 00 00 00
// Canal edges (arctic normal)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 70 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 70 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 70 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 70 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 70 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 70 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 70 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 70 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 70 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 70 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 70 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 70 24 16 -11 -6 normal
-1 * 7 02 05 11 01 00 00 00
// Choose the right arctic canal edges
-1 * 14 02 05 12 81 81 00 FF 01 10 00 04 04 11 00
-1 * 6 07 83 01 \7! 01 01
-1 * 7 03 05 01 02 00 12 00
// Canal edges (tropic desert)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 100 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 100 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 100 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 100 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 100 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 100 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 100 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 100 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 100 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 100 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 100 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 100 24 16 -11 -6 normal
-1 * 7 02 05 13 01 00 00 00
// Canal edges (tropic rainforest)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 130 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 130 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 130 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 130 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 130 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 130 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 130 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 130 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 130 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 130 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 130 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 130 24 16 -11 -6 normal
-1 * 7 02 05 14 01 00 00 00
// Choose the right tropic canal edges
-1 * 14 02 05 15 81 81 00 FF 01 13 00 01 01 14 00
-1 * 6 07 83 01 \7! 02 01
-1 * 7 03 05 01 02 00 15 00
// Canal edges (toyland)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 160 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 160 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 160 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 160 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 160 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 160 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 160 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 160 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 160 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 160 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 160 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 160 24 16 -11 -6 normal
-1 * 7 02 05 16 01 00 00 00
-1 * 6 07 83 01 \7! 03 01
-1 * 7 03 05 01 02 00 16 00

View File

@@ -0,0 +1,101 @@
//
// $Id$
//
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Extra canal graphics by PaulC"
// Differentiation for the climates starts here
// Canal edges (arctic snowy)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 40 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 40 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 40 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 40 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 40 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 40 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 40 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 40 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 40 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 40 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 40 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 40 24 16 -11 -6 normal
-1 * 7 02 05 10 01 00 00 00
// Canal edges (arctic normal)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 70 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 70 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 70 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 70 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 70 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 70 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 70 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 70 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 70 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 70 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 70 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 70 24 16 -11 -6 normal
-1 * 7 02 05 11 01 00 00 00
// Choose the right arctic canal edges
-1 * 14 02 05 12 81 81 00 FF 01 10 00 04 04 11 00
-1 * 6 07 83 01 \7! 01 01
-1 * 7 03 05 01 02 00 12 00
// Canal edges (tropic desert)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 100 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 100 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 100 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 100 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 100 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 100 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 100 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 100 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 100 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 100 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 100 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 100 24 16 -11 -6 normal
-1 * 7 02 05 13 01 00 00 00
// Canal edges (tropic rainforest)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 130 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 130 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 130 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 130 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 130 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 130 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 130 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 130 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 130 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 130 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 130 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 130 24 16 -11 -6 normal
-1 * 7 02 05 14 01 00 00 00
// Choose the right tropic canal edges
-1 * 14 02 05 15 81 81 00 FF 01 13 00 01 01 14 00
-1 * 6 07 83 01 \7! 02 01
-1 * 7 03 05 01 02 00 15 00
// Canal edges (toyland)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 160 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 160 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 160 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 160 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 160 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 160 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 160 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 160 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 160 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 160 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 160 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 160 24 16 -11 -6 normal
-1 * 7 02 05 16 01 00 00 00
-1 * 6 07 83 01 \7! 03 01
-1 * 7 03 05 01 02 00 16 00

View File

@@ -8,245 +8,7 @@
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
// Replace original characters
-1 * 5 0A 01 02 41 00
-1 sprites/chars.png 8bpp 10 10 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 10 4 12 0 -1 normal
-1 * 5 0A 01 02 86 00
-1 sprites/chars.png 8bpp 50 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 10 9 12 0 -1 normal
-1 * 5 0A 01 01 8A 00
-1 sprites/chars.png 8bpp 120 10 6 12 0 -1 normal
-1 * 5 0A 01 01 A0 00
-1 sprites/chars.png 8bpp 230 10 10 12 0 -1 normal
-1 * 5 0A 01 04 A2 00
-1 sprites/chars.png 8bpp 260 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 290 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 350 10 8 12 0 -1 normal
-1 * 5 0A 01 06 A7 00
-1 sprites/chars.png 8bpp 410 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 440 10 12 12 0 -1 normal
-1 sprites/chars.png 8bpp 470 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 480 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 500 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 520 10 7 12 0 -1 normal
-1 * 5 0A 01 03 AE 00
-1 sprites/chars.png 8bpp 560 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 570 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 580 10 5 12 0 -1 normal
-1 * 5 0A 01 05 B3 00
-1 sprites/chars.png 8bpp 620 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 640 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 660 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 680 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 700 10 9 12 0 -1 normal
-1 * 5 0A 01 03 BB 00
-1 sprites/chars.png 8bpp 770 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 70 8 12 0 -1 normal
-1 * 5 0A 01 01 BF 00
-1 sprites/chars.png 8bpp 70 70 9 12 0 -1 normal
-1 * 5 0A 01 05 C1 00
-1 sprites/chars.png 8bpp 450 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 120 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 140 70 6 12 0 -1 normal
-1 * 5 0A 01 01 C7 00
-1 sprites/chars.png 8bpp 160 70 6 12 0 -1 normal
-1 * 5 0A 01 03 CA 00
-1 sprites/chars.png 8bpp 200 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 70 6 12 0 -1 normal
-1 * 5 0A 01 04 CE 00
-1 sprites/chars.png 8bpp 230 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 240 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 70 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 260 70 5 12 0 -1 normal
-1 * 5 0A 01 05 D3 00
-1 sprites/chars.png 8bpp 290 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 310 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 330 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 340 70 6 12 0 -1 normal
-1 * 5 0A 01 03 DB 00
-1 sprites/chars.png 8bpp 390 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 400 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 410 70 6 12 0 -1 normal
-1 * 5 0A 01 02 DF 00
-1 sprites/chars.png 8bpp 420 70 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 430 70 6 12 0 -1 normal
-1 * 5 0A 01 01 22 01
-1 sprites/chars.png 8bpp 20 30 2 7 0 0 normal
-1 * 5 0A 01 01 7D 01
-1 sprites/chars.png 8bpp 220 30 4 7 0 0 normal
-1 * 5 0A 01 02 80 01
-1 sprites/chars.png 8bpp 230 30 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 30 3 7 0 0 normal
-1 * 5 0A 01 01 89 01
-1 sprites/chars.png 8bpp 470 30 3 7 0 0 normal
-1 * 5 0A 01 01 9F 01
-1 sprites/chars.png 8bpp 70 90 3 7 0 0 normal
-1 * 5 0A 01 01 A9 01
-1 sprites/chars.png 8bpp 190 90 3 7 0 0 normal
-1 * 5 0A 01 02 BF 01
-1 sprites/chars.png 8bpp 420 90 3 7 0 0 normal
-1 sprites/chars.png 8bpp 430 90 3 7 0 0 normal
-1 * 5 0A 01 01 02 02
-1 sprites/chars.png 8bpp 20 40 4 21 0 -2 normal
-1 * 5 0A 01 01 41 02
-1 sprites/chars.png 8bpp 30 40 14 21 0 -2 normal
-1 * 5 0A 01 06 46 02
-1 sprites/chars.png 8bpp 50 40 10 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 40 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 100 40 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 120 40 7 21 0 -2 normal
-1 sprites/chars.png 8bpp 130 40 16 21 0 -2 normal
-1 * 5 0A 01 01 50 02
-1 sprites/chars.png 8bpp 150 40 16 21 0 -2 normal
-1 * 5 0A 01 04 52 02
-1 sprites/chars.png 8bpp 170 40 8 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 190 40 6 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 40 6 21 0 -2 normal
-1 * 5 0A 01 01 5C 02
-1 sprites/chars.png 8bpp 210 40 7 21 0 -2 normal
-1 * 5 0A 01 01 60 02
-1 sprites/chars.png 8bpp 230 40 16 21 0 -2 normal
-1 * 5 0A 01 07 62 02
-1 sprites/chars.png 8bpp 260 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 320 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 350 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 380 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 410 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 440 40 24 21 0 -2 normal
-1 * 5 0A 01 18 6A 02
-1 sprites/chars.png 8bpp 480 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 500 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 520 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 540 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 560 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 570 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 580 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 590 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 600 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 620 40 18 21 0 -2 normal
-1 sprites/chars.png 8bpp 640 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 660 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 680 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 700 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 720 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 740 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 750 40 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 770 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 10 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 450 100 14 21 0 -2 normal
-1 * 5 0A 01 01 85 02
-1 sprites/chars.png 8bpp 140 100 12 21 0 -2 normal
-1 * 5 0A 01 01 88 02
-1 sprites/chars.png 8bpp 170 100 19 21 0 -2 normal
-1 * 5 0A 01 02 92 02
-1 sprites/chars.png 8bpp 270 100 11 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 100 15 21 0 -2 normal
-1 * 5 0A 01 01 97 02
-1 sprites/chars.png 8bpp 340 100 11 21 0 -2 normal
-1 * 5 0A 01 02 99 02
-1 sprites/chars.png 8bpp 360 100 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 370 100 11 21 0 -2 normal
-1 * 5 0A 01 01 A0 02
-1 sprites/chars.png 8bpp 430 100 14 21 0 -2 normal
// New characters, all fonts except monospaced
// U+007B: Left Curly Bracket
// U+007C: Vertical Line
// U+007D: Right Curly Bracket
// U+007E: Tilde
-1 * 14 12 03 00 04 7B 00 01 04 7B 00 02 04 7B 00
-1 sprites/chars.png 8bpp 10 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 50 130 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 20 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 30 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 50 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 10 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 20 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 160 10 21 0 -2 normal
// U+007F: No-Break Space
-1 * 14 12 03 00 01 7F 00 01 01 7F 00 02 01 7F 00
-1 sprites/chars.png 8bpp 70 130 2 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 70 160 5 21 0 -2 normal
// U+00AA: Feminine Ordinal Indicator
-1 * 14 12 03 00 01 AA 00 01 01 AA 00 02 01 AA 00
-1 sprites/chars.png 8bpp 80 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 80 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 80 160 7 21 0 -2 normal
// U+00AC: Not Sign
// U+00AD: Soft Hyphen
-1 * 14 12 03 00 02 AC 00 01 02 AC 00 02 02 AC 00
-1 sprites/chars.png 8bpp 90 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 90 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 110 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 90 160 12 21 0 -2 normal
-1 sprites/chars.png 8bpp 110 160 9 21 0 -2 normal
// U+00AF: Macron
-1 * 14 12 03 00 01 AF 00 01 01 AF 00 02 01 AF 00
-1 sprites/chars.png 8bpp 130 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 130 160 12 21 0 -2 normal
// U+00B4: Acute Accent
// U+00B5: Micro Sign
// U+00B6: Pilcrow Sign
// U+00B7: Middle Dot
// U+00B8: Cedilla
// U+00B9: Superscript One
-1 * 14 12 03 00 06 B4 00 01 06 B4 00 02 06 B4 00
-1 sprites/chars.png 8bpp 150 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 160 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 180 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 200 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 150 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 160 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 180 150 6 7 0 0 normal
-1 sprites/chars.png 8bpp 200 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 210 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 220 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 150 160 4 21 0 -2 normal
-1 sprites/chars.png 8bpp 160 160 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 160 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 210 160 5 21 0 -2 normal
-1 sprites/chars.png 8bpp 220 160 6 21 0 -2 normal
// U+00BC: Vulgar Fraction One Quarter
// U+00BD: Vulgar Fraction One Half
-1 * 14 12 03 00 02 BC 00 01 02 BC 00 02 02 BC 00
-1 sprites/chars.png 8bpp 230 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 230 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 230 160 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 250 160 16 21 0 -2 normal
// Note: Characters in range U+0020..U+00FF may only be defined in chars_orig_extra.nfo.
// New characters, all fonts

View File

@@ -0,0 +1,249 @@
//
// $Id$
//
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
// Replace original characters
-1 * 5 0A 01 02 41 00
-1 sprites/chars.png 8bpp 10 10 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 10 4 12 0 -1 normal
-1 * 5 0A 01 02 86 00
-1 sprites/chars.png 8bpp 50 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 10 9 12 0 -1 normal
-1 * 5 0A 01 01 8A 00
-1 sprites/chars.png 8bpp 120 10 6 12 0 -1 normal
-1 * 5 0A 01 01 A0 00
-1 sprites/chars.png 8bpp 230 10 10 12 0 -1 normal
-1 * 5 0A 01 04 A2 00
-1 sprites/chars.png 8bpp 260 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 290 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 350 10 8 12 0 -1 normal
-1 * 5 0A 01 06 A7 00
-1 sprites/chars.png 8bpp 410 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 440 10 12 12 0 -1 normal
-1 sprites/chars.png 8bpp 470 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 480 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 500 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 520 10 7 12 0 -1 normal
-1 * 5 0A 01 03 AE 00
-1 sprites/chars.png 8bpp 560 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 570 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 580 10 5 12 0 -1 normal
-1 * 5 0A 01 05 B3 00
-1 sprites/chars.png 8bpp 620 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 640 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 660 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 680 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 700 10 9 12 0 -1 normal
-1 * 5 0A 01 03 BB 00
-1 sprites/chars.png 8bpp 770 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 70 8 12 0 -1 normal
-1 * 5 0A 01 01 BF 00
-1 sprites/chars.png 8bpp 70 70 9 12 0 -1 normal
-1 * 5 0A 01 05 C1 00
-1 sprites/chars.png 8bpp 450 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 120 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 140 70 6 12 0 -1 normal
-1 * 5 0A 01 01 C7 00
-1 sprites/chars.png 8bpp 160 70 6 12 0 -1 normal
-1 * 5 0A 01 03 CA 00
-1 sprites/chars.png 8bpp 200 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 70 6 12 0 -1 normal
-1 * 5 0A 01 04 CE 00
-1 sprites/chars.png 8bpp 230 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 240 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 70 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 260 70 5 12 0 -1 normal
-1 * 5 0A 01 05 D3 00
-1 sprites/chars.png 8bpp 290 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 310 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 330 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 340 70 6 12 0 -1 normal
-1 * 5 0A 01 03 DB 00
-1 sprites/chars.png 8bpp 390 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 400 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 410 70 6 12 0 -1 normal
-1 * 5 0A 01 02 DF 00
-1 sprites/chars.png 8bpp 420 70 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 430 70 6 12 0 -1 normal
-1 * 5 0A 01 01 22 01
-1 sprites/chars.png 8bpp 20 30 2 7 0 0 normal
-1 * 5 0A 01 01 7D 01
-1 sprites/chars.png 8bpp 220 30 4 7 0 0 normal
-1 * 5 0A 01 02 80 01
-1 sprites/chars.png 8bpp 230 30 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 30 3 7 0 0 normal
-1 * 5 0A 01 01 89 01
-1 sprites/chars.png 8bpp 470 30 3 7 0 0 normal
-1 * 5 0A 01 01 9F 01
-1 sprites/chars.png 8bpp 70 90 3 7 0 0 normal
-1 * 5 0A 01 01 A9 01
-1 sprites/chars.png 8bpp 190 90 3 7 0 0 normal
-1 * 5 0A 01 02 BF 01
-1 sprites/chars.png 8bpp 420 90 3 7 0 0 normal
-1 sprites/chars.png 8bpp 430 90 3 7 0 0 normal
-1 * 5 0A 01 01 02 02
-1 sprites/chars.png 8bpp 20 40 4 21 0 -2 normal
-1 * 5 0A 01 01 41 02
-1 sprites/chars.png 8bpp 30 40 14 21 0 -2 normal
-1 * 5 0A 01 06 46 02
-1 sprites/chars.png 8bpp 50 40 10 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 40 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 100 40 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 120 40 7 21 0 -2 normal
-1 sprites/chars.png 8bpp 130 40 16 21 0 -2 normal
-1 * 5 0A 01 01 50 02
-1 sprites/chars.png 8bpp 150 40 16 21 0 -2 normal
-1 * 5 0A 01 04 52 02
-1 sprites/chars.png 8bpp 170 40 8 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 190 40 6 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 40 6 21 0 -2 normal
-1 * 5 0A 01 01 5C 02
-1 sprites/chars.png 8bpp 210 40 7 21 0 -2 normal
-1 * 5 0A 01 01 60 02
-1 sprites/chars.png 8bpp 230 40 16 21 0 -2 normal
-1 * 5 0A 01 07 62 02
-1 sprites/chars.png 8bpp 260 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 320 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 350 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 380 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 410 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 440 40 24 21 0 -2 normal
-1 * 5 0A 01 18 6A 02
-1 sprites/chars.png 8bpp 480 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 500 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 520 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 540 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 560 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 570 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 580 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 590 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 600 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 620 40 18 21 0 -2 normal
-1 sprites/chars.png 8bpp 640 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 660 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 680 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 700 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 720 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 740 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 750 40 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 770 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 10 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 450 100 14 21 0 -2 normal
-1 * 5 0A 01 01 85 02
-1 sprites/chars.png 8bpp 140 100 12 21 0 -2 normal
-1 * 5 0A 01 01 88 02
-1 sprites/chars.png 8bpp 170 100 19 21 0 -2 normal
-1 * 5 0A 01 02 92 02
-1 sprites/chars.png 8bpp 270 100 11 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 100 15 21 0 -2 normal
-1 * 5 0A 01 01 97 02
-1 sprites/chars.png 8bpp 340 100 11 21 0 -2 normal
-1 * 5 0A 01 02 99 02
-1 sprites/chars.png 8bpp 360 100 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 370 100 11 21 0 -2 normal
-1 * 5 0A 01 01 A0 02
-1 sprites/chars.png 8bpp 430 100 14 21 0 -2 normal
// New characters, all fonts except monospaced
// U+007B: Left Curly Bracket
// U+007C: Vertical Line
// U+007D: Right Curly Bracket
// U+007E: Tilde
-1 * 14 12 03 00 04 7B 00 01 04 7B 00 02 04 7B 00
-1 sprites/chars.png 8bpp 10 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 50 130 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 20 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 30 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 50 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 10 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 20 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 160 10 21 0 -2 normal
// U+007F: No-Break Space
-1 * 14 12 03 00 01 7F 00 01 01 7F 00 02 01 7F 00
-1 sprites/chars.png 8bpp 70 130 2 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 70 160 5 21 0 -2 normal
// U+00AA: Feminine Ordinal Indicator
-1 * 14 12 03 00 01 AA 00 01 01 AA 00 02 01 AA 00
-1 sprites/chars.png 8bpp 80 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 80 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 80 160 7 21 0 -2 normal
// U+00AC: Not Sign
// U+00AD: Soft Hyphen
-1 * 14 12 03 00 02 AC 00 01 02 AC 00 02 02 AC 00
-1 sprites/chars.png 8bpp 90 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 90 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 110 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 90 160 12 21 0 -2 normal
-1 sprites/chars.png 8bpp 110 160 9 21 0 -2 normal
// U+00AF: Macron
-1 * 14 12 03 00 01 AF 00 01 01 AF 00 02 01 AF 00
-1 sprites/chars.png 8bpp 130 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 130 160 12 21 0 -2 normal
// U+00B4: Acute Accent
// U+00B5: Micro Sign
// U+00B6: Pilcrow Sign
// U+00B7: Middle Dot
// U+00B8: Cedilla
// U+00B9: Superscript One
-1 * 14 12 03 00 06 B4 00 01 06 B4 00 02 06 B4 00
-1 sprites/chars.png 8bpp 150 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 160 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 180 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 200 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 150 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 160 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 180 150 6 7 0 0 normal
-1 sprites/chars.png 8bpp 200 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 210 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 220 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 150 160 4 21 0 -2 normal
-1 sprites/chars.png 8bpp 160 160 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 160 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 210 160 5 21 0 -2 normal
-1 sprites/chars.png 8bpp 220 160 6 21 0 -2 normal
// U+00BC: Vulgar Fraction One Quarter
// U+00BD: Vulgar Fraction One Half
-1 * 14 12 03 00 02 BC 00 01 02 BC 00 02 02 BC 00
-1 sprites/chars.png 8bpp 230 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 230 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 230 160 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 250 160 16 21 0 -2 normal

View File

@@ -60,10 +60,11 @@
00
// GRF ID, must start with FF so it gets ignored
-1 * 0 08 08 FF "OTT"
//@@WARNING DISABLE 101
-1 * 0 08 08 FF FF FF FE
// Name of the GRF
"OpenTTD's base graphics " 00
"OpenTTD's default and fallback extra graphics" 00
// Description of the GRF.
"License: GNU General Public License version 2" 0D
@@ -86,7 +87,6 @@
#include "canals.nfo"
#include "oneway.nfo"
#include "tramtracks.nfo"
#include "shore.nfo"
#include "sloped_tracks.nfo"
#include "airports.nfo"
#include "roadstops.nfo"
@@ -97,11 +97,5 @@
#include "airport_preview.nfo"
#include "chars.nfo"
#include "mono.nfo"
#include "fix_graphics.nfo"
#include "rivers/rapids.nfo"
#include "rivers/temperate.nfo"
#include "rivers/arctic.nfo"
#include "rivers/tropic.nfo"
#include "rivers/toyland.nfo"
#include "tunnel_portals.nfo"
#include "palette.nfo"

View File

@@ -0,0 +1,86 @@
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 32)
// Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags
//
// $Id$
//
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
// Sources for extra graphics to complement the original graphics.
// Checks whether the correct version of OpenTTD is used before
// allowing it to be used.
//
//
// Number of sprites, it is wrong, but GRFcodec automagically gets it right.
//
0 * 4 00 00 00 00
//
// Check whether we are running OTTD or not.
//
-1 * 0 07 9D 04 \7= 01 00 00 00 01
-1 * 0 0B 03 7F FF 80 " is not for TTDPatch. Use ttdpatch(w).grf." 00
//
// Check for OTTD's version number
//
// First step... Variable A1 might not exist. If that's the case it always
// skips. As we do not want to skip out of the whole testing, we skip over
// the real version check.
-1 * 0 07 A1 04 \7= FF FF FF FF 02
// Real version check.
-1 * 0 07 A1 04 \7> \w20304 01 01 03
// If the version check is supported, the string is translateable via OpenTTD
// itself. Use it!.
-1 * 0 0B 03 7F 06 "1.1 (or trunk r20304)" 00
// Some OTTD versions before r11130 did support Action B, so use the English
// phrase there
-1 * 0 0B 03 7F FF "Requires OpenTTD version 1.1 (or trunk r20304) or better." 00
// Final fallback. No Action B support, just skip to the end of the file.
-1 * 0 07 A1 04 \7= FF FF FF FF 00
// We are a DOS paletted NewGRF, so tell OpenTTD that. Then it can actually
// do the right thing. Yay for that feature as that means no duplicate NewGRF!
-1 * 0 14
"C" "INFO"
"B" "PALS" \w1 "D"
00
00
// GRF ID, must start with FF so it gets ignored
//@@WARNING DISABLE 101
-1 * 0 08 08 FF "OTT"
// Name of the GRF
"Original baseset extra graphics" 00
// Description of the GRF.
"License: GNU General Public License version 2" 0D
"Andrew Parkhouse: rivers" 0D
"Addi and PaulC: original graphics fixes" 0D
"OpenTTD developers: other graphics" 00
//
// The real data of the GRF is acquired from several subfiles.
//
#include "chars_orig_extra.nfo"
#include "shore.nfo"
#include "fix_graphics.nfo"
#include "canals_extra.nfo"
#include "rivers/rapids.nfo"
#include "rivers/temperate.nfo"
#include "rivers/arctic.nfo"
#include "rivers/tropic.nfo"
#include "rivers/toyland.nfo"

View File

@@ -1,3 +1,39 @@
openttd (1.7.2-0) unstable; urgency=low
* New upstream release 1.7.2
-- OpenTTD <info@openttd.org> Sun, 24 Dec 2017 14:00:00 +0100
openttd (1.7.2~RC1-0) unstable; urgency=low
* New upstream release 1.7.2-RC1
-- OpenTTD <info@openttd.org> Mon, 11 Dec 2017 21:30:00 +0100
openttd (1.7.1-0) unstable; urgency=low
* New upstream release 1.7.1
-- OpenTTD <info@openttd.org> Tue, 13 Jun 2017 21:00:00 +0200
openttd (1.7.1~RC1-0) unstable; urgency=low
* New upstream release 1.7.1-RC1
-- OpenTTD <info@openttd.org> Thu, 04 Mai 2017 21:00:00 +0200
openttd (1.7.0-0) unstable; urgency=low
* New upstream release 1.7.0
-- OpenTTD <info@openttd.org> Sat, 01 Apr 2017 19:00:00 +0200
openttd (1.7.0~RC1-0) unstable; urgency=low
* New upstream release 1.7.0-RC1
-- OpenTTD <info@openttd.org> Sat, 11 Mar 2017 22:30:00 +0100
openttd (1.6.1-0) unstable; urgency=low
* New upstream release 1.6.1

View File

@@ -5,7 +5,7 @@ Source: http://www.openttd.org
Files: *
Copyright: © 2004-2012 Ludvig Strigeous and others.
Copyright: © 2004-2017 Ludvig Strigeous and others.
License: GPL-2.0
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.0 as

View File

@@ -1,6 +1,6 @@
@echo off
set OPENTTD_VERSION=1.6.0
set OPENTTD_VERSION=1.7.0
set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=1.2.0

View File

@@ -2,7 +2,7 @@
# spec file for package openttd
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007-2012 The OpenTTD developers
# Copyright (c) 2007-2017 The OpenTTD developers
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.6.beta1
Version: 1.7.beta1
Release: 0
%define srcver 1.6.0-beta1
%define srcver 1.7.0-beta1
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0
Group: Amusements/Games/Strategy/Other

View File

@@ -1,7 +1,7 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 6
!define APPV_MAINT 1
!define APPV_MINOR 7
!define APPV_MAINT 2
!define APPV_BUILD 1
!define APPV_EXTRA ""
@@ -408,6 +408,7 @@ Section "Uninstall"
; Baseset files
Delete "$INSTDIR\baseset\opntitle.dat"
Delete "$INSTDIR\baseset\openttd.grf"
Delete "$INSTDIR\baseset\orig_extra.grf"
Delete "$INSTDIR\baseset\orig_win.obg"
Delete "$INSTDIR\baseset\orig_dos.obg"
Delete "$INSTDIR\baseset\orig_dos_de.obg"

View File

@@ -0,0 +1,7 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" >
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
</windowsSettings>
</application>
</assembly>

View File

@@ -145,6 +145,9 @@
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -188,6 +191,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -244,6 +250,9 @@
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -289,6 +298,9 @@
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\airport.cpp" />

View File

@@ -145,6 +145,9 @@
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -188,6 +191,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -244,6 +250,9 @@
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -289,6 +298,9 @@
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!

View File

@@ -151,6 +151,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -198,6 +201,9 @@
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -257,6 +263,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -306,6 +315,9 @@
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\airport.cpp" />

View File

@@ -151,6 +151,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -198,6 +201,9 @@
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -257,6 +263,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -306,6 +315,9 @@
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!

View File

@@ -1,5 +1,5 @@
Last updated: 2016-07-01
Release version: 1.6.1
Last updated: 2017-12-24
Release version: 1.7.2
------------------------------------------------------------------------

View File

@@ -2,6 +2,7 @@
#ifndef _SQOBJECT_H_
#define _SQOBJECT_H_
#include <limits>
#include "squtils.h"
#define SQ_CLOSURESTREAM_HEAD (('S'<<24)|('Q'<<16)|('I'<<8)|('R'))

View File

@@ -306,7 +306,6 @@ struct AISettingsWindow : public Window {
timeout(0)
{
this->ai_config = GetConfig(slot);
this->RebuildVisibleSettings();
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_AIS_SCROLLBAR);
@@ -314,7 +313,7 @@ struct AISettingsWindow : public Window {
this->SetWidgetDisabledState(WID_AIS_RESET, _game_mode != GM_MENU && Company::IsValidID(this->slot));
this->vscroll->SetCount((int)this->visible_settings.size());
this->RebuildVisibleSettings();
}
virtual void SetStringParameters(int widget) const
@@ -342,6 +341,8 @@ struct AISettingsWindow : public Window {
visible_settings.push_back(&(*it));
}
}
this->vscroll->SetCount((int)this->visible_settings.size());
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
@@ -530,21 +531,23 @@ struct AISettingsWindow : public Window {
virtual void OnQueryTextFinished(char *str)
{
if (StrEmpty(str)) return;
ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
for (int i = 0; i < this->clicked_row; i++) it++;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
const ScriptConfigItem config_item = **it;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return;
int32 value = atoi(str);
this->ai_config->SetSetting((*it).name, value);
this->ai_config->SetSetting(config_item.name, value);
this->SetDirty();
}
virtual void OnDropdownSelect(int widget, int index)
{
assert(this->clicked_dropdown);
ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
for (int i = 0; i < this->clicked_row; i++) it++;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
this->ai_config->SetSetting((*it).name, index);
const ScriptConfigItem config_item = **it;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return;
this->ai_config->SetSetting(config_item.name, index);
this->SetDirty();
}

View File

@@ -28,7 +28,7 @@ static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 ||
strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0;
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0;
}
#if defined(WIN32)

View File

@@ -93,7 +93,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
void UpdateDeltaXY(Direction direction);
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; }
bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); }
SpriteID GetImage(Direction direction, EngineImageType image_type) const;
void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
int GetDisplaySpeed() const { return this->cur_speed; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
int GetSpeedOldUnits() const { return this->vcache.cached_max_speed * 10 / 128; }
@@ -141,7 +141,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
*/
#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var)
SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type);
void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result);
Station *GetTargetAirportIfValid(const Aircraft *v);

View File

@@ -152,64 +152,69 @@ static StationID FindNearestHangar(const Aircraft *v)
return index;
}
SpriteID Aircraft::GetImage(Direction direction, EngineImageType image_type) const
void Aircraft::GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const
{
uint8 spritenum = this->spritenum;
if (is_custom_sprite(spritenum)) {
SpriteID sprite = GetCustomVehicleSprite(this, direction, image_type);
if (sprite != 0) return sprite;
GetCustomVehicleSprite(this, direction, image_type, result);
if (result->IsValid()) return;
spritenum = this->GetEngine()->original_image_index;
}
assert(IsValidImageIndex<VEH_AIRCRAFT>(spritenum));
return direction + _aircraft_sprite[spritenum];
result->Set(direction + _aircraft_sprite[spritenum]);
}
SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type)
void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result)
{
assert(v->subtype == AIR_HELICOPTER);
const Aircraft *w = v->Next()->Next();
if (is_custom_sprite(v->spritenum)) {
SpriteID sprite = GetCustomRotorSprite(v, false, image_type);
if (sprite != 0) return sprite;
GetCustomRotorSprite(v, false, image_type, result);
if (result->IsValid()) return;
}
/* Return standard rotor sprites if there are no custom sprites for this helicopter */
return SPR_ROTOR_STOPPED + w->state;
result->Set(SPR_ROTOR_STOPPED + w->state);
}
static SpriteID GetAircraftIcon(EngineID engine, EngineImageType image_type)
static void GetAircraftIcon(EngineID engine, EngineImageType image_type, VehicleSpriteSeq *result)
{
const Engine *e = Engine::Get(engine);
uint8 spritenum = e->u.air.image_index;
if (is_custom_sprite(spritenum)) {
SpriteID sprite = GetCustomVehicleIcon(engine, DIR_W, image_type);
if (sprite != 0) return sprite;
GetCustomVehicleIcon(engine, DIR_W, image_type, result);
if (result->IsValid()) return;
spritenum = e->original_image_index;
}
assert(IsValidImageIndex<VEH_AIRCRAFT>(spritenum));
return DIR_W + _aircraft_sprite[spritenum];
result->Set(DIR_W + _aircraft_sprite[spritenum]);
}
void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type)
{
SpriteID sprite = GetAircraftIcon(engine, image_type);
const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
VehicleSpriteSeq seq;
GetAircraftIcon(engine, image_type, &seq);
Rect rect;
seq.GetBounds(&rect);
preferred_x = Clamp(preferred_x,
left - UnScaleGUI(real_sprite->x_offs),
right - UnScaleGUI(real_sprite->width) - UnScaleGUI(real_sprite->x_offs));
DrawSprite(sprite, pal, preferred_x, y);
left - UnScaleGUI(rect.left),
right - UnScaleGUI(rect.right));
seq.Draw(preferred_x, y, pal, pal == PALETTE_CRASH);
if (!(AircraftVehInfo(engine)->subtype & AIR_CTOL)) {
SpriteID rotor_sprite = GetCustomRotorIcon(engine, image_type);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
DrawSprite(rotor_sprite, PAL_NONE, preferred_x, y - ScaleGUITrad(5));
VehicleSpriteSeq rotor_seq;
GetCustomRotorIcon(engine, image_type, &rotor_seq);
if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
rotor_seq.Draw(preferred_x, y - ScaleGUITrad(5), PAL_NONE, false);
}
}
@@ -224,12 +229,16 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
*/
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type)
{
const Sprite *spr = GetSprite(GetAircraftIcon(engine, image_type), ST_NORMAL);
VehicleSpriteSeq seq;
GetAircraftIcon(engine, image_type, &seq);
width = UnScaleGUI(spr->width);
height = UnScaleGUI(spr->height);
xoffs = UnScaleGUI(spr->x_offs);
yoffs = UnScaleGUI(spr->y_offs);
Rect rect;
seq.GetBounds(&rect);
width = UnScaleGUI(rect.right - rect.left + 1);
height = UnScaleGUI(rect.bottom - rect.top + 1);
xoffs = UnScaleGUI(rect.left);
yoffs = UnScaleGUI(rect.top);
}
/**
@@ -317,7 +326,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->date_of_last_service = _date;
v->build_year = u->build_year = _cur_year;
v->cur_image = u->cur_image = SPR_IMG_QUERY;
v->sprite_seq.Set(SPR_IMG_QUERY);
u->sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
u->random_bits = VehicleRandomBits();
@@ -349,7 +359,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
w->vehstatus = VS_HIDDEN | VS_UNCLICKABLE;
w->spritenum = 0xFF;
w->subtype = AIR_ROTOR;
w->cur_image = SPR_ROTOR_STOPPED;
w->sprite_seq.Set(SPR_ROTOR_STOPPED);
w->random_bits = VehicleRandomBits();
/* Use rotor's air.state to store the rotor animation frame */
w->state = HRS_ROTOR_STOPPED;
@@ -468,21 +478,21 @@ static void HelicopterTickHandler(Aircraft *v)
int tick = ++u->tick_counter;
int spd = u->cur_speed >> 4;
SpriteID img;
VehicleSpriteSeq seq;
if (spd == 0) {
u->state = HRS_ROTOR_STOPPED;
img = GetRotorImage(v, EIT_ON_MAP);
if (u->cur_image == img) return;
GetRotorImage(v, EIT_ON_MAP, &seq);
if (u->sprite_seq == seq) return;
} else if (tick >= spd) {
u->tick_counter = 0;
u->state++;
if (u->state > HRS_ROTOR_MOVING_3) u->state = HRS_ROTOR_MOVING_1;
img = GetRotorImage(v, EIT_ON_MAP);
GetRotorImage(v, EIT_ON_MAP, &seq);
} else {
return;
}
u->cur_image = img;
u->sprite_seq = seq;
u->UpdatePositionAndViewport();
}
@@ -502,7 +512,9 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
v->UpdatePosition();
v->UpdateViewport(true, false);
if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v, EIT_ON_MAP);
if (v->subtype == AIR_HELICOPTER) {
GetRotorImage(v, EIT_ON_MAP, &v->Next()->Next()->sprite_seq);
}
Aircraft *u = v->Next();
@@ -513,7 +525,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
u->cur_image = v->cur_image;
u->sprite_seq.CopyWithoutPalette(v->sprite_seq); // the shadow is never coloured
u->UpdatePositionAndViewport();
@@ -1237,7 +1249,9 @@ void Aircraft::MarkDirty()
{
this->colourmap = PAL_NONE;
this->UpdateViewport(true, false);
if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this, EIT_ON_MAP);
if (this->subtype == AIR_HELICOPTER) {
GetRotorImage(this, EIT_ON_MAP, &this->Next()->Next()->sprite_seq);
}
}

View File

@@ -83,11 +83,14 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
{
bool rtl = _current_text_dir == TD_RTL;
SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type);
const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
VehicleSpriteSeq seq;
v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
int width = UnScaleGUI(real_sprite->width);
int x_offs = UnScaleGUI(real_sprite->x_offs);
Rect rect;
seq.GetBounds(&rect);
int width = UnScaleGUI(rect.right - rect.left + 1);
int x_offs = UnScaleGUI(rect.left);
int x = rtl ? right - width - x_offs : left - x_offs;
bool helicopter = v->subtype == AIR_HELICOPTER;
@@ -95,17 +98,18 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
int heli_offs = 0;
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(sprite, pal, x, y + y_offs);
seq.Draw(x, y + y_offs, pal, (v->vehstatus & VS_CRASHED) != 0);
if (helicopter) {
const Aircraft *a = Aircraft::From(v);
SpriteID rotor_sprite = GetCustomRotorSprite(a, true, image_type);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
VehicleSpriteSeq rotor_seq;
GetCustomRotorSprite(a, true, image_type, &rotor_seq);
if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
heli_offs = ScaleGUITrad(5);
DrawSprite(rotor_sprite, PAL_NONE, x, y + y_offs - heli_offs);
rotor_seq.Draw(x, y + y_offs - heli_offs, PAL_NONE, false);
}
if (v->index == selection) {
x += x_offs;
y += UnScaleGUI(real_sprite->y_offs) + y_offs - heli_offs;
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(real_sprite->height) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
y += UnScaleGUI(rect.top) + y_offs - heli_offs;
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(rect.bottom - rect.top + 1) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
}
}

View File

@@ -75,7 +75,7 @@ struct BuildAirToolbarWindow : Window {
BuildAirToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
if (_settings_client.gui.link_terraform_toolbar || _settings_client.gui.compact_vertical_toolbar) ShowTerraformToolbar();
this->last_user_action = WIDGET_LIST_END;
}

View File

@@ -441,7 +441,7 @@ void AddArticulatedParts(Vehicle *first)
v->max_age = 0;
v->engine_type = engine_type;
v->value = 0;
v->cur_image = SPR_IMG_QUERY;
v->sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
if (flip_image) v->spritenum++;

View File

@@ -88,7 +88,7 @@ class ReplaceVehicleWindow : public Window {
byte sort_criteria; ///< Criteria of sorting vehicles.
bool descending_sort_order; ///< Order of sorting vehicles.
bool show_hidden_engines; ///< Whether to show the hidden engines.
RailType sel_railtype; ///< Type of rail tracks selected.
RailType sel_railtype; ///< Type of rail tracks selected. #INVALID_RAILTYPE to show all.
Scrollbar *vscroll[2];
/**
@@ -105,7 +105,7 @@ class ReplaceVehicleWindow : public Window {
/* Ensure that the wagon/engine selection fits the engine. */
if ((rvi->railveh_type == RAILVEH_WAGON) == show_engines) return false;
if (draw_left && show_engines) {
if (draw_left && this->sel_railtype != INVALID_RAILTYPE) {
/* Ensure that the railtype is specific to the selected one */
if (rvi->railtype != this->sel_railtype) return false;
}
@@ -212,24 +212,7 @@ class ReplaceVehicleWindow : public Window {
public:
ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
{
if (vehicletype == VEH_TRAIN) {
/* For rail vehicles find the most used vehicle type, which is usually
* better than 'just' the first/previous vehicle type. */
uint type_count[RAILTYPE_END];
memset(type_count, 0, sizeof(type_count));
const Engine *e;
FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
if (e->u.rail.railveh_type == RAILVEH_WAGON) continue;
type_count[e->u.rail.railtype] += GetGroupNumEngines(_local_company, id_g, e->index);
}
this->sel_railtype = RAILTYPE_BEGIN;
for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) {
if (type_count[this->sel_railtype] < type_count[rt]) this->sel_railtype = rt;
}
}
this->sel_railtype = INVALID_RAILTYPE;
this->replace_engines = true; // start with locomotives (all other vehicles will not read this bool)
this->engines[0].ForceRebuild();
this->engines[1].ForceRebuild();
@@ -269,7 +252,7 @@ public:
case WID_RV_LEFT_MATRIX:
case WID_RV_RIGHT_MATRIX:
resize->height = GetEngineListHeight((VehicleType)this->window_number);
size->height = (widget == WID_RV_RIGHT_MATRIX ? 3 : 4) * resize->height;
size->height = (widget == WID_RV_LEFT_MATRIX ? 3 : 4) * resize->height;
break;
case WID_RV_LEFT_DETAILS:
@@ -289,12 +272,9 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE: {
StringID str = this->GetWidget<NWidgetCore>(widget)->widget_data;
SetDParam(0, STR_REPLACE_ENGINES);
Dimension d = GetStringBoundingBox(str);
SetDParam(0, STR_REPLACE_WAGONS);
d = maxdim(d, GetStringBoundingBox(str));
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
Dimension d = GetStringBoundingBox(STR_REPLACE_ENGINES);
d = maxdim(d, GetStringBoundingBox(STR_REPLACE_WAGONS));
d.width += padding.width;
d.height += padding.height;
*size = maxdim(*size, d);
@@ -370,7 +350,7 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN:
SetDParam(0, this->replace_engines ? STR_REPLACE_ENGINES : STR_REPLACE_WAGONS);
break;
}
@@ -435,12 +415,8 @@ public:
this->SetWidgetDisabledState(WID_RV_STOP_REPLACE, this->sel_engine[0] == INVALID_ENGINE || !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group));
if (this->window_number == VEH_TRAIN) {
/* sets the colour of that art thing */
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_FLUFF_LEFT)->colour = _company_colours[_local_company];
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_FLUFF_RIGHT)->colour = _company_colours[_local_company];
/* Show the selected railtype in the pulldown menu */
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = GetRailTypeInfo(sel_railtype)->strings.replace_text;
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = sel_railtype == INVALID_RAILTYPE ? STR_REPLACE_ALL_RAILTYPE : GetRailTypeInfo(sel_railtype)->strings.replace_text;
}
this->DrawWidgets();
@@ -486,15 +462,16 @@ public:
DisplayVehicleSortDropDown(this, static_cast<VehicleType>(this->window_number), this->sort_criteria, WID_RV_SORT_DROPDOWN);
break;
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
this->replace_engines = !(this->replace_engines);
this->engines[0].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
DropDownList *list = new DropDownList();
*list->Append() = new DropDownListStringItem(STR_REPLACE_ENGINES, 1, false);
*list->Append() = new DropDownListStringItem(STR_REPLACE_WAGONS, 0, false);
ShowDropDownList(this, list, this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
break;
}
case WID_RV_TRAIN_RAILTYPE_DROPDOWN: // Railtype selection dropdown menu
ShowDropDownList(this, GetRailTypeDropDownList(true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
ShowDropDownList(this, GetRailTypeDropDownList(true, true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
break;
case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
@@ -569,6 +546,14 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
this->replace_engines = index != 0;
this->engines[0].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
break;
}
case WID_RV_START_REPLACE:
this->ReplaceClick_StartReplace(index != 0);
break;
@@ -615,6 +600,11 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN), SetDataTip(STR_BLACK_STRING, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), SetFill(1, 0), SetResize(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
@@ -631,7 +621,9 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -639,13 +631,6 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(150, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_TOGGLE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_ENGINE_WAGON_SELECT, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_LEFT), SetMinimalSize(15, 12), EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetResize(1, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_RIGHT), SetMinimalSize(16, 12), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};

View File

@@ -39,13 +39,14 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
}
Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left;
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below.
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
const byte *remap = bp->remap; // store so we don't have to access it via bp everytime
for (int y = 0; y < bp->height; y++) {
Colour *dst_ln = dst + bp->pitch;
uint16 *anim_ln = anim + this->anim_buf_width;
uint16 *anim_ln = anim + this->anim_buf_pitch;
const Colour *src_px_ln = (const Colour *)((const byte *)src_px + *(const uint32 *)src_px);
src_px++;
@@ -279,9 +280,8 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
}
Colour *udst = (Colour *)dst;
uint16 *anim;
anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'dst' into an 'anim_buf' offset below.
uint16 *anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
if (pal == PALETTE_TO_TRANSPARENT) {
do {
@@ -292,7 +292,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
anim = anim - width + this->anim_buf_pitch;
} while (--height);
return;
}
@@ -305,7 +305,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
anim = anim - width + this->anim_buf_pitch;
} while (--height);
return;
}
@@ -319,7 +319,8 @@ void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return;
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour | (DEFAULT_BRIGHTNESS << 8);
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_pitch] = colour | (DEFAULT_BRIGHTNESS << 8);
}
void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
@@ -331,9 +332,8 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
}
Colour colour32 = LookupColourInPalette(colour);
uint16 *anim_line;
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
do {
Colour *dst = (Colour *)video;
@@ -347,7 +347,7 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
anim++;
}
video = (uint32 *)video + _screen.pitch;
anim_line += this->anim_buf_width;
anim_line += this->anim_buf_pitch;
} while (--height);
}
@@ -357,6 +357,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
Colour *dst = (Colour *)video;
const uint32 *usrc = (const uint32 *)src;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
@@ -370,7 +371,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
/* Copy back the anim-buffer */
memcpy(anim_line, usrc, width * sizeof(uint16));
usrc = (const uint32 *)((const uint16 *)usrc + width);
anim_line += this->anim_buf_width;
anim_line += this->anim_buf_pitch;
/* Okay, it is *very* likely that the image we stored is using
* the wrong palette animated colours. There are two things we
@@ -397,11 +398,11 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint32 *udst = (uint32 *)dst;
const uint32 *src = (const uint32 *)video;
const uint16 *anim_line;
if (this->anim_buf == NULL) return;
anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
const uint16 *anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint32));
@@ -410,7 +411,7 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
/* Copy the anim-buffer */
memcpy(udst, anim_line, width * sizeof(uint16));
udst = (uint32 *)((uint16 *)udst + width);
anim_line += this->anim_buf_width;
anim_line += this->anim_buf_pitch;
}
}
@@ -422,8 +423,8 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
/* We need to scroll the anim-buffer too */
if (scroll_y > 0) {
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_pitch;
src = dst - scroll_y * this->anim_buf_pitch;
/* Adjust left & width */
if (scroll_x >= 0) {
@@ -436,13 +437,13 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
uint th = height - scroll_y;
for (; th > 0; th--) {
memcpy(dst, src, tw * sizeof(uint16));
src -= this->anim_buf_width;
dst -= this->anim_buf_width;
src -= this->anim_buf_pitch;
dst -= this->anim_buf_pitch;
}
} else {
/* Calculate pointers */
dst = this->anim_buf + left + top * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
dst = this->anim_buf + left + top * this->anim_buf_pitch;
src = dst - scroll_y * this->anim_buf_pitch;
/* Adjust left & width */
if (scroll_x >= 0) {
@@ -457,8 +458,8 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
uint th = height + scroll_y;
for (; th > 0; th--) {
memmove(dst, src, tw * sizeof(uint16));
src += this->anim_buf_width;
dst += this->anim_buf_width;
src += this->anim_buf_pitch;
dst += this->anim_buf_pitch;
}
}
@@ -495,6 +496,7 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
anim++;
}
dst += _screen.pitch - this->anim_buf_width;
anim += this->anim_buf_pitch - this->anim_buf_width;
}
/* Make sure the backend redraws the whole screen */
@@ -508,11 +510,13 @@ Blitter::PaletteAnimation Blitter_32bppAnim::UsePaletteAnimation()
void Blitter_32bppAnim::PostResize()
{
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height) {
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height ||
_screen.pitch != this->anim_buf_pitch) {
/* The size of the screen changed; we can assume we can wipe all data from our buffer */
free(this->anim_buf);
this->anim_buf = CallocT<uint16>(_screen.width * _screen.height);
this->anim_buf_width = _screen.width;
this->anim_buf_height = _screen.height;
this->anim_buf_pitch = _screen.pitch;
this->anim_buf = CallocT<uint16>(this->anim_buf_height * this->anim_buf_pitch);
}
}

View File

@@ -20,14 +20,18 @@ protected:
uint16 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
int anim_buf_width; ///< The width of the animation buffer.
int anim_buf_height; ///< The height of the animation buffer.
int anim_buf_pitch; ///< The pitch of the animation buffer.
Palette palette; ///< The current palette.
public:
Blitter_32bppAnim() :
anim_buf(NULL),
anim_buf_width(0),
anim_buf_height(0)
{}
anim_buf_height(0),
anim_buf_pitch(0)
{
this->palette = _cur_palette;
}
~Blitter_32bppAnim();

View File

@@ -35,7 +35,8 @@ inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomL
{
const byte * const remap = bp->remap;
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left;
uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below.
uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
int effective_width = bp->width;
/* Find where to start reading in the source sprite. */
@@ -353,7 +354,7 @@ next_line:
if (mode != BM_TRANSPARENT) src_mv_line += si->sprite_width;
src_rgba_line = (const Colour*) ((const byte*) src_rgba_line + si->sprite_line_size);
dst_line += bp->pitch;
anim_line += this->anim_buf_width;
anim_line += this->anim_buf_pitch;
}
}
IGNORE_UNINITIALIZED_WARNING_STOP

View File

@@ -48,7 +48,7 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
break;
case BM_BLACK_REMAP:
colour = 0;
if (*src != 0) *dst = 0;
break;
default:

View File

@@ -21,6 +21,7 @@
#include "zoom_func.h"
#include "settings_type.h"
#include "station_gui.h"
#include "error.h"
#include "build_confirmation_func.h"
#include "widgets/build_confirmation_widget.h"
#include "widgets/misc_widget.h"
@@ -174,6 +175,10 @@ struct BuildConfirmationWindow : Window {
ToolbarSelectLastTool();
} else {
ResetObjectToPlace();
DeleteWindowByClass(WC_BUILD_BRIDGE);
//ClearErrorMessages();
Window *w = FindWindowById(WC_ERRMSG, 0);
if (w != NULL) delete w;
}
break;
}
@@ -276,13 +281,14 @@ bool ConfirmationWindowShown()
bool BuildConfirmationWindowProcessViewportClick()
{
if (!BuildConfirmationWindow::shown) return false;
Window *w = FindWindowById(WC_BUILD_CONFIRMATION, 0);
if (w != NULL && IsInsideBS(_cursor.pos.x, w->left, w->width) && IsInsideBS(_cursor.pos.y, w->top, w->height)) {
Point pt;
pt.x = _cursor.pos.x - w->left;
pt.y = _cursor.pos.y - w->top;
w->OnClick(pt, WID_BC_OK, 1);
if (_settings_client.gui.windows_titlebars || !_left_button_down) {
Point pt;
pt.x = _cursor.pos.x - w->left;
pt.y = _cursor.pos.y - w->top;
w->OnClick(pt, WID_BC_OK, 1);
}
return true;
}

View File

@@ -56,7 +56,7 @@ void DrawHillyLandTile(const TileInfo *ti)
if (ti->tileh != SLOPE_FLAT) {
DrawGroundSprite(SPR_FLAT_ROUGH_LAND + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
} else {
DrawGroundSprite(_landscape_clear_sprites_rough[GB(ti->x ^ ti->y, 4, 3)], PAL_NONE);
DrawGroundSprite(_landscape_clear_sprites_rough[GB(TileHash(ti->x, ti->y), 0, 3)], PAL_NONE);
}
}

View File

@@ -81,7 +81,7 @@ CommandCallback CcBuildBridge;
/* dock_gui.cpp */
CommandCallback CcBuildDocks;
CommandCallback CcBuildCanal;
CommandCallback CcPlaySound_SPLAT_WATER;
/* depot_gui.cpp */
CommandCallback CcCloneVehicle;
@@ -97,19 +97,19 @@ CommandCallback CcAddVehicleNewGroup;
CommandCallback CcBuildIndustry;
/* main_gui.cpp */
CommandCallback CcPlaySound10;
CommandCallback CcPlaySound_EXPLOSION;
CommandCallback CcPlaceSign;
CommandCallback CcTerraform;
CommandCallback CcGiveMoney;
/* rail_gui.cpp */
CommandCallback CcPlaySound1E;
CommandCallback CcPlaySound_SPLAT_RAIL;
CommandCallback CcRailDepot;
CommandCallback CcStation;
CommandCallback CcBuildRailTunnel;
/* road_gui.cpp */
CommandCallback CcPlaySound1D;
CommandCallback CcPlaySound_SPLAT_OTHER;
CommandCallback CcBuildRoadTunnel;
CommandCallback CcRoadDepot;
CommandCallback CcRoadStop;

View File

@@ -52,10 +52,10 @@ extern CompanyPool _company_pool;
/** Statically loadable part of Company pool item */
struct CompanyProperties {
uint32 name_2; ///< Parameter of #name_1.
uint16 name_1; ///< Name of the company if the user did not change it.
StringID name_1; ///< Name of the company if the user did not change it.
char *name; ///< Name of the company if the user changed it.
uint16 president_name_1; ///< Name of the president if the user did not change it.
StringID president_name_1; ///< Name of the president if the user did not change it.
uint32 president_name_2; ///< Parameter of #president_name_1
char *president_name; ///< Name of the president if the user changed it.

View File

@@ -219,7 +219,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_CF_CAPTION), SetDataTip(STR_FINANCES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_CF_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW),
//NWidget(WWT_IMGBTN, COLOUR_GREY, WID_CF_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
@@ -908,7 +908,7 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SCMF_CAPTION), SetDataTip(STR_FACE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_ADVANCED_TOOLTIP),
//NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_ADVANCED_TOOLTIP),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SCMF_SELECT_FACE),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),

View File

@@ -434,7 +434,10 @@ void IConsoleCmdExec(const char *cmdstr)
* enclosed in "" are taken as one token. We can only go as far as the amount
* of characters in our stream or the max amount of tokens we can handle */
for (cmdptr = cmdstr, t_index = 0, tstream_i = 0; *cmdptr != '\0'; cmdptr++) {
if (t_index >= lengthof(tokens) || tstream_i >= lengthof(tokenstream)) break;
if (tstream_i >= lengthof(tokenstream)) {
IConsoleError("command line too long");
return;
}
switch (*cmdptr) {
case ' ': // Token separator
@@ -452,6 +455,10 @@ void IConsoleCmdExec(const char *cmdstr)
case '"': // Tokens enclosed in "" are one token
longtoken = !longtoken;
if (!foundtoken) {
if (t_index >= lengthof(tokens)) {
IConsoleError("command line too long");
return;
}
tokens[t_index++] = &tokenstream[tstream_i];
foundtoken = true;
}
@@ -466,6 +473,10 @@ void IConsoleCmdExec(const char *cmdstr)
tokenstream[tstream_i++] = *cmdptr;
if (!foundtoken) {
if (t_index >= lengthof(tokens)) {
IConsoleError("command line too long");
return;
}
tokens[t_index++] = &tokenstream[tstream_i - 1];
foundtoken = true;
}
@@ -473,7 +484,7 @@ void IConsoleCmdExec(const char *cmdstr)
}
}
for (uint i = 0; tokens[i] != NULL; i++) {
for (uint i = 0; i < lengthof(tokens) && tokens[i] != NULL; i++) {
DEBUG(console, 8, "Token %d is: '%s'", i, tokens[i]);
}

View File

@@ -45,6 +45,38 @@
/* scriptfile handling */
static bool _script_running; ///< Script is running (used to abort execution when #ConReturn is encountered).
/** File list storage for the console, for caching the last 'ls' command. */
class ConsoleFileList : public FileList {
public:
ConsoleFileList() : FileList()
{
this->file_list_valid = false;
}
/** Declare the file storage cache as being invalid, also clears all stored files. */
void InvalidateFileList()
{
this->Clear();
this->file_list_valid = false;
}
/**
* (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload.
* @param Always reload the file storage cache.
*/
void ValidateFileList(bool force_reload = false)
{
if (force_reload || !this->file_list_valid) {
this->BuildFileList(FT_SAVEGAME, SLO_LOAD);
this->file_list_valid = true;
}
}
bool file_list_valid; ///< If set, the file list is valid.
};
static ConsoleFileList _console_file_list; ///< File storage cache for the console.
/* console command defines */
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
#define DEF_CONSOLE_HOOK(function) static ConsoleHookResult function(bool echo)
@@ -286,7 +318,7 @@ DEF_CONSOLE_CMD(ConSave)
char *filename = str_fmt("%s.sav", argv[1]);
IConsolePrint(CC_DEFAULT, "Saving map...");
if (SaveOrLoad(filename, SL_SAVE, SAVE_DIR) != SL_OK) {
if (SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, SAVE_DIR) != SL_OK) {
IConsolePrint(CC_ERROR, "Saving map failed");
} else {
IConsolePrintF(CC_DEFAULT, "Map successfully saved to %s", filename);
@@ -315,42 +347,6 @@ DEF_CONSOLE_CMD(ConSaveConfig)
return true;
}
/**
* Get savegame file informations.
* @param file The savegame filename to return information about. Can be the actual name
* or a numbered entry into the filename list.
* @return FiosItem The information on the file.
*/
static const FiosItem *GetFiosItem(const char *file)
{
_saveload_mode = SLD_LOAD_GAME;
BuildFileList();
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
if (strcmp(file, item->name) == 0) return item;
if (strcmp(file, item->title) == 0) return item;
}
/* If no name matches, try to parse it as number */
char *endptr;
int i = strtol(file, &endptr, 10);
if (file == endptr || *endptr != '\0') i = -1;
if (IsInsideMM(i, 0, _fios_items.Length())) return _fios_items.Get(i);
/* As a last effort assume it is an OpenTTD savegame and
* that the ".sav" part was not given. */
char long_file[MAX_PATH];
seprintf(long_file, lastof(long_file), "%s.sav", file);
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
if (strcmp(long_file, item->name) == 0) return item;
if (strcmp(long_file, item->title) == 0) return item;
}
return NULL;
}
DEF_CONSOLE_CMD(ConLoad)
{
if (argc == 0) {
@@ -361,24 +357,21 @@ DEF_CONSOLE_CMD(ConLoad)
if (argc != 2) return false;
const char *file = argv[1];
const FiosItem *item = GetFiosItem(file);
_console_file_list.ValidateFileList();
const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
switch (item->type) {
case FIOS_TYPE_FILE: case FIOS_TYPE_OLDFILE: {
_switch_mode = SM_LOAD_GAME;
SetFiosType(item->type);
strecpy(_file_to_saveload.name, FiosBrowseTo(item), lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, item->title, lastof(_file_to_saveload.title));
break;
}
default: IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
if (GetAbstractFileType(item->type) == FT_SAVEGAME) {
_switch_mode = SM_LOAD_GAME;
_file_to_saveload.SetMode(item->type);
_file_to_saveload.SetName(FiosBrowseTo(item));
_file_to_saveload.SetTitle(item->title);
} else {
IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
}
} else {
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
FiosFreeSavegameList();
return true;
}
@@ -393,7 +386,8 @@ DEF_CONSOLE_CMD(ConRemove)
if (argc != 2) return false;
const char *file = argv[1];
const FiosItem *item = GetFiosItem(file);
_console_file_list.ValidateFileList();
const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
if (!FiosDelete(item->name)) {
IConsolePrintF(CC_ERROR, "%s: Failed to delete file", file);
@@ -402,7 +396,7 @@ DEF_CONSOLE_CMD(ConRemove)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
FiosFreeSavegameList();
_console_file_list.InvalidateFileList();
return true;
}
@@ -415,13 +409,11 @@ DEF_CONSOLE_CMD(ConListFiles)
return true;
}
BuildFileList();
for (uint i = 0; i < _fios_items.Length(); i++) {
IConsolePrintF(CC_DEFAULT, "%d) %s", i, _fios_items[i].title);
_console_file_list.ValidateFileList(true);
for (uint i = 0; i < _console_file_list.Length(); i++) {
IConsolePrintF(CC_DEFAULT, "%d) %s", i, _console_file_list[i].title);
}
FiosFreeSavegameList();
return true;
}
@@ -450,7 +442,8 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
if (argc != 2) return false;
const char *file = argv[1];
const FiosItem *item = GetFiosItem(file);
_console_file_list.ValidateFileList(true);
const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
switch (item->type) {
case FIOS_TYPE_DIR: case FIOS_TYPE_DRIVE: case FIOS_TYPE_PARENT:
@@ -462,7 +455,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
FiosFreeSavegameList();
_console_file_list.InvalidateFileList();
return true;
}
@@ -476,8 +469,8 @@ DEF_CONSOLE_CMD(ConPrintWorkingDirectory)
}
/* XXX - Workaround for broken file handling */
FiosGetSavegameList(SLD_LOAD_GAME);
FiosFreeSavegameList();
_console_file_list.ValidateFileList(true);
_console_file_list.InvalidateFileList();
FiosGetDescText(&path, NULL);
IConsolePrint(CC_DEFAULT, path);
@@ -574,29 +567,36 @@ DEF_CONSOLE_CMD(ConBan)
DEF_CONSOLE_CMD(ConUnBan)
{
if (argc == 0) {
IConsoleHelp("Unban a client from a network game. Usage: 'unban <ip | client-id>'");
IConsoleHelp("Unban a client from a network game. Usage: 'unban <ip | banlist-index>'");
IConsoleHelp("For a list of banned IP's, see the command 'banlist'");
return true;
}
if (argc != 2) return false;
uint index = (strchr(argv[1], '.') == NULL) ? atoi(argv[1]) : 0;
index--;
uint i = 0;
for (char **iter = _network_ban_list.Begin(); iter != _network_ban_list.End(); iter++, i++) {
if (strcmp(_network_ban_list[i], argv[1]) == 0 || index == i) {
free(_network_ban_list[i]);
_network_ban_list.Erase(iter);
IConsolePrint(CC_DEFAULT, "IP unbanned.");
return true;
}
/* Try by IP. */
uint index;
for (index = 0; index < _network_ban_list.Length(); index++) {
if (strcmp(_network_ban_list[index], argv[1]) == 0) break;
}
/* Try by index. */
if (index >= _network_ban_list.Length()) {
index = atoi(argv[1]) - 1U; // let it wrap
}
if (index < _network_ban_list.Length()) {
char msg[64];
seprintf(msg, lastof(msg), "Unbanned %s", _network_ban_list[index]);
IConsolePrint(CC_DEFAULT, msg);
free(_network_ban_list[index]);
_network_ban_list.Erase(_network_ban_list.Get(index));
} else {
IConsolePrint(CC_DEFAULT, "Invalid list index or IP not in ban-list.");
IConsolePrint(CC_DEFAULT, "For a list of banned IP's, see the command 'banlist'");
}
IConsolePrint(CC_DEFAULT, "IP not in ban-list.");
return true;
}

View File

@@ -256,6 +256,8 @@ public:
/**
* Get the number of items in the list.
*
* @return The number of items in the list.
*/
inline uint Length() const
{

View File

@@ -388,7 +388,7 @@ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const
seprintf(filename, filename_last, "%scrash.sav", _personal_dir);
/* Don't do a threaded saveload. */
return SaveOrLoad(filename, SL_SAVE, NO_DIRECTORY, false) == SL_OK;
return SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, NO_DIRECTORY, false) == SL_OK;
} catch (...) {
return false;
}

View File

@@ -507,15 +507,12 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
TrainDepotMoveVehicle(v, sel, gdvp.head);
} else if (v != NULL) {
bool rtl = _current_text_dir == TD_RTL;
int image = v->GetImage(rtl ? DIR_E : DIR_W, EIT_IN_DEPOT);
SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
SetMouseCursorVehicle(v, EIT_IN_DEPOT);
_cursor.vehchain = _ctrl_pressed;
this->sel = v->index;
this->SetDirty();
_cursor.short_vehicle_offset = v->IsGroundVehicle() ? (16 - v->GetGroundVehicleCache()->cached_veh_length * 2) * (rtl ? -1 : 1) : 0;
_cursor.vehchain = _ctrl_pressed;
}
break;
}
@@ -685,7 +682,8 @@ struct DepotWindow : Window {
}
/* Always have 1 empty row, so people can change the setting of the train */
this->vscroll->SetCount(this->vehicle_list.Length() + this->wagon_list.Length() + 1);
this->hscroll->SetCount(max_width);
/* Always make it longer than the longest train, so you can attach vehicles at the end */
this->hscroll->SetCount(max_width + ScaleGUITrad(2 * VEHICLEINFO_FULL_VEHICLE_WIDTH + 1));
} else {
this->vscroll->SetCount(CeilDiv(this->vehicle_list.Length(), this->num_columns));
}

View File

@@ -112,7 +112,7 @@ void DisasterVehicle::UpdateImage()
{
SpriteID img = this->image_override;
if (img == 0) img = _disaster_images[this->subtype][this->direction];
this->cur_image = img;
this->sprite_seq.Set(img);
}
/**
@@ -499,7 +499,8 @@ static bool DisasterTick_Helicopter_Rotors(DisasterVehicle *v)
v->tick_counter++;
if (HasBit(v->tick_counter, 0)) return true;
if (++v->cur_image > SPR_ROTOR_MOVING_3) v->cur_image = SPR_ROTOR_MOVING_1;
SpriteID &cur_image = v->sprite_seq.seq[0].sprite;
if (++cur_image > SPR_ROTOR_MOVING_3) cur_image = SPR_ROTOR_MOVING_1;
v->UpdatePositionAndViewport();

View File

@@ -49,7 +49,7 @@ void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
}
@@ -101,7 +101,7 @@ struct BuildDocksToolbarWindow : Window {
this->last_clicked_widget = WID_DT_INVALID;
this->InitNested(window_number);
this->OnInvalidateData();
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
if (_settings_client.gui.link_terraform_toolbar || _settings_client.gui.compact_vertical_toolbar) ShowTerraformToolbar();
}
~BuildDocksToolbarWindow()
@@ -191,9 +191,10 @@ struct BuildDocksToolbarWindow : Window {
PlaceProc_DemolishArea(tile);
break;
case WID_DT_STATION: // Build station button
case WID_DT_STATION: { // Build station button
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION);
break;
}
case WID_DT_DEPOT: // Build depot button
case WID_DT_BUOY: // Build buoy button
@@ -235,10 +236,10 @@ struct BuildDocksToolbarWindow : Window {
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
break;
case DDSP_CREATE_WATER:
DoCommandP(end_tile, start_tile, (_game_mode == GM_EDITOR && _ctrl_pressed) ? WATER_CLASS_SEA : WATER_CLASS_CANAL, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_BUILD_CANALS), CcBuildCanal);
DoCommandP(end_tile, start_tile, (_game_mode == GM_EDITOR && _ctrl_pressed) ? WATER_CLASS_SEA : WATER_CLASS_CANAL, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_BUILD_CANALS), CcPlaySound_SPLAT_WATER);
break;
case DDSP_CREATE_RIVER:
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcBuildCanal);
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcPlaySound_SPLAT_WATER);
break;
case DDSP_BUILD_STATION: {
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join

View File

@@ -1643,13 +1643,11 @@ static void LoadUnloadVehicle(Vehicle *front)
if (v->cargo_cap == 0) continue;
artic_part++;
uint load_amount = GetLoadAmount(v);
GoodsEntry *ge = &st->goods[v->cargo_type];
if (HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) && (front->current_order.GetUnloadType() & OUFB_NO_UNLOAD) == 0) {
uint cargo_count = v->cargo.UnloadCount();
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, load_amount) : cargo_count;
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, GetLoadAmount(v)) : cargo_count;
bool remaining = false; // Are there cargo entities in this vehicle that can still be unloaded here?
assert(payment != NULL);
@@ -1692,7 +1690,9 @@ static void LoadUnloadVehicle(Vehicle *front)
}
}
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
if (payment != NULL) {
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
}
remaining = v->cargo.UnloadCount() > 0;
if (amount_unloaded > 0) {
dirty_vehicle = true;
@@ -1754,8 +1754,8 @@ static void LoadUnloadVehicle(Vehicle *front)
* has capacity for it, load it on the vehicle. */
uint cap_left = v->cargo_cap - v->cargo.StoredCount();
if (cap_left > 0 && (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0 || ge->cargo.AvailableCount() > 0)) {
if (_settings_game.order.gradual_loading) cap_left = min(cap_left, load_amount);
if (v->cargo.StoredCount() == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO);
if (_settings_game.order.gradual_loading) cap_left = min(cap_left, GetLoadAmount(v));
uint loaded = ge->cargo.Load(cap_left, &v->cargo, st->xy, next_station);
if (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0) {

View File

@@ -22,10 +22,26 @@
#include "safeguards.h"
/**
* Increment the sprite unless it has reached the end of the animation.
* @param v Vehicle to increment sprite of.
* @param last Last sprite of animation.
* @return true if the sprite was incremented, false if the end was reached.
*/
static bool IncrementSprite(EffectVehicle *v, SpriteID last)
{
if (v->sprite_seq.seq[0].sprite != last) {
v->sprite_seq.seq[0].sprite++;
return true;
} else {
return false;
}
}
static void ChimneySmokeInit(EffectVehicle *v)
{
uint32 r = Random();
v->cur_image = SPR_CHIMNEY_SMOKE_0 + GB(r, 0, 3);
v->sprite_seq.Set(SPR_CHIMNEY_SMOKE_0 + GB(r, 0, 3));
v->progress = GB(r, 16, 3);
}
@@ -40,10 +56,8 @@ static bool ChimneySmokeTick(EffectVehicle *v)
return false;
}
if (v->cur_image != SPR_CHIMNEY_SMOKE_7) {
v->cur_image++;
} else {
v->cur_image = SPR_CHIMNEY_SMOKE_0;
if (!IncrementSprite(v, SPR_CHIMNEY_SMOKE_7)) {
v->sprite_seq.Set(SPR_CHIMNEY_SMOKE_0);
}
v->progress = 7;
v->UpdatePositionAndViewport();
@@ -54,7 +68,7 @@ static bool ChimneySmokeTick(EffectVehicle *v)
static void SteamSmokeInit(EffectVehicle *v)
{
v->cur_image = SPR_STEAM_SMOKE_0;
v->sprite_seq.Set(SPR_STEAM_SMOKE_0);
v->progress = 12;
}
@@ -70,9 +84,7 @@ static bool SteamSmokeTick(EffectVehicle *v)
}
if ((v->progress & 0xF) == 4) {
if (v->cur_image != SPR_STEAM_SMOKE_4) {
v->cur_image++;
} else {
if (!IncrementSprite(v, SPR_STEAM_SMOKE_4)) {
delete v;
return false;
}
@@ -86,7 +98,7 @@ static bool SteamSmokeTick(EffectVehicle *v)
static void DieselSmokeInit(EffectVehicle *v)
{
v->cur_image = SPR_DIESEL_SMOKE_0;
v->sprite_seq.Set(SPR_DIESEL_SMOKE_0);
v->progress = 0;
}
@@ -98,13 +110,11 @@ static bool DieselSmokeTick(EffectVehicle *v)
v->z_pos++;
v->UpdatePositionAndViewport();
} else if ((v->progress & 7) == 1) {
if (v->cur_image != SPR_DIESEL_SMOKE_5) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
if (!IncrementSprite(v, SPR_DIESEL_SMOKE_5)) {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -112,7 +122,7 @@ static bool DieselSmokeTick(EffectVehicle *v)
static void ElectricSparkInit(EffectVehicle *v)
{
v->cur_image = SPR_ELECTRIC_SPARK_0;
v->sprite_seq.Set(SPR_ELECTRIC_SPARK_0);
v->progress = 1;
}
@@ -122,13 +132,12 @@ static bool ElectricSparkTick(EffectVehicle *v)
v->progress++;
} else {
v->progress = 0;
if (v->cur_image != SPR_ELECTRIC_SPARK_5) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
if (!IncrementSprite(v, SPR_ELECTRIC_SPARK_5)) {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -136,7 +145,7 @@ static bool ElectricSparkTick(EffectVehicle *v)
static void SmokeInit(EffectVehicle *v)
{
v->cur_image = SPR_SMOKE_0;
v->sprite_seq.Set(SPR_SMOKE_0);
v->progress = 12;
}
@@ -152,9 +161,7 @@ static bool SmokeTick(EffectVehicle *v)
}
if ((v->progress & 0xF) == 4) {
if (v->cur_image != SPR_SMOKE_4) {
v->cur_image++;
} else {
if (!IncrementSprite(v, SPR_SMOKE_4)) {
delete v;
return false;
}
@@ -168,7 +175,7 @@ static bool SmokeTick(EffectVehicle *v)
static void ExplosionLargeInit(EffectVehicle *v)
{
v->cur_image = SPR_EXPLOSION_LARGE_0;
v->sprite_seq.Set(SPR_EXPLOSION_LARGE_0);
v->progress = 0;
}
@@ -176,13 +183,11 @@ static bool ExplosionLargeTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 3) == 0) {
if (v->cur_image != SPR_EXPLOSION_LARGE_F) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
if (!IncrementSprite(v, SPR_EXPLOSION_LARGE_F)) {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -190,7 +195,7 @@ static bool ExplosionLargeTick(EffectVehicle *v)
static void BreakdownSmokeInit(EffectVehicle *v)
{
v->cur_image = SPR_BREAKDOWN_SMOKE_0;
v->sprite_seq.Set(SPR_BREAKDOWN_SMOKE_0);
v->progress = 0;
}
@@ -198,10 +203,8 @@ static bool BreakdownSmokeTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 7) == 0) {
if (v->cur_image != SPR_BREAKDOWN_SMOKE_3) {
v->cur_image++;
} else {
v->cur_image = SPR_BREAKDOWN_SMOKE_0;
if (!IncrementSprite(v, SPR_BREAKDOWN_SMOKE_3)) {
v->sprite_seq.Set(SPR_BREAKDOWN_SMOKE_0);
}
v->UpdatePositionAndViewport();
}
@@ -217,7 +220,7 @@ static bool BreakdownSmokeTick(EffectVehicle *v)
static void ExplosionSmallInit(EffectVehicle *v)
{
v->cur_image = SPR_EXPLOSION_SMALL_0;
v->sprite_seq.Set(SPR_EXPLOSION_SMALL_0);
v->progress = 0;
}
@@ -225,13 +228,11 @@ static bool ExplosionSmallTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 3) == 0) {
if (v->cur_image != SPR_EXPLOSION_SMALL_B) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
if (!IncrementSprite(v, SPR_EXPLOSION_SMALL_B)) {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -239,7 +240,7 @@ static bool ExplosionSmallTick(EffectVehicle *v)
static void BulldozerInit(EffectVehicle *v)
{
v->cur_image = SPR_BULLDOZER_NE;
v->sprite_seq.Set(SPR_BULLDOZER_NE);
v->progress = 0;
v->animation_state = 0;
v->animation_substate = 0;
@@ -290,7 +291,7 @@ static bool BulldozerTick(EffectVehicle *v)
if ((v->progress & 7) == 0) {
const BulldozerMovement *b = &_bulldozer_movement[v->animation_state];
v->cur_image = SPR_BULLDOZER_NE + b->image;
v->sprite_seq.Set(SPR_BULLDOZER_NE + b->image);
v->x_pos += _inc_by_dir[b->direction].x;
v->y_pos += _inc_by_dir[b->direction].y;
@@ -312,7 +313,7 @@ static bool BulldozerTick(EffectVehicle *v)
static void BubbleInit(EffectVehicle *v)
{
v->cur_image = SPR_BUBBLE_GENERATE_0;
v->sprite_seq.Set(SPR_BUBBLE_GENERATE_0);
v->spritenum = 0;
v->progress = 0;
}
@@ -475,8 +476,8 @@ static bool BubbleTick(EffectVehicle *v)
if ((v->progress & 3) != 0) return true;
if (v->spritenum == 0) {
v->cur_image++;
if (v->cur_image < SPR_BUBBLE_GENERATE_3) {
v->sprite_seq.seq[0].sprite++;
if (v->sprite_seq.seq[0].sprite < SPR_BUBBLE_GENERATE_3) {
v->UpdatePositionAndViewport();
return true;
}
@@ -521,7 +522,7 @@ static bool BubbleTick(EffectVehicle *v)
v->x_pos += b->x;
v->y_pos += b->y;
v->z_pos += b->z;
v->cur_image = SPR_BUBBLE_0 + b->image;
v->sprite_seq.Set(SPR_BUBBLE_0 + b->image);
v->UpdatePositionAndViewport();

View File

@@ -89,7 +89,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
{
switch (GetTileType(t)) {
case MP_RAILWAY:
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
switch (GetRailTileType(t)) {
case RAIL_TILE_NORMAL: case RAIL_TILE_SIGNALS:
return GetTrackBits(t);
@@ -99,7 +99,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
break;
case MP_TUNNELBRIDGE:
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (override != NULL && (IsTunnel(t) || GetTunnelBridgeLength(t, GetOtherBridgeEnd(t)) > 0)) {
*override = 1 << GetTunnelBridgeDirection(t);
}
@@ -107,12 +107,12 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
case MP_ROAD:
if (!IsLevelCrossing(t)) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
return GetCrossingRailBits(t);
case MP_STATION:
if (!HasStationRail(t)) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
return TrackToTrackBits(GetRailStationTrack(t));
default:
@@ -135,7 +135,7 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
* axis that still display wires to preserve visual continuity. */
TileIndex next_tile = TileAddByDiagDir(t, d);
RailType rt = GetTileRailType(next_tile);
if (rt == INVALID_RAILTYPE || !HasCatenary(rt) ||
if (rt == INVALID_RAILTYPE || !HasRailCatenary(rt) ||
((TrackStatusToTrackBits(GetTileTrackStatus(next_tile, TRANSPORT_RAIL, 0)) & DiagdirReachesTracks(d)) == TRACK_BIT_NONE &&
(!HasStationTileRail(next_tile) || GetRailStationAxis(next_tile) != DiagDirToAxis(d) || !CanStationTileHaveWires(next_tile)))) {
neighbour_tdb |= DiagdirReachesTrackdirs(ReverseDiagDir(d));
@@ -241,7 +241,7 @@ static int GetPCPElevation(TileIndex tile, DiagDirection PCPpos)
*
* @param ti The Tileinfo to draw the tile for
*/
void DrawCatenaryOnTunnel(const TileInfo *ti)
void DrawRailCatenaryOnTunnel(const TileInfo *ti)
{
/* xmin, ymin, xmax + 1, ymax + 1 of BB */
static const int _tunnel_wire_BB[4][4] = {
@@ -255,7 +255,7 @@ void DrawCatenaryOnTunnel(const TileInfo *ti)
SpriteID wire_base = GetWireBase(ti->tile);
const SortableSpriteStruct *sss = &CatenarySpriteData_Tunnel[dir];
const SortableSpriteStruct *sss = &RailCatenarySpriteData_Tunnel[dir];
const int *BB_data = _tunnel_wire_BB[dir];
AddSortableSpriteToDraw(
wire_base + sss->image_offset, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
@@ -270,7 +270,7 @@ void DrawCatenaryOnTunnel(const TileInfo *ti)
* Draws wires and, if required, pylons on a given tile
* @param ti The Tileinfo to draw the tile for
*/
static void DrawCatenaryRailway(const TileInfo *ti)
static void DrawRailCatenaryRailway(const TileInfo *ti)
{
/* Pylons are placed on a tile edge, so we need to take into account
* the track configuration of 2 adjacent tiles. trackconfig[0] stores the
@@ -379,7 +379,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
if (IsTileType(neighbour, MP_STATION) || IsTileType(neighbour, MP_ROAD)) tileh[TS_NEIGHBOUR] = SLOPE_FLAT;
/* Read the foundations if they are present, and adjust the tileh */
if (trackconfig[TS_NEIGHBOUR] != TRACK_BIT_NONE && IsTileType(neighbour, MP_RAILWAY) && HasCatenary(GetRailType(neighbour))) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
if (trackconfig[TS_NEIGHBOUR] != TRACK_BIT_NONE && IsTileType(neighbour, MP_RAILWAY) && HasRailCatenary(GetRailType(neighbour))) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
if (IsBridgeTile(neighbour)) {
foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetTunnelBridgeDirection(neighbour)));
}
@@ -442,7 +442,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
}
}
/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawCatenaryOnTunnel()) */
/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawRailCatenaryOnTunnel()) */
if (IsTunnelTile(ti->tile)) return;
/* Don't draw a wire under a low bridge */
@@ -478,7 +478,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
assert(PCPconfig != 0); // We have a pylon on neither end of the wire, that doesn't work (since we have no sprites for that)
assert(!IsSteepSlope(tileh[TS_HOME]));
sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
sss = &RailCatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
/*
* The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
@@ -498,7 +498,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
*
* @param ti The Tileinfo to draw the tile for
*/
void DrawCatenaryOnBridge(const TileInfo *ti)
void DrawRailCatenaryOnBridge(const TileInfo *ti)
{
TileIndex end = GetSouthernBridgeEnd(ti->tile);
TileIndex start = GetOtherBridgeEnd(end);
@@ -511,15 +511,15 @@ void DrawCatenaryOnBridge(const TileInfo *ti)
Axis axis = GetBridgeAxis(ti->tile);
TLG tlg = GetTLG(ti->tile);
CatenarySprite offset = (CatenarySprite)(axis == AXIS_X ? 0 : WIRE_Y_FLAT_BOTH - WIRE_X_FLAT_BOTH);
RailCatenarySprite offset = (RailCatenarySprite)(axis == AXIS_X ? 0 : WIRE_Y_FLAT_BOTH - WIRE_X_FLAT_BOTH);
if ((length % 2) && num == length) {
/* Draw the "short" wire on the southern end of the bridge
* only needed if the length of the bridge is odd */
sss = &CatenarySpriteData[WIRE_X_FLAT_BOTH + offset];
sss = &RailCatenarySpriteData[WIRE_X_FLAT_BOTH + offset];
} else {
/* Draw "long" wires on all other tiles of the bridge (one pylon every two tiles) */
sss = &CatenarySpriteData[WIRE_X_FLAT_SW + (num % 2) + offset];
sss = &RailCatenarySpriteData[WIRE_X_FLAT_SW + (num % 2) + offset];
}
height = GetBridgePixelHeight(end);
@@ -558,14 +558,14 @@ 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
* @see DrawRailCatenaryRailway
*/
void DrawCatenary(const TileInfo *ti)
void DrawRailCatenary(const TileInfo *ti)
{
switch (GetTileType(ti->tile)) {
case MP_RAILWAY:
if (IsRailDepot(ti->tile)) {
const SortableSpriteStruct *sss = &CatenarySpriteData_Depot[GetRailDepotDirection(ti->tile)];
const SortableSpriteStruct *sss = &RailCatenarySpriteData_Depot[GetRailDepotDirection(ti->tile)];
SpriteID wire_base = GetWireBase(ti->tile);
@@ -587,7 +587,7 @@ void DrawCatenary(const TileInfo *ti)
default: return;
}
DrawCatenaryRailway(ti);
DrawRailCatenaryRailway(ti);
}
bool SettingsDisableElrail(int32 p1)

View File

@@ -20,7 +20,7 @@
* Test if a rail type has catenary
* @param rt Rail type to test
*/
static inline bool HasCatenary(RailType rt)
static inline bool HasRailCatenary(RailType rt)
{
return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
}
@@ -29,14 +29,14 @@ static inline bool HasCatenary(RailType rt)
* Test if we should draw rail catenary
* @param rt Rail type to test
*/
static inline bool HasCatenaryDrawn(RailType rt)
static inline bool HasRailCatenaryDrawn(RailType rt)
{
return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
return HasRailCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
}
void DrawCatenary(const TileInfo *ti);
void DrawCatenaryOnTunnel(const TileInfo *ti);
void DrawCatenaryOnBridge(const TileInfo *ti);
void DrawRailCatenary(const TileInfo *ti);
void DrawRailCatenaryOnTunnel(const TileInfo *ti);
void DrawRailCatenaryOnBridge(const TileInfo *ti);
bool SettingsDisableElrail(int32 p1); ///< _settings_game.disable_elrail callback

View File

@@ -48,11 +48,6 @@ 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),
@@ -543,29 +538,6 @@ 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);
@@ -711,19 +683,6 @@ 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);
}
@@ -820,7 +779,10 @@ static bool IsVehicleTypeDisabled(VehicleType type, bool ai)
/** Daily check to offer an exclusive engine preview to the companies. */
void EnginesDailyLoop()
{
CheckRailIntroduction();
Company *c;
FOR_ALL_COMPANIES(c) {
c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, _date);
}
if (_cur_year >= _year_engine_aging_stops) return;

View File

@@ -158,6 +158,7 @@ enum EngineMiscFlags {
EF_AUTO_REFIT = 4, ///< Automatic refitting is allowed
EF_NO_DEFAULT_CARGO_MULTIPLIER = 5, ///< Use the new capacity algorithm. The default cargotype of the vehicle does not affect capacity multipliers. CB 15 is also called in purchase list.
EF_NO_BREAKDOWN_SMOKE = 6, ///< Do not show black smoke during a breakdown.
EF_SPRITE_STACK = 7, ///< Draw vehicle by stacking multiple sprites.
};
/**

View File

@@ -37,7 +37,10 @@ static const NWidgetPart _nested_errmsg_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION, STR_NULL),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_RED),
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetPadding(0, 2, 0, 2), SetMinimalSize(236, 32),
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL), // Add some borders
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetPadding(4, 4, 4, 4), SetMinimalSize(236, 32),
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_RED, WID_EM_CLOSE), SetPadding(4, 4, 4, 4), SetDataTip(STR_BUTTON_OK, STR_NULL),
EndContainer(),
};
@@ -54,10 +57,13 @@ static const NWidgetPart _nested_errmsg_face_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_RED),
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL), // Add some borders
NWidget(NWID_HORIZONTAL), SetPIP(2, 1, 2),
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(2, 0, 1, 0),
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123),
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(4, 4, 4, 4),
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123), SetPadding(4, 4, 4, 4),
EndContainer(),
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_RED, WID_EM_CLOSE), SetPadding(4, 4, 4, 4), SetDataTip(STR_BUTTON_OK, STR_NULL),
EndContainer(),
};
@@ -320,6 +326,18 @@ public:
return ES_HANDLED;
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_EM_CLOSE:
delete this;
break;
default:
break;
}
}
/**
* Check whether the currently shown error message was critical or not.
* @return True iff the message was critical.

View File

@@ -14,6 +14,96 @@
#include "core/enum_type.hpp"
/** The different abstract types of files that the system knows about. */
enum AbstractFileType {
FT_NONE, ///< nothing to do
FT_SAVEGAME, ///< old or new savegame
FT_SCENARIO, ///< old or new scenario
FT_HEIGHTMAP, ///< heightmap file
FT_INVALID = 7, ///< Invalid or unknown file type.
FT_NUMBITS = 3, ///< Number of bits required for storing a #AbstractFileType value.
FT_MASK = (1 << FT_NUMBITS) - 1, ///< Bitmask for extracting an abstract file type.
};
/** Kinds of files in each #AbstractFileType. */
enum DetailedFileType {
/* Save game and scenario files. */
DFT_OLD_GAME_FILE, ///< Old save game or scenario file.
DFT_GAME_FILE, ///< Save game or scenario file.
/* Heightmap files. */
DFT_HEIGHTMAP_BMP, ///< BMP file.
DFT_HEIGHTMAP_PNG, ///< PNG file.
/* fios 'files' */
DFT_FIOS_DRIVE, ///< A drive (letter) entry.
DFT_FIOS_PARENT, ///< A parent directory entry.
DFT_FIOS_DIR, ///< A directory entry.
DFT_FIOS_DIRECT, ///< Direct filename.
DFT_INVALID = 255, ///< Unknown or invalid file.
};
/** Operation performed on the file. */
enum SaveLoadOperation {
SLO_CHECK, ///< Load file for checking and/or preview.
SLO_LOAD, ///< File is being loaded.
SLO_SAVE, ///< File is being saved.
SLO_INVALID, ///< Unknown file operation.
};
/**
* Construct an enum value for #FiosType as a combination of an abstract and a detailed file type.
* @param abstract Abstract file type (one of #AbstractFileType).
* @param detailed Detailed file type (one of #DetailedFileType).
*/
#define MAKE_FIOS_TYPE(abstract, detailed) ((abstract) | ((detailed) << FT_NUMBITS))
/**
* Elements of a file system that are recognized.
* Values are a combination of #AbstractFileType and #DetailedFileType.
* @see GetAbstractFileType GetDetailedFileType
*/
enum FiosType {
FIOS_TYPE_DRIVE = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DRIVE),
FIOS_TYPE_PARENT = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_PARENT),
FIOS_TYPE_DIR = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DIR),
FIOS_TYPE_DIRECT = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DIRECT),
FIOS_TYPE_FILE = MAKE_FIOS_TYPE(FT_SAVEGAME, DFT_GAME_FILE),
FIOS_TYPE_OLDFILE = MAKE_FIOS_TYPE(FT_SAVEGAME, DFT_OLD_GAME_FILE),
FIOS_TYPE_SCENARIO = MAKE_FIOS_TYPE(FT_SCENARIO, DFT_GAME_FILE),
FIOS_TYPE_OLD_SCENARIO = MAKE_FIOS_TYPE(FT_SCENARIO, DFT_OLD_GAME_FILE),
FIOS_TYPE_PNG = MAKE_FIOS_TYPE(FT_HEIGHTMAP, DFT_HEIGHTMAP_PNG),
FIOS_TYPE_BMP = MAKE_FIOS_TYPE(FT_HEIGHTMAP, DFT_HEIGHTMAP_BMP),
FIOS_TYPE_INVALID = MAKE_FIOS_TYPE(FT_INVALID, DFT_INVALID),
};
#undef MAKE_FIOS_TYPE
/**
* Extract the abstract file type from a #FiosType.
* @param fios_type Type to query.
* @return The Abstract file type of the \a fios_type.
*/
inline AbstractFileType GetAbstractFileType(FiosType fios_type)
{
return static_cast<AbstractFileType>(fios_type & FT_MASK);
}
/**
* Extract the detailed file type from a #FiosType.
* @param fios_type Type to query.
* @return The Detailed file type of the \a fios_type.
*/
inline DetailedFileType GetDetailedFileType(FiosType fios_type)
{
return static_cast<DetailedFileType>(fios_type >> FT_NUMBITS);
}
/**
* The different kinds of subdirectories OpenTTD uses
*/

View File

@@ -29,17 +29,15 @@
#include "safeguards.h"
/* Variables to display file lists */
SmallVector<FiosItem, 32> _fios_items;
static char *_fios_path;
static const char *_fios_path_last;
SmallFiosItem _file_to_saveload;
SortingBits _savegame_sort_order = SORT_BY_DATE | SORT_DESCENDING;
/* OS-specific functions are taken from their respective files (win32/unix/os2 .c) */
extern bool FiosIsRoot(const char *path);
extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb);
extern bool FiosIsHiddenFile(const struct dirent *ent);
extern void FiosGetDrives();
extern void FiosGetDrives(FileList &file_list);
extern bool FiosGetDiskFreeSpace(const char *path, uint64 *tot);
/* get the name of an oldstyle savegame */
@@ -65,11 +63,72 @@ int CDECL CompareFiosItems(const FiosItem *da, const FiosItem *db)
return r;
}
/** Free the list of savegames. */
void FiosFreeSavegameList()
FileList::~FileList()
{
_fios_items.Clear();
_fios_items.Compact();
this->Clear();
}
/**
* Construct a file list with the given kind of files, for the stated purpose.
* @param abstract_filetype Kind of files to collect.
* @param fop Purpose of the collection, either #SLO_LOAD or #SLO_SAVE.
*/
void FileList::BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop)
{
this->Clear();
assert(fop == SLO_LOAD || SLO_SAVE);
switch (abstract_filetype) {
case FT_NONE:
break;
case FT_SAVEGAME:
FiosGetSavegameList(fop, *this);
break;
case FT_SCENARIO:
FiosGetScenarioList(fop, *this);
break;
case FT_HEIGHTMAP:
FiosGetHeightmapList(fop, *this);
break;
default:
NOT_REACHED();
}
}
/**
* Find file information of a file by its name from the file list.
* @param file The filename to return information about. Can be the actual name
* or a numbered entry into the filename list.
* @return The information on the file, or \c NULL if the file is not available.
*/
const FiosItem *FileList::FindItem(const char *file)
{
for (const FiosItem *item = this->Begin(); item != this->End(); item++) {
if (strcmp(file, item->name) == 0) return item;
if (strcmp(file, item->title) == 0) return item;
}
/* If no name matches, try to parse it as number */
char *endptr;
int i = strtol(file, &endptr, 10);
if (file == endptr || *endptr != '\0') i = -1;
if (IsInsideMM(i, 0, this->Length())) return this->Get(i);
/* As a last effort assume it is an OpenTTD savegame and
* that the ".sav" part was not given. */
char long_file[MAX_PATH];
seprintf(long_file, lastof(long_file), "%s.sav", file);
for (const FiosItem *item = this->Begin(); item != this->End(); item++) {
if (strcmp(long_file, item->name) == 0) return item;
if (strcmp(long_file, item->title) == 0) return item;
}
return NULL;
}
/**
@@ -215,23 +274,24 @@ bool FiosDelete(const char *name)
return unlink(filename) == 0;
}
typedef FiosType fios_getlist_callback_proc(SaveLoadDialogMode mode, const char *filename, const char *ext, char *title, const char *last);
typedef FiosType fios_getlist_callback_proc(SaveLoadOperation fop, const char *filename, const char *ext, char *title, const char *last);
/**
* Scanner to scan for a particular type of FIOS file.
*/
class FiosFileScanner : public FileScanner {
SaveLoadDialogMode mode; ///< The mode we want to search for
SaveLoadOperation fop; ///< The kind of file we are looking for.
fios_getlist_callback_proc *callback_proc; ///< Callback to check whether the file may be added
FileList &file_list; ///< Destination of the found files.
public:
/**
* Create the scanner
* @param mode The mode we are in. Some modes don't allow 'parent'.
* @param callback_proc The function that is called where you need to do the filtering.
* @param fop Purpose of collecting the list.
* @param callback_proc The function that is called where you need to do the filtering.
* @param file_list Destination of the found files.
*/
FiosFileScanner(SaveLoadDialogMode mode, fios_getlist_callback_proc *callback_proc) :
mode(mode),
callback_proc(callback_proc)
FiosFileScanner(SaveLoadOperation fop, fios_getlist_callback_proc *callback_proc, FileList &file_list) :
fop(fop), callback_proc(callback_proc), file_list(file_list)
{}
/* virtual */ bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename);
@@ -251,14 +311,14 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
char fios_title[64];
fios_title[0] = '\0'; // reset the title;
FiosType type = this->callback_proc(this->mode, filename, ext, fios_title, lastof(fios_title));
FiosType type = this->callback_proc(this->fop, filename, ext, fios_title, lastof(fios_title));
if (type == FIOS_TYPE_INVALID) return false;
for (const FiosItem *fios = _fios_items.Begin(); fios != _fios_items.End(); fios++) {
for (const FiosItem *fios = file_list.Begin(); fios != file_list.End(); fios++) {
if (strcmp(fios->name, filename) == 0) return false;
}
FiosItem *fios = _fios_items.Append();
FiosItem *fios = file_list.Append();
#ifdef WIN32
struct _stat sb;
if (_tstat(OTTD2FS(filename), &sb) == 0) {
@@ -289,11 +349,12 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
/**
* Fill the list of the files in a directory, according to some arbitrary rule.
* @param mode The mode we are in. Some modes don't allow 'parent'.
* @param callback_proc The function that is called where you need to do the filtering.
* @param subdir The directory from where to start (global) searching.
* @param fop Purpose of collecting the list.
* @param callback_proc The function that is called where you need to do the filtering.
* @param subdir The directory from where to start (global) searching.
* @param file_list Destination of the found files.
*/
static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc *callback_proc, Subdirectory subdir)
static void FiosGetFileList(SaveLoadOperation fop, fios_getlist_callback_proc *callback_proc, Subdirectory subdir, FileList &file_list)
{
struct stat sb;
struct dirent *dirent;
@@ -302,11 +363,11 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
int sort_start;
char d_name[sizeof(fios->name)];
_fios_items.Clear();
file_list.Clear();
/* A parent directory link exists if we are not in the root directory */
if (!FiosIsRoot(_fios_path)) {
fios = _fios_items.Append();
fios = file_list.Append();
fios->type = FIOS_TYPE_PARENT;
fios->mtime = 0;
strecpy(fios->name, "..", lastof(fios->name));
@@ -322,7 +383,7 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
if (FiosIsValidFile(_fios_path, dirent, &sb) && S_ISDIR(sb.st_mode) &&
(!FiosIsHiddenFile(dirent) || strncasecmp(d_name, PERSONAL_DIR, strlen(d_name)) == 0) &&
strcmp(d_name, ".") != 0 && strcmp(d_name, "..") != 0) {
fios = _fios_items.Append();
fios = file_list.Append();
fios->type = FIOS_TYPE_DIR;
fios->mtime = 0;
strecpy(fios->name, d_name, lastof(fios->name));
@@ -337,27 +398,27 @@ static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc
{
SortingBits order = _savegame_sort_order;
_savegame_sort_order = SORT_BY_NAME | SORT_ASCENDING;
QSortT(_fios_items.Begin(), _fios_items.Length(), CompareFiosItems);
QSortT(file_list.files.Begin(), file_list.files.Length(), CompareFiosItems);
_savegame_sort_order = order;
}
/* This is where to start sorting for the filenames */
sort_start = _fios_items.Length();
sort_start = file_list.Length();
/* Show files */
FiosFileScanner scanner(mode, callback_proc);
FiosFileScanner scanner(fop, callback_proc, file_list);
if (subdir == NO_DIRECTORY) {
scanner.Scan(NULL, _fios_path, false);
} else {
scanner.Scan(NULL, subdir, true, true);
}
QSortT(_fios_items.Get(sort_start), _fios_items.Length() - sort_start, CompareFiosItems);
QSortT(file_list.Get(sort_start), file_list.Length() - sort_start, CompareFiosItems);
/* Show drives */
FiosGetDrives();
FiosGetDrives(file_list);
_fios_items.Compact();
file_list.Compact();
}
/**
@@ -386,7 +447,7 @@ static void GetFileTitle(const char *file, char *title, const char *last, Subdir
/**
* Callback for FiosGetFileList. It tells if a file is a savegame or not.
* @param mode Save/load mode.
* @param fop Purpose of collecting the list.
* @param file Name of the file to check.
* @param ext A pointer to the extension identifier inside file
* @param title Buffer if a callback wants to lookup the title of the file; NULL to skip the lookup
@@ -395,7 +456,7 @@ static void GetFileTitle(const char *file, char *title, const char *last, Subdir
* @see FiosGetFileList
* @see FiosGetSavegameList
*/
FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
{
/* Show savegame files
* .SAV OpenTTD saved game
@@ -411,7 +472,7 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
return FIOS_TYPE_FILE;
}
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (fop == SLO_LOAD) {
if (strcasecmp(ext, ".ss1") == 0 || strcasecmp(ext, ".sv1") == 0 ||
strcasecmp(ext, ".sv2") == 0) {
if (title != NULL) GetOldSaveGameName(file, title, last);
@@ -424,10 +485,11 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
/**
* Get a list of savegames.
* @param mode Save/load mode.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
* @see FiosGetFileList
*/
void FiosGetSavegameList(SaveLoadDialogMode mode)
void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
{
static char *fios_save_path = NULL;
static char *fios_save_path_last = NULL;
@@ -441,12 +503,12 @@ void FiosGetSavegameList(SaveLoadDialogMode mode)
_fios_path = fios_save_path;
_fios_path_last = fios_save_path_last;
FiosGetFileList(mode, &FiosGetSavegameListCallback, NO_DIRECTORY);
FiosGetFileList(fop, &FiosGetSavegameListCallback, NO_DIRECTORY, file_list);
}
/**
* Callback for FiosGetFileList. It tells if a file is a scenario or not.
* @param mode Save/load mode.
* @param fop Purpose of collecting the list.
* @param file Name of the file to check.
* @param ext A pointer to the extension identifier inside file
* @param title Buffer if a callback wants to lookup the title of the file
@@ -455,7 +517,7 @@ void FiosGetSavegameList(SaveLoadDialogMode mode)
* @see FiosGetFileList
* @see FiosGetScenarioList
*/
static FiosType FiosGetScenarioListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
static FiosType FiosGetScenarioListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
{
/* Show scenario files
* .SCN OpenTTD style scenario file
@@ -466,7 +528,7 @@ static FiosType FiosGetScenarioListCallback(SaveLoadDialogMode mode, const char
return FIOS_TYPE_SCENARIO;
}
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (fop == SLO_LOAD) {
if (strcasecmp(ext, ".sv0") == 0 || strcasecmp(ext, ".ss0") == 0 ) {
GetOldSaveGameName(file, title, last);
return FIOS_TYPE_OLD_SCENARIO;
@@ -478,10 +540,11 @@ static FiosType FiosGetScenarioListCallback(SaveLoadDialogMode mode, const char
/**
* Get a list of scenarios.
* @param mode Save/load mode.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
* @see FiosGetFileList
*/
void FiosGetScenarioList(SaveLoadDialogMode mode)
void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list)
{
static char *fios_scn_path = NULL;
static char *fios_scn_path_last = NULL;
@@ -499,10 +562,11 @@ void FiosGetScenarioList(SaveLoadDialogMode mode)
char base_path[MAX_PATH];
FioGetDirectory(base_path, lastof(base_path), SCENARIO_DIR);
FiosGetFileList(mode, &FiosGetScenarioListCallback, (mode == SLD_LOAD_SCENARIO && strcmp(base_path, _fios_path) == 0) ? SCENARIO_DIR : NO_DIRECTORY);
Subdirectory subdir = (fop == SLO_LOAD && strcmp(base_path, _fios_path) == 0) ? SCENARIO_DIR : NO_DIRECTORY;
FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list);
}
static FiosType FiosGetHeightmapListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
static FiosType FiosGetHeightmapListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
{
/* Show heightmap files
* .PNG PNG Based heightmap files
@@ -548,9 +612,10 @@ static FiosType FiosGetHeightmapListCallback(SaveLoadDialogMode mode, const char
/**
* Get a list of heightmaps.
* @param mode Save/load mode.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
*/
void FiosGetHeightmapList(SaveLoadDialogMode mode)
void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list)
{
static char *fios_hmap_path = NULL;
static char *fios_hmap_path_last = NULL;
@@ -567,7 +632,8 @@ void FiosGetHeightmapList(SaveLoadDialogMode mode)
char base_path[MAX_PATH];
FioGetDirectory(base_path, lastof(base_path), HEIGHTMAP_DIR);
FiosGetFileList(mode, &FiosGetHeightmapListCallback, strcmp(base_path, _fios_path) == 0 ? HEIGHTMAP_DIR : NO_DIRECTORY);
Subdirectory subdir = strcmp(base_path, _fios_path) == 0 ? HEIGHTMAP_DIR : NO_DIRECTORY;
FiosGetFileList(fop, &FiosGetHeightmapListCallback, subdir, file_list);
}
/**

View File

@@ -81,52 +81,17 @@ extern LoadCheckData _load_check_data;
enum FileSlots {
/**
* Slot used for the GRF scanning and such. This slot cannot be reused
* as it will otherwise cause issues when pressing "rescan directories".
* It can furthermore not be larger than LAST_GRF_SLOT as that complicates
* the testing for "too much NewGRFs".
* Slot used for the GRF scanning and such.
* This slot is used for all temporary accesses to files when scanning/testing files,
* and thus cannot be used for files, which are continuously accessed during a game.
*/
CONFIG_SLOT = 0,
/** Slot for the sound. */
SOUND_SLOT = 1,
/** First slot usable for (New)GRFs used during the game. */
FIRST_GRF_SLOT = 2,
/** Last slot usable for (New)GRFs used during the game. */
LAST_GRF_SLOT = 63,
/** Maximum number of slots. */
MAX_FILE_SLOTS = 64
};
/** Mode of the file dialogue window. */
enum SaveLoadDialogMode {
SLD_LOAD_GAME, ///< Load a game.
SLD_LOAD_SCENARIO, ///< Load a scenario.
SLD_SAVE_GAME, ///< Save a game.
SLD_SAVE_SCENARIO, ///< Save a scenario.
SLD_LOAD_HEIGHTMAP, ///< Load a heightmap.
SLD_SAVE_HEIGHTMAP, ///< Save a heightmap.
};
/** The different types of files that the system knows about. */
enum FileType {
FT_NONE, ///< nothing to do
FT_SAVEGAME, ///< old or new savegame
FT_SCENARIO, ///< old or new scenario
FT_HEIGHTMAP, ///< heightmap file
};
enum FiosType {
FIOS_TYPE_DRIVE,
FIOS_TYPE_PARENT,
FIOS_TYPE_DIR,
FIOS_TYPE_FILE,
FIOS_TYPE_OLDFILE,
FIOS_TYPE_SCENARIO,
FIOS_TYPE_OLD_SCENARIO,
FIOS_TYPE_DIRECT,
FIOS_TYPE_PNG,
FIOS_TYPE_BMP,
FIOS_TYPE_INVALID = 255,
MAX_FILE_SLOTS = 128,
};
/** Deals with finding savegames */
@@ -137,12 +102,95 @@ struct FiosItem {
char name[MAX_PATH];
};
/** Deals with the type of the savegame, independent of extension */
struct SmallFiosItem {
int mode; ///< savegame/scenario type (old, new)
FileType filetype; ///< what type of file are we dealing with
char name[MAX_PATH]; ///< name
char title[255]; ///< internal name of the game
/** List of file information. */
class FileList {
public:
~FileList();
/**
* Construct a new entry in the file list.
* @return Pointer to the new items to be initialized.
*/
inline FiosItem *Append()
{
return this->files.Append();
}
/**
* Get the number of files in the list.
* @return The number of files stored in the list.
*/
inline uint Length() const
{
return this->files.Length();
}
/**
* Get a pointer to the first file information.
* @return Address of the first file information.
*/
inline const FiosItem *Begin() const
{
return this->files.Begin();
}
/**
* Get a pointer behind the last file information.
* @return Address behind the last file information.
*/
inline const FiosItem *End() const
{
return this->files.End();
}
/**
* Get a pointer to the indicated file information. File information must exist.
* @return Address of the indicated existing file information.
*/
inline const FiosItem *Get(uint index) const
{
return this->files.Get(index);
}
/**
* Get a pointer to the indicated file information. File information must exist.
* @return Address of the indicated existing file information.
*/
inline FiosItem *Get(uint index)
{
return this->files.Get(index);
}
inline const FiosItem &operator[](uint index) const
{
return this->files[index];
}
/**
* Get a reference to the indicated file information. File information must exist.
* @return The requested file information.
*/
inline FiosItem &operator[](uint index)
{
return this->files[index];
}
/** Remove all items from the list. */
inline void Clear()
{
this->files.Clear();
}
/** Compact the list down to the smallest block size boundary. */
inline void Compact()
{
this->files.Compact();
}
void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop);
const FiosItem *FindItem(const char *file);
SmallVector<FiosItem, 32> files; ///< The list of files.
};
enum SortingBits {
@@ -154,18 +202,14 @@ enum SortingBits {
DECLARE_ENUM_AS_BIT_SET(SortingBits)
/* Variables to display file lists */
extern SmallVector<FiosItem, 32> _fios_items;
extern SmallFiosItem _file_to_saveload;
extern SaveLoadDialogMode _saveload_mode;
extern SortingBits _savegame_sort_order;
void ShowSaveLoadDialog(SaveLoadDialogMode mode);
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop);
void FiosGetSavegameList(SaveLoadDialogMode mode);
void FiosGetScenarioList(SaveLoadDialogMode mode);
void FiosGetHeightmapList(SaveLoadDialogMode mode);
void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list);
void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list);
void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list);
void FiosFreeSavegameList();
const char *FiosBrowseTo(const FiosItem *item);
StringID FiosGetDescText(const char **path, uint64 *total_free);
@@ -173,13 +217,8 @@ bool FiosDelete(const char *name);
void FiosMakeHeightmapName(char *buf, const char *name, const char *last);
void FiosMakeSavegameName(char *buf, const char *name, const char *last);
FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last);
FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last);
int CDECL CompareFiosItems(const FiosItem *a, const FiosItem *b);
extern const TextColour _fios_colours[];
void BuildFileList();
void SetFiosType(const byte fiostype);
#endif /* FIOS_H */

View File

@@ -39,7 +39,6 @@
#include <SDL_android.h>
#endif
SaveLoadDialogMode _saveload_mode;
LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK.
static bool _fios_path_changed;
@@ -194,33 +193,24 @@ static const NWidgetPart _nested_save_dialog_widgets[] = {
EndContainer(),
};
/** Colours for fios types, indexed by #FiosType. */
const TextColour _fios_colours[] = {
TC_LIGHT_BLUE, TC_DARK_GREEN, TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN,
TC_ORANGE, TC_LIGHT_BROWN, TC_ORANGE, TC_ORANGE, TC_YELLOW
/** Text colours of #DetailedFileType fios entries in the window. */
static const TextColour _fios_colours[] = {
TC_LIGHT_BROWN, // DFT_OLD_GAME_FILE
TC_ORANGE, // DFT_GAME_FILE
TC_YELLOW, // DFT_HEIGHTMAP_BMP
TC_ORANGE, // DFT_HEIGHTMAP_PNG
TC_LIGHT_BLUE, // DFT_FIOS_DRIVE
TC_DARK_GREEN, // DFT_FIOS_PARENT
TC_DARK_GREEN, // DFT_FIOS_DIR
TC_ORANGE, // DFT_FIOS_DIRECT
};
void BuildFileList()
{
_fios_path_changed = true;
FiosFreeSavegameList();
switch (_saveload_mode) {
case SLD_LOAD_SCENARIO:
case SLD_SAVE_SCENARIO:
FiosGetScenarioList(_saveload_mode); break;
case SLD_SAVE_HEIGHTMAP:
case SLD_LOAD_HEIGHTMAP:
FiosGetHeightmapList(_saveload_mode); break;
default: FiosGetSavegameList(_saveload_mode); break;
}
/* Invalidate saveload window */
InvalidateWindowData(WC_SAVELOAD, 0, 2, true);
}
static void MakeSortedSaveGameList()
/**
* Sort the collected list save games prior to displaying it in the save/load gui.
* @param [inout] file_list List of save game files found in the directory.
*/
static void SortSaveGameList(FileList &file_list)
{
uint sort_start = 0;
uint sort_end = 0;
@@ -229,7 +219,7 @@ static void MakeSortedSaveGameList()
* Drives (A:\ (windows only) are always under the files (FIOS_TYPE_DRIVE)
* Only sort savegames/scenarios, not directories
*/
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
for (const FiosItem *item = file_list.Begin(); item != file_list.End(); item++) {
switch (item->type) {
case FIOS_TYPE_DIR: sort_start++; break;
case FIOS_TYPE_PARENT: sort_start++; break;
@@ -238,15 +228,18 @@ static void MakeSortedSaveGameList()
}
}
uint s_amount = _fios_items.Length() - sort_start - sort_end;
QSortT(_fios_items.Get(sort_start), s_amount, CompareFiosItems);
uint s_amount = file_list.Length() - sort_start - sort_end;
QSortT(file_list.Get(sort_start), s_amount, CompareFiosItems);
}
struct SaveLoadWindow : public Window {
private:
QueryString filename_editbox; ///< Filename editbox.
AbstractFileType abstract_filetype; /// Type of file to select.
SaveLoadOperation fop; ///< File operation to perform.
FileList fios_items; ///< Save game list.
FiosItem o_dir;
const FiosItem *selected;
const FiosItem *selected; ///< Selected game in #fios_items, or \c NULL.
Scrollbar *vscroll;
public:
@@ -257,39 +250,60 @@ public:
this->filename_editbox.text.UpdateSize();
}
SaveLoadWindow(WindowDesc *desc, SaveLoadDialogMode mode) : Window(desc), filename_editbox(64)
SaveLoadWindow(WindowDesc *desc, AbstractFileType abstract_filetype, SaveLoadOperation fop)
: Window(desc), filename_editbox(64), abstract_filetype(abstract_filetype), fop(fop)
{
static const StringID saveload_captions[] = {
STR_SAVELOAD_LOAD_CAPTION,
STR_SAVELOAD_LOAD_SCENARIO,
STR_SAVELOAD_SAVE_CAPTION,
STR_SAVELOAD_SAVE_SCENARIO,
STR_SAVELOAD_LOAD_HEIGHTMAP,
STR_SAVELOAD_SAVE_HEIGHTMAP,
};
assert((uint)mode < lengthof(saveload_captions));
assert(this->fop == SLO_SAVE || this->fop == SLO_LOAD);
/* Use an array to define what will be the current file type being handled
* by current file mode */
switch (mode) {
case SLD_SAVE_GAME: this->GenerateFileName(); break;
case SLD_SAVE_HEIGHTMAP:
case SLD_SAVE_SCENARIO: this->filename_editbox.text.Assign("UNNAMED"); break;
default: break;
/* For saving, construct an initial file name. */
if (this->fop == SLO_SAVE) {
switch (this->abstract_filetype) {
case FT_SAVEGAME:
this->GenerateFileName();
break;
case FT_SCENARIO:
case FT_HEIGHTMAP:
this->filename_editbox.text.Assign("UNNAMED");
break;
default:
NOT_REACHED();
}
}
this->querystrings[WID_SL_SAVE_OSK_TITLE] = &this->filename_editbox;
this->filename_editbox.ok_button = WID_SL_SAVE_GAME;
this->CreateNestedTree(true);
if (mode == SLD_LOAD_GAME) this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
this->GetWidget<NWidgetCore>(WID_SL_CAPTION)->widget_data = saveload_captions[mode];
this->vscroll = this->GetScrollbar(WID_SL_SCROLLBAR);
if (this->fop == SLO_LOAD && this->abstract_filetype == FT_SAVEGAME) {
this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
}
/* Select caption string of the window. */
StringID caption_string;
switch (this->abstract_filetype) {
case FT_SAVEGAME:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_CAPTION : STR_SAVELOAD_LOAD_CAPTION;
break;
case FT_SCENARIO:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_SCENARIO : STR_SAVELOAD_LOAD_SCENARIO;
break;
case FT_HEIGHTMAP:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_HEIGHTMAP : STR_SAVELOAD_LOAD_HEIGHTMAP;
break;
default:
NOT_REACHED();
}
this->GetWidget<NWidgetCore>(WID_SL_CAPTION)->widget_data = caption_string;
this->vscroll = this->GetScrollbar(WID_SL_SCROLLBAR);
this->FinishInitNested(0);
this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST);
if (mode == SLD_SAVE_GAME) this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
if (this->fop == SLO_SAVE) this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
/* pause is only used in single-player, non-editor mode, non-menu mode. It
* will be unpaused in the WE_DESTROY event handler. */
@@ -302,20 +316,18 @@ public:
ResetObjectToPlace();
/* Select the initial directory. */
o_dir.type = FIOS_TYPE_DIRECT;
switch (_saveload_mode) {
case SLD_SAVE_GAME:
case SLD_LOAD_GAME:
switch (this->abstract_filetype) {
case FT_SAVEGAME:
FioGetDirectory(o_dir.name, lastof(o_dir.name), SAVE_DIR);
break;
case SLD_SAVE_SCENARIO:
case SLD_LOAD_SCENARIO:
case FT_SCENARIO:
FioGetDirectory(o_dir.name, lastof(o_dir.name), SCENARIO_DIR);
break;
case SLD_SAVE_HEIGHTMAP:
case SLD_LOAD_HEIGHTMAP:
case FT_HEIGHTMAP:
FioGetDirectory(o_dir.name, lastof(o_dir.name), HEIGHTMAP_DIR);
break;
@@ -324,9 +336,7 @@ public:
}
/* Focus the edit box by default in the save windows */
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP) {
this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE);
}
if (this->fop == SLO_SAVE) this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE);
}
virtual ~SaveLoadWindow()
@@ -335,7 +345,6 @@ public:
if (!_networking && _game_mode != GM_EDITOR && _game_mode != GM_MENU) {
DoCommandP(0, PM_PAUSED_SAVELOAD, 0, CMD_PAUSE);
}
FiosFreeSavegameList();
}
virtual void DrawWidget(const Rect &r, int widget) const
@@ -368,13 +377,13 @@ public:
GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, PC_BLACK);
uint y = r.top + WD_FRAMERECT_TOP;
for (uint pos = this->vscroll->GetPosition(); pos < _fios_items.Length(); pos++) {
const FiosItem *item = _fios_items.Get(pos);
for (uint pos = this->vscroll->GetPosition(); pos < this->fios_items.Length(); pos++) {
const FiosItem *item = this->fios_items.Get(pos);
if (item == this->selected) {
GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE);
}
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height), item->title, _fios_colours[item->type]);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height), item->title, _fios_colours[GetDetailedFileType(item->type)]);
y += this->resize.step_height;
if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
}
@@ -429,7 +438,7 @@ public:
if (y > y_max) break;
/* Hide current date for scenarios */
if (_saveload_mode != SLD_LOAD_SCENARIO && _saveload_mode != SLD_SAVE_SCENARIO) {
if (this->abstract_filetype != FT_SCENARIO) {
/* Current date */
SetDParam(0, _load_check_data.current_date);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_NETWORK_SERVER_LIST_CURRENT_DATE);
@@ -437,7 +446,7 @@ public:
}
/* Hide the NewGRF stuff when saving. We also hide the button. */
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
if (this->fop == SLO_LOAD && (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO)) {
y += WD_PAR_VSEP_NORMAL;
if (y > y_max) break;
@@ -450,7 +459,7 @@ public:
if (y > y_max) break;
/* Hide the company stuff for scenarios */
if (_saveload_mode != SLD_LOAD_SCENARIO && _saveload_mode != SLD_SAVE_SCENARIO) {
if (this->abstract_filetype != FT_SCENARIO) {
y += FONT_HEIGHT_NORMAL;
if (y > y_max) break;
@@ -503,10 +512,10 @@ public:
{
if (_savegame_sort_dirty) {
_savegame_sort_dirty = false;
MakeSortedSaveGameList();
SortSaveGameList(this->fios_items);
}
this->vscroll->SetCount(_fios_items.Length());
this->vscroll->SetCount(this->fios_items.Length());
this->DrawWidgets();
}
@@ -535,14 +544,14 @@ public:
case WID_SL_LOAD_BUTTON:
if (this->selected != NULL && !_load_check_data.HasErrors()) {
const char *name = FiosBrowseTo(this->selected);
SetFiosType(this->selected->type);
_file_to_saveload.SetMode(this->selected->type);
_file_to_saveload.SetName(name);
_file_to_saveload.SetTitle(this->selected->title);
strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, this->selected->title, lastof(_file_to_saveload.title));
if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
if (this->abstract_filetype == FT_HEIGHTMAP) {
delete this;
ShowHeightmapLoad();
} else if (!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
ClearErrorMessages();
@@ -571,7 +580,7 @@ public:
int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP);
if (y == INT_MAX) return;
const FiosItem *file = _fios_items.Get(y);
const FiosItem *file = this->fios_items.Get(y);
const char *name = FiosBrowseTo(file);
if (name != NULL) {
@@ -580,28 +589,32 @@ public:
this->selected = file;
_load_check_data.Clear();
if (file->type == FIOS_TYPE_FILE || file->type == FIOS_TYPE_SCENARIO) {
SaveOrLoad(name, SL_LOAD_CHECK, NO_DIRECTORY, false);
if (GetDetailedFileType(file->type) == DFT_GAME_FILE) {
/* Other detailed file types cannot be checked before. */
SaveOrLoad(name, SLO_CHECK, DFT_GAME_FILE, NO_DIRECTORY, false);
}
this->InvalidateData(1);
}
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP) {
if (this->fop == SLO_SAVE) {
/* Copy clicked name to editbox */
this->filename_editbox.text.Assign(file->title);
this->SetWidgetDirty(WID_SL_SAVE_OSK_TITLE);
}
} else if (!_load_check_data.HasErrors()) {
this->selected = file;
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
this->OnClick(pt, WID_SL_LOAD_BUTTON, 1);
} else if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
SetFiosType(file->type);
strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, file->title, lastof(_file_to_saveload.title));
if (this->fop == SLO_LOAD) {
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
this->OnClick(pt, WID_SL_LOAD_BUTTON, 1);
} else {
assert(this->abstract_filetype == FT_HEIGHTMAP);
_file_to_saveload.SetMode(file->type);
_file_to_saveload.SetName(name);
_file_to_saveload.SetTitle(file->title);
delete this;
ShowHeightmapLoad();
delete this;
ShowHeightmapLoad();
}
}
}
} else {
@@ -616,10 +629,11 @@ public:
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
#if defined(ENABLE_NETWORK)
switch (_saveload_mode) {
assert(this->fop == SLO_LOAD);
switch (this->abstract_filetype) {
default: NOT_REACHED();
case SLD_LOAD_SCENARIO: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_SCENARIO); break;
case SLD_LOAD_HEIGHTMAP: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_HEIGHTMAP); break;
case FT_SCENARIO: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_SCENARIO); break;
case FT_HEIGHTMAP: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_HEIGHTMAP); break;
}
#endif
}
@@ -647,15 +661,10 @@ public:
break;
}
#endif
_load_check_data.Clear();
SaveOrLoadResult res = SaveOrLoad(savePath, SL_LOAD_CHECK, SAVE_DIR, false);
if (res == SL_OK && !_load_check_data.HasErrors()) {
strecpy(_file_to_saveload.name, savePath, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, "", lastof(_file_to_saveload.title));
if (!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
}
}
_file_to_saveload.SetMode(FIOS_TYPE_FILE);
_file_to_saveload.SetName(savePath);
_file_to_saveload.SetTitle("Network Save");
_switch_mode = SM_LOAD_GAME;
break;
}
}
@@ -673,9 +682,8 @@ public:
virtual void OnTimeout()
{
/* This test protects against using widgets 11 and 12 which are only available
* in those saveload modes. */
if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP)) return;
/* Widgets WID_SL_DELETE_SELECTION and WID_SL_SAVE_GAME only exist when saving to a file. */
if (this->fop != SLO_SAVE) return;
if (this->IsWidgetLowered(WID_SL_DELETE_SELECTION)) { // Delete button clicked
if (!FiosDelete(this->filename_editbox.text.buf)) {
@@ -683,10 +691,10 @@ public:
} else {
this->InvalidateData();
/* Reset file name to current date on successful delete */
if (_saveload_mode == SLD_SAVE_GAME) GenerateFileName();
if (this->abstract_filetype == FT_SAVEGAME) GenerateFileName();
}
} else if (this->IsWidgetLowered(WID_SL_SAVE_GAME)) { // Save button clicked
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
_switch_mode = SM_SAVE_GAME;
FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
} else {
@@ -717,28 +725,40 @@ public:
this->selected = NULL;
_load_check_data.Clear();
if (!gui_scope) break;
BuildFileList();
_fios_path_changed = true;
this->fios_items.BuildFileList(this->abstract_filetype, this->fop);
this->vscroll->SetCount(this->fios_items.Length());
this->selected = NULL;
_load_check_data.Clear();
/* FALL THROUGH */
case 1:
/* Selection changes */
if (!gui_scope) break;
if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors());
if (this->fop != SLO_LOAD) break;
switch (this->abstract_filetype) {
case FT_HEIGHTMAP:
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors());
break;
case FT_SAVEGAME:
case FT_SCENARIO: {
bool disabled = this->selected == NULL || _load_check_data.HasErrors();
if (!_settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
disabled |= _load_check_data.HasNewGrfs() && _load_check_data.grf_compatibility == GLC_NOT_FOUND;
}
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, disabled);
this->SetWidgetDisabledState(WID_SL_NEWGRF_INFO, !_load_check_data.HasNewGrfs());
this->SetWidgetDisabledState(WID_SL_MISSING_NEWGRFS,
!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility == GLC_ALL_GOOD);
break;
}
default:
NOT_REACHED();
}
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON,
this->selected == NULL || _load_check_data.HasErrors() || !(!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
this->SetWidgetDisabledState(WID_SL_NEWGRF_INFO,
!_load_check_data.HasNewGrfs());
this->SetWidgetDisabledState(WID_SL_MISSING_NEWGRFS,
!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility == GLC_ALL_GOOD);
}
break;
case 2:
/* _fios_items changed */
this->vscroll->SetCount(_fios_items.Length());
this->selected = NULL;
_load_check_data.Clear();
break;
}
}
@@ -768,70 +788,24 @@ static WindowDesc _save_dialog_desc(
_nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
);
/**
* These values are used to convert the file/operations mode into a corresponding file type.
* So each entry, as expressed by the related comment, is based on the enum
*/
static const FileType _file_modetotype[] = {
FT_SAVEGAME, // used for SLD_LOAD_GAME
FT_SCENARIO, // used for SLD_LOAD_SCENARIO
FT_SAVEGAME, // used for SLD_SAVE_GAME
FT_SCENARIO, // used for SLD_SAVE_SCENARIO
FT_HEIGHTMAP, // used for SLD_LOAD_HEIGHTMAP
FT_HEIGHTMAP, // used for SLD_SAVE_HEIGHTMAP
};
/**
* Launch save/load dialog in the given mode.
* @param mode Save/load mode.
* @param abstract_filetype Kind of file to handle.
* @param fop File operation to perform (load or save).
*/
void ShowSaveLoadDialog(SaveLoadDialogMode mode)
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop)
{
DeleteWindowById(WC_SAVELOAD, 0);
WindowDesc *sld;
switch (mode) {
case SLD_SAVE_GAME:
case SLD_SAVE_SCENARIO:
case SLD_SAVE_HEIGHTMAP:
sld = &_save_dialog_desc; break;
case SLD_LOAD_HEIGHTMAP:
sld = &_load_heightmap_dialog_desc; break;
default:
sld = &_load_dialog_desc; break;
if (fop == SLO_SAVE) {
sld = &_save_dialog_desc;
} else {
/* Dialogue for loading a file. */
sld = (abstract_filetype == FT_HEIGHTMAP) ? &_load_heightmap_dialog_desc : &_load_dialog_desc;
}
_saveload_mode = mode;
_file_to_saveload.filetype = _file_modetotype[mode];
_file_to_saveload.abstract_ftype = abstract_filetype;
new SaveLoadWindow(sld, mode);
}
void SetFiosType(const byte fiostype)
{
switch (fiostype) {
case FIOS_TYPE_FILE:
case FIOS_TYPE_SCENARIO:
_file_to_saveload.mode = SL_LOAD;
break;
case FIOS_TYPE_OLDFILE:
case FIOS_TYPE_OLD_SCENARIO:
_file_to_saveload.mode = SL_OLD_LOAD;
break;
#ifdef WITH_PNG
case FIOS_TYPE_PNG:
_file_to_saveload.mode = SL_PNG;
break;
#endif /* WITH_PNG */
case FIOS_TYPE_BMP:
_file_to_saveload.mode = SL_BMP;
break;
default:
_file_to_saveload.mode = SL_INVALID;
break;
}
new SaveLoadWindow(sld, abstract_filetype, fop);
}

View File

@@ -25,7 +25,7 @@
static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0;
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0;
}
#if defined(WIN32)

View File

@@ -14,9 +14,6 @@
#include "../core/smallvec_type.hpp"
/** The tab we place our strings in. */
static const uint GAME_TEXT_TAB = 18;
const char *GetGameStringPtr(uint id);
void RegisterGameTranslation(class Squirrel *engine);
void ReconsiderGameScriptLanguage();

View File

@@ -77,7 +77,7 @@ static void CleanupGeneration()
{
_generating_world = false;
if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
SetMouseCursorBusy(false);
/* Show all vital windows again, because we have hidden them */
if (_gw.threaded && _game_mode != GM_MENU) ShowVitalWindows();
SetModalProgress(false);
@@ -204,7 +204,7 @@ static void _GenerateWorld(void *)
if (_debug_desync_level > 0) {
char name[MAX_PATH];
seprintf(name, lastof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR, false);
SaveOrLoad(name, SLO_SAVE, DFT_GAME_FILE, AUTOSAVE_DIR, false);
}
} catch (...) {
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP, true);
@@ -331,7 +331,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
_gw.thread = NULL;
}
if (!VideoDriver::GetInstance()->HasGUI() || !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) {
if (!VideoDriver::GetInstance()->HasGUI() || !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread, "ottd:genworld")) {
DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
_gw.threaded = false;
_modal_progress_work_mutex->EndCritical();

View File

@@ -26,6 +26,7 @@
#include "town.h"
#include "core/geometry_func.hpp"
#include "core/random_func.hpp"
#include "saveload/saveload.h"
#include "progress.h"
#include "error.h"
#include "settings_gui.h"
@@ -81,29 +82,25 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
/* Left column with labels. */
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAPSIZE, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_LAND_GENERATOR, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TERRAIN_TYPE, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_VARIETY, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_QUANTITY_OF_SEA_LAKES, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BORDER_TYPE, STR_NULL), SetFill(1, 1),
EndContainer(),
/* Widgets at the right of the labels. */
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
/* Mapsize X * Y. */
NWidget(NWID_HORIZONTAL), SetPIP(0, 4, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_LANDSCAPE_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TOWN_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TERRAIN_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_VARIETY_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_WATER_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TREE_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_BORDERS_RANDOM), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL), SetPIP(0, 4, 0),
@@ -115,6 +112,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SMOOTHNESS, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_QUANTITY_OF_RIVERS, STR_NULL), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BORDER_TYPE, STR_NULL), SetFill(1, 1),
EndContainer(),
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
/* Max. heightlevel. */
@@ -138,6 +136,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_INDUSTRY_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_SMOOTHNESS_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_RIVER_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_BORDERS_RANDOM), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
EndContainer(),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREEN, WID_GL_GENERATE_BUTTON), SetMinimalSize(84, 0), SetDataTip(STR_MAPGEN_GENERATE, STR_NULL), SetFill(1, 1),
@@ -146,28 +145,10 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
/* Map borders buttons for each edge. */
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10),
NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_NW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHWEST), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_NE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHEAST), SetFill(1, 1),
NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10),
NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_SW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHWEST), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_SE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHEAST), SetFill(1, 1),
NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0),
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
EndContainer(),
@@ -836,7 +817,7 @@ static void _ShowGenerateLandscape(GenerateLandscapeWindowMode mode)
if (mode == GLWM_HEIGHTMAP) {
/* If the function returns negative, it means there was a problem loading the heightmap */
if (!GetHeightmapDimensions(_file_to_saveload.name, &x, &y)) return;
if (!GetHeightmapDimensions(_file_to_saveload.detail_ftype, _file_to_saveload.name, &x, &y)) return;
}
WindowDesc *desc = (mode == GLWM_HEIGHTMAP) ? &_heightmap_load_desc : &_generate_landscape_desc;
@@ -1201,7 +1182,7 @@ struct GenerateProgressWindow : public Window {
{
switch (widget) {
case WID_GP_ABORT:
if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
SetMouseCursorBusy(false);
ShowQuery(
STR_GENERATION_ABORT_CAPTION,
STR_GENERATION_ABORT_MESSAGE,

View File

@@ -47,6 +47,7 @@ Point _right_button_down_pos; ///< Pos of right mouse button click, for drag and
DrawPixelInfo _screen;
bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
bool _exit_game;
bool _restart_game;
GameMode _game_mode;
SwitchMode _switch_mode; ///< The next mainloop command.
PauseModeByte _pause_mode;
@@ -1268,10 +1269,6 @@ void DrawMouseCursor()
if (_screen.dst_ptr == NULL) return;
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
int x;
int y;
int w;
int h;
/* Redraw mouse cursor but only when it's inside the window */
if (!_cursor.in_window) return;
@@ -1282,36 +1279,44 @@ void DrawMouseCursor()
UndrawMouseCursor();
}
w = _cursor.size.x;
x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset;
if (x < 0) {
w += x;
x = 0;
/* Determine visible area */
int left = _cursor.pos.x + _cursor.total_offs.x;
int width = _cursor.total_size.x;
if (left < 0) {
width += left;
left = 0;
}
if (w > _screen.width - x) w = _screen.width - x;
if (w <= 0) return;
_cursor.draw_pos.x = x;
_cursor.draw_size.x = w;
h = _cursor.size.y;
y = _cursor.pos.y + _cursor.offs.y;
if (y < 0) {
h += y;
y = 0;
if (left + width > _screen.width) {
width = _screen.width - left;
}
if (h > _screen.height - y) h = _screen.height - y;
if (h <= 0) return;
_cursor.draw_pos.y = y;
_cursor.draw_size.y = h;
if (width <= 0) return;
uint8 *buffer = _cursor_backup.Allocate(blitter->BufferSize(w, h));
int top = _cursor.pos.y + _cursor.total_offs.y;
int height = _cursor.total_size.y;
if (top < 0) {
height += top;
top = 0;
}
if (top + height > _screen.height) {
height = _screen.height - top;
}
if (height <= 0) return;
_cursor.draw_pos.x = left;
_cursor.draw_pos.y = top;
_cursor.draw_size.x = width;
_cursor.draw_size.y = height;
uint8 *buffer = _cursor_backup.Allocate(blitter->BufferSize(_cursor.draw_size.x, _cursor.draw_size.y));
/* Make backup of stuff below cursor */
blitter->CopyToBuffer(blitter->MoveTo(_screen.dst_ptr, _cursor.draw_pos.x, _cursor.draw_pos.y), buffer, _cursor.draw_size.x, _cursor.draw_size.y);
/* Draw cursor on screen */
_cur_dpi = &_screen;
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y);
for (uint i = 0; i < _cursor.sprite_count; ++i) {
DrawSprite(_cursor.sprite_seq[i].sprite, _cursor.sprite_seq[i].pal, _cursor.pos.x + _cursor.sprite_pos[i].x, _cursor.pos.y + _cursor.sprite_pos[i].y);
}
VideoDriver::GetInstance()->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
@@ -1570,15 +1575,33 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
*/
void UpdateCursorSize()
{
CursorVars *cv = &_cursor;
const Sprite *p = GetSprite(GB(cv->sprite, 0, SPRITE_WIDTH), ST_NORMAL);
/* Ignore setting any cursor before the sprites are loaded. */
if (GetMaxSpriteID() == 0) return;
cv->size.y = UnScaleGUI(p->height);
cv->size.x = UnScaleGUI(p->width);
cv->offs.x = UnScaleGUI(p->x_offs);
cv->offs.y = UnScaleGUI(p->y_offs);
assert_compile(lengthof(_cursor.sprite_seq) == lengthof(_cursor.sprite_pos));
assert(_cursor.sprite_count <= lengthof(_cursor.sprite_seq));
for (uint i = 0; i < _cursor.sprite_count; ++i) {
const Sprite *p = GetSprite(GB(_cursor.sprite_seq[i].sprite, 0, SPRITE_WIDTH), ST_NORMAL);
Point offs, size;
offs.x = UnScaleGUI(p->x_offs) + _cursor.sprite_pos[i].x;
offs.y = UnScaleGUI(p->y_offs) + _cursor.sprite_pos[i].y;
size.x = UnScaleGUI(p->width);
size.y = UnScaleGUI(p->height);
cv->dirty = true;
if (i == 0) {
_cursor.total_offs = offs;
_cursor.total_size = size;
} else {
int right = max(_cursor.total_offs.x + _cursor.total_size.x, offs.x + size.x);
int bottom = max(_cursor.total_offs.y + _cursor.total_size.y, offs.y + size.y);
if (offs.x < _cursor.total_offs.x) _cursor.total_offs.x = offs.x;
if (offs.y < _cursor.total_offs.y) _cursor.total_offs.y = offs.y;
_cursor.total_size.x = right - _cursor.total_offs.x;
_cursor.total_size.y = bottom - _cursor.total_offs.y;
}
}
_cursor.dirty = true;
}
/**
@@ -1588,14 +1611,15 @@ void UpdateCursorSize()
*/
static void SetCursorSprite(CursorID cursor, PaletteID pal)
{
CursorVars *cv = &_cursor;
if (cv->sprite == cursor) return;
if (_cursor.sprite_count == 1 && _cursor.sprite_seq[0].sprite == cursor && _cursor.sprite_seq[0].pal == pal) return;
_cursor.sprite_count = 1;
_cursor.sprite_seq[0].sprite = cursor;
_cursor.sprite_seq[0].pal = pal;
_cursor.sprite_pos[0].x = 0;
_cursor.sprite_pos[0].y = 0;
cv->sprite = cursor;
cv->pal = pal;
UpdateCursorSize();
cv->short_vehicle_offset = 0;
}
static void SwitchAnimatedCursor()
@@ -1604,7 +1628,7 @@ static void SwitchAnimatedCursor()
if (cur == NULL || cur->sprite == AnimCursor::LAST) cur = _cursor.animate_list;
SetCursorSprite(cur->sprite, _cursor.pal);
SetCursorSprite(cur->sprite, _cursor.sprite_seq[0].pal);
_cursor.animate_timeout = cur->display_time;
_cursor.animate_cur = cur + 1;
@@ -1617,6 +1641,19 @@ void CursorTick()
}
}
/**
* Set or unset the ZZZ cursor.
* @param busy Whether to show the ZZZ cursor.
*/
void SetMouseCursorBusy(bool busy)
{
if (busy) {
if (_cursor.sprite_seq[0].sprite == SPR_CURSOR_MOUSE) SetMouseCursor(SPR_CURSOR_ZZZ, PAL_NONE);
} else {
if (_cursor.sprite_seq[0].sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
}
}
/**
* Assign a single non-animated sprite to the cursor.
* @param sprite Sprite to draw for the cursor.
@@ -1640,7 +1677,7 @@ void SetAnimatedMouseCursor(const AnimCursor *table)
{
_cursor.animate_list = table;
_cursor.animate_cur = NULL;
_cursor.pal = PAL_NONE;
_cursor.sprite_seq[0].pal = PAL_NONE;
SwitchAnimatedCursor();
}

View File

@@ -152,6 +152,7 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
/* window.cpp */
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
void SetMouseCursorBusy(bool busy);
void SetMouseCursor(CursorID cursor, PaletteID pal);
void SetAnimatedMouseCursor(const AnimCursor *table);
void CursorTick();
@@ -167,16 +168,16 @@ void GetBroadestDigit(uint *front, uint *next, FontSize size = FS_NORMAL);
int GetCharacterHeight(FontSize size);
/** Height of characters in the small (#FS_SMALL) font. */
/** Height of characters in the small (#FS_SMALL) font. @note Some characters may be oversized. */
#define FONT_HEIGHT_SMALL (GetCharacterHeight(FS_SMALL))
/** Height of characters in the normal (#FS_NORMAL) font. */
/** Height of characters in the normal (#FS_NORMAL) font. @note Some characters may be oversized. */
#define FONT_HEIGHT_NORMAL (GetCharacterHeight(FS_NORMAL))
/** Height of characters in the large (#FS_LARGE) font. */
/** Height of characters in the large (#FS_LARGE) font. @note Some characters may be oversized. */
#define FONT_HEIGHT_LARGE (GetCharacterHeight(FS_LARGE))
/** Height of characters in the large (#FS_MONO) font. */
/** Height of characters in the large (#FS_MONO) font. @note Some characters may be oversized. */
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
int InitTempMargin(int left, int right, bool to_end_line);

View File

@@ -115,29 +115,35 @@ struct AnimCursor {
/** Collection of variables for cursor-display and -animation */
struct CursorVars {
Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
int short_vehicle_offset; ///< offset of the X for short vehicles
CursorID sprite; ///< current image of cursor
PaletteID pal;
int wheel; ///< mouse wheel movement
/* Logical mouse position */
Point pos; ///< logical mouse position
Point delta; ///< relative mouse movement in this tick
int wheel; ///< mouse wheel movement
bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling)
/* We need two different vars to keep track of how far the scrollwheel moved.
* OSX uses this for scrolling around the map. */
int v_wheel;
int h_wheel;
/* Mouse appearance */
PalSpriteID sprite_seq[16]; ///< current image of cursor
Point sprite_pos[16]; ///< relative position of individual sprites
uint sprite_count; ///< number of sprites to draw
Point total_offs, total_size; ///< union of sprite properties
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
const AnimCursor *animate_list; ///< in case of animated cursor, list of frames
const AnimCursor *animate_cur; ///< in case of animated cursor, current frame
uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current cursor
bool visible; ///< cursor is visible
bool dirty; ///< the rect occupied by the mouse is dirty (redraw)
bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling)
bool in_window; ///< mouse inside this window, determines drawing logic
bool visible; ///< cursor is visible
bool dirty; ///< the rect occupied by the mouse is dirty (redraw)
bool in_window; ///< mouse inside this window, determines drawing logic
bool vehchain; ///< vehicle chain is dragged
/* Drag data */
bool vehchain; ///< vehicle chain is dragged
bool UpdateCursorPosition(int x, int y, bool queued_warp);

View File

@@ -197,31 +197,49 @@ static void LoadSpriteTables()
InitializeUnicodeGlyphMap();
/*
* Load the base NewGRF with OTTD required graphics as first NewGRF.
* Load the base and extra NewGRF with OTTD required graphics as first NewGRF.
* However, we do not want it to show up in the list of used NewGRFs,
* so we have to manually add it, and then remove it later.
*/
GRFConfig *top = _grfconfig;
GRFConfig *master = new GRFConfig(used_set->files[GFT_EXTRA].filename);
/* Default extra graphics */
GRFConfig *master = new GRFConfig("OPENTTD.GRF");
master->palette |= GRFP_GRF_DOS;
FillGRFDetails(master, false, BASESET_DIR);
ClrBit(master->flags, GCF_INIT_ONLY);
/* Baseset extra graphics */
GRFConfig *extra = new GRFConfig(used_set->files[GFT_EXTRA].filename);
/* We know the palette of the base set, so if the base NewGRF is not
* setting one, use the palette of the base set and not the global
* one which might be the wrong palette for this base NewGRF.
* The value set here might be overridden via action14 later. */
switch (used_set->palette) {
case PAL_DOS: master->palette |= GRFP_GRF_DOS; break;
case PAL_WINDOWS: master->palette |= GRFP_GRF_WINDOWS; break;
case PAL_DOS: extra->palette |= GRFP_GRF_DOS; break;
case PAL_WINDOWS: extra->palette |= GRFP_GRF_WINDOWS; break;
default: break;
}
FillGRFDetails(master, false, BASESET_DIR);
FillGRFDetails(extra, false, BASESET_DIR);
ClrBit(extra->flags, GCF_INIT_ONLY);
ClrBit(master->flags, GCF_INIT_ONLY);
master->next = top;
extra->next = top;
master->next = extra;
_grfconfig = master;
LoadNewGRF(SPR_NEWGRFS_BASE, i);
LoadNewGRF(SPR_NEWGRFS_BASE, i, 2);
uint total_extra_graphics = SPR_NEWGRFS_BASE - SPR_OPENTTD_BASE;
_missing_extra_graphics = GetSpriteCountForSlot(i, SPR_OPENTTD_BASE, SPR_NEWGRFS_BASE);
DEBUG(sprite, 1, "%u extra sprites, %u from baseset, %u from fallback", total_extra_graphics, total_extra_graphics - _missing_extra_graphics, _missing_extra_graphics);
/* The original baseset extra graphics intentionally make use of the fallback graphics.
* Let's say everything which provides less than 500 sprites misses the rest intentionally. */
if (500 + _missing_extra_graphics > total_extra_graphics) _missing_extra_graphics = 0;
/* Free and remove the top element. */
delete extra;
delete master;
_grfconfig = top;
}
@@ -272,6 +290,8 @@ static bool SwitchNewGRFBlitter()
const bool animation_wanted = HasBit(_display_opt, DO_FULL_ANIMATION);
const char *cur_blitter = BlitterFactory::GetCurrentBlitter()->GetName();
VideoDriver::GetInstance()->AcquireBlitterLock();
for (uint i = 0; i < lengthof(replacement_blitters); i++) {
if (animation_wanted && (replacement_blitters[i].animation == 0)) continue;
if (!animation_wanted && (replacement_blitters[i].animation == 1)) continue;
@@ -280,7 +300,10 @@ static bool SwitchNewGRFBlitter()
if (!IsInsideMM(depth_wanted_by_grf, replacement_blitters[i].min_grf_depth, replacement_blitters[i].max_grf_depth + 1)) continue;
const char *repl_blitter = replacement_blitters[i].name;
if (strcmp(repl_blitter, cur_blitter) == 0) return false;
if (strcmp(repl_blitter, cur_blitter) == 0) {
VideoDriver::GetInstance()->ReleaseBlitterLock();
return false;
}
if (BlitterFactory::GetBlitterFactory(repl_blitter) == NULL) continue;
DEBUG(misc, 1, "Switching blitter from '%s' to '%s'... ", cur_blitter, repl_blitter);
@@ -295,6 +318,8 @@ static bool SwitchNewGRFBlitter()
if (BlitterFactory::SelectBlitter(cur_blitter) == NULL || !VideoDriver::GetInstance()->AfterBlitterChange()) usererror("Failed to reinitialize video driver. Specify a fixed blitter in the config");
}
VideoDriver::GetInstance()->ReleaseBlitterLock();
return true;
}

View File

@@ -473,7 +473,7 @@ protected:
format_str_y_axis(format_str_y_axis)
{
SetWindowDirty(WC_GRAPH_LEGEND, 0);
this->num_vert_lines = 24;
this->num_vert_lines = 12;
this->graph_widget = widget;
}
@@ -632,7 +632,6 @@ static const NWidgetPart _nested_operating_profit_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -642,6 +641,7 @@ static const NWidgetPart _nested_operating_profit_widgets[] = {
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 160), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
@@ -683,7 +683,6 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -693,6 +692,7 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
@@ -732,7 +732,6 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -742,6 +741,7 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),
@@ -787,8 +787,6 @@ static const NWidgetPart _nested_performance_history_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -798,6 +796,8 @@ static const NWidgetPart _nested_performance_history_widgets[] = {
NWidget(WWT_EMPTY, COLOUR_GREY, WID_PHG_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_PHG_RESIZE),
EndContainer(),
EndContainer(),
@@ -837,7 +837,6 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -847,6 +846,7 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = {
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
EndContainer(),
EndContainer(),

View File

@@ -191,7 +191,7 @@ private:
uint ComputeGroupInfoSize()
{
this->column_size[VGC_NAME] = maxdim(GetStringBoundingBox(STR_GROUP_DEFAULT_TRAINS + this->vli.vtype), GetStringBoundingBox(STR_GROUP_ALL_TRAINS + this->vli.vtype));
/* We consider the max average length of characters to be the one of "a" */
/* We consider the max average length of characters to be the one of "a" */
this->column_size[VGC_NAME].width = max(GetCharacterWidth(FS_NORMAL, 97) * (MAX_LENGTH_GROUP_NAME_CHARS - 4), this->column_size[VGC_NAME].width);
this->tiny_step_height = max(11U, this->column_size[VGC_NAME].height);
@@ -218,7 +218,7 @@ private:
this->tiny_step_height = GetMinSizing(NWST_STEP, this->tiny_step_height);
return WD_FRAMERECT_LEFT + 8 +
this->column_size[VGC_NAME].width + 2 +
this->column_size[VGC_NAME].width + 8 +
this->column_size[VGC_PROTECT].width + 2 +
this->column_size[VGC_AUTOREPLACE].width + 2 +
this->column_size[VGC_PROFIT].width + 2 +
@@ -250,7 +250,6 @@ private:
bool rtl = _current_text_dir == TD_RTL;
/* draw group name */
int longer_name = 0;
StringID str;
if (IsAllGroupID(g_id)) {
str = STR_GROUP_ALL_TRAINS + this->vli.vtype;
@@ -259,16 +258,12 @@ private:
} else {
SetDParam(0, g_id);
str = STR_GROUP_NAME;
if (!protection) {
longer_name += this->column_size[VGC_PROTECT].width + 2;
if (!stats.autoreplace_defined) longer_name += this->column_size[VGC_AUTOREPLACE].width + 2;
}
}
int x = rtl ? right - WD_FRAMERECT_RIGHT - 8 - this->column_size[VGC_NAME].width - longer_name + 1 : left + WD_FRAMERECT_LEFT + 8;
DrawString(x + indent * LEVEL_WIDTH, x + this->column_size[VGC_NAME].width + longer_name - 1, y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour);
int x = rtl ? right - WD_FRAMERECT_RIGHT - 8 - this->column_size[VGC_NAME].width + 1 : left + WD_FRAMERECT_LEFT + 8;
DrawString(x + indent * LEVEL_WIDTH, x + this->column_size[VGC_NAME].width - 1, y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour);
/* draw autoreplace protection */
x = rtl ? x - 2 - this->column_size[VGC_PROTECT].width : x + 2 + this->column_size[VGC_NAME].width;
x = rtl ? x - 8 - this->column_size[VGC_PROTECT].width : x + 8 + this->column_size[VGC_NAME].width;
if (protection) DrawSprite(SPR_GROUP_REPLACE_PROTECT, PAL_NONE, x, y + (this->tiny_step_height - this->column_size[VGC_PROTECT].height) / 2);
/* draw autoreplace status */
@@ -520,15 +515,15 @@ public:
{
switch (widget) {
case WID_GL_ALL_VEHICLES:
DrawGroupInfo(r.top, r.left, r.right, ALL_GROUP);
DrawGroupInfo(r.top + WD_FRAMERECT_TOP, r.left, r.right, ALL_GROUP);
break;
case WID_GL_DEFAULT_VEHICLES:
DrawGroupInfo(r.top, r.left, r.right, DEFAULT_GROUP);
DrawGroupInfo(r.top + WD_FRAMERECT_TOP, r.left, r.right, DEFAULT_GROUP);
break;
case WID_GL_LIST_GROUP: {
int y1 = r.top;
int y1 = r.top + WD_FRAMERECT_TOP;
int max = min(this->group_sb->GetPosition() + this->group_sb->GetCapacity(), this->groups.Length());
for (int i = this->group_sb->GetPosition(); i < max; ++i) {
const Group *g = this->groups[i];
@@ -627,8 +622,8 @@ public:
this->vehicle_sel = v->index;
int image = v->GetImage(_current_text_dir == TD_RTL ? DIR_E : DIR_W, EIT_IN_LIST);
SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
SetMouseCursorVehicle(v, EIT_IN_LIST);
_cursor.vehchain = true;
this->SetDirty();

View File

@@ -102,7 +102,7 @@ static void ReadHeightmapPNGImageData(byte *map, png_structp png_ptr, png_infop
* If map == NULL only the size of the PNG is read, otherwise a map
* with grayscale pixels is allocated and assigned to *map.
*/
static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightmapPNG(const char *filename, uint *x, uint *y, byte **map)
{
FILE *fp;
png_structp png_ptr = NULL;
@@ -232,7 +232,7 @@ static void ReadHeightmapBMPImageData(byte *map, BmpInfo *info, BmpData *data)
* If map == NULL only the size of the BMP is read, otherwise a map
* with grayscale pixels is allocated and assigned to *map.
*/
static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightmapBMP(const char *filename, uint *x, uint *y, byte **map)
{
FILE *f;
BmpInfo info;
@@ -444,45 +444,56 @@ void FixSlopes()
}
/**
* Reads the heightmap with the correct file reader
* Reads the heightmap with the correct file reader.
* @param dft Type of image file.
* @param filename Name of the file to load.
* @param [out] x Length of the image.
* @param [out] y Height of the image.
* @param [inout] map If not \c NULL, destination to store the loaded block of image data.
* @return Whether loading was successful.
*/
static bool ReadHeightMap(char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map)
{
switch (_file_to_saveload.mode) {
default: NOT_REACHED();
switch (dft) {
default:
NOT_REACHED();
#ifdef WITH_PNG
case SL_PNG:
case DFT_HEIGHTMAP_PNG:
return ReadHeightmapPNG(filename, x, y, map);
#endif /* WITH_PNG */
case SL_BMP:
case DFT_HEIGHTMAP_BMP:
return ReadHeightmapBMP(filename, x, y, map);
}
}
/**
* Get the dimensions of a heightmap.
* @param dft Type of image file.
* @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)
bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y)
{
return ReadHeightMap(filename, x, y, NULL);
return ReadHeightMap(dft, 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 dft Type of image file.
* @param filename of the heightmap file to be imported
*/
void LoadHeightmap(char *filename)
void LoadHeightmap(DetailedFileType dft, const char *filename)
{
uint x, y;
byte *map = NULL;
if (!ReadHeightMap(filename, &x, &y, &map)) {
if (!ReadHeightMap(dft, filename, &x, &y, &map)) {
free(map);
return;
}

View File

@@ -12,6 +12,8 @@
#ifndef HEIGHTMAP_H
#define HEIGHTMAP_H
#include "fileio_type.h"
/**
* Order of these enums has to be the same as in lang/english.txt
* Otherwise you will get inconsistent behaviour.
@@ -21,8 +23,8 @@ enum HeightmapRotation {
HM_CLOCKWISE, ///< Rotate the map clockwise 45 degrees
};
bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
void LoadHeightmap(char *filename);
bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y);
void LoadHeightmap(DetailedFileType dft, const char *filename);
void FlatEmptyWorld(byte tile_height);
void FixSlopes();

View File

@@ -491,7 +491,12 @@ static CommandCost ClearTile_Industry(TileIndex tile, DoCommandFlag flags)
return CommandCost(EXPENSES_CONSTRUCTION, indspec->GetRemovalCost());
}
static void TransportIndustryGoods(TileIndex tile)
/**
* Move produced cargo from industry to nearby stations.
* @param tile Industry tile
* @return true if any cargo was moved.
*/
static bool TransportIndustryGoods(TileIndex tile)
{
Industry *i = Industry::GetByTile(tile);
const IndustrySpec *indspec = GetIndustrySpec(i->type);
@@ -516,16 +521,7 @@ static void TransportIndustryGoods(TileIndex tile)
}
}
if (moved_cargo && !StartStopIndustryTileAnimation(i, IAT_INDUSTRY_DISTRIBUTES_CARGO)) {
uint newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_production;
if (newgfx != INDUSTRYTILE_NOANIM) {
ResetIndustryConstructionStage(tile);
SetIndustryCompleted(tile);
SetIndustryGfx(tile, newgfx);
MarkTileDirtyByTile(tile);
}
}
return moved_cargo;
}
@@ -810,7 +806,17 @@ static void TileLoop_Industry(TileIndex tile)
if (_game_mode == GM_EDITOR) return;
TransportIndustryGoods(tile);
if (TransportIndustryGoods(tile) && !StartStopIndustryTileAnimation(Industry::GetByTile(tile), IAT_INDUSTRY_DISTRIBUTES_CARGO)) {
uint newgfx = GetIndustryTileSpec(GetIndustryGfx(tile))->anim_production;
if (newgfx != INDUSTRYTILE_NOANIM) {
ResetIndustryConstructionStage(tile);
SetIndustryCompleted(tile);
SetIndustryGfx(tile, newgfx);
MarkTileDirtyByTile(tile);
return;
}
}
if (StartStopIndustryTileAnimation(tile, IAT_TILELOOP)) return;
@@ -1383,7 +1389,7 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil
}
if (gfx == GFX_WATERTILE_SPECIALCHECK) {
if (!IsTileType(cur_tile, MP_WATER) ||
if (!IsWaterTile(cur_tile) ||
!IsTileFlat(cur_tile)) {
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
}

View File

@@ -56,6 +56,20 @@ enum CargoSuffixType {
CST_DIR, ///< Industry-directory window
};
/** Ways of displaying the cargo. */
enum CargoSuffixDisplay {
CSD_CARGO, ///< Display the cargo without sub-type (cb37 result 401).
CSD_CARGO_AMOUNT, ///< Display the cargo and amount (if useful), but no sub-type (cb37 result 400 or fail).
CSD_CARGO_TEXT, ///< Display then cargo and supplied string (cb37 result 800-BFF).
CSD_CARGO_AMOUNT_TEXT, ///< Display then cargo, amount, and string (cb37 result 000-3FF).
};
/** Transfer storage of cargo suffix information. */
struct CargoSuffix {
CargoSuffixDisplay display; ///< How to display the cargo and text.
char text[512]; ///< Cargo suffix text.
};
static void ShowIndustryCargoesWindow(IndustryType id);
/**
@@ -71,20 +85,51 @@ static void ShowIndustryCargoesWindow(IndustryType id);
* @param ind_type the industry type
* @param indspec the industry spec
* @param suffix is filled with the string to display
* @param suffix_last lastof(suffix)
*/
static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, char *suffix, const char *suffix_last)
static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, CargoSuffix &suffix)
{
suffix[0] = '\0';
suffix.text[0] = '\0';
suffix.display = CSD_CARGO_AMOUNT;
if (HasBit(indspec->callback_mask, CBM_IND_CARGO_SUFFIX)) {
uint16 callback = GetIndustryCallback(CBID_INDUSTRY_CARGO_SUFFIX, 0, (cst << 8) | cargo, const_cast<Industry *>(ind), ind_type, (cst != CST_FUND) ? ind->location.tile : INVALID_TILE);
if (callback == CALLBACK_FAILED || callback == 0x400) return;
if (callback > 0x400) {
TileIndex t = (cst != CST_FUND) ? ind->location.tile : INVALID_TILE;
uint16 callback = GetIndustryCallback(CBID_INDUSTRY_CARGO_SUFFIX, 0, (cst << 8) | cargo, const_cast<Industry *>(ind), ind_type, t);
if (callback == CALLBACK_FAILED) return;
if (indspec->grf_prop.grffile->grf_version < 8) {
if (GB(callback, 0, 8) == 0xFF) return;
if (callback < 0x400) {
StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
GetString(suffix.text, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback), lastof(suffix.text));
StopTextRefStackUsage();
suffix.display = CSD_CARGO_AMOUNT_TEXT;
return;
}
ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_CARGO_SUFFIX, callback);
} else if (indspec->grf_prop.grffile->grf_version >= 8 || GB(callback, 0, 8) != 0xFF) {
StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
GetString(suffix, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback), suffix_last);
StopTextRefStackUsage();
return;
} else { // GRF version 8 or higher.
if (callback == 0x400) return;
if (callback == 0x401) {
suffix.display = CSD_CARGO;
return;
}
if (callback < 0x400) {
StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
GetString(suffix.text, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback), lastof(suffix.text));
StopTextRefStackUsage();
suffix.display = CSD_CARGO_AMOUNT_TEXT;
return;
}
if (callback >= 0x800 && callback < 0xC00) {
StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
GetString(suffix.text, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 - 0x800 + callback), lastof(suffix.text));
StopTextRefStackUsage();
suffix.display = CSD_CARGO_TEXT;
return;
}
ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_CARGO_SUFFIX, callback);
return;
}
}
}
@@ -105,9 +150,9 @@ static inline void GetAllCargoSuffixes(uint cb_offset, CargoSuffixType cst, cons
assert_compile(lengthof(cargoes) <= lengthof(suffixes));
for (uint j = 0; j < lengthof(cargoes); j++) {
if (cargoes[j] != CT_INVALID) {
GetCargoSuffix(cb_offset + j, cst, ind, ind_type, indspec, suffixes[j], lastof(suffixes[j]));
GetCargoSuffix(cb_offset + j, cst, ind, ind_type, indspec, suffixes[j]);
} else {
suffixes[j][0] = '\0';
suffixes[j].text[0] = '\0';
}
}
}
@@ -314,7 +359,7 @@ public:
const IndustrySpec *indsp = GetIndustrySpec(this->index[i]);
char cargo_suffix[3][512];
CargoSuffix cargo_suffix[3];
GetAllCargoSuffixes(0, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix);
StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
byte p = 0;
@@ -324,7 +369,7 @@ public:
if (indsp->accepts_cargo[j] == CT_INVALID) continue;
if (p > 0) str++;
SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name);
SetDParamStr(p++, cargo_suffix[j]);
SetDParamStr(p++, cargo_suffix[j].text);
}
d = maxdim(d, GetStringBoundingBox(str));
@@ -338,7 +383,7 @@ public:
if (indsp->produced_cargo[j] == CT_INVALID) continue;
if (p > 0) str++;
SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name);
SetDParamStr(p++, cargo_suffix[j]);
SetDParamStr(p++, cargo_suffix[j].text);
}
d = maxdim(d, GetStringBoundingBox(str));
}
@@ -435,7 +480,7 @@ public:
}
/* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */
char cargo_suffix[3][512];
CargoSuffix cargo_suffix[3];
GetAllCargoSuffixes(0, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix);
StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
byte p = 0;
@@ -445,7 +490,7 @@ public:
if (indsp->accepts_cargo[j] == CT_INVALID) continue;
if (p > 0) str++;
SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name);
SetDParamStr(p++, cargo_suffix[j]);
SetDParamStr(p++, cargo_suffix[j].text);
}
DrawString(left, right, y, str);
y += FONT_HEIGHT_NORMAL;
@@ -460,7 +505,7 @@ public:
if (indsp->produced_cargo[j] == CT_INVALID) continue;
if (p > 0) str++;
SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name);
SetDParamStr(p++, cargo_suffix[j]);
SetDParamStr(p++, cargo_suffix[j].text);
}
DrawString(left, right, y, str);
y += FONT_HEIGHT_NORMAL;
@@ -732,44 +777,57 @@ public:
int y = top + WD_FRAMERECT_TOP;
bool first = true;
bool has_accept = false;
char cargo_suffix[3][512];
if (i->prod_level == PRODLEVEL_CLOSURE) {
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE);
y += 2 * FONT_HEIGHT_NORMAL;
}
if (HasBit(ind->callback_mask, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_mask, CBM_IND_PRODUCTION_256_TICKS)) {
GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix);
for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
if (i->accepts_cargo[j] == CT_INVALID) continue;
has_accept = true;
if (first) {
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING);
y += FONT_HEIGHT_NORMAL;
first = false;
}
SetDParam(0, i->accepts_cargo[j]);
SetDParam(1, i->incoming_cargo_waiting[j]);
SetDParamStr(2, cargo_suffix[j]);
DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO);
CargoSuffix cargo_suffix[3];
GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix);
bool stockpiling = HasBit(ind->callback_mask, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_mask, CBM_IND_PRODUCTION_256_TICKS);
uint left_side = left + WD_FRAMERECT_LEFT * 4; // Indent accepted cargoes.
for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
if (i->accepts_cargo[j] == CT_INVALID) continue;
has_accept = true;
if (first) {
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_REQUIRES);
y += FONT_HEIGHT_NORMAL;
first = false;
}
} else {
GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix);
StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
byte p = 0;
for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
if (i->accepts_cargo[j] == CT_INVALID) continue;
has_accept = true;
if (p > 0) str++;
SetDParam(p++, CargoSpec::Get(i->accepts_cargo[j])->name);
SetDParamStr(p++, cargo_suffix[j]);
}
if (has_accept) {
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, str);
y += FONT_HEIGHT_NORMAL;
switch (cargo_suffix[j].display) {
case CSD_CARGO_AMOUNT:
if (stockpiling) {
SetDParam(0, i->accepts_cargo[j]);
SetDParam(1, i->incoming_cargo_waiting[j]);
DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT);
break;
}
/* FALL THROUGH */
case CSD_CARGO:
SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO);
break;
case CSD_CARGO_TEXT:
SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
SetDParamStr(1, cargo_suffix[j].text);
DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_TEXT);
break;
case CSD_CARGO_AMOUNT_TEXT:
SetDParam(0, i->accepts_cargo[j]);
SetDParam(1, i->incoming_cargo_waiting[j]);
SetDParamStr(2, cargo_suffix[j].text);
DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT_TEXT);
break;
default:
NOT_REACHED();
}
y += FONT_HEIGHT_NORMAL;
}
GetAllCargoSuffixes(3, CST_VIEW, i, i->type, ind, i->produced_cargo, cargo_suffix);
@@ -786,7 +844,7 @@ public:
SetDParam(0, i->produced_cargo[j]);
SetDParam(1, i->last_month_production[j]);
SetDParamStr(2, cargo_suffix[j]);
SetDParamStr(2, cargo_suffix[j].text);
SetDParam(3, ToPercent8(i->last_month_pct_transported[j]));
uint x = left + WD_FRAMETEXT_LEFT + (this->editable == EA_RATE ? SETTING_BUTTON_WIDTH + 10 : 0);
DrawString(x, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_TRANSPORTED);
@@ -1227,7 +1285,7 @@ protected:
/* Industry name */
SetDParam(p++, i->index);
static char cargo_suffix[lengthof(i->produced_cargo)][512];
static CargoSuffix cargo_suffix[lengthof(i->produced_cargo)];
GetAllCargoSuffixes(3, CST_DIR, i, i->type, indsp, i->produced_cargo, cargo_suffix);
/* Industry productions */
@@ -1235,7 +1293,7 @@ protected:
if (i->produced_cargo[j] == CT_INVALID) continue;
SetDParam(p++, i->produced_cargo[j]);
SetDParam(p++, i->last_month_production[j]);
SetDParamStr(p++, cargo_suffix[j]);
SetDParamStr(p++, cargo_suffix[j].text);
}
/* Transported productions */

View File

@@ -61,13 +61,25 @@ struct SelectGameWindow : public Window {
virtual void OnInit()
{
bool missing = _current_language->missing >= _settings_client.gui.missing_strings_threshold && !IsReleasedVersion();
this->GetWidget<NWidgetStacked>(WID_SGI_TRANSLATION_SELECTION)->SetDisplayedPlane(missing ? 0 : SZSP_NONE);
bool missing_sprites = _missing_extra_graphics > 0 && !IsReleasedVersion();
missing_sprites = false;
this->GetWidget<NWidgetStacked>(WID_SGI_BASESET_SELECTION)->SetDisplayedPlane(missing_sprites ? 0 : SZSP_NONE);
bool missing_lang = _current_language->missing >= _settings_client.gui.missing_strings_threshold && !IsReleasedVersion();
#ifdef __ANDROID__
missing_lang = false;
#endif
this->GetWidget<NWidgetStacked>(WID_SGI_TRANSLATION_SELECTION)->SetDisplayedPlane(missing_lang ? 0 : SZSP_NONE);
}
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
case WID_SGI_BASESET:
SetDParam(0, _missing_extra_graphics);
DrawStringMultiLine(r.left, r.right, r.top, r.bottom, STR_INTRO_BASESET, TC_FROMSTRING, SA_CENTER);
break;
case WID_SGI_TRANSLATION:
SetDParam(0, _current_language->missing);
DrawStringMultiLine(r.left, r.right, r.top, r.bottom, STR_INTRO_TRANSLATION, TC_FROMSTRING, SA_CENTER);
@@ -77,20 +89,29 @@ struct SelectGameWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
StringID str = 0;
switch (widget) {
case WID_SGI_TRANSLATION: {
SetDParam(0, _current_language->missing);
int height = GetStringHeight(STR_INTRO_TRANSLATION, size->width);
if (height > 3 * FONT_HEIGHT_NORMAL) {
/* Don't let the window become too high. */
Dimension textdim = GetStringBoundingBox(STR_INTRO_TRANSLATION);
textdim.height *= 3;
textdim.width -= textdim.width / 2;
*size = maxdim(*size, textdim);
} else {
size->height = height + padding.height;
}
case WID_SGI_BASESET:
SetDParam(0, _missing_extra_graphics);
str = STR_INTRO_BASESET;
break;
case WID_SGI_TRANSLATION:
SetDParam(0, _current_language->missing);
str = STR_INTRO_TRANSLATION;
break;
}
if (str != 0) {
int height = GetStringHeight(str, size->width);
if (height > 3 * FONT_HEIGHT_NORMAL) {
/* Don't let the window become too high. */
Dimension textdim = GetStringBoundingBox(str);
textdim.height *= 3;
textdim.width -= textdim.width / 2;
*size = maxdim(*size, textdim);
} else {
size->height = height + padding.height;
}
}
}
@@ -112,9 +133,9 @@ struct SelectGameWindow : public Window {
}
break;
case WID_SGI_LOAD_GAME: ShowSaveLoadDialog(SLD_LOAD_GAME); break;
case WID_SGI_PLAY_SCENARIO: ShowSaveLoadDialog(SLD_LOAD_SCENARIO); break;
case WID_SGI_PLAY_HEIGHTMAP: ShowSaveLoadDialog(SLD_LOAD_HEIGHTMAP); break;
case WID_SGI_LOAD_GAME: ShowSaveLoadDialog(FT_SAVEGAME, SLO_LOAD); break;
case WID_SGI_PLAY_SCENARIO: ShowSaveLoadDialog(FT_SCENARIO, SLO_LOAD); break;
case WID_SGI_PLAY_HEIGHTMAP: ShowSaveLoadDialog(FT_HEIGHTMAP,SLO_LOAD); break;
case WID_SGI_EDIT_SCENARIO: StartScenarioEditor(); break;
case WID_SGI_PLAY_NETWORK:
@@ -201,6 +222,11 @@ static const NWidgetPart _nested_select_game_widgets[] = {
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 7),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SGI_BASESET_SELECTION),
NWidget(NWID_VERTICAL),
NWidget(WWT_EMPTY, COLOUR_ORANGE, WID_SGI_BASESET), SetMinimalSize(316, 12), SetFill(1, 0), SetPadding(0, 10, 7, 10),
EndContainer(),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SGI_TRANSLATION_SELECTION),
NWidget(NWID_VERTICAL),
NWidget(WWT_EMPTY, COLOUR_ORANGE, WID_SGI_TRANSLATION), SetMinimalSize(316, 12), SetFill(1, 0), SetPadding(0, 10, 7, 10),

View File

@@ -31,6 +31,7 @@
#include "object_base.h"
#include "company_func.h"
#include "pathfinder/npf/aystar.h"
#include "saveload/saveload.h"
#include <list>
#include <set>
@@ -1221,7 +1222,7 @@ void GenerateLandscape(byte mode)
if (mode == GWM_HEIGHTMAP) {
SetGeneratingWorldProgress(GWP_LANDSCAPE, steps + GLS_HEIGHTMAP);
LoadHeightmap(_file_to_saveload.name);
LoadHeightmap(_file_to_saveload.detail_ftype, _file_to_saveload.name);
IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
} else if (_settings_game.game_creation.land_generator == LG_TERRAGENESIS) {
SetGeneratingWorldProgress(GWP_LANDSCAPE, steps + GLS_TERRAGENESIS);

View File

@@ -469,7 +469,6 @@ STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Boodskapgeskied
############ range for about menu starts
STR_ABOUT_MENU_LAND_BLOCK_INFO :Gebied informasie
STR_ABOUT_MENU_SEPARATOR :
STR_ABOUT_MENU_TOGGLE_CONSOLE :Skakel terminaal
STR_ABOUT_MENU_AI_DEBUG :AI/Spel skript ontfout
STR_ABOUT_MENU_SCREENSHOT :Skermskoot
@@ -2602,29 +2601,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Velde
STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Sneeu-bedekte land
STR_LAI_CLEAR_DESCRIPTION_DESERT :Woestyn
STR_LAI_RAIL_DESCRIPTION_TRACK :{STRING} spoor
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :{STRING} spoor met blok seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :{STRING} spoor met voor-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :{STRING} spoor met uitgang-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :{STRING} spoor met kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :{STRING} spoor met roete seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :{STRING} spoor met een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :{STRING} spoor met blok en voor-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :{STRING} spoor met blok en uitgang-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :{STRING} spoor met blok en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :{STRING} spoor met blok en pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :{STRING} spoor met blok en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :{STRING} spoor met voor en uitgang seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :{STRING} spoor met voor en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :{STRING} spoor met voor en pad-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :{STRING} spoor met voor en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :{STRING} spoor met uitgang en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :{STRING} spoor met uitgang en pad-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :{STRING} spoor met uitgang en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :{STRING} spoor met kombinasie en pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :{STRING} spoor met kombinasie en eenrigting-pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :{STRING} spoor met pad en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :{STRING} trein diensstasie
STR_LAI_RAIL_DESCRIPTION_TRACK :Spoorweg spoor
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Spoorweg spoor met blok seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Spoorweg spoor met voor-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Spoorweg spoor met uitgang-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Spoorweg spoor met kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Spoorweg spoor met roete seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Spoorweg spoor met een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Spoorweg spoor met blok en voor-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Spoorweg spoor met blok en uitgang-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Spoorweg spoor met blok en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Spoorweg spoor met blok en pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Spoorweg spoor met blok en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Spoorweg spoor met voor en uitgang seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Spoorweg spoor met voor en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Spoorweg spoor met voor en pad-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Spoorweg spoor met voor en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Spoorweg spoor met uitgang en kombinasie-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Spoorweg spoor met uitgang en pad-seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Spoorweg spoor met uitgang en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Spoorweg spoor met kombinasie en pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Spoorweg spoor met kombinasie en eenrigting-pad seine
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Spoorweg spoor met pad en een-rigting pad seine
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Spoorweg trein diensstasie
STR_LAI_ROAD_DESCRIPTION_ROAD :Pad
STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Pad met straatligte
@@ -2688,7 +2687,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-2016 Die OpenTTD span
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2017 Die OpenTTD span
# Save/load game/scenario
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spaar Spel
@@ -2907,8 +2906,6 @@ STR_NEWGRF_ERROR_INVALID_ID :Poging on 'n on
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} bevat 'n korrupte prent. Korrupte prente sal as 'n rooi vraagteken gewys word (?)
STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Bevat veelvoudige Aksie 8 inskrywings (sprite {3:NUM})
STR_NEWGRF_ERROR_READ_BOUNDS :Lees verby die einde van die pseudo-sprite (sprite {3:NUM})
STR_NEWGRF_ERROR_MISSING_SPRITES :WHITE}Die huidige basis-grafikastel ontbreek sommige sprites.{}Opdateer die basis-grafikastel.
STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE :{WHITE}Die huidige basis-grafikastel ontbreek sommige sprites.{}Opdateer die basis-grafikastel.{}Aangesien jy 'n {YELLOW}ontwikkelingsweergawe van OpenTTD{WHITE} het, mag jy dalk 'n {YELLOW}ontwikkelingsweergawe{WHITE} van die basis-grafikastel benodig{WHITE}
STR_NEWGRF_ERROR_GRM_FAILED :Aangevraagde GRF hulpbronne is nie beskikbaar nie (sprite {3:NUM})
STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} was gedeaktiveer deur {2:STRING}
STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Ongeldige/onbekende sprite uitleg formaat (sprite {3:NUM})
@@ -3295,9 +3292,8 @@ STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Vereis:
STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Vereis: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING}
############ range for requires ends
############ range for produces starts
STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING :{BLACK}Vrag wag om geprosesseer te word:
STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO :{YELLOW}{CARGO_LONG}{STRING}{BLACK}
STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING}
STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produseer: {YELLOW}{STRING}{STRING}, {STRING}{STRING}
############ range for produces ends
@@ -3558,7 +3554,6 @@ STR_REPLACE_REPLACING_WHEN_OLD :{ENGINE} waneer
STR_REPLACE_VEHICLES_STOP :{BLACK}Staak vervanging
STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Druk om die vervanging van die linker gekose enjin tipe te stop
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Vervang: {ORANGE}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Skakel tussen enjin en wa vervang vensters
STR_REPLACE_ENGINES :Enjin
STR_REPLACE_WAGONS :Waens

View File

@@ -444,7 +444,6 @@ STR_NEWS_MENU_MESSAGE_HISTORY_MENU :الرسائل
############ range for about menu starts
STR_ABOUT_MENU_LAND_BLOCK_INFO :معلومات مربع في الخريطة
STR_ABOUT_MENU_SEPARATOR :
STR_ABOUT_MENU_TOGGLE_CONSOLE :توقل كونسول
STR_ABOUT_MENU_AI_DEBUG :مكتشف اخطاء الذكاء الصناعي
STR_ABOUT_MENU_SCREENSHOT :صورة من الشاشة - Ctrl-S -
@@ -942,8 +941,8 @@ STR_GAME_OPTIONS_RESOLUTION :{BLACK}دقة
STR_GAME_OPTIONS_RESOLUTION_TOOLTIP :{BLACK}اختر دقة الشاشة
STR_GAME_OPTIONS_RESOLUTION_OTHER :اخرى
STR_GAME_OPTIONS_GUI_ZOOM_FRAME :حجم اللوحة
STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_TOOLTIP :حدد العنصر المطلوب
STR_GAME_OPTIONS_GUI_ZOOM_FRAME :{BLACK}حجم اللوحة
STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_TOOLTIP :{BLACK}حدد العنصر المطلوب
STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_NORMAL :تقريب عادي
STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_2X_ZOOM :تقريب ×2
@@ -1051,9 +1050,9 @@ STR_CITY_APPROVAL_HOSTILE :معاد
STR_WARNING_NO_SUITABLE_AI :{WHITE}لايوجد ذكاء اصطناعي متاح ...{}تستطيع تجميل العديد من الذكاء الاصطناعي عن طريق اللانترنت
# Settings tree window
STR_CONFIG_SETTING_TREE_CAPTION :الإعدادات
STR_CONFIG_SETTING_EXPAND_ALL :مدد الكل
STR_CONFIG_SETTING_COLLAPSE_ALL :إسحب الكل
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}الإعدادات
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}مدد الكل
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}إسحب الكل
STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK} فئة:
STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}نوع:
@@ -1408,7 +1407,7 @@ STR_INTRO_MULTIPLAYER :{BLACK}لعب
STR_INTRO_GAME_OPTIONS :{BLACK}إعدادات اللعبه
STR_INTRO_HIGHSCORE :{BLACK}قائمه المتفوقين
STR_INTRO_CONFIG_SETTINGS_TREE :الاعدادات
STR_INTRO_CONFIG_SETTINGS_TREE :{BLACK}الاعدادات
STR_INTRO_NEWGRF_SETTINGS :{BLACK} اعدادات NewGRF
STR_INTRO_ONLINE_CONTENT :{BLACK} إبحث عن المحتوى عبر الشبكه العنكبوتيه
STR_INTRO_SCRIPT_SETTINGS :{BLACK}إعدادات الذكاء الصناعى
@@ -1427,7 +1426,7 @@ STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}اختي
STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}اختيار نمط الألعاب
STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}عرض خيارات اللعبة
STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :إعدادات العرض
STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}إعدادات العرض
STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}عرض إعدادات اﻹضافات
STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK} ابحث عن محتوى جديد او تحديث
STR_INTRO_TOOLTIP_QUIT :{BLACK}اغلاق'OpenTTD'
@@ -2234,29 +2233,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :حقول
STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :ارض ثلجية
STR_LAI_CLEAR_DESCRIPTION_DESERT :صحراء
STR_LAI_RAIL_DESCRIPTION_TRACK :{STRING} مسار
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :{STRING} مسار مع اشارة اغلاق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :{STRING} مسار مع اشارة مبتدئة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :{STRING} سكة حديد مع اشارة خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :{STRING} سكة حديد مع اشارة مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :{STRING} سكة حديد مع اشارة طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة اتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :{STRING} سكة حديد مع اشارة توقف و اشارة مبتدئة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :{STRING} سكة حديد مع اشارة توقف و خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :{STRING} سكة حديد مع اشارة توقف و مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :{STRING} سكة حديد مع اشارة اغلاق و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة اغلاق و طريق باتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :{STRING} سكة حديد مع اشارة مبدئية و اشارة خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :{STRING} سكة حديد مع اشارة مبدئية و اشارة مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :{STRING} سكة حديد مع اشارة مبدئية و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة مبدئية و اتجاة و احد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :{STRING} سكة حديد مع اشارة خروج و مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :{STRING} سكة حديد مع اشارة خروج و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة خروج و اتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :{STRING} سكة حديد مع اشارة مزدوجة و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة مزدوجة و طريق باتجاه واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :{STRING} سكة حديد مع اشارة طريق و اتجاة و احد
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :{STRING} مستودع صيانة قطارات
STR_LAI_RAIL_DESCRIPTION_TRACK :سكة حديد مسار
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :سكة حديد مسار مع اشارة اغلاق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :سكة حديد مسار مع اشارة مبتدئة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :سكة حديد سكة حديد مع اشارة خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :سكة حديد سكة حديد مع اشارة مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :سكة حديد سكة حديد مع اشارة طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة اتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :سكة حديد سكة حديد مع اشارة توقف و اشارة مبتدئة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :سكة حديد سكة حديد مع اشارة توقف و خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :سكة حديد سكة حديد مع اشارة توقف و مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :سكة حديد سكة حديد مع اشارة اغلاق و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة اغلاق و طريق باتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :سكة حديد سكة حديد مع اشارة مبدئية و اشارة خروج
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :سكة حديد سكة حديد مع اشارة مبدئية و اشارة مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :سكة حديد سكة حديد مع اشارة مبدئية و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة مبدئية و اتجاة و احد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :سكة حديد سكة حديد مع اشارة خروج و مزدوجة
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :سكة حديد سكة حديد مع اشارة خروج و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة خروج و اتجاة واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :سكة حديد سكة حديد مع اشارة مزدوجة و طريق
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة مزدوجة و طريق باتجاه واحد
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :سكة حديد سكة حديد مع اشارة طريق و اتجاة و احد
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :سكة حديد مستودع صيانة قطارات
STR_LAI_ROAD_DESCRIPTION_ROAD :طريق
STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :طريق مضاء
@@ -2320,7 +2319,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-2016 فريق النسخة المفتوحة
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2017 فريق النسخة المفتوحة
# Save/load game/scenario
STR_SAVELOAD_SAVE_CAPTION :{WHITE}حفظ اللعبة
@@ -2383,7 +2382,7 @@ STR_MAPGEN_HEIGHTMAP_NAME :{BLACK}اسم
STR_MAPGEN_HEIGHTMAP_SIZE_LABEL :{BLACK}الحجم:
STR_MAPGEN_HEIGHTMAP_SIZE :{ORANGE}{NUM} * {NUM}
STR_MAPGEN_MAX_HEIGHTLEVEL_QUERY_CAPT :تغيير أعلى ارتفاع للخريطة
STR_MAPGEN_MAX_HEIGHTLEVEL_QUERY_CAPT :{WHITE}تغيير أعلى ارتفاع للخريطة
STR_MAPGEN_SNOW_LINE_QUERY_CAPT :{WHITE}غير مستوى خط الثلج
STR_MAPGEN_START_DATE_QUERY_CAPT :{WHITE}غير سنة البداية
@@ -2463,7 +2462,7 @@ STR_NEWGRF_SETTINGS_DISABLED :{RED}معطل
STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}متعارض مع هذا اللإصدار من Openttd
# NewGRF save preset window
STR_SAVE_PRESET_CAPTION :{BLACK}حفظ الإعداد المسبق
STR_SAVE_PRESET_CAPTION :{WHITE}حفظ الإعداد المسبق
STR_SAVE_PRESET_LIST_TOOLTIP :{BLACK}لائحة الإعدادات المسبقة. اختر واحدة لنسخها للإسم المحفوظ بالإسفل
STR_SAVE_PRESET_TITLE :{BLACK}أدخل اسم للإعداد المسبق
STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}الإسم المختار لحفظ الإعداد المسبق
@@ -2524,7 +2523,6 @@ STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :تم تصميم
STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :العديد من NewGRF تم تحميلها
STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :تحميل {1:STRING}كملف ثابت مع NewGRF {STRING}قد يتسبب بمشكلة توافق.
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} يحتوي على خصائص غير صالحة. جميع الخصائص الغير صالحة سوف يشار لها بعلامة استفهام حمراء.
STR_NEWGRF_ERROR_MISSING_SPRITES :{WHITE}ملف الرسوم المستخدم حاليا يفتقد لبعض الرسوم الاساسية.{}الرجاء حدث ملف الرسوم.
STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING}تم تعطيلة بواسطة{STRING}
# NewGRF related 'general' warnings
@@ -2819,9 +2817,8 @@ STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}يحتا
STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}يحتاج: {YELLOW}{STRING}{STRING}, {STRING}{STRING} , {STRING}{STRING}
############ range for requires ends
############ range for produces starts
STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING :{BLACK}البضاعة تنتظر التعامل معها:
STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO :{YELLOW}{CARGO_LONG}{STRING}{BLACK}
STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING}
STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}ينتج: {YELLOW}{STRING} {STRING}, {STRING} {STRING}
############ range for produces ends
@@ -3060,7 +3057,6 @@ STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED :{BLACK}لم ي
STR_REPLACE_VEHICLES_STOP :{BLACK} اوقف تبديل العربات
STR_REPLACE_HELP_STOP_BUTTON :{BLACK} اضغط لايقاف تبديل المحركات المختارة في اليسار
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK} تبديل: {ORANGE}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} بدل بين نافذة استبدال المحركات و العربات
STR_REPLACE_ENGINES :محركات
STR_REPLACE_WAGONS :عربات
@@ -3874,7 +3870,7 @@ STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}لا ي
STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... العربة تحطمت
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL :{WHITE}لن تتوافر اى وسائل نقل على اﻹطلاق
STR_ERROR_NO_VEHICLES_AVAILABLE_YET :لا تتوافر اى آليه نقل بعد
STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}لا تتوافر اى آليه نقل بعد
# Specific vehicle errors
STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}لا يمكن السماح للقطار بالعبور من الاشارة في وضع الخطر

View File

@@ -319,6 +319,7 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Subsidio
STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Erakutsi konpainien geltokien zerrenda
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Erakutsi konpaniaren finantza informazioa
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Erakutsi konpaniaren informazio generala
STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Helburu zerrenda erakutsi
STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Grafikoak erakutsi
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Erakutsi konpanien ligako taula
STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Eraiki industria berria edo industri guztien zerrenda erakutsi
@@ -461,7 +462,6 @@ STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Mezuen historia
############ range for about menu starts
STR_ABOUT_MENU_LAND_BLOCK_INFO :Lur arearen informazioa
STR_ABOUT_MENU_SEPARATOR :
STR_ABOUT_MENU_TOGGLE_CONSOLE :Konsola aktibatu
STR_ABOUT_MENU_AI_DEBUG :IA/Joko script-aren garbitzailea
STR_ABOUT_MENU_SCREENSHOT :Pantailan dagoenaren argazkia hartu (Ctrl+S)
@@ -1097,6 +1097,8 @@ STR_CONFIG_SETTING_RESTRICT_ALL :Aditua (ezarpen
STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Ezarpenak lehenetsitakoen balio ezberdinarekin
STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_NEW :Balio ezberdinak dituzten ezarpenak zure joko berriaren ezarpenekin alderatuta
STR_CONFIG_SETTING_TYPE_DROPDOWN_CLIENT :Bezero ezarpenak (ez dira partidatan gordetzen; joko guztiei eragiten die)
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Enpresa ezarpenak (partidan gordeta; bakarrik uneko enpresari eragiten dio)
STR_CONFIG_SETTINGS_NONE :{WHITE}- Ezer ez -
STR_CONFIG_SETTING_OFF :Itzalita
@@ -1262,6 +1264,7 @@ STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Grafikoen marre
STR_CONFIG_SETTING_LAND_GENERATOR :Lur sortzailea: {STRING}
STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :Jatorrizkoa
STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis
STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(TerraGenesis bakarrik) Maparen menditsutasuna
STR_CONFIG_SETTING_INDUSTRY_DENSITY :Industria dentsitatea: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Petroleo findegietatik maparen ertzera dagoen gehienezko distantzia: {STRING}
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Petroleo findegiak bakarrik maparen ertzatik hurbil eraiki daitezke, kostan irla mapetan
@@ -1278,6 +1281,7 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :Ezer ez
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Jatorrizkoa
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Hobetua
STR_CONFIG_SETTING_ROAD_SIDE :Errepideko garraioak: {STRING}
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Gidatzeko aldea aukeratu
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Garaiera maparen norabidea: {STRING}
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :Erlojuko orratzen kontrara
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE :Erlojuko orratzen erara
@@ -1333,6 +1337,7 @@ STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Saguaren ezkerr
STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Gaitu mapatik zehar mugitzea saguaren ezkerreko botoia mapan arrastratzerakoan. Oso erabilgarria da ukipen pantailak erabiltzerakoan
STR_CONFIG_SETTING_AUTOSAVE :Auto-gordea: {STRING}
STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT :Partida gordetze automatikoaren bitartea aukeratu
STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Gordetako jokoen izenetan {STRING} data fomatua erabili
STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_HELPTEXT :Gordetako fitxeroen dataren formatoa
@@ -1373,7 +1378,9 @@ STR_CONFIG_SETTING_EXPENSES_LAYOUT_HELPTEXT :Konpainiako gas
STR_CONFIG_SETTING_SOUND_NEWS :Periodikoa: {STRING}
STR_CONFIG_SETTING_SOUND_NEW_YEAR :Amaiera urtea: {STRING}
STR_CONFIG_SETTING_SOUND_CONFIRM :Eraikuntza: {STRING}
STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT :Eraikuntza arrakastatsua edo beste akzioekin soinu bat egin
STR_CONFIG_SETTING_SOUND_DISASTER :Desastreak/istripuak: {STRING}
STR_CONFIG_SETTING_SOUND_DISASTER_HELPTEXT :Istripu edo desastreen soinu efektuak aktibatu
STR_CONFIG_SETTING_SOUND_VEHICLE :Garraioak: {STRING}
STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :Azpiturak eraikitzea debekatu ibilgailu egokiak ez daudenean eskuragarri: {STRING}
@@ -2105,6 +2112,7 @@ STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}Egunerak
STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}Haukeratu dituzun edukiak berrituko dituzten edukiak deskargatuak izateko
STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}Guztia desmarkatu
STR_CONTENT_UNSELECT_ALL_CAPTION_TOOLTIP :{BLACK}Dekargatuak izango ez diren eduki guztiak markatu
STR_CONTENT_SEARCH_EXTERNAL :{BLACK}Kanpoko webguneak bilatu
STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER_CAPTION :{WHITE}OpenTTD uzten zaude!
STR_CONTENT_FILTER_TITLE :{BLACK}Etiketa/izen iragazkia:
STR_CONTENT_OPEN_URL :{BLACK}Webgunera joan
@@ -2484,6 +2492,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Aireport
STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Onartutako zama: {LTBLUE}
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING})
STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Errail mota: {LTBLUE}{STRING}
STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Trenbidearen abiadura muga: {LTBLUE}{VELOCITY}
STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Bideko abiadura muga: {LTBLUE}{VELOCITY}
@@ -2496,29 +2505,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Eremuak
STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Elurrez estalitako paisaia
STR_LAI_CLEAR_DESCRIPTION_DESERT :Desertua
STR_LAI_RAIL_DESCRIPTION_TRACK :{STRING} Trenbidea
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :{STRING} Trenbidea blokeo seinalearekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :{STRING} trenbidea aurre-seinalekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :{STRING} trenbidea irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :{STRING} trenbidea konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :{STRING} trenbidea bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :{STRING} trenbidea norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :{STRING} trenbidea blokeo seinale eta aurre-seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :{STRING} trenbidea blokeo seinale eta irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :{STRING} trenbidea blokeo seinalea eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :{STRING} trenbidea blokeo seinaleekin eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :{STRING} Trenbidea blokeo eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :{STRING} trenbidea aurre-seinale eta irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :{STRING} trenbidea aurre-seinale eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :{STRING} trenbidea aurre-seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :{STRING} trenbidea aurre-seinale eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :{STRING} trenbidea irteera seinale eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :{STRING} trenbidea irteera seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :{STRING} trenbidea irteera seinale eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :{STRING} trenbidea konbo seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :{STRING} trenbide konbo seinale eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :{STRING} trenbidea bide seinale eta norabide bakarreko seinaleekina
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :{STRING} tren gordailua
STR_LAI_RAIL_DESCRIPTION_TRACK :Trenbidea
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Trenbidea Trenbidea blokeo seinalearekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Trenbidea trenbidea aurre-seinalekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Trenbidea trenbidea irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Konbo-seinaledun trenbidea
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Trenbidea trenbidea bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Trenbidea trenbidea norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Trenbidea trenbidea blokeo seinale eta aurre-seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Trenbidea trenbidea blokeo seinale eta irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Trenbidea trenbidea blokeo seinalea eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Trenbidea trenbidea blokeo seinaleekin eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Trenbidea Trenbidea blokeo eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Trenbidea trenbidea aurre-seinale eta irteera seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Trenbidea trenbidea aurre-seinale eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Trenbidea trenbidea aurre-seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Trenbidea trenbidea aurre-seinale eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Trenbidea trenbidea irteera seinale eta konbo seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Trenbidea trenbidea irteera seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Trenbidea trenbidea irteera seinale eta norabide bakarreko bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Trenbidea trenbidea konbo seinale eta bide seinaleekin
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Konbo-seinale eta norabide bakarreko bide seinaledun trenbidea
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Trenbidea trenbidea bide seinale eta norabide bakarreko seinaleekina
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Trenbidea tren gordailua
STR_LAI_ROAD_DESCRIPTION_ROAD :errepidea
STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Errepidea farolekin
@@ -2582,7 +2591,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Konpainia jabe
STR_ABOUT_OPENTTD :{WHITE}OpenTTD-ri buruz
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved
STR_ABOUT_VERSION :{BLACK}OpenTTD bertsioa {REV}
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2016 The OpenTTD team
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2017 The OpenTTD team
# Save/load game/scenario
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Gordetako jokoa
@@ -2724,6 +2733,7 @@ STR_NEWGRF_SETTINGS_DISABLED :{RED}Desgaitua
STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}OpenTTD-ren bertsio honekin bateraezina
# NewGRF save preset window
STR_SAVE_PRESET_CANCEL_TOOLTIP :{BLACK}Ez aldatu berezko balioa
# NewGRF parameters window
STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}NewGRF parametroak aldatu
@@ -2786,8 +2796,6 @@ STR_NEWGRF_ERROR_INVALID_ID :Identifikazio b
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} sprite baliogabea dauka. Sprite baliogabeak galdera ikur gorria bezala ikusiko dira (?)
STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Action 8 sarrera asko ditu (sprite {3:NUM})
STR_NEWGRF_ERROR_READ_BOUNDS :Pseudo spritea baino hurrunago irakurri (sprite {3:NUM})
STR_NEWGRF_ERROR_MISSING_SPRITES :{WHITE}Aukeratuta daukazun oinarrizko grafiko paketean "sprite" batzuk falta dira.{}Mesedez eguneratu oinarrizko grafiko paketea
STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE :{WHITE}Erabiltzen ari den grafiko baseari sprite batzuk falta zaizkio.{}Mesedez zure grafiko basea eguneratu ezazu.{}OpenTTD-ren {YELLOW}garapen bertsio bat erabiltzen ari zarenez{WHITE}, grafiko basearen {YELLOW}garapen bertsio bat behar izango duzu{WHITE}
STR_NEWGRF_ERROR_GRM_FAILED :Eskatutako GRFa ez dago eskuragarri (sprite {3:NUM})
STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} desgaitua izan da {STRING}(en)gatik
STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Grafiko deseinu formatu ezezaguna/baliogabea (sprite {3:NUM})
@@ -2986,6 +2994,7 @@ STR_STATION_LIST_NO_WAITING_CARGO :{BLACK}Ez dago
STR_STATION_VIEW_CAPTION :{WHITE}{STATION} {STATION_FEATURES}
STR_STATION_VIEW_WAITING_CARGO :{WHITE}{CARGO_LONG}
STR_STATION_VIEW_EN_ROUTE_FROM :{YELLOW}({CARGO_SHORT} {STATION}-(e)tik garraiatua)
STR_STATION_VIEW_RESERVED :{YELLOW}({CARGO_SHORT} kargarako erreserbatua)
STR_STATION_VIEW_ACCEPTS_BUTTON :{BLACK}Onartu
STR_STATION_VIEW_ACCEPTS_TOOLTIP :{BLACK}Onartzen diren zamen zerrenda
@@ -3168,9 +3177,8 @@ STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Beharrez
STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING}
############ range for requires ends
############ range for produces starts
STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING :{BLACK}Prosezatzeko zain dagoen zama:
STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO :{YELLOW}{CARGO_LONG}{STRING}{BLACK}
STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING}
STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Ekoizpena: {YELLOW}{STRING}{STRING}, {STRING}{STRING}
############ range for produces ends
@@ -3424,7 +3432,6 @@ STR_REPLACE_REPLACING_WHEN_OLD :{ENGINE} zaharr
STR_REPLACE_VEHICLES_STOP :{BLACK}Ibilgailuak ordezkatzen gelditu
STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Klikatu ezkerrean aukeratutako motore motaren ordezkapena gelditzeko
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Ordezkatzen: {ORANGE}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Aldatu motore pantaila eta bagoi paintailaren artean
STR_REPLACE_ENGINES :Motoreak
STR_REPLACE_WAGONS :Bagoiak
@@ -4053,6 +4060,7 @@ STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED :{WHITE}... Baso
STR_ERROR_CAN_ONLY_BE_BUILT_ABOVE_SNOW_LINE :{WHITE}... bakarrik elur garaieratik gora eraiki daiteke
STR_ERROR_CAN_ONLY_BE_BUILT_BELOW_SNOW_LINE :{WHITE}... bakarrik elur garaieratik behera eraiki daiteke
STR_ERROR_NO_SUITABLE_PLACES_FOR_INDUSTRIES :{WHITE}Ez dago leku aproposik '{STRING}' industriarako
# Station construction related errors
STR_ERROR_CAN_T_BUILD_RAILROAD_STATION :{WHITE}Ezin da tren gordailua hemen eraiki...
@@ -4318,7 +4326,11 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Ezin da
STR_DESKTOP_SHORTCUT_COMMENT :Transport Tycoon Deluxe-ren simulazio bat
# Translatable descriptions in media/baseset/*.ob* files
STR_BASEGRAPHICS_DOS_DESCRIPTION :Transport Tycoon Deluxe originaleko DOS edizioko grafikoak.
STR_BASESOUNDS_DOS_DESCRIPTION :Transport Tycoon Deluxe originaleko DOS edizioko soinuak.
STR_BASESOUNDS_WIN_DESCRIPTION :Transport Tycoon Deluxe originaleko Windows edizioko grafikoak.
STR_BASESOUNDS_NONE_DESCRIPTION :Soinurik gabeko soinu pakete bat
STR_BASEMUSIC_NONE_DESCRIPTION :Musika gabeko musika paketea.
##id 0x2000
# Town building names

View File

@@ -781,7 +781,6 @@ STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Гісторы
############ range for about menu starts
STR_ABOUT_MENU_LAND_BLOCK_INFO :Зьвесткі аб зямлі
STR_ABOUT_MENU_SEPARATOR :
STR_ABOUT_MENU_TOGGLE_CONSOLE :Кансоль
STR_ABOUT_MENU_AI_DEBUG :Наладка штучнага інтэлекту (ШІ/AI) / скрыптоў
STR_ABOUT_MENU_SCREENSHOT :Здымак экрана (Ctrl+S)
@@ -1432,7 +1431,7 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Наладкі
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Наладкі кампаніі (запісваюцца ў захаваньні; уплываюць толькі на новыя гульні)
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Наладкі кампаніі (запісваюцца ў захаваньне; уплываюць толькі на бягучую кампанію)
STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Катэґорыя {BLACK}да {WHITE}{STRING}
STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Тып BLACK}да {WHITE}Усе тыпы наладак
STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Тып {BLACK}да {WHITE}Усе тыпы наладак
STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Катэґорыя {BLACK}да {WHITE}{STRING} {BLACK}і {SILVER}Тып {BLACK}да {WHITE}Усе тыпы наладак
STR_CONFIG_SETTINGS_NONE :{WHITE}- Няма -
@@ -2934,29 +2933,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS :Палi
STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Засьнежаная зямля
STR_LAI_CLEAR_DESCRIPTION_DESERT :Пустэльня
STR_LAI_RAIL_DESCRIPTION_TRACK :{STRING} рэйкi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :{STRING} рэйкi са звычайнымі сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :{STRING} рэйкi з уваходнымі прэсыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :{STRING} рэйкi з выхаднымi сыґналамi (прэсыґналамі)
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :{STRING} рэйкi з камбаванымi сыґналамi (прэсыґналамі)
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :{STRING} рэйкi з маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :{STRING} рэйкi з аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :{STRING} рэйкi са звычайнымi й уваходнымі прэсыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :{STRING} рэйкi са звычайнымi й выхаднымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :{STRING} рэйкi са звычайнымi й камбаванымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :{STRING} рэйкi са звычайнымi й маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :{STRING} рэйкi са звычайнымi й аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :{STRING} рэйкi з уваходнымi (прэcыгналамi) ды выхаднымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :{STRING} рэйкi з уваходнымi (прэсыґналамi) ды камбаванымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :{STRING} рэйкi з уваходнымi (прэсыґналамi) ды маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :{STRING} рэйкi з уваходнымi (прэсыґналамi) ды аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :{STRING} рэйкi з выхаднымi й камбінаванымі прэсыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :{STRING} рэйкі з выхаднымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :{STRING} рэйкі з выхаднымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :{STRING} рэйкі з камбінаванымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :{STRING} рэйкі з камбінаванымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :{STRING} рэйкі з маршрутнымі (PMS) ды аднабаковымі маршрутнымі сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :{STRING} чыгуначнае дэпо
STR_LAI_RAIL_DESCRIPTION_TRACK :Чыгунка рэйкi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :Чыгунка рэйкi са звычайнымі сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :Чыгунка рэйкi з уваходнымі прэсыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :Чыгунка рэйкi з выхаднымi сыґналамi (прэсыґналамі)
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :Чыгунка рэйкi з камбаванымi сыґналамi (прэсыґналамі)
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :Чыгунка рэйкi з маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :Чыгунка рэйкi з аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :Чыгунка рэйкi са звычайнымi й уваходнымі прэсыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :Чыгунка рэйкi са звычайнымi й выхаднымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :Чыгунка рэйкi са звычайнымi й камбаванымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :Чыгунка рэйкi са звычайнымi й маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :Чыгунка рэйкi са звычайнымi й аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :Чыгунка рэйкi з уваходнымi (прэcыгналамi) ды выхаднымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды камбаванымi сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :Чыгунка рэйкi з уваходнымi (прэсыґналамi) ды аднабаковымi маршрутнымi (PMS) сыґналамi
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :Чыгунка рэйкi з выхаднымi й камбінаванымі прэсыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :Чыгунка рэйкі з выхаднымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :Чыгунка рэйкі з выхаднымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :Чыгунка рэйкі з камбінаванымі (прэсыґналамі) ды маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :Чыгунка рэйкі з камбінаванымі (прэсыґналамі) ды аднабаковымі маршрутнымі (PMS) сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :Чыгунка рэйкі з маршрутнымі (PMS) ды аднабаковымі маршрутнымі сыґналамі
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :Чыгунка чыгуначнае дэпо
STR_LAI_ROAD_DESCRIPTION_ROAD :Дарога
STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Дарога з вулічным асьвятленьнем
@@ -3020,7 +3019,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} 20022016 Каманда распрацоўнікаў OpenTTD
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 20022017 Каманда распрацоўнікаў OpenTTD
# Save/load game/scenario
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Захаваць гульню
@@ -3239,8 +3238,6 @@ STR_NEWGRF_ERROR_INVALID_ID :Спроба в
STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{STRING} утрымлiвае пашкоджаны спрайт. Усе пашкоджаныя спрайты будуць паказаны чырвоным знакам пытаньня (?).
STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Утрымлiвае некалькі блёкаў «Action 8» (спрайт {3:NUM})
STR_NEWGRF_ERROR_READ_BOUNDS :Чытаньне па-за канцом псэўда-спрайту (спрайт {3:NUM})
STR_NEWGRF_ERROR_MISSING_SPRITES :{WHITE}У бягучым наборы базавай ґрафікі адсутнічаюць выявы некаторых аб'ектаў.{}Калі ласка, абнавіце модуль базавай ґрафікі.
STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE :{WHITE}У выкарыстаным наборы базавай ґрафікі адсутнічаюць некаторыя малюнкі.{}Калі ласка, абнавіце набор малюнкаў.{}Вам можа спатрэбіцца {YELLOW}тэставая вэрсія ґрафічнага набору{WHITE}, таму што ў вас {YELLOW}тэставая вэрсія OpenTTD{WHITE}.
STR_NEWGRF_ERROR_GRM_FAILED :Запытаныя рэсурсы GRF недаступныя (спрайт {3:NUM})
STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} быў адключаны з-за {2:STRING}
STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Недапушчальны/невядомы фармат размяшчэньня спрайтаў (спрайт {3:NUM})
@@ -3627,9 +3624,8 @@ STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Патр
STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Патрабуецца: {YELLOW}{STRING}{STRING}, {STRING}{STRING}, {STRING}{STRING}
############ range for requires ends
############ range for produces starts
STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING :{BLACK}Груз, які чакае перапрацоўкі:
STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO :{YELLOW}{CARGO_LONG}{STRING}{BLACK}
STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING}
STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Вырабляе: {YELLOW}{STRING}{STRING}, {STRING}{STRING}
############ range for produces ends
@@ -3910,7 +3906,6 @@ STR_REPLACE_REPLACING_WHEN_OLD :{ENGINE} кал
STR_REPLACE_VEHICLES_STOP :{BLACK}Спыніць замену
STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Спыніць замену транспарту
STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Замяняем: {ORANGE}{STRING}
STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Пераключэньне паміж вокнамі замены лякаматываў і ваґонаў
STR_REPLACE_ENGINES :Лякаматывы
STR_REPLACE_WAGONS :Ваґоны

Some files were not shown because too many files have changed in this diff Show More