Compare commits

...

583 Commits

Author SHA1 Message Date
pelya
d408d58b57 Fixed multiplayer client list not drawn when it's too narrow 2016-05-15 19:18:16 +03:00
pelya
481cecf6aa Fixed multiplayer client list 2016-05-15 01:34:24 +03:00
pelya
e3ea0025c5 Updated Andorid translations 2016-05-14 23:28:34 +03:00
pelya
584d7f3136 Backported Spanish Mexican translation from upstream master branch 2016-05-14 23:27:25 +03:00
pelya
1f4570c14b Change video color depth from game options 2016-04-17 01:05:19 +03:00
pelya
8ec3f4462a Also disable Ctrl hotkey for road stations 2016-04-16 22:49:53 +03:00
pelya
174b07f266 Fixed joining rail stations broken 2016-04-16 22:47:13 +03:00
Sergii Pylypenko
0917c225d8 Added vertical toolbar setting to advanced settings dialog 2016-04-15 22:22:34 +03:00
Sergii Pylypenko
05d1643d26 Confirmation dialog: show what goods the station accepts using a tooltip 2016-04-12 22:29:55 +03:00
Sergii Pylypenko
686321deff Fixed crash when selecting different font size 2016-04-12 21:16:21 +03:00
pelya
bcec5edab9 Updated todo 2016-04-11 01:50:01 +03:00
pelya
eba99834e0 Updated translations 2016-04-11 01:15:24 +03:00
pelya
712ebb3287 Fixed wrong minimap legend clicks items after few minimap usages 2016-04-11 01:13:01 +03:00
pelya
17abfa33d0 Fixed station catchment area not shown when using confirmation dialog 2016-04-11 01:03:50 +03:00
pelya
4cba4d08aa Fixed UI when building with non-autorail tool with confirmation window 2016-04-11 00:48:14 +03:00
pelya
de9d011a01 Fixed non-autorail building with confirmation dialog, UI is still slightly broken 2016-04-11 00:34:01 +03:00
pelya
fe24037905 Updated todo 2016-04-10 23:58:43 +03:00
Sergii Pylypenko
0b931d9383 Oops 2016-04-08 21:20:01 +03:00
Sergii Pylypenko
4310dc186b Show smallmap legend by default 2016-04-08 21:06:40 +03:00
Sergii Pylypenko
0452c60ac1 Fixed legend in minimap 2016-04-08 21:03:49 +03:00
Sergii Pylypenko
ca668e7c99 Fixed subsidies window list height 2016-04-08 19:19:19 +03:00
Sergii Pylypenko
02fc2201bc Option to disable build confirmation dialog 2016-04-08 17:50:09 +03:00
Sergii Pylypenko
8787230f82 Reverted some unnecessary changes 2016-04-08 17:18:23 +03:00
Sergii Pylypenko
510548f381 Proper transparent confirmation window 2016-04-07 23:39:16 +03:00
Sergii Pylypenko
e1d12868f7 Making transparent window is hard 2016-04-07 21:14:07 +03:00
Sergii Pylypenko
19bfa2317c Keep building area highlighted when confirmation window is shown 2016-04-06 23:39:17 +03:00
Sergii Pylypenko
a7a8e35968 Build confirmation window, for each build action on the map 2016-04-06 23:35:05 +03:00
Sergii Pylypenko
a474c233e0 Bigger list items in vehicle orders dialog 2016-04-06 22:20:52 +03:00
Sergii Pylypenko
6fcdd5c43f Fixed bridge UI 2016-04-04 23:11:37 +03:00
Sergii Pylypenko
b0441047aa Hide all windows when building anything on the map 2016-04-04 23:04:39 +03:00
Sergii Pylypenko
00dc8319eb Fix for vehicles unable to fully load 2016-04-04 21:33:16 +03:00
pelya
b4b6e07057 Updated Android translations 2016-04-03 14:55:57 +03:00
pelya
5bbb64885a Fixed crash in "Available vehicles" window 2016-04-03 14:10:44 +03:00
pelya
844cb32a88 Lazy fix for crash https://bugs.openttd.org/task/6437 2016-04-03 13:55:34 +03:00
pelya
8b686b812d Updated todo 2016-04-03 00:25:01 +03:00
pelya
bcacd626ef Fixed minimap scrolling 2016-04-03 00:13:59 +03:00
pelya
026bd48e91 Fixed sign list window 2016-04-03 00:00:44 +03:00
pelya
03fa2b7487 Fixed 'Sort by' widget 2016-04-02 23:52:33 +03:00
pelya
b74200f58f Fixed text input widget too small and bottom bar too wide 2016-04-02 23:39:41 +03:00
pelya
5e54f92241 Bump version files 2016-04-02 22:57:04 +03:00
pelya
5d77a7ff22 Libtimidity is excluded from build on Android, probably due to broken configure script 2016-04-02 22:55:54 +03:00
pelya
4c30d8e5a4 Removed a separate empty panel on the Extra Viewport window 2016-04-02 22:41:29 +03:00
frosch
5a6f11361d (svn r27531) [1.6] -Update: Documentation 2016-04-02 14:06:10 +03:00
Sergii Pylypenko
2b5d1be8e7 Updated tutorial dialog with more videos 2016-03-30 22:08:27 +03:00
Sergii Pylypenko
ab5c174602 Added todo 2016-03-28 22:15:06 +03:00
Sergii Pylypenko
0ad6eba1b6 Rough post-merge GUI fix 2016-03-28 22:14:45 +03:00
Sergii Pylypenko
04cecd2f9a Cleaning up old files 2016-03-28 21:19:31 +03:00
Sergii Pylypenko
e7bc77d4b4 Do not translate close button symbol 2016-03-28 21:00:10 +03:00
Sergii Pylypenko
eec71a5e62 Android translation scripts 2016-03-28 20:42:43 +03:00
frosch
29e1314e97 (svn r27519) [1.6] -Update: Documentation 2016-03-27 23:18:49 +03:00
pelya
74c1382675 Compilation fixes 2016-03-27 23:14:56 +03:00
pelya
b07ae4fa74 Railroad tutorial, by Deliso Jan 2016-03-27 22:57:26 +03:00
pelya
3a12f56a62 Fixed windows hidden when moved slightly off-screen to the left 2016-03-27 22:57:26 +03:00
Sergii Pylypenko
cfef9c8f29 Better font detection 2016-03-27 22:57:26 +03:00
Sergii Pylypenko
16f249f025 Set font path to app local directory instead of the /system/fonts, because random devices miss random fonts 2016-03-27 22:57:26 +03:00
Sergii Pylypenko
a0299ff713 Fixed compilation 2016-03-27 22:57:26 +03:00
Sergii Pylypenko
d03b27e1f6 Fixed multiplayer chat
Conflicts:
	src/network/network_gui.cpp
2016-03-27 22:56:50 +03:00
Sergii Pylypenko
a016e3fbf9 Fixed refit window too big. 2016-03-27 22:54:32 +03:00
pelya
2f59f6d1df Fixed 'New game' dialog
Conflicts:
	src/genworld_gui.cpp
2016-03-27 22:54:18 +03:00
Sergii Pylypenko
d00e9cd050 WTF why is it swapped?
Conflicts:
	src/settings_gui.cpp
2016-03-27 22:52:35 +03:00
Sergii Pylypenko
50e6a86f7b Non-blocking text input. so you won't get kicked by server because of no reply to ping 2016-03-27 22:51:27 +03:00
Sergii Pylypenko
d2a582fb9e Changing GUI zoom factor will also change resolution
Conflicts:
	src/settings_gui.cpp
2016-03-27 22:51:23 +03:00
Sergii Pylypenko
eadf5e9f4a Fixed sort button marker not centered 2016-03-27 22:50:05 +03:00
Sergii Pylypenko
4c1172d9d0 Fixed 'Replace vehicles' dialog 2016-03-27 22:50:05 +03:00
Sergii Pylypenko
3ff1ccb5c2 Fixed dropdown box too narrow and cropping text 2016-03-27 22:50:05 +03:00
Sergii Pylypenko
279baee43a Removed todo 2016-03-27 22:50:05 +03:00
Sergii Pylypenko
a479267db2 Fixed 'Buy vehicle' dialog not resizable 2016-03-27 22:50:04 +03:00
Sergii Pylypenko
1ea2ca0482 Adjusting vehicle window size 2016-03-27 22:50:04 +03:00
Sergii Pylypenko
12ea53e19e Fxied crash in 'Replace vehicle' window 2016-03-27 22:50:04 +03:00
Sergii Pylypenko
e58a207cf6 Fixed 'Buy vehicle' window
Conflicts:
	src/build_vehicle_gui.cpp
2016-03-27 22:50:00 +03:00
pelya
2365e94acb Fixed 'check online content' dialog
Conflicts:
	src/network/network_content_gui.cpp
2016-03-27 22:49:07 +03:00
pelya
34e886c5e5 Reverted more SetMinimalSize() hacks 2016-03-27 22:48:45 +03:00
pelya
fe72293c37 Reverted SetMinimalSize() changes, they are not needed anymore 2016-03-27 22:48:45 +03:00
pelya
c7087a15b7 Fixed 'new game' dialog 2016-03-27 22:48:45 +03:00
pelya
9500f8d92a Set default min size for all widgets
Conflicts:
	src/widget.cpp
2016-03-27 22:48:39 +03:00
pelya
f5a0182b8a More fixes to network GUI
Conflicts:
	src/widget.cpp
2016-03-27 22:48:08 +03:00
pelya
3a77fccd6f Fixed multiplayer widgets
Conflicts:
	src/network/network_gui.cpp
2016-03-27 22:47:18 +03:00
pelya
6910735abf Fixed OpenTTD release version, for the third time eh 2016-03-27 22:46:44 +03:00
pelya
d6148192a3 Fixed release version yet another time
Conflicts:
	version-override
2016-03-27 22:46:29 +03:00
pelya
7dc511ba5c Fixed toolbar and status bar 2016-03-27 22:45:58 +03:00
pelya
13ad49d329 Fixed crash in minimap legend 2016-03-27 22:45:58 +03:00
pelya
075ac65a93 Fixes in vehicle GUI 2016-03-27 22:45:58 +03:00
pelya
9652791a07 Fixed game settings dialog 2016-03-27 22:45:58 +03:00
pelya
5c44744772 Centered dropdown drop button 2016-03-27 22:45:58 +03:00
pelya
963cd3c5ea Centered vertical scrollbar 2016-03-27 22:45:58 +03:00
pelya
f99dc9868f Centered vertical scrollbar arrows 2016-03-27 22:45:58 +03:00
pelya
05c6c76771 Centered close box sprite 2016-03-27 22:45:58 +03:00
pelya
13b56f21f9 New GFX functions to draw cenetered sprites 2016-03-27 22:45:58 +03:00
pelya
09b117c824 Added BLACK_REMAP mode in 16bpp blitter 2016-03-27 22:45:58 +03:00
pelya
444044a2ef Print crash log to Android logcat 2016-03-27 22:45:58 +03:00
pelya
a137088a80 Fixed dropdown box not putting droplist above the widget 2016-03-27 22:45:58 +03:00
pelya
a0bcc2ae25 Fixed mouse input not processed, fixed PC compilation
Conflicts:
	src/video/sdl_v.cpp
2016-03-27 22:43:17 +03:00
pelya
400065fa43 Fixed compilatin, reverted several of my changes
Conflicts:
	src/gfx.cpp
	src/widget.cpp
	src/widget_type.h
	src/window.cpp
	src/window_func.h
2016-03-27 22:41:43 +03:00
pelya
3ef1c1baff Merge commit 'a8b575671894ffe1329ef37dca4989c0e60d70f5'
These merges are becoming more awful every time

Conflicts:
	src/ai/ai_gui.cpp
	src/build_vehicle_gui.cpp
	src/cheat_gui.cpp
	src/company_gui.cpp
	src/depot_gui.cpp
	src/dock_gui.cpp
	src/error_gui.cpp
	src/genworld_gui.cpp
	src/misc_gui.cpp
	src/network/network_content_gui.cpp
	src/network/network_gui.cpp
	src/newgrf_gui.cpp
	src/news_gui.cpp
	src/rail_gui.cpp
	src/rev.cpp.in
	src/road_gui.cpp
	src/settings_gui.cpp
	src/settings_gui.h
	src/signs_gui.cpp
	src/station_gui.cpp
	src/table/settings.ini
	src/terraform_gui.cpp
	src/toolbar_gui.cpp
	src/toolbar_gui.h
	src/vehicle_gui.cpp
	src/video/sdl_v.cpp
	src/viewport.cpp
	src/widget.cpp
	src/widgets/settings_widget.h
