mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-22 22:19:08 +00:00
Compare commits
1178 Commits
14.0-RC1
...
15.0-beta1
Author | SHA1 | Date | |
---|---|---|---|
|
cd0e1fc47d | ||
|
f74b0cf984 | ||
b35284d3dd | |||
1cf3a2a726 | |||
|
90a8d7a953 | ||
|
71ad0a7343 | ||
|
f79d03ec48 | ||
c72542431a | |||
|
8e948af3bc | ||
|
de908e08b2 | ||
|
54d58a08f3 | ||
2176d49a39 | |||
2c740cf7e7 | |||
59680867c3 | |||
c78e309b16 | |||
|
d623aa0dfb | ||
|
fefa18fb03 | ||
|
be02b54744 | ||
|
c91d4104f8 | ||
|
9d0939199a | ||
|
07fb13cd29 | ||
c4424aa894 | |||
|
e3e3cb13c6 | ||
|
e78cd7d6e9 | ||
|
07fb7d20db | ||
|
6ba6ae5e6f | ||
|
8bf2ab62d9 | ||
|
69ee8a8480 | ||
|
32dfb37b9d | ||
|
25cf382971 | ||
|
5d8e98207d | ||
|
15059bc253 | ||
eacec144b0 | |||
e30c5e6b9e | |||
56510b5d7b | |||
|
677bd52c65 | ||
|
1e259b7f47 | ||
aa461fca68 | |||
|
ad7738cff8 | ||
f8e9ee6fec | |||
|
95d22bac89 | ||
1e77fd0b61 | |||
369e8a6fe9 | |||
5575c0ba5a | |||
|
d0d5a18120 | ||
7af16bff11 | |||
3d73c95080 | |||
f5d78f9eba | |||
caead883a5 | |||
|
04621d1be3 | ||
560ee2442d | |||
8b00661b22 | |||
ce5279a8dc | |||
7e8bcf44f7 | |||
bccf5343f4 | |||
cba329d9e2 | |||
|
ef76f0e758 | ||
|
701cb2e9d7 | ||
|
ca148022f7 | ||
|
005c47c322 | ||
|
913d6eceb0 | ||
|
7d0b1cd002 | ||
|
10e2d1ca36 | ||
cfb995b6e9 | |||
f56b6756f1 | |||
01d1ea6264 | |||
bc2513975f | |||
e73d6fcaac | |||
e750d10cee | |||
|
7469858f1f | ||
62da507aba | |||
6f8e30c55d | |||
2ff18a4f05 | |||
efcafe49f7 | |||
9e182871c7 | |||
041b9181f9 | |||
2ede94bc40 | |||
3a158c7609 | |||
6a07f28103 | |||
44de8d77bf | |||
be505ec459 | |||
3a310f1802 | |||
e28617fda6 | |||
46176a81e3 | |||
910dd65710 | |||
60f1618cc7 | |||
|
1885bd7166 | ||
30bda88e97 | |||
568bb1f5da | |||
61cbdef92d | |||
|
8d394c697c | ||
b6aece5b88 | |||
fe0afef36f | |||
|
cf7710fb61 | ||
9bc64b553b | |||
|
f5a6a31e4a | ||
23e252ad40 | |||
8b8cd9ae2d | |||
177e2ebf80 | |||
|
e7c63de55d | ||
|
8e9603bd33 | ||
|
7c3b0e5c9c | ||
a3437df7b7 | |||
|
5b02f51e17 | ||
0446123194 | |||
0c04966dc3 | |||
0b0b4f50c4 | |||
fa1849b855 | |||
059a4b22f7 | |||
876d53282e | |||
3be0166801 | |||
1f18894408 | |||
|
9399a92a4f | ||
|
681b1928b4 | ||
b890dab2b4 | |||
00ae20fa02 | |||
|
b84a164590 | ||
653e5e8b63 | |||
43da3e7693 | |||
d875ac8947 | |||
|
26ae50baf9 | ||
a4b4095232 | |||
16038879e4 | |||
a951896364 | |||
22035a4f2a | |||
598fdf04a4 | |||
|
67a0fccfad | ||
6d3adc6169 | |||
13da98dab8 | |||
|
1b6a6f1cd2 | ||
b730f8783e | |||
9b6b6d50c3 | |||
|
85e9f5745a | ||
6c09dcdd66 | |||
640a270ed6 | |||
fcac5479f1 | |||
fc8685d618 | |||
|
369ea29e1e | ||
f9b5f78b8a | |||
25c5a64d39 | |||
|
60ae50e016 | ||
|
d2496b6ec4 | ||
|
a3ee05737f | ||
c39810ff6a | |||
d4f8453c22 | |||
|
b8f3d0dd68 | ||
d903806e59 | |||
|
a6c526cfa0 | ||
04b6dfae48 | |||
ec1dc434ac | |||
|
71ea58c6de | ||
57ac1cbe0c | |||
|
8c395ed67c | ||
14e2839087 | |||
98c8445519 | |||
|
d6c2f9edf1 | ||
61aff3fa49 | |||
|
9742038b68 | ||
|
6faf4fa70a | ||
|
3e195df3c7 | ||
bbc1f7b3dc | |||
|
78258f13bc | ||
|
ce64d5f5d9 | ||
|
66198dea46 | ||
|
5e4f8db7d6 | ||
|
e5edfbadcf | ||
|
80f628063a | ||
|
b1bba967a1 | ||
|
7b3525954c | ||
|
c9bd21d579 | ||
d54341318e | |||
|
884b93c4c0 | ||
465df3bab1 | |||
8f9836793f | |||
|
4cd46e54aa | ||
|
c3bb512bd9 | ||
|
5d7a7b2955 | ||
3b6d3080f2 | |||
8bb6572943 | |||
157d028915 | |||
|
36c735ebfa | ||
|
59c399c795 | ||
|
29df467d27 | ||
|
14fac2ad37 | ||
|
9da6cd4817 | ||
|
362db76e13 | ||
f0f62961e1 | |||
a91d889646 | |||
|
cbde825785 | ||
a1233ee8a1 | |||
|
9193d69e0b | ||
|
3a76af0909 | ||
|
3fca0cf3ee | ||
db1a1c5dd9 | |||
6d2b93d3b3 | |||
0e3fdfb1b5 | |||
552cf72b98 | |||
|
9dae626237 | ||
|
883be19865 | ||
|
07e8547eb5 | ||
|
0200bc3720 | ||
0e13a7d124 | |||
|
a96a83e330 | ||
|
abd89b0748 | ||
e076aaf740 | |||
e1697a6ad1 | |||
|
a86f9dba0f | ||
9cf47e69d6 | |||
|
233ee16c44 | ||
bb8a0c7641 | |||
1191efa581 | |||
4f9c10d35f | |||
e50c1774fc | |||
c39554a210 | |||
1403a55e5d | |||
a171939ec3 | |||
a496e9397c | |||
a6f412c615 | |||
5b73654f94 | |||
009e57ee03 | |||
|
ea6aa4653a | ||
|
4a4c77ff04 | ||
|
8ed983b3cd | ||
|
f19829d029 | ||
|
dfb74e25f7 | ||
|
d5a13fb9f4 | ||
|
c9819f8957 | ||
|
d6aa09f96a | ||
|
ce641af6a9 | ||
|
38c9eb76a0 | ||
7a71df2952 | |||
|
51ffb2a1a3 | ||
01807fa753 | |||
e98407973f | |||
e3bfe2b668 | |||
3eb7901ad9 | |||
|
6ca9ddcffa | ||
|
d7a2efd623 | ||
|
18e8a34081 | ||
|
392bcf5c9a | ||
|
1998e94ae7 | ||
|
a6b7593a52 | ||
|
3b0fcf442f | ||
|
3105f6391c | ||
|
582f37dc15 | ||
|
4a359a4aed | ||
147ac56f11 | |||
|
9d2e07b1f6 | ||
|
8ca417baa9 | ||
|
5e8da0479a | ||
|
ffcc594ea3 | ||
|
b074a4d3ce | ||
|
35d37d4768 | ||
2fda7d8297 | |||
|
ae4a723889 | ||
bacd3e83c6 | |||
8360fab18a | |||
|
d8029b1d84 | ||
d5b57a56f4 | |||
|
4a6ac52d8c | ||
|
c2d58bb88f | ||
|
45aef2c0b9 | ||
|
1a1cd2d495 | ||
|
99e8534d76 | ||
|
79c8eac2ee | ||
|
c813b2b42d | ||
446db2c826 | |||
|
d53b681cf7 | ||
14b986609b | |||
3cd1200668 | |||
|
114c28e69c | ||
|
26c2255897 | ||
|
22b4a77e37 | ||
ccced859f5 | |||
|
386dbb7c80 | ||
|
7a0e50002b | ||
|
3ed2afa68e | ||
|
b4f96f54df | ||
|
b42c4fa7ca | ||
|
1251638508 | ||
|
528f047242 | ||
51bd344f10 | |||
e60c5f30a3 | |||
f149d84d4c | |||
|
856ee2aaca | ||
|
c1db57840e | ||
eafee92476 | |||
0340e19e04 | |||
376e882a14 | |||
d450d4743e | |||
e45e8a39c8 | |||
|
9404a03663 | ||
|
a7d405b02d | ||
16b4e737a3 | |||
|
2eac527439 | ||
|
78c7dd1303 | ||
|
6175a6b78a | ||
|
96000fc4ea | ||
6e940af08d | |||
719d063bd4 | |||
3bfd9de68d | |||
|
df0233f4c2 | ||
|
1e3855c9c3 | ||
fe49dec527 | |||
25a8abcd8e | |||
|
66c5a21d8f | ||
|
9f1bb055b7 | ||
|
fcf8693c4f | ||
a241ef8da0 | |||
33a7e9e512 | |||
|
9ab0a47812 | ||
4be3361aa3 | |||
74910d3d14 | |||
|
ad020759c7 | ||
908ee7292b | |||
|
3784a3d3d6 | ||
9623c28f4d | |||
|
2a5a0b0990 | ||
|
c277ff121e | ||
d1463f415f | |||
3d8d0e0d26 | |||
b449839538 | |||
9eb28def57 | |||
|
59b18560d4 | ||
|
45a5868bb8 | ||
ad5da0c924 | |||
7f5a3eaf83 | |||
9631c68ce6 | |||
6deee5e5e2 | |||
|
bed2a060ce | ||
2d51659ed2 | |||
|
e477706bf5 | ||
|
27efa57b7b | ||
|
d0b3e0c47e | ||
|
d8c36536be | ||
|
81b684aa42 | ||
|
cb2f4f319c | ||
29ff3d7b90 | |||
|
69aa6f66ec | ||
|
5c243ee8f0 | ||
|
d5ff6b4156 | ||
|
92cbf7ae43 | ||
|
c1f8569587 | ||
|
1d907611d1 | ||
|
34c09b3596 | ||
|
f2a8e18792 | ||
|
b80f205967 | ||
|
ef7ad2606c | ||
|
2eb3e77207 | ||
|
bb770b7b56 | ||
|
9eaa00cd89 | ||
cb23651f43 | |||
719763dfcb | |||
b5264a72ae | |||
|
4070cf9968 | ||
|
3be96c6816 | ||
|
d3252315d3 | ||
2327b7030d | |||
4224d08e72 | |||
c4a638dfe1 | |||
059462814e | |||
9a037fe5ae | |||
0f0f3d74ca | |||
|
e4c04e86c0 | ||
|
4e11a9c49e | ||
|
73cb7cd7df | ||
|
f14c152c72 | ||
ff972ec4ff | |||
|
39465d7f5c | ||
1ff35cb6f9 | |||
8754846901 | |||
79369a886a | |||
|
88110e9b2e | ||
|
4cddb3a38d | ||
|
7a698c7f1c | ||
|
55ca1c77be | ||
|
bdd16ee97f | ||
367e508984 | |||
d0d5c5c400 | |||
f829b1d74a | |||
|
0633b94e8f | ||
|
574ec4ede4 | ||
|
0c4dcd562c | ||
|
c69e236f9c | ||
|
daa4981922 | ||
|
cfeab64aaf | ||
|
e1b9a3e2e7 | ||
|
19cf605765 | ||
|
0c7faa4730 | ||
|
4c06769ff2 | ||
|
6430b5a0ac | ||
a03ddb3ccb | |||
6e553410d3 | |||
d08636c841 | |||
70a2ed062d | |||
|
ba46128bdd | ||
|
57afa6002a | ||
|
8ba4f8c872 | ||
|
ae2f76e066 | ||
|
89fc7e9af6 | ||
3176de3f1d | |||
|
bec37ee704 | ||
|
39688a4ccf | ||
|
22e525dafe | ||
|
ddf6f33a8a | ||
|
9965cd9151 | ||
|
44b748a766 | ||
|
1a6655bd1b | ||
|
f4e5f1b34d | ||
|
db36e61807 | ||
|
b2faa14ab5 | ||
|
da00a62d59 | ||
4ee45db51b | |||
8b644f6ee6 | |||
ba2b14b075 | |||
d85f4b3ebf | |||
4b6e3f86c2 | |||
|
31e2f5a8a0 | ||
333e8e590e | |||
|
97479eb953 | ||
|
8ed854be58 | ||
cd739c2c33 | |||
7fb3d1a197 | |||
2199543fbc | |||
b9c44b29be | |||
e69c065d6e | |||
|
891e53c72e | ||
|
d67963e616 | ||
|
eeed824329 | ||
|
1fe11b7b57 | ||
|
65c666cb57 | ||
|
6006e832f2 | ||
|
58e4643196 | ||
e2a796dbcd | |||
b37954722b | |||
e22eb89b92 | |||
b090c8e9bd | |||
70d63f87b8 | |||
db0ae42d45 | |||
55acc1b36d | |||
ba0acb87eb | |||
93eb27d8df | |||
60c3913a99 | |||
b4bcb330c7 | |||
100dd7b6d1 | |||
56b0eac2e9 | |||
|
86e32631d7 | ||
aee04e7bc6 | |||
|
23bcd592a4 | ||
6120165433 | |||
|
f59ab67672 | ||
|
5395d5731e | ||
4976a0140e | |||
|
2dc0a33eb7 | ||
|
794af62286 | ||
|
cd4233bedc | ||
|
8ef3a3d463 | ||
|
b27527ec0c | ||
|
f98b90ac2e | ||
|
1e0004bcd6 | ||
|
4e026e448c | ||
|
d3e37a251f | ||
|
da6900f606 | ||
|
3094b0ce1d | ||
|
b03ae8ad75 | ||
|
e7982e8082 | ||
|
c4b1596c97 | ||
|
a0845bba2c | ||
|
8c7cf3bc75 | ||
|
f5f488e778 | ||
|
9e14f989f9 | ||
|
b5f2004c26 | ||
|
14200212b7 | ||
|
3819ab25bf | ||
|
dc258ecbe0 | ||
|
95f2bec9a9 | ||
a288644e20 | |||
|
da4b3bebee | ||
|
564397645f | ||
|
b52f778f20 | ||
|
5ed2fcfb53 | ||
|
06bd47af4f | ||
|
21813fbe8b | ||
209b0320d5 | |||
|
88e53dbdc8 | ||
|
a873a952aa | ||
|
d3c7b1015c | ||
|
705207e2ce | ||
|
a23ff227e7 | ||
|
ff3be45c23 | ||
|
a1e94ccddb | ||
|
9936b3728a | ||
|
a43dacd988 | ||
|
c35a5e5cb1 | ||
|
eebd5e47db | ||
|
9c84e5df3f | ||
|
c6387c7784 | ||
|
05b65703d3 | ||
|
72276e2d3c | ||
|
c3a051a213 | ||
|
c53ed9fad6 | ||
|
e8be933ee6 | ||
e802c1a97f | |||
7116f143d5 | |||
|
97e9442d5e | ||
91fd082e93 | |||
|
e0bcb54a4b | ||
|
49d47b3b74 | ||
|
64781df29f | ||
|
e3e215b249 | ||
|
2dab9ac7a5 | ||
b56775f576 | |||
731c56d116 | |||
|
7db70f9c3f | ||
|
e3156546fa | ||
2f54904bab | |||
|
2bc3cc5b67 | ||
|
0e7916a51b | ||
|
b18d8d6574 | ||
|
0409577277 | ||
|
45d1f9aa80 | ||
|
d8771b3f68 | ||
|
4cbaac6dac | ||
|
d7137651f2 | ||
b991a399ef | |||
22d70f9334 | |||
b68172c225 | |||
f9f07e9001 | |||
7b7e00123e | |||
77f62e0c90 | |||
|
219995c643 | ||
55314513ce | |||
|
81b5a7c7c6 | ||
|
68f7d585b4 | ||
4cf6d1dd79 | |||
|
18bce69623 | ||
|
7db756e602 | ||
|
fa82dd6096 | ||
b4b2fad8e0 | |||
fce9361bf2 | |||
5cd81a980e | |||
80ddcb9d7d | |||
bbbf2b5282 | |||
|
6bf214af6e | ||
79c1492a73 | |||
|
af7ad964dd | ||
|
d7eb29d292 | ||
df1b6a933b | |||
|
79b573704b | ||
66044472d7 | |||
fee73f3253 | |||
|
fa24a3ec6b | ||
|
1f636d94d4 | ||
57186d4650 | |||
579ce8eae0 | |||
|
342a7cebd6 | ||
5fd23a2d70 | |||
|
1c738e5084 | ||
|
01c75fc578 | ||
1ab280a27a | |||
|
0d10c5e93c | ||
6d2424c0ef | |||
96fc367bcf | |||
|
3827229c74 | ||
7e914a0568 | |||
|
5bca185923 | ||
|
31085230a6 | ||
|
2864f3b3eb | ||
|
0e75dfd49f | ||
48539992e8 | |||
7b717fcccb | |||
de16655f76 | |||
9c19cf06e4 | |||
0f230244fe | |||
|
deb77463b0 | ||
|
85918fc23e | ||
2e7819927f | |||
|
51e170a8d0 | ||
f220ed179d | |||
3d4b98845a | |||
|
605dff4920 | ||
|
37f68a65ee | ||
f6c5da4cad | |||
4b81b62b72 | |||
|
692943669d | ||
517dab35b1 | |||
3c42f701d7 | |||
2c70ccb137 | |||
|
d11823df36 | ||
|
6efc1fa250 | ||
|
d72917b285 | ||
|
c325a2ebd4 | ||
676d64037d | |||
|
d9cadb49b0 | ||
5fefe0b61f | |||
f87c6990b0 | |||
|
071796660d | ||
|
c2daabc010 | ||
|
b2572c7ca8 | ||
|
9f13d3ff2b | ||
|
8f6e21617f | ||
|
b2f1a06def | ||
|
fea9ffa808 | ||
8a6745b26f | |||
766350bfd2 | |||
7e12b5ff0f | |||
|
42fc32243d | ||
19ca4089a1 | |||
|
5bc3723bcc | ||
5442b0dd2d | |||
28e814f62a | |||
|
fb4a370d3f | ||
|
46d7586ab1 | ||
|
29ce013eda | ||
ba47d1ca2b | |||
3f5a354f37 | |||
856ec901ca | |||
|
7fd2487c46 | ||
8d26d032e1 | |||
c85481564f | |||
4940b6ff0b | |||
|
26113e3622 | ||
ca52da6c95 | |||
d1b7619822 | |||
|
56ea002283 | ||
980dcaac6e | |||
ed67aedabf | |||
874cfe000b | |||
b731ab0632 | |||
d99c1337a2 | |||
f901722066 | |||
|
bb77d16e40 | ||
|
486af1a6fc | ||
460fab920c | |||
|
00c4b232b3 | ||
|
3f06aa441b | ||
|
9f63b9f65d | ||
|
870149406a | ||
18e56df5e1 | |||
f2f7573c3f | |||
|
77c188e6da | ||
|
6cea49c117 | ||
|
8349203038 | ||
77a7113ba6 | |||
|
f939e81bf0 | ||
|
95a89e43b2 | ||
34da94ffc8 | |||
d78f39a9df | |||
|
721cd2b8ad | ||
b30fe0d7da | |||
fde3b35a24 | |||
b76517816e | |||
cdc356e7bf | |||
d2c8b476b5 | |||
9f8c9724be | |||
d5671030b1 | |||
733284cc16 | |||
31c306c6cd | |||
|
dc22edc556 | ||
|
04cc0c8125 | ||
|
40e6230900 | ||
|
dfa2622153 | ||
|
e436e2ef40 | ||
|
64e1f1d4d9 | ||
|
4bf2dc3148 | ||
|
c1375cecf8 | ||
|
ffe76a0133 | ||
|
c3ee5e58a3 | ||
|
798ec4184b | ||
|
55a7c59d13 | ||
|
a5c2543efc | ||
|
cef9417c9f | ||
|
a313676189 | ||
|
ed888c617b | ||
|
59ac27f385 | ||
ec61951512 | |||
5b35fbd6f5 | |||
|
132e226b27 | ||
|
00cfd572ff | ||
|
cb3f99859c | ||
b74a7e749b | |||
731d46beb5 | |||
9008d793ab | |||
|
8710e9b8c8 | ||
|
019f93a65f | ||
|
ab7e2a1883 | ||
|
1a3cbaec56 | ||
|
849d1fa1b3 | ||
|
457d51fc49 | ||
|
a9318cf653 | ||
|
9dc1fdc385 | ||
|
16639939e9 | ||
|
ca4bef1504 | ||
|
71fc907584 | ||
|
a002803d1c | ||
|
4f3db8eeaf | ||
|
66354ab9eb | ||
|
1250ce8fdc | ||
|
4e9a280ef8 | ||
|
b9c894b717 | ||
|
455e202e03 | ||
4740eeaa43 | |||
|
d2f98440bb | ||
84ebae0bf5 | |||
cf94bd321d | |||
72b2840a97 | |||
|
99f497cb08 | ||
|
9fe9e4d398 | ||
d074ab909c | |||
|
cb26b0e92d | ||
f629d3c921 | |||
115ac2629b | |||
|
60cf37e0d1 | ||
9a7c30a109 | |||
9d2efd4c96 | |||
|
8b6661d486 | ||
|
0b50834f81 | ||
|
e0048d798f | ||
90029beb49 | |||
|
c17fa6032b | ||
|
ef99aa81a3 | ||
cf96d49ced | |||
|
65c9df49d9 | ||
|
2559bdfa6f | ||
|
9647fe1d05 | ||
f146680121 | |||
7147fe9e7a | |||
532ce1a907 | |||
1424a184d8 | |||
|
96d82b4363 | ||
|
4df44fea38 | ||
cc6e4768a9 | |||
|
b852a3f408 | ||
|
fd4cf699e5 | ||
|
98d37338df | ||
|
24b6ec80a9 | ||
|
87dbd4a833 | ||
|
d183d8e587 | ||
|
37a03b513f | ||
|
546a996d95 | ||
|
ad50c4f298 | ||
ef55cc7979 | |||
|
99b74c1064 | ||
|
826deaee57 | ||
|
97a34bf06e | ||
|
ee9895a970 | ||
440a633fcc | |||
33aedc43a5 | |||
|
8308998388 | ||
bf8de188ec | |||
72c55128d2 | |||
a6d401debf | |||
|
a60a81f34e | ||
|
0fdabca605 | ||
f44d8fa2e4 | |||
0075a95278 | |||
5bc9854be2 | |||
|
9b747a173d | ||
|
11ec156b64 | ||
|
57f5d27427 | ||
|
ceb0053dd9 | ||
|
339b0ea0ff | ||
|
fd80a1ec66 | ||
|
a4071b78d7 | ||
|
e8d25d68b9 | ||
e8249e9075 | |||
5159aa81d4 | |||
26bb87ebf1 | |||
1dc94d0670 | |||
6a3f50aa72 | |||
e20f48799e | |||
5e689ce25e | |||
|
9121770582 | ||
ac6a945e26 | |||
|
bef11941c6 | ||
|
95de90dd4e | ||
3814adaba8 | |||
|
c82a2575d7 | ||
|
ded4d63db2 | ||
d465257dd0 | |||
3b01d31280 | |||
|
c073165e34 | ||
|
aa895535e6 | ||
959ced71bb | |||
b4e00fa738 | |||
|
c5ef47ee09 | ||
|
1dfd0c19f4 | ||
|
c377c4740d | ||
a1a01e21cf | |||
|
fc7f184dbd | ||
|
1691b41b54 | ||
|
434c49a1f8 | ||
|
8fe5fdf122 | ||
|
8986fb0385 | ||
2114888485 | |||
|
e441033d68 | ||
40fa45a76a | |||
ed2db80990 | |||
57d7359b1a | |||
699c7e4c9d | |||
1c31e4b68c | |||
e028c15555 | |||
|
08140fdca3 | ||
6cbb8d02cf | |||
5df5e3f45c | |||
2a833a8968 | |||
7e049aa2b1 | |||
16eb17418b | |||
61c6ebaacc | |||
d43ff8dc49 | |||
f267b37a33 | |||
a28ab8cac2 | |||
6ee31a2a22 | |||
3b80a8255f | |||
|
7848e80f71 | ||
|
0d1fc47edb | ||
774f811217 | |||
3b75d8bbf8 | |||
21d11ee361 | |||
db56499c01 | |||
fe7bd3a266 | |||
d57bf84196 | |||
45886e50b2 | |||
|
04a3bf76e8 | ||
|
08d05bf4c0 | ||
4170c9923a | |||
|
78b83190cc | ||
|
715f8c0218 | ||
|
c355e98c58 | ||
63ce81570c | |||
42523379d9 | |||
d7c547d0db | |||
5a523cf212 | |||
6458980413 | |||
|
83d99ec11d | ||
|
f7bd080015 | ||
|
07b162ffc4 | ||
|
a0636d8200 | ||
|
a09749f6a6 | ||
|
1005c86c62 | ||
|
a02da5476e | ||
|
5878d09ef2 | ||
|
824687d1f0 | ||
|
0b9029b69c | ||
ef8eb66a2b | |||
|
b477a8458c | ||
|
018326321c | ||
|
257d312a58 | ||
|
b2218e75d4 | ||
48eb9b8bc9 | |||
|
8e2ccddd77 | ||
3ad143c43a | |||
|
672aa014d8 | ||
|
727392e0b3 | ||
a1b03ee69e | |||
|
f5a50a874f | ||
|
cd108fd9e4 | ||
839f486074 | |||
4eaeccdaeb | |||
|
29e932e087 | ||
|
090c3b3abf | ||
e83e2df023 | |||
12125bad82 | |||
c1520cf682 | |||
ca73f03334 | |||
44b8210037 | |||
003906becb | |||
|
bb9b8b90c7 | ||
9915c1f032 | |||
|
eda10abc8c | ||
3316b27496 | |||
|
afd7878de0 | ||
|
5592b4409b | ||
|
e8a56db21d | ||
|
4f2412a272 | ||
|
2587a21400 | ||
|
ff27b9e76a | ||
|
6cade18053 | ||
|
442daf58da | ||
6bc4a62c27 | |||
332cbca36e | |||
a42aa1a086 | |||
144bcbbaf1 | |||
|
21b640b5ff | ||
|
1b4bb1d38a | ||
|
f0f97c698b | ||
1773c5b810 | |||
|
df8eeb1b10 | ||
77f27e0804 | |||
052f421327 | |||
34758d0921 | |||
90ca3515da | |||
2976a46d06 | |||
|
883d3e7a9f | ||
54be756aae | |||
dc7c2bb30d | |||
de4e00c93f | |||
|
b5ad28022d | ||
1b127628cb | |||
7e28605830 | |||
4daf95b878 | |||
cdfffb551c | |||
74e09abf76 | |||
|
4e6d4fcf32 | ||
|
095bdf32fe | ||
|
62f5c595f3 | ||
|
4718971ccc | ||
995fca58a2 | |||
|
d7fa614a9d | ||
|
1fcf1a136d | ||
|
0f6bf90731 | ||
eb094a953c | |||
34ba969c74 | |||
fbdf26800b | |||
a4c2f0778a | |||
b905209421 | |||
830c9e2de8 | |||
|
97bea563d7 | ||
|
c544a2be0a | ||
|
eaafc57de6 | ||
8e881471c1 | |||
6771dbe62b | |||
a866166673 | |||
2cc700d606 | |||
83da886093 | |||
e8c78df39e | |||
d11622b9a0 | |||
|
df3e5ade11 | ||
7572cfd103 | |||
9854553e10 | |||
3c94e81665 | |||
7c322ebcf1 | |||
197fb00d31 | |||
338def1b06 | |||
f6a88e40a4 | |||
|
08cf106fc6 | ||
|
243c6bead3 | ||
|
931aa39018 | ||
9750826590 | |||
|
72b5c6a591 | ||
2047c27445 | |||
56cac21086 | |||
|
11aa3694fa | ||
3de8853e29 | |||
00e0021e3a | |||
295508fc53 | |||
f79ec7955a | |||
bd2a92331b | |||
f6b38e8e06 | |||
e4fc8ef595 | |||
|
6f36f3d714 | ||
|
92a171c3e0 | ||
d68e5159e1 | |||
|
3d2a8fb60c | ||
d683ec0183 | |||
|
d5e28a904d | ||
|
9954187680 | ||
|
77f02faf15 | ||
|
340c2802da | ||
|
e866ca8adc | ||
|
c0308acb03 | ||
8d312b305b | |||
|
e21c12afeb | ||
e16b982b6a | |||
3e83dcedfd | |||
8746be8bf2 | |||
|
907cb4fc53 | ||
|
8fb7d74dfe | ||
|
69acc132ca | ||
|
71087bb6d3 | ||
|
ca53e134be | ||
|
433484cda3 | ||
|
b8b01818ca | ||
|
575336ef43 | ||
|
8e12bd35ae | ||
4751179dc5 | |||
|
9aa6669266 | ||
|
84bbe235e4 | ||
|
f71ada4f30 | ||
|
f845b4bbc3 | ||
|
40a75e0b8d | ||
97c1738541 | |||
eebfb83aa2 | |||
|
8928f4979a | ||
|
caa7c44052 | ||
|
d09b5aaeba | ||
|
c01bf06ee1 | ||
|
018944dc20 | ||
668186ca5b | |||
ff35288ddf | |||
|
02c00f3e3e | ||
|
704e871a0e | ||
|
603154899a | ||
|
0f25eaa271 | ||
|
515303b8be | ||
|
2732b3d6c6 | ||
ea74ca0a76 | |||
|
f599108c16 | ||
|
4321cca5fb | ||
df2ee7b06c | |||
|
e904122441 | ||
|
7457f8d0ff | ||
|
5751da7809 | ||
|
e141734e54 | ||
|
2189607c34 | ||
|
e42aec5a89 | ||
|
0eaeeaabb6 | ||
|
704d3b8a9b | ||
|
00a09af1fd | ||
|
d4a6ee9554 | ||
|
3a3d8f3b53 | ||
737e3feaf0 | |||
|
7580eac2d5 | ||
2485de9462 | |||
107c208d87 | |||
|
ec3c8d3462 | ||
|
4af089b9be | ||
|
b7dfa3eb90 | ||
|
1cf8799810 | ||
|
d26629c15b | ||
|
5706801ea7 | ||
|
dd532cbc77 | ||
|
fb9d4afa5c | ||
88cf99017a | |||
322ca6ef54 | |||
3fc7b3b9a0 | |||
|
f08da1d373 | ||
ab94c8b511 | |||
|
6c5a8f55df | ||
|
a886bd9666 | ||
|
a3cfd23cf9 | ||
|
bd7120bae4 | ||
|
af1bd43b30 | ||
0058ebe472 | |||
|
818a57c9af | ||
|
d7c5e9e8ab | ||
|
7f49b6f25a | ||
|
5f4f9334ce | ||
|
4c0dca1411 | ||
|
fe12d38024 | ||
|
15d02f51ed | ||
|
b6c75dec3a | ||
|
26d1d5d6e7 | ||
|
6eff879e49 | ||
|
3c488e1eb8 | ||
|
ec4104ec6c | ||
|
3e625b5b1a | ||
|
b394c20519 | ||
|
a7625b8ae0 | ||
|
9db285a32b | ||
|
2d2191fbb3 | ||
|
23d733be95 | ||
|
24efdf6ac5 | ||
|
14d95ef1c9 | ||
|
100c043599 | ||
|
0cff40dd19 | ||
|
1addeddc07 | ||
|
8a37f6479a | ||
|
a06814c173 | ||
|
984202b101 | ||
|
d7b99cbe26 | ||
|
c768f4fc7a | ||
|
ee22fa34d7 | ||
|
eaf62f3969 | ||
b9ca3ead8b | |||
dc6305e8c1 | |||
|
95a8fab339 | ||
8b60fc3d35 | |||
|
2f0fe22d63 | ||
649c1cf14c | |||
|
ecf534522c | ||
|
27eadc13ec | ||
|
df461b0329 | ||
|
005892bfdb | ||
|
cca9dcdd57 | ||
|
9c95fbdb07 | ||
|
86cb184eb4 | ||
|
e4b3f3f495 | ||
|
bab5a8a787 | ||
|
381dee2e01 | ||
|
738624ded4 | ||
55a328c586 | |||
de8a840db5 | |||
|
82430a1086 | ||
|
e0e0d5f8fb | ||
|
ebd258b404 | ||
|
32b0fb9f6e | ||
|
04ce1c08ae | ||
|
ab315d0dc9 | ||
|
6e0f58f700 | ||
|
3a71f36393 | ||
|
ae27ce12a7 | ||
|
ce3d0097f6 | ||
|
08ff1ab93e | ||
|
ab353f8ad5 | ||
|
8b9f59d320 | ||
|
8dda387f82 | ||
|
5806c2aba4 | ||
|
0c432bdc4d | ||
|
ab52f7eecf | ||
|
b8b80cb42e | ||
|
aef8a345b2 | ||
|
63b9284a7e | ||
a9de766fa6 | |||
|
30e1a61c04 | ||
|
216905ce1f | ||
25aeb1c5a5 | |||
|
8fb26612c0 | ||
|
ef40c5e240 | ||
|
634b67bf13 | ||
|
1a2b54498b | ||
2d48829999 | |||
00b442d6f9 | |||
bc3bd642b9 | |||
|
845b894fd8 | ||
|
0fd576bfbc | ||
|
626ee4ab41 | ||
8172e25273 | |||
b2ca6e1ac8 | |||
cff48c0f63 | |||
41b3314d76 | |||
278c3a7db1 | |||
|
c5afc9173c | ||
|
f180262aee | ||
|
d7c485d4b9 | ||
|
8f22066b9a | ||
|
aff09306de | ||
|
253ba0d354 | ||
|
b53d79b1d2 | ||
a602845d0a | |||
|
3fd5c33ae6 | ||
|
7824ae5b59 | ||
|
b307541099 | ||
|
890040ceea | ||
|
667adf7df9 | ||
f0a891c4f7 | |||
|
c0b5510a94 | ||
|
c4f9479507 | ||
|
fad77261ea | ||
d4f0f0e2c5 | |||
|
529d813496 | ||
e93d081a4a | |||
59420d57ec | |||
a61311fcb0 | |||
bf865dc536 | |||
|
f612bc6ee2 | ||
|
2fb1593550 | ||
|
e775ef2b70 | ||
|
149592e4dd | ||
|
e939f59cbb | ||
|
7b1e3cfeb5 | ||
86be6d7e0b | |||
912d7bd80e | |||
ae3390fe48 | |||
0463d4c198 | |||
56cf89d189 | |||
8afef45d4e | |||
|
ddb3914074 | ||
|
677ec70b0e | ||
|
c25d9f5c81 | ||
|
222832f1d4 | ||
|
7135330819 | ||
|
b22fb43cea | ||
2b79e7cdf5 | |||
|
bb86023d50 | ||
|
4c117dd2d8 | ||
|
8015d96a50 | ||
|
5d2e6e4efa | ||
|
ca146c8ddd | ||
|
409c073eca | ||
|
7bab2c1cc3 | ||
|
c637d376d0 | ||
|
ad9080338c | ||
|
bff69e192b | ||
|
25d1238907 | ||
|
2d7ad9f717 | ||
|
f1bf39f38b | ||
|
a4d4301a0c |
@@ -14,3 +14,7 @@ notifications:
|
|||||||
pull-request:
|
pull-request:
|
||||||
issue:
|
issue:
|
||||||
tag-created:
|
tag-created:
|
||||||
|
workflow-run:
|
||||||
|
only:
|
||||||
|
- .github/workflows/release.yml
|
||||||
|
- .github/workflows/ci-nightly.yml
|
||||||
|
4
.github/changelog.sh
vendored
4
.github/changelog.sh
vendored
@@ -5,8 +5,8 @@ tag=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\
|
|||||||
# If we are a tag, show the part of the changelog till (but excluding) the last stable
|
# If we are a tag, show the part of the changelog till (but excluding) the last stable
|
||||||
if [ -n "$tag" ]; then
|
if [ -n "$tag" ]; then
|
||||||
grep='^[0-9]\+\.[0-9]\+[^-]'
|
grep='^[0-9]\+\.[0-9]\+[^-]'
|
||||||
next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
|
next=$(cat changelog.md | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
|
||||||
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
|
cat changelog.md | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
12
.github/unused-strings.py
vendored
12
.github/unused-strings.py
vendored
@@ -39,7 +39,6 @@ def read_language_file(filename, strings_found, errors):
|
|||||||
skip = SkipType.NONE
|
skip = SkipType.NONE
|
||||||
length = 0
|
length = 0
|
||||||
common_prefix = ""
|
common_prefix = ""
|
||||||
last_tiny_string = ""
|
|
||||||
|
|
||||||
with open(filename) as fp:
|
with open(filename) as fp:
|
||||||
for line in fp.readlines():
|
for line in fp.readlines():
|
||||||
@@ -114,17 +113,6 @@ def read_language_file(filename, strings_found, errors):
|
|||||||
name = line.split(":")[0].strip()
|
name = line.split(":")[0].strip()
|
||||||
strings_defined.append(name)
|
strings_defined.append(name)
|
||||||
|
|
||||||
# If a string ends on _TINY or _SMALL, it can be the {TINY} variant.
|
|
||||||
# Check for this by some fuzzy matching.
|
|
||||||
if name.endswith(("_SMALL", "_TINY")):
|
|
||||||
last_tiny_string = name
|
|
||||||
elif last_tiny_string:
|
|
||||||
matching_name = "_".join(last_tiny_string.split("_")[:-1])
|
|
||||||
if name == matching_name:
|
|
||||||
strings_found.add(last_tiny_string)
|
|
||||||
else:
|
|
||||||
last_tiny_string = ""
|
|
||||||
|
|
||||||
if skip == SkipType.EXTERNAL:
|
if skip == SkipType.EXTERNAL:
|
||||||
strings_found.add(name)
|
strings_found.add(name)
|
||||||
skip = SkipType.LENGTH
|
skip = SkipType.LENGTH
|
||||||
|
385
.github/workflows/ci-build.yml
vendored
385
.github/workflows/ci-build.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: CI
|
name: CI - Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -17,79 +17,22 @@ jobs:
|
|||||||
emscripten:
|
emscripten:
|
||||||
name: Emscripten
|
name: Emscripten
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
uses: ./.github/workflows/ci-emscripten.yml
|
||||||
container:
|
secrets: inherit
|
||||||
# If you change this version, change the number in the cache step too.
|
|
||||||
image: emscripten/emsdk:3.1.42
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /emsdk/upstream/emscripten/cache
|
|
||||||
key: 3.1.42-${{ runner.os }}
|
|
||||||
|
|
||||||
- name: Patch Emscripten to support LZMA
|
|
||||||
run: |
|
|
||||||
cd /emsdk/upstream/emscripten
|
|
||||||
patch -p1 < ${GITHUB_WORKSPACE}/os/emscripten/emsdk-liblzma.patch
|
|
||||||
|
|
||||||
- name: Build (host tools)
|
|
||||||
run: |
|
|
||||||
mkdir build-host
|
|
||||||
cd build-host
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
cmake .. -DOPTION_TOOLS_ONLY=ON
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
echo "Running on $(nproc) cores"
|
|
||||||
cmake --build . -j $(nproc) --target tools
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
emcmake cmake .. -DHOST_BINARY_DIR=../build-host
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
echo "Running on $(nproc) cores"
|
|
||||||
cmake --build . -j $(nproc) --target openttd
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: Clang - Debug
|
- name: Clang
|
||||||
compiler: clang-15
|
compiler: clang
|
||||||
cxxcompiler: clang++-15
|
cxxcompiler: clang++
|
||||||
libraries: libsdl2-dev
|
libraries: libsdl2-dev
|
||||||
- name: Clang - Release
|
|
||||||
compiler: clang-15
|
|
||||||
cxxcompiler: clang++-15
|
|
||||||
libraries: libsdl2-dev
|
|
||||||
extra-cmake-parameters: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPTION_USE_ASSERTS=OFF
|
|
||||||
- name: GCC - SDL2
|
- name: GCC - SDL2
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
cxxcompiler: g++
|
cxxcompiler: g++
|
||||||
libraries: libsdl2-dev
|
libraries: libsdl2-dev
|
||||||
- name: GCC - SDL1.2
|
|
||||||
compiler: gcc
|
|
||||||
cxxcompiler: g++
|
|
||||||
libraries: libsdl1.2-dev
|
|
||||||
- name: GCC - Dedicated
|
- name: GCC - Dedicated
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
cxxcompiler: g++
|
cxxcompiler: g++
|
||||||
@@ -99,318 +42,55 @@ jobs:
|
|||||||
|
|
||||||
name: Linux (${{ matrix.name }})
|
name: Linux (${{ matrix.name }})
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/ci-linux.yml
|
||||||
env:
|
secrets: inherit
|
||||||
CC: ${{ matrix.compiler }}
|
|
||||||
CXX: ${{ matrix.cxxcompiler }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup vcpkg caching
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
with:
|
||||||
script: |
|
compiler: ${{ matrix.compiler }}
|
||||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
cxxcompiler: ${{ matrix.cxxcompiler }}
|
||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
libraries: ${{ matrix.libraries }}
|
||||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
extra-cmake-parameters: ${{ matrix.extra-cmake-parameters }}
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
echo "::group::Update apt"
|
|
||||||
sudo apt-get update
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Install dependencies"
|
|
||||||
sudo apt-get install -y --no-install-recommends \
|
|
||||||
liballegro4-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
libfontconfig-dev \
|
|
||||||
libharfbuzz-dev \
|
|
||||||
libicu-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
liblzo2-dev \
|
|
||||||
${{ matrix.libraries }} \
|
|
||||||
zlib1g-dev \
|
|
||||||
# EOF
|
|
||||||
|
|
||||||
echo "::group::Install vcpkg dependencies"
|
|
||||||
|
|
||||||
# Disable vcpkg integration, as we mostly use system libraries.
|
|
||||||
mv vcpkg.json vcpkg-disabled.json
|
|
||||||
|
|
||||||
# We only use breakpad from vcpkg, as its CMake files
|
|
||||||
# are a bit special. So the Ubuntu's variant doesn't work.
|
|
||||||
vcpkg install breakpad
|
|
||||||
|
|
||||||
echo "::endgroup::"
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
|
|
||||||
- name: Get OpenGFX
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.local/share/openttd/baseset
|
|
||||||
cd ~/.local/share/openttd/baseset
|
|
||||||
|
|
||||||
echo "::group::Download OpenGFX"
|
|
||||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Unpack OpenGFX"
|
|
||||||
unzip opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
rm -f opengfx-all.zip
|
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ matrix.extra-cmake-parameters }}
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
echo "Running on $(nproc) cores"
|
|
||||||
cmake --build . -j $(nproc)
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
(
|
|
||||||
cd build
|
|
||||||
ctest -j $(nproc) --timeout 120
|
|
||||||
)
|
|
||||||
|
|
||||||
# Re-enable vcpkg.
|
|
||||||
mv vcpkg-disabled.json vcpkg.json
|
|
||||||
|
|
||||||
# Check no tracked files have been modified.
|
|
||||||
git diff --exit-code
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- arch: x64
|
- name: arm64 - Debug
|
||||||
full_arch: x86_64
|
arch: arm64
|
||||||
|
full_arch: arm64
|
||||||
|
extra-cmake-parameters: -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
- name: arm64 - Release
|
||||||
|
arch: arm64
|
||||||
|
full_arch: arm64
|
||||||
|
extra-cmake-parameters: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPTION_USE_ASSERTS=OFF
|
||||||
|
|
||||||
name: Mac OS (${{ matrix.arch }})
|
name: Mac OS (${{ matrix.name }})
|
||||||
|
|
||||||
runs-on: macos-latest
|
uses: ./.github/workflows/ci-macos.yml
|
||||||
env:
|
secrets: inherit
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup vcpkg caching
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
with:
|
||||||
script: |
|
arch: ${{ matrix.arch }}
|
||||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
full_arch: ${{ matrix.full_arch }}
|
||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
extra-cmake-parameters: ${{ matrix.extra-cmake-parameters }}
|
||||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
|
||||||
|
|
||||||
- name: Install OpenGFX
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/Documents/OpenTTD/baseset
|
|
||||||
cd ~/Documents/OpenTTD/baseset
|
|
||||||
|
|
||||||
echo "::group::Download OpenGFX"
|
|
||||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Unpack OpenGFX"
|
|
||||||
unzip opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
rm -f opengfx-all.zip
|
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
cmake .. \
|
|
||||||
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.full_arch }} \
|
|
||||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-osx \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
|
||||||
# EOF
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
|
||||||
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
ctest -j $(sysctl -n hw.logicalcpu) --timeout 120
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, windows-2019]
|
include:
|
||||||
arch: [x86, x64]
|
- arch: x86
|
||||||
|
- arch: x64
|
||||||
|
|
||||||
name: Windows (${{ matrix.os }} / ${{ matrix.arch }})
|
name: Windows (${{ matrix.arch }})
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
uses: ./.github/workflows/ci-windows.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup vcpkg caching
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
|
||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
|
||||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
|
||||||
|
|
||||||
- name: Install OpenGFX
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
||||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
||||||
|
|
||||||
echo "::group::Download OpenGFX"
|
|
||||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Unpack OpenGFX"
|
|
||||||
unzip opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
rm -f opengfx-all.zip
|
|
||||||
|
|
||||||
- name: Install MSVC problem matcher
|
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
|
||||||
|
|
||||||
- name: Configure developer command prompt for ${{ matrix.arch }}
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Build
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
cmake .. \
|
|
||||||
-GNinja \
|
|
||||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
|
||||||
# EOF
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
cmake --build .
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
ctest --timeout 120
|
|
||||||
|
|
||||||
|
|
||||||
msys2:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- msystem: MINGW64
|
|
||||||
arch: x86_64
|
|
||||||
- msystem: MINGW32
|
|
||||||
arch: i686
|
|
||||||
|
|
||||||
name: MinGW (${{ matrix.arch }})
|
|
||||||
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup MSYS2
|
|
||||||
uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
msystem: ${{ matrix.msystem }}
|
|
||||||
release: false
|
|
||||||
install: >-
|
|
||||||
git
|
|
||||||
make
|
|
||||||
mingw-w64-${{ matrix.arch }}-cmake
|
|
||||||
mingw-w64-${{ matrix.arch }}-gcc
|
|
||||||
mingw-w64-${{ matrix.arch }}-lzo2
|
|
||||||
mingw-w64-${{ matrix.arch }}-libpng
|
|
||||||
mingw-w64-${{ matrix.arch }}-lld
|
|
||||||
mingw-w64-${{ matrix.arch }}-ninja
|
|
||||||
|
|
||||||
- name: Install OpenGFX
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
||||||
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
||||||
|
|
||||||
echo "::group::Download OpenGFX"
|
|
||||||
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Unpack OpenGFX"
|
|
||||||
unzip opengfx-all.zip
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
rm -f opengfx-all.zip
|
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
shell: msys2 {0}
|
|
||||||
env:
|
|
||||||
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
echo "::group::CMake"
|
|
||||||
cmake .. \
|
|
||||||
-GNinja \
|
|
||||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
|
||||||
# EOF
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
echo "::group::Build"
|
|
||||||
cmake --build .
|
|
||||||
echo "::endgroup::"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
ctest --timeout 120
|
|
||||||
|
|
||||||
check_annotations:
|
check_annotations:
|
||||||
name: Check Annotations
|
name: Check Annotations
|
||||||
needs:
|
needs:
|
||||||
@@ -418,7 +98,6 @@ jobs:
|
|||||||
- linux
|
- linux
|
||||||
- macos
|
- macos
|
||||||
- windows
|
- windows
|
||||||
- msys2
|
|
||||||
|
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
|
|
||||||
|
65
.github/workflows/ci-emscripten.yml
vendored
Normal file
65
.github/workflows/ci-emscripten.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: CI (Emscripten)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
emscripten:
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
# If you change this version, change the number in the cache step too.
|
||||||
|
image: emscripten/emsdk:3.1.57
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Fix dubious ownership
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||||
|
|
||||||
|
- name: Setup cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /emsdk/upstream/emscripten/cache
|
||||||
|
key: 3.1.57-${{ runner.os }}
|
||||||
|
|
||||||
|
- name: Add liblzma support
|
||||||
|
run: |
|
||||||
|
cp ${GITHUB_WORKSPACE}/os/emscripten/ports/liblzma.py /emsdk/upstream/emscripten/tools/ports/contrib/
|
||||||
|
|
||||||
|
- name: Build (host tools)
|
||||||
|
run: |
|
||||||
|
mkdir build-host
|
||||||
|
cd build-host
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. -DOPTION_TOOLS_ONLY=ON
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(nproc) cores"
|
||||||
|
cmake --build . -j $(nproc) --target tools
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Install GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
emcmake cmake .. -DHOST_BINARY_DIR=../build-host
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(nproc) cores"
|
||||||
|
cmake --build . -j $(nproc) --target openttd
|
||||||
|
echo "::endgroup::"
|
126
.github/workflows/ci-linux.yml
vendored
Normal file
126
.github/workflows/ci-linux.yml
vendored
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
name: CI (Linux)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
compiler:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
cxxcompiler:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
libraries:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
extra-cmake-parameters:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
CC: ${{ inputs.compiler }}
|
||||||
|
CXX: ${{ inputs.cxxcompiler }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup vcpkg caching
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||||
|
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
echo "::group::Update apt"
|
||||||
|
sudo apt-get update
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Install dependencies"
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
liballegro4-dev \
|
||||||
|
libcurl4-openssl-dev \
|
||||||
|
libfontconfig-dev \
|
||||||
|
libharfbuzz-dev \
|
||||||
|
libicu-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
liblzo2-dev \
|
||||||
|
libogg-dev \
|
||||||
|
libopus-dev \
|
||||||
|
libopusfile-dev \
|
||||||
|
${{ inputs.libraries }} \
|
||||||
|
zlib1g-dev \
|
||||||
|
# EOF
|
||||||
|
|
||||||
|
echo "::group::Install vcpkg dependencies"
|
||||||
|
|
||||||
|
# Disable vcpkg integration, as we mostly use system libraries.
|
||||||
|
mv vcpkg.json vcpkg-disabled.json
|
||||||
|
|
||||||
|
# We only use breakpad from vcpkg, as its CMake files
|
||||||
|
# are a bit special. So the Ubuntu's variant doesn't work.
|
||||||
|
${{ runner.temp }}/vcpkg/vcpkg install breakpad
|
||||||
|
|
||||||
|
echo "::endgroup::"
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
|
- name: Get OpenGFX
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.local/share/openttd/baseset
|
||||||
|
cd ~/.local/share/openttd/baseset
|
||||||
|
|
||||||
|
echo "::group::Download OpenGFX"
|
||||||
|
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Unpack OpenGFX"
|
||||||
|
unzip opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
rm -f opengfx-all.zip
|
||||||
|
|
||||||
|
- name: Install GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake ${{ inputs.extra-cmake-parameters }}
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(nproc) cores"
|
||||||
|
cmake --build . -j $(nproc)
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
(
|
||||||
|
cd build
|
||||||
|
ctest -j $(nproc) --timeout 120
|
||||||
|
)
|
||||||
|
|
||||||
|
# Re-enable vcpkg.
|
||||||
|
mv vcpkg-disabled.json vcpkg.json
|
||||||
|
|
||||||
|
# Check no tracked files have been modified.
|
||||||
|
git diff --exit-code
|
90
.github/workflows/ci-macos.yml
vendored
Normal file
90
.github/workflows/ci-macos.yml
vendored
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
name: CI (MacOS)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
full_arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
extra-cmake-parameters:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
macos:
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
runs-on: macos-latest
|
||||||
|
env:
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup Xcode version
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest-stable
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup vcpkg caching
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||||
|
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
|
- name: Install OpenGFX
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/Documents/OpenTTD/baseset
|
||||||
|
cd ~/Documents/OpenTTD/baseset
|
||||||
|
|
||||||
|
echo "::group::Download OpenGFX"
|
||||||
|
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Unpack OpenGFX"
|
||||||
|
unzip opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
rm -f opengfx-all.zip
|
||||||
|
|
||||||
|
- name: Install GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. \
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=${{ inputs.full_arch }} \
|
||||||
|
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-osx \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
|
${{ inputs.extra-cmake-parameters }} \
|
||||||
|
# EOF
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(sysctl -n hw.logicalcpu) cores"
|
||||||
|
cmake --build . -j $(sysctl -n hw.logicalcpu)
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest -j $(sysctl -n hw.logicalcpu) --timeout 120
|
86
.github/workflows/ci-mingw.yml
vendored
Normal file
86
.github/workflows/ci-mingw.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: CI (MinGW)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
msystem:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mingw:
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup MSYS2
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: ${{ inputs.msystem }}
|
||||||
|
release: false
|
||||||
|
install: >-
|
||||||
|
git
|
||||||
|
make
|
||||||
|
mingw-w64-${{ inputs.arch }}-cmake
|
||||||
|
mingw-w64-${{ inputs.arch }}-gcc
|
||||||
|
mingw-w64-${{ inputs.arch }}-lzo2
|
||||||
|
mingw-w64-${{ inputs.arch }}-libpng
|
||||||
|
mingw-w64-${{ inputs.arch }}-lld
|
||||||
|
mingw-w64-${{ inputs.arch }}-ninja
|
||||||
|
mingw-w64-${{ inputs.arch }}-libogg
|
||||||
|
mingw-w64-${{ inputs.arch }}-opus
|
||||||
|
mingw-w64-${{ inputs.arch }}-opusfile
|
||||||
|
|
||||||
|
- name: Install OpenGFX
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||||
|
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||||
|
|
||||||
|
echo "::group::Download OpenGFX"
|
||||||
|
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Unpack OpenGFX"
|
||||||
|
unzip opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
rm -f opengfx-all.zip
|
||||||
|
|
||||||
|
- name: Install GCC problem matcher
|
||||||
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
shell: msys2 {0}
|
||||||
|
env:
|
||||||
|
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. \
|
||||||
|
-GNinja \
|
||||||
|
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||||
|
# EOF
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
cmake --build .
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest --timeout 120
|
82
.github/workflows/ci-nightly.yml
vendored
Normal file
82
.github/workflows/ci-nightly.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
name: CI - Nightly
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: GCC - SDL1.2
|
||||||
|
compiler: gcc
|
||||||
|
cxxcompiler: g++
|
||||||
|
libraries: libsdl1.2-dev
|
||||||
|
|
||||||
|
name: Linux (${{ matrix.name }})
|
||||||
|
|
||||||
|
uses: ./.github/workflows/ci-linux.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
with:
|
||||||
|
compiler: ${{ matrix.compiler }}
|
||||||
|
cxxcompiler: ${{ matrix.cxxcompiler }}
|
||||||
|
libraries: ${{ matrix.libraries }}
|
||||||
|
extra-cmake-parameters:
|
||||||
|
|
||||||
|
macos:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: x64
|
||||||
|
full_arch: x86_64
|
||||||
|
|
||||||
|
name: Mac OS (${{ matrix.arch }})
|
||||||
|
|
||||||
|
uses: ./.github/workflows/ci-macos.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
full_arch: ${{ matrix.full_arch }}
|
||||||
|
|
||||||
|
mingw:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- msystem: MINGW64
|
||||||
|
arch: x86_64
|
||||||
|
- msystem: MINGW32
|
||||||
|
arch: i686
|
||||||
|
|
||||||
|
name: MinGW (${{ matrix.arch }})
|
||||||
|
|
||||||
|
uses: ./.github/workflows/ci-mingw.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
with:
|
||||||
|
msystem: ${{ matrix.msystem }}
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
check_annotations:
|
||||||
|
name: Check Annotations
|
||||||
|
needs:
|
||||||
|
- linux
|
||||||
|
- macos
|
||||||
|
- mingw
|
||||||
|
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check annotations
|
||||||
|
uses: OpenTTD/actions/annotation-check@v5
|
84
.github/workflows/ci-windows.yml
vendored
Normal file
84
.github/workflows/ci-windows.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
name: CI (Windows)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
windows:
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup vcpkg caching
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||||
|
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||||
|
|
||||||
|
- name: Install OpenGFX
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||||
|
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
||||||
|
|
||||||
|
echo "::group::Download OpenGFX"
|
||||||
|
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Unpack OpenGFX"
|
||||||
|
unzip opengfx-all.zip
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
rm -f opengfx-all.zip
|
||||||
|
|
||||||
|
- name: Install MSVC problem matcher
|
||||||
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
|
- name: Configure developer command prompt for ${{ inputs.arch }}
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: ${{ inputs.arch }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. \
|
||||||
|
-GNinja \
|
||||||
|
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-static \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||||
|
# EOF
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
cmake --build .
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ctest --timeout 120
|
44
.github/workflows/codeql.yml
vendored
44
.github/workflows/codeql.yml
vendored
@@ -26,6 +26,19 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup vcpkg caching
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||||
|
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
echo "::group::Update apt"
|
echo "::group::Update apt"
|
||||||
@@ -41,16 +54,33 @@ jobs:
|
|||||||
libicu-dev \
|
libicu-dev \
|
||||||
liblzma-dev \
|
liblzma-dev \
|
||||||
liblzo2-dev \
|
liblzo2-dev \
|
||||||
|
libopus-dev \
|
||||||
|
libopusfile-dev \
|
||||||
libsdl2-dev \
|
libsdl2-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
# EOF
|
# EOF
|
||||||
|
|
||||||
|
echo "::group::Install vcpkg dependencies"
|
||||||
|
|
||||||
|
# Disable vcpkg integration, as we mostly use system libraries.
|
||||||
|
mv vcpkg.json vcpkg-disabled.json
|
||||||
|
|
||||||
|
# We only use breakpad from vcpkg, as its CMake files
|
||||||
|
# are a bit special. So the Ubuntu's variant doesn't work.
|
||||||
|
${{ runner.temp }}/vcpkg/vcpkg install breakpad
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
- name: Set number of make jobs
|
- name: Prepare build
|
||||||
run: |
|
run: |
|
||||||
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::CMake"
|
||||||
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
@@ -58,8 +88,14 @@ jobs:
|
|||||||
languages: cpp
|
languages: cpp
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Build
|
||||||
uses: github/codeql-action/autobuild@v3
|
run: |
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "::group::Build"
|
||||||
|
echo "Running on $(nproc) cores"
|
||||||
|
cmake --build . -j $(nproc)
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3
|
||||||
|
9
.github/workflows/preview-build.yml
vendored
9
.github/workflows/preview-build.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
# If you change this version, change the number in the cache step too.
|
# If you change this version, change the number in the cache step too.
|
||||||
image: emscripten/emsdk:3.1.42
|
image: emscripten/emsdk:3.1.57
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -38,12 +38,11 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: /emsdk/upstream/emscripten/cache
|
path: /emsdk/upstream/emscripten/cache
|
||||||
key: 3.1.42-${{ runner.os }}
|
key: 3.1.57-${{ runner.os }}
|
||||||
|
|
||||||
- name: Patch Emscripten to support LZMA
|
- name: Add liblzma support
|
||||||
run: |
|
run: |
|
||||||
cd /emsdk/upstream/emscripten
|
cp ${GITHUB_WORKSPACE}/os/emscripten/ports/liblzma.py /emsdk/upstream/emscripten/tools/ports/contrib/
|
||||||
patch -p1 < ${GITHUB_WORKSPACE}/os/emscripten/emsdk-liblzma.patch
|
|
||||||
|
|
||||||
- name: Build (host tools)
|
- name: Build (host tools)
|
||||||
run: |
|
run: |
|
||||||
|
1
.github/workflows/preview.yml
vendored
1
.github/workflows/preview.yml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- release/**
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||||
|
2
.github/workflows/release-docs.yml
vendored
2
.github/workflows/release-docs.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
docs:
|
docs:
|
||||||
name: Docs
|
name: Docs
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download source
|
- name: Download source
|
||||||
|
2
.github/workflows/release-linux.yml
vendored
2
.github/workflows/release-linux.yml
vendored
@@ -124,7 +124,7 @@ jobs:
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo "::group::Install breakpad dependencies"
|
echo "::group::Install breakpad dependencies"
|
||||||
cargo install dump_syms
|
cargo install --locked dump_syms
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
- name: Install GCC problem matcher
|
||||||
|
18
.github/workflows/release-macos.yml
vendored
18
.github/workflows/release-macos.yml
vendored
@@ -17,6 +17,11 @@ jobs:
|
|||||||
MACOSX_DEPLOYMENT_TARGET: 10.13
|
MACOSX_DEPLOYMENT_TARGET: 10.13
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup Xcode version
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest-stable
|
||||||
|
|
||||||
- name: Download source
|
- name: Download source
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -40,6 +45,11 @@ jobs:
|
|||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||||
|
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
@@ -52,7 +62,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Install breakpad dependencies"
|
echo "::group::Install breakpad dependencies"
|
||||||
cargo install dump_syms
|
cargo install --locked dump_syms
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install GCC problem matcher
|
- name: Install GCC problem matcher
|
||||||
@@ -76,7 +86,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Import code signing certificates
|
- name: Import code signing certificates
|
||||||
uses: Apple-Actions/import-codesign-certs@v2
|
uses: Apple-Actions/import-codesign-certs@v3
|
||||||
with:
|
with:
|
||||||
# The certificates in a PKCS12 file encoded as a base64 string
|
# The certificates in a PKCS12 file encoded as a base64 string
|
||||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
||||||
@@ -94,7 +104,7 @@ jobs:
|
|||||||
cmake ${GITHUB_WORKSPACE} \
|
cmake ${GITHUB_WORKSPACE} \
|
||||||
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
||||||
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
-DVCPKG_TARGET_TRIPLET=arm64-osx \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
@@ -115,7 +125,7 @@ jobs:
|
|||||||
cmake ${GITHUB_WORKSPACE} \
|
cmake ${GITHUB_WORKSPACE} \
|
||||||
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
||||||
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
-DVCPKG_TARGET_TRIPLET=x64-osx \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
|
4
.github/workflows/release-source.yml
vendored
4
.github/workflows/release-source.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
source:
|
source:
|
||||||
name: Source
|
name: Source
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.metadata.outputs.version }}
|
version: ${{ steps.metadata.outputs.version }}
|
||||||
@@ -127,7 +127,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p build/bundles
|
mkdir -p build/bundles
|
||||||
cp .changelog build/bundles/changelog.txt
|
cp .changelog build/bundles/changelog.md
|
||||||
cp .release_date build/bundles/released.txt
|
cp .release_date build/bundles/released.txt
|
||||||
cp README.md build/bundles/README.md
|
cp README.md build/bundles/README.md
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
54
.github/workflows/release-windows.yml
vendored
54
.github/workflows/release-windows.yml
vendored
@@ -53,6 +53,11 @@ jobs:
|
|||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||||
|
|
||||||
|
- name: Install vcpkg
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||||
|
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -61,7 +66,7 @@ jobs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Install breakpad dependencies"
|
echo "::group::Install breakpad dependencies"
|
||||||
cargo install dump_syms
|
cargo install --locked dump_syms
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install MSVC problem matcher
|
- name: Install MSVC problem matcher
|
||||||
@@ -95,21 +100,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
arch: ${{ matrix.host }}
|
arch: ${{ matrix.host }}
|
||||||
|
|
||||||
- name: Import code signing certificate
|
|
||||||
shell: powershell
|
|
||||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
$tempFile = [System.IO.Path]::GetTempFileName()
|
|
||||||
$bytes = [System.Convert]::FromBase64String($env:WINDOWS_CERTIFICATE_P12)
|
|
||||||
[IO.File]::WriteAllBytes($tempFile, $bytes)
|
|
||||||
$pwd = ConvertTo-SecureString $env:WINDOWS_CERTIFICATE_PASSWORD -AsPlainText -Force
|
|
||||||
Import-PfxCertificate -FilePath $tempFile -CertStoreLocation Cert:\CurrentUser\My -Password $pwd
|
|
||||||
Remove-Item $tempFile
|
|
||||||
env:
|
|
||||||
WINDOWS_CERTIFICATE_P12: ${{ secrets.WINDOWS_CERTIFICATE_P12 }}
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build (with installer)
|
- name: Build (with installer)
|
||||||
if: inputs.is_tag == 'true'
|
if: inputs.is_tag == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -121,12 +111,11 @@ jobs:
|
|||||||
cmake ${GITHUB_WORKSPACE} \
|
cmake ${GITHUB_WORKSPACE} \
|
||||||
-GNinja \
|
-GNinja \
|
||||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||||
-DOPTION_USE_NSIS=ON \
|
-DOPTION_USE_NSIS=ON \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
-DWINDOWS_CERTIFICATE_COMMON_NAME="${WINDOWS_CERTIFICATE_COMMON_NAME}" \
|
|
||||||
# EOF
|
# EOF
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
@@ -134,7 +123,12 @@ jobs:
|
|||||||
cmake --build . --target openttd
|
cmake --build . --target openttd
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
env:
|
env:
|
||||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||||
|
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||||
|
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||||
|
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||||
|
|
||||||
- name: Build (without installer)
|
- name: Build (without installer)
|
||||||
if: inputs.is_tag != 'true'
|
if: inputs.is_tag != 'true'
|
||||||
@@ -147,11 +141,10 @@ jobs:
|
|||||||
cmake ${GITHUB_WORKSPACE} \
|
cmake ${GITHUB_WORKSPACE} \
|
||||||
-GNinja \
|
-GNinja \
|
||||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
|
||||||
-DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
||||||
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
|
||||||
-DWINDOWS_CERTIFICATE_COMMON_NAME="${WINDOWS_CERTIFICATE_COMMON_NAME}" \
|
|
||||||
# EOF
|
# EOF
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
@@ -159,7 +152,12 @@ jobs:
|
|||||||
cmake --build . --target openttd
|
cmake --build . --target openttd
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
env:
|
env:
|
||||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||||
|
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||||
|
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||||
|
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||||
|
|
||||||
- name: Create breakpad symbols
|
- name: Create breakpad symbols
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -193,13 +191,15 @@ jobs:
|
|||||||
- name: Sign installer
|
- name: Sign installer
|
||||||
if: inputs.is_tag == 'true'
|
if: inputs.is_tag == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
# If this is run on a fork, there may not be a certificate set up - continue in this case
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}/build/bundles
|
${GITHUB_WORKSPACE}/os/windows/sign.bat "${GITHUB_WORKSPACE}/build/bundles"
|
||||||
../../os/windows/sign.bat *.exe "${WINDOWS_CERTIFICATE_COMMON_NAME}"
|
|
||||||
env:
|
env:
|
||||||
WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }}
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||||
|
AZURE_CODESIGN_ACCOUNT_NAME: ${{ secrets.AZURE_CODESIGN_ACCOUNT_NAME }}
|
||||||
|
AZURE_CODESIGN_ENDPOINT: ${{ secrets.AZURE_CODESIGN_ENDPOINT }}
|
||||||
|
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
|
||||||
|
|
||||||
- name: Store bundles
|
- name: Store bundles
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
2
.github/workflows/upload-gog.yml
vendored
2
.github/workflows/upload-gog.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
upload:
|
upload:
|
||||||
name: Upload (GOG)
|
name: Upload (GOG)
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download source
|
- name: Download source
|
||||||
|
2
.github/workflows/upload-steam.yml
vendored
2
.github/workflows/upload-steam.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
upload:
|
upload:
|
||||||
name: Upload (Steam)
|
name: Upload (Steam)
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download source
|
- name: Download source
|
||||||
|
@@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(${BINARY_NAME}
|
project(${BINARY_NAME}
|
||||||
VERSION 14.0
|
VERSION 15.0
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -152,9 +152,10 @@ if(NOT OPTION_DEDICATED)
|
|||||||
find_package(Fontconfig)
|
find_package(Fontconfig)
|
||||||
endif()
|
endif()
|
||||||
find_package(Harfbuzz)
|
find_package(Harfbuzz)
|
||||||
find_package(ICU OPTIONAL_COMPONENTS i18n)
|
find_package(ICU OPTIONAL_COMPONENTS i18n uc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
find_package(OpusFile)
|
||||||
endif()
|
endif()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
enable_language(OBJCXX)
|
enable_language(OBJCXX)
|
||||||
@@ -331,6 +332,8 @@ if(NOT OPTION_DEDICATED)
|
|||||||
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
|
link_package(Fontconfig TARGET Fontconfig::Fontconfig)
|
||||||
link_package(Harfbuzz TARGET harfbuzz::harfbuzz)
|
link_package(Harfbuzz TARGET harfbuzz::harfbuzz)
|
||||||
link_package(ICU_i18n)
|
link_package(ICU_i18n)
|
||||||
|
link_package(ICU_uc)
|
||||||
|
link_package(OpusFile TARGET OpusFile::opusfile)
|
||||||
|
|
||||||
if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
|
if(SDL2_FOUND AND OPENGL_FOUND AND UNIX)
|
||||||
# SDL2 dynamically loads OpenGL if needed, so do not link to OpenGL when
|
# SDL2 dynamically loads OpenGL if needed, so do not link to OpenGL when
|
||||||
@@ -343,7 +346,7 @@ if(NOT OPTION_DEDICATED)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CheckAtomic)
|
include(3rdparty/llvm/CheckAtomic)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
link_package(Iconv TARGET Iconv::Iconv)
|
link_package(Iconv TARGET Iconv::Iconv)
|
||||||
@@ -388,8 +391,8 @@ if(EMSCRIPTEN)
|
|||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CREDITS.md@/CREDITS.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CREDITS.md@/CREDITS.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CONTRIBUTING.md@/CONTRIBUTING.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CONTRIBUTING.md@/CONTRIBUTING.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/COPYING.md@/COPYING.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/COPYING.md@/COPYING.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/known-bugs.txt@/known-bugs.txt")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/known-bugs.md@/known-bugs.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/changelog.txt@/changelog.txt")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/changelog.md@/changelog.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/admin_network.md@/docs/admin_network.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/admin_network.md@/docs/admin_network.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md@/docs/debugging_desyncs.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md@/docs/debugging_desyncs.md")
|
||||||
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/desync.md@/docs/desync.md")
|
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/desync.md@/docs/desync.md")
|
||||||
|
@@ -157,7 +157,7 @@ enum SomeEnumeration {
|
|||||||
* Use curly braces and put the contained statements on their own lines (e.g., don't put them directly after the **if**).
|
* Use curly braces and put the contained statements on their own lines (e.g., don't put them directly after the **if**).
|
||||||
* Opening curly bracket **{** stays on the first line, closing curly bracket **}** gets a line to itself (except for the **}** preceding an **else**, which should be on the same line as the **else**).
|
* Opening curly bracket **{** stays on the first line, closing curly bracket **}** gets a line to itself (except for the **}** preceding an **else**, which should be on the same line as the **else**).
|
||||||
* When only a single statement is contained, the brackets can be omitted. In this case, put the single statement on the same line as the preceding keyword (**if**, **while**, etc.). Note that this is only allowed for if statements without an **else** clause.
|
* When only a single statement is contained, the brackets can be omitted. In this case, put the single statement on the same line as the preceding keyword (**if**, **while**, etc.). Note that this is only allowed for if statements without an **else** clause.
|
||||||
* All fall throughs must be documented, using a **FALLTHROUGH** define/macro.
|
* Non-trivial fall throughs must be documented, using a `[[fallthrough]]` attribute.
|
||||||
* The NOT_REACHED() macro can be used in default constructs that should never be reached.
|
* The NOT_REACHED() macro can be used in default constructs that should never be reached.
|
||||||
* Unconditional loops are written with **`for (;;) {`**
|
* Unconditional loops are written with **`for (;;) {`**
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ switch (a) {
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
DoSomething();
|
DoSomething();
|
||||||
FALLTHROUGH;
|
[[fallthrough]];
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
DoMore();
|
DoMore();
|
||||||
@@ -191,7 +191,7 @@ switch (a) {
|
|||||||
int r = 2;
|
int r = 2;
|
||||||
|
|
||||||
DoEvenMore(a);
|
DoEvenMore(a);
|
||||||
FALLTHROUGH;
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
|
|
||||||
case 4: {
|
case 4: {
|
||||||
@@ -248,12 +248,46 @@ Templates are a very powerful C++ tool, but they can easily confuse beginners. T
|
|||||||
* Templates are to be documented in a very clear and verbose manner. Never assume anything in the documentation.
|
* Templates are to be documented in a very clear and verbose manner. Never assume anything in the documentation.
|
||||||
* the template keyword and the template layout get a separate line. typenames are either "T" or preceded by a "T", integers get a single capital letter or a descriptive name preceded by "T".
|
* the template keyword and the template layout get a separate line. typenames are either "T" or preceded by a "T", integers get a single capital letter or a descriptive name preceded by "T".
|
||||||
```c++
|
```c++
|
||||||
template <typename T, typename Tsomething, int N, byte Tnumber_of_something>
|
template <typename T, typename Tsomething, int N, uint8_t Tnumber_of_something>
|
||||||
int Func();
|
int Func();
|
||||||
```
|
```
|
||||||
|
|
||||||
* If you are writing one or more template class in the dedicated header file, use file.hpp for its name instead of file.h. This will let others know that it is template library (includes also implementation), not just header with declarations.
|
* If you are writing one or more template class in the dedicated header file, use file.hpp for its name instead of file.h. This will let others know that it is template library (includes also implementation), not just header with declarations.
|
||||||
|
|
||||||
|
### Code Comment Vertical Alignment
|
||||||
|
|
||||||
|
When adding code or comments to an existing formatted section, follow the existing style if possible without editing the preexisting lines.
|
||||||
|
|
||||||
|
If your addition cannot be aligned with existing code, do not align the comments with anything and use only a single space between the code and the comment.
|
||||||
|
|
||||||
|
Good:
|
||||||
|
|
||||||
|
```c++
|
||||||
|
enum Vehicle {
|
||||||
|
BUS, ///< Take the bus.
|
||||||
|
+ CAR, ///< Drive your car.
|
||||||
|
BIKE, ///< Ride your bike
|
||||||
|
+ TRAIN, ///< Catch the train.
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
"Car" is shorter than Bike which allows you to easily align the new comment. "Train" is longer. It is *NOT* desirable to change the vertical comment alignment of this enum.
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
```c++
|
||||||
|
enum Vehicle {
|
||||||
|
- BUS, ///< Take the bus.
|
||||||
|
- BIKE, ///< Ride your bike
|
||||||
|
+ BUS, ///< Take the bus.
|
||||||
|
+ CAR, ///< Drive your car.
|
||||||
|
+ BIKE, ///< Ride your bike
|
||||||
|
+ TRAIN, ///< Catch the train.
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
OpenTTD used to vertically-align inline Doxygen comments as shown above. OpenTTD has since stopped strictly following this rule to keep diffs smaller and reduce pollution to the git blame history for non-functional changes.
|
||||||
|
|
||||||
### Other important rules
|
### Other important rules
|
||||||
* Put a space before and after binary operators: "a + b", "a == b", "a & b", "a <<= b", etc.. Exceptions are ".", "->" and "[]" (no spaces) and "," (just space after it).
|
* Put a space before and after binary operators: "a + b", "a == b", "a & b", "a <<= b", etc.. Exceptions are ".", "->" and "[]" (no spaces) and "," (just space after it).
|
||||||
* Put parenthesis where it improves readability: "*(b++)" instead of "*b++", and "if ((a & b) && c == 2)" instead of "if (a & b && c == 2)".
|
* Put parenthesis where it improves readability: "*(b++)" instead of "*b++", and "if ((a & b) && c == 2)" instead of "if (a & b && c == 2)".
|
||||||
@@ -448,7 +482,7 @@ Do not mention two keywords; if two apply, pick one that best represents the com
|
|||||||
|
|
||||||
The `<details>` part starts with a capital and does not end with a dot.
|
The `<details>` part starts with a capital and does not end with a dot.
|
||||||
Try to be descriptive to what the player will notice, not to what is actually being changed in the code.
|
Try to be descriptive to what the player will notice, not to what is actually being changed in the code.
|
||||||
See `changelog.txt` for inspiration.
|
See `changelog.md` for inspiration.
|
||||||
|
|
||||||
To further structure the changelog, you can add components. Example are:
|
To further structure the changelog, you can add components. Example are:
|
||||||
* "Network" for network specific changes.
|
* "Network" for network specific changes.
|
||||||
|
15
COMPILING.md
15
COMPILING.md
@@ -29,7 +29,7 @@ open most older savegames or use the content downloading system.
|
|||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
You need Microsoft Visual Studio 2017 or more recent.
|
You need Microsoft Visual Studio 2022 or more recent.
|
||||||
|
|
||||||
You can download the free Visual Studio Community Edition from Microsoft at
|
You can download the free Visual Studio Community Edition from Microsoft at
|
||||||
https://visualstudio.microsoft.com/vs/community/.
|
https://visualstudio.microsoft.com/vs/community/.
|
||||||
@@ -65,7 +65,7 @@ To install both the x64 (64bit) and x86 (32bit) variants (though only one is nec
|
|||||||
|
|
||||||
You can open the folder (as a CMake project). CMake will be detected, and you can compile from there.
|
You can open the folder (as a CMake project). CMake will be detected, and you can compile from there.
|
||||||
If libraries are installed but not found, you need to set VCPKG_TARGET_TRIPLET in CMake parameters.
|
If libraries are installed but not found, you need to set VCPKG_TARGET_TRIPLET in CMake parameters.
|
||||||
For Visual Studio 2017 you also need to set CMAKE_TOOLCHAIN_FILE.
|
For Visual Studio 2022 you also need to set CMAKE_TOOLCHAIN_FILE.
|
||||||
(Typical values are shown in the MSVC project file command line example)
|
(Typical values are shown in the MSVC project file command line example)
|
||||||
|
|
||||||
Alternatively, you can create a MSVC project file via CMake. For this
|
Alternatively, you can create a MSVC project file via CMake. For this
|
||||||
@@ -75,7 +75,7 @@ that comes with vcpkg. After that, you can run something similar to this:
|
|||||||
```powershell
|
```powershell
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake.exe .. -G"Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
|
cmake.exe .. -G"Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="<location of vcpkg>\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
|
||||||
```
|
```
|
||||||
|
|
||||||
Change `<location of vcpkg>` to where you have installed vcpkg. After this
|
Change `<location of vcpkg>` to where you have installed vcpkg. After this
|
||||||
@@ -83,7 +83,7 @@ in the build folder are MSVC project files. MSVC can rebuild the project
|
|||||||
files himself via the `ZERO_CHECK` project.
|
files himself via the `ZERO_CHECK` project.
|
||||||
|
|
||||||
## All other platforms
|
## All other platforms
|
||||||
Minimum required version of CMake is 3.9.
|
Minimum required version of CMake is 3.16.
|
||||||
By default this produces a Debug build with assertations enabled.
|
By default this produces a Debug build with assertations enabled.
|
||||||
This is a far slower build than release builds.
|
This is a far slower build than release builds.
|
||||||
|
|
||||||
@@ -110,17 +110,14 @@ builds.
|
|||||||
- `-DOPTION_USE_ASSERTS=OFF`: disable asserts. Use with care, as assert
|
- `-DOPTION_USE_ASSERTS=OFF`: disable asserts. Use with care, as assert
|
||||||
statements capture early signs of trouble. Release builds have them
|
statements capture early signs of trouble. Release builds have them
|
||||||
disabled by default.
|
disabled by default.
|
||||||
- `-DOPTION_USE_THREADS=OFF`: disable the use of threads. This will block
|
|
||||||
the interface in many places, and in general gives a worse experience of
|
|
||||||
the game. Use with care.
|
|
||||||
- `-DOPTION_TOOLS_ONLY=ON`: only build tools like `strgen`. Does not build
|
- `-DOPTION_TOOLS_ONLY=ON`: only build tools like `strgen`. Does not build
|
||||||
the game itself. Useful for cross-compiling.
|
the game itself. Useful for cross-compiling.
|
||||||
|
|
||||||
## Supported compilers
|
## Supported compilers
|
||||||
|
|
||||||
Every compiler that is supported by CMake and supports C++17, should be
|
Every compiler that is supported by CMake and supports C++20, should be
|
||||||
able to compile OpenTTD. As the exact list of compilers changes constantly,
|
able to compile OpenTTD. As the exact list of compilers changes constantly,
|
||||||
we refer to the compiler manual to see if it supports C++17, and to CMake
|
we refer to the compiler manual to see if it supports C++20, and to CMake
|
||||||
to see if it supports your compiler.
|
to see if it supports your compiler.
|
||||||
|
|
||||||
## Compilation of base sets
|
## Compilation of base sets
|
||||||
|
@@ -3,14 +3,15 @@
|
|||||||
- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
|
- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3)
|
||||||
- Christoph Elsenhans (frosch) - General coding (since 0.6)
|
- Christoph Elsenhans (frosch) - General coding (since 0.6)
|
||||||
- Loïc Guilloux (glx) - General / Windows Expert (since 0.4.5)
|
- Loïc Guilloux (glx) - General / Windows Expert (since 0.4.5)
|
||||||
|
- Koen Bussemaker (Kuhnovic) - General / Ship pathfinder (since 14)
|
||||||
- Charles Pigott (LordAro) - General / Correctness police (since 1.9)
|
- Charles Pigott (LordAro) - General / Correctness police (since 1.9)
|
||||||
- Michael Lutz (michi_cc) - General / Path based signals (since 0.7)
|
- Michael Lutz (michi_cc) - General / Path based signals (since 0.7)
|
||||||
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
|
- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9)
|
||||||
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
|
- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1)
|
||||||
- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5)
|
- Peter Nelson (peter1138) - Spiritual descendant from NewGRF gods (since 0.4.5)
|
||||||
- Remko Bijker (Rubidium) - Coder and way more (since 0.4.5)
|
- Remko Bijker (Rubidium) - Coder and way more (since 0.4.5)
|
||||||
- Patric Stout (TrueBrain) - NoProgrammer (since 0.3), sys op
|
- Patric Stout (TrueBrain) - NoProgrammer (since 0.3), sys op
|
||||||
- Tyler Trahan (2TallTyler) - General coding (since 13)
|
- Tyler Trahan (2TallTyler) - General / Time Lord (since 13)
|
||||||
|
|
||||||
### Inactive Developers:
|
### Inactive Developers:
|
||||||
|
|
||||||
|
32
Doxyfile.in
32
Doxyfile.in
@@ -3,6 +3,8 @@
|
|||||||
# 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.
|
# 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/>.
|
# 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/>.
|
||||||
|
|
||||||
|
# Doxyfile 1.9.4
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Project related configuration options
|
# Project related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -13,6 +15,7 @@ PROJECT_BRIEF =
|
|||||||
PROJECT_LOGO =
|
PROJECT_LOGO =
|
||||||
OUTPUT_DIRECTORY = ${CPACK_BINARY_DIR}/docs/source/
|
OUTPUT_DIRECTORY = ${CPACK_BINARY_DIR}/docs/source/
|
||||||
CREATE_SUBDIRS = YES
|
CREATE_SUBDIRS = YES
|
||||||
|
CREATE_SUBDIRS_LEVEL = 8
|
||||||
ALLOW_UNICODE_NAMES = NO
|
ALLOW_UNICODE_NAMES = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
@@ -35,8 +38,10 @@ STRIP_FROM_PATH = ./
|
|||||||
STRIP_FROM_INC_PATH =
|
STRIP_FROM_INC_PATH =
|
||||||
SHORT_NAMES = NO
|
SHORT_NAMES = NO
|
||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
|
JAVADOC_BANNER = NO
|
||||||
QT_AUTOBRIEF = NO
|
QT_AUTOBRIEF = NO
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
PYTHON_DOCSTRING = YES
|
||||||
INHERIT_DOCS = YES
|
INHERIT_DOCS = YES
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
TAB_SIZE = 2
|
TAB_SIZE = 2
|
||||||
@@ -45,6 +50,7 @@ OPTIMIZE_OUTPUT_FOR_C = YES
|
|||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
OPTIMIZE_OUTPUT_SLICE = NO
|
||||||
EXTENSION_MAPPING =
|
EXTENSION_MAPPING =
|
||||||
MARKDOWN_SUPPORT = YES
|
MARKDOWN_SUPPORT = YES
|
||||||
TOC_INCLUDE_HEADINGS = 0
|
TOC_INCLUDE_HEADINGS = 0
|
||||||
@@ -60,16 +66,19 @@ INLINE_GROUPED_CLASSES = NO
|
|||||||
INLINE_SIMPLE_STRUCTS = NO
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
TYPEDEF_HIDES_STRUCT = NO
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
LOOKUP_CACHE_SIZE = 0
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
NUM_PROC_THREADS = 1
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Build related configuration options
|
# Build related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
EXTRACT_ALL = NO
|
EXTRACT_ALL = NO
|
||||||
EXTRACT_PRIVATE = YES
|
EXTRACT_PRIVATE = YES
|
||||||
|
EXTRACT_PRIV_VIRTUAL = NO
|
||||||
EXTRACT_PACKAGE = NO
|
EXTRACT_PACKAGE = NO
|
||||||
EXTRACT_STATIC = YES
|
EXTRACT_STATIC = YES
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
EXTRACT_LOCAL_METHODS = YES
|
EXTRACT_LOCAL_METHODS = YES
|
||||||
EXTRACT_ANON_NSPACES = YES
|
EXTRACT_ANON_NSPACES = YES
|
||||||
|
RESOLVE_UNNAMED_PARAMS = YES
|
||||||
HIDE_UNDOC_MEMBERS = NO
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
HIDE_UNDOC_CLASSES = NO
|
HIDE_UNDOC_CLASSES = NO
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
@@ -78,6 +87,7 @@ INTERNAL_DOCS = NO
|
|||||||
CASE_SENSE_NAMES = YES
|
CASE_SENSE_NAMES = YES
|
||||||
HIDE_SCOPE_NAMES = NO
|
HIDE_SCOPE_NAMES = NO
|
||||||
HIDE_COMPOUND_REFERENCE= NO
|
HIDE_COMPOUND_REFERENCE= NO
|
||||||
|
SHOW_HEADERFILE = YES
|
||||||
SHOW_INCLUDE_FILES = YES
|
SHOW_INCLUDE_FILES = YES
|
||||||
SHOW_GROUPED_MEMB_INC = NO
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
FORCE_LOCAL_INCLUDES = NO
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
@@ -107,9 +117,11 @@ QUIET = NO
|
|||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_IF_INCOMPLETE_DOC = YES
|
||||||
WARN_NO_PARAMDOC = NO
|
WARN_NO_PARAMDOC = NO
|
||||||
WARN_AS_ERROR = NO
|
WARN_AS_ERROR = NO
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LINE_FORMAT = "at line $line of file $file"
|
||||||
WARN_LOGFILE =
|
WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the input files
|
# Configuration options related to the input files
|
||||||
@@ -150,6 +162,10 @@ REFERENCES_LINK_SOURCE = YES
|
|||||||
SOURCE_TOOLTIPS = YES
|
SOURCE_TOOLTIPS = YES
|
||||||
USE_HTAGS = NO
|
USE_HTAGS = NO
|
||||||
VERBATIM_HEADERS = YES
|
VERBATIM_HEADERS = YES
|
||||||
|
CLANG_ASSISTED_PARSING = NO
|
||||||
|
CLANG_ADD_INC_PATHS = YES
|
||||||
|
CLANG_OPTIONS =
|
||||||
|
CLANG_DATABASE_PATH =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the alphabetical class index
|
# Configuration options related to the alphabetical class index
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -175,6 +191,7 @@ HTML_DYNAMIC_SECTIONS = NO
|
|||||||
HTML_INDEX_NUM_ENTRIES = 100
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
GENERATE_DOCSET = NO
|
GENERATE_DOCSET = NO
|
||||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_FEEDURL =
|
||||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
DOCSET_PUBLISHER_NAME = Publisher
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
@@ -197,12 +214,17 @@ GENERATE_ECLIPSEHELP = NO
|
|||||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
DISABLE_INDEX = NO
|
DISABLE_INDEX = NO
|
||||||
GENERATE_TREEVIEW = YES
|
GENERATE_TREEVIEW = YES
|
||||||
|
FULL_SIDEBAR = NO
|
||||||
ENUM_VALUES_PER_LINE = 4
|
ENUM_VALUES_PER_LINE = 4
|
||||||
TREEVIEW_WIDTH = 250
|
TREEVIEW_WIDTH = 250
|
||||||
EXT_LINKS_IN_WINDOW = NO
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
OBFUSCATE_EMAILS = YES
|
||||||
|
HTML_FORMULA_FORMAT = png
|
||||||
FORMULA_FONTSIZE = 10
|
FORMULA_FONTSIZE = 10
|
||||||
FORMULA_TRANSPARENT = YES
|
FORMULA_TRANSPARENT = YES
|
||||||
|
FORMULA_MACROFILE =
|
||||||
USE_MATHJAX = NO
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_VERSION = MathJax_2
|
||||||
MATHJAX_FORMAT = HTML-CSS
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
|
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
|
||||||
MATHJAX_EXTENSIONS =
|
MATHJAX_EXTENSIONS =
|
||||||
@@ -221,6 +243,7 @@ GENERATE_LATEX = NO
|
|||||||
LATEX_OUTPUT = latex
|
LATEX_OUTPUT = latex
|
||||||
LATEX_CMD_NAME = latex
|
LATEX_CMD_NAME = latex
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
LATEX_MAKEINDEX_CMD = makeindex
|
||||||
COMPACT_LATEX = NO
|
COMPACT_LATEX = NO
|
||||||
PAPER_TYPE = a4
|
PAPER_TYPE = a4
|
||||||
EXTRA_PACKAGES =
|
EXTRA_PACKAGES =
|
||||||
@@ -232,9 +255,9 @@ PDF_HYPERLINKS = NO
|
|||||||
USE_PDFLATEX = NO
|
USE_PDFLATEX = NO
|
||||||
LATEX_BATCHMODE = NO
|
LATEX_BATCHMODE = NO
|
||||||
LATEX_HIDE_INDICES = NO
|
LATEX_HIDE_INDICES = NO
|
||||||
LATEX_SOURCE_CODE = NO
|
|
||||||
LATEX_BIB_STYLE = plain
|
LATEX_BIB_STYLE = plain
|
||||||
LATEX_TIMESTAMP = NO
|
LATEX_TIMESTAMP = NO
|
||||||
|
LATEX_EMOJI_DIRECTORY =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the RTF output
|
# Configuration options related to the RTF output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -244,7 +267,6 @@ COMPACT_RTF = NO
|
|||||||
RTF_HYPERLINKS = NO
|
RTF_HYPERLINKS = NO
|
||||||
RTF_STYLESHEET_FILE =
|
RTF_STYLESHEET_FILE =
|
||||||
RTF_EXTENSIONS_FILE =
|
RTF_EXTENSIONS_FILE =
|
||||||
RTF_SOURCE_CODE = NO
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the man page output
|
# Configuration options related to the man page output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -259,12 +281,12 @@ MAN_LINKS = NO
|
|||||||
GENERATE_XML = NO
|
GENERATE_XML = NO
|
||||||
XML_OUTPUT = xml
|
XML_OUTPUT = xml
|
||||||
XML_PROGRAMLISTING = YES
|
XML_PROGRAMLISTING = YES
|
||||||
|
XML_NS_MEMB_FILE_SCOPE = NO
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the DOCBOOK output
|
# Configuration options related to the DOCBOOK output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_DOCBOOK = NO
|
GENERATE_DOCBOOK = NO
|
||||||
DOCBOOK_OUTPUT = docbook
|
DOCBOOK_OUTPUT = docbook
|
||||||
DOCBOOK_PROGRAMLISTING = NO
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options for the AutoGen Definitions output
|
# Configuration options for the AutoGen Definitions output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -311,7 +333,6 @@ EXTERNAL_PAGES = YES
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the dot tool
|
# Configuration options related to the dot tool
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
CLASS_DIAGRAMS = YES
|
|
||||||
DIA_PATH =
|
DIA_PATH =
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
HAVE_DOT = NO
|
HAVE_DOT = NO
|
||||||
@@ -324,6 +345,8 @@ COLLABORATION_GRAPH = YES
|
|||||||
GROUP_GRAPHS = YES
|
GROUP_GRAPHS = YES
|
||||||
UML_LOOK = NO
|
UML_LOOK = NO
|
||||||
UML_LIMIT_NUM_FIELDS = 10
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
DOT_UML_DETAILS = NO
|
||||||
|
DOT_WRAP_THRESHOLD = 17
|
||||||
TEMPLATE_RELATIONS = NO
|
TEMPLATE_RELATIONS = NO
|
||||||
INCLUDE_GRAPH = YES
|
INCLUDE_GRAPH = YES
|
||||||
INCLUDED_BY_GRAPH = YES
|
INCLUDED_BY_GRAPH = YES
|
||||||
@@ -331,6 +354,7 @@ CALL_GRAPH = NO
|
|||||||
CALLER_GRAPH = NO
|
CALLER_GRAPH = NO
|
||||||
GRAPHICAL_HIERARCHY = YES
|
GRAPHICAL_HIERARCHY = YES
|
||||||
DIRECTORY_GRAPH = YES
|
DIRECTORY_GRAPH = YES
|
||||||
|
DIR_GRAPH_MAX_DEPTH = 1
|
||||||
DOT_IMAGE_FORMAT = png
|
DOT_IMAGE_FORMAT = png
|
||||||
INTERACTIVE_SVG = NO
|
INTERACTIVE_SVG = NO
|
||||||
DOT_PATH =
|
DOT_PATH =
|
||||||
|
@@ -212,6 +212,9 @@ See `src/3rdparty/monocypher/LICENSE.md` for the complete license text.
|
|||||||
The OpenTTD Social Integration API in `src/3rdparty/openttd_social_integration_api` is licensed under the MIT license.
|
The OpenTTD Social Integration API in `src/3rdparty/openttd_social_integration_api` is licensed under the MIT license.
|
||||||
See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete license text.
|
See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete license text.
|
||||||
|
|
||||||
|
The atomic datatype support detection in `cmake/3rdparty/llvm/CheckAtomic.cmake` is licensed under the Apache 2.0 license.
|
||||||
|
See `cmake/3rdparty/llvm/LICENSE.txt` for the complete license text.
|
||||||
|
|
||||||
## 4.0 Credits
|
## 4.0 Credits
|
||||||
|
|
||||||
See [CREDITS.md](./CREDITS.md)
|
See [CREDITS.md](./CREDITS.md)
|
||||||
|
@@ -15,6 +15,7 @@ set(AI_COMPAT_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
|
||||||
|
@@ -4,3 +4,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.
|
* 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/>.
|
* 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("14 API compatibility in effect.");
|
||||||
|
@@ -4,26 +4,3 @@
|
|||||||
* 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.
|
* 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/>.
|
* 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 script_timemode.cpp Implementation of ScriptTimeMode. */
|
|
||||||
|
|
||||||
#include "../../stdafx.h"
|
|
||||||
#include "script_timemode.hpp"
|
|
||||||
|
|
||||||
#include "../../safeguards.h"
|
|
||||||
|
|
||||||
ScriptTimeMode::ScriptTimeMode(bool calendar)
|
|
||||||
{
|
|
||||||
this->last_time_mode = ScriptObject::IsCalendarTimeMode();
|
|
||||||
ScriptObject::SetTimeMode(calendar);
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptTimeMode::~ScriptTimeMode()
|
|
||||||
{
|
|
||||||
ScriptObject::SetTimeMode(this->last_time_mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */ bool ScriptTimeMode::IsCalendarMode()
|
|
||||||
{
|
|
||||||
return ScriptObject::IsCalendarTimeMode();
|
|
||||||
}
|
|
@@ -12,6 +12,7 @@ set(GS_COMPAT_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
foreach(GS_COMPAT_SOURCE_FILE IN LISTS GS_COMPAT_SOURCE_FILES)
|
||||||
|
@@ -4,3 +4,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.
|
* 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/>.
|
* 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("14 API compatibility in effect.");
|
||||||
|
6
bin/game/compat_15.nut
Normal file
6
bin/game/compat_15.nut
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* 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 diff suppressed because it is too large
Load Diff
@@ -1,3 +1,11 @@
|
|||||||
|
#
|
||||||
|
# This was originally part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
# See (https://llvm.org/)LICENSE.txt for license information.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
#
|
||||||
|
# Modifications have been made to suit building OpenTTD.
|
||||||
|
#
|
||||||
|
|
||||||
# atomic builtins are required for threading support.
|
# atomic builtins are required for threading support.
|
||||||
|
|
||||||
INCLUDE(CheckCXXSourceCompiles)
|
INCLUDE(CheckCXXSourceCompiles)
|
||||||
@@ -48,6 +56,8 @@ else()
|
|||||||
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||||
# If not, check if the library exists, and atomics work with it.
|
# If not, check if the library exists, and atomics work with it.
|
||||||
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||||
|
# check_library_exists requires the C-compiler as the atomic functions are built-in declared.
|
||||||
|
enable_language(C)
|
||||||
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
|
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
|
||||||
if(HAVE_LIBATOMIC)
|
if(HAVE_LIBATOMIC)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||||
@@ -69,6 +79,8 @@ else()
|
|||||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||||
# If not, check if the library exists, and atomics work with it.
|
# If not, check if the library exists, and atomics work with it.
|
||||||
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||||
|
# check_library_exists requires the C-compiler as the atomic functions are built-in declared.
|
||||||
|
enable_language(C)
|
||||||
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
||||||
if(HAVE_CXX_LIBATOMICS64)
|
if(HAVE_CXX_LIBATOMICS64)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
279
cmake/3rdparty/llvm/LICENSE.txt
vendored
Normal file
279
cmake/3rdparty/llvm/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
==============================================================================
|
||||||
|
The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
---- LLVM Exceptions to the Apache 2.0 License ----
|
||||||
|
|
||||||
|
As an exception, if, as a result of your compiling your source code, portions
|
||||||
|
of this Software are embedded into an Object form of such source code, you
|
||||||
|
may redistribute such embedded portions in such Object form without complying
|
||||||
|
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
|
||||||
|
|
||||||
|
In addition, if you combine or link compiled forms of this Software with
|
||||||
|
software that is licensed under the GPLv2 ("Combined Software") and if a
|
||||||
|
court of competent jurisdiction determines that the patent provision (Section
|
||||||
|
3), the indemnity provision (Section 9) or other Section of the License
|
||||||
|
conflicts with the conditions of the GPLv2, you may retroactively and
|
||||||
|
prospectively choose to deem waived or otherwise exclude such Section(s) of
|
||||||
|
the License, but only in their entirety and only with respect to the Combined
|
||||||
|
Software.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Software from third parties included in the LLVM Project:
|
||||||
|
==============================================================================
|
||||||
|
The LLVM Project contains third party software which is under different license
|
||||||
|
terms. All such code will be identified clearly using at least one of two
|
||||||
|
mechanisms:
|
||||||
|
1) It will be in a separate directory tree with its own `LICENSE.txt` or
|
||||||
|
`LICENSE` file at the top containing the specific license and restrictions
|
||||||
|
which apply to that software, or
|
||||||
|
2) It will contain specific license and restriction terms at the top of every
|
||||||
|
file.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
|
||||||
|
==============================================================================
|
||||||
|
University of Illinois/NCSA
|
||||||
|
Open Source License
|
||||||
|
|
||||||
|
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Developed by:
|
||||||
|
|
||||||
|
LLVM Team
|
||||||
|
|
||||||
|
University of Illinois at Urbana-Champaign
|
||||||
|
|
||||||
|
http://llvm.org
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal with
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimers.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimers in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the names of the LLVM Team, University of Illinois at
|
||||||
|
Urbana-Champaign, nor the names of its contributors may be used to
|
||||||
|
endorse or promote products derived from this Software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
@@ -10,6 +10,7 @@ macro(compile_flags)
|
|||||||
|
|
||||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
|
/Zc:preprocessor # Needed for __VA_OPT__() in macros.
|
||||||
/MP # Enable multi-threaded compilation.
|
/MP # Enable multi-threaded compilation.
|
||||||
/FC # Display the full path of source code files passed to the compiler in diagnostics.
|
/FC # Display the full path of source code files passed to the compiler in diagnostics.
|
||||||
)
|
)
|
||||||
@@ -55,6 +56,11 @@ macro(compile_flags)
|
|||||||
# This flag disables the broken optimisation to work around the bug
|
# This flag disables the broken optimisation to work around the bug
|
||||||
add_compile_options(/d2ssa-rse-)
|
add_compile_options(/d2ssa-rse-)
|
||||||
endif()
|
endif()
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
add_compile_options(
|
||||||
|
-Wno-multichar
|
||||||
|
)
|
||||||
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-W
|
-W
|
||||||
@@ -74,12 +80,6 @@ macro(compile_flags)
|
|||||||
|
|
||||||
# We use 'ABCD' multichar for SaveLoad chunks identifiers
|
# We use 'ABCD' multichar for SaveLoad chunks identifiers
|
||||||
-Wno-multichar
|
-Wno-multichar
|
||||||
|
|
||||||
# Compilers complains about that we break strict-aliasing.
|
|
||||||
# On most places we don't see how to fix it, and it doesn't
|
|
||||||
# break anything. So disable strict-aliasing to make the
|
|
||||||
# compiler all happy.
|
|
||||||
-fno-strict-aliasing
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ninja processes the output so the output from the compiler
|
# Ninja processes the output so the output from the compiler
|
||||||
|
37
cmake/FindOgg.cmake
Normal file
37
cmake/FindOgg.cmake
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_library(Ogg_LIBRARY
|
||||||
|
NAMES ogg
|
||||||
|
)
|
||||||
|
|
||||||
|
set(Ogg_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of ogg")
|
||||||
|
|
||||||
|
set(Ogg_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of ogg")
|
||||||
|
|
||||||
|
set(Ogg_LINK_FLAGS "" CACHE STRING "Extra link flags of ogg")
|
||||||
|
|
||||||
|
find_path(Ogg_INCLUDE_PATH
|
||||||
|
NAMES ogg.h
|
||||||
|
PATH_SUFFIXES ogg
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Ogg
|
||||||
|
REQUIRED_VARS Ogg_LIBRARY Ogg_INCLUDE_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Ogg_FOUND)
|
||||||
|
set(Ogg_dirs ${Ogg_INCLUDE_PATH})
|
||||||
|
if(EXISTS "${Ogg_INCLUDE_PATH}/ogg")
|
||||||
|
list(APPEND Ogg_dirs "${Ogg_INCLUDE_PATH}/ogg")
|
||||||
|
endif()
|
||||||
|
if (NOT TARGET Ogg::ogg)
|
||||||
|
add_library(Ogg::ogg UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Ogg::ogg PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Ogg_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Ogg_dirs}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${Ogg_COMPILE_OPTIONS}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${Ogg_LINK_LIBRARIES}"
|
||||||
|
INTERFACE_LINK_FLAGS "${Ogg_LINK_FLAGS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
37
cmake/FindOpus.cmake
Normal file
37
cmake/FindOpus.cmake
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_library(Opus_LIBRARY
|
||||||
|
NAMES opus
|
||||||
|
)
|
||||||
|
|
||||||
|
set(Opus_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of opus")
|
||||||
|
|
||||||
|
set(Opus_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of opus")
|
||||||
|
|
||||||
|
set(Opus_LINK_FLAGS "" CACHE STRING "Extra link flags of opus")
|
||||||
|
|
||||||
|
find_path(Opus_INCLUDE_PATH
|
||||||
|
NAMES opus.h
|
||||||
|
PATH_SUFFIXES opus
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Opus
|
||||||
|
REQUIRED_VARS Opus_LIBRARY Opus_INCLUDE_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Opus_FOUND)
|
||||||
|
set(Opus_dirs ${Opus_INCLUDE_PATH})
|
||||||
|
if(EXISTS "${Opus_INCLUDE_PATH}/opus")
|
||||||
|
list(APPEND Opus_dirs "${Opus_INCLUDE_PATH}/opus")
|
||||||
|
endif()
|
||||||
|
if (NOT TARGET Opus::opus)
|
||||||
|
add_library(Opus::opus UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(Opus::opus PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${Opus_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Opus_dirs}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${Opus_COMPILE_OPTIONS}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${Opus_LINK_LIBRARIES}"
|
||||||
|
INTERFACE_LINK_FLAGS "${Opus_LINK_FLAGS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
40
cmake/FindOpusFile.cmake
Normal file
40
cmake/FindOpusFile.cmake
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_library(OpusFile_LIBRARY
|
||||||
|
NAMES opusfile
|
||||||
|
)
|
||||||
|
|
||||||
|
set(OpusFile_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of opusfile")
|
||||||
|
|
||||||
|
set(OpusFile_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of opusfile")
|
||||||
|
|
||||||
|
set(OpusFile_LINK_FLAGS "" CACHE STRING "Extra link flags of opusfile")
|
||||||
|
|
||||||
|
find_path(OpusFile_INCLUDE_PATH
|
||||||
|
NAMES opusfile.h
|
||||||
|
PATH_SUFFIXES opus
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(OpusFile
|
||||||
|
REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
find_package(Ogg)
|
||||||
|
find_package(Opus)
|
||||||
|
|
||||||
|
if (OpusFile_FOUND)
|
||||||
|
set(OpusFile_dirs ${OpusFile_INCLUDE_PATH})
|
||||||
|
if(EXISTS "${OpusFile_INCLUDE_PATH}/opus")
|
||||||
|
list(APPEND OpusFile_dirs "${OpusFile_INCLUDE_PATH}/opus")
|
||||||
|
endif()
|
||||||
|
if (NOT TARGET OpusFile::opusfile)
|
||||||
|
add_library(OpusFile::opusfile UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(OpusFile::opusfile PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${OpusFile_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "Ogg::ogg;Opus::opus;${OpusFile_LINK_LIBRARIES}"
|
||||||
|
INTERFACE_LINK_FLAGS "${OpusFile_LINK_FLAGS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
@@ -51,8 +51,8 @@ install(FILES
|
|||||||
${CMAKE_SOURCE_DIR}/README.md
|
${CMAKE_SOURCE_DIR}/README.md
|
||||||
${CMAKE_SOURCE_DIR}/CREDITS.md
|
${CMAKE_SOURCE_DIR}/CREDITS.md
|
||||||
${CMAKE_SOURCE_DIR}/CONTRIBUTING.md
|
${CMAKE_SOURCE_DIR}/CONTRIBUTING.md
|
||||||
${CMAKE_SOURCE_DIR}/changelog.txt
|
${CMAKE_SOURCE_DIR}/changelog.md
|
||||||
${CMAKE_SOURCE_DIR}/known-bugs.txt
|
${CMAKE_SOURCE_DIR}/known-bugs.md
|
||||||
DESTINATION ${DOCS_DESTINATION_DIR}
|
DESTINATION ${DOCS_DESTINATION_DIR}
|
||||||
COMPONENT docs)
|
COMPONENT docs)
|
||||||
|
|
||||||
@@ -172,10 +172,10 @@ elseif(WIN32)
|
|||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}")
|
||||||
|
|
||||||
if(WINDOWS_CERTIFICATE_COMMON_NAME)
|
if(DEFINED ENV{AZURE_CODESIGN_PROFILE_NAME})
|
||||||
add_custom_command(TARGET openttd
|
add_custom_command(TARGET openttd
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${CMAKE_SOURCE_DIR}/os/windows/sign.bat" "$<TARGET_FILE:openttd>" "${WINDOWS_CERTIFICATE_COMMON_NAME}"
|
COMMAND "${CMAKE_SOURCE_DIR}/os/windows/sign.bat" "${BINARY_DESTINATION_DIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
|
@@ -57,13 +57,6 @@ function(set_options)
|
|||||||
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
|
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
|
||||||
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
|
||||||
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON)
|
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON)
|
||||||
if(EMSCRIPTEN)
|
|
||||||
# Although pthreads is supported, it is not in a way yet that is
|
|
||||||
# useful for us.
|
|
||||||
option(OPTION_USE_THREADS "Use threads" OFF)
|
|
||||||
else()
|
|
||||||
option(OPTION_USE_THREADS "Use threads" ON)
|
|
||||||
endif()
|
|
||||||
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
|
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
|
||||||
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
|
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
|
||||||
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
|
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
|
||||||
@@ -85,7 +78,6 @@ function(show_options)
|
|||||||
message(STATUS "Option Dedicated - ${OPTION_DEDICATED}")
|
message(STATUS "Option Dedicated - ${OPTION_DEDICATED}")
|
||||||
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
message(STATUS "Option Install FHS - ${OPTION_INSTALL_FHS}")
|
||||||
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
message(STATUS "Option Use assert - ${OPTION_USE_ASSERTS}")
|
||||||
message(STATUS "Option Use threads - ${OPTION_USE_THREADS}")
|
|
||||||
message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}")
|
message(STATUS "Option Use NSIS - ${OPTION_USE_NSIS}")
|
||||||
|
|
||||||
if(OPTION_SURVEY_KEY)
|
if(OPTION_SURVEY_KEY)
|
||||||
@@ -109,10 +101,6 @@ function(add_definitions_based_on_options)
|
|||||||
add_definitions(-DDEDICATED)
|
add_definitions(-DDEDICATED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT OPTION_USE_THREADS)
|
|
||||||
add_definitions(-DNO_THREADS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(OPTION_USE_ASSERTS)
|
if(OPTION_USE_ASSERTS)
|
||||||
add_definitions(-DWITH_ASSERT)
|
add_definitions(-DWITH_ASSERT)
|
||||||
else()
|
else()
|
||||||
|
@@ -4,6 +4,7 @@ set(CPACK_BUNDLE_NAME "OpenTTD")
|
|||||||
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
|
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
|
||||||
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
||||||
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
|
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
|
||||||
|
set(CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/os/macosx/openttd.entitlements")
|
||||||
set(CPACK_DMG_FORMAT "UDBZ")
|
set(CPACK_DMG_FORMAT "UDBZ")
|
||||||
|
|
||||||
# Create a temporary Info.plist.in, where we will fill in the version via
|
# Create a temporary Info.plist.in, where we will fill in the version via
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a single baseset meta file with the correct translations.
|
# Create a single baseset meta file with the correct translations.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a single GRF file based on sprites/<grfname>.nfo and sprites/*.png
|
# Create a single GRF file based on sprites/<grfname>.nfo and sprites/*.png
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a desktop file with the correct translations.
|
# Create a desktop file with the correct translations.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
if(NOT REV_MAJOR)
|
if(NOT REV_MAJOR)
|
||||||
set(REV_MAJOR 0)
|
set(REV_MAJOR 0)
|
||||||
@@ -49,14 +49,14 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||||||
string(SUBSTRING "${FULLHASH}" 0 10 SHORTHASH)
|
string(SUBSTRING "${FULLHASH}" 0 10 SHORTHASH)
|
||||||
|
|
||||||
# Get the last commit date
|
# Get the last commit date
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%ci HEAD
|
set(ENV{TZ} "UTC0")
|
||||||
|
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --date=iso-local --pretty=format:%cd HEAD
|
||||||
OUTPUT_VARIABLE COMMITDATE
|
OUTPUT_VARIABLE COMMITDATE
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
string(REGEX REPLACE "([0-9]+)-([0-9]+)-([0-9]+).*" "\\1\\2\\3" COMMITDATE "${COMMITDATE}")
|
string(REGEX REPLACE "([0-9]+)-([0-9]+)-([0-9]+).*" "\\1\\2\\3" COMMITDATE "${COMMITDATE}")
|
||||||
set(REV_ISODATE "${COMMITDATE}")
|
set(REV_ISODATE "${COMMITDATE}")
|
||||||
string(SUBSTRING "${REV_ISODATE}" 0 4 REV_YEAR)
|
|
||||||
|
|
||||||
# Get the branch
|
# Get the branch
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q HEAD
|
execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q HEAD
|
||||||
@@ -113,7 +113,6 @@ elseif(EXISTS "${CMAKE_SOURCE_DIR}/.ottdrev")
|
|||||||
list(GET OTTDREV 3 REV_HASH)
|
list(GET OTTDREV 3 REV_HASH)
|
||||||
list(GET OTTDREV 4 REV_ISTAG)
|
list(GET OTTDREV 4 REV_ISTAG)
|
||||||
list(GET OTTDREV 5 REV_ISSTABLETAG)
|
list(GET OTTDREV 5 REV_ISSTABLETAG)
|
||||||
list(GET OTTDREV 6 REV_YEAR)
|
|
||||||
else()
|
else()
|
||||||
message(WARNING "No version detected; this build will NOT be network compatible")
|
message(WARNING "No version detected; this build will NOT be network compatible")
|
||||||
set(REV_VERSION "norev0000")
|
set(REV_VERSION "norev0000")
|
||||||
@@ -122,14 +121,19 @@ else()
|
|||||||
set(REV_HASH "unknown")
|
set(REV_HASH "unknown")
|
||||||
set(REV_ISTAG 0)
|
set(REV_ISTAG 0)
|
||||||
set(REV_ISSTABLETAG 0)
|
set(REV_ISSTABLETAG 0)
|
||||||
set(REV_YEAR "1970")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Extract REV_YEAR and REV_DATE from REV_ISODATE
|
||||||
|
string(SUBSTRING "${REV_ISODATE}" 0 4 REV_YEAR)
|
||||||
|
string(SUBSTRING "${REV_ISODATE}" 4 4 REV_DATE)
|
||||||
|
# Drop leading 0 in REV_DATE if any
|
||||||
|
string(REGEX REPLACE "^0?([0-9]+)" "\\1" REV_DATE "${REV_DATE}")
|
||||||
|
|
||||||
message(STATUS "Version string: ${REV_VERSION}")
|
message(STATUS "Version string: ${REV_VERSION}")
|
||||||
|
|
||||||
if(GENERATE_OTTDREV)
|
if(GENERATE_OTTDREV)
|
||||||
message(STATUS "Generating .ottdrev")
|
message(STATUS "Generating .ottdrev")
|
||||||
file(WRITE ${CMAKE_SOURCE_DIR}/.ottdrev "${REV_VERSION}\t${REV_ISODATE}\t${REV_MODIFIED}\t${REV_HASH}\t${REV_ISTAG}\t${REV_ISSTABLETAG}\t${REV_YEAR}\n")
|
file(WRITE ${CMAKE_SOURCE_DIR}/.ottdrev "${REV_VERSION}\t${REV_ISODATE}\t${REV_MODIFIED}\t${REV_HASH}\t${REV_ISTAG}\t${REV_ISSTABLETAG}\n")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Generating rev.cpp")
|
message(STATUS "Generating rev.cpp")
|
||||||
configure_file("${CMAKE_SOURCE_DIR}/src/rev.cpp.in"
|
configure_file("${CMAKE_SOURCE_DIR}/src/rev.cpp.in"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
#
|
#
|
||||||
# CMake script to automatically generate the enums in script_window.hpp
|
# CMake script to automatically generate the enums in script_window.hpp
|
||||||
@@ -56,11 +56,14 @@ foreach(ENUM IN LISTS ENUM_LINES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check for enum match
|
# Check for enum match
|
||||||
if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN} *\{")
|
if("${LINE}" MATCHES "^ *enum *${ENUM_PATTERN}( *: *[^ ]*)? *\{")
|
||||||
# REGEX REPLACE does a REGEX MATCHALL and fails if an empty string is matched
|
# REGEX REPLACE does a REGEX MATCHALL and fails if an empty string is matched
|
||||||
string(REGEX MATCH "[^ ]*" RESULT "${LINE}")
|
string(REGEX MATCH "[^ ]*" RESULT "${LINE}")
|
||||||
string(REPLACE "${RESULT}" "" RM_INDENT "${LINE}")
|
string(REPLACE "${RESULT}" "" RM_INDENT "${LINE}")
|
||||||
|
|
||||||
|
string(REGEX MATCH " *: *[^ ]*" RESULT "${LINE}")
|
||||||
|
string(REPLACE "${RESULT}" "" LINE "${LINE}")
|
||||||
|
|
||||||
set(ACTIVE 1)
|
set(ACTIVE 1)
|
||||||
if(ACTIVE_COMMENT GREATER 0)
|
if(ACTIVE_COMMENT GREATER 0)
|
||||||
string(APPEND ${PLACE_HOLDER} "\n${COMMENT}")
|
string(APPEND ${PLACE_HOLDER} "\n${COMMENT}")
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Runs a single regressoion test
|
# Runs a single regressoion test
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
if(NOT SCRIPT_API_SOURCE_FILE)
|
if(NOT SCRIPT_API_SOURCE_FILE)
|
||||||
message(FATAL_ERROR "Script needs SCRIPT_API_SOURCE_FILE defined")
|
message(FATAL_ERROR "Script needs SCRIPT_API_SOURCE_FILE defined")
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
if(NOT INCLUDES_SOURCE_FILE)
|
if(NOT INCLUDES_SOURCE_FILE)
|
||||||
message(FATAL_ERROR "Script needs INCLUDES_SOURCE_FILE defined")
|
message(FATAL_ERROR "Script needs INCLUDES_SOURCE_FILE defined")
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# OpenTTD's admin network
|
# OpenTTD's admin network
|
||||||
|
|
||||||
Last updated: 2011-01-20
|
Last updated: 2024-03-26
|
||||||
|
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
@@ -49,10 +49,29 @@ Last updated: 2011-01-20
|
|||||||
Create a TCP connection to the server on port 3977. The application is
|
Create a TCP connection to the server on port 3977. The application is
|
||||||
expected to authenticate within 10 seconds.
|
expected to authenticate within 10 seconds.
|
||||||
|
|
||||||
To authenticate send a `ADMIN_PACKET_ADMIN_JOIN` packet.
|
To authenticate send either an `ADMIN_PACKET_ADMIN_JOIN` or an
|
||||||
|
`ADMIN_PACKET_ADMIN_JOIN_SECURE` packet.
|
||||||
|
|
||||||
The server will reply with `ADMIN_PACKET_SERVER_PROTOCOL` followed directly by
|
The `ADMIN_PACKET_ADMIN_JOIN` packet sends the password without any
|
||||||
`ADMIN_PACKET_SERVER_WELCOME`.
|
encryption or safeguards over the connection, and as such has been disabled
|
||||||
|
by default.
|
||||||
|
|
||||||
|
The `ADMIN_PACKET_ADMIN_JOIN_SECURE` packet initiates a key exchange
|
||||||
|
authentication schema which tells te server which methods the client
|
||||||
|
supports and the server makes a choice. The server will then send an
|
||||||
|
`ADMIN_PACKET_SERVER_AUTH_REQUEST` packet to which the client has to respond
|
||||||
|
with an `ADMIN_PACKET_ADMIN_AUTH_RESPONSE` packet.
|
||||||
|
|
||||||
|
The current choices for secure authentication are authorized keys, where
|
||||||
|
the client has a private key and the server a list of authorized public
|
||||||
|
keys, and a so-called password-authenticated key exchange which allows to
|
||||||
|
authenticate using a password without actually sending the password.
|
||||||
|
The server falls back to password authentication when the client's key is
|
||||||
|
not in the list of authorized keys.
|
||||||
|
|
||||||
|
When authentication has succeeded for either of the `JOIN` schemas, the
|
||||||
|
server will reply with `ADMIN_PACKET_SERVER_PROTOCOL` followed directly
|
||||||
|
by `ADMIN_PACKET_SERVER_WELCOME`.
|
||||||
|
|
||||||
`ADMIN_PACKET_SERVER_PROTOCOL` contains details about the protocol version.
|
`ADMIN_PACKET_SERVER_PROTOCOL` contains details about the protocol version.
|
||||||
It is the job of your application to check this number and decide whether
|
It is the job of your application to check this number and decide whether
|
||||||
|
@@ -195,10 +195,11 @@ Last updated: 2014-02-23
|
|||||||
'src/network/network_func.h'.
|
'src/network/network_func.h'.
|
||||||
(DEBUG_FAILED_DUMP_COMMANDS is explained later)
|
(DEBUG_FAILED_DUMP_COMMANDS is explained later)
|
||||||
- Put the 'commands-out.log' into the root save folder, and rename
|
- Put the 'commands-out.log' into the root save folder, and rename
|
||||||
it to 'commands.log'.
|
it to 'commands.log'. Strip everything and including the "newgame"
|
||||||
- Run 'openttd -D -d desync=3 -g startsavegame.sav'.
|
entry from the log.
|
||||||
This replays the server log and creates new 'commands-out.log'
|
- Run 'openttd -D -d desync=0 -g startsavegame.sav'.
|
||||||
and 'dmp_cmds_*.sav' in your autosave folder.
|
This replays the server log. Use "-d desync=3" to also create a
|
||||||
|
new 'commands-out.log' and 'dmp_cmds_*.sav' in your autosave folder.
|
||||||
|
|
||||||
## 3.2) Evaluation of the replay
|
## 3.2) Evaluation of the replay
|
||||||
|
|
||||||
@@ -226,7 +227,7 @@ Last updated: 2014-02-23
|
|||||||
savegames with your own ones from the replay. You can also comment/disable
|
savegames with your own ones from the replay. You can also comment/disable
|
||||||
the 'NOT_REACHED' mentioned above, to get another 'dmp_cmds_*.sav' from
|
the 'NOT_REACHED' mentioned above, to get another 'dmp_cmds_*.sav' from
|
||||||
the replay after the mismatch has already been detected.
|
the replay after the mismatch has already been detected.
|
||||||
See Section 3.2 on how to compare savegames.
|
See Section 3.3 on how to compare savegames.
|
||||||
If the saves differ you have located the Desync between the last dmp_cmds
|
If the saves differ you have located the Desync between the last dmp_cmds
|
||||||
that match and the first one that does not. The difference of the saves
|
that match and the first one that does not. The difference of the saves
|
||||||
may point you in the direction of what causes it.
|
may point you in the direction of what causes it.
|
||||||
@@ -252,16 +253,14 @@ Last updated: 2014-02-23
|
|||||||
are replayed. Their internal state will thus not change in the
|
are replayed. Their internal state will thus not change in the
|
||||||
replay and will differ.
|
replay and will differ.
|
||||||
|
|
||||||
To compare savegame more semantically, there exist some ugly hackish
|
To compare savegame more semantically, easiest is to first export them
|
||||||
tools at:
|
to a JSON format with for example:
|
||||||
http://devs.openttd.org/~frosch/texts/zpipe.c
|
|
||||||
http://devs.openttd.org/~frosch/texts/printhunk.c
|
|
||||||
|
|
||||||
The first one decompresses OpenTTD savegames. The second one creates
|
https://github.com/TrueBrain/OpenTTD-savegame-reader
|
||||||
a textual representation of an uncompressed savegame, by parsing hunks
|
|
||||||
and arrays and such. With both tools you need to be a bit careful
|
|
||||||
since they work on stdin and stdout, which may not deal well with
|
|
||||||
binary data.
|
|
||||||
|
|
||||||
If you have the textual representation of the savegames, you can
|
By running:
|
||||||
compare them with regular diff tools.
|
|
||||||
|
python -m savegame_reader --export-json dmp_cmds_NNN.sav | jq . > NNN.json
|
||||||
|
|
||||||
|
Now you can use any (JSON) diff tool to compare the two savegames in a
|
||||||
|
somewhat human readable way.
|
||||||
|
97
docs/importing_town_data.md
Normal file
97
docs/importing_town_data.md
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
# Importing Town Data into OpenTTD
|
||||||
|
|
||||||
|
To aid players in scenario creation, OpenTTD's Scenario Editor can import town data from external JSON files. This enables players to use an image editing program to align town coordinates with a real-world heightmap using a map underlay, instead of guessing at the correct locations in Scenario Editor itself.
|
||||||
|
|
||||||
|
This town data consists of a JSON file storing an array of town data objects, each containing a name, location, target OpenTTD population, and whether it is marked as a city in the game.
|
||||||
|
|
||||||
|
This document describes the standard format for this JSON file and outlines a workflow for creating this data effectively.
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
- Why load external data?
|
||||||
|
- How to use this feature
|
||||||
|
- Creating geodata
|
||||||
|
- Town data format standards
|
||||||
|
- Town data values
|
||||||
|
- Loading geodata into OpenTTD
|
||||||
|
- Tutorial: Creating town data
|
||||||
|
|
||||||
|
## Why load external data?
|
||||||
|
|
||||||
|
There are three benefits to using an image editing program to create towns instead of the OpenTTD Scenario Editor.
|
||||||
|
|
||||||
|
1. Placing towns accurately is much easier using a map underlay such as OpenStreetMap to match town locations with the corresponding heightmap.
|
||||||
|
2. Storing town data in a JSON file instead of as an OpenTTD Scenario (.scn) doesn't require choosing your NewGRF house set before placing towns.
|
||||||
|
3. Town coordinates are scaled by the map size, so you can load the data onto whatever size map you like.
|
||||||
|
|
||||||
|
## How to use this feature
|
||||||
|
|
||||||
|
### Creating geodata
|
||||||
|
|
||||||
|
Town data is a text file in the JSON format, with a list of towns, each containing a coordinate location and properties: name, population, and whether or not it should be a city in OpenTTD.
|
||||||
|
|
||||||
|
The format of this file is standardized for importing into OpenTTD and must be followed for OpenTTD to properly parse the data.
|
||||||
|
|
||||||
|
For use in OpenTTD, you will also need a matching heightmap of the terrain features, as a PNG.
|
||||||
|
|
||||||
|
#### Town data format standards
|
||||||
|
|
||||||
|
The following code sample is complete and can be used in OpenTTD.
|
||||||
|
- The list of towns is enclosed in an array marked with square brackets `[]`
|
||||||
|
- Each town is enclosed in curly braces `{}`, with a comma after each town except for the last in the list.
|
||||||
|
- The properties separated by commas except for the last.
|
||||||
|
- Property names are enclosed in double quotes `""` with a colon `:` separating it from the property value.
|
||||||
|
- The name property value is enclosed in double quotes `"London"`, while all other property values `44910`, `true`, etc., are not.
|
||||||
|
|
||||||
|
```
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "London",
|
||||||
|
"population": 44910,
|
||||||
|
"city": true,
|
||||||
|
"x": 0.7998046875,
|
||||||
|
"y": 0.708984375
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Canterbury",
|
||||||
|
"population": 217.16,
|
||||||
|
"city": false,
|
||||||
|
"x": 0.83251953125,
|
||||||
|
"y": 0.828125
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Town data values
|
||||||
|
|
||||||
|
- Population is scaled down for use in OpenTTD. It is possible to generate huge cities by using a large number, but there is a practical limit to town size. The larger the town, the longer it will take to import town data, since towns are placed at a relatively small size and then expanded until the population is greater than the player-defined target.
|
||||||
|
- X and Y coordinates are a proportion of the total map dimension, between 0 and 1. Just take the pixel coordinates of the town's location in the corresponding heightmap (more detail in the tutorial below) and divide each by the maximum value.
|
||||||
|
- For example, London is at `726, 1638` in a 1024 px by 2048 px heightmap, so `726 / 1024 = 0.7998046875` and `1638 / 2048 = 0.708984375` gives the correct coordinates for OpenTTD.
|
||||||
|
- The reason for these proportional coordinates is so the data can be used for any map size.
|
||||||
|
- 0,0 is (approximately) the very top tile in OpenTTD. You can see tile coordinates in-game with the Land Info Tool.
|
||||||
|
- In most image editing programs, 0,0 is the top-left corner of the image. You can rotate the image however you want relative to compass north to orient the map to your liking. Make sure you crop and resize the image before recording town locations.
|
||||||
|
- In OpenTTD, X and Y axis are swapped compared to most image editing programs and the standard Cartesian coordinate system. From the 0,0 origin at top left, X is the axis along the left side and Y is the axis along the right side. You can still measure X and Y coordinates in your image editing program, just swap them before importing into OpenTTD or towns won't line up with your heightmap.
|
||||||
|
|
||||||
|
### Loading geodata into OpenTTD
|
||||||
|
Using geodata to create a real-world location in OpenTTD is done in the Scenario Editor.
|
||||||
|
|
||||||
|
1. Choose the NewGRFs you want to use in the game.
|
||||||
|
2. Load the heightmap which you created in the geodata workflow. Either rotation will work, but the clockwise rotation is considered "correct" and the coordinates in the Land Info Tool will match your data; counter clockwise maps will align properly but the coordinates won't match your data.
|
||||||
|
3. In the Town Generation window, click `Load from file` and choose the .json file containing town data. The default directory to search for town data is `OpenTTD\scenario\heightmap`.
|
||||||
|
4. (Optional) Manually add industries, rivers, trees, and objects.
|
||||||
|
5. Save the game as a Scenario and exit to the main menu.
|
||||||
|
6. Load the game with Play Scenario and enjoy.
|
||||||
|
|
||||||
|
Sometimes it's not possible to place a town, such as when the heightmap is very rough and a flat tile can't be found with a 16-tile radius of the target tile. In such cases, a sign will be placed on the target tile with the name of the town. The player can then place the town manually or change the heightmap settings and try again. This fallback also helps debug errors with data creation, such as if towns end up in the ocean.
|
||||||
|
|
||||||
|
## Tutorial: Creating town data
|
||||||
|
|
||||||
|
1. Load both your heightmap and a labeled map like OpenStreetMap as layers in an image editing program. You can use a free/open-source program like QGIS to acquire, align, and export these map images, if you like.
|
||||||
|
2. Crop the image to your desired bounds, ensuring the aspect ratio is supported in OpenTTD (1:1, 1:2, 1:4, etc.).
|
||||||
|
3. Resize the image to one of OpenTTD's supported map sizes, such as 512 px by 1024 px. Some image editors let you do this part of step 2. You can always load heightmaps and town data at a reduced size, so you may want to make this larger than your intended use in case you want it later.
|
||||||
|
4. Use the labeled map layer to find the pixel coordinates of each town you'd like to include in your map. In GIMP this is displayed in the bottom left corner of the image window, and in Photoshop you need to enable the Info panel (F8) and switch to pixel units of measurement if not already.
|
||||||
|
5. Some spreadsheets including Google Sheets can export data as JSON, so you may want to record it there, to export after step 8. Or you can build the JSON file manually.
|
||||||
|
6. Adjust population numbers for OpenTTD.
|
||||||
|
7. Change coordinates from pixels to proportion (0-1) of the total dimension: `x / maximum_x` and `y / maximum_y`, as described in "Town data values" above.
|
||||||
|
8. Swap X and Y coordinates before importing to OpenTTD, since OpenTTD uses a reverse X and Y system than most image editors.
|
||||||
|
9. Save the heightmap and town data files in your `OpenTTD\scenario\heightmap` folder.
|
@@ -721,10 +721,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
|
<li>m3 bits 6..5 : free</li>
|
||||||
<li>m3 bit 5 : free</li>
|
|
||||||
<li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
|
<li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
|
||||||
<li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
|
<li>m4 : free</li>
|
||||||
<li>m5 : see m3 bit 7</li>
|
<li>m5 : see m3 bit 7</li>
|
||||||
<li>m6 :
|
<li>m6 :
|
||||||
<ul>
|
<ul>
|
||||||
@@ -740,6 +739,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li>m6: bits 1..0: animated tile state</li>
|
||||||
<li>m7 :
|
<li>m7 :
|
||||||
<ul>
|
<ul>
|
||||||
<li>If <a href="#newhouses">newhouses</a> is activated
|
<li>If <a href="#newhouses">newhouses</a> is activated
|
||||||
@@ -759,10 +759,12 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li>m8 bits 15..12 : free</li>
|
||||||
|
<li>m8 bits 11..0 : <a href="landscape_externals.html">town building type</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).<br>
|
<small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).<br>
|
||||||
It allows the replacement of the properties as well as the graphics of houses in the game.<br>
|
It allows the replacement of the properties as well as the graphics of houses in the game.<br>
|
||||||
To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.<br>
|
To distinguish between the standard behaviour and the newGRF one, HouseID is tested for anything above 110.<br>
|
||||||
110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
|
110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -876,6 +878,25 @@
|
|||||||
<li>m2: index into the array of stations</li>
|
<li>m2: index into the array of stations</li>
|
||||||
<li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
|
<li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
|
||||||
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
|
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
|
||||||
|
<li>m3 bits 3..2: ground type (road waypoints)
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><tt>0</tt> </td>
|
||||||
|
<td>on bare land</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>1</tt> </td>
|
||||||
|
<td>on grass</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>2</tt> </td>
|
||||||
|
<td>paved</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<li>m3 bit 2: rail station / waypoint may have catenary pylons</li>
|
||||||
|
<li>m3 bit 1: rail station / waypoint may have catenary wires</li>
|
||||||
|
<li>m3 bit 0: rail station / waypoint is blocked</li>
|
||||||
<li>m4: custom station id; 0 means standard graphics</li>
|
<li>m4: custom station id; 0 means standard graphics</li>
|
||||||
<li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
|
<li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
|
||||||
<li>m5: graphics index (range from 0..255 for each station type):
|
<li>m5: graphics index (range from 0..255 for each station type):
|
||||||
@@ -956,6 +977,22 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td nowrap valign=top><tt>04</tt>..<tt>05</tt> </td>
|
||||||
|
<td align=left>road waypoints
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><tt>04</tt> </td>
|
||||||
|
<td align=left>drive through X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>05</tt> </td>
|
||||||
|
<td align=left>drive through Y</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>00</tt>..<tt>05</tt> </td>
|
<td nowrap valign=top><tt>00</tt>..<tt>05</tt> </td>
|
||||||
<td align=left>ship dock
|
<td align=left>ship dock
|
||||||
@@ -989,17 +1026,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
<li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
|
<li>m6 bits 6..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint, road waypoint)</li>
|
||||||
<li>m6 bit 6: rail station / waypoint may have catenary wires</li>
|
|
||||||
<li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li>
|
|
||||||
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
||||||
<li>m6 bit 0: rail station / waypoint is blocked</li>
|
<li>m6 bits 1..0: animated tile state</li>
|
||||||
|
|
||||||
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
|
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
|
||||||
<li>m7: animation frame (railway stations/waypoints, airports)</li>
|
<li>m7: animation frame (railway stations/waypoints, airports)</li>
|
||||||
|
<li>m8 bit 15: Snow or desert present (road waypoints)</li>
|
||||||
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
|
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
|
||||||
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
|
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
|
||||||
<li>m8 bits 5..0: custom road stop id; 0 means standard graphics</li>
|
<li>m8 bits 5..0: custom road stop/waypoint id; 0 means standard graphics</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1016,100 +1052,95 @@
|
|||||||
<li>m1 bits 6..5 : Water class (sea, canal or river)
|
<li>m1 bits 6..5 : Water class (sea, canal or river)
|
||||||
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
|
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
|
||||||
<li>m2: Depot index (for depots only)</li>
|
<li>m2: Depot index (for depots only)</li>
|
||||||
|
<li>m3 bit 0: Non-flooding state</li>
|
||||||
<li>m4: Random data for canal or river tiles</li>
|
<li>m4: Random data for canal or river tiles</li>
|
||||||
<li>m5: tile type:
|
<li>m5 bits 7..4: Water tile type:
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>00</tt> </td>
|
<td><tt>0</tt> </td>
|
||||||
<td align=left>water, canal or river</td>
|
<td>water, canal or river</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>01</tt> </td>
|
<td><tt>1</tt> </td>
|
||||||
<td align=left>coast or riverbank</td>
|
<td>coast or riverbank</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>10</tt>..<tt>1B</tt> </td>
|
<td nowrap valign=top><tt>2</tt> </td>
|
||||||
<td align=left>canal locks
|
<td>canal lock<br>
|
||||||
|
<ul>
|
||||||
|
<li>m5 bits 3..2: Lock part
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>10</tt> </td>
|
<td><tt>0</tt> </td>
|
||||||
<td align=left>middle part, (SW-NE direction)</td>
|
<td>Middle part</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>11</tt> </td>
|
<td><tt>1</tt> </td>
|
||||||
<td align=left>middle part, (NW-SE direction)</td>
|
<td>Lower part</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>12</tt> </td>
|
<td><tt>2</tt> </td>
|
||||||
<td align=left>middle part, (NE-SW direction)</td>
|
<td>Upper part</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>13</tt> </td>
|
|
||||||
<td align=left>middle part, (SE-NW direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>14</tt> </td>
|
|
||||||
<td align=left>lower part, (SW-NE direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>15</tt> </td>
|
|
||||||
<td align=left>lower part, (NW-SE direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>16</tt> </td>
|
|
||||||
<td align=left>lower part, (NE-SW direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>17</tt> </td>
|
|
||||||
<td align=left>lower part, (SE-NW direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>18</tt> </td>
|
|
||||||
<td align=left>upper part, (SW-NE direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>19</tt> </td>
|
|
||||||
<td align=left>upper part, (NW-SE direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>1A</tt> </td>
|
|
||||||
<td align=left>upper part, (NE-SW direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>1B</tt> </td>
|
|
||||||
<td align=left>upper part, (SE-NW direction)</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</li>
|
||||||
|
<li>m5 bits 1..0: Lock direction
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><tt>0</tt> </td>
|
||||||
|
<td>NE raised</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>1</tt> </td>
|
||||||
|
<td>SE raised</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>2</tt> </td>
|
||||||
|
<td>SW raised</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>3</tt> </td>
|
||||||
|
<td>NW raised</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>80</tt>..<tt>83</tt> </td>
|
<td nowrap valign=top><tt>3</tt> </td>
|
||||||
<td align=left>ship depots
|
<td>depot<br>
|
||||||
|
<ul>
|
||||||
|
<li>m5 bit 1: Depot axis
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>80</tt> </td>
|
<td><tt>0</tt> </td>
|
||||||
<td align=left>ship depot, NE part (X direction)</td>
|
<td>X direction (NE-SW)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap valign=top><tt>81</tt> </td>
|
<td><tt>1</tt> </td>
|
||||||
<td align=left>ship depot, SW part (X direction)</td>
|
<td>Y direction (NW-SE)</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>82</tt> </td>
|
|
||||||
<td align=left>ship depot, NW part (Y direction)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap valign=top><tt>83</tt> </td>
|
|
||||||
<td align=left>ship depot, SE part (Y direction)</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</li>
|
||||||
|
<li>m5 bit 0: Depot part
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><tt>0</tt> </td>
|
||||||
|
<td>North part</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><tt>1</tt> </td>
|
||||||
|
<td>South part</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1451,6 +1482,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>m6 bits 5..3: random triggers (NewGRF)</li>
|
<li>m6 bits 5..3: random triggers (NewGRF)</li>
|
||||||
<li>m6 bit 2: bit 8 of type (see m5)</li>
|
<li>m6 bit 2: bit 8 of type (see m5)</li>
|
||||||
|
<li>m6 bits 1..0: animated tile state</li>
|
||||||
<li>m7: animation frame</li>
|
<li>m7: animation frame</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
@@ -1623,6 +1655,7 @@
|
|||||||
<li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li>
|
<li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li>
|
||||||
<li>m3: random bits</li>
|
<li>m3: random bits</li>
|
||||||
<li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li>
|
<li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li>
|
||||||
|
<li>m6 bits 1..0: animated tile state</li>
|
||||||
<li>m7: animation counter</li>
|
<li>m7: animation counter</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -79,8 +79,8 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">0</td>
|
<td rowspan="2">0</td>
|
||||||
<td class="caption">ground</td>
|
<td class="caption">ground</td>
|
||||||
<td class="bits" rowspan=27><span class="used" title="Tile type">XXXX</span> <span class="used" title="Presence and direction of bridge above">XX</span> <span class="used" title="Tropic Zone: only meaningful in tropic climate. It contains the definition of the available zones">XX</span></td>
|
<td class="bits" rowspan=29><span class="used" title="Tile type">XXXX</span> <span class="used" title="Presence and direction of bridge above">XX</span> <span class="used" title="Tropic Zone: only meaningful in tropic climate. It contains the definition of the available zones">XX</span></td>
|
||||||
<td class="bits" rowspan=27><span class="used" title="Tile height">XXXX XXXX</span></td>
|
<td class="bits" rowspan=29><span class="used" title="Tile height">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="free">OOO</span><span class="usable" title="Owner (always OWNER_NONE)">1 OOOO</span></td>
|
<td class="bits" rowspan=2><span class="free">OOO</span><span class="usable" title="Owner (always OWNER_NONE)">1 OOOO</span></td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="used" title="Type of hedge on NE border">XXX</span> <span class="used" title="Snow presence">X</span><span class="free">OOOO</span></td>
|
<td class="bits"><span class="used" title="Type of hedge on NE border">XXX</span> <span class="used" title="Snow presence">X</span><span class="free">OOOO</span></td>
|
||||||
@@ -130,7 +130,7 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="bits"><span class="used" title="Tile type: simple road (00), level crossing (01), road depot (10)">OO</span> <span class="used" title="Disallow vehicles to go a specific direction">XX</span> <span class="used" title="Road pieces">XXXX</span></td>
|
<td class="bits"><span class="used" title="Tile type: simple road (00), level crossing (01), road depot (10)">OO</span> <span class="used" title="Disallow vehicles to go a specific direction">XX</span> <span class="used" title="Road pieces">XXXX</span></td>
|
||||||
<td class="bits"><span class="free">OO</span> <span class="used" title="Pavement type">XXX</span><span class="free">OOO</span></td>
|
<td class="bits"><span class="free">OO</span> <span class="used" title="Pavement type">XXX</span><span class="free">OOO</span></td>
|
||||||
<td class="bits"><span class="free">OO</span><span class="used" title="Snow/desert present">X</span> <span class="free">O</span><span class="used" title="Roadworks counter">XXXX</span></td>
|
<td class="bits"><span class="free">OO</span><span class="used" title="Snow/desert present">X</span> <span class="free">O</span><span class="used" title="Roadworks counter">XXXX</span></td>
|
||||||
<td class="bits" rowspan=1><span class="free">OOOO</span> <span class="used" title="Tram type">XXXX XX<span class="free">OO OOOO</span></td>
|
<td class="bits" rowspan=1><span class="free">OOOO</span> <span class="used" title="Tram type">XXXX XX</span><span class="free">OO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">level crossing</td>
|
<td class="caption">level crossing</td>
|
||||||
@@ -156,12 +156,12 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="caption">finished house</td>
|
<td class="caption">finished house</td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="House random bits">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="House random bits">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="pool" title="Town index on pool">XXXX XXXX XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="pool" title="Town index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="used" title="House is complete/in construction (see m5)">1</span> <span class="used" title="House type (m4 + m3[6])">X</span><span class="free">O</span><span class="usable" title="Activated triggers (bits 2..4 don't have a meaning)">XXX</span><span class="used" title="Activated triggers (bits 2..4 don't have a meaning)">XX</span></td>
|
<td class="bits"><span class="used" title="House is complete/in construction (see m5)">1</span><span class="free">OO</span><span class="usable" title="Activated triggers (bits 2..4 don't have a meaning)">X XX</span><span class="used" title="Activated triggers (bits 2..4 don't have a meaning)">XX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="House type (m4 + m3[6])">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="used" title="Age in years, clamped at 255">XXXX XXXX</span></td>
|
<td class="bits"><span class="used" title="Age in years, clamped at 255">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="abuse" title="Newhouses activated: periodic processing time remaining; if not, lift position for houses 04 and 05">XXXX XX</span><span class="free">OO</span></td>
|
<td class="bits" rowspan=2><span class="abuse" title="Newhouses activated: periodic processing time remaining; if not, lift position for houses 04 and 05">XXXX XX</span><span class="used" title="Animated tile state">XX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="abuse" title="If newhouses active, m7 is the current animation frame">XXXX</span> <span class="abuse" title="If newhouses active, m7 is the current animantion frame; if not, lift behaviour for houses 04 and 05">XXXX</span></td>
|
<td class="bits" rowspan=2><span class="abuse" title="If newhouses active, m7 is the current animation frame">XXXX</span> <span class="abuse" title="If newhouses active, m7 is the current animantion frame; if not, lift behaviour for houses 04 and 05">XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits" rowspan=2><span class="free">OOOO</span> <span class="used" title="House type">XXXX XXXX XXXX</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">house under construction</td>
|
<td class="caption">house under construction</td>
|
||||||
@@ -181,14 +181,14 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan=7>5</td>
|
<td rowspan=8>5</td>
|
||||||
<td class="caption">rail station</td>
|
<td class="caption">rail station</td>
|
||||||
<td class="bits" rowspan=7><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
<td class="bits" rowspan=8><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||||
<td class="bits" rowspan=7><span class="pool" title="Station index on pool">XXXX XXXX XXXX XXXX</span></td>
|
<td class="bits" rowspan=8><span class="pool" title="Station index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">O</span><span class="used" title="May have pylons">X</span><span class="used" title="May have wires">X</span><span class="used" title="Tile is blocked">X</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Custom station specifications ID">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Custom station specifications ID">XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="used" title="Graphics index">XXXX XXXX</span></td>
|
<td class="bits"><span class="used" title="Graphics index">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span><span class="used" title="May have wires">X</span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="free">O</span><span class="used" title="Tile is blocked">X</span></td>
|
<td class="bits" rowspan=2><span class="free">O</span><span class="used" title="Station type">XXX X</span><span class="used" title="Reserved track">X</span><span class="used" title="Animated tile state">XX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="free">OOOO OOOO OO</span><span class="used" title="Railway type">XX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="free">OOOO OOOO OO</span><span class="used" title="Railway type">XX XXXX</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -199,12 +199,17 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="caption">road stop</td>
|
<td class="caption">road stop</td>
|
||||||
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="free">OOOO</span></td>
|
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="free">OOOO</span></td>
|
||||||
<td class="bits"><span class="free">OO</span><span class="used" title="Roadtype for road stop">XX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="free">OO</span><span class="used" title="Roadtype for road stop">XX XXXX</span></td>
|
||||||
<td class="bits"><span class="usable" title="Graphics index">OOOO O</span><span class="used" title="Graphics index: 00 (exit towards NE), 01 (exit towards SE), 02 (exit towards SW), 03 (exit towards NW), 04 (drive through X), 05 (drive through Y)">XXX</span></td>
|
<td class="bits" rowspan=2><span class="usable" title="Graphics index">OOOO O</span><span class="used" title="Graphics index: 00 (exit towards NE), 01 (exit towards SE), 02 (exit towards SW), 03 (exit towards NW), 04 (drive through X), 05 (drive through Y)">XXX</span></td>
|
||||||
<td class="bits" rowspan=5><span class="free">OO</span><span class="used" title="Station type">XX X</span><span class="free">OOO</span></td>
|
<td class="bits" rowspan=6><span class="free">O</span><span class="used" title="Station type">XXX X</span><span class="free">O</span><span class="used" title="Animated tile state">XX</span></td>
|
||||||
<td class="bits"><span class="free">OOO</span><span class="used" title="Owner of road">X XXXX</span></td>
|
<td class="bits" rowspan=2><span class="free">OOO</span><span class="used" title="Owner of road">X XXXX</span></td>
|
||||||
<td class="bits"><span class="free">OOOO</span> <span class="used" title="Tram type">XXXX XX</span> <span class="used" title="Custom road stops specifications ID">XXXXXX</span></td>
|
<td class="bits"><span class="free">OOOO</span> <span class="used" title="Tram type">XXXX XX</span> <span class="used" title="Custom road stops specifications ID">XXXXXX</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="caption">road waypoint</td>
|
||||||
|
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="used" title="Pavement type">XX</span><span class="free">OO</span></td>
|
||||||
|
<td class="bits"><span class="used" title="Snow/desert present">X</span><span class="free">OOO</span> <span class="used" title="Tram type">XXXX XX</span> <span class="used" title="Custom road stops specifications ID">XXXXXX</span></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">airport</td>
|
<td class="caption">airport</td>
|
||||||
<td class="bits"><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
|
<td class="bits"><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
|
||||||
@@ -235,32 +240,37 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan=4>6</td>
|
<td rowspan=5>6</td>
|
||||||
<td class="caption">sea, shore</td>
|
<td class="caption">sea</td>
|
||||||
<td class="bits" rowspan=4><span class="used" title="Ship docking tile status">X</span> <span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
<td class="bits" rowspan=5><span class="used" title="Ship docking tile status">X</span> <span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||||
<td class="bits" rowspan=3><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
|
||||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</span></td>
|
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
|
||||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>O</span> <span class="free">OOO</span><span class="used" title="Sea shore flag">X</span></td>
|
|
||||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</span></td>
|
|
||||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</td>
|
|
||||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits" rowspan=4><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
|
<td class="bits" rowspan=5><span class="free">OOOO OOO</span><span class="used" title="Non-flooding state">X</span></td>
|
||||||
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOO0</span></td>
|
||||||
|
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
|
||||||
|
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
|
||||||
|
<td class="bits" rowspan=5><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">canal, river</td>
|
<td class="caption">canal, river</td>
|
||||||
<td class="bits"><span class="used" title="Canal/river random bits">XXXX XXXX</span></td>
|
<td class="bits"><span class="used" title="Canal/river random bits">XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>O</span> <span class="free">OOOO</span></td>
|
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOOO</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="caption">shore</td>
|
||||||
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0001</span> <span class="free">OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">lock</td>
|
<td class="caption">lock</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>1</span> <span class="used" title="Lock part">XX</span> <span class="used" title="Lock orientation m5[1..0]">XX</span></td>
|
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0010</span> <span class="used" title="Lock part">XX</span><span class="used" title="Lock orientation m5[1..0]">XX</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="caption">shipdepot</td>
|
<td class="caption">shipdepot</td>
|
||||||
<td class="bits"><span class="pool" title="Depot index on pool">XXXX XXXX XXXX XXXX</span></td>
|
<td class="bits"><span class="pool" title="Depot index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">1<span class="usable">OOO</span></span> <span class="free">OO</span><span class="used" title="Depot axis">X</span> <span class="used" title="Depot part">X</span></td>
|
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0011</span> <span class="free">OO</span><span class="used" title="Depot axis">X</span><span class="used" title="Depot part">X</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan=2>8</td>
|
<td rowspan=2>8</td>
|
||||||
@@ -270,7 +280,7 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Animation loop">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Animation loop">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Industry graphics ID (m5 + m6[2])">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Industry graphics ID (m5 + m6[2])">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="free">OO</span><span class="used" title="Random triggers (NewGRF)">XXX</span> <span class="used" title="Industry graphics ID (m5 + m6[2])">X</span><span class="free">OO</span></td>
|
<td class="bits" rowspan=2><span class="free">OO</span><span class="used" title="Random triggers (NewGRF)">XXX</span> <span class="used" title="Industry graphics ID (m5 + m6[2])">X</span><span class="used" title="Animated tile state">XX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=2><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits" rowspan=2><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -303,7 +313,7 @@ the array so you can quickly see what is used and what is not.
|
|||||||
<td class="bits"><span class="used" title="Random bits">XXXX XXXX</span></td>
|
<td class="bits"><span class="used" title="Random bits">XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="pool" title="Object index on pool (m2 + m5)">XXXX XXXX</span></td>
|
<td class="bits"><span class="pool" title="Object index on pool (m2 + m5)">XXXX XXXX</span></td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OO</span><span class="used" title="Animated tile state">XX</span></td>
|
||||||
<td class="bits"><span class="used" title="Animation counter">XXXX XXXX</span></td>
|
<td class="bits"><span class="used" title="Animation counter">XXXX XXXX</span></td>
|
||||||
<td class="bits" rowspan=1><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
<td class="bits" rowspan=1><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
.Op Fl M Ar musicset
|
.Op Fl M Ar musicset
|
||||||
.Op Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar company
|
.Op Fl n Ar host Ns Oo : Ns Ar port Oc Ns Op # Ns Ar company
|
||||||
.Op Fl p Ar password
|
.Op Fl p Ar password
|
||||||
.Op Fl P Ar password
|
|
||||||
.Op Fl q Ar savegame
|
.Op Fl q Ar savegame
|
||||||
.Op Fl r Ar width Ns x Ns Ar height
|
.Op Fl r Ar width Ns x Ns Ar height
|
||||||
.Op Fl s Ar driver
|
.Op Fl s Ar driver
|
||||||
@@ -100,10 +99,6 @@ play as.
|
|||||||
Password used to join server.
|
Password used to join server.
|
||||||
Only useful with
|
Only useful with
|
||||||
.Fl n .
|
.Fl n .
|
||||||
.It Fl P Ar password
|
|
||||||
Password used to join company.
|
|
||||||
Only useful with
|
|
||||||
.Fl n .
|
|
||||||
.It Fl q Ar savegame
|
.It Fl q Ar savegame
|
||||||
Write some information about the specified savegame and exit.
|
Write some information about the specified savegame and exit.
|
||||||
.It Fl Q
|
.It Fl Q
|
||||||
|
@@ -7,18 +7,20 @@ This guide is for OpenTTD developers/maintainers, to release a new version of Op
|
|||||||
* If this is a beta version release, skip this step.
|
* If this is a beta version release, skip this step.
|
||||||
|
|
||||||
* If this is an RC1 (first Release Candidate) build, create a new branch `release/nn` where `nn` is the major version number, then apply changes similar to [PR#9573](https://github.com/OpenTTD/OpenTTD/pull/9573). You also need to forwardport the changelog, as in [PR#10113](https://github.com/OpenTTD/OpenTTD/pull/10113).
|
* If this is an RC1 (first Release Candidate) build, create a new branch `release/nn` where `nn` is the major version number, then apply changes similar to [PR#9573](https://github.com/OpenTTD/OpenTTD/pull/9573). You also need to forwardport the changelog, as in [PR#10113](https://github.com/OpenTTD/OpenTTD/pull/10113).
|
||||||
* Update CMakeLists.txt
|
* Update the version in `CMakeLists.txt` in the master branch, heading for the next major release, e.g. from 14.0 to 15.0.
|
||||||
* Add a new (empty) AI compatibility script in bin/ai/
|
* Add a new (empty) AI compatibility script in `bin/ai/`
|
||||||
* Add the new version to CheckAPIVersion in src/ai/ai_info.cpp + src/game/game_info.cpp
|
* Add the new version to CheckAPIVersion in `src/ai/ai_info.cpp` and `src/game/game_info.cpp`
|
||||||
* Add the new version to src/script/api/ai_changelog.hpp + src/script/api/game_changelog.hpp
|
* Add the new version to `src/script/api/ai_changelog.hpp` and `src/script/api/game_changelog.hpp`
|
||||||
* Update the version of regression in bin/ai/regression/regression_info.nut
|
* Update the version of regression in `bin/ai/regression/regression_info.nut`
|
||||||
* Add a note to src/saveload/saveload.h about which savegame version is used in the branch.
|
* Add a note to `src/saveload/saveload.h` about which savegame version is used in the branch.
|
||||||
|
|
||||||
* If this is a later RC or release build and the release branch already exists, you'll need to backport fixes and language from master to this branch, which were merged after the branch diverged from master. You can use these two helper scripts: https://github.com/OpenTTD/scripts/tree/main/backport
|
* If this is a later RC or release build and the release branch already exists, you'll need to backport fixes and language from master to this branch, which were merged after the branch diverged from master. You can use these two helper scripts: https://github.com/OpenTTD/scripts/tree/main/backport
|
||||||
|
|
||||||
|
* If this is a maintenance release, update the version in `CMakeLists.txt` in the release branch, e.g. from 14.0 to 14.1.
|
||||||
|
|
||||||
## Step 1: Prepare changelog documentation
|
## Step 1: Prepare changelog documentation
|
||||||
|
|
||||||
1. Update the [changelog](../changelog.txt) with new changes since the last release.
|
1. Update the [changelog](../changelog.md) with new changes since the last release.
|
||||||
* Changelog entries are typically PR titles, but can be edited to be more helpful without context.
|
* Changelog entries are typically PR titles, but can be edited to be more helpful without context.
|
||||||
* Don't include fixes to things which haven't previously been released (like fixes to features which are in the same changelog).
|
* Don't include fixes to things which haven't previously been released (like fixes to features which are in the same changelog).
|
||||||
* Order the entries by importance: `Feature > Add > Change > Fix`, then numerically by PR number.
|
* Order the entries by importance: `Feature > Add > Change > Fix`, then numerically by PR number.
|
||||||
@@ -29,20 +31,26 @@ This guide is for OpenTTD developers/maintainers, to release a new version of Op
|
|||||||
|
|
||||||
1. Go to https://github.com/OpenTTD/website/new/main/_posts and write a new announcement post. See a [previous example](https://github.com/OpenTTD/website/pull/238) for a template.
|
1. Go to https://github.com/OpenTTD/website/new/main/_posts and write a new announcement post. See a [previous example](https://github.com/OpenTTD/website/pull/238) for a template.
|
||||||
2. Create a new branch for this post and open a PR for it.
|
2. Create a new branch for this post and open a PR for it.
|
||||||
3. Write announcement text for socials like Forum/Discord/Twitter/Reddit and include it in the PR.
|
3. Write announcement text for the store pages and socials like TT-Forums / Discord / Twitter / Reddit / Fosstodon / etc., and include it in the PR.
|
||||||
4. Create a Steam news image for that post and include it in the PR.
|
4. Create a Steam news image for that post and include it in the PR.
|
||||||
5. Check the website post (preview link via checks page) and make corrections. We usually just use the GitHub web interface for this and squash the result later.
|
5. Check the website post ("View Deployment" link) and make corrections. We usually just use the GitHub web interface for this and squash the result later.
|
||||||
6. Get this PR approved, but do not merge yet.
|
6. Get this PR approved, but do not merge yet.
|
||||||
|
|
||||||
## Step 3: Make the actual OpenTTD release
|
## Step 3: Make the actual OpenTTD release
|
||||||
|
|
||||||
1. Go to https://github.com/OpenTTD/OpenTTD/releases/new and create a new tag matching the release number. For the body of the release, see any older release. "Set as a pre-release" for a beta or RC, set as latest for a real release.
|
1. Confirm that the version in `CMakeLists.txt` matches the intended release version.
|
||||||
2. Merge website PR.
|
2. Go to https://github.com/OpenTTD/OpenTTD/releases/new and create a new tag matching the release number. For the body of the release, copy in the changelog. "Set as a pre-release" for a beta or RC.
|
||||||
3. Wait for the OpenTTD release checks to be complete.
|
3. Wait for the OpenTTD release workflow to be complete.
|
||||||
4. Check that website links to the new release are working and correct, using the [staging website](https://www-staging.openttd.org/).
|
4. If this is a full release:
|
||||||
5. If this is a full release, ask orudge to update the Microsoft Store and TrueBrain to move the release from the "testing" to "default" branch on Steam.
|
* for `Steam`: under Steamworks -> SteamPipe -> Builds, set the "testing" branch live on the "default" branch. This will request 2FA validation.
|
||||||
|
* for `GOG`: under Builds, "Publish" the freshly uploaded builds to `Master`, `GOG-use only` and `Testing`.
|
||||||
|
* for `Microsoft Store`: ask orudge to publish the new release.
|
||||||
|
|
||||||
|
Access to `Steam`, `GOG` and/or `Microsoft Store` requires a developer account on that platform.
|
||||||
|
You will need access to the shared keystore in order to create such an account.
|
||||||
|
For help and/or access to either or both, please contact TrueBrain.
|
||||||
|
|
||||||
## Step 4: Tell the world
|
## Step 4: Tell the world
|
||||||
|
|
||||||
1. Tag and create a website release to trigger the actions that update the website.
|
1. Merge the website PR. This will publish the release post.
|
||||||
2. After the website is live, make announcements on social media. You may need to coordinate with other developers who can make posts on Twitter, Reddit, Steam, and GOG.
|
2. Make announcements on social media and store pages. You may need to coordinate with other developers who can make posts on TT-Forums, Twitter, Reddit, Fosstodon, Discord, Steam, GOG, Microsoft Store, etc.
|
||||||
|
@@ -19,7 +19,7 @@ Now simply open up the `crash.dmp`, and start debugging.
|
|||||||
The best tool to use is `minidump-stackwalk` as published in the Rust's cargo index:
|
The best tool to use is `minidump-stackwalk` as published in the Rust's cargo index:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo install minidump-stackwalk
|
cargo install --locked minidump-stackwalk
|
||||||
```
|
```
|
||||||
|
|
||||||
For how to install Rust, please see [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).
|
For how to install Rust, please see [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).
|
||||||
|
426
known-bugs.md
Normal file
426
known-bugs.md
Normal file
@@ -0,0 +1,426 @@
|
|||||||
|
# OpenTTD's known bugs
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
- 1.0) About
|
||||||
|
- 2.0) Known bugs
|
||||||
|
|
||||||
|
## 1.0) About
|
||||||
|
|
||||||
|
All bugs listed below are marked as known. Please do not submit any bugs
|
||||||
|
that are the same as these. If you do, do not act surprised, because
|
||||||
|
we WILL flame you!
|
||||||
|
|
||||||
|
The current list of known bugs that we intend to fix can be found in our
|
||||||
|
bug tracking system at https://github.com/OpenTTD/OpenTTD/issues
|
||||||
|
Also check the closed bugs when searching for your bug in this system as we
|
||||||
|
might have fixed the bug in the mean time.
|
||||||
|
|
||||||
|
## 2.0) Known bugs
|
||||||
|
|
||||||
|
This section lists all known bugs that we do not intend to fix and the
|
||||||
|
reasons why we think that fixing them is infeasible. We might make some
|
||||||
|
minor improvements that reduce the scope of these bugs, but we will not
|
||||||
|
be able to completely fix them.
|
||||||
|
|
||||||
|
### No suitable AI can be found:
|
||||||
|
|
||||||
|
If you have no AIs and an AI is started the so-called 'dummy' AI will
|
||||||
|
be loaded. This AI does nothing but writing a message on the AI debug
|
||||||
|
window and showing a red warning. There are basically two solutions
|
||||||
|
for this problem: Either you set the number of AI players to 0 so that
|
||||||
|
no AI is started. You find that setting at the top of the window in the
|
||||||
|
"AI / Game Scripts Settings" window.
|
||||||
|
|
||||||
|
The other solution is acquiring (downloading) some AI. The easiest way
|
||||||
|
to do this is via the "Check Online Content" button in the main (intro)
|
||||||
|
menu or directly in the "AI / Game Scripts Settings" dialogue via the
|
||||||
|
"Check Online Content" button.
|
||||||
|
|
||||||
|
### After a while of playing, colours get corrupted:
|
||||||
|
|
||||||
|
In Windows 7 the background slideshow corrupts the colour mapping
|
||||||
|
of OpenTTD's 8bpp screen modes. Workarounds for this are:
|
||||||
|
|
||||||
|
* Switching to windowed mode, instead of fullscreen
|
||||||
|
* Switching off background slideshow
|
||||||
|
* Setting up the `32bpp-anim` or `32bpp-optimized` blitter
|
||||||
|
|
||||||
|
### Custom vehicle type name is incorrectly aligned:
|
||||||
|
|
||||||
|
Some NewGRFs use sprites that are bigger than normal in the "buy
|
||||||
|
vehicle" window. Due to this they have to encode an offset for
|
||||||
|
the vehicle type name. Upon renaming the vehicle type this encoded
|
||||||
|
offset is stripped from the name because the "edit box" cannot show
|
||||||
|
this encoding. As a result the custom vehicle type names will get
|
||||||
|
the default alignment. The only way to (partially) fix this is by
|
||||||
|
adding spaces to the custom name.
|
||||||
|
|
||||||
|
### Clipping problems [#119]:
|
||||||
|
|
||||||
|
In some cases sprites are not drawn as one would expect. Examples of
|
||||||
|
this are aircraft that might be hidden below the runway or trees that
|
||||||
|
in some cases are rendered over vehicles.
|
||||||
|
|
||||||
|
The primary cause of this problem is that OpenTTD does not have enough
|
||||||
|
data (like a 3D model) to properly determine what needs to be drawn in
|
||||||
|
front of what. OpenTTD has bounding boxes but in lots of cases they
|
||||||
|
are either too big or too small and then cause problems with what
|
||||||
|
needs to be drawn in front of what. Also some visual tricks are used.
|
||||||
|
|
||||||
|
For example trains at 8 pixels high, the catenary needs to be drawn
|
||||||
|
above that. When you want to draw bridges on top of that, which are
|
||||||
|
only one height level (= 8 pixels) higher, you are getting into some
|
||||||
|
big problems.
|
||||||
|
|
||||||
|
We can not change the height levels; it would require us to either
|
||||||
|
redraw all vehicle or all landscape graphics. Doing so would mean we
|
||||||
|
leave the Transport Tycoon graphics, which in effect means OpenTTD
|
||||||
|
will not be a Transport Tycoon clone anymore.
|
||||||
|
|
||||||
|
### Mouse scrolling not possible at the edges of the screen [#383] [#3966]:
|
||||||
|
|
||||||
|
Scrolling the viewport with the mouse cursor at the edges of the screen
|
||||||
|
in the same direction of the edge will fail. If the cursor is near the
|
||||||
|
edge the scrolling will be very slow.
|
||||||
|
|
||||||
|
OpenTTD only receives cursor position updates when the cursor is inside
|
||||||
|
OpenTTD's window. It is not told how far you have moved the cursor
|
||||||
|
outside of OpenTTD's window.
|
||||||
|
|
||||||
|
### Lost trains ignore (block) exit signals [#1473]:
|
||||||
|
|
||||||
|
If trains are lost they ignore block exit signals, blocking junctions
|
||||||
|
with presignals. This is caused because the path finders cannot tell
|
||||||
|
where the train needs to go. As such a random direction is chosen at
|
||||||
|
each junction. This causes the trains to occasionally to make choices
|
||||||
|
that are unwanted from a player's point of view.
|
||||||
|
|
||||||
|
This will not be fixed because lost trains are in almost all cases a
|
||||||
|
network problem, e.g. a train can never reach a specific place. This
|
||||||
|
makes the impact of fixing the bug enormously small against the amount
|
||||||
|
of work needed to write a system that prevents the lost trains from
|
||||||
|
taking the wrong direction.
|
||||||
|
|
||||||
|
### Vehicle owner of last transfer leg gets paid for all [#2427]:
|
||||||
|
|
||||||
|
When you make a transfer system that switches vehicle owners. This
|
||||||
|
is only possible with 'industry stations', e.g. the oil rig station
|
||||||
|
the owner of the vehicle that does the final delivery gets paid for
|
||||||
|
the whole trip. It is not shared amongst the different vehicle
|
||||||
|
owners that have participated in transporting the cargo.
|
||||||
|
|
||||||
|
This sharing is not done because it would enormously increase the
|
||||||
|
memory and CPU usage in big games for something that is happening
|
||||||
|
in only one corner case. We think it is not worth the effort until
|
||||||
|
sharing of stations is an official feature.
|
||||||
|
|
||||||
|
### Forbid 90 degree turns does not work for crossing PBS paths [#2737]:
|
||||||
|
|
||||||
|
When you run a train through itself on a X junction with PBS turned on
|
||||||
|
the train will not obey the 'forbid 90 degree turns' setting. This is
|
||||||
|
due to the fact that we can not be sure that the setting was turned
|
||||||
|
off when the track was reserved, which means that we assume it was
|
||||||
|
turned on and that the setting does not hold at the time. We made it
|
||||||
|
this way to allow one to change the setting in-game, but it breaks
|
||||||
|
slightly when you are running your train through itself. Running a
|
||||||
|
train through means that your network is broken and is thus a user
|
||||||
|
error which OpenTTD tries to graciously handle.
|
||||||
|
|
||||||
|
Fixing this bug means that we need to record whether this particular
|
||||||
|
setting was turned on or off at the time the reservation was made. This
|
||||||
|
means adding quite a bit of data to the savegame for solving an issue
|
||||||
|
that is basically an user error. We think it is not worth the effort.
|
||||||
|
|
||||||
|
### Duplicate (station) names after renaming [#3204]:
|
||||||
|
|
||||||
|
After renaming stations one can create duplicate station names. This
|
||||||
|
is done giving a station the same custom name as another station with
|
||||||
|
an automatically generated name.
|
||||||
|
|
||||||
|
The major part of this problem is that station names are translatable.
|
||||||
|
Meaning that a station is called e.g. '<TOWN> Central' in English and
|
||||||
|
'<TOWN> Centraal' in Dutch. This means that in network games the
|
||||||
|
renaming of a town could cause the rename to succeed on some clients
|
||||||
|
and fail at others. This creates an inconsistent game state that will
|
||||||
|
be seen as a 'desync'. Secondly the custom names are intended to fall
|
||||||
|
completely outside of the '<TOWN> <name>' naming of stations, so when
|
||||||
|
you rename a town all station names are updated accordingly.
|
||||||
|
|
||||||
|
As a result the decision has been made that all custom names are only
|
||||||
|
compared to the other custom names in the same class and not compared
|
||||||
|
to the automatically generated names.
|
||||||
|
|
||||||
|
### Extreme CPU usage/hangs when using SDL and PulseAudio [#3294], OpenTTD hangs/freezes when closing, OpenTTD is slow, OpenTTD uses a lot of CPU:
|
||||||
|
|
||||||
|
OpenTTD can be extremely slow/use a lot of CPU when the sound is
|
||||||
|
played via SDL and then through PulseAudio's ALSA wrapper. Under the
|
||||||
|
same configuration OpenTTD, or rather SDL, might hang when exiting
|
||||||
|
the game. This problem is seen most in Ubuntu 9.04 and higher.
|
||||||
|
|
||||||
|
This is because recent versions of the PulseAudio sound server
|
||||||
|
are configured to use timer-based audio scheduling rather than
|
||||||
|
interrupt-based audio scheduling. Configuring PulseAudio to force
|
||||||
|
use of interrupt-based scheduling may resolve sound problems for
|
||||||
|
some users. Under recent versions of Ubuntu Linux (9.04 and higher)
|
||||||
|
this can be accomplished by changing the following line in the
|
||||||
|
`/etc/pulse/default.pa` file:
|
||||||
|
`load-module module-udev-detect`
|
||||||
|
to
|
||||||
|
`load-module module-udev-detect tsched=0`
|
||||||
|
|
||||||
|
Note that PulseAudio must be restarted for changes to take effect. Older
|
||||||
|
versions of PulseAudio may use the module-hal-detect module instead.
|
||||||
|
Adding tsched=0 to the end of that line will have a similar effect.
|
||||||
|
|
||||||
|
Another possible solution is selecting the "pulse" backend of SDL
|
||||||
|
by either using `SDL_AUDIODRIVER=pulse openttd` at the command
|
||||||
|
prompt or installing the `libsdl1.2debian-pulseaudio` package from
|
||||||
|
Ubuntu's Universe repository. For other distributions a similar
|
||||||
|
package needs to be installed.
|
||||||
|
|
||||||
|
### OpenTTD not properly resizing with SDL on X [#3305]:
|
||||||
|
|
||||||
|
Under some X window managers OpenTTD's window does not properly
|
||||||
|
resize. You will either end up with a black bar at the right/bottom
|
||||||
|
side of the window or you cannot see the right/bottom of the window,
|
||||||
|
e.g. you cannot see the status bar. The problem is that OpenTTD does
|
||||||
|
not always receive a resize event from SDL making it impossible for
|
||||||
|
OpenTTD to know that the window was resized; sometimes moving the
|
||||||
|
window will solve the problem.
|
||||||
|
|
||||||
|
Window managers that are known to exhibit this behaviour are GNOME's
|
||||||
|
and KDE's. With the XFCE's and LXDE's window managers the resize
|
||||||
|
event is sent when the user releases the mouse.
|
||||||
|
|
||||||
|
### Incorrect colours, crashes upon exit, debug warnings and smears upon window resizing with SDL on macOS [#3447]:
|
||||||
|
|
||||||
|
Video handling with (lib)SDL under macOS is known to fail on some
|
||||||
|
versions of macOS with some hardware configurations. Some of
|
||||||
|
the problems happen only under some circumstances whereas others
|
||||||
|
are always present.
|
||||||
|
|
||||||
|
We suggest that the SDL video/sound backend is not used for OpenTTD
|
||||||
|
in combinations with macOS.
|
||||||
|
|
||||||
|
### Train crashes entering same junction from block and path signals [#3928]:
|
||||||
|
|
||||||
|
When a train has reserved a path from a path signal to a two way
|
||||||
|
block signal and the reservation passes a path signal through the
|
||||||
|
back another train can enter the reserved path (only) via that
|
||||||
|
same two way block signal.
|
||||||
|
|
||||||
|
The reason for this has to do with optimisation; to fix this issue
|
||||||
|
the signal update has to pass all path signals until it finds either
|
||||||
|
a train or a backwards facing signal. This is a very expensive task.
|
||||||
|
|
||||||
|
The (signal) setups that allow these crashes can furthermore be
|
||||||
|
considered incorrectly signalled; one extra safe waiting point for
|
||||||
|
the train entering from path signal just after the backwards facing
|
||||||
|
signal (from the path signal train) resolves the issue.
|
||||||
|
|
||||||
|
### Crashes when run in a VM using Parallels Desktop [#4003]:
|
||||||
|
|
||||||
|
When the Windows version of OpenTTD is executed in a VM under
|
||||||
|
Parallels Desktop a privileged instruction exception may be thrown.
|
||||||
|
|
||||||
|
As OpenTTD works natively on macOS as well as natively on Windows and
|
||||||
|
these native builds both don't exhibit this behaviour this crash is
|
||||||
|
most likely due to a bug in the virtual machine, something out of
|
||||||
|
the scope of OpenTTD. Most likely this is due to Parallels Desktop
|
||||||
|
lacking support for RDTSC calls. The problem can be avoided by using
|
||||||
|
other VM-software, Wine, or running natively on macOS.
|
||||||
|
|
||||||
|
### Entry- and exit signals are not dragged [#4378]:
|
||||||
|
|
||||||
|
Unlike all other signal types, the entry- and exit signals are not
|
||||||
|
dragged but instead normal signals are placed on subsequent track
|
||||||
|
sections. This is done on purpose as this is the usually more
|
||||||
|
convenient solution. There are little to no occasions where more
|
||||||
|
than one entry or exit signal in a row are useful. This is different
|
||||||
|
for all other signal types where several in a row can serve one
|
||||||
|
purpose or another.
|
||||||
|
|
||||||
|
### (Temporary) wrong colours when switching to full screen [#4511]:
|
||||||
|
|
||||||
|
On Windows it can happen that you temporarily see wrong colours
|
||||||
|
when switching to full screen OpenTTD, either by starting
|
||||||
|
OpenTTD in full screen mode, changing to full screen mode or by
|
||||||
|
ALT-TAB-ing into a full screen OpenTTD. This is caused by the
|
||||||
|
fact that OpenTTD, by default, uses 8bpp paletted output. The
|
||||||
|
wrong colours you are seeing is a temporary effect of the video
|
||||||
|
driver switching to 8bpp palette mode.
|
||||||
|
|
||||||
|
This issue can be worked around in two ways:
|
||||||
|
* Setting fullscreen_bpp to 32
|
||||||
|
* Setting up the 32bpp-anim or 32bpp-optimized blitter
|
||||||
|
|
||||||
|
### Can't run OpenTTD with the -d option from a MSYS console [#4587]:
|
||||||
|
|
||||||
|
The MSYS console does not allow OpenTTD to open an extra console for
|
||||||
|
debugging output. Compiling OpenTTD with the --enable-console
|
||||||
|
configure option prevents this issue and allows the -d option to use
|
||||||
|
the MSYS console for its output.
|
||||||
|
|
||||||
|
### Unreadable characters for non-latin locales [#4607]:
|
||||||
|
|
||||||
|
OpenTTD does not ship a non-latin font in its graphics files. As a
|
||||||
|
result OpenTTD needs to acquire the font from somewhere else. What
|
||||||
|
OpenTTD does is ask the operating system, or a system library, for
|
||||||
|
the best font for a given language if the currently loaded font
|
||||||
|
does not provide all characters of the chosen translation. This
|
||||||
|
means that OpenTTD has no influence over the quality of the chosen
|
||||||
|
font; it just does the best it can do.
|
||||||
|
|
||||||
|
If the text is unreadable there are several steps that you can take
|
||||||
|
to improve this. The first step is finding a good font and configure
|
||||||
|
this in the configuration file. See section 9.0 of README.md for
|
||||||
|
more information. You can also increase the font size to make the
|
||||||
|
characters bigger and possible better readable.
|
||||||
|
|
||||||
|
If the problem is with the clarity of the font you might want to
|
||||||
|
enable anti-aliasing by setting the small_aa/medium_aa/large_aa
|
||||||
|
settings to "true". However, anti-aliasing only works when a 32-bit
|
||||||
|
blitter has been selected, e.g. `blitter = "32bpp-anim"`, as with the
|
||||||
|
8 bits blitter there are not enough colours to properly perform the
|
||||||
|
anti-aliasing.
|
||||||
|
|
||||||
|
### Train does not crash with itself [#4635]:
|
||||||
|
|
||||||
|
When a train drives in a circle the front engine passes through
|
||||||
|
wagons of the same train without crashing. This is intentional.
|
||||||
|
Signals are only aware of tracks, they do not consider the train
|
||||||
|
length and whether there would be enough room for a train in some
|
||||||
|
circle it might drive on. Also the path a train might take is not
|
||||||
|
necessarily known when passing a signal.
|
||||||
|
|
||||||
|
Checking all circumstances would take a lot of additional
|
||||||
|
computational power for signals, which is not considered worth
|
||||||
|
the effort, as it does not add anything to gameplay.
|
||||||
|
|
||||||
|
Nevertheless trains shall not crash in normal operation, so making
|
||||||
|
a train not crash with itself is the best solution for everyone.
|
||||||
|
|
||||||
|
### Aircraft coming through wall in rotated airports [#4705]:
|
||||||
|
|
||||||
|
With rotated airports, specifically hangars, you will see that the
|
||||||
|
aircraft will show a part through the back wall of the hangar.
|
||||||
|
|
||||||
|
This can be solved by only drawing a part of the plane when being
|
||||||
|
at the back of the hangar, however then with transparency turned on
|
||||||
|
the aircraft would be shown partially which would be even weirder.
|
||||||
|
|
||||||
|
As such the current behaviour is deemed the least bad.
|
||||||
|
The same applies to overly long ships and their depots.
|
||||||
|
|
||||||
|
### Vehicles not keeping their "maximum" speed [#4815]:
|
||||||
|
|
||||||
|
Vehicles that have not enough power to reach and maintain their
|
||||||
|
advertised maximum speed might be constantly jumping between two
|
||||||
|
speeds. This is due to the fact that speed and its calculations
|
||||||
|
are done with integral numbers instead of floating point numbers.
|
||||||
|
|
||||||
|
As a result of this a vehicle will never reach its equilibrium
|
||||||
|
between the drag/friction and propulsion. So in effect it will be
|
||||||
|
in a vicious circle of speeding up and slowing down due to being
|
||||||
|
just at the other side of the equilibrium.
|
||||||
|
|
||||||
|
Not speeding up when near the equilibrium will cause the vehicle to
|
||||||
|
never come in the neighbourhood of the equilibrium and not slowing
|
||||||
|
down when near the equilibrium will cause the vehicle to never slow
|
||||||
|
down towards the equilibrium once it has come down a hill.
|
||||||
|
|
||||||
|
It is possible to calculate whether the equilibrium will be passed,
|
||||||
|
but then all acceleration calculations need to be done twice.
|
||||||
|
|
||||||
|
### Settings not saved when OpenTTD crashes [#4846]:
|
||||||
|
|
||||||
|
The settings are not saved when OpenTTD crashes for several reasons.
|
||||||
|
The most important is that the game state is broken and as such the
|
||||||
|
settings might contain invalid values, or the settings have not even
|
||||||
|
been loaded yet. This would cause invalid or totally wrong settings
|
||||||
|
to be written to the configuration file.
|
||||||
|
|
||||||
|
A solution to that would be saving the settings whenever one changes,
|
||||||
|
however due to the way the configuration file is saved this requires
|
||||||
|
a flush of the file to the disk and OpenTTD needs to wait till that
|
||||||
|
is finished. On some file system implementations this causes the
|
||||||
|
flush of all 'write-dirty' caches, which can be a significant amount
|
||||||
|
of data to be written. This can further be aggravated by spinning
|
||||||
|
down disks to conserve power, in which case this disk needs to be
|
||||||
|
spun up first. This means that many seconds may pass before the
|
||||||
|
configuration file is actually written, and all that time OpenTTD
|
||||||
|
will not be able to show any progress. Changing the way the
|
||||||
|
configuration file is saved is not an option as that leaves us more
|
||||||
|
vulnerable to corrupt configuration files.
|
||||||
|
|
||||||
|
Finally, crashes should not be happening. If they happen they should
|
||||||
|
be reported and fixed, so essentially fixing this is fixing the wrong
|
||||||
|
thing. If you really need the configuration changes to be saved,
|
||||||
|
and you need to run a version that crashes regularly, then you can
|
||||||
|
use the `saveconfig` command in the console to save the settings.
|
||||||
|
|
||||||
|
### Not all NewGRFs, AIs, game scripts are found [#4887]:
|
||||||
|
|
||||||
|
Under certain situations, where the path for the content within a
|
||||||
|
tar file is the same as other content on the file system or in another
|
||||||
|
tar file, it is possible that content is not found. A more thorough
|
||||||
|
explanation and solutions are described in section 4.4 of README.md.
|
||||||
|
|
||||||
|
### Mouse cursor going missing with SDL [#4997]:
|
||||||
|
|
||||||
|
Under certain circumstances SDL does not notify OpenTTD of changes with
|
||||||
|
respect to the mouse pointer, specifically whether the mouse pointer
|
||||||
|
is within the bounds of OpenTTD or not. For example, if you "Alt-Tab"
|
||||||
|
to another application the mouse cursor will still be shown in OpenTTD,
|
||||||
|
and when you move the mouse outside of the OpenTTD window so the cursor
|
||||||
|
gets hidden, open/move another application on top of the OpenTTD window
|
||||||
|
and then Alt-tab back into OpenTTD the cursor will not be shown.
|
||||||
|
|
||||||
|
We cannot fix this problem as SDL simply does not provide the required
|
||||||
|
information in these corner cases. This is a bug in SDL and as such
|
||||||
|
there is little that we can do about it.
|
||||||
|
|
||||||
|
### Trains might not stop at platforms that are currently being changed [#5553]:
|
||||||
|
|
||||||
|
If you add tiles to or remove tiles from a platform while a train is
|
||||||
|
approaching to stop at the same platform, that train can miss the place
|
||||||
|
where it's supposed to stop and pass the station without stopping.
|
||||||
|
|
||||||
|
This is caused by the fact that the train is considered to already
|
||||||
|
have stopped if it's beyond its assigned stopping location. We can't
|
||||||
|
let the train stop just anywhere in the station because then it would
|
||||||
|
never leave the station if you have the same station in the order
|
||||||
|
list multiple times in a row or if there is only one station
|
||||||
|
in theorder list (see #5684).
|
||||||
|
|
||||||
|
### Some houses and industries are not affected by transparency [#5817]:
|
||||||
|
|
||||||
|
Some of the default houses and industries (f.e. the iron ore mine) are
|
||||||
|
not affected by the transparency options. This is because the graphics
|
||||||
|
do not (completely) separate the ground from the building.
|
||||||
|
|
||||||
|
This is a bug of the original graphics, and unfortunately cannot be
|
||||||
|
fixed with OpenGFX for the sake of maintaining compatibility with
|
||||||
|
the original graphics.
|
||||||
|
|
||||||
|
### Involuntary cargo exchange with cargodist via neutral station [#6114]:
|
||||||
|
|
||||||
|
When two players serve a neutral station at an industry, a cross-company
|
||||||
|
chain for cargo flow can and will be established which can only be
|
||||||
|
interrupted if one of the players stops competing for the resources of
|
||||||
|
that industry. There is an easy fix for this: If you are loading at the
|
||||||
|
shared station make the order "no unload" and if you're unloading make
|
||||||
|
it "no load". Cargodist will then figure out that it should not create
|
||||||
|
such a route.
|
||||||
|
|
||||||
|
### Incorrect ending year displayed in end of game newspaper [#8625]
|
||||||
|
|
||||||
|
The ending year of the game is configurable, but the date displayed in
|
||||||
|
the newspaper at the end of the game is part of the graphics, not text.
|
||||||
|
|
||||||
|
So to fix this would involve fixing the graphics in every baseset,
|
||||||
|
including the original. Additionally, basesets are free to put this
|
||||||
|
text in different positions (which they do), making a proper solution
|
||||||
|
to this infinitely more complex for a part of the game that fewer than
|
||||||
|
1% of players ever see.
|
389
known-bugs.txt
389
known-bugs.txt
@@ -1,389 +0,0 @@
|
|||||||
OpenTTD's known bugs
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
Table of contents
|
|
||||||
-----------------
|
|
||||||
1.0) About
|
|
||||||
2.0) Known bugs
|
|
||||||
|
|
||||||
|
|
||||||
1.0) About
|
|
||||||
---- -----
|
|
||||||
All bugs listed below are marked as known. Please do not submit any bugs
|
|
||||||
that are the same as these. If you do, do not act surprised, because
|
|
||||||
we WILL flame you!
|
|
||||||
|
|
||||||
The current list of known bugs that we intend to fix can be found in our
|
|
||||||
bug tracking system at https://github.com/OpenTTD/OpenTTD/issues
|
|
||||||
Also check the closed bugs when searching for your bug in this system as we
|
|
||||||
might have fixed the bug in the mean time.
|
|
||||||
|
|
||||||
|
|
||||||
2.0) Known bugs
|
|
||||||
---- ----------------------------------
|
|
||||||
This section lists all known bugs that we do not intend to fix and the
|
|
||||||
reasons why we think that fixing them is infeasible. We might make some
|
|
||||||
minor improvements that reduce the scope of these bugs, but we will not
|
|
||||||
be able to completely fix them.
|
|
||||||
|
|
||||||
No suitable AI can be found:
|
|
||||||
If you have no AIs and an AI is started the so-called 'dummy' AI will
|
|
||||||
be loaded. This AI does nothing but writing a message on the AI debug
|
|
||||||
window and showing a red warning. There are basically two solutions
|
|
||||||
for this problem: Either you set the number of AI players to 0 so that
|
|
||||||
no AI is started. You find that setting at the top of the window in the
|
|
||||||
"AI / Game Scripts Settings" window.
|
|
||||||
The other solution is acquiring (downloading) some AI. The easiest way
|
|
||||||
to do this is via the "Check Online Content" button in the main (intro)
|
|
||||||
menu or directly in the "AI / Game Scripts Settings" dialogue via the
|
|
||||||
"Check Online Content" button.
|
|
||||||
|
|
||||||
After a while of playing, colours get corrupted:
|
|
||||||
In Windows 7 the background slideshow corrupts the colour mapping
|
|
||||||
of OpenTTD's 8bpp screen modes. Workarounds for this are:
|
|
||||||
a) Switching to windowed mode, instead of fullscreen
|
|
||||||
b) Switching off background slideshow
|
|
||||||
c) Setting up the 32bpp-anim or 32bpp-optimized blitter
|
|
||||||
|
|
||||||
Custom vehicle type name is incorrectly aligned:
|
|
||||||
Some NewGRFs use sprites that are bigger than normal in the "buy
|
|
||||||
vehicle" window. Due to this they have to encode an offset for
|
|
||||||
the vehicle type name. Upon renaming the vehicle type this encoded
|
|
||||||
offset is stripped from the name because the "edit box" cannot show
|
|
||||||
this encoding. As a result the custom vehicle type names will get
|
|
||||||
the default alignment. The only way to (partially) fix this is by
|
|
||||||
adding spaces to the custom name.
|
|
||||||
|
|
||||||
Clipping problems [#119]:
|
|
||||||
In some cases sprites are not drawn as one would expect. Examples of
|
|
||||||
this are aircraft that might be hidden below the runway or trees that
|
|
||||||
in some cases are rendered over vehicles.
|
|
||||||
The primary cause of this problem is that OpenTTD does not have enough
|
|
||||||
data (like a 3D model) to properly determine what needs to be drawn in
|
|
||||||
front of what. OpenTTD has bounding boxes but in lots of cases they
|
|
||||||
are either too big or too small and then cause problems with what
|
|
||||||
needs to be drawn in front of what. Also some visual tricks are used.
|
|
||||||
For example trains at 8 pixels high, the catenary needs to be drawn
|
|
||||||
above that. When you want to draw bridges on top of that, which are
|
|
||||||
only one height level (= 8 pixels) higher, you are getting into some
|
|
||||||
big problems.
|
|
||||||
We can not change the height levels; it would require us to either
|
|
||||||
redraw all vehicle or all landscape graphics. Doing so would mean we
|
|
||||||
leave the Transport Tycoon graphics, which in effect means OpenTTD
|
|
||||||
will not be a Transport Tycoon clone anymore.
|
|
||||||
|
|
||||||
Mouse scrolling not possible at the edges of the screen [#383] [#3966]:
|
|
||||||
Scrolling the viewport with the mouse cursor at the edges of the screen
|
|
||||||
in the same direction of the edge will fail. If the cursor is near the
|
|
||||||
edge the scrolling will be very slow.
|
|
||||||
OpenTTD only receives cursor position updates when the cursor is inside
|
|
||||||
OpenTTD's window. It is not told how far you have moved the cursor
|
|
||||||
outside of OpenTTD's window.
|
|
||||||
|
|
||||||
Lost trains ignore (block) exit signals [#1473]:
|
|
||||||
If trains are lost they ignore block exit signals, blocking junctions
|
|
||||||
with presignals. This is caused because the path finders cannot tell
|
|
||||||
where the train needs to go. As such a random direction is chosen at
|
|
||||||
each junction. This causes the trains to occasionally to make choices
|
|
||||||
that are unwanted from a player's point of view.
|
|
||||||
This will not be fixed because lost trains are in almost all cases a
|
|
||||||
network problem, e.g. a train can never reach a specific place. This
|
|
||||||
makes the impact of fixing the bug enormously small against the amount
|
|
||||||
of work needed to write a system that prevents the lost trains from
|
|
||||||
taking the wrong direction.
|
|
||||||
|
|
||||||
Vehicle owner of last transfer leg gets paid for all [#2427]:
|
|
||||||
When you make a transfer system that switches vehicle owners. This
|
|
||||||
is only possible with 'industry stations', e.g. the oil rig station
|
|
||||||
the owner of the vehicle that does the final delivery gets paid for
|
|
||||||
the whole trip. It is not shared amongst the different vehicle
|
|
||||||
owners that have participated in transporting the cargo.
|
|
||||||
This sharing is not done because it would enormously increase the
|
|
||||||
memory and CPU usage in big games for something that is happening
|
|
||||||
in only one corner case. We think it is not worth the effort until
|
|
||||||
sharing of stations is an official feature.
|
|
||||||
|
|
||||||
Forbid 90 degree turns does not work for crossing PBS paths [#2737]:
|
|
||||||
When you run a train through itself on a X junction with PBS turned on
|
|
||||||
the train will not obey the 'forbid 90 degree turns' setting. This is
|
|
||||||
due to the fact that we can not be sure that the setting was turned
|
|
||||||
off when the track was reserved, which means that we assume it was
|
|
||||||
turned on and that the setting does not hold at the time. We made it
|
|
||||||
this way to allow one to change the setting in-game, but it breaks
|
|
||||||
slightly when you are running your train through itself. Running a
|
|
||||||
train through means that your network is broken and is thus a user
|
|
||||||
error which OpenTTD tries to graciously handle.
|
|
||||||
Fixing this bug means that we need to record whether this particular
|
|
||||||
setting was turned on or off at the time the reservation was made. This
|
|
||||||
means adding quite a bit of data to the savegame for solving an issue
|
|
||||||
that is basically an user error. We think it is not worth the effort.
|
|
||||||
|
|
||||||
Duplicate (station) names after renaming [#3204]:
|
|
||||||
After renaming stations one can create duplicate station names. This
|
|
||||||
is done giving a station the same custom name as another station with
|
|
||||||
an automatically generated name.
|
|
||||||
The major part of this problem is that station names are translatable.
|
|
||||||
Meaning that a station is called e.g. '<TOWN> Central' in English and
|
|
||||||
'<TOWN> Centraal' in Dutch. This means that in network games the
|
|
||||||
renaming of a town could cause the rename to succeed on some clients
|
|
||||||
and fail at others. This creates an inconsistent game state that will
|
|
||||||
be seen as a 'desync'. Secondly the custom names are intended to fall
|
|
||||||
completely outside of the '<TOWN> <name>' naming of stations, so when
|
|
||||||
you rename a town all station names are updated accordingly.
|
|
||||||
As a result the decision has been made that all custom names are only
|
|
||||||
compared to the other custom names in the same class and not compared
|
|
||||||
to the automatically generated names.
|
|
||||||
|
|
||||||
Extreme CPU usage/hangs when using SDL and PulseAudio [#3294],
|
|
||||||
OpenTTD hangs/freezes when closing, OpenTTD is slow, OpenTTD uses a lot of CPU:
|
|
||||||
OpenTTD can be extremely slow/use a lot of CPU when the sound is
|
|
||||||
played via SDL and then through PulseAudio's ALSA wrapper. Under the
|
|
||||||
same configuration OpenTTD, or rather SDL, might hang when exiting
|
|
||||||
the game. This problem is seen most in Ubuntu 9.04 and higher.
|
|
||||||
|
|
||||||
This is because recent versions of the PulseAudio sound server
|
|
||||||
are configured to use timer-based audio scheduling rather than
|
|
||||||
interrupt-based audio scheduling. Configuring PulseAudio to force
|
|
||||||
use of interrupt-based scheduling may resolve sound problems for
|
|
||||||
some users. Under recent versions of Ubuntu Linux (9.04 and higher)
|
|
||||||
this can be accomplished by changing the following line in the
|
|
||||||
/etc/pulse/default.pa file:
|
|
||||||
load-module module-udev-detect
|
|
||||||
to
|
|
||||||
load-module module-udev-detect tsched=0
|
|
||||||
Note that PulseAudio must be restarted for changes to take effect. Older
|
|
||||||
versions of PulseAudio may use the module-hal-detect module instead.
|
|
||||||
Adding tsched=0 to the end of that line will have a similar effect.
|
|
||||||
|
|
||||||
Another possible solution is selecting the "pulse" backend of SDL
|
|
||||||
by either using "SDL_AUDIODRIVER=pulse openttd" at the command
|
|
||||||
prompt or installing the 'libsdl1.2debian-pulseaudio' package from
|
|
||||||
Ubuntu's Universe repository. For other distributions a similar
|
|
||||||
package needs to be installed.
|
|
||||||
|
|
||||||
OpenTTD not properly resizing with SDL on X [#3305]:
|
|
||||||
Under some X window managers OpenTTD's window does not properly
|
|
||||||
resize. You will either end up with a black bar at the right/bottom
|
|
||||||
side of the window or you cannot see the right/bottom of the window,
|
|
||||||
e.g. you cannot see the status bar. The problem is that OpenTTD does
|
|
||||||
not always receive a resize event from SDL making it impossible for
|
|
||||||
OpenTTD to know that the window was resized; sometimes moving the
|
|
||||||
window will solve the problem.
|
|
||||||
Window managers that are known to exhibit this behaviour are GNOME's
|
|
||||||
and KDE's. With the XFCE's and LXDE's window managers the resize
|
|
||||||
event is sent when the user releases the mouse.
|
|
||||||
|
|
||||||
Incorrect colours, crashes upon exit, debug warnings and smears upon
|
|
||||||
window resizing with SDL on macOS [#3447]:
|
|
||||||
Video handling with (lib)SDL under macOS is known to fail on some
|
|
||||||
versions of macOS with some hardware configurations. Some of
|
|
||||||
the problems happen only under some circumstances whereas others
|
|
||||||
are always present.
|
|
||||||
We suggest that the SDL video/sound backend is not used for OpenTTD
|
|
||||||
in combinations with macOS.
|
|
||||||
|
|
||||||
Train crashes entering same junction from block and path signals [#3928]:
|
|
||||||
When a train has reserved a path from a path signal to a two way
|
|
||||||
block signal and the reservation passes a path signal through the
|
|
||||||
back another train can enter the reserved path (only) via that
|
|
||||||
same two way block signal.
|
|
||||||
The reason for this has to do with optimisation; to fix this issue
|
|
||||||
the signal update has to pass all path signals until it finds either
|
|
||||||
a train or a backwards facing signal. This is a very expensive task.
|
|
||||||
The (signal) setups that allow these crashes can furthermore be
|
|
||||||
considered incorrectly signalled; one extra safe waiting point for
|
|
||||||
the train entering from path signal just after the backwards facing
|
|
||||||
signal (from the path signal train) resolves the issue.
|
|
||||||
|
|
||||||
Crashes when run in a VM using Parallels Desktop [#4003]:
|
|
||||||
When the Windows version of OpenTTD is executed in a VM under
|
|
||||||
Parallels Desktop a privileged instruction exception may be thrown.
|
|
||||||
As OpenTTD works natively on macOS as well as natively on Windows and
|
|
||||||
these native builds both don't exhibit this behaviour this crash is
|
|
||||||
most likely due to a bug in the virtual machine, something out of
|
|
||||||
the scope of OpenTTD. Most likely this is due to Parallels Desktop
|
|
||||||
lacking support for RDTSC calls. The problem can be avoided by using
|
|
||||||
other VM-software, Wine, or running natively on macOS.
|
|
||||||
|
|
||||||
Entry- and exit signals are not dragged [#4378]:
|
|
||||||
Unlike all other signal types, the entry- and exit signals are not
|
|
||||||
dragged but instead normal signals are placed on subsequent track
|
|
||||||
sections. This is done on purpose as this is the usually more
|
|
||||||
convenient solution. There are little to no occasions where more
|
|
||||||
than one entry or exit signal in a row are useful. This is different
|
|
||||||
for all other signal types where several in a row can serve one
|
|
||||||
purpose or another.
|
|
||||||
|
|
||||||
Station build date is incorrect [#4415]:
|
|
||||||
The tile query tool will show the date of the last (re)construction
|
|
||||||
at the station and not the date of the first construction. This is
|
|
||||||
due to compatibility reasons with NewGRFs and the fact that it is
|
|
||||||
wrong to say that the station is built in a particular year when it
|
|
||||||
was completely destroyed/rebuilt later on.
|
|
||||||
The tile query tool can be fixed by changing the "Build date" text
|
|
||||||
to "Date at which the last (re)construction took place" but this is
|
|
||||||
deemed too specific and long for that window.
|
|
||||||
|
|
||||||
(Temporary) wrong colours when switching to full screen [#4511]:
|
|
||||||
On Windows it can happen that you temporarily see wrong colours
|
|
||||||
when switching to full screen OpenTTD, either by starting
|
|
||||||
OpenTTD in full screen mode, changing to full screen mode or by
|
|
||||||
ALT-TAB-ing into a full screen OpenTTD. This is caused by the
|
|
||||||
fact that OpenTTD, by default, uses 8bpp paletted output. The
|
|
||||||
wrong colours you are seeing is a temporary effect of the video
|
|
||||||
driver switching to 8bpp palette mode.
|
|
||||||
|
|
||||||
This issue can be worked around in two ways:
|
|
||||||
a) Setting fullscreen_bpp to 32
|
|
||||||
b) Setting up the 32bpp-anim or 32bpp-optimized blitter
|
|
||||||
|
|
||||||
Can't run OpenTTD with the -d option from a MSYS console [#4587]:
|
|
||||||
The MSYS console does not allow OpenTTD to open an extra console for
|
|
||||||
debugging output. Compiling OpenTTD with the --enable-console
|
|
||||||
configure option prevents this issue and allows the -d option to use
|
|
||||||
the MSYS console for its output.
|
|
||||||
|
|
||||||
Unreadable characters for non-latin locales [#4607]:
|
|
||||||
OpenTTD does not ship a non-latin font in its graphics files. As a
|
|
||||||
result OpenTTD needs to acquire the font from somewhere else. What
|
|
||||||
OpenTTD does is ask the operating system, or a system library, for
|
|
||||||
the best font for a given language if the currently loaded font
|
|
||||||
does not provide all characters of the chosen translation. This
|
|
||||||
means that OpenTTD has no influence over the quality of the chosen
|
|
||||||
font; it just does the best it can do.
|
|
||||||
|
|
||||||
If the text is unreadable there are several steps that you can take
|
|
||||||
to improve this. The first step is finding a good font and configure
|
|
||||||
this in the configuration file. See section 9.0 of README.md for
|
|
||||||
more information. You can also increase the font size to make the
|
|
||||||
characters bigger and possible better readable.
|
|
||||||
|
|
||||||
If the problem is with the clarity of the font you might want to
|
|
||||||
enable anti-aliasing by setting the small_aa/medium_aa/large_aa
|
|
||||||
settings to "true". However, anti-aliasing only works when a 32-bit
|
|
||||||
blitter has been selected, e.g. blitter = "32bpp-anim", as with the
|
|
||||||
8 bits blitter there are not enough colours to properly perform the
|
|
||||||
anti-aliasing.
|
|
||||||
|
|
||||||
Train does not crash with itself [#4635]:
|
|
||||||
When a train drives in a circle the front engine passes through
|
|
||||||
wagons of the same train without crashing. This is intentional.
|
|
||||||
Signals are only aware of tracks, they do not consider the train
|
|
||||||
length and whether there would be enough room for a train in some
|
|
||||||
circle it might drive on. Also the path a train might take is not
|
|
||||||
necessarily known when passing a signal.
|
|
||||||
Checking all circumstances would take a lot of additional
|
|
||||||
computational power for signals, which is not considered worth
|
|
||||||
the effort, as it does not add anything to gameplay.
|
|
||||||
Nevertheless trains shall not crash in normal operation, so making
|
|
||||||
a train not crash with itself is the best solution for everyone.
|
|
||||||
|
|
||||||
Aircraft coming through wall in rotated airports [#4705]:
|
|
||||||
With rotated airports, specifically hangars, you will see that the
|
|
||||||
aircraft will show a part through the back wall of the hangar.
|
|
||||||
This can be solved by only drawing a part of the plane when being
|
|
||||||
at the back of the hangar, however then with transparency turned on
|
|
||||||
the aircraft would be shown partially which would be even weirder.
|
|
||||||
As such the current behaviour is deemed the least bad.
|
|
||||||
The same applies to overly long ships and their depots.
|
|
||||||
|
|
||||||
Vehicles not keeping their "maximum" speed [#4815]:
|
|
||||||
Vehicles that have not enough power to reach and maintain their
|
|
||||||
advertised maximum speed might be constantly jumping between two
|
|
||||||
speeds. This is due to the fact that speed and its calculations
|
|
||||||
are done with integral numbers instead of floating point numbers.
|
|
||||||
As a result of this a vehicle will never reach its equilibrium
|
|
||||||
between the drag/friction and propulsion. So in effect it will be
|
|
||||||
in a vicious circle of speeding up and slowing down due to being
|
|
||||||
just at the other side of the equilibrium.
|
|
||||||
|
|
||||||
Not speeding up when near the equilibrium will cause the vehicle to
|
|
||||||
never come in the neighbourhood of the equilibrium and not slowing
|
|
||||||
down when near the equilibrium will cause the vehicle to never slow
|
|
||||||
down towards the equilibrium once it has come down a hill.
|
|
||||||
|
|
||||||
It is possible to calculate whether the equilibrium will be passed,
|
|
||||||
but then all acceleration calculations need to be done twice.
|
|
||||||
|
|
||||||
Settings not saved when OpenTTD crashes [#4846]:
|
|
||||||
The settings are not saved when OpenTTD crashes for several reasons.
|
|
||||||
The most important is that the game state is broken and as such the
|
|
||||||
settings might contain invalid values, or the settings have not even
|
|
||||||
been loaded yet. This would cause invalid or totally wrong settings
|
|
||||||
to be written to the configuration file.
|
|
||||||
|
|
||||||
A solution to that would be saving the settings whenever one changes,
|
|
||||||
however due to the way the configuration file is saved this requires
|
|
||||||
a flush of the file to the disk and OpenTTD needs to wait till that
|
|
||||||
is finished. On some file system implementations this causes the
|
|
||||||
flush of all 'write-dirty' caches, which can be a significant amount
|
|
||||||
of data to be written. This can further be aggravated by spinning
|
|
||||||
down disks to conserve power, in which case this disk needs to be
|
|
||||||
spun up first. This means that many seconds may pass before the
|
|
||||||
configuration file is actually written, and all that time OpenTTD
|
|
||||||
will not be able to show any progress. Changing the way the
|
|
||||||
configuration file is saved is not an option as that leaves us more
|
|
||||||
vulnerable to corrupt configuration files.
|
|
||||||
|
|
||||||
Finally, crashes should not be happening. If they happen they should
|
|
||||||
be reported and fixed, so essentially fixing this is fixing the wrong
|
|
||||||
thing. If you really need the configuration changes to be saved,
|
|
||||||
and you need to run a version that crashes regularly, then you can
|
|
||||||
use the 'saveconfig' command in the console to save the settings.
|
|
||||||
|
|
||||||
Not all NewGRFs, AIs, game scripts are found [#4887]:
|
|
||||||
Under certain situations, where the path for the content within a
|
|
||||||
tar file is the same as other content on the file system or in another
|
|
||||||
tar file, it is possible that content is not found. A more thorough
|
|
||||||
explanation and solutions are described in section 4.4 of README.md.
|
|
||||||
|
|
||||||
Mouse cursor going missing with SDL [#4997]:
|
|
||||||
Under certain circumstances SDL does not notify OpenTTD of changes with
|
|
||||||
respect to the mouse pointer, specifically whether the mouse pointer
|
|
||||||
is within the bounds of OpenTTD or not. For example, if you "Alt-Tab"
|
|
||||||
to another application the mouse cursor will still be shown in OpenTTD,
|
|
||||||
and when you move the mouse outside of the OpenTTD window so the cursor
|
|
||||||
gets hidden, open/move another application on top of the OpenTTD window
|
|
||||||
and then Alt-tab back into OpenTTD the cursor will not be shown.
|
|
||||||
|
|
||||||
We cannot fix this problem as SDL simply does not provide the required
|
|
||||||
information in these corner cases. This is a bug in SDL and as such
|
|
||||||
there is little that we can do about it.
|
|
||||||
|
|
||||||
Trains might not stop at platforms that are currently being changed [#5553]:
|
|
||||||
If you add tiles to or remove tiles from a platform while a train is
|
|
||||||
approaching to stop at the same platform, that train can miss the place
|
|
||||||
where it's supposed to stop and pass the station without stopping.
|
|
||||||
This is caused by the fact that the train is considered to already
|
|
||||||
have stopped if it's beyond its assigned stopping location. We can't
|
|
||||||
let the train stop just anywhere in the station because then it would
|
|
||||||
never leave the station if you have the same station in the order
|
|
||||||
list multiple times in a row or if there is only one station
|
|
||||||
in theorder list (see #5684).
|
|
||||||
|
|
||||||
Some houses and industries are not affected by transparency [#5817]:
|
|
||||||
Some of the default houses and industries (f.e. the iron ore mine) are
|
|
||||||
not affected by the transparency options. This is because the graphics
|
|
||||||
do not (completely) separate the ground from the building.
|
|
||||||
This is a bug of the original graphics, and unfortunately cannot be
|
|
||||||
fixed with OpenGFX for the sake of maintaining compatibility with
|
|
||||||
the original graphics.
|
|
||||||
|
|
||||||
Involuntary cargo exchange with cargodist via neutral station [#6114]:
|
|
||||||
When two players serve a neutral station at an industry, a cross-company
|
|
||||||
chain for cargo flow can and will be established which can only be
|
|
||||||
interrupted if one of the players stops competing for the resources of
|
|
||||||
that industry. There is an easy fix for this: If you are loading at the
|
|
||||||
shared station make the order "no unload" and if you're unloading make
|
|
||||||
it "no load". Cargodist will then figure out that it should not create
|
|
||||||
such a route.
|
|
||||||
|
|
||||||
Incorrect ending year displayed in end of game newspaper [#8625]
|
|
||||||
The ending year of the game is configurable, but the date displayed in
|
|
||||||
the newspaper at the end of the game is part of the graphics, not text.
|
|
||||||
So to fix this would involve fixing the graphics in every baseset,
|
|
||||||
including the original. Additionally, basesets are free to put this
|
|
||||||
text in different positions (which they do), making a proper solution
|
|
||||||
to this infinitely more complex for a part of the game that fewer than
|
|
||||||
1% of players ever see.
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,4 +3,4 @@
|
|||||||
The OpenTTD TrueType font was created by Zephyris and is maintained on [Github](https://github.com/zephyris/openttd-ttf).
|
The OpenTTD TrueType font was created by Zephyris and is maintained on [Github](https://github.com/zephyris/openttd-ttf).
|
||||||
It is licensed under GPL-2.0.
|
It is licensed under GPL-2.0.
|
||||||
|
|
||||||
The currently included files correspond to release v0.5.
|
The currently included files correspond to release v0.6.
|
||||||
|
Binary file not shown.
@@ -1 +1 @@
|
|||||||
4f03553f614a06d86dc06376db3353c7
|
8bc3926cb50e19747de498357417d973
|
||||||
|
@@ -20,6 +20,7 @@ if(GRFCODEC_FOUND)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui.nfo
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/palette.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/palette.nfo
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.nfo
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/road_waypoints.nfo
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/signals.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/signals.nfo
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.nfo
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.nfo
|
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.nfo
|
||||||
@@ -42,6 +43,7 @@ if(GRFCODEC_FOUND)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_convert_tram.png
|
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_convert_tram.png
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_group_livery.png
|
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_group_livery.png
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.png
|
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.png
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/road_waypoints.png
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/signals.png
|
${CMAKE_CURRENT_SOURCE_DIR}/signals.png
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.png
|
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.png
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.png
|
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.png
|
||||||
|
@@ -98,3 +98,4 @@
|
|||||||
#include "mono.nfo"
|
#include "mono.nfo"
|
||||||
#include "tunnel_portals.nfo"
|
#include "tunnel_portals.nfo"
|
||||||
#include "palette.nfo"
|
#include "palette.nfo"
|
||||||
|
#include "road_waypoints.nfo"
|
||||||
|
14
media/baseset/openttd/road_waypoints.nfo
Normal file
14
media/baseset/openttd/road_waypoints.nfo
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// This file is part of OpenTTD.
|
||||||
|
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||||
|
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
|
||||||
|
-1 * 0 0C "Road waypoints"
|
||||||
|
//@@LINT OFF
|
||||||
|
-1 * 3 05 19 04
|
||||||
|
//@@LINT ON
|
||||||
|
-1 sprites/road_waypoints.png 8bpp 10 10 64 40 -5 -22 normal
|
||||||
|
-1 sprites/road_waypoints.png 8bpp 90 10 64 40 -31 -9 normal
|
||||||
|
-1 sprites/road_waypoints.png 8bpp 170 10 64 35 -31 -4 normal
|
||||||
|
-1 sprites/road_waypoints.png 8bpp 240 10 64 35 -57 -17 normal
|
BIN
media/baseset/openttd/road_waypoints.png
Normal file
BIN
media/baseset/openttd/road_waypoints.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
@@ -1,4 +1,3 @@
|
|||||||
FROM emscripten/emsdk:3.1.42
|
FROM emscripten/emsdk:3.1.57
|
||||||
|
|
||||||
COPY emsdk-liblzma.patch /
|
COPY ports/liblzma.py /emsdk/upstream/emscripten/tools/ports/contrib/liblzma.py
|
||||||
RUN cd /emsdk/upstream/emscripten && patch -p1 < /emsdk-liblzma.patch
|
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Please use docker with the supplied `Dockerfile` to build for emscripten.
|
Please use docker with the supplied `Dockerfile` to build for emscripten.
|
||||||
It takes care of a few things:
|
It takes care of a few things:
|
||||||
- Use a version of emscripten we know works
|
- Use a version of emscripten we know works.
|
||||||
- Patch in LibLZMA support (as this is not supported by upstream)
|
- Add LibLZMA library under contrib ports.
|
||||||
|
|
||||||
First, build the docker image by navigating in the folder this `README.md` is in, and executing:
|
First, build the docker image by navigating in the folder this `README.md` is in, and executing:
|
||||||
```
|
```
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# LibLZMA is a custom addition to the emscripten SDK, so it is possible
|
# LibLZMA is a custom addition to the emscripten SDK, so it is possible
|
||||||
# someone patched their SDK. Test out if the SDK supports LibLZMA.
|
# someone patched their SDK. Test out if the SDK supports LibLZMA.
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
set(CMAKE_REQUIRED_FLAGS "-sUSE_LIBLZMA=1")
|
set(CMAKE_REQUIRED_FLAGS "--use-port=contrib.liblzma")
|
||||||
|
|
||||||
check_cxx_source_compiles("
|
check_cxx_source_compiles("
|
||||||
#include <lzma.h>
|
#include <lzma.h>
|
||||||
@@ -12,9 +12,9 @@ check_cxx_source_compiles("
|
|||||||
if (LIBLZMA_FOUND)
|
if (LIBLZMA_FOUND)
|
||||||
add_library(LibLZMA::LibLZMA INTERFACE IMPORTED)
|
add_library(LibLZMA::LibLZMA INTERFACE IMPORTED)
|
||||||
set_target_properties(LibLZMA::LibLZMA PROPERTIES
|
set_target_properties(LibLZMA::LibLZMA PROPERTIES
|
||||||
INTERFACE_COMPILE_OPTIONS "-sUSE_LIBLZMA=1"
|
INTERFACE_COMPILE_OPTIONS "--use-port=contrib.liblzma"
|
||||||
INTERFACE_LINK_LIBRARIES "-sUSE_LIBLZMA=1"
|
INTERFACE_LINK_LIBRARIES "--use-port=contrib.liblzma"
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
message(WARNING "You are using an emscripten SDK without LibLZMA support. Many savegames won't be able to load in OpenTTD. Please apply 'emsdk-liblzma.patch' to your local emsdk installation.")
|
message(WARNING "You are using an emscripten SDK without LibLZMA support. Many savegames won't be able to load in OpenTTD. Please copy liblzma.py to your ports/contrib folder in your local emsdk installation.")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -1,198 +0,0 @@
|
|||||||
From 84d0e9112d5c87a714abd21ec8547921f46f37b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: milek7 <me@milek7.pl>
|
|
||||||
Date: Tue, 8 Dec 2020 01:03:31 +0100
|
|
||||||
Subject: [PATCH] Add liblzma port
|
|
||||||
|
|
||||||
---
|
|
||||||
src/settings.js | 4 ++
|
|
||||||
tools/ports/liblzma.py | 151 +++++++++++++++++++++++++++++++++++++++++
|
|
||||||
tools/settings.py | 1 +
|
|
||||||
3 files changed, 156 insertions(+)
|
|
||||||
create mode 100644 tools/ports/liblzma.py
|
|
||||||
|
|
||||||
diff --git a/src/settings.js b/src/settings.js
|
|
||||||
index f93140d..7b6bec9 100644
|
|
||||||
--- a/src/settings.js
|
|
||||||
+++ b/src/settings.js
|
|
||||||
@@ -1451,6 +1451,10 @@ var USE_GIFLIB = false;
|
|
||||||
// [compile+link]
|
|
||||||
var USE_LIBJPEG = false;
|
|
||||||
|
|
||||||
+// 1 = use liblzma from emscripten-ports
|
|
||||||
+// [compile+link]
|
|
||||||
+var USE_LIBLZMA = false;
|
|
||||||
+
|
|
||||||
// 1 = use libpng from emscripten-ports
|
|
||||||
// [compile+link]
|
|
||||||
var USE_LIBPNG = false;
|
|
||||||
diff --git a/tools/ports/liblzma.py b/tools/ports/liblzma.py
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..6872a8b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tools/ports/liblzma.py
|
|
||||||
@@ -0,0 +1,151 @@
|
|
||||||
+# Copyright 2020 The Emscripten Authors. All rights reserved.
|
|
||||||
+# Emscripten is available under two separate licenses, the MIT license and the
|
|
||||||
+# University of Illinois/NCSA Open Source License. Both these licenses can be
|
|
||||||
+# found in the LICENSE file.
|
|
||||||
+
|
|
||||||
+import os
|
|
||||||
+import shutil
|
|
||||||
+import logging
|
|
||||||
+from pathlib import Path
|
|
||||||
+
|
|
||||||
+VERSION = '5.4.2'
|
|
||||||
+HASH = '149f980338bea3d66de1ff5994b2b236ae1773135eda68b62b009df0c9dcdf5467f8cb2c06da95a71b6556d60bd3d21f475feced34d5dfdb80ee95416a2f9737'
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def needed(settings):
|
|
||||||
+ return settings.USE_LIBLZMA
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def get(ports, settings, shared):
|
|
||||||
+ ports.fetch_project('liblzma', f'https://tukaani.org/xz/xz-{VERSION}.tar.gz', sha512hash=HASH)
|
|
||||||
+
|
|
||||||
+ def create(final):
|
|
||||||
+ logging.info('building port: liblzma')
|
|
||||||
+
|
|
||||||
+ ports.clear_project_build('liblzma')
|
|
||||||
+
|
|
||||||
+ source_path = os.path.join(ports.get_dir(), 'liblzma', f'xz-{VERSION}', 'src', 'liblzma')
|
|
||||||
+ ports.write_file(os.path.join(source_path, 'config.h'), config_h)
|
|
||||||
+ ports.install_headers(os.path.join(source_path, 'api'), pattern='lzma.h')
|
|
||||||
+ ports.install_headers(os.path.join(source_path, 'api', 'lzma'), pattern='*.h', target='lzma')
|
|
||||||
+
|
|
||||||
+ build_flags = ['-DHAVE_CONFIG_H', '-DTUKLIB_SYMBOL_PREFIX=lzma_', '-fvisibility=hidden']
|
|
||||||
+ exclude_files = ['crc32_small.c', 'crc64_small.c', 'crc32_tablegen.c', 'crc64_tablegen.c', 'price_tablegen.c', 'fastpos_tablegen.c',
|
|
||||||
+ 'tuklib_exit.c', 'tuklib_mbstr_fw.c', 'tuklib_mbstr_width.c', 'tuklib_open_stdxxx.c', 'tuklib_progname.c']
|
|
||||||
+ include_dirs_rel = ['../common', 'api', 'check', 'common', 'delta', 'lz', 'lzma', 'rangecoder', 'simple']
|
|
||||||
+
|
|
||||||
+ include_dirs = [os.path.join(source_path, p) for p in include_dirs_rel]
|
|
||||||
+ ports.build_port(source_path, final, 'liblzma', flags=build_flags, exclude_files=exclude_files, includes=include_dirs)
|
|
||||||
+
|
|
||||||
+ return [shared.cache.get_lib('liblzma.a', create, what='port')]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def clear(ports, settings, shared):
|
|
||||||
+ shared.cache.erase_lib('liblzma.a')
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def process_args(ports):
|
|
||||||
+ return []
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def show():
|
|
||||||
+ return 'liblzma (USE_LIBLZMA=1; public domain)'
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+config_h = '''
|
|
||||||
+#define ASSUME_RAM 128
|
|
||||||
+#define ENABLE_NLS 1
|
|
||||||
+#define HAVE_CHECK_CRC32 1
|
|
||||||
+#define HAVE_CHECK_CRC64 1
|
|
||||||
+#define HAVE_CHECK_SHA256 1
|
|
||||||
+#define HAVE_CLOCK_GETTIME 1
|
|
||||||
+#define HAVE_DCGETTEXT 1
|
|
||||||
+#define HAVE_DECL_CLOCK_MONOTONIC 1
|
|
||||||
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
|
|
||||||
+#define HAVE_DECODERS 1
|
|
||||||
+#define HAVE_DECODER_ARM 1
|
|
||||||
+#define HAVE_DECODER_ARMTHUMB 1
|
|
||||||
+#define HAVE_DECODER_DELTA 1
|
|
||||||
+#define HAVE_DECODER_IA64 1
|
|
||||||
+#define HAVE_DECODER_LZMA1 1
|
|
||||||
+#define HAVE_DECODER_LZMA2 1
|
|
||||||
+#define HAVE_DECODER_POWERPC 1
|
|
||||||
+#define HAVE_DECODER_SPARC 1
|
|
||||||
+#define HAVE_DECODER_X86 1
|
|
||||||
+#define HAVE_DLFCN_H 1
|
|
||||||
+#define HAVE_ENCODERS 1
|
|
||||||
+#define HAVE_ENCODER_ARM 1
|
|
||||||
+#define HAVE_ENCODER_ARMTHUMB 1
|
|
||||||
+#define HAVE_ENCODER_DELTA 1
|
|
||||||
+#define HAVE_ENCODER_IA64 1
|
|
||||||
+#define HAVE_ENCODER_LZMA1 1
|
|
||||||
+#define HAVE_ENCODER_LZMA2 1
|
|
||||||
+#define HAVE_ENCODER_POWERPC 1
|
|
||||||
+#define HAVE_ENCODER_SPARC 1
|
|
||||||
+#define HAVE_ENCODER_X86 1
|
|
||||||
+#define HAVE_FCNTL_H 1
|
|
||||||
+#define HAVE_FUTIMENS 1
|
|
||||||
+#define HAVE_GETOPT_H 1
|
|
||||||
+#define HAVE_GETOPT_LONG 1
|
|
||||||
+#define HAVE_GETTEXT 1
|
|
||||||
+#define HAVE_IMMINTRIN_H 1
|
|
||||||
+#define HAVE_INTTYPES_H 1
|
|
||||||
+#define HAVE_LIMITS_H 1
|
|
||||||
+#define HAVE_MBRTOWC 1
|
|
||||||
+#define HAVE_MEMORY_H 1
|
|
||||||
+#define HAVE_MF_BT2 1
|
|
||||||
+#define HAVE_MF_BT3 1
|
|
||||||
+#define HAVE_MF_BT4 1
|
|
||||||
+#define HAVE_MF_HC3 1
|
|
||||||
+#define HAVE_MF_HC4 1
|
|
||||||
+#define HAVE_OPTRESET 1
|
|
||||||
+#define HAVE_POSIX_FADVISE 1
|
|
||||||
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
|
|
||||||
+#define HAVE_PTHREAD_PRIO_INHERIT 1
|
|
||||||
+#define HAVE_STDBOOL_H 1
|
|
||||||
+#define HAVE_STDINT_H 1
|
|
||||||
+#define HAVE_STDLIB_H 1
|
|
||||||
+#define HAVE_STRINGS_H 1
|
|
||||||
+#define HAVE_STRING_H 1
|
|
||||||
+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
|
|
||||||
+#define HAVE_SYS_PARAM_H 1
|
|
||||||
+#define HAVE_SYS_STAT_H 1
|
|
||||||
+#define HAVE_SYS_TIME_H 1
|
|
||||||
+#define HAVE_SYS_TYPES_H 1
|
|
||||||
+#define HAVE_UINTPTR_T 1
|
|
||||||
+#define HAVE_UNISTD_H 1
|
|
||||||
+#define HAVE_VISIBILITY 1
|
|
||||||
+#define HAVE_WCWIDTH 1
|
|
||||||
+#define HAVE__BOOL 1
|
|
||||||
+#define HAVE___BUILTIN_ASSUME_ALIGNED 1
|
|
||||||
+#define HAVE___BUILTIN_BSWAPXX 1
|
|
||||||
+#define MYTHREAD_POSIX 1
|
|
||||||
+#define NDEBUG 1
|
|
||||||
+#define PACKAGE "xz"
|
|
||||||
+#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
|
|
||||||
+#define PACKAGE_NAME "XZ Utils"
|
|
||||||
+#define PACKAGE_STRING "XZ Utils 5.4.0"
|
|
||||||
+#define PACKAGE_TARNAME "xz"
|
|
||||||
+#define PACKAGE_VERSION "5.4.0"
|
|
||||||
+#define SIZEOF_SIZE_T 4
|
|
||||||
+#define STDC_HEADERS 1
|
|
||||||
+#define TUKLIB_CPUCORES_SYSCONF 1
|
|
||||||
+#define TUKLIB_FAST_UNALIGNED_ACCESS 1
|
|
||||||
+#define TUKLIB_PHYSMEM_SYSCONF 1
|
|
||||||
+#ifndef _ALL_SOURCE
|
|
||||||
+# define _ALL_SOURCE 1
|
|
||||||
+#endif
|
|
||||||
+#ifndef _GNU_SOURCE
|
|
||||||
+# define _GNU_SOURCE 1
|
|
||||||
+#endif
|
|
||||||
+#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
+# define _POSIX_PTHREAD_SEMANTICS 1
|
|
||||||
+#endif
|
|
||||||
+#ifndef _TANDEM_SOURCE
|
|
||||||
+# define _TANDEM_SOURCE 1
|
|
||||||
+#endif
|
|
||||||
+#ifndef __EXTENSIONS__
|
|
||||||
+# define __EXTENSIONS__ 1
|
|
||||||
+#endif
|
|
||||||
+#define VERSION "5.4.0"
|
|
||||||
+'''
|
|
||||||
diff --git a/tools/settings.py b/tools/settings.py
|
|
||||||
index 10d6ca0..827e4a9 100644
|
|
||||||
--- a/tools/settings.py
|
|
||||||
+++ b/tools/settings.py
|
|
||||||
@@ -40,6 +40,7 @@ PORTS_SETTINGS = {
|
|
||||||
'USE_SDL_NET',
|
|
||||||
'USE_SDL_GFX',
|
|
||||||
'USE_LIBJPEG',
|
|
||||||
+ 'USE_LIBLZMA',
|
|
||||||
'USE_OGG',
|
|
||||||
'USE_REGAL',
|
|
||||||
'USE_BOOST_HEADERS',
|
|
||||||
--
|
|
||||||
2.34.1
|
|
139
os/emscripten/ports/liblzma.py
Normal file
139
os/emscripten/ports/liblzma.py
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
|
VERSION = '5.4.6'
|
||||||
|
HASH = '495cc890d25c075c927c907b77e60d86dd8a4c377cea5b1172c8e916984149a7bb5fb32db25091f7219346b83155b47e4bc0404cc8529d992014cd7ed0c278b7'
|
||||||
|
|
||||||
|
URL = 'https://github.com/tukaani-project/xz'
|
||||||
|
DESCRIPTION = 'liblzma provides a general-purpose data-compression library.'
|
||||||
|
LICENSE = 'LGPL-2.1'
|
||||||
|
|
||||||
|
def get(ports, settings, shared):
|
||||||
|
ports.fetch_project('contrib.liblzma', f'https://github.com/tukaani-project/xz/releases/download/v{VERSION}/xz-{VERSION}.tar.xz', sha512hash=HASH)
|
||||||
|
|
||||||
|
def create(final):
|
||||||
|
logging.info('building port: contrib.liblzma')
|
||||||
|
|
||||||
|
ports.clear_project_build('contrib.liblzma')
|
||||||
|
|
||||||
|
source_path = os.path.join(ports.get_dir(), 'contrib.liblzma', f'xz-{VERSION}', 'src', 'liblzma')
|
||||||
|
ports.write_file(os.path.join(source_path, 'config.h'), config_h)
|
||||||
|
ports.install_headers(os.path.join(source_path, 'api'), pattern='lzma.h')
|
||||||
|
ports.install_headers(os.path.join(source_path, 'api', 'lzma'), pattern='*.h', target='lzma')
|
||||||
|
|
||||||
|
build_flags = ['-DHAVE_CONFIG_H', '-DTUKLIB_SYMBOL_PREFIX=lzma_', '-fvisibility=hidden']
|
||||||
|
exclude_files = ['crc32_small.c', 'crc64_small.c', 'crc32_tablegen.c', 'crc64_tablegen.c', 'price_tablegen.c', 'fastpos_tablegen.c',
|
||||||
|
'tuklib_exit.c', 'tuklib_mbstr_fw.c', 'tuklib_mbstr_width.c', 'tuklib_open_stdxxx.c', 'tuklib_progname.c']
|
||||||
|
include_dirs_rel = ['../common', 'api', 'check', 'common', 'delta', 'lz', 'lzma', 'rangecoder', 'simple']
|
||||||
|
|
||||||
|
include_dirs = [os.path.join(source_path, p) for p in include_dirs_rel]
|
||||||
|
ports.build_port(source_path, final, 'contrib.liblzma', flags=build_flags, exclude_files=exclude_files, includes=include_dirs)
|
||||||
|
|
||||||
|
return [shared.cache.get_lib('liblzma.a', create, what='port')]
|
||||||
|
|
||||||
|
|
||||||
|
def clear(ports, settings, shared):
|
||||||
|
shared.cache.erase_lib('liblzma.a')
|
||||||
|
|
||||||
|
|
||||||
|
def process_args(ports):
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
config_h = '''
|
||||||
|
#define ASSUME_RAM 128
|
||||||
|
#define ENABLE_NLS 1
|
||||||
|
#define HAVE_CHECK_CRC32 1
|
||||||
|
#define HAVE_CHECK_CRC64 1
|
||||||
|
#define HAVE_CHECK_SHA256 1
|
||||||
|
#define HAVE_CLOCK_GETTIME 1
|
||||||
|
#define HAVE_DCGETTEXT 1
|
||||||
|
#define HAVE_DECL_CLOCK_MONOTONIC 1
|
||||||
|
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
|
||||||
|
#define HAVE_DECODERS 1
|
||||||
|
#define HAVE_DECODER_ARM 1
|
||||||
|
#define HAVE_DECODER_ARMTHUMB 1
|
||||||
|
#define HAVE_DECODER_DELTA 1
|
||||||
|
#define HAVE_DECODER_IA64 1
|
||||||
|
#define HAVE_DECODER_LZMA1 1
|
||||||
|
#define HAVE_DECODER_LZMA2 1
|
||||||
|
#define HAVE_DECODER_POWERPC 1
|
||||||
|
#define HAVE_DECODER_SPARC 1
|
||||||
|
#define HAVE_DECODER_X86 1
|
||||||
|
#define HAVE_DLFCN_H 1
|
||||||
|
#define HAVE_ENCODERS 1
|
||||||
|
#define HAVE_ENCODER_ARM 1
|
||||||
|
#define HAVE_ENCODER_ARMTHUMB 1
|
||||||
|
#define HAVE_ENCODER_DELTA 1
|
||||||
|
#define HAVE_ENCODER_IA64 1
|
||||||
|
#define HAVE_ENCODER_LZMA1 1
|
||||||
|
#define HAVE_ENCODER_LZMA2 1
|
||||||
|
#define HAVE_ENCODER_POWERPC 1
|
||||||
|
#define HAVE_ENCODER_SPARC 1
|
||||||
|
#define HAVE_ENCODER_X86 1
|
||||||
|
#define HAVE_FCNTL_H 1
|
||||||
|
#define HAVE_FUTIMENS 1
|
||||||
|
#define HAVE_GETOPT_H 1
|
||||||
|
#define HAVE_GETOPT_LONG 1
|
||||||
|
#define HAVE_GETTEXT 1
|
||||||
|
#define HAVE_IMMINTRIN_H 1
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
#define HAVE_LIMITS_H 1
|
||||||
|
#define HAVE_MBRTOWC 1
|
||||||
|
#define HAVE_MEMORY_H 1
|
||||||
|
#define HAVE_MF_BT2 1
|
||||||
|
#define HAVE_MF_BT3 1
|
||||||
|
#define HAVE_MF_BT4 1
|
||||||
|
#define HAVE_MF_HC3 1
|
||||||
|
#define HAVE_MF_HC4 1
|
||||||
|
#define HAVE_OPTRESET 1
|
||||||
|
#define HAVE_POSIX_FADVISE 1
|
||||||
|
#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
|
||||||
|
#define HAVE_PTHREAD_PRIO_INHERIT 1
|
||||||
|
#define HAVE_STDBOOL_H 1
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
#define HAVE_STRINGS_H 1
|
||||||
|
#define HAVE_STRING_H 1
|
||||||
|
#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
|
||||||
|
#define HAVE_SYS_PARAM_H 1
|
||||||
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
#define HAVE_UINTPTR_T 1
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
#define HAVE_VISIBILITY 1
|
||||||
|
#define HAVE_WCWIDTH 1
|
||||||
|
#define HAVE__BOOL 1
|
||||||
|
#define HAVE___BUILTIN_ASSUME_ALIGNED 1
|
||||||
|
#define HAVE___BUILTIN_BSWAPXX 1
|
||||||
|
#define MYTHREAD_POSIX 1
|
||||||
|
#define NDEBUG 1
|
||||||
|
#define PACKAGE "xz"
|
||||||
|
#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
|
||||||
|
#define PACKAGE_NAME "XZ Utils"
|
||||||
|
#define PACKAGE_STRING "XZ Utils 5.4.0"
|
||||||
|
#define PACKAGE_TARNAME "xz"
|
||||||
|
#define PACKAGE_VERSION "5.4.0"
|
||||||
|
#define SIZEOF_SIZE_T 4
|
||||||
|
#define STDC_HEADERS 1
|
||||||
|
#define TUKLIB_CPUCORES_SYSCONF 1
|
||||||
|
#define TUKLIB_FAST_UNALIGNED_ACCESS 1
|
||||||
|
#define TUKLIB_PHYSMEM_SYSCONF 1
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# define _ALL_SOURCE 1
|
||||||
|
#endif
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# define _GNU_SOURCE 1
|
||||||
|
#endif
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||||
|
#endif
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# define _TANDEM_SOURCE 1
|
||||||
|
#endif
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# define __EXTENSIONS__ 1
|
||||||
|
#endif
|
||||||
|
#define VERSION "5.4.0"
|
||||||
|
'''
|
@@ -33,5 +33,7 @@
|
|||||||
<string>True</string>
|
<string>True</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.13.0</string>
|
<string>10.13.0</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.simulation-games</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
11
os/macosx/openttd.entitlements
Normal file
11
os/macosx/openttd.entitlements
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<!-- As requested in https://partner.steamgames.com/doc/store/application/platforms, allows arbitrary plugin loads on hardened runtime -->
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@@ -1,18 +1,2 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM Signing script
|
pwsh -File "%~dp0sign_azure.ps1" %1
|
||||||
REM Arguments: sign.bat exe_to_sign certificate_subject_name
|
|
||||||
|
|
||||||
REM This is a loose wrapper around the Microsoft signtool application (included in the Windows SDK).
|
|
||||||
REM See https://docs.microsoft.com/en-us/dotnet/framework/tools/signtool-exe for more details.
|
|
||||||
|
|
||||||
REM Path to signtool.exe
|
|
||||||
IF NOT DEFINED SIGNTOOL_PATH (SET SIGNTOOL_PATH=signtool)
|
|
||||||
|
|
||||||
REM URL of the timestamp server
|
|
||||||
IF NOT DEFINED SIGNTOOL_TIMESTAMP_URL (SET SIGNTOOL_TIMESTAMP_URL=http://timestamp.digicert.com)
|
|
||||||
|
|
||||||
REM Sign with SHA-1 for Windows 7 and below
|
|
||||||
"%SIGNTOOL_PATH%" sign -v -n %2 -t %SIGNTOOL_TIMESTAMP_URL% -fd sha1 %1
|
|
||||||
|
|
||||||
REM Sign with SHA-256 for Windows 8 and above
|
|
||||||
"%SIGNTOOL_PATH%" sign -v -n %2 -tr %SIGNTOOL_TIMESTAMP_URL% -fd sha256 -td sha256 -as %1
|
|
||||||
|
40
os/windows/sign_azure.ps1
Normal file
40
os/windows/sign_azure.ps1
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Signing script for Azure Code Signing
|
||||||
|
# Arguments: sign_azure.ps1 path_to_sign
|
||||||
|
#
|
||||||
|
# Environment variables must be set up before use:
|
||||||
|
#
|
||||||
|
# AZURE_TENANT_ID
|
||||||
|
# AZURE_CLIENT_ID
|
||||||
|
# AZURE_CLIENT_SECRET
|
||||||
|
# AZURE_CODESIGN_ACCOUNT_NAME
|
||||||
|
# AZURE_CODESIGN_ENDPOINT
|
||||||
|
# AZURE_CODESIGN_PROFILE_NAME
|
||||||
|
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
# Files folder
|
||||||
|
[Parameter(Mandatory=$true, Position=0)]
|
||||||
|
$FilesFolder
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!$Env:AZURE_CODESIGN_ENDPOINT -or !$Env:AZURE_CODESIGN_ACCOUNT_NAME -or !$Env:AZURE_CODESIGN_PROFILE_NAME -or
|
||||||
|
!$Env:AZURE_TENANT_ID -or !$Env:AZURE_CLIENT_ID -or !$Env:AZURE_CLIENT_SECRET)
|
||||||
|
{
|
||||||
|
"Code signing variables not found; most likely running in a fork. Skipping signing."
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
Install-Module -Name AzureCodeSigning -Scope CurrentUser -RequiredVersion 0.3.0 -Force -Repository PSGallery
|
||||||
|
|
||||||
|
$params = @{}
|
||||||
|
|
||||||
|
$params["Endpoint"] = $Env:AZURE_CODESIGN_ENDPOINT
|
||||||
|
$params["CodeSigningAccountName"] = $Env:AZURE_CODESIGN_ACCOUNT_NAME
|
||||||
|
$params["CertificateProfileName"] = $Env:AZURE_CODESIGN_PROFILE_NAME
|
||||||
|
$params["FilesFolder"] = $FilesFolder
|
||||||
|
$params["FilesFolderFilter"] = "exe"
|
||||||
|
$params["FileDigest"] = "SHA256"
|
||||||
|
$params["TimestampRfc3161"] = "http://timestamp.acs.microsoft.com"
|
||||||
|
$params["TimestampDigest"] = "SHA256"
|
||||||
|
|
||||||
|
Invoke-AzureCodeSigning @params
|
@@ -4,7 +4,7 @@ class Regression extends AIInfo {
|
|||||||
function GetShortName() { return "REGR"; }
|
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 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 GetVersion() { return 1; }
|
||||||
function GetAPIVersion() { return "14"; }
|
function GetAPIVersion() { return "15"; }
|
||||||
function GetDate() { return "2007-03-18"; }
|
function GetDate() { return "2007-03-18"; }
|
||||||
function CreateInstance() { return "Regression"; }
|
function CreateInstance() { return "Regression"; }
|
||||||
function UseAsRandomAI() { return false; }
|
function UseAsRandomAI() { return false; }
|
||||||
|
@@ -6093,7 +6093,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
GetNumEngines(): 1
|
GetNumEngines(): 1
|
||||||
GetNumEngines(): 1
|
GetNumEngines(): 1
|
||||||
GetNumEngines(): 0
|
GetNumEngines(): 0
|
||||||
GetName(): Group 0
|
GetName(): Group 1
|
||||||
GetName(): (null : 0x00000000)
|
GetName(): (null : 0x00000000)
|
||||||
AIVehicle.SellVehicle(): true
|
AIVehicle.SellVehicle(): true
|
||||||
AITile.DemolishTile(): true
|
AITile.DemolishTile(): true
|
||||||
@@ -7510,7 +7510,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
BuildRailDepot(): false
|
BuildRailDepot(): false
|
||||||
BuildRailDepot(): true
|
BuildRailDepot(): true
|
||||||
BuildRailDepot(): true
|
BuildRailDepot(): true
|
||||||
BuildRailDepot(): false
|
BuildRailDepot(): true
|
||||||
GetRailDepotFrontTile(): 33412
|
GetRailDepotFrontTile(): 33412
|
||||||
IsBuildable(): false
|
IsBuildable(): false
|
||||||
DepotList
|
DepotList
|
||||||
@@ -7604,12 +7604,12 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
BuildRoadDepot(): false
|
BuildRoadDepot(): false
|
||||||
BuildRoadDepot(): true
|
BuildRoadDepot(): true
|
||||||
BuildRoadDepot(): true
|
BuildRoadDepot(): true
|
||||||
BuildRoadDepot(): false
|
BuildRoadDepot(): true
|
||||||
HasRoadType(Road): true
|
HasRoadType(Road): true
|
||||||
HasRoadType(Tram): false
|
HasRoadType(Tram): false
|
||||||
GetLastError(): 259
|
GetLastError(): 0
|
||||||
GetLastErrorString(): ERR_ALREADY_BUILT
|
GetLastErrorString(): ERR_NONE
|
||||||
GetErrorCategory(): 1
|
GetErrorCategory(): 0
|
||||||
IsRoadTile(): false
|
IsRoadTile(): false
|
||||||
GetRoadDepotFrontTile(): 33412
|
GetRoadDepotFrontTile(): 33412
|
||||||
IsRoadDepotTile(): true
|
IsRoadDepotTile(): true
|
||||||
@@ -9471,7 +9471,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
IsStoppedInDepot(): false
|
IsStoppedInDepot(): false
|
||||||
--Accounting--
|
--Accounting--
|
||||||
GetCosts(): -5947
|
GetCosts(): -5947
|
||||||
Should be: -5946
|
Should be: -5947
|
||||||
GetName(): Road Vehicle #1
|
GetName(): Road Vehicle #1
|
||||||
SetName(): true
|
SetName(): true
|
||||||
GetName(): MyVehicleName
|
GetName(): MyVehicleName
|
||||||
@@ -9485,7 +9485,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
GetAgeLeft(): 5489
|
GetAgeLeft(): 5489
|
||||||
GetCurrentSpeed(): 7
|
GetCurrentSpeed(): 7
|
||||||
GetRunningCost(): 421
|
GetRunningCost(): 421
|
||||||
GetProfitThisYear(): -1
|
GetProfitThisYear(): 0
|
||||||
GetProfitLastYear(): 0
|
GetProfitLastYear(): 0
|
||||||
GetCurrentValue(): 5947
|
GetCurrentValue(): 5947
|
||||||
GetVehicleType(): 1
|
GetVehicleType(): 1
|
||||||
@@ -9604,7 +9604,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||||||
16 => 0
|
16 => 0
|
||||||
14 => 0
|
14 => 0
|
||||||
13 => 0
|
13 => 0
|
||||||
12 => -1
|
12 => 0
|
||||||
ProfitLastYear ListDump:
|
ProfitLastYear ListDump:
|
||||||
17 => 0
|
17 => 0
|
||||||
16 => 0
|
16 => 0
|
||||||
|
@@ -4,7 +4,7 @@ class StationList extends AIInfo {
|
|||||||
function GetShortName() { return "REGS"; }
|
function GetShortName() { return "REGS"; }
|
||||||
function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; }
|
function GetDescription() { return "This runs stationlist-tests on some commands. On the same map the result should always be the same."; }
|
||||||
function GetVersion() { return 1; }
|
function GetVersion() { return 1; }
|
||||||
function GetAPIVersion() { return "14"; }
|
function GetAPIVersion() { return "15"; }
|
||||||
function GetDate() { return "2007-03-18"; }
|
function GetDate() { return "2007-03-18"; }
|
||||||
function CreateInstance() { return "StationList"; }
|
function CreateInstance() { return "StationList"; }
|
||||||
function UseAsRandomAI() { return false; }
|
function UseAsRandomAI() { return false; }
|
||||||
|
2
src/3rdparty/icu/CMakeLists.txt
vendored
2
src/3rdparty/icu/CMakeLists.txt
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
add_subdirectory(tests)
|
||||||
|
|
||||||
add_files(
|
add_files(
|
||||||
scriptrun.cpp
|
scriptrun.cpp
|
||||||
scriptrun.h
|
scriptrun.h
|
||||||
|
7
src/3rdparty/icu/scriptrun.cpp
vendored
7
src/3rdparty/icu/scriptrun.cpp
vendored
@@ -184,13 +184,6 @@ UBool ScriptRun::next()
|
|||||||
parenStack[++startSP].scriptCode = scriptCode;
|
parenStack[++startSP].scriptCode = scriptCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if this character is a close paired character,
|
|
||||||
// pop it from the stack
|
|
||||||
if (pairIndex >= 0 && (pairIndex & 1) != 0 && parenSP >= 0) {
|
|
||||||
parenSP -= 1;
|
|
||||||
startSP -= 1;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// if the run broke on a surrogate pair,
|
// if the run broke on a surrogate pair,
|
||||||
// end it before the high surrogate
|
// end it before the high surrogate
|
||||||
|
4
src/3rdparty/icu/tests/CMakeLists.txt
vendored
Normal file
4
src/3rdparty/icu/tests/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
add_test_files(
|
||||||
|
test_srtest.cpp
|
||||||
|
CONDITION ICU_i18n_FOUND
|
||||||
|
)
|
66
src/3rdparty/icu/tests/test_srtest.cpp
vendored
Normal file
66
src/3rdparty/icu/tests/test_srtest.cpp
vendored
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
// © 2016 and later: Unicode, Inc. and others.
|
||||||
|
// License & terms of use: http://www.unicode.org/copyright.html
|
||||||
|
/*
|
||||||
|
* %W% %E%
|
||||||
|
*
|
||||||
|
* (C) Copyright IBM Corp. 2001-2016 - All Rights Reserved
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/** @file test_srtest.cpp Test icu::ScriptRun result. */
|
||||||
|
|
||||||
|
#include "../../../stdafx.h"
|
||||||
|
|
||||||
|
#include "../../../3rdparty/catch2/catch.hpp"
|
||||||
|
#include "../../../3rdparty/fmt/core.h"
|
||||||
|
|
||||||
|
#include "../scriptrun.h"
|
||||||
|
|
||||||
|
#include <span>
|
||||||
|
#include <unicode/uscript.h>
|
||||||
|
|
||||||
|
static void TestScriptRun(std::span<const char16_t> testChars, std::span<const std::string_view> testResults)
|
||||||
|
{
|
||||||
|
icu::ScriptRun scriptRun(testChars.data(), 0, std::size(testChars));
|
||||||
|
size_t i = 0;
|
||||||
|
|
||||||
|
while (scriptRun.next()) {
|
||||||
|
int32_t start = scriptRun.getScriptStart();
|
||||||
|
int32_t end = scriptRun.getScriptEnd();
|
||||||
|
UScriptCode code = scriptRun.getScriptCode();
|
||||||
|
|
||||||
|
REQUIRE(i < std::size(testResults));
|
||||||
|
CHECK(fmt::format("Script '{}' from {} to {}.", uscript_getName(code), start, end) == testResults[i]);
|
||||||
|
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
|
REQUIRE(i == std::size(testResults));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("ICU ScriptRun")
|
||||||
|
{
|
||||||
|
/** Example string sequence as in srtest.cpp. */
|
||||||
|
static const char16_t testChars[] = {
|
||||||
|
0x0020, 0x0946, 0x0939, 0x093F, 0x0928, 0x094D, 0x0926, 0x0940, 0x0020,
|
||||||
|
0x0627, 0x0644, 0x0639, 0x0631, 0x0628, 0x064A, 0x0629, 0x0020,
|
||||||
|
0x0420, 0x0443, 0x0441, 0x0441, 0x043A, 0x0438, 0x0439, 0x0020,
|
||||||
|
'E', 'n', 'g', 'l', 'i', 's', 'h', 0x0020,
|
||||||
|
0x6F22, 0x5B75, 0x3068, 0x3072, 0x3089, 0x304C, 0x306A, 0x3068,
|
||||||
|
0x30AB, 0x30BF, 0x30AB, 0x30CA,
|
||||||
|
0xD801, 0xDC00, 0xD801, 0xDC01, 0xD801, 0xDC02, 0xD801, 0xDC03
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Expected results from script run. */
|
||||||
|
static const std::string_view testResults[] = {
|
||||||
|
"Script 'Devanagari' from 0 to 9.",
|
||||||
|
"Script 'Arabic' from 9 to 17.",
|
||||||
|
"Script 'Cyrillic' from 17 to 25.",
|
||||||
|
"Script 'Latin' from 25 to 33.",
|
||||||
|
"Script 'Han' from 33 to 35.",
|
||||||
|
"Script 'Hiragana' from 35 to 41.",
|
||||||
|
"Script 'Katakana' from 41 to 45.",
|
||||||
|
"Script 'Deseret' from 45 to 53.",
|
||||||
|
};
|
||||||
|
|
||||||
|
TestScriptRun(testChars, testResults);
|
||||||
|
}
|
4
src/3rdparty/md5/md5.h
vendored
4
src/3rdparty/md5/md5.h
vendored
@@ -57,8 +57,8 @@
|
|||||||
static const size_t MD5_HASH_BYTES = 16;
|
static const size_t MD5_HASH_BYTES = 16;
|
||||||
|
|
||||||
/** Container for storing a MD5 hash/checksum/digest. */
|
/** Container for storing a MD5 hash/checksum/digest. */
|
||||||
struct MD5Hash : std::array<byte, MD5_HASH_BYTES> {
|
struct MD5Hash : std::array<uint8_t, MD5_HASH_BYTES> {
|
||||||
MD5Hash() : std::array<byte, MD5_HASH_BYTES>{} {}
|
MD5Hash() : std::array<uint8_t, MD5_HASH_BYTES>{} {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exclusively-or the given hash into this hash.
|
* Exclusively-or the given hash into this hash.
|
||||||
|
@@ -650,8 +650,7 @@ public:
|
|||||||
_fs->AddInstruction(_OP_LOADINT, _exst._deref,_integer(constval));
|
_fs->AddInstruction(_OP_LOADINT, _exst._deref,_integer(constval));
|
||||||
}
|
}
|
||||||
else if(ctype == OT_FLOAT && sizeof(SQFloat) == sizeof(SQInt32)) {
|
else if(ctype == OT_FLOAT && sizeof(SQFloat) == sizeof(SQInt32)) {
|
||||||
SQFloat f = _float(constval);
|
_fs->AddInstruction(_OP_LOADFLOAT, _exst._deref, std::bit_cast<SQInt32>(_float(constval)));
|
||||||
_fs->AddInstruction(_OP_LOADFLOAT, _exst._deref,*((SQInt32 *)&f));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_fs->AddInstruction(_OP_LOAD, _exst._deref, _fs->GetConstant(constval));
|
_fs->AddInstruction(_OP_LOAD, _exst._deref, _fs->GetConstant(constval));
|
||||||
@@ -697,7 +696,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
case TK_FLOAT:
|
case TK_FLOAT:
|
||||||
if(sizeof(SQFloat) == sizeof(SQInt32)) {
|
if(sizeof(SQFloat) == sizeof(SQInt32)) {
|
||||||
_fs->AddInstruction(_OP_LOADFLOAT, _fs->PushTarget(),*((SQInt32 *)&_lex._fvalue));
|
_fs->AddInstruction(_OP_LOADFLOAT, _fs->PushTarget(), std::bit_cast<SQInt32>(_lex._fvalue));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetNumericConstant(_lex._fvalue));
|
_fs->AddInstruction(_OP_LOAD, _fs->PushTarget(), _fs->GetNumericConstant(_lex._fvalue));
|
||||||
|
19
src/3rdparty/squirrel/squirrel/sqfuncstate.cpp
vendored
19
src/3rdparty/squirrel/squirrel/sqfuncstate.cpp
vendored
@@ -199,7 +199,7 @@ void SQFuncState::Dump(SQFunctionProto *func)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(inst.op==_OP_LOADFLOAT) {
|
else if(inst.op==_OP_LOADFLOAT) {
|
||||||
printf("[%03d] %15s %d %f %d %d\n",n,g_InstrDesc[inst.op].name,inst._arg0,*((SQFloat*)&inst._arg1),inst._arg2,inst._arg3);
|
printf("[%03d] %15s %d %f %d %d\n",n,g_InstrDesc[inst.op].name,inst._arg0,std::bit_cast<SQFloat>(inst._arg1),inst._arg2,inst._arg3);
|
||||||
}
|
}
|
||||||
else if(inst.op==_OP_ARITH){
|
else if(inst.op==_OP_ARITH){
|
||||||
printf("[%03d] %15s %d %d %d %c\n",n,g_InstrDesc[inst.op].name,inst._arg0,inst._arg1,inst._arg2,inst._arg3);
|
printf("[%03d] %15s %d %d %d %c\n",n,g_InstrDesc[inst.op].name,inst._arg0,inst._arg1,inst._arg2,inst._arg3);
|
||||||
@@ -242,19 +242,20 @@ SQInteger SQFuncState::GetConstant(const SQObject &cons)
|
|||||||
|
|
||||||
void SQFuncState::SetIntructionParams(SQInteger pos,SQInteger arg0,SQInteger arg1,SQInteger arg2,SQInteger arg3)
|
void SQFuncState::SetIntructionParams(SQInteger pos,SQInteger arg0,SQInteger arg1,SQInteger arg2,SQInteger arg3)
|
||||||
{
|
{
|
||||||
_instructions[pos]._arg0=(unsigned char)*((SQUnsignedInteger *)&arg0);
|
_instructions[pos]._arg0 = (unsigned char)std::bit_cast<SQUnsignedInteger>(arg0);
|
||||||
_instructions[pos]._arg1=(SQInt32)*((SQUnsignedInteger *)&arg1);
|
_instructions[pos]._arg1 = (SQInt32)std::bit_cast<SQUnsignedInteger>(arg1);
|
||||||
_instructions[pos]._arg2=(unsigned char)*((SQUnsignedInteger *)&arg2);
|
_instructions[pos]._arg2 = (unsigned char)std::bit_cast<SQUnsignedInteger>(arg2);
|
||||||
_instructions[pos]._arg3=(unsigned char)*((SQUnsignedInteger *)&arg3);
|
_instructions[pos]._arg3 = (unsigned char)std::bit_cast<SQUnsignedInteger>(arg3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SQFuncState::SetIntructionParam(SQInteger pos,SQInteger arg,SQInteger val)
|
void SQFuncState::SetIntructionParam(SQInteger pos,SQInteger arg,SQInteger val)
|
||||||
{
|
{
|
||||||
switch(arg){
|
switch(arg){
|
||||||
case 0:_instructions[pos]._arg0=(unsigned char)*((SQUnsignedInteger *)&val);break;
|
case 0: _instructions[pos]._arg0 = (unsigned char)std::bit_cast<SQUnsignedInteger>(val); break;
|
||||||
case 1:case 4:_instructions[pos]._arg1=(SQInt32)*((SQUnsignedInteger *)&val);break;
|
case 1:
|
||||||
case 2:_instructions[pos]._arg2=(unsigned char)*((SQUnsignedInteger *)&val);break;
|
case 4: _instructions[pos]._arg1 = (SQInt32)std::bit_cast<SQUnsignedInteger>(val); break;
|
||||||
case 3:_instructions[pos]._arg3=(unsigned char)*((SQUnsignedInteger *)&val);break;
|
case 2: _instructions[pos]._arg2 = (unsigned char)std::bit_cast<SQUnsignedInteger>(val); break;
|
||||||
|
case 3: _instructions[pos]._arg3 = (unsigned char)std::bit_cast<SQUnsignedInteger>(val); break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
8
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@@ -51,7 +51,7 @@ bool SQVM::BW_OP(SQUnsignedInteger op,SQObjectPtr &trg,const SQObjectPtr &o1,con
|
|||||||
case BW_XOR: res = i1 ^ i2; break;
|
case BW_XOR: res = i1 ^ i2; break;
|
||||||
case BW_SHIFTL: res = i1 << i2; break;
|
case BW_SHIFTL: res = i1 << i2; break;
|
||||||
case BW_SHIFTR: res = i1 >> i2; break;
|
case BW_SHIFTR: res = i1 >> i2; break;
|
||||||
case BW_USHIFTR:res = (SQInteger)(*((SQUnsignedInteger*)&i1) >> i2); break;
|
case BW_USHIFTR:res = (SQInteger)(std::bit_cast<SQUnsignedInteger>(i1) >> i2); break;
|
||||||
default: { Raise_Error("internal vm error bitwise op failed"); return false; }
|
default: { Raise_Error("internal vm error bitwise op failed"); return false; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,10 +472,10 @@ bool SQVM::DerefInc(SQInteger op,SQObjectPtr &target, SQObjectPtr &self, SQObjec
|
|||||||
|
|
||||||
#define arg0 (_i_._arg0)
|
#define arg0 (_i_._arg0)
|
||||||
#define arg1 (_i_._arg1)
|
#define arg1 (_i_._arg1)
|
||||||
#define sarg1 (*(const_cast<SQInt32 *>(&_i_._arg1)))
|
#define sarg1 (std::bit_cast<SQInt32>(_i_._arg1))
|
||||||
#define arg2 (_i_._arg2)
|
#define arg2 (_i_._arg2)
|
||||||
#define arg3 (_i_._arg3)
|
#define arg3 (_i_._arg3)
|
||||||
#define sarg3 ((SQInteger)*((const signed char *)&_i_._arg3))
|
#define sarg3 ((SQInteger)std::bit_cast<char>(_i_._arg3))
|
||||||
|
|
||||||
SQRESULT SQVM::Suspend()
|
SQRESULT SQVM::Suspend()
|
||||||
{
|
{
|
||||||
@@ -764,7 +764,7 @@ exception_restore:
|
|||||||
continue;
|
continue;
|
||||||
case _OP_LOAD: TARGET = ci->_literals[arg1]; continue;
|
case _OP_LOAD: TARGET = ci->_literals[arg1]; continue;
|
||||||
case _OP_LOADINT: TARGET = (SQInteger)arg1; continue;
|
case _OP_LOADINT: TARGET = (SQInteger)arg1; continue;
|
||||||
case _OP_LOADFLOAT: TARGET = *((const SQFloat *)&arg1); continue;
|
case _OP_LOADFLOAT: TARGET = std::bit_cast<SQFloat>(arg1); continue;
|
||||||
case _OP_DLOAD: TARGET = ci->_literals[arg1]; STK(arg2) = ci->_literals[arg3];continue;
|
case _OP_DLOAD: TARGET = ci->_literals[arg1]; STK(arg2) = ci->_literals[arg3];continue;
|
||||||
case _OP_TAILCALL:
|
case _OP_TAILCALL:
|
||||||
temp_reg = STK(arg1);
|
temp_reg = STK(arg1);
|
||||||
|
@@ -39,6 +39,11 @@ add_files(
|
|||||||
CONDITION ICU_i18n_FOUND AND HARFBUZZ_FOUND
|
CONDITION ICU_i18n_FOUND AND HARFBUZZ_FOUND
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_files(
|
||||||
|
soundloader_opus.cpp
|
||||||
|
CONDITION OpusFile_FOUND
|
||||||
|
)
|
||||||
|
|
||||||
add_files(
|
add_files(
|
||||||
aircraft.h
|
aircraft.h
|
||||||
aircraft_cmd.cpp
|
aircraft_cmd.cpp
|
||||||
@@ -50,8 +55,11 @@ add_files(
|
|||||||
airport_gui.cpp
|
airport_gui.cpp
|
||||||
animated_tile.cpp
|
animated_tile.cpp
|
||||||
animated_tile_func.h
|
animated_tile_func.h
|
||||||
|
animated_tile_map.h
|
||||||
articulated_vehicles.cpp
|
articulated_vehicles.cpp
|
||||||
articulated_vehicles.h
|
articulated_vehicles.h
|
||||||
|
autocompletion.cpp
|
||||||
|
autocompletion.h
|
||||||
autoreplace.cpp
|
autoreplace.cpp
|
||||||
autoreplace_base.h
|
autoreplace_base.h
|
||||||
autoreplace_cmd.cpp
|
autoreplace_cmd.cpp
|
||||||
@@ -75,6 +83,7 @@ add_files(
|
|||||||
bridge_map.cpp
|
bridge_map.cpp
|
||||||
bridge_map.h
|
bridge_map.h
|
||||||
build_vehicle_gui.cpp
|
build_vehicle_gui.cpp
|
||||||
|
cachecheck.cpp
|
||||||
cargo_type.h
|
cargo_type.h
|
||||||
cargoaction.cpp
|
cargoaction.cpp
|
||||||
cargoaction.h
|
cargoaction.h
|
||||||
@@ -136,6 +145,10 @@ add_files(
|
|||||||
dock_gui.cpp
|
dock_gui.cpp
|
||||||
driver.cpp
|
driver.cpp
|
||||||
driver.h
|
driver.h
|
||||||
|
dropdown.cpp
|
||||||
|
dropdown_common_type.h
|
||||||
|
dropdown_func.h
|
||||||
|
dropdown_type.h
|
||||||
economy.cpp
|
economy.cpp
|
||||||
economy_base.h
|
economy_base.h
|
||||||
economy_cmd.h
|
economy_cmd.h
|
||||||
@@ -248,6 +261,7 @@ add_files(
|
|||||||
music_gui.cpp
|
music_gui.cpp
|
||||||
newgrf.cpp
|
newgrf.cpp
|
||||||
newgrf.h
|
newgrf.h
|
||||||
|
newgrf_act5.h
|
||||||
newgrf_airport.cpp
|
newgrf_airport.cpp
|
||||||
newgrf_airport.h
|
newgrf_airport.h
|
||||||
newgrf_airporttiles.cpp
|
newgrf_airporttiles.cpp
|
||||||
@@ -299,6 +313,7 @@ add_files(
|
|||||||
newgrf_storage.h
|
newgrf_storage.h
|
||||||
newgrf_text.cpp
|
newgrf_text.cpp
|
||||||
newgrf_text.h
|
newgrf_text.h
|
||||||
|
newgrf_text_type.h
|
||||||
newgrf_town.cpp
|
newgrf_town.cpp
|
||||||
newgrf_town.h
|
newgrf_town.h
|
||||||
newgrf_townname.cpp
|
newgrf_townname.cpp
|
||||||
@@ -330,8 +345,12 @@ add_files(
|
|||||||
palette_func.h
|
palette_func.h
|
||||||
pbs.cpp
|
pbs.cpp
|
||||||
pbs.h
|
pbs.h
|
||||||
|
picker_func.h
|
||||||
|
picker_gui.cpp
|
||||||
|
picker_gui.h
|
||||||
progress.cpp
|
progress.cpp
|
||||||
progress.h
|
progress.h
|
||||||
|
provider_manager.h
|
||||||
querystring_gui.h
|
querystring_gui.h
|
||||||
rail.cpp
|
rail.cpp
|
||||||
rail.h
|
rail.h
|
||||||
@@ -391,6 +410,8 @@ add_files(
|
|||||||
signs_func.h
|
signs_func.h
|
||||||
signs_gui.cpp
|
signs_gui.cpp
|
||||||
signs_type.h
|
signs_type.h
|
||||||
|
slider.cpp
|
||||||
|
slider_func.h
|
||||||
slope_func.h
|
slope_func.h
|
||||||
slope_type.h
|
slope_type.h
|
||||||
smallmap_gui.cpp
|
smallmap_gui.cpp
|
||||||
@@ -401,6 +422,11 @@ add_files(
|
|||||||
sound.cpp
|
sound.cpp
|
||||||
sound_func.h
|
sound_func.h
|
||||||
sound_type.h
|
sound_type.h
|
||||||
|
soundloader.cpp
|
||||||
|
soundloader_func.h
|
||||||
|
soundloader_type.h
|
||||||
|
soundloader_raw.cpp
|
||||||
|
soundloader_wav.cpp
|
||||||
sprite.cpp
|
sprite.cpp
|
||||||
sprite.h
|
sprite.h
|
||||||
spritecache.cpp
|
spritecache.cpp
|
||||||
@@ -466,7 +492,6 @@ add_files(
|
|||||||
tilearea_type.h
|
tilearea_type.h
|
||||||
tilehighlight_func.h
|
tilehighlight_func.h
|
||||||
tilehighlight_type.h
|
tilehighlight_type.h
|
||||||
tilematrix_type.hpp
|
|
||||||
timetable.h
|
timetable.h
|
||||||
timetable_cmd.cpp
|
timetable_cmd.cpp
|
||||||
timetable_cmd.h
|
timetable_cmd.h
|
||||||
|
@@ -27,9 +27,8 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Start a new AI company.
|
* Start a new AI company.
|
||||||
* @param company At which slot the AI company should start.
|
* @param company At which slot the AI company should start.
|
||||||
* @param deviate Whether to apply random deviation to the configured AI.
|
|
||||||
*/
|
*/
|
||||||
static void StartNew(CompanyID company, bool deviate = true);
|
static void StartNew(CompanyID company);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called every game-tick to let AIs do something.
|
* Called every game-tick to let AIs do something.
|
||||||
|
@@ -33,14 +33,14 @@
|
|||||||
return !_networking || (_network_server && _settings_game.ai.ai_in_multiplayer);
|
return !_networking || (_network_server && _settings_game.ai.ai_in_multiplayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void AI::StartNew(CompanyID company, bool deviate)
|
/* static */ void AI::StartNew(CompanyID company)
|
||||||
{
|
{
|
||||||
assert(Company::IsValidID(company));
|
assert(Company::IsValidID(company));
|
||||||
|
|
||||||
/* Clients shouldn't start AIs */
|
/* Clients shouldn't start AIs */
|
||||||
if (_networking && !_network_server) return;
|
if (_networking && !_network_server) return;
|
||||||
|
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
Company *c = Company::Get(company);
|
Company *c = Company::Get(company);
|
||||||
|
|
||||||
AIConfig *config = c->ai_config.get();
|
AIConfig *config = c->ai_config.get();
|
||||||
@@ -56,12 +56,11 @@
|
|||||||
/* Load default data and store the name in the settings */
|
/* Load default data and store the name in the settings */
|
||||||
config->Change(info->GetName(), -1, false);
|
config->Change(info->GetName(), -1, false);
|
||||||
}
|
}
|
||||||
if (deviate) config->AddRandomDeviation(company);
|
|
||||||
config->AnchorUnchangeableSettings();
|
config->AnchorUnchangeableSettings();
|
||||||
|
|
||||||
c->ai_info = info;
|
c->ai_info = info;
|
||||||
assert(c->ai_instance == nullptr);
|
assert(c->ai_instance == nullptr);
|
||||||
c->ai_instance = new AIInstance();
|
c->ai_instance = std::make_unique<AIInstance>();
|
||||||
c->ai_instance->Initialize(info);
|
c->ai_instance->Initialize(info);
|
||||||
c->ai_instance->LoadOnStack(config->GetToLoadData());
|
c->ai_instance->LoadOnStack(config->GetToLoadData());
|
||||||
config->SetToLoadData(nullptr);
|
config->SetToLoadData(nullptr);
|
||||||
@@ -82,7 +81,7 @@
|
|||||||
assert(_settings_game.difficulty.competitor_speed <= 4);
|
assert(_settings_game.difficulty.competitor_speed <= 4);
|
||||||
if ((AI::frame_counter & ((1 << (4 - _settings_game.difficulty.competitor_speed)) - 1)) != 0) return;
|
if ((AI::frame_counter & ((1 << (4 - _settings_game.difficulty.competitor_speed)) - 1)) != 0) return;
|
||||||
|
|
||||||
Backup<CompanyID> cur_company(_current_company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company);
|
||||||
for (const Company *c : Company::Iterate()) {
|
for (const Company *c : Company::Iterate()) {
|
||||||
if (c->is_ai) {
|
if (c->is_ai) {
|
||||||
PerformanceMeasurer framerate((PerformanceElement)(PFE_AI0 + c->index));
|
PerformanceMeasurer framerate((PerformanceElement)(PFE_AI0 + c->index));
|
||||||
@@ -110,11 +109,10 @@
|
|||||||
if (_networking && !_network_server) return;
|
if (_networking && !_network_server) return;
|
||||||
PerformanceMeasurer::SetInactive((PerformanceElement)(PFE_AI0 + company));
|
PerformanceMeasurer::SetInactive((PerformanceElement)(PFE_AI0 + company));
|
||||||
|
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
Company *c = Company::Get(company);
|
Company *c = Company::Get(company);
|
||||||
|
|
||||||
delete c->ai_instance;
|
c->ai_instance.reset();
|
||||||
c->ai_instance = nullptr;
|
|
||||||
c->ai_info = nullptr;
|
c->ai_info = nullptr;
|
||||||
c->ai_config.reset();
|
c->ai_config.reset();
|
||||||
|
|
||||||
@@ -130,7 +128,7 @@
|
|||||||
* for the server owner to unpause the script again. */
|
* for the server owner to unpause the script again. */
|
||||||
if (_network_dedicated) return;
|
if (_network_dedicated) return;
|
||||||
|
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
Company::Get(company)->ai_instance->Pause();
|
Company::Get(company)->ai_instance->Pause();
|
||||||
|
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
@@ -138,7 +136,7 @@
|
|||||||
|
|
||||||
/* static */ void AI::Unpause(CompanyID company)
|
/* static */ void AI::Unpause(CompanyID company)
|
||||||
{
|
{
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
Company::Get(company)->ai_instance->Unpause();
|
Company::Get(company)->ai_instance->Unpause();
|
||||||
|
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
@@ -146,7 +144,7 @@
|
|||||||
|
|
||||||
/* static */ bool AI::IsPaused(CompanyID company)
|
/* static */ bool AI::IsPaused(CompanyID company)
|
||||||
{
|
{
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
bool paused = Company::Get(company)->ai_instance->IsPaused();
|
bool paused = Company::Get(company)->ai_instance->IsPaused();
|
||||||
|
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
@@ -215,23 +213,28 @@
|
|||||||
if (!_settings_game.ai_config[c]->ResetInfo(true)) {
|
if (!_settings_game.ai_config[c]->ResetInfo(true)) {
|
||||||
Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName());
|
Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_game.ai_config[c]->GetName());
|
||||||
_settings_game.ai_config[c]->Change(std::nullopt);
|
_settings_game.ai_config[c]->Change(std::nullopt);
|
||||||
if (Company::IsValidAiID(c)) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_settings_newgame.ai_config[c] != nullptr && _settings_newgame.ai_config[c]->HasScript()) {
|
||||||
|
if (!_settings_newgame.ai_config[c]->ResetInfo(false)) {
|
||||||
|
Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName());
|
||||||
|
_settings_newgame.ai_config[c]->Change(std::nullopt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Company::IsValidAiID(c) && Company::Get(c)->ai_config != nullptr) {
|
||||||
|
AIConfig *config = Company::Get(c)->ai_config.get();
|
||||||
|
if (!config->ResetInfo(true)) {
|
||||||
/* The code belonging to an already running AI was deleted. We can only do
|
/* The code belonging to an already running AI was deleted. We can only do
|
||||||
* one thing here to keep everything sane and that is kill the AI. After
|
* one thing here to keep everything sane and that is kill the AI. After
|
||||||
* killing the offending AI we start a random other one in it's place, just
|
* killing the offending AI we start a random other one in it's place, just
|
||||||
* like what would happen if the AI was missing during loading. */
|
* like what would happen if the AI was missing during loading. */
|
||||||
AI::Stop(c);
|
AI::Stop(c);
|
||||||
AI::StartNew(c, false);
|
AI::StartNew(c);
|
||||||
}
|
} else {
|
||||||
} else if (Company::IsValidAiID(c)) {
|
|
||||||
/* Update the reference in the Company struct. */
|
/* Update the reference in the Company struct. */
|
||||||
Company::Get(c)->ai_info = _settings_game.ai_config[c]->GetInfo();
|
Company::Get(c)->ai_info = config->GetInfo();
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_settings_newgame.ai_config[c] != nullptr && _settings_newgame.ai_config[c]->HasScript()) {
|
|
||||||
if (!_settings_newgame.ai_config[c]->ResetInfo(false)) {
|
|
||||||
Debug(script, 0, "After a reload, the AI by the name '{}' was no longer found, and removed from the list.", _settings_newgame.ai_config[c]->GetName());
|
|
||||||
_settings_newgame.ai_config[c]->Change(std::nullopt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -239,37 +242,30 @@
|
|||||||
|
|
||||||
/* static */ void AI::NewEvent(CompanyID company, ScriptEvent *event)
|
/* static */ void AI::NewEvent(CompanyID company, ScriptEvent *event)
|
||||||
{
|
{
|
||||||
/* AddRef() and Release() need to be called at least once, so do it here */
|
ScriptObjectRef counter(event);
|
||||||
event->AddRef();
|
|
||||||
|
|
||||||
/* Clients should ignore events */
|
/* Clients should ignore events */
|
||||||
if (_networking && !_network_server) {
|
if (_networking && !_network_server) {
|
||||||
event->Release();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only AIs can have an event-queue */
|
/* Only AIs can have an event-queue */
|
||||||
if (!Company::IsValidAiID(company)) {
|
if (!Company::IsValidAiID(company)) {
|
||||||
event->Release();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Queue the event */
|
/* Queue the event */
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
Company::Get(_current_company)->ai_instance->InsertEvent(event);
|
Company::Get(_current_company)->ai_instance->InsertEvent(event);
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
|
|
||||||
event->Release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void AI::BroadcastNewEvent(ScriptEvent *event, CompanyID skip_company)
|
/* static */ void AI::BroadcastNewEvent(ScriptEvent *event, CompanyID skip_company)
|
||||||
{
|
{
|
||||||
/* AddRef() and Release() need to be called at least once, so do it here */
|
ScriptObjectRef counter(event);
|
||||||
event->AddRef();
|
|
||||||
|
|
||||||
/* Clients should ignore events */
|
/* Clients should ignore events */
|
||||||
if (_networking && !_network_server) {
|
if (_networking && !_network_server) {
|
||||||
event->Release();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,24 +273,26 @@
|
|||||||
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
|
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
|
||||||
if (c != skip_company) AI::NewEvent(c, event);
|
if (c != skip_company) AI::NewEvent(c, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
event->Release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void AI::Save(CompanyID company)
|
/* static */ void AI::Save(CompanyID company)
|
||||||
{
|
{
|
||||||
if (!_networking || _network_server) {
|
if (!_networking || _network_server) {
|
||||||
Company *c = Company::GetIfValid(company);
|
Company *c = Company::GetIfValid(company);
|
||||||
assert(c != nullptr && c->ai_instance != nullptr);
|
assert(c != nullptr);
|
||||||
|
|
||||||
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
|
/* When doing emergency saving, an AI can be not fully initialised. */
|
||||||
|
if (c->ai_instance != nullptr) {
|
||||||
|
Backup<CompanyID> cur_company(_current_company, company);
|
||||||
c->ai_instance->Save();
|
c->ai_instance->Save();
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
} else {
|
return;
|
||||||
AIInstance::SaveEmpty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AIInstance::SaveEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
/* static */ void AI::GetConsoleList(std::back_insert_iterator<std::string> &output_iterator, bool newest_only)
|
/* static */ void AI::GetConsoleList(std::back_insert_iterator<std::string> &output_iterator, bool newest_only)
|
||||||
{
|
{
|
||||||
AI::scanner_info->GetConsoleList(output_iterator, newest_only);
|
AI::scanner_info->GetConsoleList(output_iterator, newest_only);
|
||||||
|
@@ -82,11 +82,11 @@ static constexpr NWidgetPart _nested_ai_config_widgets[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** Window definition for the configure AI window. */
|
/** Window definition for the configure AI window. */
|
||||||
static WindowDesc _ai_config_desc(__FILE__, __LINE__,
|
static WindowDesc _ai_config_desc(
|
||||||
WDP_CENTER, nullptr, 0, 0,
|
WDP_CENTER, nullptr, 0, 0,
|
||||||
WC_GAME_OPTIONS, WC_NONE,
|
WC_GAME_OPTIONS, WC_NONE,
|
||||||
0,
|
0,
|
||||||
std::begin(_nested_ai_config_widgets), std::end(_nested_ai_config_widgets)
|
_nested_ai_config_widgets
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,7 +97,7 @@ struct AIConfigWindow : public Window {
|
|||||||
int line_height; ///< Height of a single AI-name line.
|
int line_height; ///< Height of a single AI-name line.
|
||||||
Scrollbar *vscroll; ///< Cache of the vertical scrollbar.
|
Scrollbar *vscroll; ///< Cache of the vertical scrollbar.
|
||||||
|
|
||||||
AIConfigWindow() : Window(&_ai_config_desc)
|
AIConfigWindow() : Window(_ai_config_desc)
|
||||||
{
|
{
|
||||||
this->InitNested(WN_GAME_OPTIONS_AI); // Initializes 'this->line_height' as a side effect.
|
this->InitNested(WN_GAME_OPTIONS_AI); // Initializes 'this->line_height' as a side effect.
|
||||||
this->vscroll = this->GetScrollbar(WID_AIC_SCROLLBAR);
|
this->vscroll = this->GetScrollbar(WID_AIC_SCROLLBAR);
|
||||||
@@ -128,20 +128,20 @@ struct AIConfigWindow : public Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case WID_AIC_DECREASE_NUMBER:
|
case WID_AIC_DECREASE_NUMBER:
|
||||||
case WID_AIC_INCREASE_NUMBER:
|
case WID_AIC_INCREASE_NUMBER:
|
||||||
case WID_AIC_DECREASE_INTERVAL:
|
case WID_AIC_DECREASE_INTERVAL:
|
||||||
case WID_AIC_INCREASE_INTERVAL:
|
case WID_AIC_INCREASE_INTERVAL:
|
||||||
*size = maxdim(*size, NWidgetScrollbar::GetHorizontalDimension());
|
size = maxdim(size, NWidgetScrollbar::GetHorizontalDimension());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_AIC_LIST:
|
case WID_AIC_LIST:
|
||||||
this->line_height = GetCharacterHeight(FS_NORMAL) + padding.height;
|
this->line_height = GetCharacterHeight(FS_NORMAL) + padding.height;
|
||||||
resize->height = this->line_height;
|
resize.height = this->line_height;
|
||||||
size->height = 8 * this->line_height;
|
size.height = 8 * this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
static bool CheckAPIVersion(const std::string &api_version)
|
static bool CheckAPIVersion(const std::string &api_version)
|
||||||
{
|
{
|
||||||
static const std::set<std::string> versions = { "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14" };
|
static const std::set<std::string> versions = { "0.7", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11", "12", "13", "14", "15" };
|
||||||
return versions.find(api_version) != versions.end();
|
return versions.find(api_version) != versions.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,6 +64,9 @@ void AIInstance::Died()
|
|||||||
/* Intro is not supposed to use AI, but it may have 'dummy' AI which instant dies. */
|
/* Intro is not supposed to use AI, but it may have 'dummy' AI which instant dies. */
|
||||||
if (_game_mode == GM_MENU) return;
|
if (_game_mode == GM_MENU) return;
|
||||||
|
|
||||||
|
/* Don't show errors while loading savegame. They will be shown at end of loading anyway. */
|
||||||
|
if (_switch_mode != SM_NONE) return;
|
||||||
|
|
||||||
ShowScriptDebugWindow(_current_company);
|
ShowScriptDebugWindow(_current_company);
|
||||||
|
|
||||||
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
||||||
|
@@ -17,12 +17,10 @@
|
|||||||
* Base values for flight levels above ground level for 'normal' flight and holding patterns.
|
* Base values for flight levels above ground level for 'normal' flight and holding patterns.
|
||||||
* Due to speed and direction, the actual flight level may be higher.
|
* Due to speed and direction, the actual flight level may be higher.
|
||||||
*/
|
*/
|
||||||
enum AircraftFlyingAltitude {
|
static constexpr int AIRCRAFT_MIN_FLYING_ALTITUDE = 120; ///< Minimum flying altitude above tile.
|
||||||
AIRCRAFT_MIN_FLYING_ALTITUDE = 120, ///< Minimum flying altitude above tile.
|
static constexpr int AIRCRAFT_MAX_FLYING_ALTITUDE = 360; ///< Maximum flying altitude above tile.
|
||||||
AIRCRAFT_MAX_FLYING_ALTITUDE = 360, ///< Maximum flying altitude above tile.
|
static constexpr int PLANE_HOLD_MAX_FLYING_ALTITUDE = 150; ///< holding flying altitude above tile of planes.
|
||||||
PLANE_HOLD_MAX_FLYING_ALTITUDE = 150, ///< holding flying altitude above tile of planes.
|
static constexpr int HELICOPTER_HOLD_MAX_FLYING_ALTITUDE = 184; ///< holding flying altitude above tile of helicopters.
|
||||||
HELICOPTER_HOLD_MAX_FLYING_ALTITUDE = 184 ///< holding flying altitude above tile of helicopters.
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Aircraft;
|
struct Aircraft;
|
||||||
|
|
||||||
@@ -73,14 +71,14 @@ struct AircraftCache {
|
|||||||
*/
|
*/
|
||||||
struct Aircraft final : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
|
struct Aircraft final : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
|
||||||
uint16_t crashed_counter; ///< Timer for handling crash animations.
|
uint16_t crashed_counter; ///< Timer for handling crash animations.
|
||||||
byte pos; ///< Next desired position of the aircraft.
|
uint8_t pos; ///< Next desired position of the aircraft.
|
||||||
byte previous_pos; ///< Previous desired position of the aircraft.
|
uint8_t previous_pos; ///< Previous desired position of the aircraft.
|
||||||
StationID targetairport; ///< Airport to go to next.
|
StationID targetairport; ///< Airport to go to next.
|
||||||
byte state; ///< State of the airport. @see AirportMovementStates
|
uint8_t state; ///< State of the airport. @see AirportMovementStates
|
||||||
Direction last_direction;
|
Direction last_direction;
|
||||||
byte number_consecutive_turns; ///< Protection to prevent the aircraft of making a lot of turns in order to reach a specific point.
|
uint8_t number_consecutive_turns; ///< Protection to prevent the aircraft of making a lot of turns in order to reach a specific point.
|
||||||
byte turn_counter; ///< Ticks between each turn to prevent > 45 degree turns.
|
uint8_t turn_counter; ///< Ticks between each turn to prevent > 45 degree turns.
|
||||||
byte flags; ///< Aircraft flags. @see AirVehicleFlags
|
uint8_t flags; ///< Aircraft flags. @see AirVehicleFlags
|
||||||
|
|
||||||
AircraftCache acache;
|
AircraftCache acache;
|
||||||
|
|
||||||
@@ -111,6 +109,7 @@ struct Aircraft final : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
|
|||||||
void OnNewEconomyDay() override;
|
void OnNewEconomyDay() override;
|
||||||
uint Crash(bool flooded = false) override;
|
uint Crash(bool flooded = false) override;
|
||||||
TileIndex GetOrderStationLocation(StationID station) override;
|
TileIndex GetOrderStationLocation(StationID station) override;
|
||||||
|
TileIndex GetCargoTile() const override { return this->First()->tile; }
|
||||||
ClosestDepot FindClosestDepot() override;
|
ClosestDepot FindClosestDepot() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -134,7 +134,7 @@ static StationID FindNearestHangar(const Aircraft *v)
|
|||||||
const Station *next_dest = nullptr;
|
const Station *next_dest = nullptr;
|
||||||
if (max_range != 0) {
|
if (max_range != 0) {
|
||||||
if (v->current_order.IsType(OT_GOTO_STATION) ||
|
if (v->current_order.IsType(OT_GOTO_STATION) ||
|
||||||
(v->current_order.IsType(OT_GOTO_DEPOT) && v->current_order.GetDepotActionType() != ODATFB_NEAREST_DEPOT)) {
|
(v->current_order.IsType(OT_GOTO_DEPOT) && (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) == 0)) {
|
||||||
last_dest = Station::GetIfValid(v->last_station_visited);
|
last_dest = Station::GetIfValid(v->last_station_visited);
|
||||||
next_dest = Station::GetIfValid(v->current_order.GetDestination());
|
next_dest = Station::GetIfValid(v->current_order.GetDestination());
|
||||||
} else {
|
} else {
|
||||||
@@ -456,6 +456,7 @@ void Aircraft::OnNewCalendarDay()
|
|||||||
void Aircraft::OnNewEconomyDay()
|
void Aircraft::OnNewEconomyDay()
|
||||||
{
|
{
|
||||||
if (!this->IsNormalAircraft()) return;
|
if (!this->IsNormalAircraft()) return;
|
||||||
|
EconomyAgeVehicle(this);
|
||||||
|
|
||||||
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
|
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
|
||||||
|
|
||||||
@@ -629,13 +630,11 @@ void UpdateAircraftCache(Aircraft *v, bool update_range)
|
|||||||
/**
|
/**
|
||||||
* Special velocities for aircraft
|
* Special velocities for aircraft
|
||||||
*/
|
*/
|
||||||
enum AircraftSpeedLimits {
|
static constexpr uint16_t SPEED_LIMIT_TAXI = 50; ///< Maximum speed of an aircraft while taxiing
|
||||||
SPEED_LIMIT_TAXI = 50, ///< Maximum speed of an aircraft while taxiing
|
static constexpr uint16_t SPEED_LIMIT_APPROACH = 230; ///< Maximum speed of an aircraft on finals
|
||||||
SPEED_LIMIT_APPROACH = 230, ///< Maximum speed of an aircraft on finals
|
static constexpr uint16_t SPEED_LIMIT_BROKEN = 320; ///< Maximum speed of an aircraft that is broken
|
||||||
SPEED_LIMIT_BROKEN = 320, ///< Maximum speed of an aircraft that is broken
|
static constexpr uint16_t SPEED_LIMIT_HOLD = 425; ///< Maximum speed of an aircraft that flies the holding pattern
|
||||||
SPEED_LIMIT_HOLD = 425, ///< Maximum speed of an aircraft that flies the holding pattern
|
static constexpr uint16_t SPEED_LIMIT_NONE = UINT16_MAX; ///< No environmental speed limit. Speed limit is type dependent
|
||||||
SPEED_LIMIT_NONE = 0xFFFF, ///< No environmental speed limit. Speed limit is type dependent
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the new speed for an aircraft
|
* Sets the new speed for an aircraft
|
||||||
@@ -654,7 +653,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
|
|||||||
* ~ acceleration * 77 (km-ish/h / 256)
|
* ~ acceleration * 77 (km-ish/h / 256)
|
||||||
*/
|
*/
|
||||||
uint spd = v->acceleration * 77;
|
uint spd = v->acceleration * 77;
|
||||||
byte t;
|
uint8_t t;
|
||||||
|
|
||||||
/* Adjust speed limits by plane speed factor to prevent taxiing
|
/* Adjust speed limits by plane speed factor to prevent taxiing
|
||||||
* and take-off speeds being too low. */
|
* and take-off speeds being too low. */
|
||||||
@@ -671,7 +670,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
|
|||||||
speed_limit = v->vcache.cached_max_speed;
|
speed_limit = v->vcache.cached_max_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
v->subspeed = (t = v->subspeed) + (byte)spd;
|
v->subspeed = (t = v->subspeed) + (uint8_t)spd;
|
||||||
|
|
||||||
/* Aircraft's current speed is used twice so that very fast planes are
|
/* Aircraft's current speed is used twice so that very fast planes are
|
||||||
* forced to slow down rapidly in the short distance needed. The magic
|
* forced to slow down rapidly in the short distance needed. The magic
|
||||||
@@ -698,7 +697,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
|
|||||||
spd = v->GetOldAdvanceSpeed(spd);
|
spd = v->GetOldAdvanceSpeed(spd);
|
||||||
|
|
||||||
spd += v->progress;
|
spd += v->progress;
|
||||||
v->progress = (byte)spd;
|
v->progress = (uint8_t)spd;
|
||||||
return spd >> 8;
|
return spd >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -824,7 +823,7 @@ template int GetAircraftFlightLevel(Aircraft *v, bool takeoff);
|
|||||||
* @param rotation The rotation of the airport.
|
* @param rotation The rotation of the airport.
|
||||||
* @return The index of the entry point
|
* @return The index of the entry point
|
||||||
*/
|
*/
|
||||||
static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc, Direction rotation)
|
static uint8_t AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc, Direction rotation)
|
||||||
{
|
{
|
||||||
assert(v != nullptr);
|
assert(v != nullptr);
|
||||||
assert(apc != nullptr);
|
assert(apc != nullptr);
|
||||||
@@ -1181,10 +1180,13 @@ static bool HandleCrashedAircraft(Aircraft *v)
|
|||||||
if (v->crashed_counter < 500 && st == nullptr && ((v->crashed_counter % 3) == 0) ) {
|
if (v->crashed_counter < 500 && st == nullptr && ((v->crashed_counter % 3) == 0) ) {
|
||||||
int z = GetSlopePixelZ(Clamp(v->x_pos, 0, Map::MaxX() * TILE_SIZE), Clamp(v->y_pos, 0, Map::MaxY() * TILE_SIZE));
|
int z = GetSlopePixelZ(Clamp(v->x_pos, 0, Map::MaxX() * TILE_SIZE), Clamp(v->y_pos, 0, Map::MaxY() * TILE_SIZE));
|
||||||
v->z_pos -= 1;
|
v->z_pos -= 1;
|
||||||
if (v->z_pos == z) {
|
if (v->z_pos <= z) {
|
||||||
v->crashed_counter = 500;
|
v->crashed_counter = 500;
|
||||||
v->z_pos++;
|
v->z_pos = z + 1;
|
||||||
|
} else {
|
||||||
|
v->crashed_counter = 0;
|
||||||
}
|
}
|
||||||
|
SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->crashed_counter < 650) {
|
if (v->crashed_counter < 650) {
|
||||||
@@ -1284,7 +1286,7 @@ void HandleMissingAircraftOrders(Aircraft *v)
|
|||||||
*/
|
*/
|
||||||
const Station *st = GetTargetAirportIfValid(v);
|
const Station *st = GetTargetAirportIfValid(v);
|
||||||
if (st == nullptr) {
|
if (st == nullptr) {
|
||||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||||
CommandCost ret = Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::None, {});
|
CommandCost ret = Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::None, {});
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
|
|
||||||
@@ -1318,10 +1320,10 @@ void Aircraft::MarkDirty()
|
|||||||
|
|
||||||
uint Aircraft::Crash(bool flooded)
|
uint Aircraft::Crash(bool flooded)
|
||||||
{
|
{
|
||||||
uint pass = Vehicle::Crash(flooded) + 2; // pilots
|
uint victims = Vehicle::Crash(flooded) + 2; // pilots
|
||||||
this->crashed_counter = flooded ? 9000 : 0; // max 10000, disappear pretty fast when flooded
|
this->crashed_counter = flooded ? 9000 : 0; // max 10000, disappear pretty fast when flooded
|
||||||
|
|
||||||
return pass;
|
return victims;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1332,8 +1334,8 @@ static void CrashAirplane(Aircraft *v)
|
|||||||
{
|
{
|
||||||
CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE);
|
CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE);
|
||||||
|
|
||||||
uint pass = v->Crash();
|
uint victims = v->Crash();
|
||||||
SetDParam(0, pass);
|
SetDParam(0, victims);
|
||||||
|
|
||||||
v->cargo.Truncate();
|
v->cargo.Truncate();
|
||||||
v->Next()->cargo.Truncate();
|
v->Next()->cargo.Truncate();
|
||||||
@@ -1347,8 +1349,8 @@ static void CrashAirplane(Aircraft *v)
|
|||||||
newsitem = STR_NEWS_AIRCRAFT_CRASH;
|
newsitem = STR_NEWS_AIRCRAFT_CRASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
|
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, victims));
|
||||||
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
|
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING, victims));
|
||||||
|
|
||||||
NewsType newstype = NT_ACCIDENT;
|
NewsType newstype = NT_ACCIDENT;
|
||||||
if (v->owner != _local_company) {
|
if (v->owner != _local_company) {
|
||||||
@@ -1650,7 +1652,7 @@ static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass
|
|||||||
|
|
||||||
/* Send the helicopter to a hangar if needed for replacement */
|
/* Send the helicopter to a hangar if needed for replacement */
|
||||||
if (v->NeedsAutomaticServicing()) {
|
if (v->NeedsAutomaticServicing()) {
|
||||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service | DepotCommand::LocateHangar, {});
|
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service | DepotCommand::LocateHangar, {});
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
}
|
}
|
||||||
@@ -1665,7 +1667,7 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc)
|
|||||||
/* {32,FLYING,NOTHING_block,37}, {32,LANDING,N,33}, {32,HELILANDING,N,41},
|
/* {32,FLYING,NOTHING_block,37}, {32,LANDING,N,33}, {32,HELILANDING,N,41},
|
||||||
* if it is an airplane, look for LANDING, for helicopter HELILANDING
|
* if it is an airplane, look for LANDING, for helicopter HELILANDING
|
||||||
* it is possible to choose from multiple landing runways, so loop until a free one is found */
|
* it is possible to choose from multiple landing runways, so loop until a free one is found */
|
||||||
byte landingtype = (v->subtype == AIR_HELICOPTER) ? HELILANDING : LANDING;
|
uint8_t landingtype = (v->subtype == AIR_HELICOPTER) ? HELILANDING : LANDING;
|
||||||
const AirportFTA *current = apc->layout[v->pos].next;
|
const AirportFTA *current = apc->layout[v->pos].next;
|
||||||
while (current != nullptr) {
|
while (current != nullptr) {
|
||||||
if (current->heading == landingtype) {
|
if (current->heading == landingtype) {
|
||||||
@@ -1701,7 +1703,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *)
|
|||||||
|
|
||||||
/* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
|
/* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
|
||||||
if (v->NeedsAutomaticServicing()) {
|
if (v->NeedsAutomaticServicing()) {
|
||||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service, {});
|
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service, {});
|
||||||
cur_company.Restore();
|
cur_company.Restore();
|
||||||
}
|
}
|
||||||
@@ -1812,8 +1814,8 @@ static bool AirportMove(Aircraft *v, const AirportFTAClass *apc)
|
|||||||
const AirportFTA *current = &apc->layout[v->pos];
|
const AirportFTA *current = &apc->layout[v->pos];
|
||||||
/* we have arrived in an important state (eg terminal, hangar, etc.) */
|
/* we have arrived in an important state (eg terminal, hangar, etc.) */
|
||||||
if (current->heading == v->state) {
|
if (current->heading == v->state) {
|
||||||
byte prev_pos = v->pos; // location could be changed in state, so save it before-hand
|
uint8_t prev_pos = v->pos; // location could be changed in state, so save it before-hand
|
||||||
byte prev_state = v->state;
|
uint8_t prev_state = v->state;
|
||||||
_aircraft_state_handlers[v->state](v, apc);
|
_aircraft_state_handlers[v->state](v, apc);
|
||||||
if (v->state != FLYING) v->previous_pos = prev_pos;
|
if (v->state != FLYING) v->previous_pos = prev_pos;
|
||||||
if (v->state != prev_state || v->pos != prev_pos) UpdateAircraftCache(v);
|
if (v->state != prev_state || v->pos != prev_pos) UpdateAircraftCache(v);
|
||||||
@@ -1949,7 +1951,7 @@ static const MovementTerminalMapping _airport_terminal_mapping[] = {
|
|||||||
* @param last_terminal Terminal number to stop examining.
|
* @param last_terminal Terminal number to stop examining.
|
||||||
* @return A terminal or helipad has been found, and has been assigned to the aircraft.
|
* @return A terminal or helipad has been found, and has been assigned to the aircraft.
|
||||||
*/
|
*/
|
||||||
static bool FreeTerminal(Aircraft *v, byte i, byte last_terminal)
|
static bool FreeTerminal(Aircraft *v, uint8_t i, uint8_t last_terminal)
|
||||||
{
|
{
|
||||||
assert(last_terminal <= lengthof(_airport_terminal_mapping));
|
assert(last_terminal <= lengthof(_airport_terminal_mapping));
|
||||||
Station *st = Station::Get(v->targetairport);
|
Station *st = Station::Get(v->targetairport);
|
||||||
|
@@ -97,6 +97,17 @@ void DrawAircraftImage(const Vehicle *v, const Rect &r, VehicleID selection, Eng
|
|||||||
|
|
||||||
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
||||||
seq.Draw(x, y, pal, (v->vehstatus & VS_CRASHED) != 0);
|
seq.Draw(x, y, pal, (v->vehstatus & VS_CRASHED) != 0);
|
||||||
|
|
||||||
|
/* Aircraft can store cargo in their shadow, show this if present. */
|
||||||
|
const Vehicle *u = v->Next();
|
||||||
|
assert(u != nullptr);
|
||||||
|
int dx = 0;
|
||||||
|
if (u->cargo_cap > 0 && u->cargo_type != v->cargo_type) {
|
||||||
|
dx = GetLargestCargoIconSize().width / 2;
|
||||||
|
DrawCargoIconOverlay(x + dx, y, u->cargo_type);
|
||||||
|
}
|
||||||
|
if (v->cargo_cap > 0) DrawCargoIconOverlay(x - dx, y, v->cargo_type);
|
||||||
|
|
||||||
if (helicopter) {
|
if (helicopter) {
|
||||||
const Aircraft *a = Aircraft::From(v);
|
const Aircraft *a = Aircraft::From(v);
|
||||||
VehicleSpriteSeq rotor_seq;
|
VehicleSpriteSeq rotor_seq;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user