Compare commits
582 Commits
upstream-1
...
1.6.0.55
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
481cecf6aa | ||
|
|
e3ea0025c5 | ||
|
|
584d7f3136 | ||
|
|
1f4570c14b | ||
|
|
8ec3f4462a | ||
|
|
174b07f266 | ||
|
|
0917c225d8 | ||
|
|
05d1643d26 | ||
|
|
686321deff | ||
|
|
bcec5edab9 | ||
|
|
eba99834e0 | ||
|
|
712ebb3287 | ||
|
|
17abfa33d0 | ||
|
|
4cba4d08aa | ||
|
|
de9d011a01 | ||
|
|
fe24037905 | ||
|
|
0b931d9383 | ||
|
|
4310dc186b | ||
|
|
0452c60ac1 | ||
|
|
ca668e7c99 | ||
|
|
02fc2201bc | ||
|
|
8787230f82 | ||
|
|
510548f381 | ||
|
|
e1d12868f7 | ||
|
|
19bfa2317c | ||
|
|
a7a8e35968 | ||
|
|
a474c233e0 | ||
|
|
6fcdd5c43f | ||
|
|
b0441047aa | ||
|
|
00dc8319eb | ||
|
|
b4b6e07057 | ||
|
|
5bbb64885a | ||
|
|
844cb32a88 | ||
|
|
8b686b812d | ||
|
|
bcacd626ef | ||
|
|
026bd48e91 | ||
|
|
03fa2b7487 | ||
|
|
b74200f58f | ||
|
|
5e54f92241 | ||
|
|
5d77a7ff22 | ||
|
|
4c30d8e5a4 | ||
|
|
5a6f11361d | ||
|
|
2b5d1be8e7 | ||
|
|
ab5c174602 | ||
|
|
0ad6eba1b6 | ||
|
|
04cecd2f9a | ||
|
|
e7bc77d4b4 | ||
|
|
eec71a5e62 | ||
|
|
29e1314e97 | ||
|
|
74c1382675 | ||
|
|
b07ae4fa74 | ||
|
|
3a12f56a62 | ||
|
|
cfef9c8f29 | ||
|
|
16f249f025 | ||
|
|
a0299ff713 | ||
|
|
d03b27e1f6 | ||
|
|
a016e3fbf9 | ||
|
|
2f59f6d1df | ||
|
|
d00e9cd050 | ||
|
|
50e6a86f7b | ||
|
|
d2a582fb9e | ||
|
|
eadf5e9f4a | ||
|
|
4c1172d9d0 | ||
|
|
3ff1ccb5c2 | ||
|
|
279baee43a | ||
|
|
a479267db2 | ||
|
|
1ea2ca0482 | ||
|
|
12ea53e19e | ||
|
|
e58a207cf6 | ||
|
|
2365e94acb | ||
|
|
34e886c5e5 | ||
|
|
fe72293c37 | ||
|
|
c7087a15b7 | ||
|
|
9500f8d92a | ||
|
|
f5a0182b8a | ||
|
|
3a77fccd6f | ||
|
|
6910735abf | ||
|
|
d6148192a3 | ||
|
|
7dc511ba5c | ||
|
|
13ad49d329 | ||
|
|
075ac65a93 | ||
|
|
9652791a07 | ||
|
|
5c44744772 | ||
|
|
963cd3c5ea | ||
|
|
f99dc9868f | ||
|
|
05c6c76771 | ||
|
|
13b56f21f9 | ||
|
|
09b117c824 | ||
|
|
444044a2ef | ||
|
|
a137088a80 | ||
|
|
a0bcc2ae25 | ||
|
|
400065fa43 | ||
|
|
3ef1c1baff | ||
|
|
a8b5756718 | ||
|
|
8284c69a61 | ||
|
|
815fce8bd9 | ||
|
|
4a64ced9b5 | ||
|
|
d9da47f913 | ||
|
|
e7f0902eaf | ||
|
|
9aaad3fa60 | ||
|
|
561c4c2f02 | ||
|
|
9043cbf9bf | ||
|
|
9db36bd87a | ||
|
|
4b8c6983e7 | ||
|
|
4b894775af | ||
|
|
b23f22f0f6 | ||
|
|
3cc990d0f9 | ||
|
|
da104bee01 | ||
|
|
ff0c05f990 | ||
|
|
25bda8a417 | ||
|
|
4459e01f79 | ||
|
|
16fb5bf9bb | ||
|
|
36e66a17dc | ||
|
|
265c8d090f | ||
|
|
3b1696f13a | ||
|
|
d046a02c7d | ||
|
|
e45f9d32c1 | ||
|
|
f5359a70be | ||
|
|
9c6655a37c | ||
|
|
45adb8f172 | ||
|
|
5102ba54ea | ||
|
|
e1df8edf66 | ||
|
|
ee00bef5a9 | ||
|
|
60733359fa | ||
|
|
137ecd5377 | ||
|
|
7ab291af95 | ||
|
|
864c6360eb | ||
|
|
8e5487c347 | ||
|
|
4445809dd9 | ||
|
|
12915a202f | ||
|
|
cc3fcf7d61 | ||
|
|
e9d4e9b896 | ||
|
|
ff0f720e82 | ||
|
|
82a412031b | ||
|
|
7c7565e33c | ||
|
|
afe19055bb | ||
|
|
1ebc92faec | ||
|
|
96aa437f85 | ||
|
|
ed7e09833e | ||
|
|
7338ed075f | ||
|
|
8660a2c2b1 | ||
|
|
566d7de6af | ||
|
|
696626a8e9 | ||
|
|
ae767d30a4 | ||
|
|
ae1bb896e6 | ||
|
|
1bf75b1abb | ||
|
|
e78a03d7b4 | ||
|
|
244144f0f6 | ||
|
|
9808cfdf5e | ||
|
|
bf61d7a797 | ||
|
|
786838d277 | ||
|
|
e94c79227b | ||
|
|
06fc9283f7 | ||
|
|
ca93b0ef79 | ||
|
|
d8b8f033d5 | ||
|
|
17e6f42f03 | ||
|
|
e1a00bc244 | ||
|
|
e32afcc4ea | ||
|
|
05812cd61b | ||
|
|
420eb83065 | ||
|
|
7db053813b | ||
|
|
1a0723579b | ||
|
|
15b7e8faf1 | ||
|
|
0cff11130d | ||
|
|
90b340e689 | ||
|
|
4dcda474fc | ||
|
|
a55e6b6d5a | ||
|
|
12229d80fe | ||
|
|
7ce96b4d47 | ||
|
|
515fb701c2 | ||
|
|
19e0cb8c50 | ||
|
|
591c3e2c81 | ||
|
|
246e85088d | ||
|
|
ba955956cb | ||
|
|
ade25fff71 | ||
|
|
0f8f738942 | ||
|
|
c74ffeecd1 | ||
|
|
e51abf1796 | ||
|
|
34627862c6 | ||
|
|
1e897531cb | ||
|
|
7be7851b94 | ||
|
|
49a18025f8 | ||
|
|
51787a3465 | ||
|
|
147b53fbff | ||
|
|
d20a116dfd | ||
|
|
85b19944f4 | ||
|
|
3af9438fb5 | ||
|
|
2d684b8e76 | ||
|
|
3c269df00d | ||
|
|
e156f43848 | ||
|
|
6155d6a3e0 | ||
|
|
67da640e97 | ||
|
|
0608ab5f81 | ||
|
|
e9a338f9ef | ||
|
|
440af97436 | ||
|
|
0d4b84f06b | ||
|
|
0df4b5142c | ||
|
|
334b2319ef | ||
|
|
12b35b301c | ||
|
|
0d0b15875f | ||
|
|
67b605337f | ||
|
|
e8788019fa | ||
|
|
e4c3db0c6a | ||
|
|
65f8b1c95e | ||
|
|
65db59da81 | ||
|
|
a5355ec6c4 | ||
|
|
081da61d05 | ||
|
|
54eb340998 | ||
|
|
246df66229 | ||
|
|
ee8bee5e31 | ||
|
|
8c389a2a96 | ||
|
|
8f36c49ffa | ||
|
|
284c9dd342 | ||
|
|
8cfc1e9d23 | ||
|
|
3b8aabdd9e | ||
|
|
70322bce59 | ||
|
|
8f711aca53 | ||
|
|
f4cd0198f4 | ||
|
|
44918010df | ||
|
|
0cd198c798 | ||
|
|
63aa9f4ea8 | ||
|
|
438d7a26cc | ||
|
|
eb4b6a08d0 | ||
|
|
cc5b8ea6cb | ||
|
|
2011c24502 | ||
|
|
36f77b1aa7 | ||
|
|
c3715a025d | ||
|
|
f05d71a9a6 | ||
|
|
f179a92007 | ||
|
|
2aee2899e8 | ||
|
|
a08d1a044f | ||
|
|
625bc2e0e7 | ||
|
|
ee700fd3b1 | ||
|
|
9f72662ecc | ||
|
|
c9120cd714 | ||
|
|
a9200aa69a | ||
|
|
894f69e1fd | ||
|
|
48485a6a5a | ||
|
|
bc199a4fe1 | ||
|
|
501ee2105a | ||
|
|
f95759139b | ||
|
|
163c30570b | ||
|
|
e6782df9ba | ||
|
|
4eb6ce863a | ||
|
|
66418db43e | ||
|
|
18e7b67864 | ||
|
|
67366cf03d | ||
|
|
e36a82c3e6 | ||
|
|
b1f1647303 | ||
|
|
13a726b18f | ||
|
|
730c2177bf | ||
|
|
bd50600f5b | ||
|
|
67ae231f1b | ||
|
|
932aaa8cb5 | ||
|
|
55c177c26d | ||
|
|
f6a3faf927 | ||
|
|
28f9637aed | ||
|
|
28e885dd51 | ||
|
|
80df194341 | ||
|
|
99ed8df797 | ||
|
|
86825a745c | ||
|
|
2af1fa921a | ||
|
|
f16fc69e95 | ||
|
|
04e9978f1f | ||
|
|
fc902d354f | ||
|
|
d25934580f | ||
|
|
81ec32199f | ||
|
|
b50eddaea2 | ||
|
|
d1c2eae95d | ||
|
|
e55f1adfa8 | ||
|
|
70e2c23772 | ||
|
|
1d9c78ef6b | ||
|
|
c5a4b89915 | ||
|
|
d3bfb5422f | ||
|
|
d9f8045255 | ||
|
|
d64d56b5a8 | ||
|
|
42630dfa01 | ||
|
|
a1ca479a65 | ||
|
|
8f84989389 | ||
|
|
90d50d78c0 | ||
|
|
d4db9cb109 | ||
|
|
c0015d6a7c | ||
|
|
a2f13f0fe2 | ||
|
|
0efffb6df4 | ||
|
|
07b83b8869 | ||
|
|
81bdf8928e | ||
|
|
b1763f1e77 | ||
|
|
19d1cda92e | ||
|
|
4117c5b747 | ||
|
|
d07b686927 | ||
|
|
891021cdd3 | ||
|
|
6f2937855a | ||
|
|
04aa61ffac | ||
|
|
aa0bd78a5d | ||
|
|
3ed9f24d19 | ||
|
|
14052de6b2 | ||
|
|
7f5e63324d | ||
|
|
25b87fe4a9 | ||
|
|
5053ba6a6e | ||
|
|
fa83524eb4 | ||
|
|
dde669e6d3 | ||
|
|
809161ebf2 | ||
|
|
a41f197379 | ||
|
|
ada765a7e1 | ||
|
|
ad8a7aee30 | ||
|
|
56c9765f72 | ||
|
|
ffb6f3cea0 | ||
|
|
a976ec28b4 | ||
|
|
a7849377dd | ||
|
|
eccbe842b3 | ||
|
|
0ed553c0a7 | ||
|
|
f3ae301125 | ||
|
|
17d9b77db6 | ||
|
|
4a6036208a | ||
|
|
c348ebfeb1 | ||
|
|
e7fa640566 | ||
|
|
4b01ce36eb | ||
|
|
97c76a51d6 | ||
|
|
5923cfff4f | ||
|
|
cf629bfb97 | ||
|
|
9f7749553e | ||
|
|
8803df32aa | ||
|
|
be00f631da | ||
|
|
09caebf357 | ||
|
|
071b574e2c | ||
|
|
108aa4e7af | ||
|
|
edad1a1ce5 | ||
|
|
be30f224c7 | ||
|
|
53ee8c696b | ||
|
|
9c75b61e5f | ||
|
|
db7dc5a6e9 | ||
|
|
f690713802 | ||
|
|
e9c3ca62cd | ||
|
|
482714e1cf | ||
|
|
9714f95c63 | ||
|
|
f27dc40c8a | ||
|
|
c1505cfcdb | ||
|
|
269d702cc8 | ||
|
|
7fdc4da4b9 | ||
|
|
ddae581ac8 | ||
|
|
c9e9dacc6b | ||
|
|
e09d7e6fe4 | ||
|
|
dbc025798d | ||
|
|
7fbcc64801 | ||
|
|
5d6ee8da6c | ||
|
|
9c8fb872aa | ||
|
|
9508b96bc0 | ||
|
|
abe409db89 | ||
|
|
9e2d0f4322 | ||
|
|
9f7545368d | ||
|
|
e700bc1e04 | ||
|
|
684f6d4fcc | ||
|
|
9b946e3bf2 | ||
|
|
b611635c0e | ||
|
|
80f6d6c644 | ||
|
|
01680f7415 | ||
|
|
bc6940dbbb | ||
|
|
31f8ef4c15 | ||
|
|
fcaff34724 | ||
|
|
e54ba05393 | ||
|
|
acef9bb811 | ||
|
|
da9a1d0c14 | ||
|
|
bb3366e8b2 | ||
|
|
78d590aab9 | ||
|
|
55f5a83fbc | ||
|
|
4dbabbd9e2 | ||
|
|
1b87589008 | ||
|
|
37cf7f78f2 | ||
|
|
622a9c6a9a | ||
|
|
6de0714a3c | ||
|
|
6977514ff1 | ||
|
|
fc4ae3a627 | ||
|
|
1e5fb9290c | ||
|
|
cdde929500 | ||
|
|
eb6626d247 | ||
|
|
ab0e3a8bef | ||
|
|
dce1a08117 | ||
|
|
49d814d5d3 | ||
|
|
d260038aac | ||
|
|
5b874adee8 | ||
|
|
d9f14a5b79 | ||
|
|
8f7e444f4f | ||
|
|
9875c97661 | ||
|
|
0d3412d064 | ||
|
|
6f9c0181c1 | ||
|
|
ac76047f54 | ||
|
|
bde4cdebc1 | ||
|
|
60f12ed588 | ||
|
|
400b6daad0 | ||
|
|
fdddd873dd | ||
|
|
5934a69f67 | ||
|
|
55d31f06fb | ||
|
|
396aebaa98 | ||
|
|
e0efbfbd75 | ||
|
|
be3f236eaf | ||
|
|
69a31cde7b | ||
|
|
7fa4e7bbc3 | ||
|
|
024daa1225 | ||
|
|
4d4f707638 | ||
|
|
9a3b8e8969 | ||
|
|
fa59440329 | ||
|
|
8835c78261 | ||
|
|
c8a727d3fc | ||
|
|
bba85a6e01 | ||
|
|
5503af7bfa | ||
|
|
1ab66855db | ||
|
|
9074326e86 | ||
|
|
3966c3e37c | ||
|
|
ae9f4571b8 | ||
|
|
cfd442e74b | ||
|
|
a6647f389b | ||
|
|
558f756a15 | ||
|
|
c37ee53ecc | ||
|
|
a5d412ba79 | ||
|
|
3df2b8020d | ||
|
|
78fb9afd80 | ||
|
|
8a7d5b0c9b | ||
|
|
2edbc72ebd | ||
|
|
2603e6b5e3 | ||
|
|
9916f1e361 | ||
|
|
17f0f3d650 | ||
|
|
6c9fffd545 | ||
|
|
21e577c7d4 | ||
|
|
c938b99716 | ||
|
|
b4cfc84fc7 | ||
|
|
5236d0f75f | ||
|
|
b6991a3044 | ||
|
|
c0d262b572 | ||
|
|
f377302cbf | ||
|
|
3fe4a7846e | ||
|
|
e0166f471a | ||
|
|
8ea1dec8f4 | ||
|
|
2b7b42f09e | ||
|
|
d3e9368f34 | ||
|
|
91ebce1a9c | ||
|
|
19472fd0d2 | ||
|
|
8ca0bf745a | ||
|
|
3cb6c7d5ee | ||
|
|
75c376a23e | ||
|
|
c323eb1c8a | ||
|
|
15db61be69 | ||
|
|
41da4be66b | ||
|
|
e465c8db4d | ||
|
|
742f20fcc3 | ||
|
|
b2bfcf6816 | ||
|
|
a0581f42bd | ||
|
|
7e6e95c34c | ||
|
|
9bdda2756b | ||
|
|
9923ecfed0 | ||
|
|
9f780643ed | ||
|
|
7dd42939ae | ||
|
|
f469e7f57b | ||
|
|
d2feaa9316 | ||
|
|
7fb35a10ab | ||
|
|
ac10a8c8cf | ||
|
|
318ff9d373 | ||
|
|
1362aaab60 | ||
|
|
657e563f7c | ||
|
|
1d82f57945 | ||
|
|
617d04eccd | ||
|
|
7748f7cbf1 | ||
|
|
ba809d1b21 | ||
|
|
e4e3db8a85 | ||
|
|
fed40b76ff | ||
|
|
19d76ddbbd | ||
|
|
589aad0990 | ||
|
|
1daf79985a | ||
|
|
15b9ab4c08 | ||
|
|
23188e45c7 | ||
|
|
f30d497cc1 | ||
|
|
7c024612f6 | ||
|
|
55a09da6b2 | ||
|
|
61e8275ebf | ||
|
|
313e3b73b3 | ||
|
|
982c84b3ee | ||
|
|
386261656d | ||
|
|
253ccf43e8 | ||
|
|
f4612e4031 | ||
|
|
4773b09d13 | ||
|
|
c7ed03ded9 | ||
|
|
5b75bcffbf | ||
|
|
ea4e46dda4 | ||
|
|
9f48f8fab6 | ||
|
|
c6f20c52b8 | ||
|
|
6bdb30fea5 | ||
|
|
80bb1cb149 | ||
|
|
d9e237211a | ||
|
|
7bbd2dfeee | ||
|
|
6a81df3ecb | ||
|
|
c0462a53e0 | ||
|
|
dac6ac71da | ||
|
|
8602c3f8f8 | ||
|
|
571b244680 | ||
|
|
390776ea07 | ||
|
|
53c5f2bae3 | ||
|
|
250733eb8e | ||
|
|
25630ab4c7 | ||
|
|
88c1d5f29c | ||
|
|
7d41950f73 | ||
|
|
31904e34d6 | ||
|
|
383826139c | ||
|
|
9a173be436 | ||
|
|
121a8ad773 | ||
|
|
d8832c2ad6 | ||
|
|
00be451e28 | ||
|
|
661b461567 | ||
|
|
7eed04c774 | ||
|
|
13b855f128 | ||
|
|
1c2c15795c | ||
|
|
06e4a922d6 | ||
|
|
b17015932c | ||
|
|
b2bc556137 | ||
|
|
e9621fbcc7 | ||
|
|
141bb0861e | ||
|
|
0de2e2a664 | ||
|
|
edb6c09c64 | ||
|
|
7079e675bf | ||
|
|
604205045f | ||
|
|
60a7ac9f3c | ||
|
|
fc248814fe | ||
|
|
b164486616 | ||
|
|
02caad7c1b | ||
|
|
90c00f5b58 | ||
|
|
77a101280b | ||
|
|
f70dbfdc32 | ||
|
|
4f60841795 | ||
|
|
fee23f7be0 | ||
|
|
2beebef91b | ||
|
|
94abe055a2 | ||
|
|
dc853a0a3f | ||
|
|
a4c6102822 | ||
|
|
96d3b0695c | ||
|
|
d5669bb677 | ||
|
|
90914e262a | ||
|
|
06a276e5ad | ||
|
|
cf89f0ff5e | ||
|
|
fbd9b7c906 | ||
|
|
381c4e98aa | ||
|
|
c872509d7b | ||
|
|
6c368cbde5 | ||
|
|
0fffd1dd3c | ||
|
|
b69c4bb7a9 | ||
|
|
f43337d022 | ||
|
|
98c2f0647e | ||
|
|
e69bbbf0da | ||
|
|
0ae63b4c28 | ||
|
|
fd9b7efa97 | ||
|
|
d95a9c6160 | ||
|
|
923bb00c09 | ||
|
|
97e285fee5 | ||
|
|
d0c26fac56 | ||
|
|
723d9b6256 | ||
|
|
4be55758ae | ||
|
|
a8a48d097b | ||
|
|
7b1560dcb6 | ||
|
|
7b2156d15e | ||
|
|
94c01f0c66 | ||
|
|
3f81edb664 | ||
|
|
4c8c1ce146 | ||
|
|
f63ed5b6e7 | ||
|
|
0442649289 | ||
|
|
034e8677ad | ||
|
|
020e62fbd6 | ||
|
|
1fe633b7b7 | ||
|
|
a315c978f6 | ||
|
|
cab76bd7af | ||
|
|
cc62096ac4 | ||
|
|
829c5f8dd2 | ||
|
|
b5ea121dbc | ||
|
|
dfa346f89f | ||
|
|
c715c1073a | ||
|
|
1dbcfe02f5 | ||
|
|
ea0961682d | ||
|
|
4f2f3c52c6 | ||
|
|
b792189e59 | ||
|
|
9fa95981fc | ||
|
|
7e91026ec8 | ||
|
|
6a426ed2df | ||
|
|
2959bcdbe7 | ||
|
|
02d035fbef | ||
|
|
d7b18a8e2d | ||
|
|
6dc8be0332 |
@@ -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
|
||||
|
||||
@@ -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
16
android-extract-strings.sh
Executable 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
13
android-store-strings.sh
Executable 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
|
||||
@@ -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
8
bin/ai/compat_1.6.nut
Normal 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/>.
|
||||
*/
|
||||
@@ -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"; }
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
8
bin/game/compat_1.6.nut
Normal 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/>.
|
||||
*/
|
||||
171
changelog.txt
171
changelog.txt
@@ -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)
|
||||
|
||||
474
config.lib
474
config.lib
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
40
projects/generate_vs140.vcxproj
Normal file
40
projects/generate_vs140.vcxproj
Normal 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>
|
||||
384
projects/langs_vs140.vcxproj
Normal file
384
projects/langs_vs140.vcxproj
Normal 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>
|
||||
173
projects/langs_vs140.vcxproj.filters
Normal file
173
projects/langs_vs140.vcxproj.filters
Normal 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>
|
||||
12
projects/langs_vs140.vcxproj.filters.in
Normal file
12
projects/langs_vs140.vcxproj.filters.in
Normal 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>
|
||||
61
projects/langs_vs140.vcxproj.in
Normal file
61
projects/langs_vs140.vcxproj.in
Normal 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>
|
||||
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
94
projects/openttd_vs140.sln
Normal file
94
projects/openttd_vs140.sln
Normal 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
|
||||
1311
projects/openttd_vs140.vcxproj
Normal file
1311
projects/openttd_vs140.vcxproj
Normal file
File diff suppressed because it is too large
Load Diff
3050
projects/openttd_vs140.vcxproj.filters
Normal file
3050
projects/openttd_vs140.vcxproj.filters
Normal file
File diff suppressed because it is too large
Load Diff
13
projects/openttd_vs140.vcxproj.filters.in
Normal file
13
projects/openttd_vs140.vcxproj.filters.in
Normal 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>
|
||||
332
projects/openttd_vs140.vcxproj.in
Normal file
332
projects/openttd_vs140.vcxproj.in
Normal 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>
|
||||
@@ -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"
|
||||
>
|
||||
|
||||
@@ -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"
|
||||
>
|
||||
|
||||
54
projects/settings_vs140.vcxproj
Normal file
54
projects/settings_vs140.vcxproj
Normal 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>
|
||||
35
projects/settings_vs140.vcxproj.filters
Normal file
35
projects/settings_vs140.vcxproj.filters
Normal 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>
|
||||
15
projects/settings_vs140.vcxproj.filters.in
Normal file
15
projects/settings_vs140.vcxproj.filters.in
Normal 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>
|
||||
48
projects/settings_vs140.vcxproj.in
Normal file
48
projects/settings_vs140.vcxproj.in
Normal 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>
|
||||
83
projects/settingsgen_vs140.vcxproj
Normal file
83
projects/settingsgen_vs140.vcxproj
Normal 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>
|
||||
32
projects/settingsgen_vs140.vcxproj.filters
Normal file
32
projects/settingsgen_vs140.vcxproj.filters
Normal 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>
|
||||
95
projects/strgen_vs140.vcxproj
Normal file
95
projects/strgen_vs140.vcxproj
Normal 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>
|
||||
35
projects/strgen_vs140.vcxproj.filters
Normal file
35
projects/strgen_vs140.vcxproj.filters
Normal 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>
|
||||
42
projects/version_vs140.vcxproj
Normal file
42
projects/version_vs140.vcxproj
Normal 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>
|
||||
@@ -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
|
||||
|
||||
13
source.list
13
source.list
@@ -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
|
||||
|
||||
26
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
26
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
};
|
||||
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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
386
src/blitter/16bpp_anim.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
75
src/blitter/16bpp_anim.hpp
Normal file
75
src/blitter/16bpp_anim.hpp
Normal 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
147
src/blitter/16bpp_base.cpp
Normal 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
225
src/blitter/16bpp_base.hpp
Normal 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 */
|
||||
173
src/blitter/16bpp_simple.cpp
Normal file
173
src/blitter/16bpp_simple.cpp
Normal 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;
|
||||
}
|
||||
36
src/blitter/16bpp_simple.hpp
Normal file
36
src/blitter/16bpp_simple.hpp
Normal 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 */
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
25
src/build_confirmation_func.h
Normal file
25
src/build_confirmation_func.h
Normal 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 */
|
||||
262
src/build_confirmation_gui.cpp
Normal file
262
src/build_confirmation_gui.cpp
Normal 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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
103
src/dock_gui.cpp
103
src/dock_gui.cpp
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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),
|
||||
|
||||
198
src/gfx.cpp
198
src/gfx.cpp
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user