2016-03-27 22:33:11 +03:00
frosch
a8b5756718 (svn r27516) -Update: Documentation 2016-03-01 19:41:31 +00:00
translators
8284c69a61 (svn r27515) -Update from Eints:
polish: 1 change by lion
thai: 11 changes by ityellow
2016-03-01 18:45:37 +00:00
translators
815fce8bd9 (svn r27514) -Update from Eints:
turkish: 2 changes by wakeup
2016-02-28 18:45:36 +00:00
translators
4a64ced9b5 (svn r27513) -Update from Eints:
spanish: 5 changes by SilverSurferZzZ
2016-02-26 18:45:36 +00:00
translators
d9da47f913 (svn r27512) -Update from Eints:
spanish: 6 changes by SilverSurferZzZ
2016-02-25 18:45:36 +00:00
translators
e7f0902eaf (svn r27511) -Update from Eints:
japanese: 4 changes by nex259
esperanto: 4 changes by polluks
2016-02-24 18:45:38 +00:00
translators
9aaad3fa60 (svn r27510) -Update from Eints:
frisian: 55 changes by BAJansen
2016-02-19 18:45:35 +00:00
translators
561c4c2f02 (svn r27509) -Update from Eints:
frisian: 60 changes by BAJansen
2016-02-18 18:45:36 +00:00
translators
9043cbf9bf (svn r27508) -Update from Eints:
german: 1 change by mini1025
2016-02-13 18:45:36 +00:00
frosch
9db36bd87a (svn r27507) -Add: [NewGRF] Allow custom sound IDs in RV property 0x12, ship property 0x10 and aircraft property 0x12. 2016-02-08 21:05:57 +00:00
translators
4b8c6983e7 (svn r27506) -Update from Eints:
french: 13 changes by OliTTD
2016-02-04 18:45:36 +00:00
translators
4b894775af (svn r27505) -Update from Eints:
portuguese: 2 changes by neuralshock
2016-01-26 18:45:36 +00:00
translators
b23f22f0f6 (svn r27504) -Update from Eints:
catalan: 3 changes by juanjo
2016-01-25 18:45:36 +00:00
translators
3cc990d0f9 (svn r27503) -Update from Eints:
persian: 6 changes by Peymanpn
greek: 3 changes by Ferrum
2016-01-24 18:45:36 +00:00
translators
da104bee01 (svn r27502) -Update from Eints:
greek: 54 changes by Ferrum
2016-01-23 18:45:37 +00:00
translators
ff0c05f990 (svn r27501) -Update from Eints:
greek: 4 changes by Ferrum
2016-01-22 18:45:38 +00:00
translators
25bda8a417 (svn r27500) -Update from Eints:
frisian: 16 changes by gjannema
2016-01-18 18:45:36 +00:00
translators
4459e01f79 (svn r27499) -Update from Eints:
korean: 34 changes by telk5093
catalan: 10 changes by juanjo
2016-01-17 18:45:36 +00:00
translators
16fb5bf9bb (svn r27498) -Update from Eints:
greek: 11 changes by Ferrum
2016-01-14 18:45:35 +00:00
frosch
36e66a17dc (svn r27497) -Change: [NewGRF] Allow static NewGRF to enable the second rocky tile set. 2016-01-13 21:55:50 +00:00
frosch
265c8d090f (svn r27496) -Update: Baseset translations 2016-01-13 21:33:40 +00:00
translators
3b1696f13a (svn r27495) -Update from Eints:
greek: 37 changes by Ferrum
lithuanian: 1 change by BlinK_
2016-01-13 18:45:36 +00:00
translators
d046a02c7d (svn r27494) -Update from Eints:
frisian: 61 changes by gjannema
afrikaans: 1 change by telanus
2016-01-12 18:45:36 +00:00
translators
e45f9d32c1 (svn r27493) -Update from Eints:
greek: 10 changes by Ferrum
2016-01-11 18:45:35 +00:00
translators
f5359a70be (svn r27492) -Update from Eints:
catalan: 48 changes by juanjo
greek: 2 changes by Jubilee
2016-01-10 18:45:35 +00:00
translators
9c6655a37c (svn r27491) -Update from Eints:
croatian: 1 change by VoyagerOne
2016-01-09 18:45:38 +00:00
translators
45adb8f172 (svn r27490) -Update from Eints:
chinese (simplified): 1 change by siu238X
2016-01-08 18:45:37 +00:00
translators
5102ba54ea (svn r27489) -Update from Eints:
vietnamese: 1 change by nglekhoi
2016-01-06 18:45:35 +00:00
translators
e1df8edf66 (svn r27488) -Update from Eints:
catalan: 19 changes by juanjo
2016-01-03 18:45:37 +00:00
translators
ee00bef5a9 (svn r27487) -Update from Eints:
spanish: 1 change by SilverSurferZzZ
serbian: 57 changes by stravagante
catalan: 23 changes by juanjo
2016-01-02 18:45:38 +00:00
translators
60733359fa (svn r27486) -Update from Eints:
serbian: 86 changes by stravagante
catalan: 77 changes by juanjo
german: 1 change by mini1025
russian: 1 change by Lone_Wolf
latin: 1 change by Supercheese
2016-01-01 18:45:37 +00:00
translators
137ecd5377 (svn r27485) -Update from Eints:
croatian: 114 changes by UnderwaterHesus
2015-12-31 18:45:36 +00:00
translators
7ab291af95 (svn r27484) -Update from Eints:
croatian: 4 changes by UnderwaterHesus
english (us): 1 change by Supercheese
serbian: 21 changes by stravagante
latin: 1 change by Supercheese
2015-12-30 18:45:36 +00:00
translators
864c6360eb (svn r27483) -Update from Eints:
norwegian (bokmal): 1 change by cuthbert
esperanto: 1 change by LaPingvino
2015-12-29 18:45:36 +00:00
translators
8e5487c347 (svn r27482) -Update from Eints:
irish: 23 changes by tem
2015-12-28 18:45:35 +00:00
michi_cc
4445809dd9 (svn r27481) -Fix: [Win32] Stdin/out/err need to be re-assigned differently if the runtime lib of MSVC2015 is used. 2015-12-28 13:16:41 +00:00
translators
12915a202f (svn r27480) -Update from Eints:
irish: 12 changes by tem
greek: 1 change by frosch
swedish: 1 change by Zuu
2015-12-27 19:45:37 +00:00
frosch
cc3fcf7d61 (svn r27479) -Fix: Remove genders from non-default cases. 2015-12-27 13:16:37 +00:00
translators
e9d4e9b896 (svn r27478) -Update from Eints:
german: 8 changes by translators, 2 changes by frosch
arabic (egypt): 36 changes by translators
afrikaans: 4 changes by translators
hungarian: 1 change by translators
english (us): 1 change by translators
frisian: 2 changes by translators
norwegian (bokmal): 5 changes by translators
norwegian (nynorsk): 1 change by translators
lithuanian: 5 changes by translators
slovenian: 4 changes by translators
russian: 1 change by translators
ukrainian: 2 changes by translators
welsh: 3 changes by translators
french: 5 changes by glx
english (au): 1 change by translators
irish: 1 change by translators
tamil: 1 change by translators
belarusian: 2 changes by translators
bulgarian: 1 change by translators
italian: 1 change by translators
scottish gaelic: 1 change by translators
romanian: 2 changes by translators
urdu: 5 changes by translators
turkish: 11 changes by translators
portuguese: 1 change by translators
latvian: 2 changes by translators
esperanto: 1 change by translators
dutch: 3 changes by translators
serbian: 1 change by translators
spanish: 1 change by translators
czech: 4 changes by translators
indonesian: 2 changes by translators
latin: 1 change by translators
catalan: 2 changes by translators
hebrew: 9 changes by translators
greek: 5 changes by translators
polish: 1 change by translators
chinese (traditional): 1 change by translators
slovak: 1 change by translators
icelandic: 2 changes by translators
portuguese (brazilian): 4 changes by translators
danish: 2 changes by translators
vietnamese: 6 changes by translators
malay: 2 changes by translators
galician: 4 changes by translators
croatian: 1 change by translators
korean: 4 changes by translators
finnish: 1 change by translators
chinese (simplified): 1 change by translators
estonian: 3 changes by translators
persian: 4 changes by translators
thai: 6 changes by translators
swedish: 1 change by translators
luxembourgish: 3 changes by translators
japanese: 5 changes by translators
basque: 2 changes by translators
2015-12-27 11:40:23 +00:00
translators
ff0f720e82 (svn r27477) -Update from WebTranslator v3.0:
greek - 76 changes by Ferrum
polish - 1 changes by ampersand
2015-12-24 18:45:14 +00:00
translators
82a412031b (svn r27476) -Update from WebTranslator v3.0:
german - 2 changes by mini1025
2015-12-23 18:45:08 +00:00
translators
7c7565e33c (svn r27475) -Update from WebTranslator v3.0:
slovak - 1 changes by Milsa
spanish - 3 changes by SilverSurferZzZ
2015-12-22 18:45:13 +00:00
translators
afe19055bb (svn r27474) -Update from WebTranslator v3.0:
irish - 21 changes by tem
2015-12-20 18:45:10 +00:00
translators
1ebc92faec (svn r27473) -Update from WebTranslator v3.0:
welsh - 1 changes by kazzie
2015-12-19 18:45:08 +00:00
planetmaker
96aa437f85 (svn r27472) -Change [FS#6401] (r20219): On Haiku use the appropriate system variable to obtain the include dir (aarroyoc) 2015-12-15 20:43:39 +00:00
translators
ed7e09833e (svn r27471) -Update from WebTranslator v3.0:
czech - 1 changes by djst
2015-12-15 18:45:10 +00:00
translators
7338ed075f (svn r27470) -Update from WebTranslator v3.0:
turkish - 69 changes by wakeup
2015-12-11 18:45:09 +00:00
zuu
8660a2c2b1 (svn r27469) -Fix (r27468): Don't fetch all content info from content server when showing a online content window with exactly one type of content. 2015-12-10 19:58:33 +00:00
zuu
566d7de6af (svn r27468) -Fix (r27444): Game Scripts were not displayed in the content download window when opened from the AI/GS settings window. 2015-12-10 18:28:01 +00:00
translators
696626a8e9 (svn r27467) -Update from WebTranslator v3.0:
simplified_chinese - 1 changes by Gavin
turkish - 34 changes by wakeup
2015-12-09 18:45:14 +00:00
translators
ae767d30a4 (svn r27466) -Update from WebTranslator v3.0:
hungarian - 1 changes by IPG
spanish - 2 changes by SilverSurferZzZ
2015-12-04 18:45:14 +00:00
translators
ae1bb896e6 (svn r27465) -Update from WebTranslator v3.0:
spanish - 5 changes by SilverSurferZzZ
2015-12-03 18:45:08 +00:00
translators
1bf75b1abb (svn r27464) -Update from WebTranslator v3.0:
spanish - 8 changes by SilverSurferZzZ
2015-12-02 18:45:09 +00:00
frosch
e78a03d7b4 (svn r27463) -Merge: Documentation updates from 1.5 branch 2015-12-01 19:49:49 +00:00
translators
244144f0f6 (svn r27460) -Update from WebTranslator v3.0:
spanish - 8 changes by SilverSurferZzZ
2015-12-01 18:45:07 +00:00
translators
9808cfdf5e (svn r27459) -Update from WebTranslator v3.0:
basque - 43 changes by Thadah
spanish - 3 changes by SilverSurferZzZ
2015-11-30 18:45:13 +00:00
translators
bf61d7a797 (svn r27458) -Update from WebTranslator v3.0:
basque - 20 changes by Thadah
2015-11-26 18:45:10 +00:00
translators
786838d277 (svn r27457) -Update from WebTranslator v3.0:
croatian - 1 changes by VoyagerOne
spanish - 2 changes by SilverSurferZzZ
2015-11-25 18:45:12 +00:00
translators
e94c79227b (svn r27456) -Update from WebTranslator v3.0:
korean - 7 changes by telk5093
spanish - 4 changes by SilverSurferZzZ
2015-11-24 18:45:15 +00:00
translators
06fc9283f7 (svn r27455) -Update from WebTranslator v3.0:
spanish - 4 changes by SilverSurferZzZ
2015-11-23 18:45:08 +00:00
translators
ca93b0ef79 (svn r27454) -Update from WebTranslator v3.0:
korean - 4 changes by telk5093
2015-11-22 18:45:10 +00:00
translators
d8b8f033d5 (svn r27453) -Update from WebTranslator v3.0:
italian - 1 changes by lorenzodv
2015-11-21 18:45:08 +00:00
translators
17e6f42f03 (svn r27452) -Update from WebTranslator v3.0:
russian - 1 changes by Lone_Wolf
2015-11-20 18:45:10 +00:00
alberth
e1a00bc244 (svn r27451) -Feature[FS#6241]: Move sprite 8 positions in sprite aligner with ctrl+click. (based on work by juzza1) 2015-11-20 10:04:28 +00:00
alberth
e32afcc4ea (svn r27450) -Feature[FS#6391](r27446): Lower the sell-chain button in the train depot GUI while dragging a vehicle over it. (Eearslya) 2015-11-20 09:25:27 +00:00
translators
05812cd61b (svn r27449) -Update from WebTranslator v3.0:
spanish - 2 changes by SilverSurferZzZ
2015-11-18 17:45:09 +00:00
translators
420eb83065 (svn r27448) -Update from WebTranslator v3.0:
spanish - 1 changes by SilverSurferZzZ
2015-11-16 17:45:09 +00:00
translators
7db053813b (svn r27447) -Update from WebTranslator v3.0:
spanish - 2 changes by SilverSurferZzZ
2015-11-15 17:45:11 +00:00
frosch
1a0723579b (svn r27446) -Feature: Lower the sell-vehicle button in the depot GUI while dragging a vehicle over it. (Eearslya) 2015-11-14 22:54:52 +00:00
translators
15b7e8faf1 (svn r27445) -Update from WebTranslator v3.0:
spanish - 1 changes by SilverSurferZzZ
2015-11-14 17:45:11 +00:00
zuu
0cff11130d (svn r27444) -Add: When viewing online content of a particular type, hide content of other types unless they have been (auto)selected for download. 2015-11-14 15:57:15 +00:00
zuu
90b340e689 (svn r27443) -Fix: Negoation in comment was wrong. 2015-11-14 13:06:26 +00:00
translators
4dcda474fc (svn r27442) -Update from WebTranslator v3.0:
spanish - 3 changes by SilverSurferZzZ
2015-11-13 17:45:09 +00:00
translators
a55e6b6d5a (svn r27441) -Update from WebTranslator v3.0:
spanish - 3 changes by SilverSurferZzZ
2015-11-10 17:45:08 +00:00
translators
12229d80fe (svn r27440) -Update from WebTranslator v3.0:
spanish - 2 changes by SilverSurferZzZ
2015-11-09 17:45:07 +00:00
translators
7ce96b4d47 (svn r27439) -Update from WebTranslator v3.0:
spanish - 7 changes by SilverSurferZzZ
2015-11-08 17:45:08 +00:00
frosch
515fb701c2 (svn r27438) -Fix (r27346) [FS#6387]: The build object hotkey no longer checked whether there were any objects defined. 2015-11-07 15:07:18 +00:00
translators
19e0cb8c50 (svn r27437) -Update from WebTranslator v3.0:
spanish - 3 changes by SilverSurferZzZ
2015-11-06 17:45:09 +00:00
translators
591c3e2c81 (svn r27436) -Update from WebTranslator v3.0:
spanish - 1 changes by SilverSurferZzZ
2015-11-05 17:45:08 +00:00
translators
246e85088d (svn r27435) -Update from WebTranslator v3.0:
spanish - 5 changes by SilverSurferZzZ
2015-11-04 17:45:08 +00:00
frosch
ba955956cb (svn r27428) -Fix: When selecting a refit cargo for orders, do not check whether the vehicle is in a depot or station, and do not ask whether the vehicle currently allows station-refitting. Also hide the refit cost for orders, it is not predictable. 2015-10-30 17:27:21 +00:00
frosch
ade25fff71 (svn r27427) -Fix: Use the NewGRF railtype sorting order in the infrastructure window. 2015-10-30 17:24:30 +00:00
frosch
0f8f738942 (svn r27426) -Change: Round loading percentage in loading indicators and conditional orders towards 50%, so that 0% and 100% mean completely empty or full. 2015-10-30 17:24:05 +00:00
frosch
c74ffeecd1 (svn r27425) -Fix [FS#5842]: Crash when switching to or taking over companies, when an order window of a vehicle of the new company was opened. Now close those windows. 2015-10-30 17:23:16 +00:00
frosch
e51abf1796 (svn r27424) -Fix [FS#6374]: Towns did not connect roads to existing roads, unless they had only a single roadbit. Otoh, towns also tried to connect to single roadbit tiles such as tunnels and depots, even though they were not connectable in the direction of interest. 2015-10-30 17:19:01 +00:00
frosch
34627862c6 (svn r27423) -Fix: When towns expanded single-bit roadtiles using a grid-layout, they used the layout position of the neighbouring tile. 2015-10-30 17:17:54 +00:00
frosch
1e897531cb (svn r27422) -Fix [FS#6341]: Aircraft picked the wrong airport entry point, if airports were rotated by 180 degree. (marcole) 2015-10-30 16:20:00 +00:00
frosch
7be7851b94 (svn r27421) -Fix [FS#6265]: Consider text and icon sizes when drawing the client list. (_dp_) 2015-10-30 16:19:33 +00:00
frosch
49a18025f8 (svn r27420) -Fix [FS#6362]: GrowTownAtRoad sometimes returned false, even when a house was built. (_dp_) 2015-10-30 16:19:09 +00:00
frosch
51787a3465 (svn r27419) -Fix [FS#6369]: CmdSellRailWagon did not revert all actions properly when no orderlist could be allocated. (Juanjo) 2015-10-30 16:18:39 +00:00
frosch
147b53fbff (svn r27418) -Fix [FS#6329] [FS#6379]: Desync due to incorrect storage of segments with different railtype in the YAPF cache. (JGR) 2015-10-30 16:18:03 +00:00
frosch
d20a116dfd (svn r27417) -Doc: ScaleGUITrad (adf88) 2015-10-29 19:23:21 +00:00
translators
85b19944f4 (svn r27416) -Update from WebTranslator v3.0:
welsh - 2 changes by kazzie
2015-10-29 17:45:08 +00:00
translators
3af9438fb5 (svn r27415) -Update from WebTranslator v3.0:
spanish - 6 changes by SilverSurferZzZ
2015-10-28 17:45:08 +00:00
translators
2d684b8e76 (svn r27414) -Update from WebTranslator v3.0:
spanish - 11 changes by SilverSurferZzZ
2015-10-27 17:45:08 +00:00
translators
3c269df00d (svn r27413) -Update from WebTranslator v3.0:
spanish - 12 changes by SilverSurferZzZ
2015-10-26 17:45:10 +00:00
translators
e156f43848 (svn r27412) -Update from WebTranslator v3.0:
vietnamese - 16 changes by myquartz
2015-10-25 17:45:10 +00:00
translators
6155d6a3e0 (svn r27411) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2015-10-24 17:45:11 +00:00
translators
67da640e97 (svn r27410) -Update from WebTranslator v3.0:
indonesian - 24 changes by UseYourIllusion
2015-10-15 17:45:09 +00:00
translators
0608ab5f81 (svn r27409) -Update from WebTranslator v3.0:
indonesian - 20 changes by UseYourIllusion
2015-10-13 17:45:08 +00:00
translators
e9a338f9ef (svn r27408) -Update from WebTranslator v3.0:
simplified_chinese - 9 changes by xiangyigao
2015-10-09 17:45:08 +00:00
translators
440af97436 (svn r27407) -Update from WebTranslator v3.0:
simplified_chinese - 6 changes by xiangyigao
2015-10-05 17:45:09 +00:00
frosch
0d4b84f06b (svn r27406) -Doc: Use same start/end tile convention in CmdPlantTree as in other TileArea commands. (HackaLittleBit) 2015-09-30 17:28:58 +00:00
translators
0df4b5142c (svn r27405) -Update from WebTranslator v3.0:
latin - 2 changes by Supercheese
vietnamese - 18 changes by nglekhoi
2015-09-27 17:45:15 +00:00
translators
334b2319ef (svn r27404) -Update from WebTranslator v3.0:
arabic_egypt - 64 changes by abdumzn
2015-09-26 17:45:17 +00:00
translators
12b35b301c (svn r27403) -Update from WebTranslator v3.0:
polish - 7 changes by McZapkie
2015-09-22 17:45:10 +00:00
translators
0d0b15875f (svn r27402) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2015-09-21 17:45:08 +00:00
translators
67b605337f (svn r27401) -Update from WebTranslator v3.0:
frisian - 2 changes by BAJansen
norwegian_bokmal - 8 changes by hafting
welsh - 4 changes by kazzie
2015-09-19 17:45:17 +00:00
rubidium
e8788019fa (svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused with no clients the tick length was increased significantly, making any assumptions about the tick length used further down in the code are not true anymore. One of such assumptions was that one should readvertise every 15 minutes worth of original ticks, but due to the lengthening this timeframe would be more like 45-60 minutes. Now we'll take the operating system's millisecond counter instead 2015-09-19 16:49:46 +00:00
planetmaker
e4c3db0c6a (svn r27399) -Fix: [Makefile] game script directory and compat*.nut were never installed on *nix 2015-09-17 13:12:21 +00:00
translators
65f8b1c95e (svn r27398) -Update from WebTranslator v3.0:
simplified_chinese - 1 changes by xiangyigao
2015-09-15 17:45:08 +00:00
alberth
65db59da81 (svn r27397) -Fix(r27346)[FS#6370]: Fix object editing crash in scenario editor (based on work by adf88) 2015-09-13 12:04:47 +00:00
translators
a5355ec6c4 (svn r27396) -Update from WebTranslator v3.0:
latin - 17 changes by Supercheese
2015-09-12 17:45:16 +00:00
translators
081da61d05 (svn r27395) -Update from WebTranslator v3.0:
frisian - 14 changes by BAJansen
2015-09-09 17:45:14 +00:00
translators
54eb340998 (svn r27394) -Update from WebTranslator v3.0:
frisian - 25 changes by BAJansen
2015-09-03 17:45:12 +00:00
translators
246df66229 (svn r27391) -Update from WebTranslator v3.0:
english_US - 2 changes by Supercheese
2015-08-31 17:45:13 +00:00
translators
ee8bee5e31 (svn r27390) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2015-08-30 17:45:17 +00:00
frosch
8c389a2a96 (svn r27389) -Fix: There are two different availability conditions for fdatasync in the manpage. Use them both, since at least on some MinGW versions one is not enough. 2015-08-20 20:47:45 +00:00
translators
8f36c49ffa (svn r27388) -Update from WebTranslator v3.0:
dutch - 4 changes by TheTycoonist
2015-08-20 17:45:15 +00:00
translators
284c9dd342 (svn r27387) -Update from WebTranslator v3.0:
dutch - 2 changes by TheTycoonist
2015-08-19 17:45:15 +00:00
translators
8cfc1e9d23 (svn r27386) -Update from WebTranslator v3.0:
dutch - 3 changes by TheTycoonist
2015-08-14 17:45:16 +00:00
rubidium
3b8aabdd9e (svn r27385) -Fix: compilation failure due #define-ing enum name of a system library before including the system library 2015-08-13 18:13:24 +00:00
translators
70322bce59 (svn r27384) -Update from WebTranslator v3.0:
catalan - 35 changes by juanjo
2015-08-13 17:45:15 +00:00
rubidium
8f711aca53 (svn r27383) -Fix: win32 sound driver would not catch the exception due to constness difference 2015-08-12 20:50:10 +00:00
michi_cc
f4cd0198f4 (svn r27382) -Add: [Win32] Project files for Visual Studio 2015. 2015-08-10 20:36:57 +00:00
michi_cc
44918010df (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 2015-08-10 20:24:13 +00:00
michi_cc
0cd198c798 (svn r27380) -Fix: [Win32] Compilation with MSVC2015. 2015-08-10 20:21:29 +00:00
frosch
63aa9f4ea8 (svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode. 2015-08-10 20:04:31 +00:00
alberth
438d7a26cc (svn r27378) -Codechange: Fix indentation of the table values, allow Doxygen to link to the TextColour enum. 2015-08-10 10:04:14 +00:00
rubidium
eb4b6a08d0 (svn r27377) -Codechange: use the pkg-config files of ICU as well. Since they are split into separate libraries it becomes possible to split RTL support for natural sorting, although the effect will be minimal 2015-08-09 13:54:17 +00:00
rubidium
cc5b8ea6cb (svn r27376) -Codechange: let libtimidity detection and configuration make use of pkg-config 2015-08-09 12:43:52 +00:00
rubidium
2011c24502 (svn r27375) -Fix-ish: update help parameter for png configuration (it has used pkg-config for a long time) 2015-08-09 12:42:52 +00:00
rubidium
36f77b1aa7 (svn r27374) -Codechange: make zlib detection and configuration make use of pkg-config 2015-08-09 12:42:21 +00:00
rubidium
c3715a025d (svn r27373) -Codechange: make sdl detection and configuration use pkg-config 2015-08-09 12:41:54 +00:00
rubidium
f05d71a9a6 (svn r27372) -Codechange: make allegro detection and configuration use pkg-config 2015-08-09 12:41:35 +00:00
rubidium
f179a92007 (svn r27371) -Codechange: make freetype detection and configuration use pkg-config 2015-08-09 12:41:12 +00:00
rubidium
2aee2899e8 (svn r27370) -Codechange: move the "dedicated server" check into the pkg-config check routine 2015-08-09 12:40:17 +00:00
rubidium
a08d1a044f (svn r27369) -Cleanup: there's no need to do dependency checking of libraries in OpenTTD; zlib should always be installed if libpng is because it links to zlib 2015-08-09 12:39:26 +00:00
rubidium
625bc2e0e7 (svn r27368) -Cleanup: undo the special case of OSX; it works fine without it 2015-08-09 12:37:20 +00:00
rubidium
ee700fd3b1 (svn r27367) -Codechange: make a distinction between the layouting part of ICU (lx) or the sorting/collation part of ICU (i18n) 2015-08-09 12:33:27 +00:00
frosch
9f72662ecc (svn r27366) -Fix [FS#6358]: Clickareas in settings tree were misaligned when the filter warning was displayed, if the setting height was defined by the icons instead of the font. 2015-08-09 10:22:51 +00:00
frosch
c9120cd714 (svn r27365) -Fix: Center settings filter warning also vertically, and also in case of multiple lines. 2015-08-09 10:21:06 +00:00
translators
a9200aa69a (svn r27364) -Update from WebTranslator v3.0:
czech - 1 changes by Eskymak
dutch - 12 changes by TheTycoonist
2015-08-08 17:45:27 +00:00
alberth
894f69e1fd (svn r27363) -Codechange: Fix codestyle of one-line methods and header codestyle of derived structs. 2015-08-08 13:19:38 +00:00
alberth
48485a6a5a (svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods. 2015-08-08 10:06:24 +00:00
rubidium
bc199a4fe1 (svn r27361) -Fix-ish: when attempting to find a host, try gcc/g++ but also CC/CXX appended to the host triple. This to make cross compilation with clang alone easier 2015-08-08 08:54:49 +00:00
rubidium
501ee2105a (svn r27360) -Feature: allow configuring pkg-config in one go for all libraries 2015-08-08 08:52:21 +00:00
translators
f95759139b (svn r27359) -Update from WebTranslator v3.0:
swedish - 1 changes by planetmaker
2015-08-07 17:45:12 +00:00
translators
163c30570b (svn r27358) -Update from WebTranslator v3.0:
catalan - 25 changes by juanjo
2015-08-02 17:45:14 +00:00
translators
e6782df9ba (svn r27357) -Update from WebTranslator v3.0:
catalan - 181 changes by juanjo
2015-08-01 17:45:15 +00:00
frosch
4eb6ce863a (svn r27354) -Fix (r27343): Actually make it work. (rubidium) 2015-07-31 21:43:40 +00:00
translators
66418db43e (svn r27352) -Update from WebTranslator v3.0:
catalan - 134 changes by juanjo
2015-07-31 17:45:18 +00:00
translators
18e7b67864 (svn r27347) -Update from WebTranslator v3.0:
slovenian - 15 changes by matej1245
2015-07-30 17:45:14 +00:00
alberth
67366cf03d (svn r27346) -Feature: Make the object placement gui an independent window. 2015-07-28 18:20:54 +00:00
alberth
e36a82c3e6 (svn r27345) -Fix-ish: Hide selected view if no object selected. 2015-07-28 18:18:59 +00:00
alberth
b1f1647303 (svn r27344) -Doc: Documenting the (Re)setObjectToPlace functions. 2015-07-28 08:16:52 +00:00
frosch
13a726b18f (svn r27343) -Feature [FS#6315]: [NewGRF] Allow railtype NewGRF to define separate sprites for the fences on either track side. 2015-07-26 12:28:34 +00:00
frosch
730c2177bf (svn r27342) -Add: Optionally return the number of sprites in the spriteset from GetCustomRailSprite. 2015-07-26 12:25:37 +00:00
frosch
bd50600f5b (svn r27341) -Fix [FS#6332]: Do not rerandomise the town name when only cost-estimating the founding. 2015-07-26 09:56:43 +00:00
frosch
67ae231f1b (svn r27340) -Fix [FS#6338]: Silence warning by moving _string_colourmap to a file no its own. (Cif) 2015-07-26 09:47:17 +00:00
translators
932aaa8cb5 (svn r27339) -Update from WebTranslator v3.0:
frisian - 42 changes by BAJansen
2015-07-25 17:45:15 +00:00
translators
55c177c26d (svn r27338) -Update from WebTranslator v3.0:
frisian - 8 changes by BAJansen
2015-07-24 17:45:18 +00:00
translators
f6a3faf927 (svn r27337) -Update from WebTranslator v3.0:
simplified_chinese - 1 changes by Gavin
2015-07-21 17:45:18 +00:00
translators
28f9637aed (svn r27336) -Update from WebTranslator v3.0:
greek - 36 changes by Jubilee
2015-07-17 17:45:14 +00:00
translators
28e885dd51 (svn r27335) -Update from WebTranslator v3.0:
greek - 24 changes by Jubilee
2015-07-16 17:45:15 +00:00
frosch
80df194341 (svn r27334) -Revert (r27232) [FS#6342]: No idea what the plan was, but making the main noise coefficients the same for all smoothness types certainly wasn't. 2015-07-16 17:05:40 +00:00
translators
99ed8df797 (svn r27333) -Update from WebTranslator v3.0:
greek - 7 changes by Jubilee
2015-07-13 17:45:17 +00:00
frosch
86825a745c (svn r27332) -Change: Enable YAPF cache debugging with desync debug level 2. 2015-07-12 17:06:02 +00:00
frosch
2af1fa921a (svn r27331) -Cleanup (r26999): Make variety distribution curves more sane. 2015-07-11 11:18:24 +00:00
frosch
f16fc69e95 (svn r27330) -Fix [FS#6335]: Make variety distribution not assume that sea level is at height 0.2 / 3 * TGPGetMaxHeight(). 2015-07-11 10:46:25 +00:00
frosch
04e9978f1f (svn r27329) -Fix: Add more height_t type-correctness to TGP code. 2015-07-11 10:43:34 +00:00
frosch
fc902d354f (svn r27328) -Codechange: Add an assertion to check for uninitialised variables when tracing variety distribution's control curves. 2015-07-11 10:41:20 +00:00
translators
d25934580f (svn r27327) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2015-07-09 17:45:08 +00:00
translators
81ec32199f (svn r27326) -Update from WebTranslator v3.0:
simplified_chinese - 6 changes by Gavin
2015-07-08 17:45:12 +00:00
translators
b50eddaea2 (svn r27325) -Update from WebTranslator v3.0:
catalan - 4 changes by juanjo
2015-06-30 17:45:15 +00:00
frosch
d1c2eae95d (svn r27324) -Fix: Remove corner-case optimisation for line drawing, which failed for dashed lines. (noticed by adf88) 2015-06-28 16:54:25 +00:00
frosch
e55f1adfa8 (svn r27323) -Fix: Spelling. 2015-06-28 15:54:12 +00:00
frosch
70e2c23772 (svn r27322) -Fix: Clipping of inclined lines did not account for the 'horizontal width' being bigger than the 'real width'. (adf88) 2015-06-28 15:50:13 +00:00
translators
1d9c78ef6b (svn r27321) -Update from WebTranslator v3.0:
korean - 2 changes by telk5093
2015-06-27 17:45:18 +00:00
frosch
c5a4b89915 (svn r27320) -Codechange: Do not drop order backups when loading a savegame for replaying. 2015-06-27 11:46:41 +00:00
translators
d3bfb5422f (svn r27319) -Update from WebTranslator v3.0:
frisian - 1 changes by BAJansen
2015-06-26 17:45:13 +00:00
translators
d9f8045255 (svn r27318) -Update from WebTranslator v3.0:
frisian - 9 changes by BAJansen
2015-06-25 17:45:13 +00:00
translators
d64d56b5a8 (svn r27317) -Update from WebTranslator v3.0:
frisian - 458 changes by BAJansen
2015-06-24 17:45:14 +00:00
frosch
42630dfa01 (svn r27316) -Doc: Improve documentation on ScriptCargo::GetCargoLabel 2015-06-21 18:53:23 +00:00
frosch
a1ca479a65 (svn r27315) -Fix: Norwegian bokmal 2015-06-21 17:52:18 +00:00
translators
8f84989389 (svn r27314) -Update from WebTranslator v3.0:
norwegian_bokmal - 4 changes by eirik174
2015-06-21 17:45:13 +00:00
frosch
90d50d78c0 (svn r27313) -Fix [FS#6317]: Adding tram to town-owned bridges assigned an incorrect owner to the tram and did not count infrastructure counts properly. (marcole) 2015-06-21 09:52:30 +00:00
frosch
d4db9cb109 (svn r27312) -Fix-ish [FS#6317]: Preserve town ownership of bridges when removing road from a road+tram bridge. (marcole) 2015-06-21 09:31:50 +00:00
frosch
c0015d6a7c (svn r27311) -Fix: Mark infrastructure window dirty in more cases. (marcole) 2015-06-21 09:19:27 +00:00
translators
a2f13f0fe2 (svn r27310) -Update from WebTranslator v3.0:
norwegian_bokmal - 79 changes by eirik174
2015-06-20 17:45:17 +00:00
frosch
0efffb6df4 (svn r27309) -Change [FS#6283]: Auto-complete partial roads when building level-crossings. (adf88) 2015-06-20 13:15:35 +00:00
frosch
07b83b8869 (svn r27308) -Fix [FS#6283]: Prevent breaking of tram-reversal points by adding more road pieces. (adf88) 2015-06-20 13:11:09 +00:00
frosch
81bdf8928e (svn r27307) -Fix [FS#6259]: Error message window with manager face failed with GUI zoom. (Johnnei) 2015-06-20 12:57:34 +00:00
frosch
b1763f1e77 (svn r27306) -Fix (r27305): Confused tiles. 2015-06-20 12:55:17 +00:00
frosch
19d1cda92e (svn r27305) -Fix [FS#6320]: Account for road-bridges and drive-through-stops in CanFollowRoad. 2015-06-20 12:40:04 +00:00
frosch
4117c5b747 (svn r27304) -Fix [FS#6321-ish]: Improve password window layout for big font sizes. 2015-06-20 12:30:10 +00:00
frosch
d07b686927 (svn r27303) -Fix [FS#6321]: SetMinimalSize was ignored for WWT_EDITBOX. 2015-06-20 12:29:36 +00:00
frosch
891021cdd3 (svn r27302) -Fix [FS#6313] (r26550): Updating timetables need to check the timetable flags from the real order instead of from a copy. (marcole) 2015-06-20 12:04:30 +00:00
frosch
6f2937855a (svn r27301) -Fix [FS#6313] (r26550): Modifying timetable times or speeds always confirmed all pre-estimated values. 2015-06-20 11:28:25 +00:00
frosch
04aa61ffac (svn r27300) -Fix [FS#6306]: Silence GCC warning (Cif) 2015-06-20 11:05:11 +00:00
planetmaker
aa0bd78a5d (svn r27299) -Doc: game script and ai library paths were wrong in readme. 2015-06-17 14:24:41 +00:00
translators
3ed9f24d19 (svn r27296) -Update from WebTranslator v3.0:
estonian - 93 changes by Jaropower
2015-06-01 17:45:13 +00:00
frosch
14052de6b2 (svn r27295) -Add: [strgen] Default plural subparameter positions for CARGO_xxx string control codes. 2015-05-28 17:26:53 +00:00
frosch
7f5e63324d (svn r27294) -Fix: Invalid plural references in various translations. 2015-05-28 17:25:46 +00:00
translators
25b87fe4a9 (svn r27293) -Update from WebTranslator v3.0:
traditional_chinese - 4 changes by siu238X
danish - 4 changes by beruic
2015-05-27 17:53:35 +00:00
frosch
5053ba6a6e (svn r27292) -Codechange: Unify language file range comments. 2015-05-26 21:11:12 +00:00
frosch
fa83524eb4 (svn r27291) -Fix (r27278) [FS#6303]: Some savegame data was discarded again during loading. 2015-05-21 18:59:11 +00:00
rubidium
dde669e6d3 (svn r27290) -Fix: sanitize the command line arguments before doing anything complex with them 2015-05-20 18:18:26 +00:00
rubidium
809161ebf2 (svn r27289) -Fix: some uninitialised instance variables 2015-05-20 18:17:50 +00:00
michi_cc
a41f197379 (svn r27288) -Fix: Slow network content GUI in MSVC Debug builds due to repeated string resolving. 2015-05-17 19:49:35 +00:00
alberth
ada765a7e1 (svn r27287) -Doc: Clarify radius and semantics of the industry producing/accepting tile functions. 2015-05-16 14:40:45 +00:00
alberth
ad8a7aee30 (svn r27286) -Fix-ish(r27140): Also fix typo in the documentation. 2015-05-16 12:08:06 +00:00
alberth
56c9765f72 (svn r27285) -Codechange: Use LG_ORIGINAL instead of a magic 0 to indicate the original landscape generator. 2015-05-16 12:01:19 +00:00
translators
ffb6f3cea0 (svn r27284) -Update from WebTranslator v3.0:
latin - 1 changes by Supercheese
2015-05-12 17:45:19 +00:00
translators
a976ec28b4 (svn r27283) -Update from WebTranslator v3.0:
belarusian - 4 changes by KorneySan
brazilian_portuguese - 20 changes by Tucalipe
2015-05-11 17:45:26 +00:00
frosch
a7849377dd (svn r27282) -Fix [FS#6254]: Enforce the company's default service intervals when purchasing another company. (Johnnei) 2015-05-11 16:58:09 +00:00
frosch
eccbe842b3 (svn r27281) -Codechange: Do not shadow local variables with other local variables in sub-scopes. 2015-05-11 16:53:05 +00:00
frosch
0ed553c0a7 (svn r27280) -Fix (r24998): Cloning/autoreplace/autorenew did not copy custom service intervals. (Johnnei) 2015-05-11 16:40:06 +00:00
frosch
f3ae301125 (svn r27279) -Feature: [NewGRF] Increase the maximum amount of industry types to 128 per NewGRF and 240 in total. 2015-05-09 10:21:55 +00:00
frosch
17d9b77db6 (svn r27278) -Fix: Handle savegames with an unexpected amount of industry-builder or NewGRF entity-mapping more gracefully. 2015-05-09 10:04:50 +00:00
frosch
4a6036208a (svn r27277) -Codechange: Make _displayed_industries a std::bitset. 2015-05-09 09:24:19 +00:00
translators
c348ebfeb1 (svn r27269) -Update from WebTranslator v3.0:
latvian - 20 changes by Parastais
2015-05-07 17:45:13 +00:00
translators
e7fa640566 (svn r27268) -Update from WebTranslator v3.0:
hebrew - 1 changes by oofnik
2015-05-06 17:45:15 +00:00
frosch
4b01ce36eb (svn r27267) -Change: [NewGRF] Translate industry variable A6. 2015-05-03 10:33:26 +00:00
frosch
97c76a51d6 (svn r27266) -Fix (r27265): Eddi jinxed it. 2015-05-03 10:30:02 +00:00
frosch
5923cfff4f (svn r27265) -Fix: Truncated comment in openttd.grf 2015-05-03 10:10:04 +00:00
translators
cf629bfb97 (svn r27264) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2015-05-02 17:45:18 +00:00
frosch
9f7749553e (svn r27263) -Doc: nforenum is part of grfcodec for some years. 2015-05-02 09:59:55 +00:00
translators
8803df32aa (svn r27262) -Update from WebTranslator v3.0:
croatian - 97 changes by UnderwaterHesus
2015-04-30 17:45:17 +00:00
translators
be00f631da (svn r27261) -Update from WebTranslator v3.0:
swedish - 1 changes by abbedabb
2015-04-28 17:45:14 +00:00
frosch
09caebf357 (svn r27260) -Fix (r27244): economy.allow_town_roads should not affect town placement during world generation. 2015-04-28 17:25:21 +00:00
frosch
071b574e2c (svn r27259) -Fix (r27244): Incorrect merge. (_dp_) 2015-04-27 21:40:46 +00:00
frosch
108aa4e7af (svn r27258) -Fix [FS#6287]: ScriptList::RemoveList failed to remove a list from itself. 2015-04-27 19:28:22 +00:00
translators
edad1a1ce5 (svn r27257) -Update from WebTranslator v3.0:
korean - 4 changes by telk5093
2015-04-27 17:45:15 +00:00
frosch
be30f224c7 (svn r27256) -Change [FS#6165]: Do not consider cargo that is already being loaded as waiting cargo wrt. the station rating. 2015-04-26 11:43:58 +00:00
frosch
53ee8c696b (svn r27255) -Fix [FS#6270]: Combined button+dropdown widgets in order and autoreplace GUI had incorrect hitbox when using GUI zoom. (_dp_) 2015-04-26 11:07:41 +00:00
frosch
9c75b61e5f (svn r27254) -Fix [FS#6264]: When building a lock on DC_AUTO-removable water-based objects, the water class was always set to canal. 2015-04-26 10:50:36 +00:00
frosch
db7dc5a6e9 (svn r27253) -Fix [FS#6282]: When crossing tram tracks with railroads, cost of extra roads was not being counted. (adf88) 2015-04-26 10:26:07 +00:00
frosch
f690713802 (svn r27252) -Fix [FS#6281]: Invalid infrastructure counting when crossing tram tracks with railroads. (adf88) 2015-04-26 10:23:55 +00:00
frosch
e9c3ca62cd (svn r27251) -Feature [FS#6252]: Make Ctrl+Remove-Roadstop also remove the road, just like for rail stations. (adf88) 2015-04-26 09:51:24 +00:00
frosch
482714e1cf (svn r27250) -Fix [FS#6286]: Broken error message in configure. (NG) 2015-04-26 08:59:20 +00:00
frosch
9714f95c63 (svn r27249) -Fix [FS#6240]: In some cases town growth failure was considered as success. (_dp_) 2015-04-25 12:17:16 +00:00
frosch
f27dc40c8a (svn r27248) -Fix [FS#6257]: Town labels on smallmap and zoomed-out viewports were not centered. (_dp_) 2015-04-25 11:58:19 +00:00
frosch
c1505cfcdb (svn r27247) -Cleanup: Make GrowTownAtRoad return a bool. 2015-04-25 11:46:10 +00:00
frosch
269d702cc8 (svn r27246) -Codechange: Deduplicate code between removing part of a rail station and removing the whole rail station. (adf88) 2015-04-25 11:37:57 +00:00
frosch
7fdc4da4b9 (svn r27245) -Fix [FS#6251]: Removing a rail waypoint used the remove-rail-station cost. (adf88) 2015-04-25 11:30:27 +00:00
frosch
ddae581ac8 (svn r27244) -Change [FS#6245]: Do not consider road junctions with trivial dead ends as branch points during town growth. (_dp_) 2015-04-25 11:12:47 +00:00
frosch
c9e9dacc6b (svn r27243) -Fix (r26816) [FS#6285]: Duplicate frees due to pool item classes not having copy constructors. 2015-04-23 20:07:07 +00:00
translators
e09d7e6fe4 (svn r27242) -Update from WebTranslator v3.0:
lithuanian - 17 changes by Stabilitronas
2015-04-22 17:45:15 +00:00
translators
dbc025798d (svn r27241) -Update from WebTranslator v3.0:
latin - 5 changes by Supercheese
2015-04-20 17:45:16 +00:00
translators
7fbcc64801 (svn r27240) -Update from WebTranslator v3.0:
lithuanian - 31 changes by Stabilitronas
2015-04-19 17:45:18 +00:00
translators
5d6ee8da6c (svn r27239) -Update from WebTranslator v3.0:
latin - 3 changes by Supercheese
lithuanian - 92 changes by Stabilitronas
2015-04-18 17:45:30 +00:00
translators
9c8fb872aa (svn r27238) -Update from WebTranslator v3.0:
latin - 2 changes by Supercheese
2015-04-15 17:45:15 +00:00
translators
9508b96bc0 (svn r27237) -Update from WebTranslator v3.0:
latin - 7 changes by Supercheese
2015-04-14 17:45:15 +00:00
glx
abe409db89 (svn r27236) -Fix (r27235): WT3 string validation 2015-04-13 23:20:23 +00:00
translators
9e2d0f4322 (svn r27235) -Update from WebTranslator v3.0:
latin - 123 changes by Supercheese
slovak - 54 changes by andrej
ukrainian - 130 changes by Fixer
2015-04-13 17:45:39 +00:00
translators
9f7545368d (svn r27234) -Update from WebTranslator v3.0:
ukrainian - 67 changes by Fixer
2015-04-12 17:45:17 +00:00
rubidium
e700bc1e04 (svn r27233) -Fix [FS#6272]: crash when no AIs were installed due to improper handling of non-ASCII characters by the string pointer lexer 2015-04-11 19:33:36 +00:00
alberth
684f6d4fcc (svn r27232) -Fix: Tweak noise generator more precisely for different map sizes (chillcore) 2015-04-11 18:46:01 +00:00
alberth
9b946e3bf2 (svn r27231) -Codechange: Replace magic numbers for the smoothness setting (chillcore) 2015-04-11 18:45:18 +00:00
alberth
b611635c0e (svn r27230) -Fix: Tune down terrain generation to reduce amount of long slopes (chillcore) 2015-04-11 18:44:26 +00:00
alberth
80f6d6c644 (svn r27229) -Change: Generate more detailed curves at the coast (chillcore) 2015-04-11 18:43:30 +00:00
alberth
01680f7415 (svn r27228) -Change: Slightly more water in the non-custom sea levels (chillcore) 2015-04-11 18:42:48 +00:00
alberth
bc6940dbbb (svn r27227) -Codechange: Initialise map at level 0 instead of -32k (chillcore) 2015-04-11 18:41:41 +00:00
translators
31f8ef4c15 (svn r27226) -Update from WebTranslator v3.0:
latin - 10 changes by Supercheese
2015-04-11 17:45:16 +00:00
planetmaker
fcaff34724 (svn r27225) -Change [FS#6262]: Be more lenient about road stop removal when at least one stop could be removed (afd88) 2015-04-11 11:50:02 +00:00
planetmaker
e54ba05393 (svn r27224) -Cleanup: Duplicate #ifdef for FreeBSD (AMDim3) 2015-04-11 10:47:20 +00:00
planetmaker
acef9bb811 (svn r27223) -Add [FS#6274]: Support for DragonflyBSD (AMDmi3) 2015-04-11 10:25:36 +00:00
planetmaker
da9a1d0c14 (svn r27222) -Fix [FS#6278]: Use the current maximum speed as limited by bridges, orders etc. for all vehicle types alike when considering increased smoke emissions of vehicles. 2015-04-09 18:17:43 +00:00
frosch
bb3366e8b2 (svn r27221) -Fix: Multi-value keys in the desktop entry shall end with a trailing separator. (Mr_Bones) 2015-04-07 21:30:04 +00:00
translators
78d590aab9 (svn r27220) -Update from WebTranslator v3.0:
simplified_chinese - 2 changes by Gavin
2015-04-05 17:45:14 +00:00
translators
55f5a83fbc (svn r27219) -Update from WebTranslator v3.0:
simplified_chinese - 13 changes by xiangyigao
2015-04-04 17:45:16 +00:00
translators
4dbabbd9e2 (svn r27218) -Update from WebTranslator v3.0:
luxembourgish - 361 changes by Phreeze
2015-04-02 17:45:16 +00:00
translators
1b87589008 (svn r27215) -Update from WebTranslator v3.0:
luxembourgish - 312 changes by Phreeze
2015-04-01 17:45:16 +00:00
translators
37cf7f78f2 (svn r27213) -Update from WebTranslator v3.0:
luxembourgish - 215 changes by Phreeze
2015-03-31 17:45:16 +00:00
translators
622a9c6a9a (svn r27212) -Update from WebTranslator v3.0:
czech - 4 changes by Eskymak
luxembourgish - 113 changes by Phreeze
2015-03-30 17:45:29 +00:00
translators
6de0714a3c (svn r27211) -Update from WebTranslator v3.0:
indonesian - 18 changes by fanioz
2015-03-29 17:45:14 +00:00
pelya
6977514ff1 Removed some unused Android-specific strings 2015-03-29 20:23:39 +03:00
pelya
fc4ae3a627 Fixes to tutorial dialog 2015-03-29 20:23:39 +03:00
pelya
1e5fb9290c Video tutorial dialog, only one bus tutorial for now 2015-03-29 20:23:39 +03:00
Sergii Pylypenko
cdde929500 Better support for hardware Ctrl/Shift keys and hardware mouse 2015-03-29 20:23:39 +03:00
Sergii Pylypenko
eb6626d247 Tap anywhere to close popup dropdown menu 2015-03-29 20:23:39 +03:00
Sergii Pylypenko
ab0e3a8bef Removed references to tablet bar, it's not needed anymore 2015-03-29 20:23:39 +03:00
Sergii Pylypenko
dce1a08117 Oops 2015-03-29 20:23:39 +03:00
Sergii Pylypenko
49d814d5d3 Fixed scenario editor GUI messed by vertical toolbar 2015-03-29 20:23:39 +03:00
pelya
d260038aac Fixed road tunnel preview not shown when dragging mouse 2015-03-29 20:23:39 +03:00
pelya
5b874adee8 Do not auto-close main toolbar menus, disabled autoscroll for dropdown lists 2015-03-29 20:23:35 +03:00
pelya
d9f14a5b79 Hide all windows when placing airport 2015-03-29 20:22:19 +03:00
pelya
8f7e444f4f Allow scrolling when selecting destination station or building single-tile objects 2015-03-29 20:22:19 +03:00
pelya
9875c97661 Do not change windows focus on mouse-up action 2015-03-29 20:22:18 +03:00
pelya
0d3412d064 Hide all windows when selecting vehicle destination station 2015-03-29 20:22:18 +03:00
pelya
6f9c0181c1 Align all construction windows to the left, to make more space at the center of the screen 2015-03-29 20:22:18 +03:00
pelya
ac76047f54 Off-by-pixel toolbar placement, arrgh 2015-03-29 20:22:18 +03:00
pelya
bde4cdebc1 Fixed too wide buttons in the railroad semaphore dialog 2015-03-29 20:22:18 +03:00
Sergii Pylypenko
60f12ed588 Select last tool for waterways and terraform toolbars 2015-03-29 20:22:18 +03:00
Sergii Pylypenko
400b6daad0 Auto-select last used tool for railroad 2015-03-29 20:22:18 +03:00
pelya
fdddd873dd Auto-select last used tool when user cancels build action, only for roads now 2015-03-29 20:22:18 +03:00
pelya
5934a69f67 Fixed played time display for cloud saves 2015-03-29 20:22:18 +03:00
pelya
55d31f06fb Continuously scroll map with two fingers 2015-03-29 20:22:18 +03:00
pelya
396aebaa98 Shorter rail station construction window 2015-03-29 20:22:18 +03:00
pelya
e0efbfbd75 Fixed network save setting not saved to config file 2015-03-29 20:19:58 +03:00
pelya
be3f236eaf Cloudsave support 2015-03-29 20:19:53 +03:00
pelya
69a31cde7b WIP save to network - fixed UI 2015-03-29 20:19:04 +03:00
pelya
7fa4e7bbc3 WIP backup savegames to network 2015-03-29 20:19:04 +03:00
pelya
024daa1225 Smallmap legend can be hidden 2015-03-29 20:19:03 +03:00
pelya
4d4f707638 Removed #ifdef ANDROID from where it's not needed 2015-03-29 20:19:03 +03:00
pelya
9a3b8e8969 Fixed town aythority window and new town dialog too tall 2015-03-29 20:19:03 +03:00
Sergii Pylypenko
fa59440329 Updated version in another file, argh
Conflicts:
	src/rev.cpp.in
2015-03-29 20:19:01 +03:00
Sergii Pylypenko
8835c78261 Updated release version
Conflicts:
	.ottdrev
2015-03-29 20:17:40 +03:00
alberth
c8a727d3fc (svn r27210) -Doc[FS#6268]: OpenTTD tiles have more attributes nowadays (Samu). 2015-03-28 16:48:46 +00:00
frosch
bba85a6e01 (svn r27209) -Add: Draw path reservation on the whole bridge, not only on the bridge heads. 2015-03-28 14:04:06 +00:00
frosch
5503af7bfa (svn r27208) -Fix: Draw correct overlay sprites for path reservations on bridges and tunnels. 2015-03-28 14:03:26 +00:00
frosch
1ab66855db (svn r27207) -Codechange: Replace some magic integers with the appropiate symbols. 2015-03-28 14:00:39 +00:00
translators
9074326e86 (svn r27206) -Update from WebTranslator v3.0:
czech - 5 changes by Eskymak
luxembourgish - 9 changes by Phreeze
2015-03-27 17:45:28 +00:00
translators
3966c3e37c (svn r27205) -Update from WebTranslator v3.0:
luxembourgish - 24 changes by Phreeze
2015-03-26 17:45:15 +00:00
translators
ae9f4571b8 (svn r27204) -Update from WebTranslator v3.0:
luxembourgish - 6 changes by Phreeze
ukrainian - 1 changes by Strategy
2015-03-25 17:45:24 +00:00
translators
cfd442e74b (svn r27203) -Update from WebTranslator v3.0:
swedish - 4 changes by daishan
2015-03-23 17:45:14 +00:00
translators
a6647f389b (svn r27202) -Update from WebTranslator v3.0:
catalan - 1 changes by juanjo
korean - 1 changes by telk5093
2015-03-22 17:45:30 +00:00
translators
558f756a15 (svn r27201) -Update from WebTranslator v3.0:
english_US - 4 changes by Supercheese
latin - 4 changes by Supercheese
2015-03-21 17:45:26 +00:00
frosch
c37ee53ecc (svn r27200) -Feature/Fix [FS#6260]: [NewGRF] Add Misc. GRF Feature Flag 6 to enable the second rocky tile set. 2015-03-20 19:27:15 +00:00
translators
a5d412ba79 (svn r27199) -Update from WebTranslator v3.0:
hungarian - 4 changes by Brumi
korean - 1 changes by telk5093
2015-03-20 17:45:22 +00:00
frosch
3df2b8020d (svn r27198) -Revert (r27197): WT3 being rude. 2015-03-19 18:11:00 +00:00
translators
78fb9afd80 (svn r27197) -Update from WebTranslator v3.0:
swedish - 3 changes by Joel_A
2015-03-19 17:45:05 +00:00
frosch
8a7d5b0c9b (svn r27193) -Fix (r27192): Incomplete copy/paste. 2015-03-17 20:45:57 +00:00
frosch
2edbc72ebd (svn r27192) -Change: heading for 1.6 now 2015-03-17 20:33:44 +00:00
Sergii Pylypenko
2603e6b5e3 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/os/unix/unix.cpp
	src/widgets/dropdown.cpp
2014-08-19 19:21:47 +03:00
pelya
9916f1e361 Added back todo.txt 2014-08-19 19:12:01 +03:00
pelya
17f0f3d650 Slower scrolling for dropdown lists and scrollbars 2014-08-19 19:12:01 +03:00
pelya
6c9fffd545 Frameskip when pressing fast forward button 2014-08-19 19:12:01 +03:00
pelya
21e577c7d4 'Visit website' button from online content menu was not working 2014-08-19 19:12:01 +03:00
pelya
c938b99716 Fixed company face selection dialog too tall 2014-08-19 19:12:01 +03:00
pelya
b4cfc84fc7 Fixed 'Replace vehicles' window too tall 2014-08-19 19:12:01 +03:00
pelya
5236d0f75f Fixed build area not highlighted on mouse-over or stylus hover 2014-08-19 19:12:01 +03:00
pelya
b6991a3044 Fixed more mousic clipping 2014-08-19 19:12:01 +03:00
pelya
c0d262b572 Re-arranged buttons a bit 2014-08-19 19:12:01 +03:00
pelya
f377302cbf Switch to full vertical toolbar, if enough screen height 2014-08-19 19:12:01 +03:00
pelya
3fe4a7846e Added shorter command 'cheats' to open cheats window 2014-08-19 19:12:01 +03:00
pelya
e0166f471a Increased height of 'Buy vehicle' window, so more info would fit the screen 2014-08-19 19:12:01 +03:00
Sergii Pylypenko
8ea1dec8f4 Merge branch 'master' of github.com:pelya/openttd-android 2014-07-01 22:02:20 +03:00
Sergii Pylypenko
2b7b42f09e Fixed 32bpp base graphics set not working on 16bpp videomode 2014-07-01 22:02:08 +03:00
pelya
d3e9368f34 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/autoreplace_gui.cpp
2014-06-15 22:32:06 +03:00
Sergii Pylypenko
91ebce1a9c Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/console_gui.cpp
	src/genworld_gui.cpp
	src/group_gui.cpp
	src/misc_gui.cpp
	src/settings_gui.cpp
	src/widgets/settings_widget.h
2014-06-04 17:09:23 +03:00
Sergii Pylypenko
19472fd0d2 Fixed screenshot action, broken by 16bpp blitter 2014-06-03 23:35:05 +03:00
Sergii Pylypenko
8ca0bf745a Fixed bug in my previous commit 2014-06-03 22:36:38 +03:00
Sergii Pylypenko
3cb6c7d5ee Fixed right toolbar moving to the left, removed remainder of 'touchscreen mode' stuff 2014-06-03 21:55:41 +03:00
Sergii Pylypenko
75c376a23e Removed debug 2014-06-03 21:48:28 +03:00
Sergii Pylypenko
c323eb1c8a Fixed dropdown lists in main toolbar 2014-06-03 21:42:33 +03:00
Sergii Pylypenko
15db61be69 Fixed mouse click passed down to map after closing a window. 2014-06-03 20:32:39 +03:00
Sergii Pylypenko
41da4be66b Removed remainder of the 'touchscreen mode' code 2014-06-03 20:27:45 +03:00
Sergii Pylypenko
e465c8db4d Added vertical toolbar option to game settings 2014-06-03 20:27:10 +03:00
Sergii Pylypenko
742f20fcc3 Revert "Erase queued command also when depot direction/airport type/station type changes."
This reverts commit 60a7ac9f3c.
2014-06-03 18:44:34 +03:00
Sergii Pylypenko
b2bfcf6816 Revert "Erase queued commands when another command is about to be queued."
This reverts commit 604205045f.
2014-06-03 18:44:16 +03:00
Sergii Pylypenko
a0581f42bd Revert "Select the actions that will need confirmation."
This reverts commit 02caad7c1b.
2014-06-03 18:14:15 +03:00
Sergii Pylypenko
7e6e95c34c Some fixes to window placement 2014-06-02 23:25:47 +03:00
pelya
9bdda2756b Fixes to split toolbar 2014-06-02 01:58:58 +03:00
pelya
9923ecfed0 Vertical toolbar is drawn okay, but does not work 2014-06-02 00:15:15 +03:00
pelya
9f780643ed WIP do not compile - split toolbar into two vertical toolbars 2014-06-01 13:45:45 +03:00
pelya
7dd42939ae Align opened windows with toolbar 2014-06-01 01:32:30 +03:00
pelya
f469e7f57b Show info about facility/station/vehicle on mouse up instead of mouse down, to allow better map dragging. 2014-06-01 01:23:34 +03:00
pelya
d2feaa9316 Two-finger scrolling will cancel whatever action that was currently selected 2014-06-01 00:29:56 +03:00
pelya
7fb35a10ab Fixed right mouse click scrolling 2014-05-31 23:57:32 +03:00
pelya
ac10a8c8cf Added broken 16bpp animated blitter 2014-05-31 23:30:20 +03:00
Sergii Pylypenko
318ff9d373 Fixed airport construction dialog too tall 2014-05-28 22:52:11 +03:00
Sergii Pylypenko
1362aaab60 Fixed 'build waypoint' button building a train station. 2014-05-28 22:41:25 +03:00
Sergii Pylypenko
657e563f7c Fixed no sound when playing music, fixed music volume reverted on new track 2014-05-28 15:41:53 +03:00
Sergii Pylypenko
1d82f57945 Fixed multiplayer join menu 2014-05-27 23:10:56 +03:00
Sergii Pylypenko
617d04eccd Toggle Android text input when invoking console 2014-05-27 22:43:31 +03:00
Sergii Pylypenko
7748f7cbf1 Auto-switch to full toolbar if enough space 2014-05-27 22:15:25 +03:00
Sergii Pylypenko
ba809d1b21 Removed todo, it's not needed anymore 2014-05-27 21:07:36 +03:00
Sergii Pylypenko
e4e3db8a85 Simple but fast 16bpp renderer 2014-05-27 20:42:23 +03:00
Sergii Pylypenko
fed40b76ff Change butto nsize and font size in game options 2014-04-07 22:36:22 +03:00
pelya
19d76ddbbd Adopted "move when clicking near edge" setting for touchscreen 2014-04-06 23:23:10 +03:00
pelya
589aad0990 More fixes to version string to match official release.
Why did they made it so complicated?
2014-04-06 22:58:59 +03:00
pelya
1daf79985a Resized in-game NewGRF dialog, with lots of hacks 2014-04-06 22:40:18 +03:00
pelya
15b9ab4c08 Override version number, so Andorid OpenTTD can connect to official servers 2014-04-06 18:17:19 +03:00
pelya
23188e45c7 Merge branch 'master' of github.com:pelya/openttd-android 2014-04-06 18:15:56 +03:00
Sergii Pylypenko
f30d497cc1 Modified 'release' bit in sources, and added a patch for future references 2014-04-02 22:57:38 +03:00
Sergii Pylypenko
7c024612f6 Merge remote-tracking branch 'upstream/master' 2014-04-02 22:54:47 +03:00
pelya
55a09da6b2 Merge remote-tracking branch 'upstream/master' 2014-03-23 19:04:54 +02:00
pelya
61e8275ebf Fixed vehicle and music dialog size 2014-03-23 18:47:49 +02:00
pelya
313e3b73b3 Auto-resize all buttons and fonts, when screen resoluition changes 2014-03-23 17:19:30 +02:00
pelya
982c84b3ee Removed unused variable 2014-03-23 15:39:18 +02:00
pelya
386261656d Fixed scrollbar slider when the scrollbar is too small 2014-03-23 15:37:10 +02:00
pelya
253ccf43e8 Fixed broken Ctrl and Shift toolbar buttons 2014-03-23 14:33:43 +02:00
pelya
f4612e4031 Oops x2 - I've copied stuff to the wrong directory 2014-03-22 23:51:45 +02:00
pelya
4773b09d13 Oops, fixerd compilation 2014-03-22 23:33:05 +02:00
pelya
c7ed03ded9 Lowmem version of OpenTTD - copy savegames from regular OpenTTD on start 2014-03-22 23:28:07 +02:00
pelya
5b75bcffbf Updated TODO 2014-03-22 03:10:48 +02:00
pelya
ea4e46dda4 Fixed NewGRF GUI 2014-03-22 02:55:47 +02:00
pelya
9f48f8fab6 Fixed file selector GUI once again 2014-03-22 02:32:54 +02:00
pelya
c6f20c52b8 Fixed multiplayer join dialog 2014-03-22 02:24:04 +02:00
pelya
6bdb30fea5 Fix to file selector GUI 2014-03-22 01:44:41 +02:00
pelya
80bb1cb149 Fixed AI dialog 2014-03-22 01:38:28 +02:00
pelya
d9e237211a Fixed 'Check online content' dialog 2014-03-22 01:14:35 +02:00
pelya
7bbd2dfeee Fixed scrollbar slider getting too small, cenetered sort marks and horizontal scrollbar arrows 2014-03-22 00:51:07 +02:00
Sergii Pylypenko
6a81df3ecb Updated todo 2014-03-20 23:42:14 +02:00
Sergii Pylypenko
c0462a53e0 Updated todo 2014-03-20 20:24:35 +02:00
Sergii Pylypenko
dac6ac71da Fixed Ctrl/Shift buttons not lowering when clicked 2014-03-20 20:07:41 +02:00
Sergii Pylypenko
8602c3f8f8 Fixed crash in my prev commit 2014-03-20 18:15:06 +02:00
Sergii Pylypenko
571b244680 Updated todo 2014-03-20 17:18:47 +02:00
Sergii Pylypenko
390776ea07 Centered strings in file lists 2014-03-19 23:52:22 +02:00
Sergii Pylypenko
53c5f2bae3 Revert "Centered strings in file lists and in dropdowns"
This reverts commit 383826139c.
2014-03-19 23:50:56 +02:00
Sergii Pylypenko
250733eb8e Merge branch 'master' of github.com:pelya/openttd-android 2014-03-19 23:49:41 +02:00
Sergii Pylypenko
25630ab4c7 Moved touchscrren buttons to main toolbar, now it crashes 2014-03-19 23:49:08 +02:00
Sergii Pylypenko
88c1d5f29c Added todo 2014-03-19 23:01:45 +02:00
Sergii Pylypenko
7d41950f73 Centered strings in in-game options pull-down menu 2014-03-19 23:01:16 +02:00
Sergii Pylypenko
31904e34d6 Centered strings in file lists 2014-03-19 22:40:59 +02:00
Sergii Pylypenko
383826139c Centered strings in file lists and in dropdowns 2014-03-19 22:32:19 +02:00
Sergii Pylypenko
9a173be436 Fixed "New Game" dialog 2014-03-19 22:31:51 +02:00
Sergii Pylypenko
121a8ad773 Merge remote-tracking branch 'upstream/master' 2014-03-19 22:01:51 +02:00
Sergii Pylypenko
d8832c2ad6 Fixed Android text input 2014-03-19 21:59:02 +02:00
Sergii Pylypenko
00be451e28 Fixed close box and scrollbar images not centered 2014-03-19 21:58:42 +02:00
Sergii Pylypenko
661b461567 Fixed save/load dialog too tall 2014-03-19 21:44:52 +02:00
pelya
7eed04c774 Fixed big oolbar mode, fixed my sloppy coding 2014-03-16 23:03:08 +02:00
pelya
13b855f128 Disabled Android text input button 2014-03-16 22:38:10 +02:00
pelya
1c2c15795c Separate option for toolbar buttons size, force to split toolbar on Android 2014-03-16 22:37:01 +02:00
pelya
06e4a922d6 Renamed buttons on tablet toolbar, and removed "Move" button - it is not needed with left_mouse_btn_scrolling 2014-03-16 21:29:46 +02:00
pelya
b17015932c Stacked game options dialog in two columns 2014-03-16 00:15:36 +02:00
pelya
b2bc556137 Revert "Settings in three columns for tablets."
This reverts commit 94abe055a2.
2014-03-15 23:53:18 +02:00
pelya
e9621fbcc7 Fixed compilation 2014-03-15 23:52:37 +02:00
Juanjo
141bb0861e Before opening linked to main toolbar windows, delete linked windows. 2014-03-15 22:56:17 +02:00
Juanjo
0de2e2a664 Add a function for deleting windows linked to main toolbar. 2014-03-15 22:53:35 +02:00
Juanjo
edb6c09c64 When in touchscreen modes, windows aligned with main toolbar are aligned to the left/right edge of the screen. 2014-03-15 22:53:35 +02:00
Juanjo
7079e675bf Align construction windows with main toolbar. 2014-03-15 22:53:35 +02:00
Juanjo
604205045f Erase queued commands when another command is about to be queued. 2014-03-15 22:53:35 +02:00
Juanjo
60a7ac9f3c Erase queued command also when depot direction/airport type/station type changes. 2014-03-15 22:53:35 +02:00
Juanjo
fc248814fe Reset queued command when changing CTRL state. 2014-03-15 22:53:35 +02:00
Juanjo
b164486616 Reset queued command when closing windows that can queue them. 2014-03-15 22:53:35 +02:00
Juanjo
02caad7c1b Select the actions that will need confirmation. 2014-03-15 22:53:35 +02:00
Juanjo
90c00f5b58 Adaptation of viewport for confirm mode. 2014-03-15 22:53:35 +02:00
Juanjo
77a101280b Set dirty selection tiles when bridge is too long to build. 2014-03-15 22:52:35 +02:00
Juanjo
f70dbfdc32 Set selection tiles dirty when erasing a queued command. 2014-03-15 22:52:35 +02:00
Juanjo
4f60841795 Base functions for a confirm action mode. 2014-03-15 22:52:14 +02:00
Juanjo
fee23f7be0 Add a console command to open cheat window. 2014-03-15 22:52:13 +02:00
Juanjo
2beebef91b When clicking the console and when in touchscreen modes, open a query string window. 2014-03-15 22:52:13 +02:00
Juanjo
94abe055a2 Settings in three columns for tablets. 2014-03-15 22:52:13 +02:00
Juanjo
dc853a0a3f amend vehicle gui 2014-03-15 22:52:13 +02:00
Juanjo
a4c6102822 Add settings for touchscreen controls. 2014-03-15 22:51:42 +02:00
Juanjo
96d3b0695c Amend gui's to work with touchscreen controls. 2014-03-15 22:23:22 +02:00
Juanjo
d5669bb677 Set construction child windows to screen borders. 2014-03-15 22:23:22 +02:00
Juanjo
90914e262a Changes on viewport related files to deal with touchscreen options. 2014-03-15 22:23:22 +02:00
Juanjo
06a276e5ad Add a window for touchscreen devices. 2014-03-15 22:23:22 +02:00
Juanjo
cf89f0ff5e Toolbar types. 2014-03-15 21:59:34 +02:00
Juanjo
fbd9b7c906 Add functions for cycling inside an enum. 2014-03-15 21:56:55 +02:00
Juanjo
381c4e98aa Place station when releasing the mouse. 2014-03-15 21:56:55 +02:00
Juanjo
c872509d7b Do actions when releasing the mouse, instead of when clicking:
Build town, industry, airport, dock, lock,
buoy, aqueduct, depots, change bridge rail/road specs.
2014-03-15 21:56:55 +02:00
Juanjo
6c368cbde5 Add new viewport methods. 2014-03-15 21:56:55 +02:00
Juanjo
0fffd1dd3c Allow calling init presizing mode from outside viewport.cpp. 2014-03-15 21:56:55 +02:00
Juanjo
b69c4bb7a9 Add scrollbars to tracklist window and set min sizing. 2014-03-15 21:56:55 +02:00
Juanjo
f43337d022 Some amends about sizings. 2014-03-15 21:56:55 +02:00
pelya
98c2f0647e Removing leftovers of my sloppy merging 2014-03-15 21:39:03 +02:00
Juanjo
e69bbbf0da Sizing and centering on create scenario window. 2014-03-15 21:37:18 +02:00
Juanjo
0ae63b4c28 Sizing and centering editbox icon. 2014-03-15 21:37:18 +02:00
Juanjo
fd9b7efa97 Amend some widgets properties for high resolution screens. 2014-03-15 21:37:18 +02:00
Juanjo
d95a9c6160 Add a setting for automatically set min sizing values. 2014-03-15 21:37:17 +02:00
Juanjo
923bb00c09 Add a min sizing for viewports. 2014-03-15 21:37:17 +02:00
Juanjo
97e285fee5 Add a min sizing for width of command errors, news and query windows. 2014-03-15 21:37:17 +02:00
Juanjo
d0c26fac56 Add a specific min sizing for onscreen keyboard. 2014-03-15 21:36:24 +02:00
Juanjo
723d9b6256 Center cargo icons on station GUI. 2014-03-15 21:36:24 +02:00
Juanjo
4be55758ae Center vehicle status icon. 2014-03-15 21:36:24 +02:00
Juanjo
a8a48d097b Center sprites on bridge picker window. 2014-03-15 21:36:24 +02:00
Juanjo
7b1560dcb6 Center sprites on station picker for road stations and rail stations. 2014-03-15 21:36:24 +02:00
Juanjo
7b2156d15e Sizing and centering of vehicle image on refit window. 2014-03-15 21:36:24 +02:00
Juanjo
94c01f0c66 Sizing and centering of owner face window. 2014-03-15 21:36:24 +02:00
Juanjo
3f81edb664 More sizing and centering. 2014-03-15 21:36:24 +02:00
Juanjo
4c8c1ce146 Add min sizings to some construction buttons. 2014-03-15 21:35:41 +02:00
Juanjo
f63ed5b6e7 Add min sizing on smallmap window. 2014-03-15 21:35:41 +02:00
Juanjo
0442649289 Add min sizing. 2014-03-15 21:35:16 +02:00
Juanjo
034e8677ad Center company icon on league table. 2014-03-15 21:34:37 +02:00
Juanjo
020e62fbd6 Center images on buttons. 2014-03-15 21:34:37 +02:00
Juanjo
1fe633b7b7 Draw vehicles vertically aligned on vehicle list, vehicle info panel, etc. 2014-03-15 21:34:36 +02:00
Juanjo
a315c978f6 Center group gui strings (and other minor changes). 2014-03-15 21:34:36 +02:00
Juanjo
cab76bd7af Draw strings vertically aligned on some windows. 2014-03-15 21:34:36 +02:00
Juanjo
cc62096ac4 Functions for drawing vertically aligned strings. 2014-03-15 21:33:24 +02:00
Juanjo
829c5f8dd2 Use resize.step_height, so the height of each element doesn't need to be FONT_HEIGHT_NORMAL. 2014-03-15 21:33:24 +02:00
Juanjo
b5ea121dbc Change the SetFill/Resize status of order/group by widgets on station GUI. 2014-03-15 21:33:24 +02:00
Juanjo
dfa346f89f Make icons for selling, selling all, autoreplacing,... the same height. 2014-03-15 21:33:24 +02:00
Juanjo
c715c1073a Get better sizes for widgets of statusbar. 2014-03-15 21:33:24 +02:00
Juanjo
1dbcfe02f5 Reorder DrawWidget on StatusBarWindow. 2014-03-15 21:33:24 +02:00
Juanjo
ea0961682d Center yes/no buttons on query string. 2014-03-15 21:33:24 +02:00
Juanjo
4f2f3c52c6 Adapt the boxes showing waiting cargo on the Station List:
- rtl suport.
- size of the boxes adapted to the height of the normal font.
- draw a shadowed box if there is no cargo waiting but cargo has been accepted in that station.
- also always draw the box for a cargo if cargo has been produced but there are no waiting units.
2014-03-15 21:33:24 +02:00
Juanjo
b792189e59 Some small helpers to draw strings and sprites dealing with left-to-right/right-to-left. 2014-03-15 21:33:24 +02:00
Juanjo
9fa95981fc Display of group names is longer when autoreplace/protection sprites are hidden. 2014-03-15 21:33:24 +02:00
Juanjo
7e91026ec8 The space between the group name and the sprite is set to 2 instead of 8. Less unused space. 2014-03-15 21:33:24 +02:00
Juanjo
6a426ed2df Modify the length of the Group GUI.
Set it to the length of the 'a' character * maximum length of a group name.
2014-03-15 21:33:24 +02:00
Juanjo
2959bcdbe7 Allow dropdown to be drawn above the origin widget, even in the case the dropdown needs a scrollbar. 2014-03-15 21:33:04 +02:00
Juanjo
02d035fbef Position of landscaping toolbar. 2014-03-15 21:32:43 +02:00
pelya
d7b18a8e2d Detect version from git submodule 2014-03-15 19:53:53 +02:00
pelya
6dc8be0332 Android patches 2014-03-15 19:44:27 +02:00
332 changed files with 23973 additions and 6971 deletions

1
.ottdrev Normal file
View File

@@ -0,0 +1 @@
1.6.0 27532 0 1.6.0

View File

@@ -172,6 +172,7 @@ install: bundle
$(Q)install -d "$(INSTALL_BINARY_DIR)"
$(Q)install -d "$(INSTALL_ICON_DIR)"
$(Q)install -d "$(INSTALL_DATA_DIR)/ai"
$(Q)install -d "$(INSTALL_DATA_DIR)/game"
$(Q)install -d "$(INSTALL_DATA_DIR)/baseset"
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
$(Q)install -d "$(INSTALL_DATA_DIR)/scripts"
@@ -182,6 +183,7 @@ else
endif
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
$(Q)install -m 644 "$(BUNDLE_DIR)/ai/"* "$(INSTALL_DATA_DIR)/ai"
$(Q)install -m 644 "$(BUNDLE_DIR)/game/"* "$(INSTALL_DATA_DIR)/game"
$(Q)install -m 644 "$(BUNDLE_DIR)/baseset/"* "$(INSTALL_DATA_DIR)/baseset"
$(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts"
ifndef DO_NOT_INSTALL_DOCS

View File

@@ -5,16 +5,13 @@
# 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/>.
#
# Building requires GRFCodec and NFORenum. Older versions of GRFCodec are
# known to miscompile the graphics.
# Building requires GRFCodec.
#
# Recent nightlies (including sources) of both can be found at:
# Recent versions (including sources) can be found at:
# http://www.openttd.org/download-grfcodec
# http://www.openttd.org/download-nforenum
#
# The mercurial repository of both can be found at:
# The mercurial repository can be found at:
# http://hg.openttdcoop.org/grfcodec
# http://hg.openttdcoop.org/nforenum
#

16
android-extract-strings.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
mkdir -p ../translations/lang
git diff 1.6/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" | \
cat > ../translations/lang/english.txt
for f in src/lang/*.txt; do
[ "$f" = src/lang/english.txt ] && continue
rm -f ../translations/lang/`basename $f`
cat ../translations/lang/english.txt | grep '^STR' | while read name text; do
grep "^$name\b" $f >> ../translations/lang/`basename $f`
done
done

13
android-store-strings.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
for f in ../translations/lang/*.txt; do
[ "$f" = ../translations/lang/english.txt ] && continue
out=src/lang/`basename $f`
grep "^# Android strings" $out > /dev/null || [ -z "`tail -c 2 $out`" ] || echo >> $out
{ grep -v "^# Android strings" $out ; echo "# Android strings" ; } > $out.new
mv -f $out.new $out
cat $f | grep '^STR' | while read name text; do
{ grep -v "^$name\b" $out ; printf "%-64s%s\n" "$name" "$text" ; } > $out.new
mv -f $out.new $out
done
done

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.5 API compatibility in effect.");

8
bin/ai/compat_1.6.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.5"; }
function GetAPIVersion() { return "1.6"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}

View File

@@ -12,7 +12,7 @@ description.af_ZA = 'n Musiek stel sonder enige musiek.
description.ar_EG = مجموعة موسيقى بدون موسيقى
description.be_BY = "Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі.
description.bg_BG = Празен музикален пакет.
description.ca_ES = Un joc de música sense cap música.
description.ca_ES = Una llista de música sense cap peça.
description.cs_CZ = Prázná hudební sada.
description.cy_GB = Pecyn cerddoriaeth heb unrhyw gerddoriaeth ynddo.
description.da_DK = En musikpakke uden musik.
@@ -27,7 +27,7 @@ description.fr_FR = Un pack de musiques sans musiques.
description.ga_IE = Pacáiste ceoil gan aon cheol iarbhír ann.
description.gd_GB = Pacaid ciùil anns nach eil fonn sam bith.
description.gl_ES = Un conxunto de músicas sen ningunha música.
description.hr_HR = Muzički paket bez ikakve muzike.
description.hr_HR = Glazbeni paket bez ikakve glazbe.
description.hu_HU = Zenei alapcsomag zene nélkül.
description.id_ID = Paket musik tanpa musik sungguhan.
description.is_IS = Tónlistarpakki sem er í raun án tónlistar.

View File

@@ -12,7 +12,7 @@ description.af_ZA = 'n Klank stel sonder enige klanke.
description.ar_EG = مجموعة صوت بدوت اصوات مضافة
description.be_BY = "Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў.
description.bg_BG = Празен звуков пакет.
description.ca_ES = Un joc de sons sense cap so.
description.ca_ES = Una llista de sons buida.
description.cs_CZ = Prázdná sada zvuků.
description.cy_GB = Pecyn sain heb unrhyw effeithiau sain ynddo.
description.da_DK = En lydpakke uden lyde.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe grafieke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS.
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS.
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel DOS.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro DOS).
description.cy_GB = Graffeg gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS-version.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe klanke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS.
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a DOS.
description.ca_ES = Sons originals del Transport Tycoon Deluxe pel DOS.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro DOS).
description.cy_GB = Effeithiau sain gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe DOS-version.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS (German) uitgawe g
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) .
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS (Alemany).
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe (alemany) pel DOS.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (německá verze pro DOS).
description.cy_GB = Graffeg gwreiddiol fersiwn DOS (Almaenig) o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS (Tysk) version.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe grafie
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows.
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a Windows.
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Graffeg gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe Windows-version.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe musiek
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز
description.be_BY = Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows.
description.ca_ES = Música Original de Transport Tycoon Deluxe per a Windows.
description.ca_ES = Música original del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní hudba Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Cerddoriaeth gwreiddiol fersion Windows o Transport Tycoon Deluxe.
description.da_DK = Originalmusik fra Transport Tycoon Deluxe Windows-version.
@@ -27,7 +27,7 @@ description.fr_FR = Musiques originales de Transport Tycoon Deluxe (version Wind
description.ga_IE = Ceol bunaidh Transport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Ceòl aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Música da edición orixinal de Transport Tycoon Deluxe para Windows.
description.hr_HR = Originalna muzika za Transport Tycoon Deluxe Windows izdanje.
description.hr_HR = Originalna glazba za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának zenéje.
description.id_ID = Musik pengiring orisinil Transport Tycoon Deluxe versi Windows.
description.is_IS = Upprunalega tónlistin úr Transport Tycoon Deluxe Windows útgáfunni.
@@ -35,7 +35,7 @@ description.it_IT = Musica originale di Transport Tycoon Deluxe, edizione Window
description.ja_JP = Transport Tycoon Deluxe オリジナル版 音楽 (Windows)
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 음악입니다.
description.la_VA = Musica ex editione originale Transport Tycoon Deluxe Windows.
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Music.
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.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe klanke
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows.
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a Windows.
description.ca_ES = Sons originals del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Effeithiau sain gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe Windows-version.

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.5 API compatibility in effect.");

8
bin/game/compat_1.6.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,30 +1,151 @@
1.6.0 (2016-04-01)
------------------------------------------------------------------------
(None)
1.6.0-RC1 (2016-03-01)
------------------------------------------------------------------------
- Feature: [NewGRF] Allow custom sound IDs in RV property 0x12, ship property 0x10 and aircraft property 0x12 (r27507)
- Feature: When viewing online content of a particular type, hide content of other types unless they have been (auto)selected for download (r27469, r27468, r27444)
- Feature: [NewGRF] Move sprite 8 positions in sprite aligner with ctrl+click [FS#6241] (r27451)
- Feature: Lower the sell-vehicle and sell-chain buttons in the train depot GUI while dragging a vehicle over it [FS#6391] (r27450, r27446)
- Feature: Make the object placement GUI an independent window (r27438, r27397, r27346)
- Feature: [Build] Project files and compilation with MSVC2015 (r27385, r27382, r27381, r27380, r27379)
- Feature: [NewGRF] Allow railtype NewGRF to define separate sprites for the fences on either track side [FS#6315] (r27354, r27343)
- Feature: [NewGRF] Increase the maximum amount of industry types to 128 per NewGRF and 240 in total (r27279)
- Feature: Make Ctrl+Remove-Roadstop also remove the road, just like for rail stations [FS#6252] (r27251)
- Change: [NewGRF] Allow static NewGRF to enable the second rocky tile set (r27497)
- Change: Round loading percentage in loading indicators and conditional orders towards 50%, so that 0% and 100% mean completely empty or full (r27426)
- Change: [Build] Rework the configure system to make more use of pkg-config (r27377:r27366, r27361, r27360)
- Change: Enable YAPF cache debugging with desync debug level 2 (r27332)
- Change: [strgen] Default plural subparameter position for CARGO_xxx string control codes is subparameter 1 (r27295)
- Change: [NewGRF] Translate industry variable A6 (r27267)
- Change: Do not consider cargo that is already being loaded as waiting cargo wrt. the station rating [FS#6165] (r27256)
- Change: Tune down terrain generation to reduce amount of long slopes (r27230)
- Change: Generate more detailed curves at the coast (r27229)
- Change: Slightly more water in the non-custom sea levels (r27228)
- Change: Be more lenient about road stop removal when at least one stop could be removed [FS#6262] (r27225)
- Fix: [Win32] Stdin/out/err need to be re-assigned differently if the runtime lib of MSVC2015 is used (r27481)
- Fix: [Haiku] On Haiku use the appropriate system variable to obtain the include dir [FS#6401] (r27472)
1.5.3 (2015-12-01)
------------------------------------------------------------------------
(None)
1.5.3-RC1 (2015-11-01)
------------------------------------------------------------------------
- Fix: When selecting a refit cargo for orders, do not check whether the vehicle is in a depot or station, and do not ask whether the vehicle currently allows station-refitting. Also hide the refit cost for orders, it is not predictable (r27428)
- Fix: Use the NewGRF railtype sorting order in the infrastructure window (r27427)
- Fix: Crash when switching to or taking over companies, when an order window of a vehicle of the new company was opened. Now close those windows [FS#5842] (r27425)
- Fix: Towns did not connect roads to existing roads, unless they had only a single roadbit. Otoh, towns also tried to connect to single roadbit tiles such as tunnels and depots, even though they were not connectable in the direction of interest [FS#6374] (r27424)
- Fix: When towns expanded single-bit roadtiles using a grid-layout, they used the layout position of the neighbouring tile (r27423)
- Fix: Aircraft picked the wrong airport entry point, if airports were rotated by 180 degree [FS#6341] (r27422)
- Fix: Consider text and icon sizes when drawing the client list [FS#6265] (r27421)
- Fix: GrowTownAtRoad sometimes returned false, even when a house was built [FS#6362] (r27420)
- Fix: CmdSellRailWagon did not revert all actions properly when no orderlist could be allocated [FS#6369] (r27419)
- Fix: Desync due to incorrect storage of segments with different railtype in the YAPF cache [FS#6329] [FS#6379] (r27418)
- Fix: When a dedicated server was paused with no clients, the master server advertisement interval was slowed, causing deadvertisement of the server [FS#6368] (r27400)
- Fix: [Makefile] Game script directory and compat*.nut were never installed on *nix (r27399)
- Fix: There are two different availability conditions for fdatasync in the manpage. Use them both, since at least on some MinGW versions one is not enough (r27389)
- Fix: win32 sound driver failed to report errors (r27383)
- Fix: Clickareas in settings tree were misaligned when the filter warning was displayed, if the setting height was defined by the icons instead of the font [FS#6358] (r27366)
- Fix: Center settings filter warning also vertically, and also in case of multiple lines (r27365)
1.5.2 (2015-09-01)
------------------------------------------------------------------------
(None)
1.5.2-RC1 (2015-08-01)
------------------------------------------------------------------------
- Change: Auto-complete partial roads when building level-crossings [FS#6283] (r27309)
- Fix: Do not rerandomise the town name when only cost-estimating the founding [FS#6332] (r27341)
- Fix: Make variety distribution not assume that sea level is at height 0.2 / 3 * TGPGetMaxHeight() [FS#6335] (r27331, r27330, r27329, r27328)
- Fix: Remove corner-case optimisation for line drawing, which failed for dashed lines (r27324)
- Fix: Clipping of inclined lines did not account for the 'horizontal width' being bigger than the 'real width' (r27323, r27322)
- Fix: Incorrect owner assignment when adding/removing road/tram to/from bridges [FS#6317] (r27313, r27312)
- Fix: Mark infrastructure window dirty in more cases (r27311)
- Fix: Prevent breaking of tram-reversal points by adding more road pieces [FS#6283] (r27308)
- Fix: Error message window with manager face failed with GUI zoom [FS#6259] (r27307)
- Fix: Account for road-bridges and drive-through-stops in CanFollowRoad [FS#6320] (r27306, r27305)
- Fix: Password window layout with GUI zoom [FS#6321] (r27304, r27303)
- Fix: Speed-only timetables got assigned times in stations [FS#6313] (r27302, r27301)
- Fix: Enforce the company's default service intervals when purchasing another company [FS#6254] (r27282, r27281)
- Fix: Cloning/autoreplace/autorenew did not copy custom service intervals (r27280)
1.5.1 (2015-06-01)
------------------------------------------------------------------------
(None)
1.5.1-RC1 (2015-05-08)
------------------------------------------------------------------------
- Fix: Do not consider road junctions with trivial dead ends as branch points during town growth [FS#6245] (r27260, r27259, r27244)
- Fix: ScriptList::RemoveList failed to remove a list from itself [FS#6287] (r27258)
- Fix: Combined button+dropdown widgets in order and autoreplace GUI had incorrect hitbox when using GUI zoom [FS#6270] (r27255)
- Fix: When building a lock on DC_AUTO-removable water-based objects, the water class was always set to canal [FS#6264] (r27254)
- Fix: When crossing tram tracks with railroads, cost of extra roads was not being counted [FS#6282] (r27253)
- Fix: Invalid infrastructure counting when crossing tram tracks with railroads [FS#6281] (r27252)
- Fix: Broken error message in configure [FS#6286] (r27250)
- Fix: In some cases town growth failure was considered as success [FS#6240] (r27249, r27247)
- Fix: Town labels on smallmap and zoomed-out viewports were not centered [FS#6257] (r27248)
- Fix: Removing a rail waypoint used the remove-rail-station cost [FS#6251] (r27245)
- Fix: Duplicate frees due to pool item classes not having copy constructors [FS#6285] (r27243)
- Fix: Crash when no AIs were installed due to improper handling of non-ASCII characters by the string pointer lexer [FS#6272] (r27233)
- Fix: Compilation on DragonflyBSD [FS#6274] (r27224, r27223)
- Fix: Use the current maximum speed as limited by bridges, orders etc. for all vehicle types alike when considering increased smoke emissions of vehicles [FS#6278] (r27222)
- Fix: Multi-value keys in the desktop entry shall end with a trailing separator (r27221)
- Fix: Draw path reservation on the whole bridge, not only on the bridge heads (r27209)
- Fix: Draw correct overlay sprites for path reservations on bridges and tunnels (r27208)
1.5.0 (2015-04-01)
------------------------------------------------------------------------
- Fix: [NewGRF] Add Misc. GRF Feature Flag 6 to enable the second rocky tile set [FS#6260] (r27200)
1.5.0-RC1 (2015-03-18)
------------------------------------------------------------------------
- Feature: [NewGRF] Display relative offset changes in the sprite aligner [FS#6236] (r27174)
- Fix: Original road vehicle acceleration crashed for vehicles taking over [FS#6255] (r27190)
- Fix: GCC 5 compilation (r27185, r27183)
- Fix: Data race due to lazy initialisation of objects [FS#5969] (r27178)
- Fix: Compilation with MinGW64 (r27176)
- Fix: Use the regular clipping functions in the sprite aligner instead of some magic [FS#6237] (r27173)
- Fix: Windows randomly drops SetCursorPos calls, breaking the RMB-scrolling [FS#6238] (r27172)
1.5.0-beta2 (2015-02-24)
------------------------------------------------------------------------
- Feature: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news. (r27164)
- Feature: Allow changing max heightlevel in scenario editor. (r27151)
- Feature: Make use of both rocky tile sets from the base graphics. (r27117)
- Change: Scale (non-custom) default window sizes according to GUI zoom. (r27147)
- Change: Make statusbar and chat-entry window use the same width as the toolbar. (r27146)
- Change: The chatbox-width setting now uses percent of screen width instead of pixels. (r27144)
- Change: [NewGRF] Interpret negative positions in industry layouts depending on GRF version. (r27138)
- Fix: [SDL, Windows] Right-mouse-button scrolling scrolled/jumped too far, when OpenTTD lagged during mouse event processing. (r27167)
- Fix: Toolbars were not invalidated when changing max-vehicles settings. [FS#6204] (r27163)
- Fix: Tile selection was drawn outside of map in some cases. [FS#6208] (r27162)
- Fix: Reimplement the viewport drawing algorithm. [FS#6156] [FS#6206] (r27161)
- Fix: Issues with smallmap and viewport coordinates and transformations. (r27160, r27159, r27158)
- Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. (r27157)
- Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty. (r27148)
- Fix: Oilrig empty-tile checks were incorrect due to wrong TileIndexDiff->TileIndexDiffC conversion. (r27137)
- Fix: Misalignment in generate world window in case of small fonts. (r27135)
- Fix: Dragging of free wagons in depot failed with GUI zoom. (r27133)
- Fix: Reduce memory footprint of map array by shuffling its members. [FS#6218] (r27132, r27126)
- Fix: Dropdown- and tooltip-windows should not steal the focus. (r27131)
- Fix: [NewGRF] Action 7/9 condition 0A failed for present, but disabled, NewGRF. (r27119)
- Fix: Road vehicles could not reverse to be sent to depots when the following tile has the right type to run on, but could not be entered. [FS#6183] (r27107)
- Fix: Use the actual max speed of the vehicle in front when determining if a RV can overtake. [FS#6176] (r27106)
- Fix: grow_counter was not properly bounded by growth_rate, but by some other value used to calculate growth_rate. [FS#6195] (r27105)
- Fix: [Script] Support 64 bits integers in ScriptLists. [FS#6194] (r27104)
- Fix: [Script] Money values would end up wrong in strings when outside the bounds of a 32 bits integer. [FS#6194] (r27102)
- Feature: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news (r27164)
- Feature: Allow changing max heightlevel in scenario editor (r27151)
- Feature: Make use of both rocky tile sets from the base graphics (r27117)
- Change: Scale (non-custom) default window sizes according to GUI zoom (r27147)
- Change: Make statusbar and chat-entry window use the same width as the toolbar (r27146)
- Change: The chatbox-width setting now uses percent of screen width instead of pixels (r27144)
- Change: [NewGRF] Interpret negative positions in industry layouts depending on GRF version (r27138)
- Fix: [SDL, Windows] Right-mouse-button scrolling scrolled/jumped too far, when OpenTTD lagged during mouse event processing (r27167)
- Fix: Toolbars were not invalidated when changing max-vehicles settings [FS#6204] (r27163)
- Fix: Tile selection was drawn outside of map in some cases [FS#6208] (r27162)
- Fix: Reimplement the viewport drawing algorithm [FS#6156] [FS#6206] (r27161)
- Fix: Issues with smallmap and viewport coordinates and transformations (r27160, r27159, r27158)
- Fix: Mark bridge middle tiles dirty when building/removing/changing bridges (r27157)
- Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty (r27148)
- Fix: Oilrig empty-tile checks were incorrect due to wrong TileIndexDiff->TileIndexDiffC conversion (r27137)
- Fix: Misalignment in generate world window in case of small fonts (r27135)
- Fix: Dragging of free wagons in depot failed with GUI zoom (r27133)
- Fix: Reduce memory footprint of map array by shuffling its members [FS#6218] (r27132, r27126)
- Fix: Dropdown- and tooltip-windows should not steal the focus (r27131)
- Fix: [NewGRF] Action 7/9 condition 0A failed for present, but disabled, NewGRF (r27119)
- Fix: Road vehicles could not reverse to be sent to depots when the following tile has the right type to run on, but could not be entered [FS#6183] (r27107)
- Fix: Use the actual max speed of the vehicle in front when determining if a RV can overtake [FS#6176] (r27106)
- Fix: grow_counter was not properly bounded by growth_rate, but by some other value used to calculate growth_rate [FS#6195] (r27105)
- Fix: [Script] Support 64 bits integers in ScriptLists [FS#6194] (r27104)
- Fix: [Script] Money values would end up wrong in strings when outside the bounds of a 32 bits integer [FS#6194] (r27102)
1.5.0-beta1 (2014-12-24)

View File

@@ -29,6 +29,7 @@ set_default() {
strip=""
lipo=""
awk="awk"
pkg_config="pkg-config"
os="DETECT"
endian="AUTO"
cpu_type="DETECT"
@@ -84,7 +85,8 @@ set_default() {
with_libtimidity="1"
with_freetype="1"
with_fontconfig="1"
with_icu="1"
with_icu_layout="1"
with_icu_sort="1"
static_icu="0"
with_psp_config="1"
with_threads="1"
@@ -105,6 +107,7 @@ set_default() {
strip
lipo
awk
pkg_config
os
endian
cpu_type
@@ -159,7 +162,8 @@ set_default() {
with_libtimidity
with_freetype
with_fontconfig
with_icu
with_icu_layout
with_icu_sort
static_icu
with_psp_config
with_threads
@@ -213,6 +217,8 @@ detect_params() {
--windres=*) windres="$optarg";;
--awk) prev_p="awk";;
--awk=*) awk="$optarg";;
--pkg-config) prev_p="pkg_config";;
--pkg-config=*) pkg_config="$optarg";;
--strip) prev_p="strip";;
--strip=*) strip="$optarg";;
--lipo) prev_p="lipo";;
@@ -383,12 +389,18 @@ detect_params() {
--without-libfontconfig) with_fontconfig="0";;
--with-libfontconfig=*) with_fontconfig="$optarg";;
--with-icu) with_icu="2";;
--without-icu) with_icu="0";;
--with-icu=*) with_icu="$optarg";;
--with-libicu) with_icu="2";;
--without-libicu) with_icu="0";;
--with-libicu=*) with_icu="$optarg";;
--with-icu) with_icu_layout="2";with_icu_sort="2";;
--without-icu) with_icu_layout="0";with_icu_sort="0";;
--with-icu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
--with-libicu) with_icu_layout="2";with_icu_sort="2";;
--without-libicu) with_icu_layout="0";with_icu_sort="0";;
--with-libicu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
--with-icu-layout) with_icu_layout="2";;
--without-icu-layout) with_icu_layout="0";;
--with-icu-layout=*) with_icu_layout="$optarg";;
--with-icu-sort) with_icu_sort="2";;
--without-icu-sort) with_icu_sort="0";;
--with-icu-sort=*) with_icu_sort="$optarg";;
--static-icu) static_icu="1";;
--static-icu=*) static_icu="$optarg";;
--static-libicu) static_icu="1";;
@@ -526,10 +538,10 @@ check_params() {
log 1 " PREPROCESSOR is only available for OSX"
exit 1
fi
# OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then
log 1 "configure: error: invalid option --os=$os"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]"
exit 1
fi
# cpu_type can be either 32 or 64
@@ -787,7 +799,7 @@ check_params() {
pre_detect_with_zlib=$with_zlib
detect_zlib
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_zlib" = "0" ] || [ -z "$zlib-config" ]; then
log 1 "WARNING: zlib was not detected or disabled"
log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features"
log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps,"
@@ -838,7 +850,8 @@ check_params() {
detect_png
detect_freetype
detect_fontconfig
detect_icu
detect_icu_layout
detect_icu_sort
detect_pspconfig
detect_libtimidity
@@ -1035,7 +1048,7 @@ check_params() {
# of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)"
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
elif [ -e "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection"
@@ -1054,7 +1067,7 @@ check_params() {
fi
if [ "$doc_dir" = "1" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
doc_dir="share/doc/openttd"
else
doc_dir="$data_dir/docs"
@@ -1064,7 +1077,7 @@ check_params() {
fi
if [ "$icon_theme_dir" = "1" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
icon_theme_dir="share/icons/hicolor"
else
icon_theme_dir=""
@@ -1098,7 +1111,7 @@ check_params() {
if [ "$man_dir" = "1" ]; then
# add manpage on UNIX systems
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
man_dir="share/man/man6"
else
man_dir=""
@@ -1109,7 +1122,7 @@ check_params() {
if [ "$menu_dir" = "1" ]; then
# add a freedesktop menu item only for some UNIX systems
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
menu_dir="share/applications"
else
menu_dir=""
@@ -1538,7 +1551,7 @@ make_cflags_and_ldflags() {
fi
fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
LIBS="$LIBS -lpthread"
fi
@@ -1565,10 +1578,6 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -pthread"
fi
if [ "$os" = "FREEBSD" ]; then
LIBS="$LIBS -lpthread"
fi
if [ "$os" = "OSX" ]; then
LDFLAGS="$LDFLAGS -framework Cocoa"
@@ -1610,7 +1619,7 @@ make_cflags_and_ldflags() {
fi
# Most targets act like UNIX, just with some additions
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX"
fi
# And others like Windows
@@ -1657,12 +1666,13 @@ make_cflags_and_ldflags() {
fi
if [ "$with_zlib" != "0" ]; then
if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
LIBS="$LIBS $zlib"
else
LIBS="$LIBS -lz"
fi
CFLAGS="$CFLAGS -DWITH_ZLIB"
CFLAGS="$CFLAGS `$zlib_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$zlib_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$zlib_config --libs | tr '\n\r' ' '`"
fi
fi
if [ -n "$lzma_config" ]; then
@@ -1708,13 +1718,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$png_config --variable=prefix`/lib/libpng.a `$png_config --libs --static | sed s@-lpng[0-9]*@@`"
else
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
fi
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`"
fi
@@ -1725,13 +1729,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
fi
@@ -1742,26 +1740,31 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then
LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
else
# Is it possible to do static with freetype, if so: how?
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi
LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi
fi
if [ -n "$icu_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU"
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
if [ -n "$icu_layout_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_LAYOUT"
CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`"
# Some icu-configs have the 'feature' of not adding a space where others do add the space
if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' ' | sed s/licu/lsicu/g`"
LIBS="$LIBS `$icu_layout_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else
LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' '`"
LIBS="$LIBS `$icu_layout_config --libs | tr '\n\r' ' '`"
fi
fi
if [ -n "$icu_sort_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_SORT"
CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`"
if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_sort_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else
LIBS="$LIBS `$icu_sort_config --libs | tr '\n\r' ' '`"
fi
fi
@@ -1776,13 +1779,15 @@ make_cflags_and_ldflags() {
fi
fi
if [ -n "$libtimidity" ]; then
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS $libtimidity"
else
LIBS="$LIBS -ltimidity"
fi
if [ -n "$libtimidity_config" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
fi
fi
if [ "$with_iconv" != "0" ]; then
@@ -1942,9 +1947,26 @@ check_compiler() {
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $6 binary for $3"
exit 1
if [ -z "$5" ]; then
log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $6 binary for $3"
exit 1
else
compiler="$3-$5"
fi
machine=`eval $compiler $9 2>/dev/null`
ret=$?
eval "$2=\"$compiler\""
log 2 "executing $compiler $9"
log 2 " returned $machine"
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $5 binary for $3"
exit 1
fi
fi
if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
@@ -2268,52 +2290,54 @@ detect_awk() {
detect_os() {
if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
# Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit}
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/solaris/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
/dos/ { print "DOS"; exit}
/wince/ { print "WINCE"; exit}
/psp/ { print "PSP"; exit}
/linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit}
/dragonfly/ { print "DRAGONFLY"; exit}
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/solaris/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
/dos/ { print "DOS"; exit}
/wince/ { print "WINCE"; exit}
/psp/ { print "PSP"; exit}
'`
if [ -z "$os" ]; then
os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit}
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os\/2/ { print "OS2"; exit}
/gnu/ { print "UNIX"; exit}
/linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit}
/dragonfly/ { print "DRAGONFLY"; exit}
/openbsd/ { print "OPENBSD"; exit}
/netbsd/ { print "NETBSD"; exit}
/hp-ux/ { print "HPUX"; exit}
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/haiku/ { print "HAIKU"; exit}
/sunos/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os\/2/ { print "OS2"; exit}
/gnu/ { print "UNIX"; exit}
'`
fi
if [ -z "$os" ]; then
log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP"
exit 1
fi
@@ -2351,7 +2375,7 @@ detect_allegro() {
return 0
fi
# By default on OSX we don't use SDL. The rest is auto-detect
# By default on OSX we don't use Allegro. The rest is auto-detect
if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
log 1 "checking Allegro... OSX, skipping"
@@ -2359,33 +2383,7 @@ detect_allegro() {
return 0
fi
if [ "$with_allegro" = "1" ] || [ "$with_allegro" = "" ] || [ "$with_allegro" = "2" ]; then
allegro_config="allegro-config"
else
allegro_config="$with_allegro"
fi
version=`$allegro_config --version 2>/dev/null`
ret=$?
log 2 "executing $allegro_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking Allegro... not found"
# It was forced, so it should be found.
if [ "$with_allegro" != "1" ]; then
log 1 "configure: error: allegro-config couldn't be found"
log 1 "configure: error: you supplied '$with_allegro', but it seems invalid"
exit 1
fi
allegro_config=""
return 0
fi
log 1 "checking Allegro... found"
detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4"
}
@@ -2431,33 +2429,7 @@ detect_sdl() {
sleep 5
fi
if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then
sdl_config="sdl-config"
else
sdl_config="$with_sdl"
fi
version=`$sdl_config --version 2>/dev/null`
ret=$?
log 2 "executing $sdl_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking SDL... not found"
# It was forced, so it should be found.
if [ "$with_sdl" != "1" ]; then
log 1 "configure: error: sdl-config couldn't be found"
log 1 "configure: error: you supplied '$with_sdl', but it seems invalid"
exit 1
fi
sdl_config=""
return 0
fi
log 1 "checking SDL... found"
detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
}
detect_osx_sdk() {
@@ -2638,10 +2610,13 @@ detect_library() {
fi
fi
if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then
eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
if [ -z "$includeDir" ]; then
includeDir=`finddir B_SYSTEM_HEADERS_DIRECTORY`
fi
eval "$2=`ls -1 $includeDir/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
eval "res=\$$2"
if [ -z "$res" ]; then
log 2 " trying /boot/common/include/$4$5... no"
log 2 " trying $includeDir/$4$5... no"
fi
fi
@@ -2710,7 +2685,7 @@ detect_library() {
}
detect_zlib() {
detect_library "$with_zlib" "zlib" "libz.a" "" "zlib.h"
detect_pkg_config "$with_zlib" "zlib" "zlib_config" "1.2"
}
detect_lzo2() {
@@ -2718,7 +2693,7 @@ detect_lzo2() {
}
detect_libtimidity() {
detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
}
detect_pkg_config() {
@@ -2726,6 +2701,7 @@ detect_pkg_config() {
# $2 - package name ('liblzma')
# $3 - config name ('lzma_config', sets $lzma_config)
# $4 - minimum module version ('2.3')
# $5 - check for dedicated, 1 is "skif if dedicated"
# 0 means no, 1 is auto-detect, 2 is force
if [ "$1" = "0" ]; then
@@ -2735,10 +2711,17 @@ detect_pkg_config() {
return 0
fi
if [ "$5" = "1" ] && [ "$1" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking $2... dedicated server, skipping"
eval "$3=\"\""
return 0
fi
log 2 "detecting $2"
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
pkg_config_call="pkg-config $2"
pkg_config_call="$pkg_config $2"
else
pkg_config_call="$1"
fi
@@ -2760,7 +2743,7 @@ detect_pkg_config() {
# It was forced, so it should be found.
if [ "$1" != "1" ]; then
log 1 "configure: error: pkg-config $2 couldn't be found"
log 1 "configure: error: $pkg_config $2 couldn't be found"
log 1 "configure: error: you supplied '$1', but it seems invalid"
exit 1
fi
@@ -2782,89 +2765,11 @@ detect_xdg_basedir() {
}
detect_png() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$with_png" = "0" ]; then
log 1 "checking libpng... disabled"
png_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_png" != "1" ]; then
log 1 "checking libpng... no zlib"
log 1 "ERROR: libpng was forced, but zlib was not detected / disabled."
log 1 "ERROR: libpng depends on zlib."
exit 1
fi
log 1 "checking libpng... no zlib, skipping"
png_config=""
return 0
fi
detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
}
detect_freetype() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$with_freetype" = "0" ]; then
log 1 "checking libfreetype... disabled"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfreetype... dedicated server, skipping"
freetype_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_freetype" != "1" ]; then
log 1 "checking libfreetype... no zlib"
log 1 "ERROR: libfreetype was forced, but zlib was not detected / disabled."
log 1 "ERROR: libfreetype depends on zlib."
exit 1
fi
log 1 "checking libfreetype... no zlib, skipping"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
freetype_config="freetype-config"
else
freetype_config="$with_freetype"
fi
version=`$freetype_config --version 2>/dev/null`
ret=$?
log 2 "executing freetype_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking libfreetype... not found"
# It was forced, so it should be found.
if [ "$with_freetype" != "1" ]; then
log 1 "configure: error: freetype-config couldn't be found"
log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
exit 1
fi
freetype_config=""
return 0
fi
log 1 "checking libfreetype... found"
detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1"
}
detect_fontconfig() {
@@ -2875,19 +2780,6 @@ detect_fontconfig() {
fontconfig_config=""
return 0
fi
if [ "$with_fontconfig" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfontconfig... dedicated server, skipping"
fontconfig_config=""
return 0
fi
if [ "$with_fontconfig" != "2" ] && [ -z "$freetype_config" ]; then
log 1 "checking libfontconfig... no freetype, skipping"
fontconfig_config=""
return 0
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
log 1 "checking libfontconfig... WIN32, skipping"
fontconfig_config=""
@@ -2900,57 +2792,15 @@ detect_fontconfig() {
return 0
fi
detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3"
detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1"
}
detect_icu() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$with_icu" = "0" ]; then
log 1 "checking libicu... disabled"
detect_icu_layout() {
detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1"
}
icu_config=""
return 0
fi
if [ "$with_icu" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libicu... dedicated server, skipping"
icu_config=""
return 0
fi
if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
icu_config="icu-config"
else
icu_config="$with_icu"
fi
version=`$icu_config --version 2>/dev/null`
ret=$?
check_version '3.6' "$version"
version_ok=$?
log 2 "executing $icu_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
log 1 "checking libicu... needs at least version 3.6.0, icu NOT enabled"
else
log 1 "checking libicu... not found"
fi
# It was forced, so it should be found.
if [ "$with_icu" != "1" ]; then
log 1 "configure: error: icu-config couldn't be found"
log 1 "configure: error: you supplied '$with_icuconfig', but it seems invalid"
exit 1
fi
icu_config=""
return 0
fi
log 1 "checking libicu... found"
detect_icu_sort() {
detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1"
}
detect_pspconfig() {
@@ -3590,11 +3440,12 @@ showhelp() {
echo " --windres=WINDRES the windres to use [HOST-windres]"
echo " --strip=STRIP the strip to use [HOST-strip]"
echo " --awk=AWK the awk to use in configure [awk]"
echo " --pkg-config=PKG-CONFIG the pkg-config to use in configure [pkg-config]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
echo " DOS/WINCE/PSP/HAIKU"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo ""
echo "Paths:"
@@ -3664,23 +3515,30 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player"
echo " --with-libtimidity enables libtimidity support"
echo " --with-allegro[=allegro-config]"
echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
echo " enables libtimidity support"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
echo " --with-sdl[=sdl-config] enables SDL video driver support"
echo " --with-zlib[=zlib.a] enables zlib support"
echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support"
echo " --with-zlib[=\"pkg-config zlib\"]"
echo " enables zlib support"
echo " --with-liblzma[=\"pkg-config liblzma\"]"
echo " enables liblzma support"
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
echo " --with-png[=libpng-config] enables libpng support"
echo " --with-freetype[=freetype-config]"
echo " --with-png[=\"pkg-config libpng\"]"
echo " enables libpng support"
echo " --with-freetype[=\"pkg-config freetype2\"]"
echo " enables libfreetype support"
echo " --with-fontconfig[=\"pkg-config fontconfig\"]"
echo " enables fontconfig support"
echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]"
echo " enables XDG base directory support"
echo " --with-icu[=icu-config] enables icu (used for right-to-left support)"
echo " --with-icu enables icu components for layout and sorting"
echo " --with-icu-layout[=\"pkg-config icu-lx\"]"
echo " enables icu components for layouting (right-to-left support)"
echo " --with-icu-sort[=\"pkg-config icu-i18n\"]"
echo " enables icu components for locale specific string sorting"
echo " --static-icu try to link statically (libsicu instead of"
echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support"

View File

@@ -17,7 +17,7 @@
</head>
<body style="direction: ltr;">
<h3 style="font-weight: bold;">Landscape</h3>
<span style="font-weight: bold;"></span>Six attributes hold the information about a tile.
<span style="font-weight: bold;"></span>Nine attributes hold the information about a tile.
This can be seen in the <a href="landscape.html">Landscape</a> document. This page tries to give an overview of used and free bits of
the array so you can quickly see what is used and what is not.
<ul>

View File

@@ -70,7 +70,11 @@ ROOT_DIR=`pwd`
# Determine if we are using a modified version
# Assume the dir is not modified
MODIFIED="0"
if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
if [ -f "$ROOT_DIR/.ottdrev" ]; then
# We are an exported source bundle
cat $ROOT_DIR/.ottdrev
exit
elif [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
# We are an svn checkout
if [ -n "`svnversion | grep 'M'`" ]; then
MODIFIED="2"
@@ -84,7 +88,7 @@ if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
else
REV="r$REV_NR"
fi
elif [ -d "$ROOT_DIR/.git" ]; then
elif [ -e "$ROOT_DIR/.git" ]; then
# We are a git checkout
# Refresh the index to make sure file stat info is in sync, then look for modifications
git update-index --refresh >/dev/null
@@ -122,10 +126,6 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
# No rev? Maybe it is a custom hgsubversion clone
REV_NR=`LC_ALL=C HGPLAIN= hg parent --template="{svnrev}"`
fi
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
# We are an exported source bundle
cat $ROOT_DIR/.ottdrev
exit
else
# We don't know
MODIFIED="1"
@@ -134,6 +134,7 @@ else
REV_NR=""
fi
MODIFIED="0" # This prevents Andorid build from connecting to a public servers
if [ "$MODIFIED" -eq "2" ]; then
REV="${REV}M"
fi

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2015-02-24
Release version: 1.5.0-beta2
Last updated: 2016-04-01
Release version: 1.6.0
------------------------------------------------------------------------

View File

@@ -47,7 +47,7 @@
-1 sprites/shore.png 8bpp 82 200 64 32 -31 -1 normal
-1 sprites/shore.png 8bpp 162 200 64 31 -31 -8 normal
-1 * 6 07 83 01 \7! 03 0C
-1 * 44 0C "Missing shore tile graphics for the toyland climate"
-1 * 52 0C "Missing shore tile graphics for the toyland climate"
-1 * 3 05 0D 0A
-1 sprites/shore.png 8bpp 290 200 64 15 -31 0 normal
-1 sprites/shore.png 8bpp 370 200 64 31 -31 -8 normal

View File

@@ -9,4 +9,4 @@ Exec=!!TTD!!
Terminal=false
Categories=!!MENU_GROUP!!
Comment=A clone of Transport Tycoon Deluxe
Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo
Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo;

View File

@@ -1,3 +1,63 @@
openttd (1.6.0-0) unstable; urgency=low
* New upstream release 1.6.0
-- OpenTTD <info@openttd.org> Fri, 01 Apr 2016 21:00:00 +0200
openttd (1.6.0~RC1-0) unstable; urgency=low
* New upstream release 1.6.0-RC1
-- OpenTTD <info@openttd.org> Tue, 01 Mar 2016 21:00:00 +0100
openttd (1.5.3-0) unstable; urgency=low
* New upstream release 1.5.3
-- OpenTTD <info@openttd.org> Tue, 01 Dec 2015 21:00:00 +0100
openttd (1.5.3~RC1-0) unstable; urgency=low
* New upstream release 1.5.3-RC1
-- OpenTTD <info@openttd.org> Sun, 01 Nov 2015 14:00:00 +0100
openttd (1.5.2-0) unstable; urgency=low
* New upstream release 1.5.2
-- OpenTTD <info@openttd.org> Tue, 01 Sep 2015 21:00:00 +0200
openttd (1.5.2~RC1-0) unstable; urgency=low
* New upstream release 1.5.2-RC1
-- OpenTTD <info@openttd.org> Sat, 01 Aug 2015 13:00:00 +0200
openttd (1.5.1-0) unstable; urgency=low
* New upstream release 1.5.1
-- OpenTTD <info@openttd.org> Mon, 01 Jun 2015 21:00:00 +0200
openttd (1.5.1~RC1-0) unstable; urgency=low
* New upstream release 1.5.1-RC1
-- OpenTTD <info@openttd.org> Fri, 08 May 2015 21:00:00 +0200
openttd (1.5.0-0) unstable; urgency=low
* New upstream release 1.5.0
-- OpenTTD <info@openttd.org> Wed, 01 Apr 2015 21:00:00 +0200
openttd (1.5.0~RC1-0) unstable; urgency=low
* New upstream release 1.5.0-RC1
-- OpenTTD <info@openttd.org> Wed, 18 Mar 2015 21:00:00 +0100
openttd (1.5.0~beta2-0) unstable; urgency=low
* New upstream release 1.5.0-beta2

View File

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

View File

@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.5.beta1
Version: 1.6.beta1
Release: 0
%define srcver 1.5.0-beta1
%define srcver 1.6.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,9 +1,9 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 5
!define APPV_MINOR 6
!define APPV_MAINT 0
!define APPV_BUILD 1
!define APPV_EXTRA "-beta2"
!define APPV_EXTRA ""
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version

View File

@@ -22,6 +22,15 @@ then
exit 1
fi
# openttd_vs140.sln is for MSVC 2015
# openttd_vs140.vcxproj is for MSVC 2015
# openttd_vs140.vcxproj.filters is for MSVC 2015
# langs_vs140.vcxproj is for MSVC 2015
# strgen_vs140.vcxproj is for MSVC 2015
# strgen_vs140.vcxproj.filters is for MSVC 2015
# generate_vs140.vcxproj is for MSVC 2015
# version_vs140.vcxproj is for MSVC 2015
# openttd_vs100.sln is for MSVC 2010
# openttd_vs100.vcxproj is for MSVC 2010
# openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -306,11 +315,17 @@ generate "$openttd" "openttd_vs80.vcproj"
generate "$openttd" "openttd_vs90.vcproj"
generate "$openttdvcxproj" "openttd_vs100.vcxproj"
generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters"
generate "$openttdvcxproj" "openttd_vs140.vcxproj"
generate "$openttdfiles" "openttd_vs140.vcxproj.filters" "$openttdfilters"
generate "$lang" "langs_vs80.vcproj"
generate "$lang" "langs_vs90.vcproj"
generate "$langvcxproj" "langs_vs100.vcxproj"
generate "$langfiles" "langs_vs100.vcxproj.filters"
generate "$langvcxproj" "langs_vs140.vcxproj"
generate "$langfiles" "langs_vs140.vcxproj.filters"
generate "$settings" "settings_vs80.vcproj" "$settingscommand"
generate "$settings" "settings_vs90.vcproj" "$settingscommand"
generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs100.vcxproj.filters"
generate "$settingsvcxproj" "settings_vs140.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs140.vcxproj.filters"

View File

@@ -10,6 +10,15 @@ Option Explicit
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
' openttd_vs140.sln is for MSVC 2015
' openttd_vs140.vcxproj is for MSVC 2015
' openttd_vs140.vcxproj.filters is for MSVC 2015
' langs_vs140.vcxproj is for MSVC 2015
' strgen_vs140.vcxproj is for MSVC 2015
' strgen_vs140.vcxproj.filters is for MSVC 2015
' generate_vs140.vcxproj is for MSVC 2015
' version_vs140.vcxproj is for MSVC 2015
' openttd_vs100.sln is for MSVC 2010
' openttd_vs100.vcxproj is for MSVC 2010
' openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -369,6 +378,8 @@ generate openttd, ROOT_DIR & "/projects/openttd_vs80.vcproj", Null
generate openttd, ROOT_DIR & "/projects/openttd_vs90.vcproj", Null
generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs100.vcxproj", Null
generate openttdfiles, ROOT_DIR & "/projects/openttd_vs100.vcxproj.filters", openttdfilters
generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs140.vcxproj", Null
generate openttdfiles, ROOT_DIR & "/projects/openttd_vs140.vcxproj.filters", openttdfilters
Dim lang, langvcxproj, langfiles
lang = load_lang_data(ROOT_DIR & "/src/lang", langvcxproj, langfiles)
@@ -376,6 +387,8 @@ generate lang, ROOT_DIR & "/projects/langs_vs80.vcproj", Null
generate lang, ROOT_DIR & "/projects/langs_vs90.vcproj", Null
generate langvcxproj, ROOT_DIR & "/projects/langs_vs100.vcxproj", Null
generate langfiles, ROOT_DIR & "/projects/langs_vs100.vcxproj.filters", Null
generate langvcxproj, ROOT_DIR & "/projects/langs_vs140.vcxproj", Null
generate langfiles, ROOT_DIR & "/projects/langs_vs140.vcxproj.filters", Null
Dim settings, settingsvcxproj, settingscommand, settingsfiles
settings = load_settings_data(ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles)
@@ -383,3 +396,5 @@ generate settings, ROOT_DIR & "/projects/settings_vs80.vcproj", settingscommand
generate settings, ROOT_DIR & "/projects/settings_vs90.vcproj", settingscommand
generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs100.vcxproj", settingscommand
generate settingsfiles, ROOT_DIR & "/projects/settings_vs100.vcxproj.filters", Null
generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs140.vcxproj", settingscommand
generate settingsfiles, ROOT_DIR & "/projects/settings_vs140.vcxproj.filters", Null

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>generate</ProjectName>
<ProjectGuid>{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}</ProjectGuid>
<RootNamespace>generate</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\source.list">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Running %27generate.vbs%27 ...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)generate.vbs"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)openttd_vs80.vcproj;$(SolutionDir)openttd_vs90.vcproj;$(SolutionDir)openttd_vs100.vcxproj;$(SolutionDir)openttd_vs100.vcxproj.filters;$(SolutionDir)langs_vs80.vcproj;$(SolutionDir)langs_vs90.vcproj;$(SolutionDir)langs_vs100.vcxproj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,384 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>langs</ProjectName>
<ProjectGuid>{0F066B23-18DF-4284-8265-F4A5E7E3B966}</ProjectGuid>
<RootNamespace>langs</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\langs\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Message>Generating strings.h</Message>
<Command>..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table</Command>
</PreBuildEvent>
<Midl>
<TypeLibraryName>./langs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\afrikaans.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating afrikaans language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\afrikaans.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\arabic_egypt.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating arabic_egypt language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\arabic_egypt.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating basque language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\basque.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating belarusian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\belarusian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\brazilian_portuguese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating brazilian_portuguese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\brazilian_portuguese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\bulgarian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating bulgarian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\bulgarian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\catalan.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating catalan language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\catalan.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\croatian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating croatian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\croatian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\czech.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating czech language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\czech.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\danish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating danish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\danish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\dutch.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating dutch language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\dutch.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_AU.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english_AU language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english_AU.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_US.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english_US language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english_US.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\esperanto.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating esperanto language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\esperanto.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\estonian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating estonian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\estonian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\faroese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating faroese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\faroese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\finnish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating finnish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\finnish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\french.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating french language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\french.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\gaelic.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating gaelic language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\gaelic.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\galician.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating galician language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\galician.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\german.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating german language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\german.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\greek.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating greek language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\greek.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\hebrew.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating hebrew language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\hebrew.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\hungarian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating hungarian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\hungarian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\icelandic.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating icelandic language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\icelandic.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\indonesian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating indonesian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\indonesian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\irish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating irish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\irish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\italian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating italian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\italian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\japanese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating japanese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\japanese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\korean.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating korean language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\korean.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\latin.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating latin language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\latin.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\latvian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating latvian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\latvian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\lithuanian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating lithuanian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\lithuanian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\luxembourgish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating luxembourgish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\luxembourgish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\malay.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating malay language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\malay.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_bokmal.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating norwegian_bokmal language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\norwegian_bokmal.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_nynorsk.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating norwegian_nynorsk language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\norwegian_nynorsk.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\polish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating polish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\polish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\portuguese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating portuguese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\portuguese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\romanian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating romanian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\romanian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\russian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating russian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\russian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\serbian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating serbian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\serbian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\simplified_chinese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating simplified_chinese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\simplified_chinese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovak.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating slovak language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovak.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovenian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating slovenian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\swedish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\tamil.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating tamil language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\tamil.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\thai.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating thai language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\thai.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\traditional_chinese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating traditional_chinese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\traditional_chinese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\turkish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating turkish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\turkish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\ukrainian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating ukrainian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\ukrainian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\vietnamese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating vietnamese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\vietnamese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\welsh.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating welsh language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\welsh.lng;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Translations">
<UniqueIdentifier>{2a164580-9033-4a01-974b-b21da507efda}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt" />
<CustomBuild Include="..\src\lang\afrikaans.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\arabic_egypt.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\brazilian_portuguese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\bulgarian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\catalan.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\croatian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\czech.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\danish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\dutch.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_AU.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_US.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\esperanto.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\estonian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\faroese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\finnish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\french.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\gaelic.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\galician.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\german.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\greek.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\hebrew.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\hungarian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\icelandic.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\indonesian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\irish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\italian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\japanese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\korean.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\latin.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\latvian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\lithuanian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\luxembourgish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\malay.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_bokmal.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_nynorsk.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\polish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\portuguese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\romanian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\russian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\serbian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\simplified_chinese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovak.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovenian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\tamil.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\thai.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\traditional_chinese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\turkish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\ukrainian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\vietnamese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\welsh.txt">
<Filter>Translations</Filter>
</CustomBuild>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Translations">
<UniqueIdentifier>{2a164580-9033-4a01-974b-b21da507efda}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt" />
!!FILES!!
</ItemGroup>
</Project>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>langs</ProjectName>
<ProjectGuid>{0F066B23-18DF-4284-8265-F4A5E7E3B966}</ProjectGuid>
<RootNamespace>langs</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\langs\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Message>Generating strings.h</Message>
<Command>..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table</Command>
</PreBuildEvent>
<Midl>
<TypeLibraryName>./langs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english.lng;%(Outputs)</Outputs>
</CustomBuild>
!!FILES!!
</ItemGroup>
<ItemGroup>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -626,6 +626,7 @@
<ClInclude Include="..\src\tilehighlight_type.h" />
<ClInclude Include="..\src\tilematrix_type.hpp" />
<ClInclude Include="..\src\timetable.h" />
<ClInclude Include="..\src\toolbar_type.h" />
<ClInclude Include="..\src\toolbar_gui.h" />
<ClInclude Include="..\src\town.h" />
<ClInclude Include="..\src\town_type.h" />
@@ -898,6 +899,7 @@
<ClInclude Include="..\src\table\sprites.h" />
<ClInclude Include="..\src\table\station_land.h" />
<ClInclude Include="..\src\table\strgen_tables.h" />
<ClInclude Include="..\src\table\string_colours.h" />
<ClInclude Include="..\src\..\objs\langs\table\strings.h" />
<ClInclude Include="..\src\table\town_land.h" />
<ClInclude Include="..\src\table\townname.h" />

View File

@@ -1107,6 +1107,9 @@
<ClInclude Include="..\src\timetable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\toolbar_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\toolbar_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1923,6 +1926,9 @@
<ClInclude Include="..\src\table\strgen_tables.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\table\string_colours.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\..\objs\langs\table\strings.h">
<Filter>Tables</Filter>
</ClInclude>

View File

@@ -0,0 +1,94 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs140.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}"
ProjectSection(ProjectDependencies) = postProject
{0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35}
{E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs140.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs140.vcxproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs140.vcxproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs140.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs140.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}"
ProjectSection(ProjectDependencies) = postProject
{E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs140.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|Win32.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|x64.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|Win32.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
!!FILTERS!!
</ItemGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />
<None Include="..\readme.txt" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,332 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>openttd</ProjectName>
<ProjectGuid>{668328A0-B40E-4CDB-BD72-D0064424414A}</ProjectGuid>
<RootNamespace>openttd</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\Release/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\Debug/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />
<None Include="..\readme.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="langs_vs100.vcxproj">
<Project>{0f066b23-18df-4284-8265-f4a5e7e3b966}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="version_vs100.vcxproj">
<Project>{1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -1778,6 +1778,10 @@
RelativePath=".\..\src\timetable.h"
>
</File>
<File
RelativePath=".\..\src\toolbar_type.h"
>
</File>
<File
RelativePath=".\..\src\toolbar_gui.h"
>
@@ -2890,6 +2894,10 @@
RelativePath=".\..\src\table\strgen_tables.h"
>
</File>
<File
RelativePath=".\..\src\table\string_colours.h"
>
</File>
<File
RelativePath=".\..\src\..\objs\langs\table\strings.h"
>

View File

@@ -1775,6 +1775,10 @@
RelativePath=".\..\src\timetable.h"
>
</File>
<File
RelativePath=".\..\src\toolbar_type.h"
>
</File>
<File
RelativePath=".\..\src\toolbar_gui.h"
>
@@ -2887,6 +2891,10 @@
RelativePath=".\..\src\table\strgen_tables.h"
>
</File>
<File
RelativePath=".\..\src\table\string_colours.h"
>
</File>
<File
RelativePath=".\..\src\..\objs\langs\table\strings.h"
>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settings</ProjectName>
<ProjectGuid>{0817F629-589E-4A3B-B81A-8647BC571E35}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<SettingsCommandLine>
..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble ..\src\table\company_settings.ini ..\src\table\currency_settings.ini ..\src\table\gameopt_settings.ini ..\src\table\misc_settings.ini ..\src\table\settings.ini ..\src\table\win32_settings.ini ..\src\table\window_settings.ini
</SettingsCommandLine>
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\objs\settings\table\settings.h</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\settings.h</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<None Include="..\src\table\company_settings.ini" />
<None Include="..\src\table\currency_settings.ini" />
<None Include="..\src\table\gameopt_settings.ini" />
<None Include="..\src\table\misc_settings.ini" />
<None Include="..\src\table\settings.ini" />
<None Include="..\src\table\win32_settings.ini" />
<None Include="..\src\table\window_settings.ini" />
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="INI">
<UniqueIdentifier>{21deca6c-8df4-4f34-9dad-17d7781cd5a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\company_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\currency_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\gameopt_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\misc_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\win32_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\window_settings.ini">
<Filter>INI</Filter>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="INI">
<UniqueIdentifier>{21deca6c-8df4-4f34-9dad-17d7781cd5a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settings</ProjectName>
<ProjectGuid>{0817F629-589E-4A3B-B81A-8647BC571E35}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<SettingsCommandLine>
!!FILTERS!!
</SettingsCommandLine>
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\objs\settings\table\settings.h</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\settings.h</NMakeOutput>
</PropertyGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settingsgen</ProjectName>
<ProjectGuid>{E9548DE9-F089-49B7-93A6-30BE2CC311C7}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">settings_gen</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<CustomBuildStep>
<Inputs>%(Inputs)</Inputs>
</CustomBuildStep>
<ClCompile>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<PreprocessorDefinitions>SETTINGSGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerOutput>All</AssemblerOutput>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<OutputFile>$(OutDir)settings_gen.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Console</SubSystem>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp" />
<ClCompile Include="..\src\misc\getoptdata.cpp" />
<ClCompile Include="..\src\ini_load.cpp" />
<ClCompile Include="..\src\settingsgen\settingsgen.cpp" />
<ClCompile Include="..\src\string.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\misc\getoptdata.h" />
<ClInclude Include="..\src\ini_type.h" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\strings_type.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{a4678737-b3b3-4be5-9db1-fa6ccd164c59}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\getoptdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ini_load.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\settingsgen\settingsgen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\misc\getoptdata.h" />
<ClInclude Include="..\src\ini_type.h" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\strings_type.h" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>strgen</ProjectName>
<ProjectGuid>{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}</ProjectGuid>
<RootNamespace>strgen</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\Debug/strgen.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<PreprocessorDefinitions>STRGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)strgen.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp" />
<ClCompile Include="..\src\strgen\strgen_base.cpp" />
<ClCompile Include="..\src\strgen\strgen.cpp" />
<ClCompile Include="..\src\string.cpp" />
<ClCompile Include="..\src\misc\getoptdata.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\core\alloc_func.hpp" />
<ClInclude Include="..\src\table\control_codes.h" />
<ClInclude Include="..\src\debug.h" />
<ClInclude Include="..\src\core\endian_func.hpp" />
<ClInclude Include="..\src\stdafx.h" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\misc\getoptdata.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{5894294c-d4dc-41f0-be31-e56cff4e0405}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\strgen\strgen_base.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\strgen\strgen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\getoptdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\core\alloc_func.hpp" />
<ClInclude Include="..\src\table\control_codes.h" />
<ClInclude Include="..\src\debug.h" />
<ClInclude Include="..\src\core\endian_func.hpp" />
<ClInclude Include="..\src\stdafx.h" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\misc\getoptdata.h" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>version</ProjectName>
<ProjectGuid>{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}</ProjectGuid>
<RootNamespace>version</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\version\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\version\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)/determineversion.vbs"</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)/determineversion.vbs"</NMakeReBuildCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\rev.cpp</NMakeOutput>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\src\rev.cpp</NMakeCleanCommandLine>
</PropertyGroup>
<ItemGroup>
<None Include="..\src\os\windows\ottdres.rc.in" />
<None Include="..\src\rev.cpp.in" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,5 +1,5 @@
Last updated: 2015-02-24
Release version: 1.5.0-beta2
Last updated: 2016-04-01
Release version: 1.6.0
------------------------------------------------------------------------
@@ -308,9 +308,9 @@ chosen main OpenTTD directory:
32bpp Sets: newgrf (or a subdirectory thereof)
Music Sets: baseset (or a subdirectory thereof)
AIs: ai (or a subdirectory thereof)
AI Libraries: ai/libraries (or a subdirectory thereof)
AI Libraries: ai/library (or a subdirectory thereof)
Game Scripts (GS): game (or a subdirectory thereof)
GS Libraries: game/libraries (or a subdirectory thereof)
GS Libraries: game/library (or a subdirectory thereof)
Savegames: save
Automatic Savegames: save/autosave
Scenarios: scenario

View File

@@ -93,6 +93,7 @@ tgp.cpp
tile_map.cpp
tilearea.cpp
townname.cpp
tutorial_gui.cpp
#if WIN32
#else
#if WINCE
@@ -143,6 +144,7 @@ base_media_func.h
base_station_base.h
bmp.h
bridge.h
build_confirmation_func.h
cargo_type.h
cargoaction.h
cargomonitor.h
@@ -365,6 +367,7 @@ tilehighlight_func.h
tilehighlight_type.h
tilematrix_type.hpp
timetable.h
toolbar_type.h
toolbar_gui.h
town.h
town_type.h
@@ -451,6 +454,7 @@ airport_gui.cpp
autoreplace_gui.cpp
bootstrap_gui.cpp
bridge_gui.cpp
build_confirmation_gui.cpp
build_vehicle_gui.cpp
cheat_gui.cpp
company_gui.cpp
@@ -664,6 +668,7 @@ table/roadveh_movement.h
table/sprites.h
table/station_land.h
table/strgen_tables.h
table/string_colours.h
../objs/langs/table/strings.h
table/town_land.h
table/townname.h
@@ -905,6 +910,12 @@ script/api/script_window.cpp
# Blitters
#if DEDICATED
#else
blitter/16bpp_base.cpp
blitter/16bpp_base.hpp
blitter/16bpp_anim.cpp
blitter/16bpp_anim.hpp
blitter/16bpp_simple.cpp
blitter/16bpp_simple.hpp
blitter/32bpp_anim.cpp
blitter/32bpp_anim.hpp
#if SSE
@@ -1112,7 +1123,7 @@ music/null_m.cpp
#else
#if MORPHOS
#else
music/extmidi.cpp
music/libtimidity.cpp
#end
#end
#end

View File

@@ -1261,10 +1261,28 @@ struct BufState{
WChar buf_lexfeed(SQUserPointer file)
{
BufState *buf=(BufState*)file;
if(buf->size<(buf->ptr+1))
return 0;
return buf->buf[buf->ptr++];
/* Convert an UTF-8 character into a WChar */
BufState *buf = (BufState *)file;
const char *p = &buf->buf[buf->ptr];
if (buf->size < buf->ptr + 1) return 0;
/* Read the first character, and get the length based on UTF-8 specs. If invalid, bail out. */
uint len = Utf8EncodedCharLen(*p);
if (len == 0) {
buf->ptr++;
return -1;
}
/* Read the remaining bits. */
if (buf->size < buf->ptr + len) return 0;
buf->ptr += len;
/* Convert the character, and when definitely invalid, bail out as well. */
WChar c;
if (Utf8Decode(&c, p) != len) return -1;
return c;
}
SQRESULT sq_compilebuffer(HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,SQBool raiseerror) {

View File

@@ -57,7 +57,7 @@ typedef sqvector<ExpState> ExpStateVec;
class SQCompiler
{
public:
SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _lex(_ss(v), rg, up,ThrowError,this)
SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _token(0), _fs(NULL), _lex(_ss(v), rg, up, ThrowError, this), _debugline(0), _debugop(0)
{
_vm=v;
_sourcename = SQString::Create(_ss(v), sourcename);

View File

@@ -108,7 +108,7 @@ struct AIListWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AIL_LIST) {
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
resize->width = 1;
resize->height = this->line_height;
@@ -121,16 +121,16 @@ struct AIListWindow : public Window {
switch (widget) {
case WID_AIL_LIST: {
/* Draw a list of all available AIs. */
int y = this->GetWidget<NWidgetBase>(WID_AIL_LIST)->pos_y;
int y = Center(r.top, this->line_height);
/* First AI in the list is hardcoded to random */
if (this->vscroll->IsVisible(0)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y + WD_MATRIX_TOP, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
y += this->line_height;
}
ScriptInfoList::const_iterator it = this->info_list->begin();
for (int i = 1; it != this->info_list->end(); i++, it++) {
if (this->vscroll->IsVisible(i)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
y += this->line_height;
}
}
@@ -346,7 +346,7 @@ struct AISettingsWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AIS_BACKGROUND) {
this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
resize->width = 1;
resize->height = this->line_height;
@@ -368,7 +368,6 @@ struct AISettingsWindow : public Window {
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : SETTING_BUTTON_WIDTH + 8);
uint text_right = r.right - (rtl ? SETTING_BUTTON_WIDTH + 8 : WD_FRAMERECT_RIGHT);
int y = r.top;
int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2;
int text_y_offset = (this->line_height - FONT_HEIGHT_NORMAL) / 2;
@@ -413,7 +412,7 @@ struct AISettingsWindow : public Window {
}
}
DrawString(text_left, text_right, y + text_y_offset, str, colour);
DrawString(text_left, text_right, Center(y, this->line_height), str, colour);
y += this->line_height;
}
}
@@ -661,39 +660,41 @@ static const NWidgetPart _nested_ai_config_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_MAUVE, WID_AIC_BACKGROUND),
NWidget(NWID_VERTICAL), SetPIP(4, 4, 4),
NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
NWidget(NWID_SPACER), SetMinimalSize(6, 0),
NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
NWidget(NWID_HORIZONTAL), SetPIP(7, 7, 7),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
NWidget(NWID_VERTICAL), SetPIP(4, 4, 4),
NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
NWidget(NWID_SPACER), SetMinimalSize(6, 0),
NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetSizingType(NWST_STEP), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(),
EndContainer(),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(),
};
@@ -758,12 +759,12 @@ struct AIConfigWindow : public Window {
{
switch (widget) {
case WID_AIC_GAMELIST:
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = 1 * this->line_height;
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
size->height = this->line_height;
break;
case WID_AIC_LIST:
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
size->height = 8 * this->line_height;
break;
}
@@ -801,14 +802,14 @@ struct AIConfigWindow : public Window {
text = STR_JUST_RAW_STRING;
}
DrawString(r.left + 10, r.right - 10, r.top + WD_MATRIX_TOP, text,
DrawString(r.left + 10, r.right - 10, Center(r.top, this->line_height), text,
(this->selected_slot == OWNER_DEITY) ? TC_WHITE : (IsEditable(OWNER_DEITY) ? TC_ORANGE : TC_SILVER));
break;
}
case WID_AIC_LIST: {
int y = r.top;
int y = Center(r.top, this->line_height);
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) {
StringID text;
@@ -820,7 +821,7 @@ struct AIConfigWindow : public Window {
} else {
text = STR_AI_CONFIG_RANDOM_AI;
}
DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, text,
DrawString(r.left + 10, r.right - 10, y, text,
(this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER));
y += this->line_height;
}
@@ -901,8 +902,7 @@ struct AIConfigWindow : public Window {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
#if defined(ENABLE_NETWORK)
ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI);
_network_content_client.RequestContentList(CONTENT_TYPE_GAME);
ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI, CONTENT_TYPE_GAME);
#endif
}
break;
@@ -1074,7 +1074,7 @@ struct AIDebugWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget == WID_AID_LOG_PANEL) {
resize->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL);
size->height = 14 * resize->height + this->top_offset + this->bottom_offset;
}
}
@@ -1090,6 +1090,8 @@ struct AIDebugWindow : public Window {
bool dirty = false;
Dimension d = GetSpriteSize(SPR_COMPANY_ICON);
uint offset_y = Center(0, GetMinSizing(NWST_STEP, d.height + WD_MATRIX_TOP + WD_MATRIX_BOTTOM + 1), d.height);
/* Paint the company icons */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
NWidgetCore *button = this->GetWidget<NWidgetCore>(i + WID_AID_COMPANY_BUTTON_START);
@@ -1110,7 +1112,7 @@ struct AIDebugWindow : public Window {
if (!valid) continue;
byte offset = (i == ai_debug_company) ? 1 : 0;
DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(WID_AID_COMPANY_BUTTON_START + i)->pos_y + 2 + offset);
DrawCompanyIcon(i, Center(button->pos_x + offset, button->current_x, d.width), button->pos_y + offset + offset_y);
}
/* Set button colour for Game Script. */
@@ -1189,7 +1191,7 @@ struct AIDebugWindow : public Window {
ScriptLog::LogData *log = this->GetLogPointer();
if (log == NULL) return;
int y = this->top_offset;
int y = Center(this->top_offset, this->resize.step_height);
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < log->used; i++) {
int pos = (i + log->pos + 1 - log->used + log->count) % log->count;
if (log->lines[pos] == NULL) break;

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.5") == 0 || strcmp(api_version, "1.6") == 0;
}
#if defined(WIN32)

View File

@@ -809,7 +809,7 @@ static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc,
/* We are northwest or southeast of the airport */
dir = delta_y < 0 ? DIAGDIR_NW : DIAGDIR_SE;
}
dir = ChangeDiagDir(dir, (DiagDirDiff)ReverseDiagDir(DirToDiagDir(rotation)));
dir = ChangeDiagDir(dir, DiagDirDifference(DIAGDIR_NE, DirToDiagDir(rotation)));
return apc->entry_points[dir];
}

View File

@@ -28,6 +28,7 @@
#include "hotkeys.h"
#include "vehicle_func.h"
#include "gui.h"
#include "command_func.h"
#include "widgets/airport_widget.h"
@@ -79,6 +80,7 @@ struct BuildAirToolbarWindow : Window {
~BuildAirToolbarWindow()
{
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
}
@@ -113,13 +115,13 @@ struct BuildAirToolbarWindow : Window {
}
}
virtual void OnPlaceObject(Point pt, TileIndex tile)
{
switch (this->last_user_action) {
case WID_AT_AIRPORT:
PlaceAirport(tile);
case WID_AT_AIRPORT: {
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION);
break;
}
case WID_AT_DEMOLISH:
PlaceProc_DemolishArea(tile);
@@ -127,6 +129,7 @@ struct BuildAirToolbarWindow : Window {
default: NOT_REACHED();
}
MoveAllWindowsOffScreen();
}
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
@@ -136,17 +139,27 @@ struct BuildAirToolbarWindow : Window {
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
{
if (pt.x != -1 && select_proc == DDSP_DEMOLISH_AREA) {
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
if (pt.x == -1) return;
MoveAllHiddenWindowsBackToScreen();
switch (select_proc) {
case DDSP_BUILD_STATION:
assert(start_tile == end_tile);
PlaceAirport(end_tile);
break;
case DDSP_DEMOLISH_AREA:
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
break;
default: NOT_REACHED();
}
}
virtual void OnPlaceObjectAbort()
{
MoveAllHiddenWindowsBackToScreen();
this->RaiseButtons();
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
DeleteWindowById(WC_SELECT_STATION, 0);
ResetObjectToPlace();
}
static HotkeyList hotkeys;
@@ -204,7 +217,7 @@ Window *ShowBuildAirToolbar()
{
if (!Company::IsValidID(_local_company)) return NULL;
DeleteWindowByClass(WC_BUILD_TOOLBAR);
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR);
}
@@ -305,6 +318,7 @@ public:
d.width += padding.width;
d.height += padding.height;
*size = maxdim(*size, d);
size->height = GetMinSizing(NWST_STEP, size->height);
break;
}
@@ -316,7 +330,7 @@ public:
size->width = max(size->width, GetStringBoundingBox(as->name).width);
}
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
size->height = 5 * this->line_height;
break;
}
@@ -368,7 +382,9 @@ public:
if (!as->IsAvailable()) {
GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER);
}
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, Center(y, this->line_height), as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
y += this->line_height;
}
break;
@@ -554,35 +570,41 @@ static const NWidgetPart _nested_build_airport_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
NWidget(NWID_HORIZONTAL),
/* Airport dropdown selector and picture. */
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetSizingType(NWST_STEP), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
EndContainer(),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
EndContainer(),
/* Bottom panel. */
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
/* Airport parameters and info. */
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
EndContainer(),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
EndContainer(),
/* Bottom panel. */
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
EndContainer(),
};

View File

@@ -22,6 +22,7 @@
#include "window_gui.h"
#include "engine_gui.h"
#include "settings_func.h"
#include "settings_gui.h"
#include "core/geometry_func.hpp"
#include "rail_gui.h"
#include "widgets/dropdown_func.h"
@@ -259,7 +260,7 @@ public:
switch (widget) {
case WID_RV_SORT_ASCENDING_DESCENDING: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
d.width += padding.width + Window::SortButtonWidth();
d.height += padding.height;
*size = maxdim(*size, d);
break;
@@ -268,7 +269,7 @@ public:
case WID_RV_LEFT_MATRIX:
case WID_RV_RIGHT_MATRIX:
resize->height = GetEngineListHeight((VehicleType)this->window_number);
size->height = (this->window_number <= VEH_ROAD ? 8 : 4) * resize->height;
size->height = (widget == WID_RV_RIGHT_MATRIX ? 3 : 4) * resize->height;
break;
case WID_RV_LEFT_DETAILS:
@@ -318,6 +319,7 @@ public:
d = maxdim(d, GetStringBoundingBox(rti->strings.replace_text));
}
d.width += padding.width;
d.width += SETTING_BUTTON_HEIGHT;
d.height += padding.height;
*size = maxdim(*size, d);
break;
@@ -329,6 +331,7 @@ public:
d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i]));
}
d.width += padding.width;
d.width += SETTING_BUTTON_HEIGHT;
d.height += padding.height;
*size = maxdim(*size, d);
break;
@@ -396,7 +399,7 @@ public:
str = STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED;
}
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_BLACK, SA_HOR_CENTER);
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, Center(r.top + WD_FRAMERECT_TOP, r.bottom - r.top - WD_FRAMERECT_TOP), str, TC_BLACK, SA_HOR_CENTER);
break;
}
@@ -611,28 +614,26 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
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),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
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(),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
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),
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(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
@@ -673,28 +674,26 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
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),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
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(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
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),
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(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(),

View File

@@ -44,4 +44,8 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src)
if (HasBit(src->vehicle_flags, VF_TIMETABLE_STARTED)) SetBit(this->vehicle_flags, VF_TIMETABLE_STARTED);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(this->vehicle_flags, VF_AUTOFILL_TIMETABLE);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
if (HasBit(src->vehicle_flags, VF_SERVINT_IS_PERCENT) != HasBit(this->vehicle_flags, VF_SERVINT_IS_PERCENT)) {
ToggleBit(this->vehicle_flags, VF_SERVINT_IS_PERCENT);
}
if (HasBit(src->vehicle_flags, VF_SERVINT_IS_CUSTOM)) SetBit(this->vehicle_flags, VF_SERVINT_IS_CUSTOM);
}

386
src/blitter/16bpp_anim.cpp Normal file
View File

@@ -0,0 +1,386 @@
/* $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/>.
*/
/** @file 16bpp_anim.cpp Implementation of the optimized 32 bpp blitter with animation support. */
#include "../stdafx.h"
#include "../video/video_driver.hpp"
#include "../zoom_func.h"
#include "16bpp_anim.hpp"
#include "../table/sprites.h"
/** Instantiation of the 16bpp with animation blitter factory. */
static FBlitter_16bppAnim iFBlitter_16bppAnim;
template <BlitterMode mode>
void Blitter_16bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
const Pixel *src, *src_line;
Colour16 *dst, *dst_line;
Anim *anim, *anim_line;
/* Find where to start reading in the source sprite */
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
anim_line = this->anim_buf + ((Colour16 *)bp->dst - (Colour16 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
dst_line += bp->pitch;
src = src_line;
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
anim = anim_line;
anim_line += this->anim_buf_width;
for (int x = 0; x < bp->width; x++) {
switch (mode) {
case BM_COLOUR_REMAP:
/* In case the m-channel is zero, do not remap this pixel in any way */
anim->m = 0;
anim->v = 0;
if (src->m == 0) {
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
} else {
uint8 r = bp->remap[src->m];
if (r != 0) {
*dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(r), src->v), src->a, *dst);
if (src->a == 15 && r >= PALETTE_ANIM_START) {
anim->m = r - PALETTE_ANIM_START + 1;
anim->v = src->v >> 1;
}
}
}
break;
case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */
/* Make the current colour a bit more black, so it looks like this image is transparent */
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
anim->m = 0;
anim->v = 0;
break;
default:
if (src->a == 15 && src->m >= PALETTE_ANIM_START) {
*dst = AdjustBrightness(LookupColourInPalette(src->m), src->v);
anim->m = src->m - PALETTE_ANIM_START + 1;
anim->v = src->v >> 1;
} else {
if (src->a != 0) {
if (src->m >= PALETTE_ANIM_START) {
*dst = ComposeColourPANoCheck(AdjustBrightness(LookupColourInPalette(src->m), src->v), src->a, *dst);
} else {
*dst = ComposeColourPA(src->c, src->a, *dst);
}
}
anim->m = 0;
anim->v = 0;
}
break;
}
dst++;
src += ScaleByZoom(1, zoom);
}
}
}
void Blitter_16bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent Draw() */
Blitter_16bppOptimized::Draw(bp, mode, zoom);
return;
}
switch (mode) {
default: NOT_REACHED();
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
}
}
void Blitter_16bppAnim::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */
Blitter_16bppOptimized::DrawColourMappingRect(dst, width, height, pal);
return;
}
Colour16 *udst = (Colour16 *)dst;
Anim *anim;
anim = this->anim_buf + ((Colour16 *)dst - (Colour16 *)_screen.dst_ptr);
if (pal == PALETTE_TO_TRANSPARENT) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeTransparent(*udst, 154);
anim->m = 0;
anim->v = 0;
udst++;
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
if (pal == PALETTE_NEWSPAPER) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeGrey(*udst);
anim->m = 0;
anim->v = 0;
udst++;
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
}
void Blitter_16bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
{
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return;
Anim *anim = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr) + x + y * this->anim_buf_width;
if (colour >= PALETTE_ANIM_START) {
anim->m = colour - PALETTE_ANIM_START + 1;
anim->v = DEFAULT_BRIGHTNESS >> 1;
} else {
anim->m = 0;
anim->v = 0;
}
}
void Blitter_16bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */
Blitter_16bppOptimized::DrawRect(video, width, height, colour);
return;
}
Colour16 colour16 = LookupColourInPalette(colour);
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
do {
Colour16 *dst = (Colour16 *)video;
Anim *anim = anim_line;
for (int i = width; i > 0; i--) {
*dst = colour16;
/* Set the colour in the anim-buffer too */
if (colour >= PALETTE_ANIM_START) {
anim->m = colour - PALETTE_ANIM_START + 1;
anim->v = DEFAULT_BRIGHTNESS >> 1;
} else {
anim->m = 0;
anim->v = 0;
}
dst++;
anim++;
}
video = (Colour16 *)video + _screen.pitch;
anim_line += this->anim_buf_width;
} while (--height);
}
void Blitter_16bppAnim::CopyFromBuffer(void *video, const void *src, int width, int height)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
Colour16 *dst = (Colour16 *)video;
const uint8 *usrc = (const uint8 *)src;
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
for (; height > 0; height--) {
/* We need to keep those for palette animation. */
Colour16 *dst_pal = dst;
Anim *anim_pal = anim_line;
memcpy(dst, usrc, width * sizeof(Colour16));
usrc += width * sizeof(Colour16);
dst += _screen.pitch;
/* Copy back the anim-buffer */
memcpy(anim_line, usrc, width * sizeof(Anim));
usrc += width * sizeof(Anim);
anim_line += this->anim_buf_width;
/* Okay, it is *very* likely that the image we stored is using
* the wrong palette animated colours. There are two things we
* can do to fix this. The first is simply reviewing the whole
* screen after we copied the buffer, i.e. run PaletteAnimate,
* however that forces a full screen redraw which is expensive
* for just the cursor. This just copies the implementation of
* palette animation, much cheaper though slightly nastier. */
for (int i = 0; i < width; i++) {
uint8 colour = anim_pal->m;
if (colour) {
/* Update this pixel */
*dst_pal = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim_pal->v << 1);
}
dst_pal++;
anim_pal++;
}
}
}
void Blitter_16bppAnim::CopyToBuffer(const void *video, void *dst, int width, int height)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint8 *udst = (uint8 *)dst;
const Colour16 *src = (const Colour16 *)video;
const Anim *anim_line = this->anim_buf + ((const Colour16 *)video - (Colour16 *)_screen.dst_ptr);
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(Colour16));
src += _screen.pitch;
udst += width * sizeof(Colour16);
/* Copy the anim-buffer */
memcpy(udst, anim_line, width * sizeof(Anim));
udst += width * sizeof(Anim);
anim_line += this->anim_buf_width;
}
}
void Blitter_16bppAnim::ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
const Anim *src;
Anim *dst;
int left = left_ref, top = top_ref, width = width_ref, height = height_ref;
/* We need to scroll the anim-buffer too */
if (scroll_y > 0) {
/* Calculate pointers */
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Decrease height and increase top */
top += scroll_y;
height -= scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
for (int h = height; h > 0; h--) {
memcpy(dst, src, width * sizeof(Anim));
src -= this->anim_buf_width;
dst -= this->anim_buf_width;
}
} else {
/* Calculate pointers */
dst = this->anim_buf + left + top * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
/* the y-displacement may be 0 therefore we have to use memmove,
* because source and destination may overlap */
for (int h = height; h > 0; h--) {
memmove(dst, src, width * sizeof(Anim));
src += _screen.pitch;
dst += _screen.pitch;
}
}
Blitter_16bppOptimized::ScrollBuffer(video, left_ref, top_ref, width_ref, height_ref, scroll_x, scroll_y);
}
int Blitter_16bppAnim::BufferSize(int width, int height)
{
return width * height * (sizeof(Anim) + sizeof(Colour16));
}
void Blitter_16bppAnim::PaletteAnimate(const Palette &palette)
{
assert(!_screen_disable_anim);
/* If first_dirty is 0, it is for 8bpp indication to send the new
* palette. However, only the animation colours might possibly change.
* Especially when going between toyland and non-toyland. */
assert(palette.first_dirty == PALETTE_ANIM_START || palette.first_dirty == 0);
for (int i = 0; i < 256; i++) {
this->palette[i] = To16(palette.palette[i]);
}
const Anim *anim = this->anim_buf;
Colour16 *dst = (Colour16 *)_screen.dst_ptr;
/* Let's walk the anim buffer and try to find the pixels */
for (int y = this->anim_buf_height; y != 0 ; y--) {
for (int x = this->anim_buf_width; x != 0 ; x--) {
uint8 colour = anim->m;
if (colour) {
/* Update this pixel */
*dst = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim->v << 1);
}
dst++;
anim++;
}
dst += _screen.pitch - this->anim_buf_width;
}
/* Make sure the backend redraws the whole screen */
VideoDriver::GetInstance()->MakeDirty(0, 0, _screen.width, _screen.height);
}
Blitter::PaletteAnimation Blitter_16bppAnim::UsePaletteAnimation()
{
return Blitter::PALETTE_ANIMATION_BLITTER;
}
void Blitter_16bppAnim::PostResize()
{
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height) {
/* 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<Anim>(_screen.width * _screen.height);
this->anim_buf_width = _screen.width;
this->anim_buf_height = _screen.height;
}
}

View File

@@ -0,0 +1,75 @@
/* $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/>.
*/
/** @file 16bpp_anim.hpp A 16 bpp blitter with animation support. */
#ifndef BLITTER_16BPP_ANIM_HPP
#define BLITTER_16BPP_ANIM_HPP
#include "16bpp_simple.hpp"
class Blitter_16bppOptimized: public Blitter_16bppSimple {
// TODO: implement that
};
/** The optimised 16 bpp blitter with palette animation. */
class Blitter_16bppAnim : public Blitter_16bppOptimized {
protected:
// PALETTE_ANIM_SIZE is less than 32, so we'll use 5 bits for color index, and 3 bits for brightness, losing 1 bit compared to struct Pixel
struct Anim {
unsigned m : 5 __attribute__((packed)); ///< Color index channel, packed 5 bits, 0 = no animation, 1 = PALETTE_ANIM_START
unsigned v : 3 __attribute__((packed)); ///< Brightness-channel, packed 3 bits
};
Anim *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.
Colour16 palette[256]; ///< The current palette.
public:
Blitter_16bppAnim() :
anim_buf(NULL),
anim_buf_width(0),
anim_buf_height(0)
{}
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y);
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(const Palette &palette);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 3; }
/* virtual */ const char *GetName() { return "16bpp-anim"; }
/* virtual */ void PostResize();
/**
* Look up the colour in the current palette.
*/
inline Colour16 LookupColourInPalette(uint8 index)
{
return this->palette[index];
}
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
};
/** Factory for the 16bpp blitter with animation. */
class FBlitter_16bppAnim : public BlitterFactory {
public:
FBlitter_16bppAnim() : BlitterFactory("16bpp-anim-broken", "16bpp Animation Blitter, currently broken (palette animation)") {}
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppAnim(); }
};
#endif /* BLITTER_16BPP_ANIM_HPP */

147
src/blitter/16bpp_base.cpp Normal file
View File

@@ -0,0 +1,147 @@
/* $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/>.
*/
/** @file 16bpp_base.cpp Implementation of base for 32 bpp blitters. */
#include "../stdafx.h"
#include "16bpp_base.hpp"
void *Blitter_16bppBase::MoveTo(void *video, int x, int y)
{
return (uint16 *)video + x + y * _screen.pitch;
}
void Blitter_16bppBase::SetPixel(void *video, int x, int y, uint8 colour)
{
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
}
void Blitter_16bppBase::DrawRect(void *video, int width, int height, uint8 colour)
{
Colour16 target = LookupColourInPalette(colour);
do {
Colour16 *dst = (Colour16 *)video;
for (int i = width; i > 0; i--) {
*dst = target;
dst++;
}
video = (uint16 *)video + _screen.pitch;
} while (--height);
}
void Blitter_16bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
{
uint16 *dst = (uint16 *)video;
const uint16 *usrc = (const uint16 *)src;
for (; height > 0; height--) {
memcpy(dst, usrc, width * sizeof(uint16));
usrc += width;
dst += _screen.pitch;
}
}
void Blitter_16bppBase::CopyToBuffer(const void *video, void *dst, int width, int height)
{
uint16 *udst = (uint16 *)dst;
const uint16 *src = (const uint16 *)video;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint16));
src += _screen.pitch;
udst += width;
}
}
void Blitter_16bppBase::CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch)
{
uint16 *udst = (uint16 *)dst;
const uint16 *src = (const uint16 *)video;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint16));
src += _screen.pitch;
udst += dst_pitch;
}
}
void Blitter_16bppBase::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
{
const Colour16 *src;
Colour16 *dst;
if (scroll_y > 0) {
/* Calculate pointers */
dst = (Colour16 *)video + left + (top + height - 1) * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrease height and increase top */
top += scroll_y;
height -= scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
for (int h = height; h > 0; h--) {
memcpy(dst, src, width * sizeof(Colour16));
src -= _screen.pitch;
dst -= _screen.pitch;
}
} else {
/* Calculate pointers */
dst = (Colour16 *)video + left + top * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
/* the y-displacement may be 0 therefore we have to use memmove,
* because source and destination may overlap */
for (int h = height; h > 0; h--) {
memmove(dst, src, width * sizeof(Colour16));
src += _screen.pitch;
dst += _screen.pitch;
}
}
}
int Blitter_16bppBase::BufferSize(int width, int height)
{
return width * height * sizeof(Colour16);
}
void Blitter_16bppBase::PaletteAnimate(const Palette &palette)
{
/* By default, 16bpp doesn't have palette animation */
}
Blitter::PaletteAnimation Blitter_16bppBase::UsePaletteAnimation()
{
return Blitter::PALETTE_ANIMATION_NONE;
}

225
src/blitter/16bpp_base.hpp Normal file
View File

@@ -0,0 +1,225 @@
/* $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/>.
*/
/** @file 16bpp_base.hpp Base for all 16 bits blitters. */
#ifndef BLITTER_16BPP_BASE_HPP
#define BLITTER_16BPP_BASE_HPP
#include "base.hpp"
#include "../core/bitmath_func.hpp"
#include "../core/math_func.hpp"
#include "../gfx_func.h"
/** Base for all 16bpp blitters. */
class Blitter_16bppBase : public Blitter {
public:
// TODO: GCC-specific attributes
struct Colour16 {
unsigned b : 5 __attribute__((packed)); ///< Blue-channel, packed 5 bits
unsigned g : 6 __attribute__((packed)); ///< Green-channel, packed 6 bits
unsigned r : 5 __attribute__((packed)); ///< Red-channel, packed 5 bits
Colour16(uint8 r = 0, uint8 g = 0, uint8 b = 0):
b(b), g(g), r(r)
{
}
};
struct Pixel {
Colour16 c;
unsigned a : 4 __attribute__((packed)); ///< Alpha-channel, packed 4 bits
unsigned v : 4 __attribute__((packed)); ///< Brightness-channel, packed 4 bits
unsigned m : 8 __attribute__((packed)); ///< Remap-channel, cannot pack it, because it's palette lookup index, so it must be in range 0-255
};
/* virtual */ uint8 GetScreenDepth() { return 16; }
/* virtual */ void *MoveTo(void *video, int x, int y);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(const Palette &palette);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 2; }
/**
* Convert from rgb values to screen native 16bpp colour
*/
static inline Colour16 To16(uint8 r, uint8 g, uint8 b)
{
return Colour16(r >> 3, g >> 2, b >> 3);
}
/**
* Convert from 32bpp colour to screen native 16bpp colour
*/
static inline Colour16 To16(Colour c)
{
return To16(c.r, c.g, c.b);
}
/**
* Look up the colour in the current palette.
*/
static inline Colour LookupColourInPalette32(uint index)
{
return _cur_palette.palette[index];
}
/**
* Look up the colour in the current palette.
*/
static inline Colour16 LookupColourInPalette(uint index)
{
return To16(LookupColourInPalette32(index));
}
/**
* Compose a colour based on RGBA values and the current pixel value.
* @param r range is from 0 to 31.
* @param g range is from 0 to 63.
* @param b range is from 0 to 31.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourRGBANoCheck(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
{
/* The 16 is wrong, it should be 15, but 16 is much faster... */
return Colour16 ( ((int)(r - current.r) * a) / 16 + current.r,
((int)(g - current.g) * a) / 16 + current.g,
((int)(b - current.b) * a) / 16 + current.b );
}
/**
* Compose a colour based on RGBA values and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
* @param r range is from 0 to 31.
* @param g range is from 0 to 63.
* @param b range is from 0 to 31.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourRGBA(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
{
if (a == 0) return current;
if (a >= 15) return Colour16(r, g, b);
return ComposeColourRGBANoCheck(r, g, b, a, current);
}
/**
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
* @param a range is from 0 to 16.
*/
static inline Colour16 ComposeColourPANoCheck(Colour16 colour, uint8 a, Colour16 current)
{
return ComposeColourRGBANoCheck(colour.r, colour.g, colour.b, a, current);
}
/**
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourPA(Colour16 colour, uint8 a, Colour16 current)
{
if (a == 0) return current;
if (a >= 15) return colour;
return ComposeColourPANoCheck(colour, a, current);
}
/**
* Make a pixel looks like it is transparent.
* @param colour the colour already on the screen.
* @param nom the amount of transparency, nominator, makes colour lighter.
* @param denom denominator, makes colour darker.
* @return the new colour for the screen.
*/
static inline Colour16 MakeTransparent(Colour16 colour, uint nom, uint denom = 256)
{
uint r = colour.r;
uint g = colour.g;
uint b = colour.b;
return Colour16( r * nom / denom,
g * nom / denom,
b * nom / denom );
}
/**
* Make a colour grey - based.
* @param colour the colour to make grey.
* @return the new colour, now grey.
*/
static inline Colour16 MakeGrey(Colour16 colour)
{
uint8 r = colour.r;
uint8 g = colour.g;
uint8 b = colour.b;
/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
* divide by it to normalize the value to a byte again. See heightmap.cpp for
* information about the formula. */
uint grey = (((r << 3) * 19595) + ((g << 2) * 38470) + ((b << 3) * 7471)) / 65536;
return To16(grey, grey, grey);
}
/**
* Make a colour dark grey, for specialized 32bpp remapping.
* @param r red component
* @param g green component
* @param b blue component
* @return the brightness value of the new colour, now dark grey.
*/
static inline uint8 MakeDark(Colour16 colour)
{
uint8 r = colour.r;
uint8 g = colour.g;
uint8 b = colour.b;
/* Magic-numbers are ~66% of those used in MakeGrey() */
return (((r << 3) * 13063) + ((g << 2) * 25647) + ((b << 3) * 4981)) / 65536;
}
enum { DEFAULT_BRIGHTNESS = 8 };
/**
* @param brightness range is from 0 to 15.
*/
static inline Colour16 AdjustBrightness(Colour16 colour, uint8 brightness)
{
/* Shortcut for normal brightness */
if (brightness == DEFAULT_BRIGHTNESS) return colour;
uint16 ob = 0;
uint16 r = colour.r * brightness / DEFAULT_BRIGHTNESS;
uint16 g = colour.g * brightness / DEFAULT_BRIGHTNESS;
uint16 b = colour.b * brightness / DEFAULT_BRIGHTNESS;
/* Sum overbright */
if (r > 31) ob += r - 31;
if (g > 63) ob += g - 63;
if (b > 31) ob += b - 31;
if (ob == 0) return Colour16(r, g, b);
/* Reduce overbright strength */
ob /= 2;
return Colour16( r >= 31 ? 31 : min(r + ob * (31 - r) / 32, 31),
g >= 63 ? 63 : min(g + ob * (63 - g) / 64, 63),
b >= 31 ? 31 : min(b + ob * (31 - b) / 32, 31) );
}
};
#endif /* BLITTER_16BPP_BASE_HPP */

View File

@@ -0,0 +1,173 @@
/* $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/>.
*/
/** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */
#include "../stdafx.h"
#include "../zoom_func.h"
#include "16bpp_simple.hpp"
#include "../table/sprites.h"
/** Instantiation of the simple 16bpp blitter factory. */
static FBlitter_16bppSimple iFBlitter_16bppSimple;
template <BlitterMode mode>
void Blitter_16bppSimple::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
const Pixel *src, *src_line;
Colour16 *dst, *dst_line;
/* Find where to start reading in the source sprite */
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
dst_line += bp->pitch;
src = src_line;
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
for (int x = 0; x < bp->width; x++) {
switch (mode) {
case BM_COLOUR_REMAP:
/* In case the m-channel is zero, do not remap this pixel in any way */
if (src->m == 0) {
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
} else {
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
}
break;
case BM_CRASH_REMAP:
if (src->m == 0) {
if (src->a != 0) {
uint8 g = MakeDark(src->c);
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
}
} else {
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
}
break;
case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */
/* Make the current colour a bit more black, so it looks like this image is transparent */
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
break;
case BM_BLACK_REMAP:
if (src->a != 0) {
*dst = Colour16(0, 0, 0);
}
break;
default:
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
break;
}
dst++;
src += ScaleByZoom(1, zoom);
}
}
}
void Blitter_16bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
switch (mode) {
default: NOT_REACHED();
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
case BM_BLACK_REMAP: Draw<BM_BLACK_REMAP> (bp, zoom); return;
}
}
void Blitter_16bppSimple::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
{
Colour16 *udst = (Colour16 *)dst;
if (pal == PALETTE_TO_TRANSPARENT) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeTransparent(*udst, 154);
udst++;
}
udst = udst - width + _screen.pitch;
} while (--height);
return;
}
if (pal == PALETTE_NEWSPAPER) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeGrey(*udst);
udst++;
}
udst = udst - width + _screen.pitch;
} while (--height);
return;
}
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
}
Sprite *Blitter_16bppSimple::Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
{
Pixel *dst;
Sprite *dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + (size_t)sprite->height * (size_t)sprite->width * sizeof(Pixel));
dest_sprite->height = sprite->height;
dest_sprite->width = sprite->width;
dest_sprite->x_offs = sprite->x_offs;
dest_sprite->y_offs = sprite->y_offs;
dst = (Pixel *)dest_sprite->data;
SpriteLoader::CommonPixel *src = (SpriteLoader::CommonPixel *)sprite->data;
for (int i = 0; i < sprite->height * sprite->width; i++) {
if (src->m == 0) {
dst[i].c = To16(src->r, src->g, src->b);
dst[i].a = src->a / 16;
dst[i].m = 0;
dst[i].v = 0;
} else {
/* Get brightest value */
uint8 rgb_max = max(src->r, max(src->g, src->b));
#if 0
/* Pre-convert the mapping channel to a RGB value,
use 32bpp AdjustBrightness() variant for better colors,
because this function is not called each frame */
if (rgb_max == 0) rgb_max = Blitter_32bppBase::DEFAULT_BRIGHTNESS;
dst[i].c = To16(Blitter_32bppBase::AdjustBrightness(LookupColourInPalette32(src->m), rgb_max));
dst[i].v = rgb_max / 16;
#endif
rgb_max /= 16;
/* Black pixel (8bpp or old 32bpp image), so use default value */
if (rgb_max == 0) rgb_max = DEFAULT_BRIGHTNESS;
/* Pre-convert the mapping channel to a RGB value,
use 32bpp AdjustBrightness() variant for better colors,
because this function is not called each frame */
dst[i].c = AdjustBrightness(LookupColourInPalette(src->m), rgb_max);
dst[i].v = rgb_max;
dst[i].a = src->a / 16;
dst[i].m = src->m;
}
src++;
}
return dest_sprite;
}

View File

@@ -0,0 +1,36 @@
/* $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/>.
*/
/** @file 16bpp_simple.hpp Simple 16 bpp blitter. */
#ifndef BLITTER_16BPP_SIMPLE_HPP
#define BLITTER_16BPP_SIMPLE_HPP
#include "16bpp_base.hpp"
#include "factory.hpp"
/** The most trivial 32 bpp blitter (without palette animation). */
class Blitter_16bppSimple : public Blitter_16bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
/* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
/* virtual */ const char *GetName() { return "16bpp-simple"; }
};
/** Factory for the simple 16 bpp blitter. */
class FBlitter_16bppSimple : public BlitterFactory {
public:
FBlitter_16bppSimple() : BlitterFactory("16bpp-simple", "16bpp Simple Blitter (no palette animation)") {}
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppSimple(); }
};
#endif /* BLITTER_16BPP_SIMPLE_HPP */

View File

@@ -24,6 +24,7 @@
#include "cmd_helper.h"
#include "tunnelbridge_map.h"
#include "road_gui.h"
#include "tilehighlight_func.h"
#include "widgets/bridge_widget.h"
@@ -198,6 +199,7 @@ public:
sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field.
text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field.
resize->height = max(sprite_dim.height, text_dim.height) + 2; // Max of both sizes + account for matrix edges.
resize->height = GetMinSizing(NWST_STEP, resize->height);
this->bridgetext_offset = WD_MATRIX_LEFT + sprite_dim.width + 1; // Left edge of text, 1 pixel distance from the sprite.
size->width = this->bridgetext_offset + text_dim.width + WD_MATRIX_RIGHT;
@@ -233,7 +235,8 @@ public:
SetDParam(1, b->speed);
SetDParam(0, b->material);
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y + this->resize.step_height - 1 - GetSpriteSize(b->sprite).height);
uint y_sprite = Center(y, this->resize.step_height, GetSpriteSize(b->sprite).height);
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y_sprite);
DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height,
_game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO);
y += this->resize.step_height;
@@ -430,6 +433,8 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
new BuildBridgeWindow(&_build_bridge_desc, start, end, type, bl);
} else {
delete bl;
SetSelectionTilesDirty();
_thd.Reset();
ShowErrorMessage(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, errmsg, WL_INFO, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
}
}

View File

@@ -0,0 +1,25 @@
/* $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/>.
*/
/** @file build_confirmation_func.h Transparent confirmation dialog for building anything on the map. */
#ifndef BUILD_CONFIRMATION_FUNC_H
#define BUILD_CONFIRMATION_FUNC_H
#include "stdafx.h"
#include "window_func.h"
#include "widget_type.h"
void ShowBuildConfirmationWindow();
void HideBuildConfirmationWindow();
bool ConfirmationWindowShown();
bool BuildConfirmationWindowProcessViewportClick();
#endif /* BUILD_CONFIRMATION_FUNC_H */

View File

@@ -0,0 +1,262 @@
/* $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/>.
*/
/** @file build_confirmation_gui.cpp Transparent confirmation dialog for building anything on the map. */
#include "stdafx.h"
#include "string_func.h"
#include "strings_func.h"
#include "window_func.h"
#include "widget_type.h"
#include "window_gui.h"
#include "gfx_func.h"
#include "tilehighlight_func.h"
#include "viewport_func.h"
#include "zoom_func.h"
#include "settings_type.h"
#include "station_gui.h"
#include "build_confirmation_func.h"
#include "widgets/build_confirmation_widget.h"
#include "widgets/misc_widget.h"
#include "table/strings.h"
#include "safeguards.h"
static const NWidgetPart _nested_station_build_info_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_TT_BACKGROUND), SetMinimalSize(200, 32), EndContainer(),
};
static WindowDesc _station_build_info_desc(
WDP_MANUAL, NULL, 0, 0, // Coordinates and sizes are not used,
WC_TOOLTIPS, WC_NONE,
WDF_NO_FOCUS,
_nested_station_build_info_widgets, lengthof(_nested_station_build_info_widgets)
);
/** Window for displaying accepted goods for a station. */
struct StationBuildInfoWindow : public Window
{
StationCoverageType sct;
static void show()
{
StationCoverageType sct;
if (FindWindowByClass(WC_BUILD_STATION) != NULL) sct = SCT_ALL;
else if (FindWindowByClass(WC_BUS_STATION) != NULL) sct = SCT_PASSENGERS_ONLY;
else if (FindWindowByClass(WC_TRUCK_STATION) != NULL) sct = SCT_NON_PASSENGERS_ONLY;
else return;
new StationBuildInfoWindow(sct);
}
StationBuildInfoWindow(StationCoverageType sct) : Window(&_station_build_info_desc)
{
this->sct = sct;
this->InitNested();
CLRBITS(this->flags, WF_WHITE_BORDER);
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt;
pt.y = GetMainViewTop();
pt.x = _screen.width - sm_width - FindWindowById(WC_MAIN_TOOLBAR, 0)->width;
return pt;
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
size->width = GetStringBoundingBox(STR_STATION_BUILD_COVERAGE_AREA_TITLE).width * 2.5;
size->height = GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, size->width) * 2;
/* Increase slightly to have some space around the box. */
size->width += 2 + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
size->height += 2 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
}
virtual void DrawWidget(const Rect &r, int widget) const
{
/* There is only one widget. */
GfxFillRect(r.left, r.top, r.right, r.bottom, PC_BLACK);
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_LIGHT_YELLOW);
int top = r.top + WD_FRAMERECT_TOP;
top = DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, false);
if (top - r.top <= GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, r.right - r.left) * 1.5) {
DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, true);
}
}
};
/** GUI for confirming building actions. */
struct BuildConfirmationWindow : Window {
// TODO: show estimated price
static bool shown; ///< Just to speed up window hiding, HideBuildConfirmationWindow() is called very often.
Point selstart; ///< The selection start on the viewport.
Point selend; ///< The selection end on the viewport.
BuildConfirmationWindow(WindowDesc *desc) : Window(desc)
{
// Save tile selection points, they will be reset by subsequent code, and we must keep them
selstart = _thd.selstart;
selend = _thd.selend;
this->InitNested(0);
Point pt;
const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_BC_OK);
pt.x = w->viewport->scrollpos_x + ScaleByZoom(_cursor.pos.x - nvp->current_x / 2, w->viewport->zoom);
pt.y = w->viewport->scrollpos_y + ScaleByZoom(_cursor.pos.y - nvp->current_y / 4, w->viewport->zoom);
nvp->InitializeViewport(this, 0, w->viewport->zoom);
nvp->disp_flags |= ND_SHADE_DIMMED;
this->viewport->scrollpos_x = pt.x;
this->viewport->scrollpos_y = pt.y;
this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
BuildConfirmationWindow::shown = true;
}
~BuildConfirmationWindow()
{
BuildConfirmationWindow::shown = false;
}
void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_BC_OK:
if (pt.y <= (int)GetWidget<NWidgetViewport>(WID_BC_OK)->current_y / 2) {
_thd.selstart = selstart;
_thd.selend = selend;
ConfirmPlacingObject();
ToolbarSelectLastTool();
} else {
ResetObjectToPlace();
}
break;
}
HideBuildConfirmationWindow(); // this == NULL after this call
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_BC_OK:
size->width = GetMinSizing(NWST_BUTTON) * 2;
size->height = GetMinSizing(NWST_BUTTON) * 3;
break;
}
}
virtual void OnPaint()
{
this->DrawWidgets();
DrawButtonFrame(0, 0, this->width - 1, this->height / 2 - 2, STR_BUTTON_OK);
DrawButtonFrame(0, this->height / 2, this->width - 1, this->height / 2 - 1, STR_BUTTON_CANCEL);
}
void DrawButtonFrame(int x, int y, int w, int h, int str)
{
DrawFrameRect(x, y, x + w, y + h, COLOUR_GREY, FR_BORDERONLY);
Dimension d = GetStringBoundingBox(str);
DrawFrameRect(x + w / 2 - d.width / 2 - 1,
Center(y, h) - 2,
x + w / 2 + d.width / 2 + 1,
Center(y, h) + d.height,
COLOUR_GREY, FR_NONE);
DrawString(x, x + w, Center(y, h), str, TC_FROMSTRING, SA_HOR_CENTER);
}
};
bool BuildConfirmationWindow::shown = false;
static const NWidgetPart _nested_build_confirmation_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_BC_PANEL),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_BC_OK), SetSizingType(NWST_VIEWPORT), SetResize(1, 1), SetFill(1, 1), //SetPadding(2, 2, 2, 2),
EndContainer(),
};
static WindowDesc _build_confirmation_desc(
WDP_MANUAL, "build_confirmation", 0, 0,
WC_BUILD_CONFIRMATION, WC_NONE,
0,
_nested_build_confirmation_widgets, lengthof(_nested_build_confirmation_widgets)
);
/**
* Show build confirmation window under the mouse cursor
*/
void ShowBuildConfirmationWindow()
{
HideBuildConfirmationWindow();
if (!_settings_client.gui.build_confirmation || _shift_pressed) {
ConfirmPlacingObject();
ToolbarSelectLastTool();
return;
}
BuildConfirmationWindow *w = new BuildConfirmationWindow(&_build_confirmation_desc);
int old_left = w->left;
int old_top = w->top;
w->left = _cursor.pos.x - w->width / 2;
w->top = _cursor.pos.y - w->height / 4;
w->viewport->left += w->left - old_left;
w->viewport->top += w->top - old_top;
w->SetDirty();
SetDirtyBlocks(0, 0, _screen.width, _screen.height); // I don't know what does this do, but it looks important
StationBuildInfoWindow::show();
}
/**
* Destory build confirmation window, this does not cancel current action
*/
void HideBuildConfirmationWindow()
{
if (!BuildConfirmationWindow::shown) return;
DeleteWindowById(WC_BUILD_CONFIRMATION, 0);
DeleteWindowById(WC_TOOLTIPS, 0);
}
bool ConfirmationWindowShown()
{
return BuildConfirmationWindow::shown;
}
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);
return true;
}
HideBuildConfirmationWindow();
_thd.new_outersize = _thd.outersize; // Revert station catchment area highlight, which is getting set to zero inside drawing funcs
return false;
}

View File

@@ -46,7 +46,8 @@
*/
uint GetEngineListHeight(VehicleType type)
{
return max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
uint size = max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
return GetMinSizing(NWST_STEP, size);
}
static const NWidgetPart _nested_build_vehicle_widgets[] = {
@@ -57,25 +58,30 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = {
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetSizingType(NWST_STEP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA), SetSizingType(NWST_STEP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES), SetSizingType(NWST_STEP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA), SetSizingType(NWST_STEP),
EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
EndContainer(),
/* Vehicle list. */
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
EndContainer(),
EndContainer(),
/* Panel with details. */
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 1), EndContainer(),
EndContainer(),
/* Vehicle list. */
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
EndContainer(),
/* Panel with details. */
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
/* Build/rename buttons, resize button. */
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BV_BUILD_SEL),
@@ -1393,6 +1399,7 @@ struct BuildVehicleWindow : Window {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height;
d.height = GetMinSizing(NWST_STEP, d.height);
*size = maxdim(*size, d);
break;
}

View File

@@ -112,7 +112,7 @@ static void DrawTile_Clear(TileInfo *ti)
break;
case CLEAR_ROCKS:
DrawGroundSprite((TileHash(ti->x, ti->y) & 1 ? SPR_FLAT_ROCKY_LAND_2 : SPR_FLAT_ROCKY_LAND_1) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
DrawGroundSprite((HasGrfMiscBit(GMB_SECOND_ROCKY_TILE_SET) && (TileHash(ti->x, ti->y) & 1) ? SPR_FLAT_ROCKY_LAND_2 : SPR_FLAT_ROCKY_LAND_1) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
break;
case CLEAR_FIELDS:

View File

@@ -26,6 +26,8 @@
#include "signal_func.h"
#include "core/backup_type.hpp"
#include "object_base.h"
#include "string_func.h"
#include "tilehighlight_func.h"
#include "table/strings.h"

View File

@@ -45,7 +45,7 @@ struct CompanyInfrastructure {
}
};
typedef Pool<Company, CompanyByte, 1, MAX_COMPANIES> CompanyPool;
typedef Pool<Company, CompanyID, 1, MAX_COMPANIES> CompanyPool;
extern CompanyPool _company_pool;

View File

@@ -904,7 +904,10 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
Game::NewEvent(new ScriptEventCompanyBankrupt(c_index));
CompanyAdminRemove(c_index, (CompanyRemoveReason)reason);
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) {
InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
InvalidateWindowData(WC_MAIN_TOOLBAR_RIGHT, 0);
}
break;
}

View File

@@ -35,6 +35,7 @@
#include "road_func.h"
#include "water.h"
#include "station_func.h"
#include "widget_type.h"
#include "zoom_func.h"
#include "widgets/company_widget.h"
@@ -529,7 +530,7 @@ public:
uint Height(uint width) const
{
return max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2);
return GetMinSizing(NWST_STEP, max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2));
}
bool Selectable() const
@@ -930,102 +931,112 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = {
EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting.
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting.
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting.
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting.
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP),
EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
EndContainer(),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
@@ -1075,7 +1086,7 @@ class SelectCompanyManagerFaceWindow : public Window
/* Draw the value/bool in white (0xC). If the button clicked adds 1px to x and y text coordinates (IsWindowWidgetLowered()). */
DrawString(nwi_widget->pos_x + nwi_widget->IsLowered(), nwi_widget->pos_x + nwi_widget->current_x - 1 - nwi_widget->IsLowered(),
nwi_widget->pos_y + 1 + nwi_widget->IsLowered(), str, TC_WHITE, SA_HOR_CENTER);
Center(nwi_widget->pos_y + nwi_widget->IsLowered(), nwi_widget->current_y), str, TC_WHITE, SA_HOR_CENTER);
}
}
@@ -1125,6 +1136,10 @@ public:
Dimension yesno_dim = maxdim(GetStringBoundingBox(STR_FACE_YES), GetStringBoundingBox(STR_FACE_NO));
yesno_dim.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
yesno_dim.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
yesno_dim.width = GetMinSizing(NWST_STEP, yesno_dim.width);
yesno_dim.height = GetMinSizing(NWST_STEP, yesno_dim.height);
/* Size of the number button + arrows. */
Dimension number_dim = {0, 0};
for (int val = 1; val <= 12; val++) {
@@ -1268,12 +1283,12 @@ public:
case WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT:
case WID_SCMF_TIE_EARRING_TEXT: {
StringID str = PART_TEXTS_IS_FEMALE[(widget - WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT) * 2 + this->is_female];
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_GOLD, SA_RIGHT);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), str, TC_GOLD, SA_RIGHT);
break;
}
case WID_SCMF_LIPS_MOUSTACHE_TEXT:
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT);
break;
case WID_SCMF_HAS_GLASSES_TEXT:
@@ -1285,7 +1300,7 @@ public:
case WID_SCMF_CHIN_TEXT:
case WID_SCMF_JACKET_TEXT:
case WID_SCMF_COLLAR_TEXT:
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT);
break;
@@ -1764,7 +1779,8 @@ struct CompanyInfrastructureWindow : Window
if (this->railtypes != RAILTYPES_NONE) {
/* Draw name of each valid railtype. */
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
RailType rt;
FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) {
SetDParam(0, GetRailTypeInfo(rt)->strings.name);
DrawString(r.left + offs_left, r.right - offs_right, y += FONT_HEIGHT_NORMAL, STR_WHITE_STRING);
@@ -1781,7 +1797,8 @@ struct CompanyInfrastructureWindow : Window
case WID_CI_RAIL_COUNT: {
/* Draw infrastructure count for each valid railtype. */
uint32 rail_total = c->infrastructure.GetRailTotal();
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
RailType rt;
FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) {
this->DrawCountLine(r, y, c->infrastructure.rail[rt], RailMaintenanceCost(rt, c->infrastructure.rail[rt], rail_total));
}

View File

@@ -425,6 +425,20 @@ DEF_CONSOLE_CMD(ConListFiles)
return true;
}
/* Open the cheat window. */
DEF_CONSOLE_CMD(ConOpenCheats)
{
if (argc == 0) {
IConsoleHelp("Open the cheat window. Usage: 'open_cheats'");
return true;
}
extern void ShowCheatWindow();
ShowCheatWindow();
return true;
}
/* Change the dir via console */
DEF_CONSOLE_CMD(ConChangeDirectory)
{
@@ -1928,6 +1942,8 @@ void IConsoleStdLibRegister()
IConsoleCmdRegister("save", ConSave);
IConsoleCmdRegister("saveconfig", ConSaveConfig);
IConsoleCmdRegister("ls", ConListFiles);
IConsoleCmdRegister("open_cheats", ConOpenCheats);
IConsoleCmdRegister("cheats", ConOpenCheats);
IConsoleCmdRegister("cd", ConChangeDirectory);
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
IConsoleCmdRegister("clear", ConClearBuffer);

View File

@@ -22,6 +22,7 @@
#include "console_func.h"
#include "rev.h"
#include "video/video_driver.hpp"
#include "textbuf_gui.h"
#include "widgets/console_widget.h"
@@ -29,6 +30,10 @@
#include "safeguards.h"
#ifdef __ANDROID__
#include <SDL_screenkeyboard.h>
#endif
static const uint ICON_HISTORY_SIZE = 20;
static const uint ICON_LINE_SPACING = 2;
static const uint ICON_RIGHT_BORDERWIDTH = 10;
@@ -229,6 +234,16 @@ struct IConsoleWindow : Window
}
}
virtual void OnQueryTextFinished(char *str)
{
_focused_window = this;
if (str == NULL) return;
_iconsole_cmdline.Assign(str);
this->OnKeyPress(0, WKC_RETURN);
}
virtual void OnHundredthTick()
{
if (IConsoleLine::Truncate() &&
@@ -430,9 +445,25 @@ void IConsoleSwitch()
{
switch (_iconsole_mode) {
case ICONSOLE_CLOSED:
new IConsoleWindow();
#ifdef __ANDROID__
{
char buf[1024] = "";
for (const IConsoleLine *print = IConsoleLine::Get(0); print != NULL; print = print->previous) {
if (print->buffer && print->buffer[0]) {
strecat(buf, print->buffer, lastof(buf));
strecat(buf, "\n", lastof(buf));
}
}
strecat(buf, "\n\n\n\n\n\n\n\n", lastof(buf)); // Move all text to top
SDL_ANDROID_SetScreenKeyboardHintMesage(buf);
char text[512] = "";
SDL_ANDROID_GetScreenKeyboardTextInput(text, sizeof(text) - 1); /* Invoke Android built-in screen keyboard */
IConsoleCmdExec(text);
}
#else
new IConsoleWindow();
#endif
break;
case ICONSOLE_OPENED: case ICONSOLE_FULL:
DeleteWindowById(WC_CONSOLE, 0);
break;

View File

@@ -121,7 +121,7 @@ DEFINE_POOL_METHOD(inline void *)::AllocateItem(size_t size, size_t index)
item = (Titem *)MallocT<byte>(size);
}
this->data[index] = item;
item->index = (uint)index;
item->index = (Tindex)(uint)index;
return item;
}

View File

@@ -196,9 +196,9 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
# include <ft2build.h>
# include FT_FREETYPE_H
#endif /* WITH_FREETYPE */
#ifdef WITH_ICU
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
# include <unicode/uversion.h>
#endif /* WITH_ICU */
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
# include <lzma.h>
#endif
@@ -241,14 +241,19 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
buffer += seprintf(buffer, last, " FreeType: %d.%d.%d\n", major, minor, patch);
#endif /* WITH_FREETYPE */
#ifdef WITH_ICU
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
/* 4 times 0-255, separated by dots (.) and a trailing '\0' */
char buf[4 * 3 + 3 + 1];
UVersionInfo ver;
u_getVersion(ver);
u_versionToString(ver, buf);
buffer += seprintf(buffer, last, " ICU: %s\n", buf);
#endif /* WITH_ICU */
#ifdef WITH_ICU_SORT
buffer += seprintf(buffer, last, " ICU i18n: %s\n", buf);
#endif
#ifdef WITH_ICU_LAYOUT
buffer += seprintf(buffer, last, " ICU lx: %s\n", buf);
#endif
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
buffer += seprintf(buffer, last, " LZMA: %s\n", lzma_version_string());

View File

@@ -16,6 +16,9 @@
#include "string_func.h"
#include "fileio_func.h"
#include "settings_type.h"
#ifdef __ANDROID__
#include <android/log.h>
#endif
#include <time.h>
@@ -109,6 +112,9 @@ char *DumpDebugFacilityNames(char *buf, char *last)
*/
static void debug_print(const char *dbg, const char *buf)
{
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_INFO, "OpenTTD", "[%s] %s", dbg, buf);
#endif
#if defined(ENABLE_NETWORK)
if (_debug_socket != INVALID_SOCKET) {
char buf2[1024 + 32];

View File

@@ -62,8 +62,8 @@ static const NWidgetPart _nested_train_depot_widgets[] = {
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_D_SHOW_SELL_CHAIN),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_D_SELL_CHAIN), SetDataTip(SPR_SELL_CHAIN_TRAIN, STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP), SetResize(0, 1), SetFill(0, 1),
EndContainer(),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetDataTip(0x0, STR_NULL),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetDataTip(0x0, STR_NULL),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_D_V_SCROLL),
EndContainer(),
@@ -229,6 +229,7 @@ struct DepotWindow : Window {
VehicleID vehicle_over; ///< Rail vehicle over which another one is dragged, \c INVALID_VEHICLE if none.
VehicleType type;
bool generate_list;
int hovered_widget; ///< Index of the widget being hovered during drag/drop. -1 if no drag is in progress.
VehicleList vehicle_list;
VehicleList wagon_list;
uint unitnumber_digits;
@@ -243,6 +244,7 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE;
this->generate_list = true;
this->hovered_widget = -1;
this->type = type;
this->num_columns = 1; // for non-trains this gets set in FinishInitNested()
this->unitnumber_digits = 2;
@@ -297,7 +299,7 @@ struct DepotWindow : Window {
/* Length of consist in tiles with 1 fractional digit (rounded up) */
SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE));
SetDParam(1, 1);
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height, FONT_HEIGHT_SMALL), STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter
break;
}
@@ -307,26 +309,28 @@ struct DepotWindow : Window {
default: NOT_REACHED();
}
uint diff_x, diff_y;
uint diff_x, y_sprite, y_num;
if (v->IsGroundVehicle()) {
/* Arrange unitnumber and flag horizontally */
diff_x = this->flag_width + WD_FRAMERECT_LEFT;
diff_y = (this->resize.step_height - this->flag_height) / 2 - 2;
y_sprite = Center(y, this->resize.step_height, this->flag_height);
y_num = Center(y, this->resize.step_height);
} else {
/* Arrange unitnumber and flag vertically */
diff_x = WD_FRAMERECT_LEFT;
diff_y = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
y_num = Center(y, this->resize.step_height, FONT_HEIGHT_NORMAL + this->flag_height + 2);
y_sprite = y_num + FONT_HEIGHT_NORMAL;
}
int text_left = rtl ? right - this->header_width - 1 : left + diff_x;
int text_right = rtl ? right - diff_x : left + this->header_width - 1;
if (free_wagon) {
DrawString(text_left, text_right, y + 2, STR_DEPOT_NO_ENGINE);
DrawString(text_left, text_right, Center(y, this->resize.step_height), STR_DEPOT_NO_ENGINE);
} else {
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y + diff_y);
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y_sprite);
SetDParam(0, v->unitnumber);
DrawString(text_left, text_right, y + 2, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
DrawString(text_left, text_right, y_num, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
}
}
@@ -343,7 +347,7 @@ struct DepotWindow : Window {
uint16 num = this->vscroll->GetPosition() * this->num_columns;
int maxval = min(this->vehicle_list.Length(), num + (rows_in_display * this->num_columns));
int y;
for (y = r.top + 1; num < maxval; y += this->resize.step_height) { // Draw the rows
for (y = r.top; num < maxval; y += this->resize.step_height) { // Draw the rows
for (byte i = 0; i < this->num_columns && num < maxval; i++, num++) {
/* Draw all vehicles in the current row */
const Vehicle *v = this->vehicle_list[num];
@@ -625,6 +629,7 @@ struct DepotWindow : Window {
int base_width = this->count_width + this->header_width;
resize->height = max<uint>(GetVehicleImageCellSize(this->type, EIT_IN_DEPOT).height, min_height);
resize->height = GetMinSizing(NWST_STEP, resize->height);
if (this->type == VEH_TRAIN) {
resize->width = 1;
size->width = base_width + 2 * ScaleGUITrad(29); // about 2 parts
@@ -867,11 +872,29 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE;
this->SetWidgetDirty(WID_D_MATRIX);
if (this->hovered_widget != -1) {
this->SetWidgetLoweredState(this->hovered_widget, false);
this->SetWidgetDirty(this->hovered_widget);
this->hovered_widget = -1;
}
}
virtual void OnMouseDrag(Point pt, int widget)
{
if (this->type != VEH_TRAIN || this->sel == INVALID_VEHICLE) return;
if (this->sel == INVALID_VEHICLE) return;
if (widget != this->hovered_widget) {
if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
this->SetWidgetLoweredState(this->hovered_widget, false);
this->SetWidgetDirty(this->hovered_widget);
}
this->hovered_widget = widget;
if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
this->SetWidgetLoweredState(this->hovered_widget, true);
this->SetWidgetDirty(this->hovered_widget);
}
}
if (this->type != VEH_TRAIN) return;
/* A rail vehicle is dragged.. */
if (widget != WID_D_MATRIX) { // ..outside of the depot matrix.
@@ -958,7 +981,9 @@ struct DepotWindow : Window {
default:
this->sel = INVALID_VEHICLE;
this->SetDirty();
break;
}
this->hovered_widget = -1;
_cursor.vehchain = false;
}

View File

@@ -61,11 +61,11 @@ static inline Direction ReverseDir(Direction d)
/**
* Calculate the difference between to directions
* Calculate the difference between two directions
*
* @param d0 The first direction as the base
* @param d1 The second direction as the offset from the base
* @return The difference how the second directions drifts of the first one.
* @return The difference how the second direction drifts of the first one.
*/
static inline DirDiff DirDifference(Direction d0, Direction d1)
{
@@ -79,7 +79,7 @@ static inline DirDiff DirDifference(Direction d0, Direction d1)
/**
* Applies two differences together
*
* This function adds two differences together and return the resulting
* This function adds two differences together and returns the resulting
* difference. So adding two DIRDIFF_REVERSE together results in the
* DIRDIFF_SAME difference.
*
@@ -123,6 +123,20 @@ static inline DiagDirection ReverseDiagDir(DiagDirection d)
return (DiagDirection)(2 ^ d);
}
/**
* Calculate the difference between two DiagDirection values
*
* @param d0 The first direction as the base
* @param d1 The second direction as the offset from the base
* @return The difference how the second direction drifts of the first one.
*/
static inline DiagDirDiff DiagDirDifference(DiagDirection d0, DiagDirection d1)
{
assert(IsValidDiagDirection(d0));
assert(IsValidDiagDirection(d1));
/* Cast to uint so compiler can use bitmask. Result can never be negative. */
return (DiagDirDiff)((uint)(d0 - d1) % 4);
}
/**
* Applies a difference on a DiagDirection

View File

@@ -105,6 +105,7 @@ struct BuildDocksToolbarWindow : Window {
~BuildDocksToolbarWindow()
{
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
}
@@ -146,7 +147,7 @@ struct BuildDocksToolbarWindow : Window {
case WID_DT_DEPOT: // Build depot button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT | HT_SCROLL_VIEWPORT)) ShowBuildDocksDepotPicker(this);
break;
case WID_DT_STATION: // Build station button
@@ -156,7 +157,7 @@ struct BuildDocksToolbarWindow : Window {
case WID_DT_BUOY: // Build buoy button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT);
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT | HT_SCROLL_VIEWPORT);
break;
case WID_DT_RIVER: // Build river button (in scenario editor)
@@ -181,33 +182,21 @@ struct BuildDocksToolbarWindow : Window {
break;
case WID_DT_LOCK: // Build lock button
DoCommandP(tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
/* Reuse DDSP_REMOVE_TRUCKSTOP. */
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_REMOVE_TRUCKSTOP);
break;
case WID_DT_DEMOLISH: // Demolish aka dynamite button
PlaceProc_DemolishArea(tile);
break;
case WID_DT_STATION: // Build station button
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION);
break;
case WID_DT_DEPOT: // Build depot button
DoCommandP(tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
break;
case WID_DT_STATION: { // Build station button
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
/* tile is always the land tile, so need to evaluate _thd.pos */
CommandContainer cmdcont = { tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
/* Determine the watery part of the dock. */
DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile));
TileIndex tile_to = (dir != INVALID_DIAGDIR ? TileAddByDiagDir(tile, ReverseDiagDir(dir)) : tile);
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, tile_to));
break;
}
case WID_DT_BUOY: // Build buoy button
DoCommandP(tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_SINGLE_TILE);
break;
case WID_DT_RIVER: // Build river button (in scenario editor)
@@ -215,16 +204,26 @@ struct BuildDocksToolbarWindow : Window {
break;
case WID_DT_BUILD_AQUEDUCT: // Build aqueduct button
DoCommandP(tile, GetOtherAqueductEnd(tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_BRIDGE);
break;
default: NOT_REACHED();
}
MoveAllWindowsOffScreen();
}
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
{
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
switch (last_clicked_widget) {
case WID_DT_BUILD_AQUEDUCT:
case WID_DT_LOCK:
case WID_DT_STATION:
this->OnPlacePresize(pt, TileVirtXY(pt.x, pt.y));
break;
default:
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
break;
}
}
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
@@ -240,14 +239,52 @@ struct BuildDocksToolbarWindow : Window {
case DDSP_CREATE_RIVER:
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcBuildCanal);
break;
case DDSP_BUILD_STATION: {
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
/* Tile is always the land tile, so need to evaluate _thd.pos. */
CommandContainer cmdcont = { start_tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
//SetObjectToPlace(SPR_CURSOR_DOCK, PAL_NONE, HT_SPECIAL, this->window_class, this->window_number);
ShowSelectStationIfNeeded(cmdcont, TileArea(start_tile, end_tile));
VpStartPreSizing();
break;
}
case DDSP_BUILD_BRIDGE:
DoCommandP(start_tile, GetOtherAqueductEnd(start_tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
VpStartPreSizing();
break;
case DDSP_REMOVE_TRUCKSTOP: { // Reusing for locks.
TileIndex middle_tile = start_tile;
if (start_tile != end_tile) middle_tile = TileAddByDiagDir(start_tile, DiagdirBetweenTiles(start_tile, end_tile));
DoCommandP(middle_tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
VpStartPreSizing();
break;
}
case DDSP_SINGLE_TILE:
assert(start_tile == end_tile);
switch (last_clicked_widget) {
case WID_DT_BUOY:
DoCommandP(end_tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
break;
case WID_DT_DEPOT: // Build depot button
DoCommandP(end_tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
break;
default: NOT_REACHED();
}
default: break;
}
MoveAllHiddenWindowsBackToScreen();
}
}
virtual void OnPlaceObjectAbort()
{
MoveAllHiddenWindowsBackToScreen();
this->RaiseButtons();
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
@@ -256,8 +293,19 @@ struct BuildDocksToolbarWindow : Window {
DeleteWindowByClass(WC_BUILD_BRIDGE);
}
virtual void SelectLastTool()
{
// User misplaced something - activate last selected tool again
if (this->last_clicked_widget == WIDGET_LIST_END)
return;
Point dummy = {0, 0};
this->RaiseWidget(this->last_clicked_widget);
this->OnClick(dummy, this->last_clicked_widget, 0);
}
virtual void OnPlacePresize(Point pt, TileIndex tile_from)
{
if (!IsValidTile(tile_from)) return;
TileIndex tile_to = tile_from;
if (this->last_clicked_widget == WID_DT_BUILD_AQUEDUCT) {
@@ -347,7 +395,7 @@ Window *ShowBuildDocksToolbar()
{
if (!Company::IsValidID(_local_company)) return NULL;
DeleteWindowByClass(WC_BUILD_TOOLBAR);
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
}
@@ -373,7 +421,7 @@ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
/** Window definition for the build docks in scenario editor window. */
static WindowDesc _build_docks_scen_toolbar_desc(
WDP_AUTO, "toolbar_water_scen", 0, 0,
WDP_ALIGN_TOOLBAR, "toolbar_water_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION,
_nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)
@@ -386,6 +434,7 @@ static WindowDesc _build_docks_scen_toolbar_desc(
*/
Window *ShowBuildDocksScenToolbar()
{
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
}
@@ -556,10 +605,10 @@ static const NWidgetPart _nested_build_docks_depot_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 3),
NWidget(NWID_HORIZONTAL_LTR),
NWidget(NWID_SPACER), SetMinimalSize(3, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(2, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(3, 0),
EndContainer(),

View File

@@ -300,7 +300,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
/* Single player cheated to AI company.
* There are no spectators in single player, so we must pick some other company. */
assert(!_networking);
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
Backup<CompanyByte> cur_company2(_current_company, FILE_LINE);
Company *c;
FOR_ALL_COMPANIES(c) {
if (c->index != old_owner) {
@@ -308,7 +308,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
break;
}
}
cur_company.Restore();
cur_company2.Restore();
assert(old_owner != _local_company);
}
@@ -431,11 +431,38 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
FreeUnitIDGenerator(VEH_SHIP, new_owner), FreeUnitIDGenerator(VEH_AIRCRAFT, new_owner)
};
/* Override company settings to new company defaults in case we need to convert them.
* This is required as the CmdChangeServiceInt doesn't copy the supplied value when it is non-custom
*/
if (new_owner != INVALID_OWNER) {
Company *old_company = Company::Get(old_owner);
Company *new_company = Company::Get(new_owner);
old_company->settings.vehicle.servint_aircraft = new_company->settings.vehicle.servint_aircraft;
old_company->settings.vehicle.servint_trains = new_company->settings.vehicle.servint_trains;
old_company->settings.vehicle.servint_roadveh = new_company->settings.vehicle.servint_roadveh;
old_company->settings.vehicle.servint_ships = new_company->settings.vehicle.servint_ships;
old_company->settings.vehicle.servint_ispercent = new_company->settings.vehicle.servint_ispercent;
}
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) {
assert(new_owner != INVALID_OWNER);
/* Correct default values of interval settings while maintaining custom set ones.
* This prevents invalid values on mismatching company defaults being accepted.
*/
if (!v->ServiceIntervalIsCustom()) {
Company *new_company = Company::Get(new_owner);
/* Technically, passing the interval is not needed as the command will query the default value itself.
* However, do not rely on that behaviour.
*/
int interval = CompanyServiceInterval(new_company, v->type);
DoCommand(v->tile, v->index, interval | (new_company->settings.vehicle.servint_ispercent << 17), DC_EXEC | DC_BANKRUPT, CMD_CHANGE_SERVICE_INT);
}
v->owner = new_owner;
/* Owner changes, clear cache */
@@ -1624,7 +1651,9 @@ static void LoadUnloadVehicle(Vehicle *front)
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, load_amount) : cargo_count;
bool remaining = false; // Are there cargo entities in this vehicle that can still be unloaded here?
payment->SetCargo(v->cargo_type);
if (payment != NULL) {
payment->SetCargo(v->cargo_type);
}
if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
/* The station does not accept our goods anymore. */
@@ -1663,7 +1692,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;

View File

@@ -182,21 +182,30 @@ public:
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
if (widget != WID_EM_MESSAGE) return;
switch (widget) {
case WID_EM_MESSAGE: {
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
this->height_summary = GetStringHeight(this->summary_msg, text_width);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
this->height_summary = GetStringHeight(this->summary_msg, text_width);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
if (this->textref_stack_size > 0) StopTextRefStackUsage();
if (this->textref_stack_size > 0) StopTextRefStackUsage();
uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM;
if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM;
if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
size->height = max(size->height, panel_height);
size->height = max(size->height, panel_height);
break;
}
case WID_EM_FACE: {
Dimension face_size = GetSpriteSize(SPR_GRADIENT);
size->width = max(size->width, face_size.width);
size->height = max(size->height, face_size.height);
break;
}
}
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)

View File

@@ -292,7 +292,11 @@ static const char * const _subdirs[] = {
"ai" PATHSEP "library" PATHSEP,
"game" PATHSEP,
"game" PATHSEP "library" PATHSEP,
#ifdef __ANDROID__
"screenshot" PATHSEP,
#else
"screenshot" PATHSEP,
#endif
};
assert_compile(lengthof(_subdirs) == NUM_SUBDIRS);
@@ -1315,6 +1319,21 @@ void DeterminePaths(const char *exe)
_searchpaths[SP_AUTODOWNLOAD_DIR] = NULL;
}
#endif /* ENABLE_NETWORK */
#ifdef __ANDROID__
// Copy savegames from "full" OpenTTD to "lite" save directory
char curdir[PATH_MAX];
if (getcwd(curdir, sizeof(curdir)) && strstr(curdir, "org.openttd.sdl.lowmem")) {
// No, I won't implement file copying in C, shell script is just fine for this job
DEBUG(misc, 1, "Copying savegames from ../../org.openttd.sdl/files/.openttd/save to %s", curdir);
system("cd ../../org.openttd.sdl/files/.openttd/save && "
"for F in *.sav ; do "
"ls \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" || "
"cat \"$F\" > \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" ; "
"done");
chdir(curdir);
}
#endif
}
/**

View File

@@ -35,12 +35,16 @@
#include "table/strings.h"
#include "safeguards.h"
#ifdef __ANDROID__
#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;
static bool _savegame_sort_dirty;
static const char *NETWORK_SAVE_FILENAME = "network-save.sav";
/**
@@ -107,6 +111,9 @@ static const NWidgetPart _nested_load_dialog_widgets[] = {
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_NEWGRF_INFO), SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_NULL), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_NETWORK_BUTTON, STR_SAVELOAD_LOAD_NETWORK_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
EndContainer(),
@@ -180,7 +187,7 @@ static const NWidgetPart _nested_save_dialog_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetResize(1, 0), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SL_SAVE_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_SAVE_NETWORK_BUTTON, STR_SAVELOAD_SAVE_NETWORK_TOOLTIP), SetFill(1, 1), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
EndContainer(),
@@ -282,6 +289,7 @@ public:
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);
/* pause is only used in single-player, non-editor mode, non-menu mode. It
* will be unpaused in the WE_DESTROY event handler. */
@@ -366,7 +374,7 @@ public:
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, y, 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[item->type]);
y += this->resize.step_height;
if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
}
@@ -477,8 +485,8 @@ public:
break;
case WID_SL_DRIVES_DIRECTORIES_LIST:
resize->height = FONT_HEIGHT_NORMAL;
size->height = resize->height * 10 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL);
size->height = resize->height * 5 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
break;
case WID_SL_SORT_BYNAME:
case WID_SL_SORT_BYDATE: {
@@ -624,6 +632,32 @@ public:
/* Note, this is also called via the OSK; and we need to lower the button. */
this->HandleButtonClick(WID_SL_SAVE_GAME);
break;
case WID_SL_SAVE_NETWORK_BUTTON:
_settings_client.gui.save_to_network = !_settings_client.gui.save_to_network;
this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
this->SetDirty();
break;
case WID_SL_LOAD_NETWORK_BUTTON: {
char savePath[PATH_MAX];
FiosMakeSavegameName(savePath, NETWORK_SAVE_FILENAME, lastof(savePath));
#ifdef __ANDROID__
if (!SDL_ANDROID_CloudLoad(savePath, NULL, "OpenTTD")) {
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;
}
}
break;
}
}
}

View File

@@ -383,7 +383,7 @@ static void LoadFreeTypeFont(FontSize fs)
return;
found_face:
new FreeTypeFontCache(fs, face, settings->size);
new FreeTypeFontCache(fs, face, RescaleFrom854x480(settings->size));
}
@@ -460,7 +460,7 @@ static void *AllocateFont(size_t size)
static bool GetFontAAState(FontSize size)
{
/* AA is only supported for 32 bpp */
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32 && BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 16) return false;
switch (size) {
default: NOT_REACHED();

View File

@@ -632,7 +632,8 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (split != NULL) *split = '\0';
/* First create a pattern to match the wanted language. */
FcPattern *pat = FcNameParse((FcChar8*)lang);
//FcPattern *pat = FcNameParse((FcChar8*)lang);
FcPattern *pat = FcPatternCreate();
/* We only want to know the filename. */
FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SPACING, FC_SLANT, FC_WEIGHT, NULL);
/* Get the list of filenames matching the wanted language. */
@@ -645,6 +646,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (fs != NULL) {
int best_weight = -1;
const char *best_font = NULL;
int best_missing_glypths = 65536;
for (int i = 0; i < fs->nfont; i++) {
FcPattern *font = fs->fonts[i];
@@ -654,28 +656,32 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (res != FcResultMatch || file == NULL) {
continue;
}
DEBUG(freetype, 1, "Got font %s", file);
int missing = 0;
/* Get a font with the right spacing .*/
int value = 0;
FcPatternGetInteger(font, FC_SPACING, 0, &value);
if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) continue;
if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) missing += 1;
/* Do not use those that explicitly say they're slanted. */
FcPatternGetInteger(font, FC_SLANT, 0, &value);
if (value != 0) continue;
if (value != 0) missing += 1;
/* We want the fatter font as they look better at small sizes. */
FcPatternGetInteger(font, FC_WEIGHT, 0, &value);
if (value <= best_weight) continue;
if (value <= best_weight) missing += 1;
callback->SetFontNames(settings, (const char*)file);
bool missing = callback->FindMissingGlyphs(NULL);
DEBUG(freetype, 1, "Font \"%s\" misses%s glyphs", file, missing ? "" : " no");
missing = callback->FindMissingGlyphs(NULL);
DEBUG(freetype, 1, "Font \"%s\" misses %d glyphs for lang %s", file, missing, lang);
if (!missing) {
if (missing < best_missing_glypths) {
best_weight = value;
best_font = (const char *)file;
best_missing_glypths = missing;
if (missing == 0) break;
}
}
@@ -683,6 +689,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
ret = true;
callback->SetFontNames(settings, best_font);
InitFreeType(callback->Monospace());
DEBUG(freetype, 1, "Selected font %s for lang %s", best_font, lang);
}
/* Clean up the list of filenames. */

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.5") == 0 || strcmp(api_version, "1.6") == 0;
}
#if defined(WIN32)

View File

@@ -32,6 +32,17 @@ enum GenWorldMode {
GWM_HEIGHTMAP = 3, ///< Generate a newgame from a heightmap
};
/** Smoothness presets. */
enum TgenSmoothness {
TGEN_SMOOTHNESS_BEGIN, ///< First smoothness value.
TGEN_SMOOTHNESS_VERY_SMOOTH = TGEN_SMOOTHNESS_BEGIN, ///< Smoothness preset 'very smooth'.
TGEN_SMOOTHNESS_SMOOTH, ///< Smoothness preset 'smooth'.
TGEN_SMOOTHNESS_ROUGH, ///< Smoothness preset 'rough'.
TGEN_SMOOTHNESS_VERY_ROUGH, ///< Smoothness preset 'very rough'.
TGEN_SMOOTHNESS_END, ///< Used to iterate.
};
static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY = 4; ///< Value for custom sea level in difficulty settings.
static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentage a user can specify for custom sea level.
static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level.

View File

@@ -28,6 +28,7 @@
#include "core/random_func.hpp"
#include "progress.h"
#include "error.h"
#include "settings_gui.h"
#include "widgets/genworld_widget.h"
@@ -62,20 +63,20 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN),
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
/* Landscape selection. */
NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 10),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 11),
NWidget(NWID_HORIZONTAL), SetPIP(10, 5, 10),
/* Landscape selection. */
NWidget(NWID_VERTICAL), SetPIP(10, 0, 10),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(20, 0),
NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0),
/* Left column with labels. */
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
@@ -168,7 +169,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 9), SetFill(1, 1),
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
EndContainer(),
};
@@ -403,10 +404,10 @@ struct GenerateLandscapeWindow : public Window {
/* You can't select smoothness / non-water borders if not terragenesis */
if (mode == GLWM_GENERATE) {
this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL);
this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL);
this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges);
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
WID_GL_WATER_NW, WID_GL_WATER_NE, WID_GL_WATER_SE, WID_GL_WATER_SW, WIDGET_LIST_END);
this->SetWidgetLoweredState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM);
@@ -416,7 +417,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetLoweredState(WID_GL_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
this->SetWidgetLoweredState(WID_GL_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC),
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC),
WID_GL_TERRAIN_PULLDOWN, WID_GL_WATER_PULLDOWN, WIDGET_LIST_END);
}
@@ -432,7 +433,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetDisabledState(WID_GL_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC);
/* Do not allow a custom sea level with the original land generator. */
if (_settings_newgame.game_creation.land_generator == 0 &&
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL &&
_settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) {
_settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE;
}
@@ -457,6 +458,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_MAPSIZE_Y_PULLDOWN:
SetDParamMaxValue(0, MAX_MAP_SIZE);
*size = maxdim(*size, GetStringBoundingBox(STR_JUST_INT));
size->width = size->width + GetMinSizing(NWST_BUTTON);
break;
case WID_GL_SNOW_LEVEL_TEXT:
@@ -467,7 +469,8 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_HEIGHTMAP_SIZE_TEXT:
SetDParam(0, this->x);
SetDParam(1, this->y);
*size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE));
//*size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE));
size->height = SETTING_BUTTON_HEIGHT;
break;
case WID_GL_TOWN_PULLDOWN:
@@ -491,18 +494,19 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_VARIETY_PULLDOWN: strs = _variety; break;
case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: strs = _rotation; break;
case WID_GL_BORDERS_RANDOM:
*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL));
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL));
break;
case WID_GL_WATER_NE:
case WID_GL_WATER_NW:
case WID_GL_WATER_SE:
case WID_GL_WATER_SW:
*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM)));
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM)));
break;
case WID_GL_HEIGHTMAP_NAME_TEXT:
size->width = 0;
size->height = SETTING_BUTTON_HEIGHT;
break;
default:
@@ -655,7 +659,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_WATER_PULLDOWN: { // Water quantity
uint32 hidden_mask = 0;
/* Disable custom water level when the original map generator is active. */
if (_settings_newgame.game_creation.land_generator == 0) {
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL) {
SetBit(hidden_mask, CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY);
}
ShowDropDownMenu(this, _sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask);
@@ -946,7 +950,9 @@ struct CreateScenarioWindow : public Window
}
*size = maxdim(*size, GetStringBoundingBox(str));
size->width += padding.width;
size->width = GetMinSizing(NWST_BUTTON, size->width);
size->height += padding.height;
size->height = GetMinSizing(NWST_BUTTON, size->height);
}
virtual void OnClick(Point pt, int widget, int click_count)
@@ -1065,11 +1071,16 @@ static const NWidgetPart _nested_create_scenario_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
/* Landscape style selection. */
NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
NWidget(NWID_HORIZONTAL), SetPIP(10, 8, 10),
/* Green generation type buttons: 'Flat land' and 'Random land'. */
NWidget(NWID_VERTICAL), SetPIP(10, 6, 10),

View File

@@ -23,6 +23,7 @@
#include "newgrf_debug.h"
#include "table/palettes.h"
#include "table/string_colours.h"
#include "table/sprites.h"
#include "table/control_codes.h"
@@ -34,11 +35,15 @@ byte _support8bpp;
CursorVars _cursor;
bool _ctrl_pressed; ///< Is Ctrl pressed?
bool _shift_pressed; ///< Is Shift pressed?
bool _move_pressed;
byte _fast_forward;
bool _left_button_down; ///< Is left mouse button pressed?
bool _left_button_clicked; ///< Is left mouse button clicked?
bool _right_button_down; ///< Is right mouse button pressed?
bool _right_button_clicked; ///< Is right mouse button clicked?
Point _right_button_down_pos; ///< Pos of right mouse button click, for drag and drop
DrawPixelInfo _screen;
bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
bool _exit_game;
@@ -175,40 +180,35 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int
assert(width > 0);
if (y2 == y) {
/* Special case: horizontal line. */
blitter->DrawLine(video,
Clamp(x, 0, screen_width), y,
Clamp(x2, 0, screen_width), y2,
screen_width, screen_height, colour, width, dash);
return;
}
if (x2 == x) {
/* Special case: vertical line. */
blitter->DrawLine(video,
x, Clamp(y, 0, screen_height),
x2, Clamp(y2, 0, screen_height),
screen_width, screen_height, colour, width, dash);
if (y2 == y || x2 == x) {
/* Special case: horizontal/vertical line. All checks already done in GfxPreprocessLine. */
blitter->DrawLine(video, x, y, x2, y2, screen_width, screen_height, colour, width, dash);
return;
}
int grade_y = y2 - y;
int grade_x = x2 - x;
/* Clipping rectangle. Slightly extended so we can ignore the width of the line. */
int extra = (int)CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra };
/* prevent integer overflows. */
int margin = 1;
while (INT_MAX / abs(grade_y) < max(abs(x), abs(screen_width - x))) {
while (INT_MAX / abs(grade_y) < max(abs(clip.left - x), abs(clip.right - x))) {
grade_y /= 2;
grade_x /= 2;
margin *= 2; // account for rounding errors
}
/* If the line is outside the screen on the same side at X positions 0
* and screen_width, we don't need to draw anything. */
int offset_0 = y - x * grade_y / grade_x;
int offset_width = y + (screen_width - x) * grade_y / grade_x;
if ((offset_0 > screen_height + width / 2 + margin && offset_width > screen_height + width / 2 + margin) ||
(offset_0 < -width / 2 - margin && offset_width < -width / 2 - margin)) {
/* Imagine that the line is infinitely long and it intersects with
* infinitely long left and right edges of the clipping rectangle.
* If both intersection points are outside the clipping rectangle
* and both on the same side of it, we don't need to draw anything. */
int left_isec_y = y + (clip.left - x) * grade_y / grade_x;
int right_isec_y = y + (clip.right - x) * grade_y / grade_x;
if ((left_isec_y > clip.bottom + margin && right_isec_y > clip.bottom + margin) ||
(left_isec_y < clip.top - margin && right_isec_y < clip.top - margin)) {
return;
}
@@ -590,7 +590,7 @@ int GetStringLineCount(StringID str, int maxw)
*/
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
{
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}
@@ -602,7 +602,7 @@ Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestio
*/
Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
{
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}
@@ -852,6 +852,50 @@ void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub,
}
}
/**
* Draw a sprite, centered at x:y, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param x Left coordinate of image in pixels
* @param y Top coordinate of image in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, ZoomLevel zoom)
{
Dimension size = GetSpriteSize(img, NULL, zoom);
DrawSprite(img, pal, x - size.width / 2, y - size.height / 2, sub, zoom);
}
/**
* Draw a sprite, centered in rect, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param left Left coordinate of image bounding box in pixels
* @param top Top coordinate of image bounding box in pixels
* @param right Right coordinate of image bounding box in pixels
* @param bottom Bottom coordinate of image bounding box in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub, ZoomLevel zoom)
{
DrawSpriteCentered(img, pal, (left + right) / 2, (top + bottom) / 2, sub, zoom);
}
/**
* Draw a sprite, centered in rect, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param rect Image bounding box in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &rect, const SubSprite *sub, ZoomLevel zoom)
{
DrawSpriteCenteredRect(img, pal, rect.left, rect.top, rect.right, rect.bottom, sub, zoom);
}
/**
* The code for setting up the blitter mode and sprite information before finally drawing the sprite.
* @param sprite The sprite to draw.
@@ -1201,6 +1245,8 @@ void ScreenSizeChanged()
/* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */
_cursor.visible = false;
CheckWindowMinSizings();
}
void UndrawMouseCursor()
@@ -1218,11 +1264,6 @@ void UndrawMouseCursor()
void DrawMouseCursor()
{
#if defined(WINCE)
/* Don't ever draw the mouse for WinCE, as we work with a stylus */
return;
#endif
/* Don't draw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == NULL) return;
@@ -1678,3 +1719,104 @@ void SortResolutions(int count)
{
QSortT(_resolutions, count, &compare_res);
}
/**
* Returns the initial value for a margin, after telling where are the left and right margins and where we want to draw/write (begining/end of line)
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
* @return the margin we asked
*/
int InitTempMargin(int left, int right, bool to_end_line)
{
return to_end_line ^ (_current_text_dir == TD_RTL) ? right :left;
}
/**
* Consumes a space in an horizontal margin
* @param space: amount of space used
* @param here: the margin where to add the space
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void AddSpace(int space, int &here, bool to_end_line)
{
here += to_end_line ^ (_current_text_dir == TD_RTL) ? -space : space;
}
/**
* After drawing something, update a margin
* @param end is where we ended drawing (usually the return value of a DrawString function)
* @param margin is the margin we want to update
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginEnd(int end, int &margin, bool to_end_line)
{
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(end, margin) : max(end, margin);
}
/**
* After drawing something, horizontal margins are updated
* @param end: last position drawn
* @param left is the left margin of the horizontal space drawn
* @param right: right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line)
{
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
right = end;
} else {
left = end;
}
}
/**
* After drawing something of a certain width, update margins
* @param width: used space
* @param initial left margin
* @param initial right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line)
{
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
right -= width;
} else {
left += width;
}
}
/**
* Draws a string in a delimited space; temporal margin gets updated
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin of the horizontal space we want to draw to
* @param top: vertical position
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
* @param string to draw
* @param colour for the string
* @param alignment of the string (only left or right alignment)
* @param underline
*/
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour, StringAlignment align, bool underline)
{
int end = DrawString(left, right, top, str, colour, align, underline);
UpdateMarginEnd(end, margin, align == SA_RIGHT);
}
/**
* Draws a sprite in a delimited space; temporal margin gets updated
* @param width of the sprite
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin of the horizontal space
* @param top: vertical position
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
* @param sprite
* @param palette
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line, SubSprite *sub)
{
DrawSprite(img, pal, to_end_line ^ (_current_text_dir == TD_RTL) ? right - width : left, top, sub);
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(right - width, margin): max(margin, left + width);
}

View File

@@ -45,6 +45,7 @@
#include "gfx_type.h"
#include "strings_type.h"
#include "string_type.h"
#include "core/math_func.hpp"
void GameLoop();
@@ -56,12 +57,15 @@ extern byte _support8bpp;
extern CursorVars _cursor;
extern bool _ctrl_pressed; ///< Is Ctrl pressed?
extern bool _shift_pressed; ///< Is Shift pressed?
extern bool _move_pressed;
extern byte _fast_forward;
extern bool _left_button_down;
extern bool _left_button_clicked;
extern bool _right_button_down;
extern bool _right_button_clicked;
extern Point _right_button_down_pos;
extern DrawPixelInfo _screen;
extern bool _screen_disable_anim; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
@@ -92,6 +96,9 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo);
Dimension GetSpriteSize(SpriteID sprid, Point *offset = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL);
void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &r, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
/** How to align the to-be drawn text. */
enum StringAlignment {
@@ -172,6 +179,39 @@ int GetCharacterHeight(FontSize size);
/** Height of characters in the large (#FS_MONO) font. */
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
int InitTempMargin(int left, int right, bool to_end_line);
void AddSpace(int space, int &here, bool to_end_line);
void UpdateMarginEnd(int end, int &margin, bool to_end_line);
void UpdateMarginWidth(int adding, int &margin, bool to_end_line);
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line);
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line);
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line = false, SubSprite *sub = NULL);
/**
* Return where to start drawing a centered object inside a widget.
* @param top The top coordinate (or the left coordinate) of the widget.
* @param height The height (or width) of the widget.
* @param size The height (or width) of the object to draw.
* @return The coordinate where to start drawing the centered object.
*/
static inline int Center(int top, int height, uint size = FONT_HEIGHT_NORMAL)
{
return top + (height - size) / 2;
}
/**
* Returns fint/button size, rescaled to current screen resolution from the base Android resolution, which is 854x480
* @param value The value to rescale
* @return Rescaled value, using lesser of the curret screen coordinates
*/
static inline int RescaleFrom854x480(int value)
{
return min(value * _cur_resolution.width / 854, value * _cur_resolution.height / 480);
}
extern DrawPixelInfo *_cur_dpi;
TextColour GetContrastColour(uint8 background);

View File

@@ -17,9 +17,9 @@
#include "table/control_codes.h"
#ifdef WITH_ICU
#ifdef WITH_ICU_LAYOUT
#include <unicode/ustring.h>
#endif /* WITH_ICU */
#endif /* WITH_ICU_LAYOUT */
#include "safeguards.h"
@@ -42,7 +42,7 @@ Font::Font(FontSize size, TextColour colour) :
assert(size < FS_END);
}
#ifdef WITH_ICU
#ifdef WITH_ICU_LAYOUT
/* Implementation details of LEFontInstance */
le_int32 Font::getUnitsPerEM() const
@@ -213,7 +213,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
return new ICUParagraphLayout(p);
}
#endif /* WITH_ICU */
#endif /* WITH_ICU_LAYOUT */
/*** Paragraph layout ***/
/**
@@ -654,7 +654,7 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
line.layout->Reflow();
} else {
/* Line is new, layout it */
#ifdef WITH_ICU
#ifdef WITH_ICU_LAYOUT
FontState old_state = state;
const char *old_str = str;

View File

@@ -19,12 +19,12 @@
#include <map>
#include <string>
#ifdef WITH_ICU
#ifdef WITH_ICU_LAYOUT
#include "layout/ParagraphLayout.h"
#define ICU_FONTINSTANCE : public LEFontInstance
#else /* WITH_ICU */
#else /* WITH_ICU_LAYOUT */
#define ICU_FONTINSTANCE
#endif /* WITH_ICU */
#endif /* WITH_ICU_LAYOUT */
/**
* Text drawing parameters, which can change while drawing a line, but are kept between multiple parts
@@ -75,7 +75,7 @@ public:
Font(FontSize size, TextColour colour);
#ifdef WITH_ICU
#ifdef WITH_ICU_LAYOUT
/* Implementation details of LEFontInstance */
le_int32 getUnitsPerEM() const;
@@ -91,7 +91,7 @@ public:
LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;
void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
#endif /* WITH_ICU */
#endif /* WITH_ICU_LAYOUT */
};
/** Mapping from index to font. */

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