Compare commits
700
Commits
refactorfbo
...
bluaopti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0016d4836a | ||
|
|
66bc684738 | ||
|
|
44e377c981 | ||
|
|
91de633633 | ||
|
|
f1047f9e76 | ||
|
|
864e28fcf7 | ||
|
|
b2b0ca17d3 | ||
|
|
513e5a7e3f | ||
|
|
6f75fab7ff | ||
|
|
38fc6d6ba1 | ||
|
|
02f2464a00 | ||
|
|
86b286fb0b | ||
|
|
ecef8913b1 | ||
|
|
277b202020 | ||
|
|
6ba97bc43c | ||
|
|
0fbde146a9 | ||
|
|
16e0c6f0f6 | ||
|
|
8cab07a4b2 | ||
|
|
55c8546d68 | ||
|
|
1762f18116 | ||
|
|
e4dbf1ce11 | ||
|
|
10b9d96259 | ||
|
|
b23154fd93 | ||
|
|
b0ee972178 | ||
|
|
544e1d3b21 | ||
|
|
0ca6947f99 | ||
|
|
3122c08039 | ||
|
|
7a279a6fd9 | ||
|
|
c4581bd9a6 | ||
|
|
bb47b976a7 | ||
|
|
6c419ff22e | ||
|
|
522904527f | ||
|
|
30539371c2 | ||
|
|
e2ecc315b4 | ||
|
|
eb2f186205 | ||
|
|
bbf06b3376 | ||
|
|
a1f70b0b31 | ||
|
|
2e0f5c02a4 | ||
|
|
0f7001ef5c | ||
|
|
4600da5782 | ||
|
|
a3557fadef | ||
|
|
d9a67faf47 | ||
|
|
96eaf8850e | ||
|
|
e7efd46419 | ||
|
|
346b1456cd | ||
|
|
9f5a5a735b | ||
|
|
8e4b304bed | ||
|
|
607fbc54fc | ||
|
|
276cf0a8cb | ||
|
|
59c9af97c2 | ||
|
|
4e75d99026 | ||
|
|
8e91c16e97 | ||
|
|
186421fe85 | ||
|
|
af952870c3 | ||
|
|
4eeb0b4b20 | ||
|
|
cb2c65e9d9 | ||
|
|
f7bbde3982 | ||
|
|
c9fc3b4820 | ||
|
|
f5195dd137 | ||
|
|
5289f13891 | ||
|
|
073b35690b | ||
|
|
43d3ac102d | ||
|
|
aa96f9ceb3 | ||
|
|
104b8260fb | ||
|
|
edebc728ef | ||
|
|
08e7ce3b5b | ||
|
|
29f187b751 | ||
|
|
ac3a1ad5eb | ||
|
|
1b8d7b1541 | ||
|
|
b812d61da2 | ||
|
|
6fd64383d3 | ||
|
|
e984e7a6c8 | ||
|
|
96f90ff9c4 | ||
|
|
51aec0e012 | ||
|
|
faadd3e89f | ||
|
|
0c091256f4 | ||
|
|
7a0fb01626 | ||
|
|
c01818e2e3 | ||
|
|
e17a8a505c | ||
|
|
ab654deba7 | ||
|
|
b145d7fd0e | ||
|
|
264c9e38ad | ||
|
|
e88773da4e | ||
|
|
310f67a06c | ||
|
|
0914d5b8e2 | ||
|
|
291a4dbb25 | ||
|
|
8fe3d13935 | ||
|
|
bdc326b14e | ||
|
|
d938e38ad3 | ||
|
|
3d4772455b | ||
|
|
e1f0089627 | ||
|
|
edbebbf082 | ||
|
|
242dee499d | ||
|
|
a2de1e24c5 | ||
|
|
c0cce90e60 | ||
|
|
67e74b5874 | ||
|
|
9639ace28a | ||
|
|
a2616778cc | ||
|
|
495c34dd40 | ||
|
|
f38ca9aa28 | ||
|
|
b0bf588c27 | ||
|
|
35e4f35f6e | ||
|
|
7866b769cc | ||
|
|
1af1e42dab | ||
|
|
40bd3e5e19 | ||
|
|
25dd3b4976 | ||
|
|
0fe3086a5a | ||
|
|
c9afd4a2cd | ||
|
|
7518a6f181 | ||
|
|
2bf4c44259 | ||
|
|
1c95e5f40e | ||
|
|
7c848f4be5 | ||
|
|
a4af254643 | ||
|
|
860dc37fe4 | ||
|
|
8b3d55fbc8 | ||
|
|
0540b5656a | ||
|
|
6c98440f27 | ||
|
|
3828a9f8e0 | ||
|
|
2c7c9ec32a | ||
|
|
1ccd3e37bc | ||
|
|
6ad344f65d | ||
|
|
1c289d73ca | ||
|
|
44ba69cf53 | ||
|
|
4cea0c1414 | ||
|
|
4ee468f5c6 | ||
|
|
9a58eb3010 | ||
|
|
59ff5e61bf | ||
|
|
821c061f82 | ||
|
|
9b879e31e2 | ||
|
|
eb4d9bbdd5 | ||
|
|
c19c80d797 | ||
|
|
a2feaa7fde | ||
|
|
3cb4e86b48 | ||
|
|
ed758fc921 | ||
|
|
a191c8b71e | ||
|
|
3f2e0bd349 | ||
|
|
3bdc745bd1 | ||
|
|
f578781418 | ||
|
|
0bb63ee0af | ||
|
|
2ae9563ab3 | ||
|
|
6b429e4388 | ||
|
|
0321b0d94a | ||
|
|
ac57b7fd2d | ||
|
|
7013e63142 | ||
|
|
4e1ef7c0cd | ||
|
|
892f2253ea | ||
|
|
bebe62346f | ||
|
|
834a94e429 | ||
|
|
fcf833ff48 | ||
|
|
f2a27539d3 | ||
|
|
05d26654df | ||
|
|
cee6a27340 | ||
|
|
66e35a9d67 | ||
|
|
ad096ccd42 | ||
|
|
7a9e81828a | ||
|
|
71e7dacb56 | ||
|
|
f9c0ee865f | ||
|
|
154eaaf027 | ||
|
|
66f5f9b2a2 | ||
|
|
8e5633a23f | ||
|
|
8bcada1fda | ||
|
|
771152b919 | ||
|
|
b4277c88c1 | ||
|
|
63026cc11d | ||
|
|
b8385d1579 | ||
|
|
916cc9d8ca | ||
|
|
347000a326 | ||
|
|
4967313720 | ||
|
|
19b64a8b61 | ||
|
|
6a7b2b9721 | ||
|
|
b27275b887 | ||
|
|
c81c2c1d8d | ||
|
|
ccfab57a8c | ||
|
|
56d1343f1b | ||
|
|
b273bc3ca8 | ||
|
|
d4f58a885b | ||
|
|
04458f18f8 | ||
|
|
64152eea0d | ||
|
|
0e0a690e3c | ||
|
|
f283d3ca43 | ||
|
|
982fff959f | ||
|
|
b0e968e3c3 | ||
|
|
e5bbb14ce0 | ||
|
|
327cca2e8e | ||
|
|
e02e9a12d7 | ||
|
|
9e2fd091a8 | ||
|
|
0a04fca634 | ||
|
|
8a3f793324 | ||
|
|
e91892849c | ||
|
|
6b4e3c9d13 | ||
|
|
5f55b81fbf | ||
|
|
ca68bab002 | ||
|
|
339eb1879e | ||
|
|
1adb49c65c | ||
|
|
1d33a05a85 | ||
|
|
cfcd20d44a | ||
|
|
204607e272 | ||
|
|
b89a8ca6f9 | ||
|
|
d4aa352d59 | ||
|
|
c489841732 | ||
|
|
a6a97b4c4f | ||
|
|
fba070f82e | ||
|
|
10c117f95f | ||
|
|
bceda5beb4 | ||
|
|
c50c936b1f | ||
|
|
22a6be76b5 | ||
|
|
d3d25df3c5 | ||
|
|
2a3f9e9ee6 | ||
|
|
31f01fd5da | ||
|
|
bb9a4a0da0 | ||
|
|
3bac722562 | ||
|
|
3769ab74ac | ||
|
|
c3d6cdd272 | ||
|
|
093602fd6b | ||
|
|
a80d119c58 | ||
|
|
1cdc92a62b | ||
|
|
6b8de308b7 | ||
|
|
310e64d8be | ||
|
|
d2d3afc7f4 | ||
|
|
c26d2faee9 | ||
|
|
1c82c338a5 | ||
|
|
c81cd48552 | ||
|
|
306f7d455e | ||
|
|
dc40befa88 | ||
|
|
2222272d6f | ||
|
|
1849d5aade | ||
|
|
3878c2f72a | ||
|
|
7cf3bceaff | ||
|
|
1e394b0530 | ||
|
|
b09660204a | ||
|
|
7b4592377e | ||
|
|
45ba69a45a | ||
|
|
4d9c345202 | ||
|
|
0437952027 | ||
|
|
d188839d0b | ||
|
|
86ac11f877 | ||
|
|
0f59e0e270 | ||
|
|
cd32270ec0 | ||
|
|
f2a7f9ccaa | ||
|
|
2c2ffe36d7 | ||
|
|
951b880acb | ||
|
|
ecfa973e6b | ||
|
|
749b87b4ca | ||
|
|
7f671e4e30 | ||
|
|
ee0e4836f5 | ||
|
|
a01cd628ab | ||
|
|
4a4e668d21 | ||
|
|
03c579769c | ||
|
|
2e88b6a1dd | ||
|
|
5265b147f5 | ||
|
|
b4a37a2fa4 | ||
|
|
93eb2b336d | ||
|
|
30acdca9d3 | ||
|
|
677b34c174 | ||
|
|
b3be7bcedc | ||
|
|
19c10be76b | ||
|
|
60222f2f00 | ||
|
|
34edd0a2e3 | ||
|
|
46b485df14 | ||
|
|
8d3632caca | ||
|
|
b5ae9ba733 | ||
|
|
2a823ecd60 | ||
|
|
940327210f | ||
|
|
20a08df1e1 | ||
|
|
4cf27d40e9 | ||
|
|
d18c9a257a | ||
|
|
65dc5bb1fd | ||
|
|
e18be33c91 | ||
|
|
9ad6751719 | ||
|
|
86ab994408 | ||
|
|
21f0d603c3 | ||
|
|
971513e7d3 | ||
|
|
03929e551f | ||
|
|
db5ae247b6 | ||
|
|
d46beab34e | ||
|
|
9a794232d7 | ||
|
|
db635e5c5b | ||
|
|
8a105a9679 | ||
|
|
46b968a351 | ||
|
|
a9836307b2 | ||
|
|
b6515bb0ae | ||
|
|
b8257e9037 | ||
|
|
416a2565f9 | ||
|
|
fa75ad4cdd | ||
|
|
cedddaadfc | ||
|
|
43ec517cdd | ||
|
|
495ad5ce06 | ||
|
|
31ce643311 | ||
|
|
b5c1f21ac1 | ||
|
|
86c1b2cbef | ||
|
|
ad828b8f4b | ||
|
|
5dda681c8a | ||
|
|
92df8ffe01 | ||
|
|
2ee8dc09d1 | ||
|
|
b8f9392efd | ||
|
|
99f1166eb1 | ||
|
|
7ab8bf1bbf | ||
|
|
a994d7c050 | ||
|
|
e46d548080 | ||
|
|
3a7108ecfa | ||
|
|
bcf876a4c4 | ||
|
|
8ab15b73a9 | ||
|
|
301d73a30e | ||
|
|
2ef4e7fcba | ||
|
|
7eb118920f | ||
|
|
2f0588355e | ||
|
|
3e6830fc70 | ||
|
|
2faf859e32 | ||
|
|
8c31fd8a34 | ||
|
|
4dd6d52550 | ||
|
|
8524465767 | ||
|
|
91530c61ad | ||
|
|
89f450db27 | ||
|
|
3e212ebaad | ||
|
|
14af9eb82a | ||
|
|
ed5dbf74f4 | ||
|
|
2bf0a24ab6 | ||
|
|
88a9d6c29e | ||
|
|
335b7ba737 | ||
|
|
37cd720dd6 | ||
|
|
a085abe538 | ||
|
|
57dc099641 | ||
|
|
84a3503262 | ||
|
|
5117bf1f85 | ||
|
|
d4a29f2a44 | ||
|
|
6129e7c864 | ||
|
|
51371dce80 | ||
|
|
4814088265 | ||
|
|
2344c391d2 | ||
|
|
105267612b | ||
|
|
69ef78b2e8 | ||
|
|
f4349988c4 | ||
|
|
1b42131c6f | ||
|
|
c8db86379d | ||
|
|
40d2bf816c | ||
|
|
ca3f40ddf1 | ||
|
|
38bfb58f78 | ||
|
|
1fa50e12a8 | ||
|
|
f73e616b97 | ||
|
|
fe0ade1d9c | ||
|
|
1fb60e8230 | ||
|
|
efe7009650 | ||
|
|
19a4e379d7 | ||
|
|
4e8865d495 | ||
|
|
dfca24b370 | ||
|
|
a4c2fd2414 | ||
|
|
aa985823ba | ||
|
|
b779c9e63d | ||
|
|
c58e54544d | ||
|
|
c080fc8732 | ||
|
|
24163a7c92 | ||
|
|
d934197246 | ||
|
|
76747b4677 | ||
|
|
5268fc2d19 | ||
|
|
bcd54110d5 | ||
|
|
83d538b16a | ||
|
|
2a6a7e1d2b | ||
|
|
c977c4fc45 | ||
|
|
87e0b55f01 | ||
|
|
54f5b5ebfb | ||
|
|
b421893646 | ||
|
|
237aeb7834 | ||
|
|
7dbd95d556 | ||
|
|
1e4ba39691 | ||
|
|
a7805ae3f0 | ||
|
|
325338bfbf | ||
|
|
01a54e4d0b | ||
|
|
e2df018e38 | ||
|
|
33b62cba33 | ||
|
|
29b4f78b64 | ||
|
|
bce18e3d61 | ||
|
|
e9c2b982c6 | ||
|
|
67e1793f49 | ||
|
|
80613a8a49 | ||
|
|
b017a72026 | ||
|
|
a7c5254a32 | ||
|
|
9dd1a47969 | ||
|
|
bbbd42e653 | ||
|
|
2b7f2da5ee | ||
|
|
23ba827726 | ||
|
|
326a28ec36 | ||
|
|
19d6a1600e | ||
|
|
3095303a4b | ||
|
|
2a1807422c | ||
|
|
4676885521 | ||
|
|
30cea37248 | ||
|
|
080d3c6b18 | ||
|
|
df10855483 | ||
|
|
dc6bf05f35 | ||
|
|
871545024d | ||
|
|
aeb172f2ab | ||
|
|
ec757ceb2c | ||
|
|
e00783da82 | ||
|
|
52a9486974 | ||
|
|
26b26b8f25 | ||
|
|
81f7335b05 | ||
|
|
f603106ac8 | ||
|
|
5675eefeb2 | ||
|
|
1d0fb17da4 | ||
|
|
f53d37052a | ||
|
|
cae5e73d7d | ||
|
|
4fccb48d2a | ||
|
|
3e0150d4f3 | ||
|
|
7c1f17bb8d | ||
|
|
c8ae4a89d9 | ||
|
|
42b1f849c0 | ||
|
|
c0f24ebbbc | ||
|
|
de73c53665 | ||
|
|
908e073628 | ||
|
|
eaee95a026 | ||
|
|
456a380e3a | ||
|
|
c428472c6f | ||
|
|
feff5a7c17 | ||
|
|
ae306351ba | ||
|
|
03de30df3e | ||
|
|
e45c72f525 | ||
|
|
36c43d89e6 | ||
|
|
f34a47c50d | ||
|
|
24895874ed | ||
|
|
129f88b6a7 | ||
|
|
cb5c4e482e | ||
|
|
db2062ed1d | ||
|
|
45ee50b47d | ||
|
|
694a8eeb69 | ||
|
|
908bba2c8a | ||
|
|
7325c8dbfd | ||
|
|
88363cf45d | ||
|
|
e5c18ae1f1 | ||
|
|
4bb5b8fa04 | ||
|
|
509e7140e3 | ||
|
|
056f919bbe | ||
|
|
548cad76b2 | ||
|
|
95d8864faa | ||
|
|
e26fb91350 | ||
|
|
da67f6feb8 | ||
|
|
8cc73bc482 | ||
|
|
28685ea658 | ||
|
|
a69df8807d | ||
|
|
d4a130f1dc | ||
|
|
8ccf4eb9ba | ||
|
|
cdb7b6fede | ||
|
|
fcae072625 | ||
|
|
26fc417555 | ||
|
|
bb3dd435f0 | ||
|
|
16a531272f | ||
|
|
ba5b79e48a | ||
|
|
59470ddbd4 | ||
|
|
82c4191516 | ||
|
|
8a305d3c79 | ||
|
|
7c507c7b3b | ||
|
|
ca27dad6c1 | ||
|
|
383d55cac6 | ||
|
|
0e2ffdeb1d | ||
|
|
b84d101337 | ||
|
|
eb04271c83 | ||
|
|
852aa74d62 | ||
|
|
aa06459c09 | ||
|
|
54e7ad571e | ||
|
|
1d3dae01e9 | ||
|
|
736a626ccf | ||
|
|
a4cc8b0585 | ||
|
|
333c94be52 | ||
|
|
92ec4e65c1 | ||
|
|
a3e97b90f6 | ||
|
|
c07502bf5a | ||
|
|
f751161693 | ||
|
|
ed16c4fd9f | ||
|
|
41407538d4 | ||
|
|
5f394cd938 | ||
|
|
e5bae89d0f | ||
|
|
f749800276 | ||
|
|
5289027272 | ||
|
|
77f4d4ef3b | ||
|
|
a94740f5e9 | ||
|
|
ab27090ecf | ||
|
|
93d0106c28 | ||
|
|
27433f6fb5 | ||
|
|
f8e5049d76 | ||
|
|
2009cdeaeb | ||
|
|
0f43f19b71 | ||
|
|
1ac7852bd2 | ||
|
|
f5e7b65ae0 | ||
|
|
4c5d34e82c | ||
|
|
0dad927c05 | ||
|
|
f231417465 | ||
|
|
51b8dc9101 | ||
|
|
71e9c4f5af | ||
|
|
1acae3e4af | ||
|
|
4c04d09d18 | ||
|
|
b99cd88947 | ||
|
|
4a786449c4 | ||
|
|
aef6dcdbc9 | ||
|
|
0e9ec096c2 | ||
|
|
50ce3c4431 | ||
|
|
c6c1dbd066 | ||
|
|
ece8d9e80c | ||
|
|
fdcbd276e9 | ||
|
|
6d77672ee3 | ||
|
|
28aec6cad5 | ||
|
|
1f028f523e | ||
|
|
349bf06e4b | ||
|
|
e044db73f5 | ||
|
|
7555d689db | ||
|
|
a6438da531 | ||
|
|
8c6893cff6 | ||
|
|
af03b51191 | ||
|
|
178d8b7b53 | ||
|
|
de99a3036d | ||
|
|
5c613f6c8f | ||
|
|
59628377fa | ||
|
|
278f3c3ef6 | ||
|
|
3ba1596976 | ||
|
|
02f6fa0665 | ||
|
|
f4aec1d591 | ||
|
|
5c2a87dea6 | ||
|
|
6f17ed0883 | ||
|
|
d5aa9ae0f1 | ||
|
|
6096822cbb | ||
|
|
0030367649 | ||
|
|
66f67c91e8 | ||
|
|
c73c1af2d5 | ||
|
|
638e95325a | ||
|
|
66ce745e91 | ||
|
|
2b39d137b4 | ||
|
|
1ed616dcef | ||
|
|
24ef2819b0 | ||
|
|
a9732e9564 | ||
|
|
c262d3f532 | ||
|
|
ae456fee31 | ||
|
|
68f69049d4 | ||
|
|
e180918e48 | ||
|
|
951c090b35 | ||
|
|
a87e07155a | ||
|
|
da16ce3a23 | ||
|
|
64bdae5e5d | ||
|
|
4f91a0b234 | ||
|
|
bb0a59540f | ||
|
|
dd9d6de0d6 | ||
|
|
3de4c7cbad | ||
|
|
0eeacaf51e | ||
|
|
a4684b3004 | ||
|
|
9c014eb2ea | ||
|
|
37579187cc | ||
|
|
af8ce028ba | ||
|
|
9310a68cff | ||
|
|
89b8121282 | ||
|
|
b2260bbebb | ||
|
|
6a9aea4dd1 | ||
|
|
6f4dfb35fa | ||
|
|
459b2e62ce | ||
|
|
5765f3df5a | ||
|
|
8488da4b1a | ||
|
|
c82495f48b | ||
|
|
f55b8793ec | ||
|
|
b0b048c703 | ||
|
|
b7f1a0b631 | ||
|
|
02d6fccfa9 | ||
|
|
513613d83b | ||
|
|
f2afc5135c | ||
|
|
3783e30a8a | ||
|
|
ff80a34627 | ||
|
|
38c96d5ec2 | ||
|
|
2ec467f062 | ||
|
|
b3106d55d1 | ||
|
|
90c3d02dbf | ||
|
|
48dc5461cd | ||
|
|
0843a586f8 | ||
|
|
8c8f96cf49 | ||
|
|
55afe9be7e | ||
|
|
fe54f2fba2 | ||
|
|
b12989f51c | ||
|
|
57990100c5 | ||
|
|
32504b9e8e | ||
|
|
ba3404d823 | ||
|
|
c9f50ca0c8 | ||
|
|
b6943ce92e | ||
|
|
41b78feef5 | ||
|
|
c9b6276a02 | ||
|
|
39a5165d91 | ||
|
|
e5a03dc3bb | ||
|
|
4deebf8912 | ||
|
|
fa8901f6b0 | ||
|
|
23512f0a6c | ||
|
|
b44548b7ac | ||
|
|
955812bd8d | ||
|
|
e4ac394d29 | ||
|
|
2b6185d7d6 | ||
|
|
2753052ee7 | ||
|
|
3c9292c137 | ||
|
|
e68136de3e | ||
|
|
e852c23441 | ||
|
|
031e8ee477 | ||
|
|
d7422b8ec9 | ||
|
|
0bbd8246cc | ||
|
|
9e8ddd5f9e | ||
|
|
3964d4e188 | ||
|
|
005af4362e | ||
|
|
f817676033 | ||
|
|
79140b3bdc | ||
|
|
48722ef591 | ||
|
|
6be5478fa8 | ||
|
|
953d9d15d6 | ||
|
|
0c56755e09 | ||
|
|
c166075754 | ||
|
|
90ff1c4fc0 | ||
|
|
1d0fedddfd | ||
|
|
f5b60c3f36 | ||
|
|
78ad3e9710 | ||
|
|
b03d5c53ed | ||
|
|
c5dce0e785 | ||
|
|
f85c7ef961 | ||
|
|
0ceaca4b2f | ||
|
|
4d211f8f82 | ||
|
|
8d3435291b | ||
|
|
8f007155cd | ||
|
|
af9fa77501 | ||
|
|
58a38ac6c4 | ||
|
|
1e1dbfc450 | ||
|
|
2eac9fc295 | ||
|
|
21920112ee | ||
|
|
9b7bf5e7d8 | ||
|
|
4416be2ddc | ||
|
|
524168b20b | ||
|
|
10b52c11ac | ||
|
|
db732bd1bd | ||
|
|
146d4da72c | ||
|
|
20c570c97c | ||
|
|
e550edb93e | ||
|
|
fac4d3c2c0 | ||
|
|
7d2bcbd1ee | ||
|
|
f3bbb5af56 | ||
|
|
8e8ef04860 | ||
|
|
98b105c02a | ||
|
|
ccdb73f861 | ||
|
|
9cb150b8eb | ||
|
|
e6af82f450 | ||
|
|
7400eeac2a | ||
|
|
2656a87e46 | ||
|
|
202e24c69c | ||
|
|
c7d78fe948 | ||
|
|
f381239825 | ||
|
|
394beb7533 | ||
|
|
2ea1ac9331 | ||
|
|
34f8181e56 | ||
|
|
ab13b28106 | ||
|
|
7e5019bd36 | ||
|
|
423ca0eca0 | ||
|
|
939354f483 | ||
|
|
418ee2ce5f | ||
|
|
934184a006 | ||
|
|
e94ef8d9c3 | ||
|
|
ba985248ea | ||
|
|
65bd06aae5 | ||
|
|
2434acf825 | ||
|
|
b85a718500 | ||
|
|
a0e023527c | ||
|
|
a6dce95eca | ||
|
|
f05ac73df6 | ||
|
|
c90fe4627b | ||
|
|
0efedae2c3 | ||
|
|
a6d6c03a58 | ||
|
|
2d5664b54a | ||
|
|
a25b3f6e59 | ||
|
|
9edcbe22f4 | ||
|
|
8f4385c39b | ||
|
|
e383b0885d | ||
|
|
adcd62ed59 | ||
|
|
7cdf69c6a1 | ||
|
|
ee12d25a8f | ||
|
|
881c9f8e43 | ||
|
|
b1ac9f94cd | ||
|
|
9ab4d01b8c | ||
|
|
7378ca8479 | ||
|
|
a87a7ccbda | ||
|
|
4a5449905b | ||
|
|
3c8bdd7862 | ||
|
|
9b26f1fdcb | ||
|
|
76560f4179 | ||
|
|
f48fdda3f3 | ||
|
|
2c73593fcd | ||
|
|
4613ec48b3 | ||
|
|
3269b62225 | ||
|
|
7e8f6d759c | ||
|
|
75cfd382f6 | ||
|
|
e524d3edab | ||
|
|
8c9fb9f146 | ||
|
|
ff2fc6170d | ||
|
|
f27cb0ba8f | ||
|
|
58705fb184 | ||
|
|
487b71f82c | ||
|
|
2b1b4544f9 | ||
|
|
af1507b530 | ||
|
|
a193604d0f | ||
|
|
e359c8dcd0 | ||
|
|
f0d2685a60 | ||
|
|
f3de6c15eb | ||
|
|
53cea0a835 | ||
|
|
4b4d038ac8 | ||
|
|
9ba305eb77 | ||
|
|
2049353647 |
No files matched your search
@@ -1,73 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: /root/SRB2
|
||||
docker:
|
||||
- image: debian:stretch
|
||||
environment:
|
||||
CC: ccache gcc -m32
|
||||
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
LIBGME_CFLAGS: -I/usr/include
|
||||
LIBGME_LDFLAGS: -lgme
|
||||
CCACHE_COMPRESS: true
|
||||
WFLAGS: -Wno-unsuffixed-float-constants
|
||||
GCC49: true
|
||||
#- image: ubuntu:trusty
|
||||
# environment:
|
||||
# CC: ccache gcc -m32
|
||||
# PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
# LIBGME_CFLAGS: -I/usr/include
|
||||
# LIBGME_LDFLAGS: -lgme
|
||||
# CCACHE_COMPRESS: true
|
||||
# WFLAGS: -Wno-unsuffixed-float-constants
|
||||
# GCC48: true
|
||||
steps:
|
||||
- run:
|
||||
name: Add i386 arch
|
||||
command: dpkg --add-architecture i386
|
||||
- run:
|
||||
name: Add STJr PPA
|
||||
command: |
|
||||
apt-get -qq update
|
||||
apt-get -qq -y install dirmngr
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6
|
||||
echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" >> /etc/apt/sources.list
|
||||
- run:
|
||||
name: Update APT listing
|
||||
command: apt-get -qq update
|
||||
- run:
|
||||
name: Support S3 upload
|
||||
command: apt-get -qq -y install ca-certificates
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-SRB2-APT
|
||||
- run:
|
||||
name: Install SDK
|
||||
command: apt-get -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
|
||||
- save_cache:
|
||||
key: v1-SRB2-APT
|
||||
paths:
|
||||
- /var/cache/apt/archives
|
||||
- checkout
|
||||
#- run:
|
||||
# name: Compile without network support and BLUA
|
||||
# command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
||||
#- run:
|
||||
# name: wipe build
|
||||
# command: make -C src LINUX=1 cleandep
|
||||
- run:
|
||||
name: rebuild depend
|
||||
command: make -C src LINUX=1 clean
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
|
||||
- run:
|
||||
name: Compile
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k
|
||||
- store_artifacts:
|
||||
path: /root/SRB2/bin/Linux/Release/
|
||||
destination: bin
|
||||
- save_cache:
|
||||
key: v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
|
||||
paths:
|
||||
- /root/.ccache
|
||||
-436
@@ -1,436 +0,0 @@
|
||||
default:
|
||||
image: debian:stable-slim
|
||||
|
||||
stages: # List of stages for jobs, and their order of execution
|
||||
- build
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
|
||||
|
||||
.job_template: &job_build # This job runs in the build stage, which runs first.
|
||||
|
||||
stage: build
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG
|
||||
fallback_keys:
|
||||
- cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH
|
||||
- cache-$CI_PROJECT_PATH_SLUG-default
|
||||
paths:
|
||||
- ccache
|
||||
- ccache_statslog
|
||||
|
||||
- key: apt-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apt-cache
|
||||
unprotect: true
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment"
|
||||
- export DEBIAN_FRONTEND="noninteractive"
|
||||
- export DEBIAN_PRIORITY="low"
|
||||
- export DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||
- |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K"
|
||||
- - |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg"
|
||||
- dpkg --add-architecture i386
|
||||
- dpkg --add-architecture amd64
|
||||
- dpkg --add-architecture arm64
|
||||
- |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K"
|
||||
- - |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf"
|
||||
- export APT_CACHE_DIR=`pwd`/apt-cache
|
||||
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
|
||||
- touch /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt.conf
|
||||
echo Adding options to apt.conf':'
|
||||
- |
|
||||
# APT::Install-Recommends
|
||||
echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# quit
|
||||
echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# APT::Get::Assume-Yes
|
||||
echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# Dir::Cache::Archives
|
||||
echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K"
|
||||
- - |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing"
|
||||
- apt-get update
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages"
|
||||
- apt-get install apt-utils
|
||||
- |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apt-get upgrade
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apt-get install make git ccache
|
||||
- |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
||||
- apt-get autoclean
|
||||
- |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
|
||||
Debian testing GCC:
|
||||
<<: *job_build
|
||||
image: debian:testing-slim
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian GCC testing"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||
|
||||
variables:
|
||||
CC: gcc
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x86:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||
|
||||
variables:
|
||||
PREFIX: i686-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-i686-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:amd64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
|
||||
|
||||
variables:
|
||||
CC: x86_64-linux-gnu-gcc
|
||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||
OBJDUMP: x86_64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:i386:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian i386"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
|
||||
|
||||
variables:
|
||||
CC: i686-linux-gnu-gcc
|
||||
OBJCOPY: i686-linux-gnu-objcopy
|
||||
OBJDUMP: i686-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-i686-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:arm64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64"
|
||||
|
||||
variables:
|
||||
CC: aarch64-linux-gnu-gcc
|
||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||
OBJDUMP: aarch64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
||||
|
||||
variables:
|
||||
PREFIX: x86_64-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-x86-64-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable Clang:
|
||||
<<: *job_build
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian Clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install clang
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian testing Clang:
|
||||
extends: Debian stable Clang
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debina Clang testing"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
|
||||
-712
@@ -1,712 +0,0 @@
|
||||
# Travis-CI Config
|
||||
#
|
||||
# You may use the Deployer to upload packages and builds to external servers.
|
||||
# See deployer/travis/deployer_defaults.sh for environment variables to configure.
|
||||
|
||||
language: c
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
include:
|
||||
################################
|
||||
# Test Buildbots
|
||||
# Deployer does not operate on these. See Deployer Buildbots, below.
|
||||
# These bots are disabled when a deployment is triggered by 'deployer' branch name AND DPL_TERMINATE_TESTS=1.
|
||||
# These bots remain enabled when a deployment is triggered by release tag.
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.4
|
||||
compiler: gcc-4.4
|
||||
env: GCC44=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.6
|
||||
compiler: gcc-4.6
|
||||
env: GCC46=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.7
|
||||
compiler: gcc-4.7
|
||||
env: GCC47=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.7
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: GCC48=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
env: GCC48=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-7
|
||||
compiler: gcc-7
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough" GCC72=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-8
|
||||
compiler: gcc-8
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow -Wno-error=format-truncation" GCC81=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
||||
- os: linux
|
||||
compiler: clang
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.5.0 (tags/RELEASE_350/final)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.5
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.5
|
||||
compiler: clang-3.5
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.6
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.6
|
||||
compiler: clang-3.6
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.6.2-svn240577-1~exp1 (branches/release_36) (based on LLVM 3.6.2)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.7
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.7
|
||||
compiler: clang-3.7
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.7.1-svn253571-1~exp1 (branches/release_37) (based on LLVM 3.7.1)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.8
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.8
|
||||
compiler: clang-3.8
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.9
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.9
|
||||
compiler: clang-3.9
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.9.X
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-precise-4.0
|
||||
# - ubuntu-toolchain-r-test
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - clang-4.0
|
||||
# compiler: clang-4.0
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #clang version 4.0.X
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-precise-5.0
|
||||
# - ubuntu-toolchain-r-test
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - clang-5.0
|
||||
# compiler: clang-5.0
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #clang version 5.0.X
|
||||
# - os: osx
|
||||
# osx_image: beta-xcode6.1
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
|
||||
# - os: osx
|
||||
# osx_image: beta-xcode6.2
|
||||
# compiler: gcc
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
|
||||
## - os: osx
|
||||
## osx_image: beta-xcode6.3
|
||||
## if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
## #I think xcode.6.3 VM is broken, it does not boot
|
||||
# - os: osx
|
||||
# osx_image: xcode6.4
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
|
||||
# - os: osx
|
||||
# osx_image: xcode7
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.0 (clang-700.0.72)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.1
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.0 (clang-700.1.76)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.2
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.2 (clang-700.1.81)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.3
|
||||
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.3
|
||||
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
- os: osx
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Default: macOS 10.13 and Xcode 9.4.1
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - OSX
|
||||
################################
|
||||
- os: osx
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=osx
|
||||
- _DPL_FTP_TARGET=1
|
||||
- _DPL_PACKAGE_BINARY=1
|
||||
#Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - Linux assets
|
||||
# Set DPL_TERMINATE_ASSETS to disable all of these
|
||||
# List Ubuntu LTS next, newest to oldest
|
||||
# Then list non-LTS, newest to oldest
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=bionic-asset
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- _DPL_PACKAGE_MAIN=0
|
||||
- _DPL_PACKAGE_ASSET=1
|
||||
- PACKAGE_DISTRO=bionic
|
||||
#- PACKAGE_SUBVERSION=~18.04bionic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
|
||||
################################
|
||||
# The below asset bots produce packages that occupy too much space.
|
||||
# It would be nice if the asset files were not included in the source package itself,
|
||||
# so these can deploy to each Ubuntu target without manual intervention.
|
||||
#
|
||||
# Currently, to get around Launchpad's space limitation,
|
||||
# copy the packages from *one* bot and the space usage is not increased.
|
||||
################################
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: trusty
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=trusty-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=trusty
|
||||
# #- PACKAGE_SUBVERSION=~14.04trusty
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=disco-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=disco
|
||||
# #- PACKAGE_SUBVERSION=~19.04disco
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=cosmic-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=cosmic
|
||||
# #- PACKAGE_SUBVERSION=~18.10cosmic
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=xenial-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=xenial
|
||||
# #- PACKAGE_SUBVERSION=~16.04xenial
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - Linux binaries
|
||||
# List Ubuntu LTS, newest to oldest
|
||||
# Then list non-LTS, newest to oldest
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=focal
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=focal
|
||||
- PACKAGE_SUBVERSION=~20.04focal
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=bionic
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=bionic
|
||||
- PACKAGE_SUBVERSION=~18.04bionic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=xenial
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=xenial
|
||||
- PACKAGE_SUBVERSION=~16.04xenial
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: trusty
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=trusty
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=trusty
|
||||
- PACKAGE_SUBVERSION=~14.04trusty
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=eoan
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=eoan
|
||||
- PACKAGE_SUBVERSION=~19.10eoan
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
allow_failures:
|
||||
- compiler: clang-3.5
|
||||
- compiler: clang-3.6
|
||||
- compiler: clang-3.7
|
||||
- compiler: clang-3.8
|
||||
- compiler: clang-3.9
|
||||
- compiler: clang-4.0
|
||||
- compiler: clang-5.0
|
||||
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
ccache: true
|
||||
directories:
|
||||
- $HOME/srb2_cache
|
||||
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- zlib1g-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
homebrew:
|
||||
taps:
|
||||
- mazmazz/srb2
|
||||
packages:
|
||||
- sdl2_mixer
|
||||
- game-music-emu
|
||||
- p7zip
|
||||
- cmake
|
||||
- curl
|
||||
update: true
|
||||
|
||||
|
||||
|
||||
before_install:
|
||||
# Initialize Deployer defaults
|
||||
- . ./deployer/travis/deployer_defaults.sh
|
||||
|
||||
# Initialize Deployer; check if Deployer is enabled
|
||||
# This needs to be run in the current shell so that $__DPL_ACTIVE is set for this session
|
||||
- . ./deployer/travis/deployer.sh
|
||||
|
||||
# Also check if we should now terminate -- see `deployer.sh` for conditions.
|
||||
# This should never happen on non-release buildbots when Deployer is not triggered.
|
||||
- if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]]; then
|
||||
if [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Exiting early because this job is not deploying.";
|
||||
exit;
|
||||
fi;
|
||||
fi
|
||||
|
||||
# If we're triggered by release tag, force ASSET_FILES_OPTIONAL_GET=1
|
||||
- if [[ "$__DPL_TAG_ELIGIBLE" = "1" ]]; then
|
||||
ASSET_FILES_OPTIONAL_GET=1;
|
||||
fi;
|
||||
|
||||
|
||||
install:
|
||||
# Install OS X library dependencies via Homebrew
|
||||
# Do this differently for release buildbots:
|
||||
# * `brew install --build-bottle` builds libraries for x86_64's lowest common denominator CPU, core2
|
||||
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
|
||||
# * `brew postinstall` runs post-install scripts after building a bottle
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
brew install --build-bottle sdl2 game-music-emu;
|
||||
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
|
||||
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
|
||||
fi;
|
||||
fi
|
||||
- mkdir -p $HOME/srb2_cache
|
||||
|
||||
|
||||
before_script:
|
||||
# OLDPWD is root repo folder
|
||||
- OLDPWD=$PWD
|
||||
- __ASSET_DIRECTORY="$OLDPWD/assets/installer"
|
||||
- mkdir -p "$__ASSET_DIRECTORY"
|
||||
- cd "$HOME/srb2_cache"
|
||||
|
||||
# Get stat command so we know what the cached archive date is.
|
||||
# stat is different for OSX
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
STATCMD="stat -f %m";
|
||||
else
|
||||
STATCMD="stat -c %y";
|
||||
fi
|
||||
|
||||
# Get asset files (required for MD5)
|
||||
# See `deployer_defaults.sh` for asset download path
|
||||
- if [[ "$ASSET_ARCHIVE_PATH" != "" ]]; then
|
||||
if [ -f "$(basename $ASSET_ARCHIVE_PATH)" ]; then
|
||||
echo "$(basename $ASSET_ARCHIVE_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_PATH))";
|
||||
fi;
|
||||
wget --verbose --server-response -N "$ASSET_ARCHIVE_PATH";
|
||||
7z x "$(basename $ASSET_ARCHIVE_PATH)" -o"$__ASSET_DIRECTORY" -aos;
|
||||
fi;
|
||||
|
||||
# Get optional files too
|
||||
- if [[ "$__DPL_ACTIVE" == "1" ]] && [[ "$ASSET_FILES_OPTIONAL_GET" == "1" ]] && [[ "$ASSET_ARCHIVE_OPTIONAL_PATH" != "" ]]; then
|
||||
if [ -f "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" ]; then
|
||||
echo "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_OPTIONAL_PATH))";
|
||||
fi;
|
||||
wget --verbose --server-response -N "$ASSET_ARCHIVE_OPTIONAL_PATH";
|
||||
7z x "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" -o"$__ASSET_DIRECTORY" -aos;
|
||||
fi;
|
||||
|
||||
# Go back to root repo folder
|
||||
- cd "$OLDPWD"
|
||||
|
||||
# Prepare CMake asset lists
|
||||
- SRB2_ASSET_HASHED=$(echo ${ASSET_FILES_HASHED// /\;})
|
||||
- SRB2_ASSET_DOCS=$(echo ${ASSET_FILES_DOCS// /\;})
|
||||
- SRB2_ASSET_DIRECTORY="$__ASSET_DIRECTORY"
|
||||
|
||||
# Prepare CMake
|
||||
- mkdir build
|
||||
- cd build
|
||||
- mkdir package
|
||||
- export CFLAGS="-Wall -W -Werror $WFLAGS"
|
||||
- export CCACHE_COMPRESS=true
|
||||
# If OS X, set -march=core2 to build compatible binaries with old Macs
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
export CFLAGS="${CFLAGS} -march=core2";
|
||||
fi;
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/bin -DCPACK_PACKAGE_DIRECTORY=$PWD/package
|
||||
-DSRB2_ASSET_HASHED="${SRB2_ASSET_HASHED}" -DSRB2_ASSET_DOCS="${SRB2_ASSET_DOCS}"
|
||||
-DSRB2_ASSET_DIRECTORY="${SRB2_ASSET_DIRECTORY}"
|
||||
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY="${PROGRAM_NAME}"
|
||||
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
||||
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
||||
|
||||
script:
|
||||
# Build our Makefile from Cmake!
|
||||
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
. ../deployer/travis/deployer_build.sh;
|
||||
else
|
||||
make -k;
|
||||
fi;
|
||||
|
||||
after_success:
|
||||
# Run the upload scripts
|
||||
# These do nothing if Deployer is not triggered
|
||||
- . ../deployer/travis/deployer_ftp.sh
|
||||
- . ../deployer/travis/deployer_dput.sh
|
||||
+38
-29
@@ -1,14 +1,46 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
|
||||
# Version change is fine.
|
||||
project(SRB2
|
||||
VERSION 1.6
|
||||
LANGUAGES C)
|
||||
|
||||
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
|
||||
endif()
|
||||
|
||||
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
|
||||
# Version change is fine.
|
||||
project(SRB2
|
||||
VERSION 1.6
|
||||
LANGUAGES C CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
#set(CMAKE_CXX_EXTENSIONS OFF) # optional but recommended: disables GNU extensions, forces pure ISO C++
|
||||
set(CMAKE_CXX_EXTENSIONS ON)
|
||||
set(CMAKE_C_EXTENSIONS ON)
|
||||
|
||||
##### PACKAGE CONFIGURATION #####
|
||||
|
||||
set(SRB2_CPACK_GENERATOR "" CACHE STRING "Generator to use for making a package. E.g., ZIP, TGZ, DragNDrop (OSX only). Leave blank for default generator.")
|
||||
|
||||
if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
||||
set(SRB2_CPACK_GENERATOR "ZIP")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
||||
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
|
||||
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
|
||||
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
|
||||
include(CPack)
|
||||
|
||||
# Set up CMAKE path
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
@@ -73,6 +105,7 @@ endif()
|
||||
# OS macros
|
||||
if (UNIX)
|
||||
add_definitions(-DUNIXCOMMON)
|
||||
add_link_options(-rdynamic) # Use -rdynamic so a backtrace log shows function names
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
@@ -95,14 +128,12 @@ set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
# Set EXE names so the assets CMakeLists can refer to its target
|
||||
set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
|
||||
set(SRB2_WIN_EXE_NAME srb2kartdd CACHE STRING "Executable binary output name for DirectDraw build")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(assets)
|
||||
|
||||
|
||||
## config.h generation
|
||||
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
||||
include(GitUtilities)
|
||||
@@ -111,25 +142,3 @@ git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
|
||||
set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
|
||||
set(SRB2_COMP_REVISION "${SRB2_COMP_COMMIT}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
|
||||
|
||||
##### PACKAGE CONFIGURATION #####
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES "Windows")
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM} MATCHES "Linux")
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
|
||||
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
|
||||
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
|
||||
include(CPack)
|
||||
@@ -1,269 +0,0 @@
|
||||
# Doxyfile 1.4.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = SRB2
|
||||
PROJECT_NUMBER = 1.09
|
||||
OUTPUT_DIRECTORY = ./doc/SRB2
|
||||
CREATE_SUBDIRS = YES
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ./src
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.d \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.idl \
|
||||
*.odl \
|
||||
*.cs \
|
||||
*.php \
|
||||
*.php3 \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.mm \
|
||||
*.dox
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = ./src/sdl/IMG_xpm.c \
|
||||
./src/sdl/SRB2DC/scramble.c
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = */src/hardware/*/* \
|
||||
*/src/sdl/SDL_main/* \
|
||||
*/src/*/*_private.h \
|
||||
*/src/sdl/*/*help.? \
|
||||
*/src/md5.? \
|
||||
*/src/sdl/filter/*
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
#USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = DOXYGEN \
|
||||
HWRENDER \
|
||||
DIRECTFULLSCREEN \
|
||||
HW3SOUND \
|
||||
LOGMESSAGES \
|
||||
WALLSPLATS \
|
||||
FLOORSPLATS
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
+8
-1
@@ -13,10 +13,12 @@ Mainly for use in visual-only addons like secondcolor.
|
||||
|
||||
**Not netsafe**. Returns player's current sliptide roll angle, taking sliptideroll cvar value into account.
|
||||
|
||||
## hud.setVoteBackground(name)
|
||||
## hud.setVoteBackground(name[, time\_per\_frame])
|
||||
|
||||
Changes vote background texture prefix (game looks for PREFIX + "W" or "C" (depends on resolution) + FRAME\_NUMBER).
|
||||
|
||||
If time\_per\_frame is set, each frame will last this amount of tics, default value is 2
|
||||
|
||||
## hud.add(fn, "vote") and hud.add(fn, "intermission")
|
||||
|
||||
Hud hooks for vote screen and intermission screen. They only get drawer (`v`) as argument.
|
||||
@@ -120,6 +122,11 @@ v.interpLatch(false)
|
||||
```
|
||||
When using a custom string drawer, enable this mode to avoid interpolation artifacting when the string changes.
|
||||
|
||||
## cameras[] global array
|
||||
|
||||
Local player cameras that can be accessed outside of hud hooks.
|
||||
`#cameras` will return amount of available cameras. (0 on dedicated server, 1 with 1 player, 4 with 4p splitscreen, etc)
|
||||
|
||||
## mobj.spritexscale, mobj.spriteyscale, mobj.spritexoffset, mobj.spriteyoffset, mobj.rollangle, mobj.sloperoll, mobj.rollmodel fields
|
||||
|
||||
Same fields as in SRB2 2.2
|
||||
|
||||
@@ -1,103 +1,36 @@
|
||||
# SRB2Kart: Saturn
|
||||
# SRB2Kart-Saturn
|
||||
|
||||
SRB2Kart-Saturn is a modification of SRB2Kart with a focus on new Features, Fixes, Optimizations and general Improvements, all while retaining 100% compatibility with vanilla SRB2Kart.
|
||||
|
||||
[SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
|
||||
|
||||
## Saturn Features (Take a look at the "Saturn Options" menu c;)
|
||||
For more information on Saturn´s features check out the changelogs on the [Releases](https://github.com/Indev450/SRB2Kart-Saturn/releases) page and the ingame "Saturn Options" menu.
|
||||
|
||||
- Sprites player rotation on slopes; going on hills, levitate, going down, and so on alters your sprites (configurable)
|
||||
- You can alter all the base kart HUD element offsets on the fly in the Saturn Options settings menu
|
||||
- `addfilelocal` Command, for those who want to use things like their custom hud in netgames (Same as addfile but completely client sided)
|
||||
- Palette rendering, make the OpenGL renderer (almost) look like software mode!
|
||||
- OpenMPT for Tracker module playback instead of GME
|
||||
- Fixes looping and sounds better
|
||||
- Allows filter configuration
|
||||
- Colourize your Kart HUD, to either your player color or whichever colour you like! (optional / requieres extra2.kart file)
|
||||
- The minimal brightness with Shaders can be configured, now you can seeeee in dark areas (0-255 , uses Sector brightness values)
|
||||
- Lua HUD hooks for Intermission (ex: You can make hostmod votes still visible during intermission!)
|
||||
- Lua HUD hooks for Vote Screen (ex: You can make hostmod votes still visible during map vote screen!)
|
||||
- Saltyhop! do a funny hop
|
||||
- Smaller Speedometer (optional / requieres extra.kart file)
|
||||
- Record Attack input display can now be used everywhere
|
||||
- Smaller minimap icons and also show player names on the minimap (toggable)
|
||||
- Support for animated votescreens!
|
||||
- `showmusiccredit` command, shows you the current music track again
|
||||
- `listskins` show a list of all skins currently loaded
|
||||
- Visual Portals from Haya's HEP Client
|
||||
- Horizonline effect in OpenGL (watch the endless bricks on SNES Bowsers Castle!)
|
||||
- Localskins! use whatever skin you like!
|
||||
- Toggable lowercase menu's also from Haya's HEP client
|
||||
- Everything that Galaxy has
|
||||
Also be sure to check the LUASTUFF file for more information on all the extra lua features Saturn has.
|
||||
|
||||
## Improvements / Bug fixes
|
||||
|
||||
- Replay size has been increased to 10MiB minimum, to make replay overflows very unlikely to happen
|
||||
- can be set to 100MiB max with `maxdemosize` command in console
|
||||
- Music changes now properly show the music credits (ex: Kart maps with easter eggs that alter the music)
|
||||
- The mapper still has to provide a MusicDEF for this to work.
|
||||
- Configurable chatlog length (yay can read those messages from 30 mins ago without opening log.txt)
|
||||
- Configurable timeout for waiting to join a full server (in vanilla this is capped to 5 minutes before it boots you out)
|
||||
- Characters now spin in skin selection menu (configurable)
|
||||
- HTTP Addon download speed has been raised dramatically
|
||||
- configurable with `downloadspeed` command
|
||||
- HWR Drawnodes have been refactored, this should fix a few rare crashes esp in regards to OpenGL Visportals
|
||||
- The Position Number in the corner is alot smaller now (half the size!)
|
||||
- Toggable Lap animation
|
||||
- Main menu shows the current renderer being used
|
||||
- MSAA and A2C Antialiasing support (Configurable in renderer.txt file)
|
||||
- A simple button to rejoin your last visited server
|
||||
- Ability to show ALL maps in the mapselect screen, this includes hidden or hellmaps "showallmaps yes/no"
|
||||
- Ability to toggle the Stagetitlecard "maptitles on/off"
|
||||
|
||||
## Performance / Debugging
|
||||
|
||||
- Access for `mobj_t` and `player_t` fields from Lua has been completely rewritten, for much better performance with many Lua scripts
|
||||
- Lua shows Tracebacks whenever an error occurs
|
||||
- The Lua Perfstats page now has multiple pages and is more organized (ps_thinkframe_page X in console)
|
||||
- People with lower end hardware can disable "screen textures" with "gr_screentextures" command, huge performance gain with minimal visual loss
|
||||
- Intermission backgrounds, heat wave effects and etc are broken with this
|
||||
- `ffloorclip`, exclusive to Software, which boosts performance on maps with many Floor over Floor sectors
|
||||
|
||||
## Technical fixes
|
||||
|
||||
- ZFigthing Textures in Opengl mode have been fixed in engine (well almost all of it)
|
||||
- FOFs intersecting with slopes have less issues and now render correctly in Opengl
|
||||
- Midtextures on slopes in Opengl are fixed, many weird guardrails and fences, aswell as some of those sticking out textures from the ground on some maps should be gone
|
||||
- The annoying depraction messages for `P_TeleportMove` and `P_AproxDistance` have been silenced
|
||||
- Silenced the annoying "cant find next map..." messages as theyre super useless and annoying anyways
|
||||
- Added a small cooldown on `map` command due to spamming causing a SIGSEGV
|
||||
- Many bugfixes to the Software renderer, so its much less prone to crashing
|
||||
- Many bugfixes to the OpenGL renderer (too many too list all of them here; check the changelogs for more information)
|
||||
- Bugfixes to the soundsystem, mainly regarding Sound muting
|
||||
- Refactored Zone Memory Allocations (helps a bit with large maps)
|
||||
- Many many more crash fixes and other bugfixes to the basegame (too many too list all of them here; check the changelogs for more information)
|
||||
|
||||
- Crash Backtraces have been replaced by libbacktrace (except for 32bit Windows builds)
|
||||
Crashlogs now contain alot more informations. and even more if your build has debug symbols
|
||||
Also allows 64bit Windows builds to produce Crashlogs!
|
||||
|
||||
## MISC
|
||||
- Bird's Camera Tilting feature is no longer turned on by default
|
||||
- Bird's warning on the title screen has been removed
|
||||
|
||||
## Bugs
|
||||
- On maps which change the song multiple times on map start (exp: Wandering Falls) may show multiple music credits appearing
|
||||
- A2C antialiasing makes transparent surfaces even more transparent
|
||||
- You tell us! c:
|
||||
|
||||
## Note
|
||||
Check the LUASTUFF file for more information on all the lua things Saturn has.
|
||||
We also have a Flatpak available on [Flathub](https://flathub.org/en/apps/org.srb2.SRB2Kart-Saturn)! (many thanks to riomccloud!)
|
||||
|
||||
## Dependencies
|
||||
- SDL2 (Linux/OS X only)
|
||||
- SDL2-Mixer (Linux/OS X only)
|
||||
- libupnp (Linux/OS X only)
|
||||
- libgme (Linux/OS X only)
|
||||
- libopenmpt (Linux/OS X only)
|
||||
- libbacktrace (Linux/OS X only)
|
||||
- libbacktrace (Linux/OS X only, optional, disable support with NOLIBBACKTRACE)
|
||||
- libupnp (Linux/OS X only, optional, enable support with HAVE_MINIUPNPC)
|
||||
|
||||
## Compiling
|
||||
|
||||
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
|
||||
|
||||
For Windows only the Makefile build system with GCC or Clang compiler is supported.
|
||||
Visual C++ (MSVC) is unsupported.
|
||||
|
||||
64-bit Windows builds are supported and recommended over 32-bit builds, they will build automatically when using the MSYS2 MinGW 64-bit executable (requires the mingw-w64-x86_64-gcc package), no extra flags needed!
|
||||
The specific DLLs can be found under /libs/dll-binaries/(i686 for 32bit/x86_64 for 64-bit)/ or in the Release packages
|
||||
|
||||
MacOS and Linux can be build with CMake, but it is recommended to use the Makefile for Linux over CMake
|
||||
|
||||
Alternatively the [srb2bld](https://github.com/Bijman/srb2bld) script by Bijman can be used aswell!
|
||||
|
||||
## Disclaimer
|
||||
Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
version: 1.3.{branch}-{build}
|
||||
os: MinGW
|
||||
|
||||
environment:
|
||||
CC: ccache
|
||||
CCACHE_CC: i686-w64-mingw32-gcc
|
||||
CCACHE_CC_64: x86_64-w64-mingw32-gcc
|
||||
WINDRES: windres
|
||||
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
|
||||
MINGW_SDK: c:\msys64\mingw32
|
||||
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
|
||||
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
|
||||
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
|
||||
UPX_ZIP: upx391w
|
||||
UPX_URL: http://upx.sourceforge.net/download/upx391w.zip
|
||||
CCACHE_EXE: ccache.exe
|
||||
CCACHE_URL: http://alam.srb2.org/ccache.exe
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_DIR: C:\Users\appveyor\.ccache
|
||||
# Disable UPX by default. The user can override this in their Appveyor project settings
|
||||
NOUPX: 1
|
||||
##############################
|
||||
# DEPLOYER VARIABLES
|
||||
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
|
||||
# DPL_TAG_ENABLED=1 will also build installers for release tags. DPL_ENABLED=1 must also be set.
|
||||
# Set these in the Appveyor project settings
|
||||
##############################
|
||||
DPL_ENABLED: 0
|
||||
DPL_TAG_ENABLED: 0
|
||||
DPL_INSTALLER_NAME: srb2kart-v13
|
||||
# Asset handling is barebones vs. Travis Deployer. We operate on 7z only.
|
||||
# Include the README files and the OpenGL batch in the main and patch archives.
|
||||
# The x86/x64 archives contain the DLL binaries.
|
||||
ASSET_ARCHIVE_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z
|
||||
ASSET_ARCHIVE_PATCH_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-patch-assets.7z
|
||||
ASSET_ARCHIVE_X86_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x86-assets.7z
|
||||
ASSET_ARCHIVE_X64_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x64-assets.7z
|
||||
ASSET_ARCHIVE_OPTIONAL_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z
|
||||
# This is overridden to 1 for release tag builds
|
||||
ASSET_FILES_OPTIONAL_GET: 0
|
||||
# For patches, also include the X86/X64 DLLs.
|
||||
PACKAGE_PATCH_DLL_GET: 0
|
||||
# Delete all asset downloads so they can be redownloaded
|
||||
ASSET_CLEAN: 0
|
||||
|
||||
cache:
|
||||
- upx391w.zip
|
||||
- ccache.exe
|
||||
- C:\Users\appveyor\.ccache
|
||||
- C:\Users\appveyor\srb2_cache
|
||||
|
||||
install:
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
|
||||
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
|
||||
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
|
||||
|
||||
- if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip"
|
||||
- 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null
|
||||
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0
|
||||
|
||||
- if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%"
|
||||
- ccache -M 99M
|
||||
- xcopy /Y /V /I ccache.exe "%MINGW_SDK%\bin"
|
||||
|
||||
configuration:
|
||||
- SDL
|
||||
#- SDL64
|
||||
|
||||
before_build:
|
||||
- set "Path=%MINGW_SDK%\bin;%Path%"
|
||||
- if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
|
||||
- mingw32-make --version
|
||||
- if not [%NOUPX%] == [1] ( upx -V )
|
||||
- ccache -V
|
||||
- ccache -s
|
||||
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
|
||||
- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
|
||||
- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
|
||||
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
|
||||
# for pull requests, take the owner's name only, if this isn't the same repo of course
|
||||
- set "REPO=%APPVEYOR_REPO_BRANCH%"
|
||||
- if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
|
||||
- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
|
||||
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
|
||||
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
|
||||
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
|
||||
|
||||
build_script:
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
|
||||
|
||||
after_build:
|
||||
- if [%X86_64%] == [1] (
|
||||
set "BUILD_PATH=bin\Mingw64\Release"
|
||||
) else (
|
||||
set "BUILD_PATH=bin\Mingw\Release"
|
||||
)
|
||||
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
|
||||
- ccache -s
|
||||
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
|
||||
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
|
||||
- cmd: 7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
|
||||
- appveyor PushArtifact %BUILD_ARCHIVE%
|
||||
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
|
||||
- appveyor PushArtifact %BUILDSARCHIVE%
|
||||
##############################
|
||||
# DEPLOYER SCRIPT
|
||||
##############################
|
||||
- if [%DPL_ENABLED%] == [1] ( call "deployer\appveyor\deployer.bat" )
|
||||
|
||||
test: off
|
||||
|
||||
#deploy:
|
||||
# - provider: FTP
|
||||
# protocol: ftps
|
||||
# host:
|
||||
# secure: NsLJEPIBvmwCOj8Tg8RoRQ==
|
||||
# username:
|
||||
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
|
||||
# password:
|
||||
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
|
||||
# folder: appveyor
|
||||
# application:
|
||||
# active_mode: false
|
||||
# on:
|
||||
# branch: master
|
||||
# appveyor_repo_tag: true
|
||||
|
||||
|
||||
on_finish:
|
||||
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
|
||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
@@ -1,5 +1,10 @@
|
||||
## Assets Target Configuration ##
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||
# Asset installation isn't part of the Linux target
|
||||
return()
|
||||
endif()
|
||||
|
||||
# For prepending the current source path, later
|
||||
FUNCTION(PREPEND var prefix)
|
||||
SET(listVar "")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(GME_PKGCONF GME)
|
||||
libfind_pkg_check_modules(GME_PKGCONF LIBGME)
|
||||
|
||||
find_path(GME_INCLUDE_DIR
|
||||
NAMES gme.h
|
||||
@@ -8,6 +8,7 @@ find_path(GME_INCLUDE_DIR
|
||||
${GME_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/gme"
|
||||
"/usr/local/include/gme"
|
||||
PATH_SUFFIXES gme
|
||||
)
|
||||
|
||||
find_library(GME_LIBRARY
|
||||
@@ -20,4 +21,4 @@ find_library(GME_LIBRARY
|
||||
|
||||
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
|
||||
set(GME_PROCESS_LIBS GME_LIBRARY)
|
||||
libfind_process(GME)
|
||||
libfind_process(GME)
|
||||
@@ -1,6 +1,6 @@
|
||||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(OPENMPT_PKGCONF OPENMPT)
|
||||
libfind_pkg_check_modules(OPENMPT_PKGCONF LIBOPENMPT)
|
||||
|
||||
find_path(OPENMPT_INCLUDE_DIR
|
||||
NAMES libopenmpt.h
|
||||
@@ -8,6 +8,7 @@ find_path(OPENMPT_INCLUDE_DIR
|
||||
${OPENMPT_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/libopenmpt"
|
||||
"/usr/local/include/libopenmpt"
|
||||
PATH_SUFFIXES libopenmpt
|
||||
)
|
||||
|
||||
find_library(OPENMPT_LIBRARY
|
||||
@@ -20,4 +21,4 @@ find_library(OPENMPT_LIBRARY
|
||||
|
||||
set(OPENMPT_PROCESS_INCLUDES OPENMPT_INCLUDE_DIR)
|
||||
set(OPENMPT_PROCESS_LIBS OPENMPT_LIBRARY)
|
||||
libfind_process(OPENMPT)
|
||||
libfind_process(OPENMPT)
|
||||
@@ -0,0 +1,33 @@
|
||||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(LIBBACKTRACE_PKGCONF LIBBACKTRACE)
|
||||
|
||||
find_path(LIBBACKTRACE_INCLUDE_DIR
|
||||
NAMES backtrace.h
|
||||
PATHS
|
||||
${LIBBACKTRACE_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include"
|
||||
"/usr/local/include"
|
||||
)
|
||||
|
||||
find_library(LIBBACKTRACE_LIBRARY
|
||||
NAMES backtrace
|
||||
PATHS
|
||||
${LIBBACKTRACE_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
set(LIBBACKTRACE_PROCESS_INCLUDES LIBBACKTRACE_INCLUDE_DIR)
|
||||
set(LIBBACKTRACE_PROCESS_LIBS LIBBACKTRACE_LIBRARY)
|
||||
libfind_process(LIBBACKTRACE)
|
||||
|
||||
if(LIBBACKTRACE_FOUND AND NOT TARGET libbacktrace)
|
||||
add_library(libbacktrace UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
libbacktrace
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${LIBBACKTRACE_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBBACKTRACE_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
@@ -1,4 +1,4 @@
|
||||
# Version 2.2
|
||||
# Version 2.4
|
||||
# Public Domain, originally written by Lasse Kärkkäinen <tronic>
|
||||
# Maintained at https://github.com/Tronic/cmake-modules
|
||||
# Please send your improvements as pull requests on Github.
|
||||
@@ -52,6 +52,10 @@ function (libfind_pkg_detect PREFIX)
|
||||
if (libraryargs)
|
||||
find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
|
||||
endif()
|
||||
# Read pkg-config version
|
||||
if (${PREFIX}_PKGCONF_VERSION)
|
||||
set(${PREFIX}_VERSION ${${PREFIX}_PKGCONF_VERSION} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Extracts a version #define from a version.h file, output stored to <PREFIX>_VERSION.
|
||||
@@ -125,24 +129,39 @@ function (libfind_process PREFIX)
|
||||
|
||||
# Process deps to add to
|
||||
foreach (i ${PREFIX} ${${PREFIX}_DEPENDENCIES})
|
||||
if (DEFINED ${i}_INCLUDE_OPTS OR DEFINED ${i}_LIBRARY_OPTS)
|
||||
if (DEFINED ${i}_INCLUDE_OPTS)
|
||||
# The package seems to export option lists that we can use, woohoo!
|
||||
list(APPEND includeopts ${${i}_INCLUDE_OPTS})
|
||||
else()
|
||||
if (DEFINED ${i}_INCLUDE_DIR)
|
||||
# Singular forms can be used
|
||||
list(APPEND includeopts ${i}_INCLUDE_DIR)
|
||||
else()
|
||||
if (DEFINED ${i}_INCLUDE_DIRS)
|
||||
# Plural forms can be used
|
||||
list(APPEND includeopts ${i}_INCLUDE_DIRS)
|
||||
else()
|
||||
# Oh no, we don't know the option names
|
||||
message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes. Aieeh!")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (DEFINED ${i}_LIBRARY_OPTS)
|
||||
# The package seems to export option lists that we can use, woohoo!
|
||||
list(APPEND libraryopts ${${i}_LIBRARY_OPTS})
|
||||
else()
|
||||
# If plural forms don't exist or they equal singular forms
|
||||
if ((NOT DEFINED ${i}_INCLUDE_DIRS AND NOT DEFINED ${i}_LIBRARIES) OR
|
||||
({i}_INCLUDE_DIR STREQUAL ${i}_INCLUDE_DIRS AND ${i}_LIBRARY STREQUAL ${i}_LIBRARIES))
|
||||
if (DEFINED ${i}_LIBRARY)
|
||||
# Singular forms can be used
|
||||
if (DEFINED ${i}_INCLUDE_DIR)
|
||||
list(APPEND includeopts ${i}_INCLUDE_DIR)
|
||||
endif()
|
||||
if (DEFINED ${i}_LIBRARY)
|
||||
list(APPEND libraryopts ${i}_LIBRARY)
|
||||
endif()
|
||||
list(APPEND libraryopts ${i}_LIBRARY)
|
||||
else()
|
||||
# Oh no, we don't know the option names
|
||||
message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes and libs. Aieeh!")
|
||||
if (DEFINED ${i}_LIBRARIES)
|
||||
# Plural forms can be used
|
||||
list(APPEND libraryopts ${i}_LIBRARIES)
|
||||
else()
|
||||
# Oh no, we don't know the option names
|
||||
message(FATAL_ERROR "We couldn't determine config variable names for ${i} libraries. Aieeh!")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -209,12 +228,12 @@ function (libfind_process PREFIX)
|
||||
message(STATUS " ${PREFIX}_LIBRARY_OPTS=${libraryopts}")
|
||||
message(STATUS " ${PREFIX}_LIBRARIES=${libs}")
|
||||
endif()
|
||||
set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
|
||||
set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
|
||||
set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
srb2 for Debian
|
||||
---------------
|
||||
|
||||
SRB2 Debian package!
|
||||
Hi there, to rebuild these packages just use debuild in the root source directory (not /src!).
|
||||
You can build these with or without a key if you want, but if you want to put these on a repo,
|
||||
generate your own GnuPG key as per the https://help.ubuntu.com/community/GnuPrivacyGuardHowto
|
||||
instructions and pass the -k<keyid> command to debuild. Make sure you export the key footprint
|
||||
and give them to your users to install with apt-key add. Thanks!
|
||||
|
||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
|
||||
|
||||
---------------
|
||||
|
||||
|
||||
Templating
|
||||
|
||||
Note that you MUST run [repo-root]/debian_template.sh before running debuild
|
||||
on these scripts! debian_template.sh fills these template files with working values.
|
||||
|
||||
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
|
||||
the identity of the key you will use to sign the package.
|
||||
|
||||
|
||||
Building for Launchpad PPA
|
||||
|
||||
Use these steps to prepare building a source package for Launchpad:
|
||||
|
||||
1. cd [repo-root]
|
||||
2. git reset --hard; git clean -fd; git clean -fx;
|
||||
* Resets your repo folder to a committed state and removes untracked files
|
||||
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
|
||||
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
|
||||
|
||||
Build the source package:
|
||||
|
||||
1. source [repo-root]/debian_template.sh
|
||||
* Initializes defaults for the package variables and fills in templates.
|
||||
2. debuild -S (builds the source package for Launchpad)
|
||||
|
||||
|
||||
Signing for Launchpad PPA
|
||||
|
||||
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
|
||||
to publish the fingerprint of that key to Ubuntu's key server.
|
||||
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
|
||||
|
||||
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
|
||||
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
|
||||
upload signed source packages and publish them onto your PPA.
|
||||
|
||||
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
|
||||
means your key is not set up correctly with your Launchpad account.
|
||||
|
||||
Finally, if your packages have not already been signed, follow these steps:
|
||||
|
||||
1. cd ..
|
||||
* Packages are located in the parent folder of where debuild was called
|
||||
2. debsign "srb2_[version]_source.changes"
|
||||
* You may need to specify -k [key-fingerprint]
|
||||
|
||||
|
||||
Uploading for Launchpad PPA
|
||||
|
||||
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
|
||||
to your PPA and have Launchpad build your binary deb packages.
|
||||
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
|
||||
@@ -1,46 +0,0 @@
|
||||
srb2 for Debian
|
||||
---------------
|
||||
|
||||
Here it is! SRB2 v2.1.2 source code!
|
||||
|
||||
GNU/Linux
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.2.7 or better (from libsdl.org)
|
||||
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
|
||||
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
|
||||
libPNG 1.2.7
|
||||
Zlib 1.2.3
|
||||
The Xiph.org libogg and libvorbis libraries
|
||||
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
|
||||
installation, so you needn't worry, most likely)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
Build instructions:
|
||||
|
||||
make -C src LINUX=1
|
||||
|
||||
Build instructions for non-X86 devices (such as X64):
|
||||
|
||||
make -C src LINUX=1 NONX86=1
|
||||
|
||||
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src LINUX=1 WIILINUX=1
|
||||
|
||||
Build instructions to build for Pandora (Linux) on a ARM system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src PANDORA=1
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
binaries will turn in up in bin/
|
||||
|
||||
note: read the src/makefile for more options
|
||||
|
||||
- Sonic Team Junior
|
||||
http://www.srb2.org
|
||||
@@ -1,5 +0,0 @@
|
||||
${PACKAGE_NAME} (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
|
||||
|
||||
* ${PROGRAM_NAME} v${PROGRAM_VERSION} program build
|
||||
|
||||
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
@@ -1 +0,0 @@
|
||||
7
|
||||
@@ -1,51 +0,0 @@
|
||||
# SRB2 Debian package control file.
|
||||
|
||||
Source: ${PACKAGE_NAME}
|
||||
Section: games
|
||||
Priority: extra
|
||||
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
|
||||
Build-Depends: debhelper (>= 7.0.50~),
|
||||
libsdl2-dev,
|
||||
libsdl2-mixer-dev,
|
||||
libpng-dev | libpng16-dev | libpng12-dev (>= 1.2.7),
|
||||
zlib1g-dev,
|
||||
libgme-dev,
|
||||
libcurl4-openssl-dev,
|
||||
libglu1-dev | libglu-dev,
|
||||
libosmesa6-dev | libgl-dev,
|
||||
nasm [i386]
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: ${PACKAGE_WEBSITE}
|
||||
|
||||
Package: ${PACKAGE_NAME}
|
||||
Architecture: any
|
||||
Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
|
||||
${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}),
|
||||
libsdl2-2.0-0,
|
||||
libsdl2-mixer-2.0-0,
|
||||
zlib1g,
|
||||
libgme0,
|
||||
libcurl4,
|
||||
libpng | libpng16-16 | libpng12-0
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
|
||||
|
||||
Package: ${PACKAGE_NAME}-dbg
|
||||
Architecture: any
|
||||
# FIXME: should be Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
|
||||
Depends: libc6, ${MISC_DEPENDS}, ${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}), ${PACKAGE_NAME}
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
This is a debug binary; its symbols will be loaded by gdb
|
||||
when the user starts the game with gdb for debugging.
|
||||
@@ -1,27 +0,0 @@
|
||||
This work was packaged for Debian by:
|
||||
|
||||
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
${PACKAGE_WEBSITE}
|
||||
|
||||
Upstream Author(s):
|
||||
|
||||
${PACKAGE_GROUP_NAME_EMAIL}
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1998-2018 by Sonic Team Junior
|
||||
|
||||
License:
|
||||
|
||||
GNU General Public License, version 2
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
|
||||
|
||||
and is licensed under the GPL version 2,
|
||||
see "/usr/share/common-licenses/GPL-2".
|
||||
@@ -1,4 +0,0 @@
|
||||
README.md
|
||||
assets/README.txt
|
||||
assets/LICENSE.txt
|
||||
assets/LICENSE-3RD-PARTY.txt
|
||||
@@ -1,172 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# GNU Make Debian package makefile for SRB2
|
||||
#
|
||||
# Copyright (C) 1998-2010 by Callum Dickinson
|
||||
#
|
||||
# This program 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; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# This file most likely will not need to be modified to make
|
||||
# branches of SRB2 capable of making their own Debian packages,
|
||||
# instead look at the /debian/control file for configuration.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
|
||||
#
|
||||
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
|
||||
# Variables used by the rules script are parenthese'd $(PKGDIR)
|
||||
# See [repo-root]/debian_template.sh
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# user/group of to-be-installed files
|
||||
ROOT_USER := 0
|
||||
ROOT_GROUP := 0
|
||||
|
||||
# determine cross-compile (may need some work)
|
||||
CROSS_COMPILE_BUILD := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
CROSS_COMPILE_HOST := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
CROSS_COMPILE := $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "$(CROSS_COMPILE_HOST)")
|
||||
|
||||
MKDIR = mkdir -p
|
||||
MAKE = make
|
||||
INSTALL = install -o $(ROOT_USER) -g $(ROOT_GROUP) -m 644
|
||||
MV = mv
|
||||
RM = rm -rf
|
||||
STRIPARGS = --strip-unneeded
|
||||
ifdef CROSS_COMPILE
|
||||
STRIP = $(CROSS_COMPILE_HOST)-strip $(STRIPARGS)
|
||||
else
|
||||
STRIP = strip $(STRIPARGS)
|
||||
endif
|
||||
DIR := $(shell pwd)
|
||||
|
||||
# FIXME: hate hate hate head/tail hack :(
|
||||
CONTROLF = $(DIR)/debian/control
|
||||
PACKAGE = ${PACKAGE_NAME}
|
||||
DBGPKG = ${PACKAGE}-dbg
|
||||
TITLE = ${PROGRAM_NAME}
|
||||
SECTION = Games/Action
|
||||
EXENAME = ${PROGRAM_FILENAME}
|
||||
DBGNAME = debug/$(EXENAME)
|
||||
|
||||
PKGDIR = $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
|
||||
DBGDIR = usr/lib/debug/$(PKGDIR)
|
||||
LINKDIR = $(shell echo "${PACKAGE_LINK_PATH}" | sed -e 's/^\///')
|
||||
PIXMAPS_DIR = usr/share/pixmaps
|
||||
DESKTOP_DIR = usr/share/applications
|
||||
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
|
||||
OS = LINUX=1
|
||||
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
|
||||
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
|
||||
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
|
||||
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
|
||||
BINDIR := $(DIR)/bin/Linux/Release
|
||||
|
||||
# FIXME pkg-config dir hacks
|
||||
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile
|
||||
# export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
|
||||
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
|
||||
|
||||
# Some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves
|
||||
PKG_CONFIG?=pkg-config
|
||||
LIBGME_PKGCONFIG?=libgme
|
||||
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
|
||||
|
||||
ifeq ($(LIBGME_LDFLAGS),)
|
||||
MAKEARGS += LIBGME_LDFLAGS=-lgme
|
||||
endif
|
||||
|
||||
build:
|
||||
$(MKDIR) $(BINDIR)/debug
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS)
|
||||
$(STRIP) $(BINDIR)/$(EXENAME)
|
||||
|
||||
binary-indep:
|
||||
# only here to kill Lintian warning
|
||||
echo "no need to do any arch-independent stuff"
|
||||
|
||||
binary-arch:
|
||||
# create ddirs
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DBGDIR)
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DESKTOP_DIR)
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(PIXMAPS_DIR)
|
||||
# install main binaries
|
||||
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
|
||||
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
|
||||
# Install desktop file and banner image
|
||||
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps/${PROGRAM_FILENAME}.png
|
||||
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications/${PROGRAM_FILENAME}.desktop
|
||||
# add compiled binaries to include-binaries
|
||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||
# Generate install folder files
|
||||
echo $(PKGDIR) > $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
|
||||
# Launchpad only calls binary-arch, so just move everything up
|
||||
#binary: binary-arch
|
||||
# Generate .desktop specifications
|
||||
echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu
|
||||
echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
# dh_installexamples
|
||||
dh_install --sourcedir=$(DIR)/debian/tmp
|
||||
dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installman
|
||||
dh_link $(PKGDIR)/$(EXENAME) $(LINKDIR)/$(EXENAME)
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
-dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-arch
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
|
||||
$(RM) $(BINDIR)/*
|
||||
$(RM) $(DIR)/debian/$(PACKAGE)/*
|
||||
$(RM) $(DIR)/debian/$(DBGPKG)/*
|
||||
$(RM) $(DIR)/debian/tmp/*
|
||||
$(RM) $(DIR)/debian/$(PACKAGE).install
|
||||
$(RM) $(DIR)/debian/$(DBGPKG).install
|
||||
$(RM) $(DIR)/debian/menu
|
||||
$(RM) $(DIR)/debian/files
|
||||
$(RM) $(DIR)/debian/source/include-binaries
|
||||
|
||||
.PHONY: all clean binary binary-indep build
|
||||
@@ -1 +0,0 @@
|
||||
3.0 (native)
|
||||
@@ -1,11 +0,0 @@
|
||||
tar-ignore = "assets/*.srb"
|
||||
tar-ignore = "assets/*.pk3"
|
||||
tar-ignore = "assets/*.dta"
|
||||
tar-ignore = "assets/*.wad"
|
||||
tar-ignore = "assets/*.kart"
|
||||
tar-ignore = "assets/debian/${PACKAGE_NAME}-data/*"
|
||||
tar-ignore = "assets/debian/tmp/*"
|
||||
tar-ignore = "*.obj"
|
||||
tar-ignore = "*.dep"
|
||||
tar-ignore = ".git/*"
|
||||
tar-ignore = ".git*"
|
||||
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=${PROGRAM_NAME}
|
||||
Comment=${PROGRAM_DESCRIPTION}
|
||||
Encoding=UTF-8
|
||||
Exec=${PACKAGE_INSTALL_PATH}/${PROGRAM_FILENAME}
|
||||
Icon=/usr/share/pixmaps/${PROGRAM_FILENAME}.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
Categories=Application;Game;
|
||||
@@ -1,166 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Debian package templating
|
||||
#
|
||||
# Call this script BEFORE running debuild!
|
||||
# source ./debian_template.sh [clean] [main/asset]
|
||||
#
|
||||
# Before running this script,
|
||||
# you should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
|
||||
# the identity of the key you will use to sign the package.
|
||||
#
|
||||
|
||||
# Get script's actual path
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
# Recursive function for directory crawling
|
||||
# $1 = Directory root to crawl
|
||||
# $2 = Code to eval on file
|
||||
# $3 = Code to eval on directory
|
||||
# Exposes $dirtails, $dirlevel, and $dirtailname
|
||||
dirlevel=0 # initialize
|
||||
dirtails=()
|
||||
|
||||
# Utility function to make dira/dirb/dirc string
|
||||
makedirtailname () {
|
||||
dirtailname=""
|
||||
for tail in $dirtails; do
|
||||
if [[ "$dirtailname" == "" ]]; then
|
||||
dirtailname="/$tail";
|
||||
else
|
||||
dirtailname="$dirtailname/$tail";
|
||||
fi;
|
||||
done;
|
||||
}
|
||||
|
||||
evaldirectory () {
|
||||
if [ -d "$1" ]; then
|
||||
# Set contextual variables
|
||||
# dirtails is an array of directory basenames after the crawl root
|
||||
if (( $dirlevel > 0 )); then
|
||||
dirtails+=( "$(basename $1)" );
|
||||
else
|
||||
dirtails=();
|
||||
fi;
|
||||
dirlevel=$((dirlevel+1));
|
||||
|
||||
# Generate directory path after the crawl root
|
||||
makedirtailname;
|
||||
|
||||
# Eval our directory with the latest contextual info
|
||||
# Don't eval on root
|
||||
if (( $dirlevel > 1 )) && [[ "$3" != "" ]]; then
|
||||
eval "$3";
|
||||
fi;
|
||||
|
||||
# Iterate entries
|
||||
for name in $1/*; do
|
||||
if [ -d "$name" ]; then
|
||||
# Name is a directory, but don't eval yet
|
||||
# Recurse so our vars are updated
|
||||
evaldirectory "$name" "$2" "$3";
|
||||
|
||||
# Decrement our directory level and remove a dirtail
|
||||
unset 'dirtails[ ${#dirtails[@]}-1 ]';
|
||||
dirlevel=$((dirlevel-1));
|
||||
makedirtailname;
|
||||
else
|
||||
# Name is a file
|
||||
if [ -f "$name" ] && [[ "$2" != "" ]]; then
|
||||
eval "$2";
|
||||
fi;
|
||||
fi;
|
||||
done;
|
||||
|
||||
# Reset our variables; we're done iterating
|
||||
if (( $dirlevel == 1 )); then
|
||||
dirlevel=0;
|
||||
fi;
|
||||
fi;
|
||||
}
|
||||
|
||||
#
|
||||
# Initialize package parameter defaults
|
||||
#
|
||||
if [[ "$__DEBIAN_PARAMETERS_INITIALIZED" != "1" ]]; then
|
||||
. ${DIR}/deployer/travis/deployer_defaults.sh;
|
||||
fi;
|
||||
|
||||
# Clean up after ourselves; we only expect to run this script once
|
||||
# during buildboting
|
||||
__DEBIAN_PARAMETERS_INITIALIZED=0
|
||||
|
||||
# for envsubst
|
||||
export __PACKAGE_DATETIME="$(date '+%a, %d %b %Y %H:%M:%S %z')"
|
||||
export __PACKAGE_DATETIME_DIGIT="$(date -u '+%Y%m%d%H%M%S')"
|
||||
|
||||
if [[ "$PACKAGE_REVISION" == "" ]]; then
|
||||
PACKAGE_REVISION="-$__PACKAGE_DATETIME_DIGIT";
|
||||
__PACKAGE_REVISION_BY_DATE=1;
|
||||
export PACKAGE_REVISION=${PACKAGE_REVISION}; # for envsubst
|
||||
fi;
|
||||
|
||||
#
|
||||
# Clean the old debian/ directories
|
||||
#
|
||||
if [[ "$1" == "clean" ]]; then
|
||||
toclean=$2;
|
||||
else
|
||||
toclean=$1;
|
||||
fi;
|
||||
|
||||
if [[ "$toclean" == "" ]] || [[ "$toclean" == "main" ]]; then
|
||||
echo "Cleaning main package scripts";
|
||||
if [[ ! -f ${DIR}/debian ]]; then
|
||||
rm -rf ${DIR}/debian;
|
||||
fi;
|
||||
fi;
|
||||
if [[ "$toclean" == "" ]] || [[ "$toclean" == "asset" ]]; then
|
||||
echo "Cleaning asset package scripts";
|
||||
if [[ ! -f ${DIR}/assets/debian ]]; then
|
||||
rm -rf ${DIR}/assets/debian;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Make new templates
|
||||
#
|
||||
if [[ "$1" != "clean" ]]; then
|
||||
totemplate=$1;
|
||||
|
||||
# HACK: ${shlibs:Depends} in the templates make the templating fail
|
||||
# So just define replacemment variables
|
||||
export SHLIBS_DEPENDS=${SHLIBS_DEPENDS};
|
||||
export MISC_DEPENDS=${MISC_DEPENDS};
|
||||
export DEBFILEVAR='$$file'; # used in assets/debian/rules
|
||||
|
||||
# Package parameters are exported for envsubst in deployer_defaults.sh
|
||||
|
||||
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "main" ]]; then
|
||||
echo "Generating main package scripts";
|
||||
fromroot=${DIR}/debian-template;
|
||||
toroot=${DIR}/debian;
|
||||
mkdir ${toroot};
|
||||
|
||||
evaldirectory ${fromroot} \
|
||||
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
|
||||
"mkdir \"${toroot}\${dirtailname}\"";
|
||||
fi;
|
||||
|
||||
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "asset" ]]; then
|
||||
echo "Generating asset package scripts";
|
||||
fromroot=${DIR}/assets/debian-template;
|
||||
toroot=${DIR}/assets/debian;
|
||||
mkdir ${toroot};
|
||||
|
||||
# Root dir to crawl; file eval; directory eval
|
||||
evaldirectory ${fromroot} \
|
||||
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
|
||||
"mkdir \"${toroot}\${dirtailname}\"";
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_ACTIVE" != "1" ]] && [[ "$__PACKAGE_REVISION_BY_DATE" == "1" ]]; then
|
||||
unset PACKAGE_REVISION; # so we can reset the date on subsequent runs
|
||||
fi;
|
||||
@@ -1,195 +0,0 @@
|
||||
@setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Appveyor Deployer
|
||||
: See appveyor.yml for default variables
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Evaluate whether we should be deploying
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
if not [%DPL_ENABLED%] == [1] (
|
||||
echo Deployer is not enabled...
|
||||
exit /b
|
||||
)
|
||||
|
||||
: Don't do DD installs because fmodex DLL handling is not implemented.
|
||||
if [%CONFIGURATION%] == [DD] (
|
||||
echo Deployer does not support DD builds...
|
||||
exit /b
|
||||
)
|
||||
|
||||
if [%CONFIGURATION%] == [DD64] (
|
||||
echo Deployer does not support DD builds...
|
||||
exit /b
|
||||
)
|
||||
|
||||
: Substring match from https://stackoverflow.com/questions/7005951/batch-file-find-if-substring-is-in-string-not-in-a-file
|
||||
: The below line says "if deployer is NOT in string"
|
||||
: Note that APPVEYOR_REPO_BRANCH for pull request builds is the BASE branch that PR is merging INTO
|
||||
if x%APPVEYOR_REPO_BRANCH:deployer=%==x%APPVEYOR_REPO_BRANCH% (
|
||||
if not [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
echo Deployer is enabled but we are not in a release tag or a 'deployer' branch...
|
||||
exit /b
|
||||
) else (
|
||||
if not [%DPL_TAG_ENABLED%] == [1] (
|
||||
echo Deployer is not enabled for release tags...
|
||||
exit /b
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
: Release tags always get optional assets (music.dta)
|
||||
if [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
set "ASSET_FILES_OPTIONAL_GET=1"
|
||||
)
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Get asset archives
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
if exist "C:\Users\appveyor\srb2_cache\archives\" (
|
||||
if [%ASSET_CLEAN%] == [1] (
|
||||
echo Cleaning asset archives...
|
||||
rmdir /s /q "C:\Users\appveyor\srb2_cache\archives"
|
||||
)
|
||||
)
|
||||
|
||||
if not exist "C:\Users\appveyor\srb2_cache\archives\" mkdir "C:\Users\appveyor\srb2_cache\archives"
|
||||
|
||||
goto EXTRACT_ARCHIVES
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: ARCHIVE_NAME_PARTS
|
||||
: Call this like a function. %archivepath% is the path to extract parts from.
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
for %%a in (%archivepath%) do (
|
||||
set "file=%%~fa"
|
||||
set "filepath=%%~dpa"
|
||||
set "filename=%%~nxa"
|
||||
)
|
||||
|
||||
set "localarchivepath=C:\Users\appveyor\srb2_cache\archives\%filename%"
|
||||
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: EXTRACT_ARCHIVES
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
set "archivepath=%ASSET_ARCHIVE_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_PATH_LOCAL=%localarchivepath%"
|
||||
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATH%" -FileName "%localarchivepath%"
|
||||
|
||||
set "archivepath=%ASSET_ARCHIVE_PATCH_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_PATCH_PATH_LOCAL=%localarchivepath%"
|
||||
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATCH_PATH%" -FileName "%localarchivepath%"
|
||||
|
||||
if not [%X86_64%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_X86_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_X86_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X86_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
if [%X86_64%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_X64_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_X64_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X64_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_OPTIONAL_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_OPTIONAL_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Build the installers
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
mkdir "assets\installer"
|
||||
mkdir "assets\patch"
|
||||
|
||||
7z x -y "%ASSET_ARCHIVE_PATH_LOCAL%" -o"assets\installer" >null
|
||||
7z x -y "%ASSET_ARCHIVE_PATCH_PATH_LOCAL%" -o"assets\patch" >null
|
||||
|
||||
: Copy optional files to full installer (music.dta)
|
||||
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
|
||||
7z x -y "%ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL%" -o"assets\installer" >null
|
||||
)
|
||||
|
||||
: Copy EXE -- BUILD_PATH is from appveyor.yml
|
||||
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\installer" /XF "*.debug" ".gitignore"
|
||||
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\patch" /XF "*.debug" ".gitignore"
|
||||
|
||||
: Are we building DD? (we were supposed to exit earlier!)
|
||||
if [%CONFIGURATION%] == [DD] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
|
||||
if [%CONFIGURATION%] == [DD64] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
|
||||
|
||||
: If we are not a release tag, suffix the filename
|
||||
if not [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
set "INSTALLER_SUFFIX=-%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%"
|
||||
) else (
|
||||
set "INSTALLER_SUFFIX="
|
||||
)
|
||||
|
||||
if not [%X86_64%] == [1] ( goto X86_INSTALL )
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: X64_INSTALL
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
: Extract DLL binaries
|
||||
7z x -y "%ASSET_ARCHIVE_X64_PATH_LOCAL%" -o"assets\installer" >null
|
||||
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
|
||||
7z x -y "!ASSET_ARCHIVE_X64_PATH_LOCAL!" -o"assets\patch" >null
|
||||
)
|
||||
|
||||
: Build the installer
|
||||
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
|
||||
|
||||
: Build the patch
|
||||
7z a "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
|
||||
|
||||
: Upload artifacts
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe"
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip"
|
||||
|
||||
: We only do x86 OR x64, one at a time, so exit now.
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: X86_INSTALL
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
: Extract DLL binaries
|
||||
7z x -y "%ASSET_ARCHIVE_X86_PATH_LOCAL%" -o"assets\installer" >null
|
||||
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
|
||||
7z x -y "!ASSET_ARCHIVE_X86_PATH_LOCAL!" -o"assets\patch" >null
|
||||
)
|
||||
|
||||
: Build the installer
|
||||
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
|
||||
|
||||
: Build the patch
|
||||
7z a "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
|
||||
|
||||
: Upload artifacts
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe"
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip"
|
||||
|
||||
: We only do x86 OR x64, one at a time, so exit now
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: EOF
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
endlocal
|
||||
@@ -1,157 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Initialization
|
||||
#
|
||||
# Performs validity checks to ensure that Deployer is allowed to run
|
||||
# e.g., is an FTP hostname specified? Are we whitelisted by OSNAMES and BRANCHES?
|
||||
#
|
||||
# Set these environment variables in your Travis-CI settings, where they are stored securely.
|
||||
# See other shell scripts for more options.
|
||||
#
|
||||
# DPL_ENABLED = 1 (leave blank to disable)
|
||||
# DPL_TAG_ENABLED = 1 (run Deployer on all tags)
|
||||
# DPL_JOB_ENABLE_ALL = 1 (run Deployer on all jobs; leave blank to act on specific jobs, see below)
|
||||
# DPL_JOBNAMES = name1,name2 (whitelist of job names to allow uploading; leave blank to upload from all jobs)
|
||||
# DPL_OSNAMES = osx (whitelist of OS names to allow uploading; leave blank to upload from all OSes)
|
||||
# DPL_BRANCHES = master,branch1,branch2 (whitelist of branches to upload; leave blank to upload all branches)
|
||||
#
|
||||
# To enable Deployer on specific jobs, set _DPL_JOB_ENABLED=1 for that job. Example:
|
||||
# - matrix:
|
||||
# - os: osx
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
#
|
||||
# DO NOT set __DPL_ACTIVE, because that would bypass these validity checks.
|
||||
|
||||
# Validate Deployer state
|
||||
if [[ "$DPL_ENABLED" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
||||
# Test for base eligibility:
|
||||
# Are we in a deployer branch? Or
|
||||
# Are we in a release tag AND DPL_TAG_ENABLED=1?
|
||||
if [[ $TRAVIS_BRANCH == *"deployer"* ]]; then
|
||||
__DPL_BASE_ELIGIBLE=1;
|
||||
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
|
||||
fi;
|
||||
|
||||
if [[ "$TRAVIS_TAG" != "" ]] && [[ "$DPL_TAG_ENABLED" == "1" ]]; then
|
||||
__DPL_BASE_ELIGIBLE=1;
|
||||
__DPL_TAG_ELIGIBLE=1;
|
||||
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
|
||||
fi;
|
||||
|
||||
# Logging message for trigger word
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" != "1" ]] && [[ "$DPL_TRIGGER" != "" ]]; then
|
||||
echo "Testing for trigger $DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
|
||||
echo "[${DPL_TRIGGER}]";
|
||||
echo "[${DPL_TRIGGER}-${_DPL_JOB_NAME}]";
|
||||
echo "[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]";
|
||||
fi;
|
||||
|
||||
#
|
||||
# Search for the trigger word
|
||||
# Force enable if release tags are eligible
|
||||
#
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_TRIGGER" == "" ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER]"* ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${_DPL_JOB_NAME}]"* ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]"* ]]; then
|
||||
#
|
||||
# Whitelist by branch name
|
||||
# Force enable if release tags are eligible
|
||||
#
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
|
||||
# Set this so we only early-terminate builds when we are specifically deploying
|
||||
# Trigger string and branch are encompassing conditions; the rest are job-specific
|
||||
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
|
||||
# because we're filtering non-deployer jobs.
|
||||
#
|
||||
# __DPL_TRY_TERMINATE_EARLY is invalidated in .travis.yml if __DPL_ACTIVE=1
|
||||
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
|
||||
__DPL_TRY_TERMINATE_EARLY=1;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Is the job enabled for deployment?
|
||||
#
|
||||
if [[ "$DPL_JOB_ENABLE_ALL" == "1" ]] || [[ "$_DPL_JOB_ENABLED" == "1" ]]; then
|
||||
#
|
||||
# Whitelist by job names
|
||||
#
|
||||
if [[ "$DPL_JOBNAMES" == "" ]] || [[ "$_DPL_JOB_NAME" == "" ]] || [[ $DPL_JOBNAMES == *"$_DPL_JOB_NAME"* ]]; then
|
||||
#
|
||||
# Whitelist by OS names
|
||||
#
|
||||
if [[ "$DPL_OSNAMES" == "" ]] || [[ $DPL_OSNAMES == *"$TRAVIS_OS_NAME"* ]]; then
|
||||
# Base Deployer is eligible for becoming active
|
||||
|
||||
# Are we building for Linux?
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]] || [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
__DPL_DEBIAN_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Now check for deployment targets
|
||||
if [[ "$_DPL_FTP_TARGET" == "1" ]] && [[ "$DPL_FTP_HOSTNAME" != "" ]]; then
|
||||
if [[ "$TRAVIS_OS_HOST" == "linux" ]] && [[ "$DPL_FTP_PROTOCOL" == "ftp" ]]; then
|
||||
echo "Non-secure FTP will not work on Linux Travis-CI jobs!";
|
||||
echo "Try SFTP or another target. Details:";
|
||||
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
|
||||
else
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] || [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
echo "Deployer FTP target is enabled";
|
||||
__DPL_FTP_ACTIVE=1;
|
||||
else
|
||||
echo "Deployer FTP target cannot be enabled: You must specify _DPL_PACKAGE_BINARY=1,";
|
||||
echo "and/or _DPL_BINARY=1 in your job's environment variables.";
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_DPUT_TARGET" == "1" ]] && [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] \
|
||||
&& [[ "$DPL_DPUT_INCOMING" != "" ]]; then
|
||||
if [[ "$DPL_DPUT_METHOD" == "ftp" ]]; then
|
||||
echo "DPUT will not work with non-secure FTP on Linux Travis-CI jobs!";
|
||||
echo "Try SFTP or another method for DPUT. Details:";
|
||||
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
|
||||
else
|
||||
echo "Deployer DPUT target is enabled";
|
||||
__DPL_DPUT_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# If any deployment targets are active, then so is the Deployer at large
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
__DPL_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
else
|
||||
if [[ "$DPL_TRIGGER" != "" ]]; then
|
||||
echo "Testing for global trigger [$DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
|
||||
fi;
|
||||
if [[ "$DPL_TRIGGER" != "" ]] && [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER"* ]]; then
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
|
||||
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
|
||||
# because we're filtering non-deployer jobs.
|
||||
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
|
||||
# Assume that some job received the trigger, so mark this for early termination
|
||||
__DPL_TRY_TERMINATE_EARLY=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Deployer is active in another job";
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_TRY_TERMINATE_EARLY" != "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Deployer is not active";
|
||||
fi;
|
||||
@@ -1,190 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Build Script
|
||||
#
|
||||
# Builds the required targets depending on which sub-modules are enabled
|
||||
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
|
||||
echo "Building Debian package(s)"
|
||||
|
||||
sudo apt-get install devscripts debhelper fakeroot secure-delete expect;
|
||||
|
||||
# Build source packages first, since they zip up the entire source folder,
|
||||
# binaries and all
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
. ../debian_template.sh main;
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..; # repo root
|
||||
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
echo "Building main source Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -S -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building main binary Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Also an asset package
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
. ../debian_template.sh asset;
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../assets;
|
||||
|
||||
# make sure the asset files exist, download them if they don't
|
||||
#echo "Checking asset files for asset Debian package";
|
||||
#debuild -T build;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
echo "Building asset source Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -S -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building asset binary Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Now sign our packages
|
||||
if [[ "$DPL_PGP_KEY_PRIVATE" != "" ]] && [[ "$DPL_PGP_KEY_PASSPHRASE" != "" ]]; then
|
||||
# Get the key to sign
|
||||
# Do this AFTER debuild so that we can specify the passphrase in command line
|
||||
echo "$DPL_PGP_KEY_PRIVATE" | base64 --decode > key.asc;
|
||||
echo "$DPL_PGP_KEY_PASSPHRASE" > phrase.txt;
|
||||
gpg --import key.asc;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
echo "Signing main package(s)";
|
||||
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..; # parent of repo root
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*.changes; do
|
||||
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
echo "Signing asset package(s)";
|
||||
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..; # repo root
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*.changes; do
|
||||
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Delete the keys :eyes:
|
||||
srm key.asc;
|
||||
srm phrase.txt;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# all other OSes
|
||||
if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then
|
||||
#
|
||||
# Check for binary building
|
||||
#
|
||||
if [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
echo "Building a Binary";
|
||||
make -k;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Check for package building
|
||||
#
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building a Package";
|
||||
|
||||
# Make an OSX package; superuser is required for library bundling
|
||||
#
|
||||
# HACK: OSX packaging can't write libraries to .app package unless we're superuser
|
||||
# because the original library files don't have WRITE permission
|
||||
# Bug may be sidestepped by using CHMOD_BUNDLE_ITEMS=TRUE
|
||||
# But I don't know where this is set. Not `cmake -D...` because this var is ignored.
|
||||
# https://cmake.org/Bug/view.php?id=9284
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
sudo make -k package;
|
||||
else
|
||||
# Some day, when Windows is supported, we'll just make a standard package
|
||||
make -k package;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
@@ -1,105 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Default Variables
|
||||
#
|
||||
# Here are all of the user-set variables used by Deployer.
|
||||
# See the "Cross-platform deployment" page on SRB2 Wiki for documentation.
|
||||
|
||||
# Core Parameters
|
||||
: ${DPL_ENABLED} # Enable Deployer behavior; must be set for any deployment activity
|
||||
: ${DPL_TAG_ENABLED} # Trigger Deployer for all tag releases
|
||||
: ${DPL_JOB_ENABLE_ALL} # Enable all jobs for deployment
|
||||
: ${DPL_TERMINATE_TESTS} # Terminate all build test jobs (used in .travis.yml)
|
||||
: ${DPL_TRIGGER} # Use a [word] in the commit message to trigger Deployer
|
||||
: ${DPL_JOBNAMES} # Trigger Deployer by job name
|
||||
: ${DPL_OSNAMES} # Trigger Deployer by OS name (osx,linux)
|
||||
: ${DPL_BRANCHES} # Trigger Deployer by git branch name
|
||||
|
||||
# Job Parameters
|
||||
: ${_DPL_JOB_ENABLED} # Enable Deployer for this specific job. DPL_ENABLED must be set too.
|
||||
: ${_DPL_JOB_NAME} # Identifier for the job, used for logging and trigger word matching
|
||||
: ${_DPL_FTP_TARGET} # Deploy to FTP
|
||||
: ${_DPL_DPUT_TARGET} # Deploy to DPUT
|
||||
: ${_DPL_PACKAGE_SOURCE} # Build packages into a Source distribution. Linux only.
|
||||
: ${_DPL_PACKAGE_BINARY} # Build packages into a Binary distribution.
|
||||
: ${_DPL_PACKAGE_MAIN:=1} # Build main installation package. Linux only; OS X assumes this.
|
||||
: ${_DPL_PACKAGE_ASSET} # Build asset installation package. Linux only.
|
||||
|
||||
# Asset File Parameters
|
||||
: ${ASSET_ARCHIVE_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z}
|
||||
: ${ASSET_ARCHIVE_OPTIONAL_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z}
|
||||
: ${ASSET_FILES_HASHED:=srb2.srb patch.kart gfx.kart textures.kart chars.kart maps.kart}
|
||||
: ${ASSET_FILES_DOCS:=README.txt HISTORY.txt LICENSE.txt LICENSE-3RD-PARTY.txt}
|
||||
: ${ASSET_FILES_OPTIONAL_GET:=0}
|
||||
|
||||
# FTP Parameters
|
||||
: ${DPL_FTP_PROTOCOL}
|
||||
: ${DPL_FTP_USER}
|
||||
: ${DPL_FTP_PASS}
|
||||
: ${DPL_FTP_HOSTNAME}
|
||||
: ${DPL_FTP_PORT}
|
||||
: ${DPL_FTP_PATH}
|
||||
|
||||
# DPUT Parameters
|
||||
: ${DPL_DPUT_DOMAIN:=ppa.launchpad.net}
|
||||
: ${DPL_DPUT_METHOD:=sftp}
|
||||
: ${DPL_DPUT_INCOMING}
|
||||
: ${DPL_DPUT_LOGIN:=anonymous}
|
||||
: ${DPL_SSH_KEY_PRIVATE} # Base64-encoded private key file. Used to sign repository uploads
|
||||
: ${DPL_SSH_KEY_PASSPHRASE} # Decodes the private key file.
|
||||
|
||||
# Package Parameters
|
||||
: ${PACKAGE_NAME:=srb2kart}
|
||||
: ${PACKAGE_VERSION:=1.0.2}
|
||||
: ${PACKAGE_SUBVERSION} # Highly recommended to set this to reflect the distro series target (e.g., ~18.04bionic)
|
||||
: ${PACKAGE_REVISION} # Defaults to UTC timestamp
|
||||
: ${PACKAGE_INSTALL_PATH:=/usr/games/SRB2Kart}
|
||||
: ${PACKAGE_LINK_PATH:=/usr/games}
|
||||
: ${PACKAGE_DISTRO:=trusty}
|
||||
: ${PACKAGE_URGENCY:=high}
|
||||
: ${PACKAGE_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
|
||||
: ${PACKAGE_GROUP_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
|
||||
: ${PACKAGE_WEBSITE:=<https://mb.srb2.org/showthread.php?p=802695>}
|
||||
|
||||
: ${PACKAGE_ASSET_MINVERSION:=1.0.1} # Number this the version BEFORE the actual required version, because we do a > check
|
||||
: ${PACKAGE_ASSET_MAXVERSION:=1.0.3} # Number this the version AFTER the actual required version, because we do a < check
|
||||
|
||||
: ${PROGRAM_NAME:=Sonic Robo Blast 2 Kart}
|
||||
: ${PROGRAM_VENDOR:=Kart Krew}
|
||||
: ${PROGRAM_VERSION:=1.0.2}
|
||||
: ${PROGRAM_DESCRIPTION:=A kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2.}
|
||||
: ${PROGRAM_FILENAME:=srb2kart}
|
||||
|
||||
: ${DPL_PGP_KEY_PRIVATE} # Base64-encoded private key file. Used to sign Debian packages
|
||||
: ${DPL_PGP_KEY_PASSPHRASE} # Decodes the private key file.
|
||||
|
||||
# Export Asset and Package Parameters for envsubst templating
|
||||
|
||||
export ASSET_ARCHIVE_PATH="${ASSET_ARCHIVE_PATH}"
|
||||
export ASSET_ARCHIVE_OPTIONAL_PATH="${ASSET_ARCHIVE_OPTIONAL_PATH}"
|
||||
export ASSET_FILES_HASHED="${ASSET_FILES_HASHED}"
|
||||
export ASSET_FILES_DOCS="${ASSET_FILES_DOCS}"
|
||||
export ASSET_FILES_OPTIONAL_GET="${ASSET_FILES_OPTIONAL_GET}"
|
||||
|
||||
export PACKAGE_NAME="${PACKAGE_NAME}"
|
||||
export PACKAGE_VERSION="${PACKAGE_VERSION}"
|
||||
export PACKAGE_SUBVERSION="${PACKAGE_SUBVERSION}" # in case we have this
|
||||
export PACKAGE_REVISION="${PACKAGE_REVISION}"
|
||||
export PACKAGE_ASSET_MINVERSION="${PACKAGE_ASSET_MINVERSION}"
|
||||
export PACKAGE_ASSET_MAXVERSION="${PACKAGE_ASSET_MAXVERSION}"
|
||||
export PACKAGE_INSTALL_PATH="${PACKAGE_INSTALL_PATH}"
|
||||
export PACKAGE_LINK_PATH="${PACKAGE_LINK_PATH}"
|
||||
export PACKAGE_DISTRO="${PACKAGE_DISTRO}"
|
||||
export PACKAGE_URGENCY="${PACKAGE_URGENCY}"
|
||||
export PACKAGE_NAME_EMAIL="${PACKAGE_NAME_EMAIL}"
|
||||
export PACKAGE_GROUP_NAME_EMAIL="${PACKAGE_GROUP_NAME_EMAIL}"
|
||||
export PACKAGE_WEBSITE="${PACKAGE_WEBSITE}"
|
||||
|
||||
export PROGRAM_NAME="${PROGRAM_NAME}"
|
||||
export PROGRAM_VERSION="${PROGRAM_VERSION}"
|
||||
export PROGRAM_DESCRIPTION="${PROGRAM_DESCRIPTION}"
|
||||
export PROGRAM_FILENAME="${PROGRAM_FILENAME}"
|
||||
|
||||
# This file is called in debian_template.sh, so mark our completion so we don't run it again
|
||||
__DEBIAN_PARAMETERS_INITIALIZED=1
|
||||
@@ -1,133 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# DPUT uploader (e.g., Launchpad PPA)
|
||||
#
|
||||
|
||||
if [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
# Install APT dependencies
|
||||
# paramiko required for ssh
|
||||
sudo apt-get install python-paramiko expect dput; # python-pip
|
||||
#pip install paramiko;
|
||||
|
||||
# Output the DPUT config
|
||||
# Dput only works if you're using secure FTP, so that's what we default to.
|
||||
cat > "./dput.cf" << EOM
|
||||
[deployer]
|
||||
fqdn = ${DPL_DPUT_DOMAIN}
|
||||
method = ${DPL_DPUT_METHOD}
|
||||
incoming = ${DPL_DPUT_INCOMING}
|
||||
login = ${DPL_DPUT_LOGIN}
|
||||
allow_unsigned_uploads = 0
|
||||
EOM
|
||||
|
||||
# Output SSH config
|
||||
# Don't let SSH prompt us for untrusted hosts
|
||||
cat >> "./ssh_config" << EOM
|
||||
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
PubKeyAuthentication yes
|
||||
IdentityFile ${PWD}/key.private
|
||||
IdentitiesOnly yes
|
||||
EOM
|
||||
sudo sh -c "cat < ${PWD}/ssh_config >> /etc/ssh/ssh_config";
|
||||
|
||||
# Get the private key
|
||||
echo "$DPL_SSH_KEY_PRIVATE" | base64 --decode > key.private;
|
||||
chmod 700 ./key.private;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..;
|
||||
|
||||
# Enter passphrase if required
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in $n*.changes; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
expect <(cat <<EOD
|
||||
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
|
||||
expect "Enter passphrase for key"
|
||||
send "${DPL_SSH_KEY_PASSPHRASE}\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..;
|
||||
|
||||
# Enter passphrase if required
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in $n*.changes; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
expect <(cat <<EOD
|
||||
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
|
||||
expect "Enter passphrase for key"
|
||||
send "${DPL_SSH_KEY_PASSPHRASE}\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
srm ./key.private;
|
||||
fi;
|
||||
@@ -1,137 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# FTP Uploader
|
||||
#
|
||||
# Package files are uploaded to, e.g., ftp://username:password@example.com:21/path/to/upload/STJr/SRB2/master/460873812-151.1
|
||||
# With file `commit.txt` and folder(s) `bin` and `package`
|
||||
#
|
||||
# Set these environment variables in your Travis-CI settings, where they are stored securely.
|
||||
# See other shell scripts for more options.
|
||||
#
|
||||
# DPL_FTP_PROTOCOL = ftp (ftp or sftp or ftps or however your FTP URI begins)
|
||||
# DPL_FTP_USER = username
|
||||
# DPL_FTP_PASS = password
|
||||
# DPL_FTP_HOSTNAME = example.com
|
||||
# DPL_FTP_PORT = 21
|
||||
# DPL_FTP_PATH = path/to/upload (do not add trailing slash)
|
||||
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]]; then
|
||||
if [[ "$TRAVIS_JOB_NAME" != "" ]]; then
|
||||
JOBNAME=$TRAVIS_JOB_NAME;
|
||||
else
|
||||
if [[ "$_DPL_JOB_NAME" != "" ]]; then
|
||||
JOBNAME=$_DPL_JOB_NAME;
|
||||
else
|
||||
JOBNAME=$TRAVIS_OS_NAME;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Generate commit.txt file
|
||||
echo "Travis-CI Build $TRAVIS_OS_NAME - $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH - $TRAVIS_JOB_NUMBER - $JOBNAME" > "commit.txt";
|
||||
echo "Job ID $TRAVIS_JOB_ID" >> "commit.txt";
|
||||
echo "" >> "commit.txt";
|
||||
echo "Commit $TRAVIS_COMMIT" >> "commit.txt";
|
||||
echo "$TRAVIS_COMMIT_MESSAGE" >> "commit.txt";
|
||||
echo "" >> "commit.txt";
|
||||
|
||||
# Initialize FTP parameters
|
||||
if [[ "$DPL_FTP_PORT" == "" ]]; then
|
||||
DPL_FTP_PORT=21;
|
||||
fi;
|
||||
if [[ "$DPL_FTP_PROTOCOL" == "" ]]; then
|
||||
DPL_FTP_PROTOCOL=ftp;
|
||||
fi;
|
||||
__DPL_FTP_LOCATION=$DPL_FTP_PROTOCOL://$DPL_FTP_HOSTNAME:$DPL_FTP_PORT/$DPL_FTP_PATH/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_JOB_ID-$TRAVIS_JOB_NUMBER-$JOBNAME;
|
||||
|
||||
# Upload to FTP!
|
||||
echo "Uploading to FTP...";
|
||||
curl --ftp-create-dirs -T "commit.txt" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/commit.txt";
|
||||
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..;
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/main/$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..;
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/asset/$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
else
|
||||
if [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
find bin -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
sudo rm -r package/_CPack_Packages
|
||||
find package -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
|
||||
fi;
|
||||
fi;
|
||||
fi
|
||||
@@ -1,93 +0,0 @@
|
||||
================================================================
|
||||
How to add Low-res modes to your XF86Config under Linux MANUALLY
|
||||
================================================================
|
||||
|
||||
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!!
|
||||
|
||||
This document explains how to add low-res modes like 320x200 to your
|
||||
X-Server configuration, because some new setup tools for the X-Server
|
||||
do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
|
||||
I do not take any responsibility for damage done to your monitor, your
|
||||
videocard, your harddisk, your cat, your dog or anything else!!!
|
||||
IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY
|
||||
MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!!
|
||||
|
||||
OK, if you have read up to here, you either know what you do or really
|
||||
die-hard want those low-res modes. Here is what to do:
|
||||
Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is
|
||||
what you have to add to the definition of your modeslines:
|
||||
|
||||
# Low-res Doublescan modes
|
||||
# If your chipset does not support doublescan, you get a 'squashed'
|
||||
# resolution like 320x400.
|
||||
|
||||
# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio
|
||||
Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan
|
||||
# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio
|
||||
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan
|
||||
# 320x240 @ 72 Hz, 36.5 kHz hsync
|
||||
Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan
|
||||
# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio
|
||||
ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan
|
||||
# 400x300 @ 60 Hz, 37.8 kHz hsync
|
||||
Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan
|
||||
# 400x300 @ 72 Hz, 48.0 kHz hsync
|
||||
Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan
|
||||
|
||||
If your video card only supports a specific set of discrete dotclocks
|
||||
(RAMDAC) you may have to replace the dotclocks given here by one of the
|
||||
specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe
|
||||
that nowadays all cards and monitors should work with these settings, but
|
||||
if you have outdated hardware you better check the frequencies yourself. If
|
||||
there is any uncertainty, please check the "XFree86 Video Timings HOWTO".
|
||||
|
||||
|
||||
Then have a look at the section "Screen" with the appropriate driver
|
||||
(usually either "svga" or "accel"). Under Subsection "Display" there
|
||||
are modes for the given color depth. Add the desired modes. As an
|
||||
example I give you my screens definition here with low-res modes in
|
||||
16 bit color depth:
|
||||
|
||||
Section "Screen"
|
||||
Driver "accel"
|
||||
Device "3D Charger"
|
||||
Monitor "Iiyama Pro 450"
|
||||
DefaultColorDepth 16
|
||||
|
||||
Subsection "Display"
|
||||
Depth 8
|
||||
Modes "1280x1024" "1024x768" "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 1280 1024
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 16
|
||||
Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!!
|
||||
ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^
|
||||
Virtual 1152 864
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 24
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 32
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
EndSection
|
||||
|
||||
Once again: important is, that you edit the correct Screen section.
|
||||
If you use the SVGA Server and edit the ACCEL Server, you might
|
||||
wonder where your new modes have gone.
|
||||
|
||||
If everything went fine and you want to say thank you, just write
|
||||
to "metzgermeister@users.sourceforge.net". If your monitor blew
|
||||
up and you want to kill me, find me playing Legacy or Q3A on the net
|
||||
and frag me (with your second monitor, hehe).
|
||||
|
||||
- metzgermeister
|
||||
@@ -1,212 +0,0 @@
|
||||
1-99 : Player Starts
|
||||
1 - Player 1 Start 1
|
||||
2 - Player 2 Start 2
|
||||
3 - Player 3 Start 3
|
||||
4 - Player 4 Start 4
|
||||
5 - Player 5 Start 4001
|
||||
6 - Player 6 Start 4002
|
||||
7 - Player 7 Start 4003
|
||||
8 - Player 8 Start 4004
|
||||
9 - Player 9 Start 4005
|
||||
10 - Player 10 Start 4006
|
||||
11 - Player 11 Start 4007
|
||||
12 - Player 12 Start 4008
|
||||
13 - Player 13 Start 4009
|
||||
14 - Player 14 Start 4010
|
||||
15 - Player 15 Start 4011
|
||||
16 - Player 16 Start 4012
|
||||
17 - Player 17 Start 4013
|
||||
18 - Player 18 Start 4014
|
||||
19 - Player 19 Start 4015
|
||||
20 - Player 20 Start 4016
|
||||
21 - Player 21 Start 4017
|
||||
22 - Player 22 Start 4018
|
||||
23 - Player 23 Start 4019
|
||||
24 - Player 24 Start 4020
|
||||
25 - Player 25 Start 4021
|
||||
26 - Player 26 Start 4022
|
||||
27 - Player 27 Start 4023
|
||||
28 - Player 28 Start 4024
|
||||
29 - Player 29 Start 4025
|
||||
30 - Player 30 Start 4026
|
||||
31 - Player 31 Start 4027
|
||||
32 - Player 32 Start 4028
|
||||
33 - Player Match Start 11
|
||||
34 - Red Team Start 87
|
||||
35 - Blue Team Start 89
|
||||
36 - Tag start New
|
||||
|
||||
100 - 199 : Enemies
|
||||
100 - Blue Crawla 3004
|
||||
101 - Red Crawla 9
|
||||
102 - GFZ Fish 58
|
||||
103 - Gold Buzz 5005
|
||||
104 - Red Buzz 5006
|
||||
105 - Jetty-Syn Bomber 3005
|
||||
106 - Jetty-Syn Gunner 22
|
||||
107 - Crawla Commander 21
|
||||
108 - Deton 71
|
||||
109 - Skim 56
|
||||
110 - THZ Turret 2004
|
||||
111 - Pop-up Turret 42
|
||||
|
||||
200 - 299 : Bosses and their associated items (if any)
|
||||
200 - Boss 1 16
|
||||
201 - Boss 2 2008
|
||||
290 - Boss Fly Point 17
|
||||
291 - EggTrap Center 2049
|
||||
|
||||
300 - 399 : Collectibles
|
||||
300 - Ring 2014
|
||||
301 - Homing Ring 69
|
||||
302 - Rail Ring 3003
|
||||
303 - Infinity Ring 80
|
||||
304 - Automatic Ring 26
|
||||
305 - Explosion Ring 54
|
||||
306 - Red CTF Flag 31
|
||||
307 - Blue CTF Flag 34
|
||||
308 - Special Stage Token 2013
|
||||
309 - Emerald 1 420
|
||||
310 - Emerald 2 421
|
||||
311 - Emerald 3 422
|
||||
312 - Emerald 4 423
|
||||
313 - Emerald 5 424
|
||||
314 - Emerald 6 425
|
||||
315 - Emerald 7 426
|
||||
316 - Hunting Emerald 1 64
|
||||
317 - Hunting Emerald 2 3002
|
||||
318 - Hunting Emerald 3 3001
|
||||
|
||||
400 - 499 : Boxes
|
||||
400 - Super Ring Box 2011
|
||||
401 - Grey Ring Box 2012
|
||||
402 - Ring Shield Box 48
|
||||
403 - Fire Shield Box 2002
|
||||
404 - Bomb Shield Box 2018
|
||||
405 - Jump Shield Box 35
|
||||
406 - Water Shield Box 2028
|
||||
407 - Sneaker Box 25
|
||||
408 - Invincibility Box 2022
|
||||
409 - 1-Up Box 41
|
||||
410 - Eggman Box 2005
|
||||
411 - Mixup Box 78
|
||||
412 - Question Box 3000
|
||||
|
||||
500 - 599 : Interactive Objects (friendly or otherwise - includes springs)
|
||||
500 - Bubble Patch 33
|
||||
501 - Level End Sign 86
|
||||
502 - Starpost 3006
|
||||
520 - Spike Ball -1
|
||||
521 - Special Stage Spike Ball 23
|
||||
522 - Ceiling Spike 67
|
||||
523 - Floor Spike 68
|
||||
540 - Fan 32
|
||||
541 - Steam Riser 30
|
||||
550 - Yellow Spring 28
|
||||
551 - Red Spring 79
|
||||
552 - Blue Spring 5004
|
||||
553 - Yellow Spring Down 65
|
||||
554 - Red Spring Down 66
|
||||
555 - Yellow Diagonal Spring 2015
|
||||
556 - Red Diagonal Spring 38
|
||||
557 - Yellow Diag Spring Down 20
|
||||
558 - Red Diag Spring Down 39
|
||||
|
||||
600 - 699 : Special placement patterns
|
||||
600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84
|
||||
601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44
|
||||
602 - Diagonal rings (5) 76
|
||||
603 - Diagonal rings (10) 77
|
||||
604 - A ring of rings 47
|
||||
605 - A BIGGER ring of rings 2007
|
||||
606 - A ring of wing items 2048
|
||||
607 - A BIGGER ring of wing items 2010
|
||||
608 - A ring of rings and wings (alternating) 2046
|
||||
609 - A BIGGER ring of rings and wings (alternating) 2047
|
||||
|
||||
700 - 799 : Powerup indicators/environmental effects/miscellany
|
||||
700 - Ambient Water 1a (S) 2026
|
||||
701 - Ambient Water 1b (S) 2024
|
||||
702 - Ambient Water 2a (M) 2023
|
||||
703 - Ambient Water 2b (M) 2045
|
||||
704 - Ambient Water 3a (L) 83
|
||||
705 - Ambient Water 3b (L) 2019
|
||||
706 - Ambient Water 4a (XL) 2025
|
||||
707 - Ambient Water 4b (XL) 27
|
||||
708 - Random Ambient 1 14
|
||||
709 - Random Ambient 2 43
|
||||
750 - Chaos Spawner 8
|
||||
751 - Teleport Point 5003
|
||||
752 - Alternate View Point 5007
|
||||
753 - Zoom Tube Waypoint 18
|
||||
754 - Pusher 5001
|
||||
755 - Puller 5002
|
||||
756 - Street Light 2003
|
||||
|
||||
800 - 899 : Greenflower Scenery
|
||||
800 - Flower 1 36
|
||||
801 - Flower 2 70
|
||||
802 - Flower 3 73
|
||||
804 - Berry Bush 74
|
||||
805 - Bush 75
|
||||
|
||||
900 - 999 : Techno Hill Scenery
|
||||
900 - THZ Plant 2035
|
||||
901 - Alarm 2006
|
||||
|
||||
1000 - 1099 : Deep Sea Scenery
|
||||
1000 - Gargoyle 81
|
||||
|
||||
1100 - 1199 : Castle Eggman Scenery
|
||||
1100 - Ceiling Chain 49
|
||||
1101 - Torch Flame 24
|
||||
1102 - Eggman Statue 52
|
||||
1103 - CEZ Flower 2001
|
||||
|
||||
1200 - 1299 : Arid Canyon Scenery
|
||||
1300 - 1399 : Red Volcano Scenery
|
||||
1400 - 1499 : Dark City Scenery
|
||||
1500 - 1599 : Doom Ship Scenery
|
||||
1600 - 1699 : Egg Rock/Final Fight Scenery
|
||||
1700 - 1799 : NiGHTS Items
|
||||
1700 - Axis 72
|
||||
1701 - Axis Transfer (Normal) 61
|
||||
1702 - Axis Transfer (Line) 46
|
||||
1703 - Nights Drone 60
|
||||
1704 - Nights Bumper 82
|
||||
1705 - Hoop 57
|
||||
1706 - Nights Wing 37
|
||||
1707 - Super Loop Powerup 3007
|
||||
1708 - Drill Refill Powerup 3008
|
||||
1709 - Helper Powerup 3009
|
||||
1710 - Egg Capsule 40
|
||||
|
||||
1800 - 1849 : Mario Items
|
||||
1800 - Coin 10005
|
||||
1801 - Goomba 10000
|
||||
1802 - Blue Goomba 10001
|
||||
1803 - FireFlower 50
|
||||
1804 - Shell 10
|
||||
1805 - Puma 29
|
||||
1806 - Koopa 19
|
||||
1807 - Axe 12
|
||||
1808 - Mario Bush 1 10002
|
||||
1809 - Mario Bush 2 10003
|
||||
1810 - Toad 10004
|
||||
|
||||
1850 - 1899 : Christmas Items
|
||||
1850 - Xmas Pole 5
|
||||
1851 - Candy Cane 13
|
||||
1852 - Snowman 6
|
||||
|
||||
1900 - 1999 : Misc Scenery
|
||||
1900 - Stalagmite 0
|
||||
1901 - Stalagmite 1
|
||||
1902 - Stalagmite 2
|
||||
1903 - Stalagmite 3
|
||||
1904 - Stalagmite 4
|
||||
1905 - Stalagmite 5
|
||||
1906 - Stalagmite 6
|
||||
1907 - Stalagmite 7
|
||||
1908 - Stalagmite 8
|
||||
1909 - Stalagmite 9
|
||||
@@ -1,223 +0,0 @@
|
||||
Description OldNum NewNum Description
|
||||
Old Water 14 Removed
|
||||
|
||||
Level Parameters/Misc:
|
||||
Per-Sector Gravity 64 1
|
||||
Custom Exit 71 2
|
||||
Zoom Tube Parameters 18 3
|
||||
Speed Pad 65 4
|
||||
Camera Scanner 63 5
|
||||
Disable Linedef 73 6
|
||||
Flat Alignment 66 7
|
||||
Sector Special Parameters New 8
|
||||
Mace Parameters New 9
|
||||
Sprite Cull Height New 10
|
||||
Rope Hang Parameters New 11
|
||||
Rock Spawner Parameters New 12
|
||||
|
||||
PolyObjects
|
||||
Marks first line in PolyObject New 20
|
||||
Explicitly includes a PolyObject line New 21
|
||||
PolyObject: Parameters New 22
|
||||
PolyObject: Waving Flag New 31
|
||||
|
||||
Level-Load Effects:
|
||||
Instant Floor Lower 26 50
|
||||
Instant Ceiling Raise 24 51
|
||||
Continuously Falling Sector 88 52
|
||||
Continuous Floor/Ceiling Mover 2 53
|
||||
Continuous Floor Mover 3 54
|
||||
Continuous Ceiling Mover 4 55
|
||||
Continuous Two-Speed Floor/Ceiling Mover 6 56
|
||||
Continuous Two-Speed Floor Mover 7 57
|
||||
Continuous Two-Speed Ceiling Mover 8 58
|
||||
Activate Floating Platform 232 59
|
||||
Activate Floating Platform (Adjustable Speed) 233 60
|
||||
Crusher 1 (Ceiling to Floor) 43 61
|
||||
Crusher 2 (Floor to Ceiling) 50 62
|
||||
Fake Floor/Ceiling 242 63
|
||||
Appearing/Disappearing FOF New 64
|
||||
Bridge Thinker New 65
|
||||
|
||||
Floor Over Floors:
|
||||
"Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100
|
||||
"Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101
|
||||
"Floor Over Floor: Solid, Translucent " 44 102
|
||||
"Floor Over Floor: Solid, Sides Only " 69 103
|
||||
"Floor Over Floor: Solid, No Sides " 51 104
|
||||
"Floor Over Floor: Solid, Invisible " 57 105
|
||||
|
||||
"Floor Over Floor: Water, Opaque " 48 120
|
||||
"Floor Over Floor: Water, Translucent " 45 121
|
||||
"Floor Over Floor: Water, Opaque, No Sides " 75 122
|
||||
"Floor Over Floor: Water, Translucent, No Sides " 74 123
|
||||
|
||||
"Floor Over Floor: Platform, Opaque " 59 140
|
||||
"Floor Over Floor: Platform, Translucent " 81 141
|
||||
"Floor Over Floor: Platform, Translucent, No Sides " 77 142
|
||||
|
||||
Floor Over Floor: Bobbing (Air) 38 150
|
||||
Floor Over Floor: Adjustable Bobbing (Air) 68 151
|
||||
Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152
|
||||
|
||||
"Floor Over Floor: Floating, Bobbing " 34 160
|
||||
|
||||
Floor Over Floor: Crumbling (Respawn) 36 170
|
||||
Floor Over Floor: Crumbling (No Respawn) 35 171
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform " 79 172
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform " 80 173
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating " 37 178
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating " 42 179
|
||||
"Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180
|
||||
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191
|
||||
"Floor Over Floor: Rising Platform, Solid, Translucent " 91 192
|
||||
"Floor Over Floor: Rising Platform, Solid, Invisible " 94 193
|
||||
"Floor Over Floor: Rising Platform, Platform, Opaque " 92 194
|
||||
"Floor Over Floor: Rising Platform, Platform, Translucent " 93 195
|
||||
|
||||
Floor Over Floor: Light Block 49 200
|
||||
Floor Over Floor: Half Light Block 47 201
|
||||
Floor Over Floor: Fog Block 46 202
|
||||
|
||||
"Floor Over Floor: Intangible, Opaque " 62 220
|
||||
"Floor Over Floor: Intangible, Translucent " 52 221
|
||||
"Floor Over Floor: Intangible, Sides Only " 67 222
|
||||
"Floor Over Floor: Intangible, Invisible " 58 223
|
||||
|
||||
Floor Over Floor: Mario Block 41 250
|
||||
Floor Over Floor: Thwomp Block 54 251
|
||||
Floor Over Floor: Shatter Block 76 252
|
||||
"Floor Over Floor: Shatter Block, Translucent " 86 253
|
||||
Floor Over Floor: Bustable Block 55 254
|
||||
Floor Over Floor: Spin Bust Block 78 255
|
||||
"Floor Over Floor: Spin Bust Block, Translucent " 84 256
|
||||
Floor Over Floor: Quicksand Block 56 257
|
||||
Floor Over Floor: Laser Block 53 258
|
||||
Floor Over Floor: Custom 87 259
|
||||
|
||||
Linedef Executor Triggers:
|
||||
Trigger Linedef Executor (Continuous) 96 300
|
||||
Trigger Linedef Executor (Each Time) 97 301
|
||||
Trigger Linedef Executor (Once) 98 302
|
||||
Trigger Linedef Executor (Ring Count - Continuous) 95 303
|
||||
Trigger Linedef Executor (Ring Count - Once) 99 304
|
||||
Trigger Linedef Executor (Character Ability - Continuous) 19 305
|
||||
Trigger Linedef Executor (Character Ability - Each Time) 20 306
|
||||
Trigger Linedef Executor (Character Ability - Once) 21 307
|
||||
"Trigger Linedef Executor (Race Only, Once) " 9 308
|
||||
Trigger Linedef Executor (CTF Red Team - Continuous) 10 309
|
||||
Trigger Linedef Executor (CTF Red Team - Each Time) 11 310
|
||||
Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311
|
||||
Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312
|
||||
Trigger Linedef Executor (No More Enemies - Once) 15 313
|
||||
Trigger Linedef Executor (# of Pushables - Continuous) New 314
|
||||
Trigger Linedef Executor (# of Pushables - Once) New 315
|
||||
Trigger Linedef Executors (PolyObject - Land On) New 316
|
||||
Trigger Linedef Executor (Level Load) New 399
|
||||
|
||||
Linedef Executor Options:
|
||||
Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400
|
||||
Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401
|
||||
Linedef Executor: Set Tagged Sector's Light Level 103 402
|
||||
Linedef Executor: Move Tagged Sector's Floor 106 403
|
||||
Linedef Executor: Move Tagged Sector's Ceiling 107 404
|
||||
Linedef Executor: Lower Floor by Line 108 405
|
||||
Linedef Executor: Raise Floor by Line 109 406
|
||||
Linedef Executor: Lower Ceiling by Line 110 407
|
||||
Linedef Executor: Raise Ceiling by Line 111 408
|
||||
Linedef Executor: Change Calling Sector's Tag 112 409
|
||||
Linedef Executor: Change Front Sector's Tag 114 410
|
||||
Linedef Executor: Stop Plane Movement 116 411
|
||||
Linedef Executor: Teleport Player to Tagged Sector 104 412
|
||||
Linedef Executor: Change Music 105 413
|
||||
Linedef Executor: Play SFX 115 414
|
||||
Linedef Executor: Run Script 113 415
|
||||
Linedef Executor: Start Adjustable Fire Flicker 119 416
|
||||
Linedef Executor: Start Adjustable Glowing Light 120 417
|
||||
Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418
|
||||
Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419
|
||||
Linedef Executor: Fade Light Level 117 420
|
||||
Linedef Executor: Stop Lighting Effect 118 421
|
||||
Linedef Executor: Cut-Away View 121 422
|
||||
Linedef Executor: Change Sky 123 423
|
||||
Linedef Executor: Change Weather 124 424
|
||||
Linedef Executor: Change Object State 125 425
|
||||
Linedef Executor: Stop Object 122 426
|
||||
Linedef Executor: Award Score 126 427
|
||||
Linedef Executor: Start Platform Movement 127 428
|
||||
Linedef Executor: Crush Ceiling Once New 429
|
||||
Linedef Executor: Crush Floor Once New 430
|
||||
Linedef Executor: Crush Floor & Ceiling Once New 431
|
||||
Linedef Executor: Enable 2D Mode New 432
|
||||
Linedef Executor: Disable 2D Mode New 433
|
||||
Linedef Executor: Award Custom Power New 434
|
||||
Linedef Executor: Stop Conveyor New 435
|
||||
Linedef Executor: Start Conveyor New 436
|
||||
Linedef Executor: Disable Player Movement New 437
|
||||
|
||||
Linedef Executor: Execute Linedef Executor New 450
|
||||
|
||||
Linedef Executor: PolyObject: Door Slide New 480
|
||||
Linedef Executor: PolyObject: Door Swing New 481
|
||||
Linedef Executor: PolyObject: Move XY New 482
|
||||
Linedef Executor: PolyObject: Move XY w/ override New 483
|
||||
Linedef Executor: PolyObject: Rotate Right New 484
|
||||
Linedef Executor: PolyObject: Rotate Right w/ override New 485
|
||||
Linedef Executor: PolyObject: Rotate Left New 486
|
||||
Linedef Executor: PolyObject: Rotate Left w/ override New 487
|
||||
Linedef Executor: PolyObject: Start waypoint movement New 488
|
||||
Linedef Executor: PolyObject: Make Invisible New 489
|
||||
Linedef Executor: PolyObject: Make Visible New 490
|
||||
|
||||
Scrollers/Pushers:
|
||||
Scroll Wall First Side Left 100 500
|
||||
Scroll Wall First Side Opposite Direction 85 501
|
||||
Scroll Wall According to Linedef 254 502
|
||||
Acc Scroll Wall According to Linedef 218 503
|
||||
Disp Scroll Wall According to Linedef 249 504
|
||||
Scroll Texture by Offsets 255 505
|
||||
|
||||
Scroll Floor Texture 251 510
|
||||
Acc Scroll Floor Texture 215 511
|
||||
Disp Scroll Floor Texture 246 512
|
||||
Scroll Ceiling Texture 250 513
|
||||
Acc Scroll Ceiling Texture 214 514
|
||||
Disp Scroll Ceiling Texture 245 515
|
||||
|
||||
Carry Objects on Floor (no scroll) 252 520
|
||||
Acc Carry Objects on Floor 216 521
|
||||
Disp Carry Objects on Floor 247 522
|
||||
Carry Objects on Ceiling 203 523
|
||||
Acc Carry Objects on Ceiling 205 524
|
||||
Disp Carry Objects on Ceiling 201 525
|
||||
|
||||
Scroll Floor Texture and Carry Objects 253 530
|
||||
Acc Scroll Floor Texture and Carry Objects 217 531
|
||||
Disp Scroll Floor Texture and Carry Objects 248 532
|
||||
Scroll Ceiling Texture and Carry Objects 202 533
|
||||
Acc Scroll Ceiling Texture and Carry Objects 204 534
|
||||
Disp Scroll Ceiling Texture and Carry Objects 200 535
|
||||
|
||||
Friction 223 540
|
||||
Horizontal Wind 224 541
|
||||
Upwards Wind 229 542
|
||||
Downwards Wind 230 543
|
||||
Horizontal Current 225 544
|
||||
Upwards Current 227 545
|
||||
Downwards Current 228 546
|
||||
Boom Push/Pull Thing 226 547
|
||||
|
||||
Lighting:
|
||||
Floor Lighting 213 600
|
||||
Ceiling Lighting 5 601
|
||||
Adjustable Pulsating Light 60 602
|
||||
Adjustable Flickering Light 61 603
|
||||
Adjustable Blinking Light (unsynchronized) New 604
|
||||
Adjustable Blinking Light (synchronized) New 605
|
||||
Colormap 16 606
|
||||
Binary file not shown.
@@ -1,78 +0,0 @@
|
||||
Removed:
|
||||
- Buttons 1-20 690-709
|
||||
- Button 21 (THZ2 A/740 B/741 D/742 E/745 710
|
||||
- Close Door Blazing (Tag 743) 711
|
||||
- Raise Ceiling to Highest (Tag 744) 981
|
||||
- THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986
|
||||
|
||||
Stuff to Remove/Change:
|
||||
- Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine
|
||||
- Light Blinks On Every 1 Second 3 Add Linedef Combine
|
||||
- Light Pulses Smoothly 8 Remove
|
||||
- Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine
|
||||
- Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine
|
||||
- Light Flickers Like Fire 17 Remove
|
||||
? - Damage (Fire) and Current 519 Remove (convert to combination)
|
||||
? - Damage (Water) and Current 984 Remove (convert to combination)
|
||||
|
||||
Section 1:
|
||||
1 - Damage (Generic) 11
|
||||
2 - Damage (Water) 983
|
||||
3 - Damage (Fire) 7
|
||||
4 - Damage (Electrical) 18
|
||||
5 - Spikes 4
|
||||
6 - Death Pit (Camera Mod) 16
|
||||
7 - Death Pit (No Camera Mod) 5
|
||||
8 - Instant Kill 10
|
||||
9 - Ring Drainer (Floor Touch) 978
|
||||
10 - Ring Drainer (No Floor Touch) 980
|
||||
11 - Special Stage Damage 9
|
||||
12 - Space Countdown 6
|
||||
13 - Ramp Sector (Increase step-up) 992
|
||||
14 - Non-Ramp Sector (Don't step-down) 996
|
||||
15 - Bouncy Sector (FOF Control Only) 14
|
||||
|
||||
Section 2: << 4
|
||||
1 - Trigger Linedef Exec (Pushable Objects) 971
|
||||
2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972
|
||||
3 - Trigger Linedef Exec (Floor Touch/All Pls) 973
|
||||
4 - Trigger Linedef Exec (Anywhere in Sec) 974
|
||||
5 - Trigger Linedef Exec (Floor Touch) 975
|
||||
6 - Trigger Linedef Exec (Emerald Check) 967
|
||||
7 - Trigger Linedef Exec (NiGHTS Mare) 968
|
||||
8 - Check for linedef executor on FOFs (ANY) 970
|
||||
9 - Egg Trap Capsule 666
|
||||
10 - Special Stage Time/Rings, Par 990
|
||||
11 - Custom Global Gravity 991
|
||||
|
||||
Section 3: << 8
|
||||
1 - Ice/Sludge (required?!) 256
|
||||
2 - Wind/Current (required?!) 512
|
||||
3 - Ice/Sludge and Wind/Current 768
|
||||
4 - Conveyor Belt 985
|
||||
5 - Speed Pad (No Spin) 976
|
||||
6 - Speed Pad (Spin) 977
|
||||
7 - Bustable Block Sprite Parameter 1500-1515
|
||||
8 - "
|
||||
9 - "
|
||||
10 - "
|
||||
11 - "
|
||||
12 - "
|
||||
13 - "
|
||||
14 - "
|
||||
15 - "
|
||||
|
||||
Section 4: << 12
|
||||
1 - Starpost Activator 993
|
||||
2 - Special Stage Goal Combine 33
|
||||
2 - Exit Sector Combine 982
|
||||
2 - No Tag Zone Combine 987
|
||||
2 - CTF: Flag Return Combine 995
|
||||
3 - CTF: Red Team Base 988
|
||||
4 - CTF: Blue Team Base 989
|
||||
5 - Fan Sector 997
|
||||
6 - Super Sonic Transform 969
|
||||
7 - Spinner 979
|
||||
8 - Zoom Tube Start 998
|
||||
9 - Zoom Tube End 999
|
||||
10 - Finish Line 994
|
||||
-307
@@ -1,307 +0,0 @@
|
||||
SRB2
|
||||
Release v1.09, ? 2005.
|
||||
|
||||
Last Updated: June 2005
|
||||
|
||||
Original game & sources by: Id Software.
|
||||
Additions: (c)1998 by: Fabrice Denis & Boris Pereira
|
||||
(c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2000 by: Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis
|
||||
|
||||
Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for
|
||||
their large contribution and to other DooM LEGACY & SRB2 Team members.
|
||||
|
||||
Web site: http://www.SRB2.org/
|
||||
e-mail: none@none.com
|
||||
|
||||
OpenGL specific:
|
||||
Web site: http://legacy.newdoom.com/gl
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
F.A.Q.
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
||||
If you have any trouble with SRB2, you might find a solution
|
||||
here.
|
||||
|
||||
If you find a solution to a problem that was not listed here,
|
||||
please tell us so that we can update the FAQ and help other people!
|
||||
|
||||
Mail your hardware/software problems to:
|
||||
|
||||
None@none.com subject: FAQ
|
||||
|
||||
|
||||
--------
|
||||
CONTENTS
|
||||
--------
|
||||
|
||||
[0] Miscellaneous
|
||||
[1] Mouse/Joystick/Keyboard
|
||||
[2] Video
|
||||
[3] Sound
|
||||
[4] Network
|
||||
[5] Troubleshooting
|
||||
|
||||
|
||||
-----------------
|
||||
[0] MISCELLANEOUS
|
||||
-----------------
|
||||
|
||||
* under win95 or OS/2, I don't have enough memory. How can i handle with ?
|
||||
|
||||
Tell win95 to put more dpmi memory for your dos box.
|
||||
Or use the -mb option.
|
||||
|
||||
|
||||
|
||||
---------------------------
|
||||
[1] MOUSE/JOYSTICK/KEYBOARD
|
||||
---------------------------
|
||||
|
||||
* My mouse/joystick does not work in SRB2.
|
||||
|
||||
First, check that the mouse/joystick is activated : go at the
|
||||
console and type either 'use_mouse' (or use the respective
|
||||
menuitem) or 'use_joystick'.
|
||||
|
||||
If it tells '0' or off than the mouse/joystick is not used,
|
||||
set the variable to 1. eg: 'use_mouse 1'.
|
||||
|
||||
For the joystick, different values will support different
|
||||
types of joystick, check the console documentation for the
|
||||
command 'use_joystick' for more.
|
||||
|
||||
Even if the mouse or joystick is activated, you have to
|
||||
set up the contols into the Setup Controls menu. That is:
|
||||
tell what use you will make of the mouse/joystick buttons.
|
||||
|
||||
|
||||
---------
|
||||
[2] VIDEO
|
||||
---------
|
||||
|
||||
|
||||
* Where are the other video modes ? I have only '320x200' in the
|
||||
Video Modes menu.
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
SRB2 adds new video modes only if a VESA2 (or better) driver
|
||||
is present. The VESA2 driver is a standard of 'talking' between a
|
||||
program and the huge amount of different graphics cards
|
||||
available today.
|
||||
|
||||
If you don't have a VESA2 driver, you can download UNIVBE, or
|
||||
SMART DISPLAY DOCTOR from
|
||||
|
||||
http://www.scitechsoft.com/products/ent/free_titles.html
|
||||
|
||||
or if you have an S3 based card, you can download the free
|
||||
software called 'S3VBE'.
|
||||
|
||||
ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip
|
||||
ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip
|
||||
http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip
|
||||
http://www.google.com/search?q=s3vbe318.zip
|
||||
|
||||
* The game doesn't restore the video mode I have chosen the last time
|
||||
I played SRB2.
|
||||
|
||||
The current video mode has to be made the 'default' so that it is
|
||||
saved to the config : press the key 'D' on the Video Options menu
|
||||
to set the current video mode the default.
|
||||
|
||||
* I have some problems with OpenGL mode
|
||||
|
||||
Have a look at the FAQ for OpenGL on the glLegacy web site:
|
||||
|
||||
http://www.doomnation.com/gllegacy/faqe.htm
|
||||
|
||||
# Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution
|
||||
in fullscreen mode under X and SRB2 is really really slow. Can I
|
||||
have lower resolutions like 320x200 in fullscreen mode as well?
|
||||
|
||||
Probably yes. SRB2 can only use the resolutions offered by the
|
||||
X-Server. So if all fullscreen modes have a very high resolution you
|
||||
have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup
|
||||
(or the appropriate tool coming with your distribution - sax,
|
||||
xf86config, ...) to do this.
|
||||
If you do not succeed there, you can enter them manually into your
|
||||
XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
For a short guide on how to do this, have a look at the file
|
||||
"Doublescan.txt".
|
||||
In case of doubt consult the XFree86-HOWTO (or ask your system
|
||||
administrator :).
|
||||
|
||||
# Linux: I cannot have any fullscreen modes at all!
|
||||
|
||||
You have only modes above 1024x768 in your XF86Config. Proceed as
|
||||
described above.
|
||||
|
||||
# Linux: After a certain idle time my screensaver jams the display of
|
||||
SRB2. I can still operate SRB2, but I do not see what's happening
|
||||
and the screensaver won't go away.
|
||||
|
||||
You probably have KDE. The KDE screensaver does not obey the screensaver
|
||||
rules (at least mine, version 1.1). The solution is to deactivate the
|
||||
KDE screensaver and use another screensaver (like the xscreensaver,
|
||||
e.g.). But the hell, when you started SRB2 you should have played it
|
||||
as well and not left it alone!!!
|
||||
|
||||
---------
|
||||
[3] SOUND
|
||||
---------
|
||||
|
||||
+ DOS:I can't have CD audio music, why ?
|
||||
|
||||
Make sure that the MSCDEX driver version 2.0 or later is loaded.
|
||||
If it says 'MSCDEX version xxx' at game startup, and you still
|
||||
don't hear the cd music, then probably your card doesn't respond
|
||||
when SRB2 tries to set the cd volume. If so, make sure your sound
|
||||
card's mixer have the cd volume set up so that you can hear something.
|
||||
|
||||
+ When the CD plays, the game is very 'jerky'. It doesn't do that when
|
||||
I type 'cd off' in the console.
|
||||
|
||||
You have an old/bad cd driver, that can take up to a second to
|
||||
respond to cd driver commands. Either get the latest version of
|
||||
your driver, or turn cd update off. Check 'cd_udpate' in the
|
||||
console documentation for more.
|
||||
|
||||
* DOS:How can I *ALWAYS* disable the sounds or music of the game ?
|
||||
|
||||
Edit the allegro.cfg file and set digicard/midicard to 0 (none)
|
||||
|
||||
* DOS:My sterero sound is reversed, how can I set it the right way ?
|
||||
|
||||
Change the console variable 'stereoreverse' to either 1 or 0.
|
||||
Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable.
|
||||
|
||||
|
||||
* DOS:The sounds are too 'slow', or 'low-pitched'
|
||||
|
||||
It seems to be a problem of the auto-detection of some 8bit sound
|
||||
cards. You will have to set manually the 'sb_freq' value in the
|
||||
allegro.cfg file to a lower value : 11906, 16129.
|
||||
|
||||
* DOS:SRB2 doesn't play any sound/music, but I have a sound
|
||||
blaster genuine/compatible card.
|
||||
|
||||
If you have a genuine or compatible SoundBlaster card, it is very
|
||||
important that you set the BLASTER environment variable.
|
||||
|
||||
If you are playing under DOS, and never installed your sound card
|
||||
under DOS, run the setup of your sound card for DOS.
|
||||
|
||||
Check if the BLASTER variable was set: type 'SET' under dos
|
||||
(or DOSbox)
|
||||
|
||||
Do you see something like 'BLASTER=A220 I5 D1 ...' ?
|
||||
|
||||
Yes? If you don't hear sounds/music, then tweak the settings in the
|
||||
allegro.cfg file until you get something, first try changing the
|
||||
type of the sound card, it is not always properly detected.
|
||||
|
||||
No? You have to set this variable in order that your sound card is
|
||||
detected. Run the setup that was shipped with your sound card, and
|
||||
make sure you run the setup for DOS too, it will usually add a
|
||||
line of the type 'SET BLASTER=... ...' in the autoexec.bat file.
|
||||
|
||||
|
||||
* DOS:How can I have better midi music on my 8bit sound card ?
|
||||
|
||||
Use the DIGMID driver, it is supported in SRB2.
|
||||
|
||||
What the hell is this? Well, the Gravis Ultrasound uses digital
|
||||
samples to play midi music. On a simple 8bit card, you can use digital
|
||||
samples too, which will sound usually better than what is output
|
||||
by the poor fm synthesis chip of 8bit cards.
|
||||
|
||||
You will need to get a Gravis Ultrasound patch set, you can find
|
||||
several ones for free on internet, it consists of a bunch of '.pat'
|
||||
files which are the digital samples to play the midi instruments
|
||||
(eg: piano, conga, guitar, ect.).
|
||||
|
||||
Check the Allegro homepage for some links to GUS patches:
|
||||
http://alleg.sourceforge.net/digmid.html
|
||||
http://alleg.sourceforge.net/
|
||||
http://www.talula.demon.co.uk/allegro/digmid.html
|
||||
http://www.talula.demon.co.uk/allegro/
|
||||
|
||||
Now to activate the DIGMID driver:
|
||||
|
||||
Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file.
|
||||
Make sure you leave the 'digi_voices' blank, or set it to a low
|
||||
value, because the midi music will use digital voices.
|
||||
At the end of the allegro.cfg file, set the 'patches' value
|
||||
to the path, where you have installed a Gravis Ultrasound midi
|
||||
patch set. eg: patches = d:\music\midipat\
|
||||
|
||||
# Linux: CD music does not work or only works when run as root.
|
||||
|
||||
We do not encourage you to run SRB2 as root (you never know
|
||||
what SRB2 can do to your system - it's a mighty piece of code :).
|
||||
There is a common problem with ATAPI CD-rom drives, which are
|
||||
treated as harddisks. Usually there is a link /dev/cdrom pointing to
|
||||
device hd[b,c,d]. As harddisks are not supposed to be read directly
|
||||
via this device (especially not by a common user), there are no read
|
||||
permissions for "all". For CD-roms you can savely set read permissions
|
||||
unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc,
|
||||
set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives
|
||||
should not have this problem. But if they do, proceed as described
|
||||
with ATAPI drives.
|
||||
|
||||
# Linux: The CD music volume is not set properly.
|
||||
|
||||
Go to the console and type "jigglecdvolume 1".
|
||||
|
||||
-----------
|
||||
[4] NETWORK
|
||||
-----------
|
||||
|
||||
* Where can I find Internet servers ?
|
||||
|
||||
For the moment there is one public server.
|
||||
http://srb2.servegame.org/ Master server web page
|
||||
srb2.servegame.org:28910 current Master Server
|
||||
|
||||
* When I start SRB2 with -server or -connect it say :
|
||||
"BinToPort: Address already in use (EADDRINUSE)"
|
||||
|
||||
It appears only when SRB2 crashes or when you leave with ctrl-break.
|
||||
use -udpport 12345 (or any other free slot) on both sides (client and
|
||||
server).
|
||||
|
||||
This can also happens when there is already a SRB2 running on your
|
||||
computer if you whant to try two SRB2 running on the same computer
|
||||
use -clientport 12345 (or any other free slot). Then the second will
|
||||
connect to the first one.
|
||||
|
||||
* Do you use the tcp protocol ?
|
||||
|
||||
No, we use the udp protocol which is faster, but don't worry udp is a
|
||||
part of the internet protocol.
|
||||
|
||||
|
||||
-------------------
|
||||
[5] Troubleshooting
|
||||
-------------------
|
||||
|
||||
# Linux: SRB2 is hung in fullscreen mode and won´t let me leave.
|
||||
What shall I do?
|
||||
|
||||
Some people press the reset button, but hey, we are not in the
|
||||
stoneage of operating systems! There are two "proper" ways to
|
||||
get out: kill your X-Server. You can usually do this by pressing
|
||||
"CTRL-ALT-BACKSPACE". But if you have other open applications with
|
||||
important data (probably hacked away on your diploma thesis for 3
|
||||
weeks without saving once) you can also kill SRB2 directly. Press
|
||||
"CTRL-ALT-F2" and you will get to a console. Log in, type
|
||||
"killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7".
|
||||
Some X-Server crash on this procedure - blame the X-Server for the
|
||||
loss of 3 weeks work on your diploma thesis :)
|
||||
@@ -1,68 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Sonic Robo Blast 2 Manual
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="srb2manstyle.css">
|
||||
<!-- Borrowed some javascript code so the height of the iframe is equal to the size of the document - Sonict -->
|
||||
<script type="text/javascript">
|
||||
/* free code from dyn-web.com */
|
||||
|
||||
function getDocHeight(doc) {
|
||||
doc = doc || document;
|
||||
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
|
||||
var body = doc.body, html = doc.documentElement;
|
||||
var height = Math.max( body.scrollHeight, body.offsetHeight,
|
||||
html.clientHeight, html.scrollHeight, html.offsetHeight );
|
||||
return height;
|
||||
}
|
||||
|
||||
function setIframeHeight(id) {
|
||||
var ifrm = document.getElementById(id);
|
||||
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
|
||||
ifrm.style.visibility = 'hidden';
|
||||
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
|
||||
ifrm.style.height = getDocHeight( doc ) + "px";
|
||||
ifrm.style.visibility = 'visible';
|
||||
}
|
||||
</script>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<p class="c1">
|
||||
<img src="manual_img/sonicname2.png" alt="SONIC" width="136" height="36">
|
||||
<br>
|
||||
<img src="manual_img/srb2banner.png" alt="ROBO BLAST 2" width="224" height="43">
|
||||
</p>
|
||||
<p class="c1">
|
||||
<big><big><strong>Manual</strong></big></big>
|
||||
</p>
|
||||
<table class="cf" align="center">
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="intro.htm" target="ifrm">Main</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="items.htm" target="ifrm">Items</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="playerabilities.htm" target="ifrm">Player Abilities</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="basicplay.htm" target="ifrm">Gameplay</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="surroundings.htm" target="ifrm">Surroundings</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="multiplayer.htm" target="ifrm">Multiplayer</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="zones.htm" target="ifrm">Zones</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="controls.htm" target="ifrm">Controls</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="consolecommands.htm" target="ifrm">Console Commands</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="misc.htm" target="ifrm">Misc</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p class="c1">
|
||||
<!-- The "onload" property of the iframe makes an error when validated through the W3C validation checker. -->
|
||||
<!-- This will not be fixed as it isn't worth the time to fix it up properly. - Sonict -->
|
||||
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,39 +0,0 @@
|
||||
SVN-RULES
|
||||
|
||||
- As you can see, there is sub-directory in the repository, one for eatch
|
||||
platform (djgpp (dos),win32,SDL) the root directory is for all platform,
|
||||
so take care of the order we have put in.
|
||||
- do not commit/upload tests of bugged code, try to fix a maximum of know
|
||||
bugs and update know bugs list in source.txt. If you must commit your source
|
||||
make your code in #ifdef so we can disable it
|
||||
- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature
|
||||
and visual addition.
|
||||
- Maximize communications between members, do not impose your changes, if your
|
||||
are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room.
|
||||
|
||||
CODE-RULES
|
||||
|
||||
- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred
|
||||
and for makefile)
|
||||
- Self documented code, variable and function must have a name that help
|
||||
understand the code, so do not call variable and function a,b, a2, ...
|
||||
- the usage of extern in a c file is prohibited, except for declaration of a
|
||||
function with body (so it is like public keyword in c++)
|
||||
Also function protos haren't allowed for external function, put it un the
|
||||
corresponding h file.
|
||||
- Try to minimize #ifdef usage for :
|
||||
- code readability
|
||||
- the main code is for all port so if something is good for a platform all
|
||||
platform can benefit by this feature
|
||||
- Take care of platform dependent code, we would like to have code that work
|
||||
on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl.
|
||||
|
||||
GOOD PRACTICE
|
||||
|
||||
- Try to put as mush static variable and function on module so it help to
|
||||
understand the role of the varaible/function in the module also this
|
||||
help the compiler to optimize
|
||||
- minimise global variable
|
||||
- make a log of your work, so you don't need to put a lot of comment in
|
||||
the code, this will also help us to update the what's new section of doc
|
||||
when doing final release
|
||||
-240
@@ -1,240 +0,0 @@
|
||||
|
||||
1. Compile SRB2
|
||||
2. Explanation of the code
|
||||
2.1 The memory model
|
||||
2.2 Hardware Texture model
|
||||
|
||||
1. Compile SRB2
|
||||
=================
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
need:
|
||||
- djgpp 2.03 (http://www.delorie.com/djgpp/)
|
||||
- allegro 3.12 (http://alleg.sourceforge.net/index.html)
|
||||
(
|
||||
- libsocket 0.7.4 (beta 4) or better
|
||||
for use with Winsock 1.1 (example Windows 3.1)
|
||||
(http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm)
|
||||
OR
|
||||
- Wattcp-32 v2.2 dev.rel 6 or better
|
||||
For use with a packet driver
|
||||
(http://www.bgnett.no/~giva/)
|
||||
(http://groups.yahoo.com/group/watt-32/)
|
||||
(http://groups.yahoo.com/group/watt-32/files/v2.2/)
|
||||
)
|
||||
- bcd 1.03 (inlcude in this package)
|
||||
- gcc 2.95.2 is recommended
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
|
||||
compile:
|
||||
make
|
||||
make WATTCP=1 (to make a Wattcp-32 version)
|
||||
|
||||
debug:
|
||||
when craching SRB2 will return eip
|
||||
type make asm, then you will have a 8 megs srb2.s (a assembler file)
|
||||
the you can find the faulting instruction and function
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Linux/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
- ibogg and libvorbis (http://Xiph.org/)
|
||||
- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1
|
||||
|
||||
compile
|
||||
make LINUX=1
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32
|
||||
-----
|
||||
|
||||
need :
|
||||
- glide 3.x sdk (optional) (http://www.3dfx.com)
|
||||
- directx6 sdk (or higher) (http://www.micosoft.com/directx)
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
- use src\win32\wLegacy.dsp
|
||||
- VC6 should also work with VC5, and VS.NET 200X
|
||||
|
||||
debug:
|
||||
press on "step over" with the release version (there is some debug info
|
||||
on it). Then change the eip in the regster window when you will type
|
||||
enter the edi will go to the faulting instruction. don't forget that
|
||||
you can follow the stack for calls.
|
||||
You can also use trace with the debug version but add -win and -nomouse.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32/minGW/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
|
||||
compile
|
||||
make minGW=1 SDL=1
|
||||
or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
WinCE/SDL WIP
|
||||
-----
|
||||
|
||||
need:
|
||||
- ActiveSync 3.8
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
|
||||
|
||||
- ActiveSync 3.7.1, if 3.8 isn't available for your language
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx
|
||||
|
||||
- eMbedded Visual Tools 3.0 - 2002 Edition
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd
|
||||
|
||||
- Pocket PC 2000 SDK
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4
|
||||
|
||||
- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92
|
||||
|
||||
- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3
|
||||
|
||||
- eMbedded Visual C++ 4.0
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b
|
||||
|
||||
OR
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5
|
||||
|
||||
- eMbedded Visual C++ 4.0 Update 5625 (SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1
|
||||
|
||||
- Windows CE: Standard Software Development Kit
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7
|
||||
|
||||
- SDK for Windows Mobile 2003-based Pocket PCs
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652
|
||||
|
||||
- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C
|
||||
|
||||
- Microsoft Device Emulator 1.0 Community Preview
|
||||
http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website
|
||||
|
||||
- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
|
||||
(if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762
|
||||
|
||||
- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3
|
||||
|
||||
- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE)
|
||||
|
||||
compile
|
||||
use src\SDL\WinCE\SRB2CE.vcw
|
||||
|
||||
debug:
|
||||
?
|
||||
|
||||
|
||||
2. Explanation of the code
|
||||
==========================
|
||||
|
||||
2.1 The memory model (original) (z_zone.c) (by BP)
|
||||
--------------------
|
||||
|
||||
SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function
|
||||
to allocate in this heap.
|
||||
|
||||
Z_Malloc( int size,int tag,void* user )
|
||||
|
||||
size is the size in byte
|
||||
tag can be : PU_STATIC allocated static (like malloc do)
|
||||
call Z_Free to free it
|
||||
PU_LEVEL same as static but the zone is "tagged" with the
|
||||
tag PU_LEVEL, when calling
|
||||
Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged
|
||||
with PU_LEVEL are freed (at the end of the level)
|
||||
PU_CACHE this one _can_ be freed automatiquely by one other
|
||||
call to Z_Malloc. the *user point to a pointer
|
||||
to this zone so when freed automatiquely the
|
||||
pointer is set to NULL so eatch time you use it
|
||||
you must check if the pointer is not NULL and
|
||||
reload it.
|
||||
|
||||
(...)
|
||||
|
||||
2.2 Hardware Texture model (by BP)
|
||||
--------------------------
|
||||
|
||||
Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at
|
||||
runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware
|
||||
texture a gr_texture so there is no confusion.
|
||||
|
||||
To remind you :
|
||||
- Texture are set of patch and are associate to linedefs (walls) can be
|
||||
upper, lower or middle texture. It can have hole on it.
|
||||
- patch are sprites (the doom patch are run of vertical lines)
|
||||
- flats are used for floors and ceiling of sectors and have size of 64x64
|
||||
it can't have hole on it
|
||||
- pic are new legacy format for picture, it can only handle plain texture
|
||||
like flats it is now used for hud in full screen for the main picture
|
||||
of legacy and for coronas (the format was extended to handle 32 bit color
|
||||
or intensity + alpha, not all are implemented at this time)
|
||||
|
||||
Since patch, flat and pic are basic structure represented by only one lump in
|
||||
the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx)
|
||||
and init data field to NULL. Since the data structure is allocated in
|
||||
PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed
|
||||
(hw_cache.c).
|
||||
|
||||
The GlideMipmap_s structures for textures are initialized on
|
||||
HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level)
|
||||
the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this
|
||||
can be changed in runtime in SRB2 (load a wad while runing) it must be
|
||||
reallocated. Well, at this time it is realloceted at eatch level start. We
|
||||
can do better, since numtextures change only when a wad is loaded.
|
||||
|
||||
The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the
|
||||
card in fifo order when there is no more place it remove the first gr_texture,
|
||||
the downloaded field of GlideMipmap_s go to false and when needed it is
|
||||
reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there
|
||||
own memory and handle gr_texture memory of the card we no more need to
|
||||
redownload it but if we not free time to time gr_texture memory in opengl,
|
||||
it will get alot of memory, so the gr_texture memory is cleared at eatch
|
||||
new level (same time of texture reallocation). Opengl and 3dfx link the
|
||||
loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear
|
||||
textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx !
|
||||
|
||||
SRB2 can also draw patch with a differant colormap (thanks to Hurdler).
|
||||
When needed it create the same gr_texture but just with a differant colormap.
|
||||
This one is linked with the original in the GlideMipmap_s with the
|
||||
nextcolormap field.
|
||||
|
||||
So when a polygone with a gr_texture must be drawn, first we check if the
|
||||
gr_textures is not allready loaded in hadware memory (downloaded field) if
|
||||
not then we check if gr_texture data is there (not grabbed by z_malloc
|
||||
function) if not we must recompute it eatch type of gr_texture (texture,
|
||||
patch, flat, pic have there own methode) the we can send the gr_texture
|
||||
to 3dfx or OpenGl.
|
||||
-1992
File diff suppressed because it is too large.
Load diff
@@ -5,13 +5,13 @@
|
||||
# met:
|
||||
|
||||
# (1) Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# (2) Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
|
||||
# distribution.
|
||||
|
||||
# (3) The name of the author may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
@@ -26,4 +26,4 @@
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -10,8 +10,18 @@ The libbacktrace library may be linked into a program or library and
|
||||
used to produce symbolic backtraces.
|
||||
Sample uses would be to print a detailed backtrace when an error
|
||||
occurs or to gather detailed profiling information.
|
||||
|
||||
In general the functions provided by this library are async-signal-safe,
|
||||
meaning that they may be safely called from a signal handler.
|
||||
That said, on systems that use `dl_iterate_phdr`, such as GNU/Linux,
|
||||
the first call to a libbacktrace function will call `dl_iterate_phdr`,
|
||||
which is not in general async-signal-safe. Therefore, programs
|
||||
that call libbacktrace from a signal handler should ensure that they
|
||||
make an initial call from outside of a signal handler.
|
||||
Similar considerations apply when arranging to call libbacktrace
|
||||
from within malloc; `dl_iterate_phdr` can also call malloc,
|
||||
so make an initial call to a libbacktrace function outside of
|
||||
malloc before trying to call libbacktrace functions within malloc.
|
||||
|
||||
The libbacktrace library is provided under a BSD license.
|
||||
See the source files for the exact license text.
|
||||
@@ -25,7 +35,7 @@ will work.
|
||||
See the source file backtrace-supported.h.in for the macros that it
|
||||
defines.
|
||||
|
||||
As of October 2020, libbacktrace supports ELF, PE/COFF, Mach-O, and
|
||||
As of July 2024, libbacktrace supports ELF, PE/COFF, Mach-O, and
|
||||
XCOFF executables with DWARF debugging information.
|
||||
In other words, it supports GNU/Linux, *BSD, macOS, Windows, and AIX.
|
||||
The library is written to make it straightforward to add support for
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
# libbacktrace.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libbacktrace.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libbacktrace.
|
||||
current=0
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=no
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/mingw64/lib'
|
||||
@@ -0,0 +1,41 @@
|
||||
# libbacktrace.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libbacktrace.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libbacktrace.
|
||||
current=0
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/mingw64/lib'
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
@@ -1,3 +1,4 @@
|
||||
/cscope.out
|
||||
*.json
|
||||
*.idx
|
||||
*.gdb_history
|
||||
+88
-37
@@ -2,6 +2,8 @@
|
||||
|
||||
# Core sources
|
||||
set(SRB2_CORE_SOURCES
|
||||
core/memory.cpp
|
||||
core/thread_pool.cpp
|
||||
am_map.c
|
||||
b_bot.c
|
||||
command.c
|
||||
@@ -18,17 +20,21 @@ set(SRB2_CORE_SOURCES
|
||||
f_wipe.c
|
||||
filesrch.c
|
||||
g_game.c
|
||||
g_demo.c
|
||||
g_input.c
|
||||
hu_stuff.c
|
||||
i_tcp.c
|
||||
info.c
|
||||
k_hud.c
|
||||
lzf.c
|
||||
m_aatree.c
|
||||
m_anigif.c
|
||||
m_argv.c
|
||||
m_bbox.c
|
||||
m_cheat.c
|
||||
m_curl.c
|
||||
m_cond.c
|
||||
m_emotes.cpp
|
||||
m_fixed.c
|
||||
m_menu.c
|
||||
m_textinput.c
|
||||
@@ -40,19 +46,25 @@ set(SRB2_CORE_SOURCES
|
||||
mserv.c
|
||||
http-mserv.c
|
||||
qs22j.c
|
||||
r_skins.c
|
||||
s_sound.c
|
||||
screen.c
|
||||
sounds.c
|
||||
st_stuff.c
|
||||
#string.c
|
||||
string.c
|
||||
tables.c
|
||||
v_video.c
|
||||
w_wad.c
|
||||
y_inter.c
|
||||
z_zone.c
|
||||
z_zone.cpp
|
||||
)
|
||||
|
||||
set(SRB2_CORE_HEADERS
|
||||
core/memory.h
|
||||
core/thread_pool.h
|
||||
m_curl.h
|
||||
m_emotes.h
|
||||
k_hud.h
|
||||
am_map.h
|
||||
b_bot.h
|
||||
byteptr.h
|
||||
@@ -78,6 +90,7 @@ set(SRB2_CORE_HEADERS
|
||||
fastcmp.h
|
||||
filesrch.h
|
||||
g_game.h
|
||||
g_demo.h
|
||||
g_input.h
|
||||
g_state.h
|
||||
hu_stuff.h
|
||||
@@ -109,6 +122,7 @@ set(SRB2_CORE_HEADERS
|
||||
md5.h
|
||||
mserv.h
|
||||
qs22j.h
|
||||
r_skins.h
|
||||
s_sound.h
|
||||
screen.h
|
||||
sounds.h
|
||||
@@ -123,18 +137,18 @@ set(SRB2_CORE_HEADERS
|
||||
)
|
||||
|
||||
set(SRB2_CORE_RENDER_SOURCES
|
||||
r_bsp.c
|
||||
r_bsp.cpp
|
||||
r_data.c
|
||||
r_draw.c
|
||||
r_fps.c
|
||||
r_main.c
|
||||
r_patch.c
|
||||
r_patchrotation.c
|
||||
r_plane.c
|
||||
r_segs.c
|
||||
r_draw.cpp
|
||||
r_fps.cpp
|
||||
r_main.cpp
|
||||
r_patch.cpp
|
||||
r_patchrotation.cpp
|
||||
r_plane.cpp
|
||||
r_segs.cpp
|
||||
r_sky.c
|
||||
r_splats.c
|
||||
r_things.c
|
||||
r_things.cpp
|
||||
r_portal.c
|
||||
|
||||
r_bsp.h
|
||||
@@ -162,7 +176,7 @@ set(SRB2_CORE_GAME_SOURCES
|
||||
p_inter.c
|
||||
p_lights.c
|
||||
p_map.c
|
||||
p_maputl.c
|
||||
p_maputl.cpp
|
||||
p_mobj.c
|
||||
p_polyobj.c
|
||||
p_saveg.c
|
||||
@@ -193,10 +207,6 @@ set(SRB2_CORE_GAME_SOURCES
|
||||
k_stats.h
|
||||
)
|
||||
|
||||
if(NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
|
||||
endif()
|
||||
|
||||
prepend_sources(SRB2_CORE_SOURCES)
|
||||
prepend_sources(SRB2_CORE_HEADERS)
|
||||
prepend_sources(SRB2_CORE_RENDER_SOURCES)
|
||||
@@ -226,10 +236,23 @@ set(SRB2_CONFIG_HWRENDER ON CACHE BOOL
|
||||
"Enable hardware rendering through OpenGL.")
|
||||
set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
|
||||
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
||||
set(SRB2_CONFIG_USE_FBO_OGL ON CACHE BOOL
|
||||
"Enable OpenGL FBO Downsampling support.")
|
||||
set(SRB2_CONFIG_DEDICATED OFF CACHE BOOL
|
||||
"Build a dedicated server.")
|
||||
set(SRB2_CONFIG_LIBBACKTRACE ON CACHE BOOL
|
||||
"Enable using libbacktrace for crashlogs.")
|
||||
set(SRB2_CONFIG_LTO ON CACHE BOOL
|
||||
"Enable link time optimizations, improves performance at the cost of longer link times.")
|
||||
set(SRB2_CONFIG_ASAN OFF CACHE BOOL
|
||||
"Compile with AddressSanitizer (libasan).")
|
||||
set(SRB2_CONFIG_UBSAN OFF CACHE BOOL
|
||||
"Compile with UndefinedBehaviorSanitizer (libubsan).")
|
||||
|
||||
set(SRB2_CONFIG_SATURNPAK ON CACHE BOOL
|
||||
"Enable Saturn specific special packet. Required for using the newer resynch system")
|
||||
set(SRB2_CONFIG_SATURNJOIN ON CACHE BOOL
|
||||
"Enable Saturn specific allowjoin toggle.")
|
||||
set(SRB2_CONFIG_SCREENFBO ON CACHE BOOL
|
||||
"Enable hardware renderer (OpenGL) FBO downsampling support")
|
||||
|
||||
if(${SRB2_CONFIG_DEDICATED})
|
||||
set(SRB2_CONFIG_HAVE_GME NO)
|
||||
@@ -442,12 +465,7 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
||||
set(SRB2_HAVE_PNG ON)
|
||||
add_definitions(-DHAVE_PNG)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE)
|
||||
set(SRB2_PNG_SOURCES apng.c)
|
||||
set(SRB2_PNG_HEADERS apng.h)
|
||||
prepend_sources(SRB2_PNG_SOURCES)
|
||||
prepend_sources(SRB2_PNG_HEADERS)
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}
|
||||
${SRB2_PNG_SOURCES} ${SRB2_PNG_HEADERS})
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
|
||||
else()
|
||||
message(WARNING "You have specified that PNG is available but it was not found. SRB2Kart may not compile correctly.")
|
||||
endif()
|
||||
@@ -474,16 +492,36 @@ if(${SRB2_CONFIG_HAVE_CURL})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_LIBBACKTRACE})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(LIBBACKTRACE_FOUND ON)
|
||||
set(LIBBACKTRACE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/libbacktrace/include)
|
||||
set(LIBBACKTRACE_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/libbacktrace/lib/x86_64 -lbacktrace")
|
||||
else() # 32-bit
|
||||
message(WARNING "libbacktrace is unsupported on 32-bit builds.")
|
||||
endif()
|
||||
else()
|
||||
find_package(libbacktrace)
|
||||
endif()
|
||||
if(${LIBBACKTRACE_FOUND})
|
||||
set(SRB2_HAVE_LIBBACKTRACE ON)
|
||||
add_definitions(-DHAVE_LIBBACKTRACE)
|
||||
else()
|
||||
message(WARNING "You have specified that libbacktrace is available but it was not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER})
|
||||
add_definitions(-DHWRENDER)
|
||||
set(SRB2_HWRENDER_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_shaders.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_bsp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_draw.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_portal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_md2load.c
|
||||
@@ -498,7 +536,6 @@ if(${SRB2_CONFIG_HWRENDER})
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_data.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_gl.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h
|
||||
@@ -517,7 +554,6 @@ if(${SRB2_CONFIG_HWRENDER})
|
||||
set(SRB2_R_OPENGL_HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware/r_opengl/r_opengl.h
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL})
|
||||
@@ -530,25 +566,40 @@ if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_STATIC_OPENGL})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HWRENDER})
|
||||
if(${SRB2_CONFIG_USE_FBO_OGL})
|
||||
set(SRB2_USE_FBO_OGL ON)
|
||||
add_definitions(-DUSE_FBO_OGL)
|
||||
endif()
|
||||
if(${SRB2_CONFIG_HWRENDER} AND ${SRB2_CONFIG_SCREENFBO})
|
||||
add_definitions(-DUSE_FBO_OGL)
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_SATURNPAK})
|
||||
add_definitions(-DDOSATURNPAK)
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_SATURNJOIN})
|
||||
add_definitions(-DDOSATURNJOIN)
|
||||
endif()
|
||||
|
||||
# Targets
|
||||
|
||||
# Compatibility flag with later versions of GCC
|
||||
# We should really fix our code to not need this
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|x64|amd64|AMD64|em64t|EM64T)")
|
||||
add_compile_options(-mno-ms-bitfields)
|
||||
endif()
|
||||
add_compile_options(-Wno-trigraphs)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||
# TODO: fix prng and P_CreateBlockmap overflow at some point
|
||||
add_compile_options(-fwrapv)
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
add_compile_options(-O0)
|
||||
else()
|
||||
add_compile_options(-O3)
|
||||
endif()
|
||||
|
||||
add_compile_options(-g)
|
||||
|
||||
add_definitions(-DCMAKECONFIG)
|
||||
|
||||
#add_library(SRB2Core STATIC
|
||||
|
||||
+22
-13
@@ -49,6 +49,7 @@
|
||||
# Already enabled by default for 32-bit
|
||||
# Windows.
|
||||
# NOCURL=1 - Disable libcurl--HTTP capability.
|
||||
# NOHOLEPUNCH=1 - Disable holepunch capability.
|
||||
# NOLIBGME=1 - Disable game music emu, retro VGM support.
|
||||
# NOOPENMPT=1 - Disable module (tracker) music support.
|
||||
# NOMIXER=1 - Disable SDL Mixer (audio playback).
|
||||
@@ -69,6 +70,7 @@
|
||||
# VALGRIND=1 - Enable Valgrind memory debugging support.
|
||||
# PROFILEMODE=1 - Enable performance profiling (gprof).
|
||||
# USEASAN=1 - Enable building with Address Sanitizer.
|
||||
# USEUBSAN=1 - Enable building with Undefined Behavior Sanitizer.
|
||||
# NOLIBBACKTRACE=1 - Disable using Libbacktrace for crashlog traces.
|
||||
#
|
||||
# General flags for building:
|
||||
@@ -243,10 +245,14 @@ ifdef STATIC
|
||||
libs+=-static
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(CC) $(CXX),gcc g++))
|
||||
opts+=-mno-ms-bitfields
|
||||
endif
|
||||
|
||||
# build with profiling information
|
||||
ifdef PROFILEMODE
|
||||
opts+=-pg
|
||||
LDFLAGS+=-pg
|
||||
libs+=-pg
|
||||
endif
|
||||
|
||||
ifdef DEBUGMODE
|
||||
@@ -256,29 +262,32 @@ debug_opts=-DNDEBUG
|
||||
opts+=-O3
|
||||
ifdef USELTO
|
||||
# compile with LTO
|
||||
ifdef MINGW
|
||||
opts+=-flto=auto -g
|
||||
LDFLAGS+=-flto=auto -g
|
||||
else
|
||||
opts+=-flto=auto
|
||||
LDFLAGS+=-flto=auto
|
||||
endif
|
||||
libs+=-flto=auto
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USEASAN
|
||||
# compile with asan
|
||||
ifdef MINGW
|
||||
opts+=-fsanitize=address -g
|
||||
libs+=-fsanitize=address -g
|
||||
else
|
||||
opts+=-fsanitize=address
|
||||
libs+=-fsanitize=address
|
||||
endif
|
||||
|
||||
ifdef USEUBSAN
|
||||
# compile with asan
|
||||
opts+=-fsanitize=undefined
|
||||
libs+=-fsanitize=undefined
|
||||
endif
|
||||
|
||||
ifeq ($(CC),clang)
|
||||
LDFLAGS+= -fuse-ld=lld
|
||||
ifneq (,$(filter $(CC) $(CXX),clang clang++))
|
||||
libs+=-fuse-ld=lld
|
||||
endif
|
||||
|
||||
ifdef MINGW
|
||||
# mingw needs this passed AFTER lto and the likes were passed
|
||||
# otherwise libbacktrace may break
|
||||
opts+=-g
|
||||
libs+=-g
|
||||
endif
|
||||
|
||||
# debug_opts also get passed to windres
|
||||
|
||||
@@ -64,9 +64,9 @@ endif
|
||||
|
||||
# This must have high to low order.
|
||||
gcc_versions:=\
|
||||
151 150 15\
|
||||
152 151 150 15\
|
||||
142 141 140 14\
|
||||
132 131 130 13\
|
||||
133 132 131 130 13\
|
||||
123 122 121 120 12\
|
||||
114 113 112 111 110 11\
|
||||
105 104 103 102 101 100 10\
|
||||
@@ -77,7 +77,7 @@ gcc_versions:=\
|
||||
55 54 53 52 51 50\
|
||||
49 48 47 46 45 44 43 42 41 40
|
||||
|
||||
latest_gcc_version:=15.1.1
|
||||
latest_gcc_version:=15.2
|
||||
|
||||
# Automatically set version flag, but not if one was
|
||||
# manually set. And don't bother if this is a clean only
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
makedir:=$(makedir)/Dummy
|
||||
|
||||
sources+=$(call List,dummy/Sourcefile)
|
||||
|
||||
NOHW=1
|
||||
@@ -6,7 +6,8 @@ passthru_opts+=\
|
||||
NOHW NOMD5 NOPOSTPROCESSING\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
HAVE_DISCORDRPC DEVELOP
|
||||
HAVE_DISCORDRPC DEVELOP\
|
||||
NOHOLEPUNCH\
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
@@ -18,8 +19,10 @@ ifndef NOHW
|
||||
opts+=-DHWRENDER
|
||||
|
||||
ifndef NOSCREENFBO
|
||||
ifndef STATIC_OPENGL
|
||||
opts+=-DUSE_FBO_OGL
|
||||
endif
|
||||
endif
|
||||
|
||||
sources+=$(call List,hardware/Sourcefile)
|
||||
endif
|
||||
@@ -28,14 +31,12 @@ ifndef NOMD5
|
||||
sources+=md5.c
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef NOSATURNJOIN
|
||||
opts+=-DDOSATURNJOIN
|
||||
endif
|
||||
ifndef NOSATURNPAK
|
||||
opts+=-DDOSATURNPAK
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
ifndef NOPNG
|
||||
@@ -50,7 +51,6 @@ ifdef LINUX
|
||||
opts+=-D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
opts+=-DHAVE_PNG
|
||||
sources+=apng.c
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ else ifeq (${DEDICATED},1)
|
||||
EXENAME?=srb2haikud
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
libs+=-lnetwork
|
||||
endif
|
||||
|
||||
define _set =
|
||||
$(1)_CFLAGS?=$($(1)_opts)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
makedir:=$(makedir)/SDL
|
||||
|
||||
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
|
||||
opts+=-DHAVE_SDL
|
||||
sources+=$(call List,sdl/Sourcefile)
|
||||
|
||||
NOUPNP=1
|
||||
@@ -30,7 +30,7 @@ sources+=sdl/ogl_sdl.c
|
||||
endif
|
||||
|
||||
ifdef NOMIXER
|
||||
sources+=sdl/sdl_sound.c
|
||||
sources+=sdl/dummy_sound.c
|
||||
else
|
||||
opts+=-DHAVE_MIXER
|
||||
sources+=sdl/mixer_sound.c
|
||||
|
||||
@@ -20,7 +20,10 @@ $(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
|
||||
CXXFLAGS+= -Wno-aggregate-return
|
||||
|
||||
# -W -Wno-unused
|
||||
WFLAGS:=-Wall -Wno-trigraphs
|
||||
WFLAGS:=-Wall -Wno-trigraphs -Wnull-dereference
|
||||
ifdef GCC152
|
||||
WFLAGS+=-Wzero-as-null-pointer-constant
|
||||
endif
|
||||
ifndef GCC295
|
||||
#WFLAGS+=-Wno-packed
|
||||
endif
|
||||
@@ -144,8 +147,10 @@ ifdef GCC81
|
||||
WFLAGS+=-Wno-error=multistatement-macros
|
||||
endif
|
||||
|
||||
ifeq ($(CC),clang)
|
||||
WFLAGS+= -Wno-unknown-pragmas -Wno-cast-align
|
||||
ifneq (,$(filter $(CC) $(CXX),clang clang++))
|
||||
WFLAGS+= -Wno-unknown-pragmas
|
||||
WFLAGS+= -Wno-cast-align
|
||||
WFLAGS+= -Wno-cast-qual # not a fan, but clang really hates our read macros
|
||||
endif
|
||||
|
||||
ifdef NONX86
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# Mingw, if you don't know, that's Win32/Win64
|
||||
#
|
||||
|
||||
sources+=$(call List,win32/Sourcefile)
|
||||
|
||||
ifndef MINGW64
|
||||
EXENAME?=srb2kart-saturn_32bit.exe
|
||||
else
|
||||
@@ -95,7 +97,7 @@ LIBBACKTRACE_libs:=-L$(lib)/lib/x86_64 -lbacktrace
|
||||
$(eval $(call _set,LIBBACKTRACE))
|
||||
else
|
||||
lib:=../libs/drmingw
|
||||
opts+=-I$(lib)/include
|
||||
opts+=-I$(lib)/include -DHAVE_DRMINGW
|
||||
libs+=-L$(lib)/lib/win32 -lmgwhelp -lexchndl
|
||||
endif
|
||||
|
||||
|
||||
+6
-5
@@ -1,3 +1,4 @@
|
||||
string.c
|
||||
am_map.c
|
||||
b_bot.c
|
||||
command.c
|
||||
@@ -34,6 +35,7 @@ m_misc.c
|
||||
m_perfstats.c
|
||||
m_queue.c
|
||||
m_random.c
|
||||
m_curl.c
|
||||
mserv.c
|
||||
http-mserv.c
|
||||
qs22j.c
|
||||
@@ -41,19 +43,18 @@ s_sound.c
|
||||
screen.c
|
||||
sounds.c
|
||||
st_stuff.c
|
||||
string.c
|
||||
tables.c
|
||||
v_video.c
|
||||
w_wad.c
|
||||
y_inter.c
|
||||
z_zone.cpp
|
||||
r_bsp.c
|
||||
r_bsp.cpp
|
||||
r_data.c
|
||||
r_draw.c
|
||||
r_draw.cpp
|
||||
r_fps.cpp
|
||||
r_main.cpp
|
||||
r_patch.c
|
||||
r_patchrotation.c
|
||||
r_patch.cpp
|
||||
r_patchrotation.cpp
|
||||
r_plane.cpp
|
||||
r_segs.cpp
|
||||
r_skins.c
|
||||
|
||||
+8
-1
@@ -265,6 +265,11 @@ static void AM_findMinMaxBoundaries(void)
|
||||
max_w = minimapinfo.map_w << MAPBITS;
|
||||
max_h = minimapinfo.map_h << MAPBITS;
|
||||
|
||||
if (max_w == 0)
|
||||
max_w = 1;
|
||||
if (max_h == 0)
|
||||
max_h = 1;
|
||||
|
||||
a = FixedDiv(f_w<<FRACBITS, max_w);
|
||||
b = FixedDiv(f_h<<FRACBITS, max_h);
|
||||
|
||||
@@ -354,7 +359,9 @@ static void AM_LevelInit(void)
|
||||
AM_findMinMaxBoundaries();
|
||||
scale_mtof = FixedDiv(min_scale_mtof*10, 7*FRACUNIT);
|
||||
if (scale_mtof > max_scale_mtof)
|
||||
scale_mtof = min_scale_mtof;
|
||||
scale_mtof = max_scale_mtof;
|
||||
if (scale_mtof == 0)
|
||||
scale_mtof = 1;
|
||||
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void I_Error(const char *error, ...)
|
||||
char logbuf[8192];
|
||||
|
||||
va_start(argptr, error);
|
||||
vsprintf(logbuf, error, argptr);
|
||||
vsnprintf(logbuf, 8192, error, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
LOGE(logbuf);
|
||||
@@ -166,7 +166,7 @@ void I_OutputMsg(const char *fmt, ...)
|
||||
char logbuf[8192];
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(logbuf, fmt, argptr);
|
||||
vsnprintf(logbuf, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
LOGD(logbuf);
|
||||
@@ -226,10 +226,6 @@ const char *I_LocateWad(void)
|
||||
return "/sdcard/srb2";
|
||||
}
|
||||
|
||||
void I_GetJoystickEvents(void){}
|
||||
|
||||
void I_GetJoystick2Events(void){}
|
||||
|
||||
char *I_GetEnv(const char *name)
|
||||
{
|
||||
LOGW("I_GetEnv() called?!");
|
||||
|
||||
+3
-14
@@ -42,7 +42,6 @@ INT32 VID_SetMode(INT32 modenum)
|
||||
vid.modenum = 0;
|
||||
vid.width = 320;
|
||||
vid.height = 240;
|
||||
vid.buffer = android_surface;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -51,25 +50,15 @@ const char *VID_GetModeName(INT32 modenum)
|
||||
return "A320x240";
|
||||
}
|
||||
|
||||
void I_UpdateNoBlit(void){}
|
||||
|
||||
void I_FinishUpdate(void) {
|
||||
void I_FinishUpdate(void)
|
||||
{
|
||||
LOGD("FRAME!");
|
||||
(*jni_env)->CallVoidMethod(jni_env, androidVideo, videoFrameCB);
|
||||
}
|
||||
|
||||
void I_UpdateNoVsync(void) {}
|
||||
|
||||
void I_WaitVBL(INT32 count)
|
||||
{
|
||||
(void)count;
|
||||
}
|
||||
|
||||
void I_ReadScreen(UINT8 *scr)
|
||||
void I_ReadScreen(UINT8 * restrict scr, INT32 scale)
|
||||
{
|
||||
(void)scr;
|
||||
}
|
||||
|
||||
void I_BeginRead(void){}
|
||||
|
||||
void I_EndRead(void){}
|
||||
-289
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
Copyright 2019, James R.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "apng.h"
|
||||
|
||||
#define APNG_INFO_acTL 0x20000U
|
||||
|
||||
#define APNG_WROTE_acTL 0x10000U
|
||||
|
||||
struct apng_info_def
|
||||
{
|
||||
png_uint_32 mode;
|
||||
png_uint_32 valid;
|
||||
|
||||
png_uint_32 num_frames;
|
||||
png_uint_32 num_plays;
|
||||
|
||||
long start_acTL;/* acTL is written here */
|
||||
|
||||
png_flush_ptr output_flush_fn;
|
||||
apng_seek_ptr output_seek_fn;
|
||||
apng_tell_ptr output_tell_fn;
|
||||
|
||||
apng_set_acTL_ptr set_acTL_fn;
|
||||
};
|
||||
|
||||
/* PROTOS (FUCK COMPILER) */
|
||||
void apng_seek (png_structp, apng_const_infop, size_t);
|
||||
size_t apng_tell (png_structp, apng_const_infop);
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
void apng_flush (png_structp, apng_infop);
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void apng_default_flush (png_structp);
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void apng_default_seek (png_structp, size_t);
|
||||
size_t apng_default_tell (png_structp);
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
void apng_write_IEND (png_structp);
|
||||
void apng_write_acTL (png_structp, png_uint_32, png_uint_32);
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
png_uint_32 apng_set_acTL_dummy (png_structp, png_infop,
|
||||
png_uint_32, png_uint_32);
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
|
||||
apng_infop
|
||||
apng_create_info_struct (png_structp pngp)
|
||||
{
|
||||
apng_infop ainfop;
|
||||
(void)pngp;
|
||||
if (( ainfop = calloc(1, sizeof (apng_info)) ))
|
||||
{
|
||||
apng_set_write_fn(pngp, ainfop, 0, 0, 0, 0, 0);
|
||||
apng_set_set_acTL_fn(pngp, ainfop, 0);
|
||||
}
|
||||
return ainfop;
|
||||
}
|
||||
|
||||
void
|
||||
apng_destroy_info_struct (png_structp pngp, apng_infopp ainfopp)
|
||||
{
|
||||
(void)pngp;
|
||||
if (!( pngp && ainfopp ))
|
||||
return;
|
||||
|
||||
free((*ainfopp));
|
||||
}
|
||||
|
||||
void
|
||||
apng_seek (png_structp pngp, apng_const_infop ainfop, size_t l)
|
||||
{
|
||||
(*(ainfop->output_seek_fn))(pngp, l);
|
||||
}
|
||||
|
||||
size_t
|
||||
apng_tell (png_structp pngp, apng_const_infop ainfop)
|
||||
{
|
||||
return (*(ainfop->output_tell_fn))(pngp);
|
||||
}
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
void
|
||||
apng_flush (png_structp pngp, apng_infop ainfop)
|
||||
{
|
||||
if (ainfop->output_flush_fn)
|
||||
(*(ainfop->output_flush_fn))(pngp);
|
||||
}
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void
|
||||
apng_default_flush (png_structp pngp)
|
||||
{
|
||||
if (!( pngp ))
|
||||
return;
|
||||
|
||||
fflush((png_FILE_p)png_get_io_ptr);
|
||||
}
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void
|
||||
apng_default_seek (png_structp pngp, size_t l)
|
||||
{
|
||||
if (!( pngp ))
|
||||
return;
|
||||
|
||||
if (fseek((png_FILE_p)png_get_io_ptr(pngp), (long)l, SEEK_SET) == -1)
|
||||
png_error(pngp, "Seek Error");
|
||||
}
|
||||
|
||||
size_t
|
||||
apng_default_tell (png_structp pngp)
|
||||
{
|
||||
long l;
|
||||
|
||||
if (!( pngp ))
|
||||
{
|
||||
png_error(pngp, "Call to apng_default_tell with NULL pngp failed");
|
||||
}
|
||||
|
||||
if (( l = ftell((png_FILE_p)png_get_io_ptr(pngp)) ) == -1)
|
||||
png_error(pngp, "Tell Error");
|
||||
|
||||
return (size_t)l;
|
||||
}
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
|
||||
void
|
||||
apng_set_write_fn (png_structp pngp, apng_infop ainfop, png_voidp iop,
|
||||
png_rw_ptr write_f, png_flush_ptr flush_f,
|
||||
apng_seek_ptr seek_f, apng_tell_ptr tell_f)
|
||||
{
|
||||
if (!( pngp && ainfop ))
|
||||
return;
|
||||
|
||||
png_set_write_fn(pngp, iop, write_f, flush_f);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!flush_f)
|
||||
ainfop->output_flush_fn = &apng_default_flush;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_flush_fn = flush_f;
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!seek_f)
|
||||
ainfop->output_seek_fn = &apng_default_seek;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_seek_fn = seek_f;
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!seek_f)
|
||||
ainfop->output_tell_fn = apng_default_tell;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_tell_fn = tell_f;
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_IEND (png_structp pngp)
|
||||
{
|
||||
png_byte chunkc[] = "IEND";
|
||||
png_write_chunk(pngp, chunkc, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_acTL (png_structp pngp, png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
png_byte chunkc[] = "acTL";
|
||||
png_byte buf[8];
|
||||
png_save_uint_32(buf, frames);
|
||||
png_save_uint_32(buf + 4, plays);
|
||||
png_write_chunk(pngp, chunkc, buf, 8);
|
||||
}
|
||||
|
||||
png_uint_32
|
||||
apng_set_acTL (png_structp pngp, png_infop infop, apng_infop ainfop,
|
||||
png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
(void)pngp;
|
||||
(void)infop;
|
||||
if (!( pngp && infop && ainfop ))
|
||||
return 0;
|
||||
|
||||
ainfop->num_frames = frames;
|
||||
ainfop->num_plays = plays;
|
||||
|
||||
ainfop->valid |= APNG_INFO_acTL;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_info_before_PLTE (png_structp pngp, png_infop infop,
|
||||
apng_infop ainfop)
|
||||
{
|
||||
if (!( pngp && infop && ainfop ))
|
||||
return;
|
||||
|
||||
png_write_info_before_PLTE(pngp, infop);
|
||||
|
||||
if (( ainfop->valid & APNG_INFO_acTL )&&!( ainfop->mode & APNG_WROTE_acTL ))
|
||||
{
|
||||
ainfop->start_acTL = apng_tell(pngp, ainfop);
|
||||
|
||||
apng_write_acTL(pngp, 0, 0);
|
||||
/* modified for runtime dynamic linking */
|
||||
(*(ainfop->set_acTL_fn))(pngp, infop, PNG_UINT_31_MAX, 0);
|
||||
|
||||
ainfop->mode |= APNG_WROTE_acTL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_info (png_structp pngp, png_infop infop,
|
||||
apng_infop ainfop)
|
||||
{
|
||||
apng_write_info_before_PLTE(pngp, infop, ainfop);
|
||||
png_write_info(pngp, infop);
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_end (png_structp pngp, png_infop infop, apng_infop ainfop)
|
||||
{
|
||||
(void)infop;
|
||||
apng_write_IEND(pngp);
|
||||
apng_seek(pngp, ainfop, ainfop->start_acTL);
|
||||
apng_write_acTL(pngp, ainfop->num_frames, ainfop->num_plays);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
#ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
|
||||
apng_flush(pngp, infop);
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED */
|
||||
}
|
||||
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
png_uint_32
|
||||
apng_set_acTL_dummy (png_structp pngp, png_infop infop,
|
||||
png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
(void)pngp;
|
||||
(void)infop;
|
||||
(void)frames;
|
||||
(void)plays;
|
||||
return 0;
|
||||
}
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
|
||||
/* Dynamic runtime linking capable! (Hopefully.) */
|
||||
void
|
||||
apng_set_set_acTL_fn (png_structp pngp, apng_infop ainfop,
|
||||
apng_set_acTL_ptr set_acTL_f)
|
||||
{
|
||||
(void)pngp;
|
||||
if (!ainfop->set_acTL_fn)
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
ainfop->set_acTL_fn = &apng_set_acTL_dummy;
|
||||
#else
|
||||
ainfop->set_acTL_fn = &png_set_acTL;
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
else
|
||||
ainfop->set_acTL_fn = set_acTL_f;
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
Copyright 2019, James R.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef APNG_H
|
||||
#define APNG_H
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE
|
||||
#endif
|
||||
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 0
|
||||
#endif
|
||||
|
||||
#include <png.h>
|
||||
|
||||
typedef struct apng_info_def apng_info;
|
||||
typedef apng_info * apng_infop;
|
||||
typedef const apng_info * apng_const_infop;
|
||||
typedef apng_info * * apng_infopp;
|
||||
|
||||
typedef void (*apng_seek_ptr)(png_structp, size_t);
|
||||
typedef size_t (*apng_tell_ptr)(png_structp);
|
||||
|
||||
typedef png_uint_32 (*apng_set_acTL_ptr)(png_structp, png_infop,
|
||||
png_uint_32, png_uint_32);
|
||||
|
||||
apng_infop apng_create_info_struct (png_structp png_ptr);
|
||||
|
||||
void apng_destroy_info_struct (png_structp png_ptr,
|
||||
apng_infopp info_ptr_ptr);
|
||||
|
||||
/* Call the following functions in place of the libpng counterparts. */
|
||||
|
||||
png_uint_32 apng_set_acTL (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr,
|
||||
png_uint_32 num_frames, png_uint_32 num_plays);
|
||||
|
||||
void apng_write_info_before_PLTE (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
void apng_write_info (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
|
||||
void apng_write_end (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
|
||||
void apng_set_write_fn (png_structp png_ptr, apng_infop ainfo_ptr,
|
||||
png_voidp io_ptr,
|
||||
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn,
|
||||
apng_seek_ptr output_seek_fn, apng_tell_ptr output_tell_fn);
|
||||
|
||||
void apng_set_set_acTL_fn (png_structp png_ptr, apng_infop ainfo_ptr,
|
||||
apng_set_acTL_ptr set_acTL_fn);
|
||||
|
||||
#endif/* APNG_H */
|
||||
+11
-11
@@ -47,7 +47,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||
{
|
||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||
cmd->angleturn = abs((signed)(tails->angle - sonic->angle))>>16;
|
||||
cmd->angleturn = abs((signed)(tails->angle - sonic->angle)) >> TICCMD_REDUCE;
|
||||
if (sonic->angle < tails->angle)
|
||||
cmd->angleturn = -cmd->angleturn;
|
||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||
@@ -139,13 +139,13 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
|
||||
// Don't mess with bot inputs during these unhandled movement conditions.
|
||||
// The normal AI doesn't use abilities, so custom AI should be sending us exactly what it wants anyway.
|
||||
if (forward)
|
||||
cmd->forwardmove += MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->forwardmove += MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (backward)
|
||||
cmd->forwardmove -= MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->forwardmove -= MAXPLMOVE<<FRACBITS >> TICCMD_REDUCE;
|
||||
if (left || strafeleft)
|
||||
cmd->sidemove -= MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove -= MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (right || straferight)
|
||||
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove += MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
} else {
|
||||
// In standard 2D mode, interpret "forward" as "the way you're facing" and everything else as "the way you're not facing"
|
||||
if (left || right)
|
||||
@@ -163,23 +163,23 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
|
||||
right = true;
|
||||
}
|
||||
if (left || strafeleft)
|
||||
cmd->sidemove -= MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove -= MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (right || straferight)
|
||||
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove += MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
}
|
||||
} else {
|
||||
if (forward)
|
||||
cmd->forwardmove += MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->forwardmove += MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (backward)
|
||||
cmd->forwardmove -= MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->forwardmove -= MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (left)
|
||||
cmd->angleturn += 1280;
|
||||
if (right)
|
||||
cmd->angleturn -= 1280;
|
||||
if (strafeleft)
|
||||
cmd->sidemove -= MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove -= MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
if (straferight)
|
||||
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
||||
cmd->sidemove += MAXPLMOVE << FRACBITS >> TICCMD_REDUCE;
|
||||
}
|
||||
if (jump)
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
|
||||
@@ -10,8 +10,13 @@
|
||||
/// \file b_bot.h
|
||||
/// \brief Basic bot handling
|
||||
|
||||
#ifndef __B_BOT__
|
||||
#define __B_BOT__
|
||||
|
||||
void B_BuildTiccmd(player_t *player, ticcmd_t *cmd);
|
||||
void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward, boolean left, boolean right, boolean strafeleft, boolean straferight, boolean jump, boolean spin);
|
||||
boolean B_CheckRespawn(player_t *player);
|
||||
void B_MoveBlocked(player_t *player);
|
||||
void B_RespawnBot(INT32 playernum);
|
||||
|
||||
#endif
|
||||
+42
-18
@@ -434,7 +434,7 @@ LUA_API void lua_pushnumber (lua_State *L, lua_Number n) {
|
||||
LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) {
|
||||
lua_lock(L);
|
||||
luaC_checkGC(L);
|
||||
setsvalue2s(L, L->top, luaS_newlstr(L, s, len));
|
||||
setsvalue2s(L, L->top, (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len));
|
||||
api_incr_top(L);
|
||||
lua_unlock(L);
|
||||
}
|
||||
@@ -519,6 +519,23 @@ LUA_API int lua_pushthread (lua_State *L) {
|
||||
** get functions (Lua -> stack)
|
||||
*/
|
||||
|
||||
static void auxgetstr (lua_State *L, const TValue *t, const char *k) {
|
||||
const TValue *slot;
|
||||
TValue key;
|
||||
TString *str = luaS_new(L, k);
|
||||
api_checkvalidindex(L, t);
|
||||
if (luaV_fastget(L, t, str, slot, luaH_getstr)) {
|
||||
setobj2s(L, L->top, slot);
|
||||
api_incr_top(L);
|
||||
}
|
||||
else {
|
||||
setsvalue(L, &key, str);
|
||||
luaV_finishget(L, t, L->top, L->top, slot);
|
||||
api_incr_top(L);
|
||||
}
|
||||
lua_unlock(L);
|
||||
}
|
||||
|
||||
|
||||
LUA_API void lua_gettable (lua_State *L, int idx) {
|
||||
StkId t;
|
||||
@@ -531,15 +548,8 @@ LUA_API void lua_gettable (lua_State *L, int idx) {
|
||||
|
||||
|
||||
LUA_API void lua_getfield (lua_State *L, int idx, const char *k) {
|
||||
StkId t;
|
||||
TValue key;
|
||||
lua_lock(L);
|
||||
t = index2adr(L, idx);
|
||||
api_checkvalidindex(L, t);
|
||||
setsvalue(L, &key, luaS_new(L, k));
|
||||
luaV_gettable(L, t, &key, L->top);
|
||||
api_incr_top(L);
|
||||
lua_unlock(L);
|
||||
auxgetstr(L, index2adr(L, idx), k);
|
||||
}
|
||||
|
||||
|
||||
@@ -630,6 +640,26 @@ LUA_API void lua_getfenv (lua_State *L, int idx) {
|
||||
** set functions (stack -> Lua)
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
static void auxsetstr (lua_State *L, const TValue *t, const char *k) {
|
||||
TValue key;
|
||||
const TValue *slot;
|
||||
TString *str = luaS_new(L, k);
|
||||
api_checknelems(L, 1);
|
||||
api_checkvalidindex(L, t);
|
||||
if (luaV_fastset(L, t, str, slot, luaH_setstr, L->top)) {
|
||||
setobj2t(L, cast(TValue *, slot), L->top - 1);
|
||||
L->top--; /* pop value */
|
||||
}
|
||||
else {
|
||||
setsvalue2s(L, &key, str);
|
||||
luaV_finishset(L, t, &key, L->top - 1, slot);
|
||||
L->top--; /* pop value */
|
||||
}
|
||||
lua_unlock(L);
|
||||
}
|
||||
|
||||
|
||||
LUA_API void lua_settable (lua_State *L, int idx) {
|
||||
StkId t;
|
||||
@@ -642,18 +672,12 @@ LUA_API void lua_settable (lua_State *L, int idx) {
|
||||
lua_unlock(L);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {
|
||||
StkId t;
|
||||
TValue key;
|
||||
lua_lock(L);
|
||||
api_checknelems(L, 1);
|
||||
t = index2adr(L, idx);
|
||||
api_checkvalidindex(L, t);
|
||||
setsvalue(L, &key, luaS_new(L, k));
|
||||
luaV_settable(L, t, &key, L->top - 1);
|
||||
L->top--; /* pop value */
|
||||
lua_unlock(L);
|
||||
auxsetstr(L, index2adr(L, idx), k);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+70
-5
@@ -20,10 +20,13 @@
|
||||
#define lauxlib_c
|
||||
#define LUA_LIB
|
||||
|
||||
#include "ldebug.h"
|
||||
#include "lua.h"
|
||||
|
||||
#include "lauxlib.h"
|
||||
|
||||
#include "../doomdef.h"
|
||||
|
||||
|
||||
#define FREELIST_REF 0 /* free list of references */
|
||||
|
||||
@@ -40,7 +43,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
|
||||
if (!lua_getstack(L, 0, &ar)) /* no stack frame? */
|
||||
return luaL_error(L, "bad argument #%d (%s)", narg, extramsg);
|
||||
lua_getinfo(L, "n", &ar);
|
||||
if (strcmp(ar.namewhat, "method") == 0) {
|
||||
if (fastcmp(ar.namewhat, "method")) {
|
||||
narg--; /* do not count `self' */
|
||||
if (narg == 0) /* error is in the self argument itself? */
|
||||
return luaL_error(L, "calling " LUA_QS " on bad self (%s)",
|
||||
@@ -91,13 +94,64 @@ LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) {
|
||||
/* }====================================================== */
|
||||
|
||||
|
||||
/*
|
||||
** {======================================================
|
||||
** 'luaL_resourcetryagain'
|
||||
** This function uses 'errno' to check whether the last error was
|
||||
** related to lack of resources (e.g., not enough memory or too many
|
||||
** open files). If so, the function performs a full garbage collection
|
||||
** to try to release resources, and then it returns 1 to signal to
|
||||
** the caller that it is worth trying again the failed operation.
|
||||
** Otherwise, it returns 0. Because error codes are not ANSI C, the
|
||||
** code must handle any combination of error codes that are defined.
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
LUALIB_API int luaL_resourcetryagain (lua_State *L) {
|
||||
|
||||
/* these are the resource-related errors in Linux */
|
||||
#if defined(EMFILE) || defined(ENFILE) || defined(ENOMEM)
|
||||
|
||||
#if !defined(EMFILE) /* too many open files in the process */
|
||||
#define EMFILE -1 /* if not defined, use an impossible value */
|
||||
#endif
|
||||
|
||||
#if !defined(ENFILE) /* too many open files in the system */
|
||||
#define ENFILE -1
|
||||
#endif
|
||||
|
||||
#if !defined(ENOMEM) /* not enough memory */
|
||||
#define ENOMEM -1
|
||||
#endif
|
||||
|
||||
if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
|
||||
CONS_Alert(CONS_WARNING, "%s, force calling lua garbage collector\n", strerror(errno));
|
||||
lua_gc(L, LUA_GCCOLLECT, 0); /* try to release resources with a full GC */
|
||||
return 1; /* signal to try again the creation */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 0; /* else, asume errors are not due to lack of resources */
|
||||
|
||||
}
|
||||
|
||||
/* }====================================================== */
|
||||
|
||||
|
||||
/*
|
||||
** {======================================================
|
||||
** Userdata's metatable manipulation
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def,
|
||||
const char *const lst[]) {
|
||||
const char *name = (def) ? luaL_optstring(L, narg, def) :
|
||||
luaL_checkstring(L, narg);
|
||||
int i;
|
||||
for (i=0; lst[i]; i++)
|
||||
if (strcmp(lst[i], name) == 0)
|
||||
if (fastcmp(lst[i], name))
|
||||
return i;
|
||||
return luaL_argerror(L, narg,
|
||||
lua_pushfstring(L, "invalid option " LUA_QS, name));
|
||||
@@ -415,8 +469,19 @@ LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B) {
|
||||
|
||||
|
||||
LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) {
|
||||
while (l--)
|
||||
luaL_addchar(B, *s++);
|
||||
while (l) {
|
||||
size_t space = bufffree(B);
|
||||
if (space == 0) {
|
||||
luaL_prepbuffer(B);
|
||||
lua_assert(bufffree(B) == LUAL_BUFFERSIZE);
|
||||
space = LUAL_BUFFERSIZE;
|
||||
}
|
||||
if (space > l) space = l;
|
||||
memcpy(B->p, s, space);
|
||||
B->p += space;
|
||||
s += space;
|
||||
l -= space;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -633,6 +698,6 @@ static int panic (lua_State *L) {
|
||||
|
||||
LUALIB_API lua_State *luaL_newstate (void) {
|
||||
lua_State *L = lua_newstate(l_alloc, NULL);
|
||||
if (L) lua_atpanic(L, &panic);
|
||||
if (l_likely(L)) lua_atpanic(L, &panic);
|
||||
return L;
|
||||
}
|
||||
@@ -95,6 +95,8 @@ LUALIB_API FUNCREPORT int (luaL_error) (lua_State *L, const char *fmt, ...);
|
||||
LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,
|
||||
const char *const lst[]);
|
||||
|
||||
LUALIB_API int (luaL_resourcetryagain) (lua_State *L);
|
||||
|
||||
LUALIB_API int (luaL_ref) (lua_State *L, int t);
|
||||
LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref);
|
||||
|
||||
|
||||
+25
-12
@@ -626,8 +626,20 @@ static void codenot (FuncState *fs, expdesc *e) {
|
||||
removevalues(fs, e->t);
|
||||
}
|
||||
|
||||
/*
|
||||
** Check whether expression 'e' is a literal string
|
||||
*/
|
||||
static int isKstr (FuncState *fs, expdesc *e) {
|
||||
return (e->k == VK && ttisstring(&fs->f->k[e->u.s.info]));
|
||||
}
|
||||
|
||||
/*
|
||||
** Create expression 't[k]'. 't' must have its final result already in a
|
||||
** register or upvalue. Upvalues can only be indexed by literal strings.
|
||||
*/
|
||||
void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
|
||||
if (t->k == VUPVAL && !isKstr(fs, k)) /* upvalue indexed by non string? */
|
||||
luaK_exp2anyreg(fs, t); /* put it in a register */
|
||||
t->u.s.aux = luaK_exp2RK(fs, k);
|
||||
t->k = VINDEXED;
|
||||
}
|
||||
@@ -790,18 +802,19 @@ void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2) {
|
||||
case OPR_BXOR: codearith(fs, OP_BXOR, e1, e2); break;
|
||||
case OPR_BSHL: codearith(fs, OP_BSHL, e1, e2); break;
|
||||
case OPR_BSHR: codearith(fs, OP_BSHR, e1, e2); break;
|
||||
case OPR_ADD: codearith(fs, OP_ADD, e1, e2); break;
|
||||
case OPR_SUB: codearith(fs, OP_SUB, e1, e2); break;
|
||||
case OPR_MUL: codearith(fs, OP_MUL, e1, e2); break;
|
||||
case OPR_DIV: codearith(fs, OP_DIV, e1, e2); break;
|
||||
case OPR_MOD: codearith(fs, OP_MOD, e1, e2); break;
|
||||
case OPR_POW: codearith(fs, OP_POW, e1, e2); break;
|
||||
case OPR_EQ: codecomp(fs, OP_EQ, 1, e1, e2); break;
|
||||
case OPR_NE: codecomp(fs, OP_EQ, 0, e1, e2); break;
|
||||
case OPR_LT: codecomp(fs, OP_LT, 1, e1, e2); break;
|
||||
case OPR_LE: codecomp(fs, OP_LE, 1, e1, e2); break;
|
||||
case OPR_GT: codecomp(fs, OP_LT, 0, e1, e2); break;
|
||||
case OPR_GE: codecomp(fs, OP_LE, 0, e1, e2); break;
|
||||
case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:
|
||||
case OPR_MOD: case OPR_POW: {
|
||||
codearith(fs, op - OPR_ADD + OP_ADD, e1, e2);
|
||||
break;
|
||||
}
|
||||
case OPR_EQ: case OPR_LT: case OPR_LE: {
|
||||
codecomp(fs, op - OPR_EQ + OP_EQ, 1, e1, e2);
|
||||
break;
|
||||
}
|
||||
case OPR_NE: case OPR_GT: case OPR_GE: {
|
||||
codecomp(fs, op - OPR_NE + OP_EQ, 0, e1, e2);
|
||||
break;
|
||||
}
|
||||
default: lua_assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,13 +21,13 @@
|
||||
|
||||
|
||||
/*
|
||||
** grep "ORDER OPR" if you change these enums
|
||||
** grep "ORDER OPR" if you change these enums (ORDER OP)
|
||||
*/
|
||||
typedef enum BinOpr {
|
||||
OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW,
|
||||
OPR_CONCAT,
|
||||
OPR_NE, OPR_EQ,
|
||||
OPR_LT, OPR_LE, OPR_GT, OPR_GE,
|
||||
OPR_EQ, OPR_LT, OPR_LE,
|
||||
OPR_NE, OPR_GT, OPR_GE,
|
||||
OPR_AND, OPR_OR,
|
||||
OPR_BAND, OPR_BOR, OPR_BXOR,
|
||||
OPR_BSHL, OPR_BSHR,
|
||||
|
||||
+28
-5
@@ -542,16 +542,39 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int stackpos,
|
||||
|
||||
|
||||
static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
|
||||
TMS tm = 0;
|
||||
Instruction i;
|
||||
if ((isLua(ci) && ci->tailcalls > 0) || !isLua(ci - 1))
|
||||
return NULL; /* calling function is not Lua (or is unknown) */
|
||||
ci--; /* calling function */
|
||||
i = ci_func(ci)->l.p->code[currentpc(L, ci)];
|
||||
if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL ||
|
||||
GET_OPCODE(i) == OP_TFORLOOP)
|
||||
return getobjname(L, ci, GETARG_A(i), name);
|
||||
else
|
||||
return NULL; /* no useful name can be found */
|
||||
switch (GET_OPCODE(i)) {
|
||||
case OP_CALL:
|
||||
case OP_TAILCALL:
|
||||
case OP_TFORLOOP:
|
||||
return getobjname(L, ci, GETARG_A(i), name);
|
||||
case OP_GETGLOBAL:
|
||||
case OP_SELF:
|
||||
case OP_GETTABLE: tm = TM_INDEX; break;
|
||||
case OP_SETGLOBAL:
|
||||
case OP_SETTABLE: tm = TM_NEWINDEX; break;
|
||||
case OP_EQ: tm = TM_EQ; break;
|
||||
case OP_ADD: tm = TM_ADD; break;
|
||||
case OP_SUB: tm = TM_SUB; break;
|
||||
case OP_MUL: tm = TM_MUL; break;
|
||||
case OP_DIV: tm = TM_DIV; break;
|
||||
case OP_MOD: tm = TM_MOD; break;
|
||||
case OP_POW: tm = TM_POW; break;
|
||||
case OP_UNM: tm = TM_UNM; break;
|
||||
case OP_LEN: tm = TM_LEN; break;
|
||||
case OP_LT: tm = TM_LT; break;
|
||||
case OP_LE: tm = TM_LE; break;
|
||||
case OP_CONCAT: tm = TM_CONCAT; break;
|
||||
default:
|
||||
return NULL; /* else no useful name can be found */
|
||||
}
|
||||
*name = getstr(G(L)->tmname[tm]);
|
||||
return "metamethod";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-10
@@ -46,10 +46,6 @@
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4324)
|
||||
#endif
|
||||
|
||||
/* chain list of long jump buffers */
|
||||
struct lua_longjmp {
|
||||
struct lua_longjmp *previous;
|
||||
@@ -57,10 +53,6 @@ struct lua_longjmp {
|
||||
volatile int status; /* error code */
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4324)
|
||||
#endif
|
||||
|
||||
void luaD_seterrorobj (lua_State *L, int lerrcode, StkId oldtop) {
|
||||
switch (lerrcode) {
|
||||
case LUA_ERRMEM: {
|
||||
@@ -172,7 +164,7 @@ void luaD_reallocCI (lua_State *L, int newsize) {
|
||||
|
||||
|
||||
void luaD_growstack (lua_State *L, int n) {
|
||||
if (l_likely(n <= L->stacksize)) /* double size is enough? */
|
||||
if (n <= L->stacksize) /* double size is enough? */
|
||||
luaD_reallocstack(L, 2*L->stacksize);
|
||||
else
|
||||
luaD_reallocstack(L, L->stacksize + n);
|
||||
@@ -326,7 +318,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
|
||||
ci->top = L->top + LUA_MINSTACK;
|
||||
lua_assert(ci->top <= L->stack_last);
|
||||
ci->nresults = nresults;
|
||||
if (L->hookmask & LUA_MASKCALL)
|
||||
if (l_unlikely(L->hookmask & LUA_MASKCALL))
|
||||
luaD_callhook(L, LUA_HOOKCALL, -1);
|
||||
lua_unlock(L);
|
||||
n = (*curr_func(L)->c.f)(L); /* do the actual call */
|
||||
|
||||
@@ -48,12 +48,6 @@ LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_growstack (lua_State *L, int n);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifndef ATTRNORETURN
|
||||
#define ATTRNORETURN __declspec(noreturn)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ATTRNORETURN
|
||||
#define ATTRNORETURN
|
||||
#endif
|
||||
|
||||
+38
-27
@@ -58,12 +58,6 @@ static int pushresult (lua_State *L, int i, const char *filename) {
|
||||
}
|
||||
|
||||
|
||||
static void fileerror (lua_State *L, int arg, const char *filename) {
|
||||
lua_pushfstring(L, "%s: %s", filename, strerror(errno));
|
||||
luaL_argerror(L, arg, lua_tostring(L, -1));
|
||||
}
|
||||
|
||||
|
||||
#define tofilep(L) ((FILE **)luaL_checkudata(L, 1, LUA_FILEHANDLE))
|
||||
|
||||
|
||||
@@ -161,12 +155,31 @@ static int io_tostring (lua_State *L) {
|
||||
|
||||
static int StartsWith(const char *a, const char *b) // this is wolfs being lazy yet again
|
||||
{
|
||||
if(strncmp(a, b, strlen(b)) == 0) return 1;
|
||||
if (strncmp(a, b, strlen(b)) == 0) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Equivalent to 'fopen', but if it fails due to a lack of resources
|
||||
** (see 'luaL_resourcetryagain'), do an "emergency" garbage collection to try
|
||||
** to close some files and then tries to open the file again.
|
||||
*/
|
||||
static FILE *trytoopen (lua_State *L, const char *path, const char *mode) {
|
||||
FILE *f = fopen(path, mode);
|
||||
if (f == NULL && luaL_resourcetryagain(L)) /* resource failure? */
|
||||
f = fopen(path, mode); /* try to open again */
|
||||
return f;
|
||||
}
|
||||
|
||||
static int io_open (lua_State *L) {
|
||||
static void opencheck (lua_State *L, const char *fname, const char *mode) {
|
||||
FILE **p = newfile(L);
|
||||
*p = trytoopen(L, fname, mode);
|
||||
if (l_unlikely(*p == NULL))
|
||||
luaL_error(L, "cannot open file '%s' (%s)", fname, strerror(errno));
|
||||
}
|
||||
|
||||
static int io_open(lua_State *L)
|
||||
{
|
||||
FILE **pf;
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
int pass = 0;
|
||||
@@ -178,12 +191,13 @@ static int io_open (lua_State *L) {
|
||||
|
||||
for (i = 0; i < (sizeof (whitelist) / sizeof(const char *)); i++)
|
||||
{
|
||||
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
if (fasticmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
{
|
||||
pass = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (l_unlikely(strstr(filename, "..") || strchr(filename, ':') || StartsWith(filename, "\\")
|
||||
|| StartsWith(filename, "/") || !pass))
|
||||
{
|
||||
@@ -210,7 +224,7 @@ static int io_open (lua_State *L) {
|
||||
}
|
||||
|
||||
pf = newfile(L);
|
||||
*pf = fopen(destFilename, mode);
|
||||
*pf = trytoopen(L, destFilename, mode);
|
||||
return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
|
||||
}
|
||||
|
||||
@@ -218,6 +232,8 @@ static int io_open (lua_State *L) {
|
||||
static int io_tmpfile (lua_State *L) {
|
||||
FILE **pf = newfile(L);
|
||||
*pf = tmpfile();
|
||||
if (*pf == NULL && luaL_resourcetryagain(L)) /* resource failure? */
|
||||
*pf = tmpfile(); /* try to open again */
|
||||
return (*pf == NULL) ? pushresult(L, 0, NULL) : 1;
|
||||
}
|
||||
|
||||
@@ -236,10 +252,7 @@ static int g_iofile (lua_State *L, int f, const char *mode) {
|
||||
if (!lua_isnoneornil(L, 1)) {
|
||||
const char *filename = lua_tostring(L, 1);
|
||||
if (filename) {
|
||||
FILE **pf = newfile(L);
|
||||
*pf = fopen(filename, mode);
|
||||
if (l_unlikely(*pf == NULL))
|
||||
fileerror(L, 1, filename);
|
||||
opencheck(L, filename, mode);
|
||||
}
|
||||
else {
|
||||
tofile(L); /* check that it's a valid file handle */
|
||||
@@ -288,10 +301,7 @@ static int io_lines (lua_State *L) {
|
||||
}
|
||||
else {
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
FILE **pf = newfile(L);
|
||||
*pf = fopen(filename, "r");
|
||||
if (l_unlikely(*pf == NULL))
|
||||
fileerror(L, 1, filename);
|
||||
opencheck(L, filename, "r");
|
||||
aux_lines(L, lua_gettop(L), 1);
|
||||
return 1;
|
||||
}
|
||||
@@ -346,20 +356,21 @@ static int read_line (lua_State *L, FILE *f) {
|
||||
|
||||
|
||||
static int read_chars (lua_State *L, FILE *f, size_t n) {
|
||||
size_t rlen; /* how much to read */
|
||||
size_t nr; /* number of chars actually read */
|
||||
size_t tbr = n; /* number of chars to be read */
|
||||
size_t rlen; /* how much to read in each cycle */
|
||||
size_t nr; /* number of chars actually read in each cycle */
|
||||
luaL_Buffer b;
|
||||
luaL_buffinit(L, &b);
|
||||
rlen = LUAL_BUFFERSIZE; /* try to read that much each time */
|
||||
do {
|
||||
char *p = luaL_prepbuffer(&b);
|
||||
if (rlen > n) rlen = n; /* cannot read more than asked */
|
||||
if (rlen > tbr) rlen = tbr; /* cannot read more than asked */
|
||||
nr = fread(p, sizeof(char), rlen, f);
|
||||
luaL_addsize(&b, nr);
|
||||
n -= nr; /* still have to read `n' chars */
|
||||
} while (n > 0 && nr == rlen); /* until end of count or eof */
|
||||
tbr -= nr; /* still have to read 'tbr' chars */
|
||||
} while (tbr > 0 && nr == rlen); /* until end of count or eof */
|
||||
luaL_pushresult(&b); /* close buffer */
|
||||
return (n == 0 || lua_objlen(L, -1) > 0);
|
||||
return (tbr == 0 || tbr < n); /* true iff read something */
|
||||
}
|
||||
|
||||
|
||||
@@ -422,13 +433,13 @@ static int f_read (lua_State *L) {
|
||||
|
||||
static int io_readline (lua_State *L) {
|
||||
FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
|
||||
int sucess;
|
||||
int success;
|
||||
if (f == NULL) /* file is already closed? */
|
||||
luaL_error(L, "file is already closed");
|
||||
sucess = read_line(L, f);
|
||||
success = read_line(L, f);
|
||||
if (ferror(f))
|
||||
return luaL_error(L, "%s", strerror(errno));
|
||||
if (sucess) return 1;
|
||||
if (success) return 1;
|
||||
else { /* EOF */
|
||||
if (lua_toboolean(L, lua_upvalueindex(2))) { /* generator created file? */
|
||||
lua_settop(L, 0);
|
||||
|
||||
@@ -232,6 +232,8 @@ OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
|
||||
(*) In OP_SETLIST, if (B == 0) then B = `top';
|
||||
if (C == 0) then next `instruction' is real C
|
||||
|
||||
(*) In OP_SELF, the index must be a string.
|
||||
|
||||
(*) For comparisons, A specifies what condition the test should accept
|
||||
(true or false).
|
||||
|
||||
|
||||
+4
-4
@@ -881,10 +881,10 @@ static const struct {
|
||||
lu_byte right; /* right priority */
|
||||
} priority[] = { /* ORDER OPR */
|
||||
{6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7}, /* `+' `-' `/' `%' */
|
||||
{10, 9}, {5, 4}, /* power and concat (right associative) */
|
||||
{3, 3}, {3, 3}, /* equality and inequality */
|
||||
{3, 3}, {3, 3}, {3, 3}, {3, 3}, /* order */
|
||||
{2, 2}, {1, 1} /* logical (and/or) */
|
||||
{10, 9}, {5, 4}, /* ^, .. (right associative) */
|
||||
{3, 3}, {3, 3}, {3, 3}, /* ==, <, <= */
|
||||
{3, 3}, {3, 3}, {3, 3}, /* ~=, >, >= */
|
||||
{2, 2}, {1, 1} /* and, or */
|
||||
,{6, 6}, {6, 6}, {6, 6}, /* bit-wise (band/bor/bxor) */
|
||||
{7, 7}, {7, 7} /* shl/shr */
|
||||
};
|
||||
|
||||
+58
-4
@@ -51,7 +51,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l,
|
||||
unsigned int h) {
|
||||
TString *ts;
|
||||
stringtable *tb;
|
||||
if (l+1 > (MAX_SIZET - sizeof(TString))/sizeof(char))
|
||||
if (l_unlikely(l+1 > (MAX_SIZET - sizeof(TString))/sizeof(char)))
|
||||
luaM_toobig(L);
|
||||
ts = cast(TString *, luaM_malloc(L, (l+1)*sizeof(char)+sizeof(TString)));
|
||||
ts->tsv.len = l;
|
||||
@@ -72,18 +72,72 @@ static TString *newlstr (lua_State *L, const char *str, size_t l,
|
||||
}
|
||||
|
||||
|
||||
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
|
||||
GCObject *o;
|
||||
// string hash taken from luaJIT
|
||||
|
||||
/* Unaligned load of uint32_t. */
|
||||
static inline __attribute__((always_inline)) uint32_t getu32(const void* ptr)
|
||||
{
|
||||
uint32_t result;
|
||||
memcpy(&result, ptr, 4);
|
||||
return result;
|
||||
}
|
||||
|
||||
// smol macro to look a little less messy lul
|
||||
#define getu8(p) *cast(const uint8_t *, p)
|
||||
|
||||
/* Keyed sparse ARX string hash. Constant time. */
|
||||
static unsigned hash_sparse(const char *str, size_t len)
|
||||
{
|
||||
/* Constants taken from lookup3 hash by Bob Jenkins. */
|
||||
unsigned int a, b, h = cast(unsigned int, len);
|
||||
#define rol(x, n) (((x)<<(n)) | ((x)>>(-cast(int, n)&(8*sizeof(x)-1))))
|
||||
if (len >= 4) { /* Caveat: unaligned access! */
|
||||
a = getu32(str);
|
||||
h ^= getu32(str+len-4);
|
||||
b = getu32(str+(len>>1)-2);
|
||||
h ^= b; h -= rol(b, 14);
|
||||
b += getu32(str+(len>>2)-1);
|
||||
} else if (len > 0) {
|
||||
a = getu8(str);
|
||||
h ^= getu8(str+len-1);
|
||||
b = getu8(str+(len>>1));
|
||||
h ^= b; h -= rol(b, 14);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
a ^= h; a -= rol(h, 11);
|
||||
b ^= a; b -= rol(a, 25);
|
||||
h ^= b; h -= rol(b, 16);
|
||||
#undef rol
|
||||
return h;
|
||||
}
|
||||
|
||||
#undef getu8
|
||||
|
||||
|
||||
static inline __attribute__((always_inline)) unsigned luaS_hash (const char *str, size_t l) {
|
||||
#if 0
|
||||
unsigned int h = cast(unsigned int, l); /* seed */
|
||||
size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */
|
||||
size_t l1;
|
||||
for (l1=l; l1>=step; l1-=step) /* compute hash */
|
||||
h = h ^ ((h<<5)+(h>>2)+cast(unsigned char, str[l1-1]));
|
||||
return h;
|
||||
#else
|
||||
return hash_sparse(str, l);
|
||||
#endif
|
||||
}
|
||||
|
||||
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
|
||||
GCObject *o;
|
||||
unsigned int h = luaS_hash(str, l);
|
||||
for (o = G(L)->strt.hash[lmod(h, G(L)->strt.size)];
|
||||
o != NULL;
|
||||
o = o->gch.next) {
|
||||
TString *ts = rawgco2ts(o);
|
||||
if (l_unlikely(ts->tsv.len == l && (memcmp(str, getstr(ts), l) == 0))) {
|
||||
if (ts->tsv.hash == h &&
|
||||
ts->tsv.len == l &&
|
||||
(memcmp(str, getstr(ts), l) == 0)) {
|
||||
/* string may be dead */
|
||||
if (isdead(G(L), o)) changewhite(o);
|
||||
return ts;
|
||||
|
||||
+1
-1
@@ -527,7 +527,7 @@ static int str_find_aux (lua_State *L, int find) {
|
||||
if (find) {
|
||||
lua_pushinteger(L, s1-s+1); /* start */
|
||||
lua_pushinteger(L, res-s); /* end */
|
||||
return push_captures(&ms, NULL, 0) + 2;
|
||||
return push_captures(&ms, NULL, NULL) + 2;
|
||||
}
|
||||
else
|
||||
return push_captures(&ms, s1, res);
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
|
||||
}
|
||||
|
||||
|
||||
TValue *luaT_gettmbyobj (lua_State *L, TValue *o, TMS event) {
|
||||
TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
|
||||
Table *mt;
|
||||
switch (ttype(o)) {
|
||||
case LUA_TTABLE:
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ LUAI_DATA const char *const luaT_typenames[];
|
||||
|
||||
|
||||
LUAI_FUNC TValue *luaT_gettm (Table *events, TMS event, TString *ename);
|
||||
LUAI_FUNC TValue *luaT_gettmbyobj (lua_State *L, TValue *o, TMS event);
|
||||
LUAI_FUNC TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event);
|
||||
LUAI_FUNC void luaT_init (lua_State *L);
|
||||
|
||||
#endif
|
||||
+3
-23
@@ -11,12 +11,8 @@
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define INT32 __int32
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#define INT32 int32_t
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef min // Double-Check with WATTCP-32's cdefs.h
|
||||
@@ -570,9 +566,6 @@
|
||||
#define luai_numshl(a,b) ((unsigned)(a)<<(unsigned)(b))
|
||||
#define luai_numshr(a,b) ((unsigned)(a)>>(unsigned)(b))
|
||||
#define luai_numnot(a) (~((unsigned)(a)))
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4244)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -589,24 +582,11 @@
|
||||
#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \
|
||||
(defined(__i386) || defined (_M_IX86) || defined(__i386__))
|
||||
|
||||
/* On a Microsoft compiler, use assembler */
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#define lua_number2int(i,d) __asm fld d __asm fistp i
|
||||
#define lua_number2integer(i,n) lua_number2int(i, n)
|
||||
|
||||
/* the next trick should work on any Pentium, but sometimes clashes
|
||||
with a DirectX idiosyncrasy */
|
||||
#else
|
||||
|
||||
union luai_Cast { double l_d; long l_l; };
|
||||
#define lua_number2int(i,d) \
|
||||
{ volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; }
|
||||
#define lua_number2integer(i,n) lua_number2int(i, n)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* this option always works, but may be slow */
|
||||
#else
|
||||
#define lua_number2int(i,d) ((i)=(int)(d))
|
||||
@@ -792,10 +772,10 @@ union luai_Cast { double l_d; long l_l; };
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined(__GNUC__)
|
||||
#define l_likely(x) (__builtin_expect(((x) != 0), 1))
|
||||
#define l_unlikely(x) (__builtin_expect(((x) != 0), 0))
|
||||
#define l_likely(x) (__builtin_expect(!!(x), 1))
|
||||
#define l_unlikely(x) (__builtin_expect(!!(x), 0))
|
||||
#else
|
||||
#define l_likely(x) (x)
|
||||
#define l_likely(x) (x)
|
||||
#define l_unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
|
||||
+145
-54
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
|
||||
/* limit for table tag-method chains (to avoid loops) */
|
||||
/* limit for table tag-method chains (to avoid infinite loops) */
|
||||
#define MAXTAGLOOP 100
|
||||
|
||||
|
||||
@@ -105,61 +105,94 @@ static void callTM (lua_State *L, const TValue *f, const TValue *p1,
|
||||
}
|
||||
|
||||
|
||||
void luaV_gettable (lua_State *L, TValue *t, TValue *key, StkId val) {
|
||||
int loop;
|
||||
/*
|
||||
** Finish the table access 'val = t[key]'.
|
||||
** if 'slot' is NULL, 't' is not a table; otherwise, 'slot' points to
|
||||
** t[k] entry (which must be nil).
|
||||
*/
|
||||
void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val,
|
||||
const TValue *slot) {
|
||||
int loop; /* counter to avoid infinite loops */
|
||||
const TValue *tm; /* metamethod */
|
||||
for (loop = 0; loop < MAXTAGLOOP; loop++) {
|
||||
TValue *tm;
|
||||
if (ttistable(t)) { /* `t' is a table? */
|
||||
Table *h = hvalue(t);
|
||||
const TValue *res = luaH_get(h, key); /* do a primitive get */
|
||||
if (!ttisnil(res) || /* result is no nil? */
|
||||
(tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */
|
||||
setobj2s(L, val, res);
|
||||
if (slot == NULL) { /* 't' is not a table? */
|
||||
lua_assert(!ttistable(t));
|
||||
tm = luaT_gettmbyobj(L, t, TM_INDEX);
|
||||
if (l_unlikely(ttisnil(tm)))
|
||||
luaG_typeerror(L, t, "index"); /* no metamethod */
|
||||
/* else will try the metamethod */
|
||||
}
|
||||
else { /* 't' is a table */
|
||||
lua_assert(ttisnil(slot));
|
||||
tm = fasttm(L, hvalue(t)->metatable, TM_INDEX); /* table's metamethod */
|
||||
if (tm == NULL) { /* no metamethod? */
|
||||
setnilvalue(val); /* result is nil */
|
||||
return;
|
||||
}
|
||||
/* else will try the tag method */
|
||||
/* else will try the metamethod */
|
||||
}
|
||||
else if (l_unlikely(ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX))))
|
||||
luaG_typeerror(L, t, "index");
|
||||
if (ttisfunction(tm)) {
|
||||
callTMres(L, val, tm, t, key);
|
||||
if (ttisfunction(tm)) { /* is metamethod a function? */
|
||||
callTMres(L, val, tm, t, key); /* call it */
|
||||
return;
|
||||
}
|
||||
t = tm; /* else repeat with `tm' */
|
||||
t = tm; /* else try to access 'tm[key]' */
|
||||
if (luaV_fastget(L,t,key,slot,luaH_get)) { /* fast track? */
|
||||
setobj2s(L, val, slot); /* done */
|
||||
return;
|
||||
}
|
||||
/* else repeat (tail call 'luaV_finishget') */
|
||||
}
|
||||
luaG_runerror(L, "loop in gettable");
|
||||
luaG_runerror(L, "'__index' chain too long; possible loop");
|
||||
}
|
||||
|
||||
|
||||
void luaV_settable (lua_State *L, TValue *t, TValue *key, StkId val) {
|
||||
int loop;
|
||||
/*
|
||||
** Finish a table assignment 't[key] = val'.
|
||||
** If 'slot' is NULL, 't' is not a table. Otherwise, 'slot' points
|
||||
** to the entry 't[key]', or to 'luaO_nilobject' if there is no such
|
||||
** entry. (The value at 'slot' must be nil, otherwise 'luaV_fastset'
|
||||
** would have done the job.)
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
|
||||
StkId val, const TValue *slot) {
|
||||
int loop; /* counter to avoid infinite loops */
|
||||
for (loop = 0; loop < MAXTAGLOOP; loop++) {
|
||||
TValue *tm = NULL;
|
||||
if (ttistable(t)) { /* `t' is a table? */
|
||||
const TValue *tm;
|
||||
if (slot != NULL) {
|
||||
lua_assert(ttistable(t) && ttisnil(slot));
|
||||
Table *h = hvalue(t);
|
||||
TValue *oldval = luaH_set(L, h, key); /* do a primitive set */
|
||||
/* oldval is nil=> look for newindex, oldval is not nil => look for usedindex */
|
||||
if (!((ttisnil(oldval) && ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) != NULL)) ||
|
||||
((!ttisnil(oldval)) && ((tm = fasttm(L, h->metatable, TM_USEDINDEX)) != NULL)))) {
|
||||
setobj2t(L, oldval, val);
|
||||
/* must check the metamethod */
|
||||
/* slot is nil=> look for newindex, slot is not nil => look for usedindex */
|
||||
if (!((ttisnil(slot) && ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) != NULL)) ||
|
||||
((!ttisnil(slot)) && ((tm = fasttm(L, h->metatable, TM_USEDINDEX)) != NULL)))) {
|
||||
/* no metamethod and (now) there is an entry with given key */
|
||||
setobj2t(L, cast(TValue *, slot), val);
|
||||
luaC_barriert(L, h, val);
|
||||
return;
|
||||
}
|
||||
/* else will try the tag method */
|
||||
/* else will try the metamethod */
|
||||
}
|
||||
else if (l_unlikely(ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX))))
|
||||
luaG_typeerror(L, t, "index");
|
||||
else { /* not a table; check metamethod */
|
||||
if (l_unlikely(ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX))))
|
||||
luaG_typeerror(L, t, "index");
|
||||
}
|
||||
/* try the metamethod */
|
||||
if (ttisfunction(tm)) {
|
||||
callTM(L, tm, t, key, val);
|
||||
return;
|
||||
}
|
||||
t = tm; /* else repeat with `tm' */
|
||||
t = tm; /* else repeat assignment over 'tm' */
|
||||
if (luaV_fastset(L, t, key, slot, luaH_set, val))
|
||||
return; /* done */
|
||||
/* else loop */
|
||||
}
|
||||
luaG_runerror(L, "loop in settable");
|
||||
luaG_runerror(L, "settable chain too long; possible loop");
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
static int call_binTM (lua_State *L, TValue *p1, TValue *p2,
|
||||
static int call_binTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||
StkId res, TMS event) {
|
||||
const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
|
||||
if (ttisnil(tm))
|
||||
@@ -184,7 +217,7 @@ static const TValue *get_compTM (lua_State *L, Table *mt1, Table *mt2,
|
||||
}
|
||||
|
||||
|
||||
static int call_orderTM (lua_State *L, TValue *p1, TValue *p2,
|
||||
static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,
|
||||
TMS event) {
|
||||
const TValue *tm1 = luaT_gettmbyobj(L, p1, event);
|
||||
const TValue *tm2;
|
||||
@@ -366,6 +399,7 @@ static void Arith (lua_State *L, StkId ra, TValue *rb,
|
||||
|
||||
|
||||
#define arith_op(op,tm) { \
|
||||
StkId ra = RA(i); \
|
||||
TValue *rb = RKB(i); \
|
||||
TValue *rc = RKC(i); \
|
||||
if (ttisnumber(rb) && ttisnumber(rc)) { \
|
||||
@@ -377,6 +411,24 @@ static void Arith (lua_State *L, StkId ra, TValue *rb,
|
||||
}
|
||||
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
|
||||
/*
|
||||
** copy of 'luaV_gettable', but protecting call to potential metamethod
|
||||
** (which can reallocate the stack)
|
||||
*/
|
||||
#define gettableProtected(L,t,k,v) { const TValue *slot; \
|
||||
if (luaV_fastget(L,t,k,slot,luaH_get)) { setobj2s(L, v, slot); } \
|
||||
else Protect(luaV_finishget(L,t,k,v,slot)); }
|
||||
|
||||
|
||||
/* same for 'luaV_settable' */
|
||||
#define settableProtected(L,t,k,v) { const TValue *slot; \
|
||||
if (!luaV_fastset(L,t,k,slot,luaH_set,v)) \
|
||||
Protect(luaV_finishset(L,t,k,v,slot)); }
|
||||
|
||||
|
||||
|
||||
void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
LClosure *cl;
|
||||
@@ -386,13 +438,12 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
reentry: /* entry point */
|
||||
lua_assert(isLua(L->ci));
|
||||
pc = L->savedpc;
|
||||
cl = &clvalue(L->ci->func)->l;
|
||||
base = L->base;
|
||||
k = cl->p->k;
|
||||
cl = &clvalue(L->ci->func)->l; /* local reference to function's closure */
|
||||
k = cl->p->k; /* local reference to function's constant table */
|
||||
base = L->base; /* local copy of function's base */
|
||||
/* main loop of interpreter */
|
||||
for (;;) {
|
||||
const Instruction i = *pc++;
|
||||
StkId ra;
|
||||
if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) &&
|
||||
(--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) {
|
||||
traceexec(L, pc);
|
||||
@@ -402,26 +453,28 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
}
|
||||
base = L->base;
|
||||
}
|
||||
/* warning!! several calls may realloc the stack and invalidate `ra' */
|
||||
ra = RA(i);
|
||||
lua_assert(base == L->base && L->base == L->ci->base);
|
||||
lua_assert(base <= L->top && L->top <= L->stack + L->stacksize);
|
||||
lua_assert(L->top == L->ci->top || luaG_checkopenop(i));
|
||||
switch (GET_OPCODE(i)) {
|
||||
case OP_MOVE: {
|
||||
StkId ra = RA(i);
|
||||
setobjs2s(L, ra, RB(i));
|
||||
continue;
|
||||
}
|
||||
case OP_LOADK: {
|
||||
StkId ra = RA(i);
|
||||
setobj2s(L, ra, KBx(i));
|
||||
continue;
|
||||
}
|
||||
case OP_LOADBOOL: {
|
||||
StkId ra = RA(i);
|
||||
setbvalue(ra, GETARG_B(i));
|
||||
if (GETARG_C(i)) pc++; /* skip next instruction (if C) */
|
||||
continue;
|
||||
}
|
||||
case OP_LOADNIL: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RB(i);
|
||||
do {
|
||||
setnilvalue(rb--);
|
||||
@@ -429,11 +482,13 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_GETUPVAL: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i);
|
||||
setobj2s(L, ra, cl->upvals[b]->v);
|
||||
continue;
|
||||
}
|
||||
case OP_GETGLOBAL: {
|
||||
StkId ra = RA(i);
|
||||
TValue g;
|
||||
TValue *rb = KBx(i);
|
||||
sethvalue(L, &g, cl->env);
|
||||
@@ -442,10 +497,14 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_GETTABLE: {
|
||||
Protect(luaV_gettable(L, RB(i), RKC(i), ra));
|
||||
StkId ra = RA(i);
|
||||
StkId rb = RB(i);
|
||||
TValue *rc = RKC(i);
|
||||
gettableProtected(L, rb, rc, ra);
|
||||
continue;
|
||||
}
|
||||
case OP_SETGLOBAL: {
|
||||
StkId ra = RA(i);
|
||||
TValue g;
|
||||
sethvalue(L, &g, cl->env);
|
||||
lua_assert(ttisstring(KBx(i)));
|
||||
@@ -453,16 +512,21 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_SETUPVAL: {
|
||||
StkId ra = RA(i);
|
||||
UpVal *uv = cl->upvals[GETARG_B(i)];
|
||||
setobj(L, uv->v, ra);
|
||||
luaC_barrier(L, uv, ra);
|
||||
continue;
|
||||
}
|
||||
case OP_SETTABLE: {
|
||||
Protect(luaV_settable(L, ra, RKB(i), RKC(i)));
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RKB(i);
|
||||
TValue *rc = RKC(i);
|
||||
settableProtected(L, ra, rb, rc);
|
||||
continue;
|
||||
}
|
||||
case OP_NEWTABLE: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i);
|
||||
int c = GETARG_C(i);
|
||||
sethvalue(L, ra, luaH_new(L, luaO_fb2int(b), luaO_fb2int(c)));
|
||||
@@ -470,9 +534,16 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_SELF: {
|
||||
StkId ra = RA(i);
|
||||
const TValue *slot;
|
||||
StkId rb = RB(i);
|
||||
setobjs2s(L, ra+1, rb);
|
||||
Protect(luaV_gettable(L, rb, RKC(i), ra));
|
||||
TValue *rc = RKC(i);
|
||||
TString *key = rawtsvalue(rc); /* key must be a string */
|
||||
setobjs2s(L, ra + 1, rb);
|
||||
if (luaV_fastget(L, rb, key, slot, luaH_getstr)) {
|
||||
setobj2s(L, ra, slot);
|
||||
}
|
||||
else Protect(luaV_finishget(L, rb, rc, ra, slot));
|
||||
continue;
|
||||
}
|
||||
case OP_ADD: {
|
||||
@@ -488,6 +559,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_DIV: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RKB(i);
|
||||
TValue *rc = RKC(i);
|
||||
if (ttisnumber(rb) && ttisnumber(rc)) {
|
||||
@@ -503,6 +575,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_MOD: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RKB(i);
|
||||
TValue *rc = RKC(i);
|
||||
if (ttisnumber(rb) && ttisnumber(rc)) {
|
||||
@@ -522,26 +595,27 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_BAND: {
|
||||
arith_op(luai_numand, TM_AND);
|
||||
continue;
|
||||
arith_op(luai_numand, TM_AND);
|
||||
continue;
|
||||
}
|
||||
case OP_BOR: {
|
||||
arith_op(luai_numor, TM_OR);
|
||||
continue;
|
||||
arith_op(luai_numor, TM_OR);
|
||||
continue;
|
||||
}
|
||||
case OP_BXOR: {
|
||||
arith_op(luai_numxor, TM_XOR);
|
||||
continue;
|
||||
arith_op(luai_numxor, TM_XOR);
|
||||
continue;
|
||||
}
|
||||
case OP_BSHL: {
|
||||
arith_op(luai_numshl, TM_SHL);
|
||||
continue;
|
||||
arith_op(luai_numshl, TM_SHL);
|
||||
continue;
|
||||
}
|
||||
case OP_BSHR: {
|
||||
arith_op(luai_numshr, TM_SHR);
|
||||
continue;
|
||||
arith_op(luai_numshr, TM_SHR);
|
||||
continue;
|
||||
}
|
||||
case OP_BNOT: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RB(i);
|
||||
if (ttisnumber(rb)) {
|
||||
lua_Number nb = nvalue(rb);
|
||||
@@ -553,6 +627,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_UNM: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RB(i);
|
||||
if (ttisnumber(rb)) {
|
||||
lua_Number nb = nvalue(rb);
|
||||
@@ -564,11 +639,13 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_NOT: {
|
||||
StkId ra = RA(i);
|
||||
int res = l_isfalse(RB(i)); /* next assignment may change this value */
|
||||
setbvalue(ra, res);
|
||||
continue;
|
||||
}
|
||||
case OP_LEN: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RB(i);
|
||||
switch (ttype(rb)) {
|
||||
case LUA_TTABLE: {
|
||||
@@ -626,12 +703,14 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_TEST: {
|
||||
StkId ra = RA(i);
|
||||
if (l_isfalse(ra) != GETARG_C(i))
|
||||
dojump(L, pc, GETARG_sBx(*pc));
|
||||
pc++;
|
||||
continue;
|
||||
}
|
||||
case OP_TESTSET: {
|
||||
StkId ra = RA(i);
|
||||
TValue *rb = RB(i);
|
||||
if (l_isfalse(rb) != GETARG_C(i)) {
|
||||
setobjs2s(L, ra, rb);
|
||||
@@ -641,6 +720,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_CALL: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i);
|
||||
int nresults = GETARG_C(i) - 1;
|
||||
if (b != 0) L->top = ra+b; /* else previous instruction set top */
|
||||
@@ -662,6 +742,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
}
|
||||
}
|
||||
case OP_TAILCALL: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i);
|
||||
if (b != 0) L->top = ra+b; /* else previous instruction set top */
|
||||
L->savedpc = pc;
|
||||
@@ -694,6 +775,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
}
|
||||
}
|
||||
case OP_RETURN: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i);
|
||||
if (b != 0) L->top = ra+b-1;
|
||||
if (L->openupval) luaF_close(L, base);
|
||||
@@ -709,6 +791,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
}
|
||||
}
|
||||
case OP_FORLOOP: {
|
||||
StkId ra = RA(i);
|
||||
lua_Number step = nvalue(ra+2);
|
||||
lua_Number idx = luai_numadd(nvalue(ra), step); /* increment index */
|
||||
lua_Number limit = nvalue(ra+1);
|
||||
@@ -721,6 +804,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_FORPREP: {
|
||||
StkId ra = RA(i);
|
||||
const TValue *init = ra;
|
||||
const TValue *plimit = ra+1;
|
||||
const TValue *pstep = ra+2;
|
||||
@@ -737,6 +821,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_TFORLOOP: {
|
||||
StkId ra = RA(i);
|
||||
StkId cb = ra + 3; /* call base */
|
||||
setobjs2s(L, cb+2, ra+2);
|
||||
setobjs2s(L, cb+1, ra+1);
|
||||
@@ -753,6 +838,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_SETLIST: {
|
||||
StkId ra = RA(i);
|
||||
int n = GETARG_B(i);
|
||||
int c = GETARG_C(i);
|
||||
int last;
|
||||
@@ -775,10 +861,12 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_CLOSE: {
|
||||
StkId ra = RA(i);
|
||||
luaF_close(L, ra);
|
||||
continue;
|
||||
}
|
||||
case OP_CLOSURE: {
|
||||
StkId ra = RA(i);
|
||||
Proto *p;
|
||||
Closure *ncl;
|
||||
int nup, j;
|
||||
@@ -799,6 +887,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_VARARG: {
|
||||
StkId ra = RA(i);
|
||||
int b = GETARG_B(i) - 1;
|
||||
int j;
|
||||
CallInfo *ci = L->ci;
|
||||
@@ -822,3 +911,5 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
+51
-4
@@ -22,14 +22,61 @@
|
||||
(ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))
|
||||
|
||||
|
||||
/*
|
||||
** fast track for 'gettable': if 't' is a table and 't[k]' is not nil,
|
||||
** return 1 with 'slot' pointing to 't[k]' (final result). Otherwise,
|
||||
** return 0 (meaning it will have to check metamethod) with 'slot'
|
||||
** pointing to a nil 't[k]' (if 't' is a table) or NULL (otherwise).
|
||||
** 'f' is the raw get function to use.
|
||||
*/
|
||||
#define luaV_fastget(L,t,k,slot,f) \
|
||||
(!ttistable(t) \
|
||||
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
|
||||
: (slot = f(hvalue(t), k), /* else, do raw access */ \
|
||||
!ttisnil(slot))) /* result not nil? */
|
||||
|
||||
/*
|
||||
** standard implementation for 'gettable'
|
||||
*/
|
||||
#define luaV_gettable(L,t,k,v) { const TValue *slot; \
|
||||
if (luaV_fastget(L,t,k,slot,luaH_get)) { setobj2s(L, v, slot); } \
|
||||
else luaV_finishget(L,t,k,v,slot); }
|
||||
|
||||
|
||||
/*
|
||||
** Fast track for set table. If 't' is a table and 't[k]' is not nil,
|
||||
** call GC barrier, do a raw 't[k]=v', and return true; otherwise,
|
||||
** return false with 'slot' equal to NULL (if 't' is not a table) or
|
||||
** 'nil'. (This is needed by 'luaV_finishget'.) Note that, if the macro
|
||||
** returns true, there is no need to 'invalidateTMcache', because the
|
||||
** call is not creating a new entry.
|
||||
*/
|
||||
#define luaV_fastset(L,t,k,slot,f,v) \
|
||||
(!ttistable(t) \
|
||||
? (slot = NULL, 0) \
|
||||
: (slot = f(L, hvalue(t), k), \
|
||||
ttisnil(slot) ? 0 \
|
||||
: (__extension__ ({ \
|
||||
if (valiswhite(v) && isblack(obj2gco(hvalue(t)))) \
|
||||
luaC_barrierback(L, hvalue(t)); \
|
||||
setobj2t(L, cast(TValue *,slot), v); \
|
||||
1; \
|
||||
}))))
|
||||
|
||||
#define luaV_settable(L,t,k,v) { const TValue *slot; \
|
||||
if (!luaV_fastset(L,t,k,slot,luaH_set,v)) \
|
||||
luaV_finishset(L,t,k,v,slot); }
|
||||
|
||||
|
||||
|
||||
LUAI_FUNC int luaV_lessthan (lua_State *L, TValue *l, TValue *r);
|
||||
LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2);
|
||||
LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);
|
||||
LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);
|
||||
LUAI_FUNC void luaV_gettable (lua_State *L, TValue *t, TValue *key,
|
||||
StkId val);
|
||||
LUAI_FUNC void luaV_settable (lua_State *L, TValue *t, TValue *key,
|
||||
StkId val);
|
||||
LUAI_FUNC void luaV_finishget (lua_State *L, const TValue *t, TValue *key,
|
||||
StkId val, const TValue *tm);
|
||||
LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
|
||||
StkId val, const TValue *oldval);
|
||||
LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls);
|
||||
LUAI_FUNC void luaV_concat (lua_State *L, int total, int last);
|
||||
|
||||
|
||||
+33
-31
@@ -1,7 +1,8 @@
|
||||
// SONIC ROBO BLAST 2
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2025 by Sonic Team Junior.
|
||||
// Copyright (C) 2025 by Kart Krew.
|
||||
// Copyright (C) 2020 by Sonic Team Junior.
|
||||
// Copyright (C) 2000 by DooM Legacy Team.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
@@ -24,8 +25,9 @@ extern "C" {
|
||||
//
|
||||
// Little-endian machines
|
||||
//
|
||||
|
||||
#define WRITEUINT8(p,b) do { UINT8 *p_tmp = ( UINT8 *)p; const UINT8 tv = ( UINT8)(b); memcpy(p, &tv, sizeof( UINT8)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
#define WRITESINT8(p,b) do { SINT8 *p_tmp = ( SINT8 *)p; const SINT8 tv = ( UINT8)(b); memcpy(p, &tv, sizeof( UINT8)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
#define WRITESINT8(p,b) do { SINT8 *p_tmp = ( SINT8 *)p; const SINT8 tv = ( SINT8)(b); memcpy(p, &tv, sizeof( SINT8)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
#define WRITEINT16(p,b) do { INT16 *p_tmp = ( INT16 *)p; const INT16 tv = ( INT16)(b); memcpy(p, &tv, sizeof( INT16)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
#define WRITEUINT16(p,b) do { UINT16 *p_tmp = ( UINT16 *)p; const UINT16 tv = ( UINT16)(b); memcpy(p, &tv, sizeof( UINT16)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
#define WRITEINT32(p,b) do { INT32 *p_tmp = ( INT32 *)p; const INT32 tv = ( INT32)(b); memcpy(p, &tv, sizeof( INT32)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; } while (0)
|
||||
@@ -36,25 +38,25 @@ extern "C" {
|
||||
|
||||
// what is this?
|
||||
#if defined (__GNUC__)
|
||||
#define READUINT8(p) ({ UINT8 *p_tmp = (UINT8 *)p; UINT8 b; memcpy(&b, p, sizeof( UINT8)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READSINT8(p) ({ SINT8 *p_tmp = (SINT8 *)p; SINT8 b; memcpy(&b, p, sizeof( SINT8)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READINT16(p) ({ INT16 *p_tmp = (INT16 *)p; INT16 b; memcpy(&b, p, sizeof( INT16)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READUINT16(p) ({ UINT16 *p_tmp = (UINT16 *)p; UINT16 b; memcpy(&b, p, sizeof( UINT16)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READINT32(p) ({ INT32 *p_tmp = (INT32 *)p; INT32 b; memcpy(&b, p, sizeof( INT32)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READUINT32(p) ({ UINT32 *p_tmp = (UINT32 *)p; UINT32 b; memcpy(&b, p, sizeof( UINT32)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READCHAR(p) ({ char *p_tmp = (char *)p; char b; memcpy(&b, p, sizeof( char)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READFIXED(p) ({ fixed_t *p_tmp = (fixed_t *)p; fixed_t b; memcpy(&b, p, sizeof(fixed_t)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READANGLE(p) ({ angle_t *p_tmp = (angle_t *)p; angle_t b; memcpy(&b, p, sizeof(angle_t)); p_tmp++; *(void**)(&(p)) = (void *)p_tmp; b; })
|
||||
#define READUINT8(p) ({ const UINT8 *p_tmp = (const UINT8 *)p; UINT8 b; memcpy(&b, p, sizeof( UINT8)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READSINT8(p) ({ const SINT8 *p_tmp = (const SINT8 *)p; SINT8 b; memcpy(&b, p, sizeof( SINT8)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READINT16(p) ({ const INT16 *p_tmp = (const INT16 *)p; INT16 b; memcpy(&b, p, sizeof( INT16)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READUINT16(p) ({ const UINT16 *p_tmp = (const UINT16 *)p; UINT16 b; memcpy(&b, p, sizeof( UINT16)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READINT32(p) ({ const INT32 *p_tmp = (const INT32 *)p; INT32 b; memcpy(&b, p, sizeof( INT32)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READUINT32(p) ({ const UINT32 *p_tmp = (const UINT32 *)p; UINT32 b; memcpy(&b, p, sizeof( UINT32)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READCHAR(p) ({ const char *p_tmp = (const char *)p; char b; memcpy(&b, p, sizeof( char)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READFIXED(p) ({ const fixed_t *p_tmp = (const fixed_t *)p; fixed_t b; memcpy(&b, p, sizeof(fixed_t)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#define READANGLE(p) ({ const angle_t *p_tmp = (const angle_t *)p; angle_t b; memcpy(&b, p, sizeof(angle_t)); p_tmp++; *(const void**)(&(p)) = (const void *)p_tmp; b; })
|
||||
#else
|
||||
#define READUINT8(p) ((UINT8*)(*(void**)(&(p)) = (void*)&((UINT8*)(p))[1]))[-1]
|
||||
#define READSINT8(p) ((SINT8*)(*(void**)(&(p)) = (void*)&((SINT8*)(p))[1]))[-1]
|
||||
#define READINT16(p) ((INT16*)(*(void**)(&(p)) = (void*)&((INT16*)(p))[1]))[-1]
|
||||
#define READUINT16(p) ((UINT16*)(*(void**)(&(p)) = (void*)&((UINT16*)(p))[1]))[-1]
|
||||
#define READINT32(p) ((INT32*)(*(void**)(&(p)) = (void*)&((INT32*)(p))[1]))[-1]
|
||||
#define READUINT32(p) ((UINT32*)(*(void**)(&(p)) = (void*)&((UINT32*)(p))[1]))[-1]
|
||||
#define READCHAR(p) ((char*)(*(void**)(&(p)) = (void*)&((char*)(p))[1]))[-1]
|
||||
#define READFIXED(p) ((fixed_t*)(*(void**)(&(p)) = (void*)&((fixed_t*)(p))[1]))[-1]
|
||||
#define READANGLE(p) ((angle_t*)(*(void**)(&(p)) = (void*)&((angle_t*)(p))[1]))[-1]
|
||||
#define READUINT8(p) ((const UINT8*) (*(const void**)(&(p)) = (const void*)&((const UINT8*) (p))[1]))[-1]
|
||||
#define READSINT8(p) ((const SINT8*) (*(const void**)(&(p)) = (const void*)&((const SINT8*) (p))[1]))[-1]
|
||||
#define READINT16(p) ((const INT16*) (*(const void**)(&(p)) = (const void*)&((const INT16*) (p))[1]))[-1]
|
||||
#define READUINT16(p) ((const UINT16*) (*(const void**)(&(p)) = (const void*)&((const UINT16*) (p))[1]))[-1]
|
||||
#define READINT32(p) ((const INT32*) (*(const void**)(&(p)) = (const void*)&((const INT32*) (p))[1]))[-1]
|
||||
#define READUINT32(p) ((const UINT32*) (*(const void**)(&(p)) = (const void*)&((const UINT32*) (p))[1]))[-1]
|
||||
#define READCHAR(p) ((const char*) (*(const void**)(&(p)) = (const void*)&((const char*) (p))[1]))[-1]
|
||||
#define READFIXED(p) ((const fixed_t*)(*(const void**)(&(p)) = (const void*)&((const fixed_t*)(p))[1]))[-1]
|
||||
#define READANGLE(p) ((const angle_t*)(*(const void**)(&(p)) = (const void*)&((const angle_t*)(p))[1]))[-1]
|
||||
#endif
|
||||
|
||||
#else //SRB2_BIG_ENDIAN
|
||||
@@ -117,15 +119,15 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
|
||||
return (ucp[3] << 24) | (ucp[2] << 16) | (ucp[1] << 8) | ucp[0];
|
||||
}
|
||||
|
||||
#define READUINT8(p) ((UINT8*)(p = (void*)&((UINT8*)p)[1]))[-1]
|
||||
#define READSINT8(p) ((SINT8*)(p = (void*)&((SINT8*)p)[1]))[-1]
|
||||
#define READINT16(p) readshort(&((INT16*)(p = (void*)&((INT16*)p)[1]))[-1])
|
||||
#define READUINT16(p) readushort(&((UINT16*)(p = (void*)&((UINT16*)p)[1]))[-1])
|
||||
#define READINT32(p) readlong(&((INT32*)(p = (void*)&((INT32*)p)[1]))[-1])
|
||||
#define READUINT32(p) readulong(&((UINT32*)(p = (void*)&((UINT32*)p)[1]))
|
||||
#define READCHAR(p) ((char*)(p = (void*)&((char*)p)[1]))[-1]
|
||||
#define READFIXED(p) readlong(&((fixed_t*)(p = (void*)&((fixed_t*)p)[1]))[-1])
|
||||
#define READANGLE(p) readulong(&((angle_t*)(p = (void*)&((angle_t*)p)[1]))[-1])
|
||||
#define READUINT8(p) ((const UINT8*)(p = (const void*)&((const UINT8*)p)[1]))[-1]
|
||||
#define READSINT8(p) ((const SINT8*)(p = (const void*)&((const SINT8*)p)[1]))[-1]
|
||||
#define READINT16(p) readshort(&((const INT16*)(p = (const void*)&((const INT16*)p)[1]))[-1])
|
||||
#define READUINT16(p) readushort(&((const UINT16*)(p = (const void*)&((const UINT16*)p)[1]))[-1])
|
||||
#define READINT32(p) readlong(&((const INT32*)(p = (const void*)&((const INT32*)p)[1]))[-1])
|
||||
#define READUINT32(p) readulong(&((const UINT32*)(p = (const void*)&((const UINT32*)p)[1]))[-1])
|
||||
#define READCHAR(p) ((const char*)(p = (const void*)&((const char*)p)[1]))[-1]
|
||||
#define READFIXED(p) readlong(&((const fixed_t*)(p = (const void*)&((const fixed_t*)p)[1]))[-1])
|
||||
#define READANGLE(p) readulong(&((const angle_t*)(p = (const void*)&((const angle_t*)p)[1]))[-1])
|
||||
#endif //SRB2_BIG_ENDIAN
|
||||
|
||||
#define WRITESTRINGN(p, s, n) do { \
|
||||
|
||||
+91
-84
@@ -57,7 +57,6 @@ static void CV_EnforceExecVersion(void);
|
||||
static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr);
|
||||
|
||||
static boolean CV_Command(void);
|
||||
consvar_t *CV_FindVar(const char *name);
|
||||
static const char *CV_StringValue(const char *var_name);
|
||||
static consvar_t *consvar_vars; // list of registered console variables
|
||||
|
||||
@@ -142,7 +141,7 @@ void COM_BufInsertText(const char *ptext)
|
||||
templen = com_text.cursize;
|
||||
if (templen)
|
||||
{
|
||||
temp = M_Memcpy(ZZ_Alloc(templen), com_text.data, templen);
|
||||
temp = memcpy(ZZ_Alloc(templen), com_text.data, templen);
|
||||
VS_Clear(&com_text);
|
||||
}
|
||||
|
||||
@@ -199,7 +198,7 @@ void COM_BufExecute(void)
|
||||
break;
|
||||
}
|
||||
|
||||
M_Memcpy(line, ptext, i);
|
||||
memcpy(line, ptext, i);
|
||||
line[i] = 0;
|
||||
|
||||
// flush the command text from the command buffer, _BEFORE_
|
||||
@@ -238,10 +237,13 @@ void COM_ImmedExecute(const char *ptext)
|
||||
char line[1024] = "";
|
||||
INT32 quotes;
|
||||
|
||||
while (i < strlen(ptext))
|
||||
const size_t txtlength = strlen(ptext);
|
||||
|
||||
while (i < txtlength)
|
||||
{
|
||||
quotes = 0;
|
||||
for (j = 0; i < strlen(ptext); i++,j++)
|
||||
|
||||
for (j = 0; i < txtlength; i++,j++)
|
||||
{
|
||||
if (ptext[i] == '\"' && !quotes && i > 0 && ptext[i-1] != ' ') // Malformed command
|
||||
return;
|
||||
@@ -277,11 +279,11 @@ static xcommand_t *com_commands = NULL; // current commands
|
||||
|
||||
#define MAX_ARGS 80
|
||||
static size_t com_argc;
|
||||
char *com_argv[MAX_ARGS];
|
||||
char *com_argv[MAX_ARGS] = {};
|
||||
static const char *com_null_string = "";
|
||||
static char *com_args = NULL; // current command args or NULL
|
||||
|
||||
static void Got_NetVar(UINT8 **p, INT32 playernum);
|
||||
static void Got_NetVar(const UINT8 **p, INT32 playernum);
|
||||
|
||||
/** Initializes command buffer and adds basic commands.
|
||||
*/
|
||||
@@ -359,7 +361,7 @@ size_t COM_CheckParm(const char *check)
|
||||
size_t i;
|
||||
|
||||
for (i = 1; i < com_argc; i++)
|
||||
if (!strcasecmp(check, com_argv[i]))
|
||||
if (fasticmp(check, com_argv[i]))
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
@@ -456,7 +458,7 @@ void COM_AddCommand(const char *name, com_func_t func)
|
||||
// fail if the command already exists
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
// don't I_Error for Lua commands
|
||||
// Lua commands can replace game commands, and they have priority.
|
||||
@@ -492,7 +494,7 @@ int COM_AddLuaCommand(const char *name)
|
||||
// command already exists
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
// replace the built in command.
|
||||
cmd->function = COM_Lua_f;
|
||||
@@ -519,7 +521,7 @@ static boolean COM_Exists(const char *com_name)
|
||||
xcommand_t *cmd;
|
||||
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
if (!stricmp(com_name, cmd->name))
|
||||
if (fasticmp(com_name, cmd->name))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -571,7 +573,7 @@ static void COM_ExecuteString(char *ptext)
|
||||
// check functions
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
cmd->function();
|
||||
return;
|
||||
@@ -581,7 +583,7 @@ static void COM_ExecuteString(char *ptext)
|
||||
// check aliases
|
||||
for (a = com_alias; a; a = a->next)
|
||||
{
|
||||
if (!stricmp(com_argv[0], a->name))
|
||||
if (fasticmp(com_argv[0], a->name))
|
||||
{
|
||||
if (recursion > MAX_ALIAS_RECURSION)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
||||
@@ -653,7 +655,7 @@ static void COM_Alias_f(void)
|
||||
CONS_Printf(M_GetText("All aliases that start with \x87'%s'\x80 are:\n"), begin);
|
||||
|
||||
int count = 0;
|
||||
for (cmdalias_t *head = com_alias; head->next != NULL; head = head->next)
|
||||
for (cmdalias_t *head = com_alias; head != NULL; head = head->next)
|
||||
{
|
||||
if (strncmp(begin, head->name, szBegin) == 0)
|
||||
{
|
||||
@@ -674,7 +676,7 @@ static void COM_Alias_f(void)
|
||||
/* Display alias subtext, show all aliases. */
|
||||
CONS_Printf(M_GetText("alias <name> <command>: create a shortcut command that executes other command(s)\n"));
|
||||
|
||||
for (cmdalias_t *head = com_alias; head->next != NULL; head = head->next)
|
||||
for (cmdalias_t *head = com_alias; head != NULL; head = head->next)
|
||||
{
|
||||
CONS_Printf(alias_format, head->name, head->value);
|
||||
}
|
||||
@@ -700,6 +702,7 @@ static void COM_Echo_f(void)
|
||||
|
||||
for (i = 1; i < COM_Argc(); i++)
|
||||
CONS_Printf("%s ", COM_Argv(i));
|
||||
|
||||
CONS_Printf("\n");
|
||||
}
|
||||
|
||||
@@ -708,16 +711,14 @@ static void COM_Echo_f(void)
|
||||
static void COM_CEcho_f(void)
|
||||
{
|
||||
size_t i;
|
||||
char cechotext[1024] = "";
|
||||
char cechotext[1024] = {0};
|
||||
|
||||
for (i = 1; i < COM_Argc(); i++)
|
||||
{
|
||||
strncat(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strncat(cechotext, " ", sizeof(cechotext)-1);
|
||||
strlcat(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strlcat(cechotext, " ", sizeof(cechotext)-1);
|
||||
}
|
||||
|
||||
cechotext[sizeof(cechotext) - 1] = '\0';
|
||||
|
||||
HU_DoCEcho(cechotext);
|
||||
}
|
||||
|
||||
@@ -837,7 +838,7 @@ static void COM_Help_f(void)
|
||||
if (cvar->PossibleValue)
|
||||
{
|
||||
{
|
||||
if (!stricmp(cvar->PossibleValue[0].strvalue, "MIN") && !stricmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
||||
if (fasticmp(cvar->PossibleValue[0].strvalue, "MIN") && fasticmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
||||
{
|
||||
if (floatmode)
|
||||
{
|
||||
@@ -880,7 +881,7 @@ static void COM_Help_f(void)
|
||||
{
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (strcmp(cmd->name, help))
|
||||
if (!fastcmp(cmd->name, help))
|
||||
continue;
|
||||
|
||||
CONS_Printf("\x82""Command %s:\n", cmd->name);
|
||||
@@ -940,6 +941,8 @@ static void COM_Find_f(void)
|
||||
}
|
||||
|
||||
help = COM_Argv(1);
|
||||
if (!help)
|
||||
return;
|
||||
helplen = strlen(help);
|
||||
CONS_Printf("\x82""Variables:\n");
|
||||
matchesany = false;
|
||||
@@ -1128,7 +1131,7 @@ void *VS_GetSpace(vsbuf_t *buf, size_t length)
|
||||
*/
|
||||
void VS_Write(vsbuf_t *buf, const void *data, size_t length)
|
||||
{
|
||||
M_Memcpy(VS_GetSpace(buf, length), data, length);
|
||||
memcpy(VS_GetSpace(buf, length), data, length);
|
||||
}
|
||||
|
||||
/** Prints text in a variable buffer. Like VS_Write() plus a
|
||||
@@ -1145,9 +1148,9 @@ void VS_Print(vsbuf_t *buf, const char *data)
|
||||
len = strlen(data) + 1;
|
||||
|
||||
if (buf->data[buf->cursize-1])
|
||||
M_Memcpy((UINT8 *)VS_GetSpace(buf, len), data, len); // no trailing 0
|
||||
memcpy((UINT8 *)VS_GetSpace(buf, len), data, len); // no trailing 0
|
||||
else
|
||||
M_Memcpy((UINT8 *)VS_GetSpace(buf, len-1) - 1, data, len); // write over trailing 0
|
||||
memcpy((UINT8 *)VS_GetSpace(buf, len-1) - 1, data, len); // write over trailing 0
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
@@ -1175,7 +1178,7 @@ consvar_t *CV_FindVar(const char *name)
|
||||
consvar_t *cvar;
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
if (!stricmp(name,cvar->name))
|
||||
if (fasticmp(name,cvar->name))
|
||||
return cvar;
|
||||
|
||||
return NULL;
|
||||
@@ -1365,7 +1368,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
v = INT32_MIN; // Invalid integer trigger
|
||||
}
|
||||
|
||||
if (var->PossibleValue[0].strvalue && !stricmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
||||
if (var->PossibleValue[0].strvalue && fasticmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
||||
{
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
@@ -1378,21 +1381,21 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
|
||||
// search for other
|
||||
for (i = MAXVAL+1; var->PossibleValue[i].strvalue; i++)
|
||||
if (v == var->PossibleValue[i].value || !stricmp(var->PossibleValue[i].strvalue, valstr))
|
||||
if (v == var->PossibleValue[i].value || fasticmp(var->PossibleValue[i].strvalue, valstr))
|
||||
{
|
||||
var->value = var->PossibleValue[i].value;
|
||||
var->string = var->PossibleValue[i].strvalue;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || !stricmp(valstr, "MIN"))
|
||||
if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || fasticmp(valstr, "MIN"))
|
||||
{
|
||||
v = var->PossibleValue[MINVAL].value;
|
||||
valstr = var->PossibleValue[MINVAL].strvalue;
|
||||
override = true;
|
||||
overrideval = v;
|
||||
}
|
||||
else if ((v != INT32_MIN && v > var->PossibleValue[MAXVAL].value) || !stricmp(valstr, "MAX"))
|
||||
else if ((v != INT32_MIN && v > var->PossibleValue[MAXVAL].value) || fasticmp(valstr, "MAX"))
|
||||
{
|
||||
v = var->PossibleValue[MAXVAL].value;
|
||||
valstr = var->PossibleValue[MAXVAL].strvalue;
|
||||
@@ -1410,7 +1413,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
|
||||
// check first strings
|
||||
for (i = 0; var->PossibleValue[i].strvalue; i++)
|
||||
if (!stricmp(var->PossibleValue[i].strvalue, valstr))
|
||||
if (fasticmp(var->PossibleValue[i].strvalue, valstr))
|
||||
goto found;
|
||||
if (v != INT32_MIN)
|
||||
{
|
||||
@@ -1423,9 +1426,9 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
if (var->PossibleValue == CV_OnOff || var->PossibleValue == CV_YesNo)
|
||||
{
|
||||
overrideval = -1;
|
||||
if (!stricmp(valstr, "on") || !stricmp(valstr, "yes"))
|
||||
if (fasticmp(valstr, "on") || fasticmp(valstr, "yes"))
|
||||
overrideval = 1;
|
||||
else if (!stricmp(valstr, "off") || !stricmp(valstr, "no"))
|
||||
else if (fasticmp(valstr, "off") || fasticmp(valstr, "no"))
|
||||
overrideval = 0;
|
||||
|
||||
if (overrideval != -1)
|
||||
@@ -1473,7 +1476,7 @@ finish:
|
||||
var->flags |= CV_MODIFIED;
|
||||
|
||||
// raise 'on change' code
|
||||
LUA_CVarChanged(var->name); // let consolelib know what cvar this is.
|
||||
LUA_CVarChanged(var); // let consolelib know what cvar this is.
|
||||
|
||||
if (var->flags & CV_CALL && !stealth)
|
||||
var->func();
|
||||
@@ -1499,11 +1502,11 @@ badinput:
|
||||
|
||||
static boolean serverloading = false;
|
||||
|
||||
static void Got_NetVar(UINT8 **p, INT32 playernum)
|
||||
static void Got_NetVar(const UINT8 **p, INT32 playernum)
|
||||
{
|
||||
consvar_t *cvar;
|
||||
UINT16 netid;
|
||||
char *svalue;
|
||||
const char *svalue;
|
||||
UINT8 stealth = false;
|
||||
|
||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum) && !serverloading)
|
||||
@@ -1517,9 +1520,10 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
netid = READUINT16(*p);
|
||||
cvar = CV_FindNetVar(netid);
|
||||
svalue = (char *)*p;
|
||||
svalue = (const char *)*p;
|
||||
SKIPSTRING(*p);
|
||||
stealth = READUINT8(*p);
|
||||
|
||||
@@ -1575,8 +1579,9 @@ void CV_SaveNetVars(UINT8 **p, boolean isdemorecording)
|
||||
WRITEUINT16(count_p, count);
|
||||
}
|
||||
|
||||
void CV_LoadNetVars(UINT8 **p)
|
||||
size_t CV_LoadNetVars(const UINT8 *bufstart)
|
||||
{
|
||||
const UINT8 *p = bufstart;
|
||||
consvar_t *cvar;
|
||||
UINT16 count;
|
||||
|
||||
@@ -1587,11 +1592,13 @@ void CV_LoadNetVars(UINT8 **p)
|
||||
if (cvar->flags & CV_NETVAR)
|
||||
Setvalue(cvar, cvar->defaultvalue, true);
|
||||
|
||||
count = READUINT16(*p);
|
||||
count = READUINT16(p);
|
||||
while (count--)
|
||||
Got_NetVar(p, 0);
|
||||
Got_NetVar(&p, 0);
|
||||
|
||||
serverloading = false;
|
||||
|
||||
return p - bufstart;
|
||||
}
|
||||
|
||||
static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth);
|
||||
@@ -1609,7 +1616,7 @@ void CV_ResetCheatNetVars(void)
|
||||
// Returns true if the variable's current value is its default value
|
||||
boolean CV_IsSetToDefault(consvar_t *v)
|
||||
{
|
||||
return (!(strcmp(v->defaultvalue, v->string)));
|
||||
return (fastcmp(v->defaultvalue, v->string));
|
||||
}
|
||||
|
||||
// If any cheats CVars are not at their default settings, return true.
|
||||
@@ -1621,7 +1628,7 @@ UINT8 CV_CheatsEnabled(void)
|
||||
consvar_t *cvar;
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
if ((cvar->flags & CV_CHEAT) && strcmp(cvar->defaultvalue, cvar->string))
|
||||
if ((cvar->flags & CV_CHEAT) && !fastcmp(cvar->defaultvalue, cvar->string))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -1642,7 +1649,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
if (!var->string)
|
||||
I_Error("CV_Set: %s no string set!\n", var->name);
|
||||
#endif
|
||||
if (!var || !var->string || !value || !stricmp(var->string, value))
|
||||
if (!var || !var->string || !value || fasticmp(var->string, value))
|
||||
return; // no changes
|
||||
|
||||
if (var->flags & CV_NETVAR)
|
||||
@@ -1652,21 +1659,21 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
UINT8 *p = buf;
|
||||
if (!(server || (IsPlayerAdmin(consoleplayer))))
|
||||
{
|
||||
CONS_Printf(M_GetText("Only the server or admin can change: %s %s\n"), var->name, var->string);
|
||||
CONS_Alert(CONS_NOTICE, "Only the server or admin can change: %s %s\n", var->name, var->string);
|
||||
return;
|
||||
}
|
||||
|
||||
if (var == &cv_kartencore && !M_SecretUnlocked(SECRET_ENCORE))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't unlocked Encore Mode yet!\n"));
|
||||
CONS_Alert(CONS_NOTICE, "You haven't unlocked Encore Mode yet!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (var == &cv_kartspeed && !M_SecretUnlocked(SECRET_HARDSPEED))
|
||||
{
|
||||
if (!stricmp(value, "Hard") || atoi(value) == 2)
|
||||
if (fasticmp(value, "Hard") || atoi(value) == 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't unlocked this yet!\n"));
|
||||
CONS_Alert(CONS_NOTICE, "You haven't unlocked this yet!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1683,14 +1690,13 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
else
|
||||
Setvalue(var, value, stealth);
|
||||
}
|
||||
else if ((var->flags & CV_NOTINNET) && netgame)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, "This variable can't be changed while in netgame: %s %s\n", var->name, var->string);
|
||||
return;
|
||||
}
|
||||
else
|
||||
if ((var->flags & CV_NOTINNET) && netgame)
|
||||
{
|
||||
CONS_Printf(M_GetText("This variable can't be changed while in netgame: %s %s\n"), var->name, var->string);
|
||||
return;
|
||||
}
|
||||
else
|
||||
Setvalue(var, value, stealth);
|
||||
Setvalue(var, value, stealth);
|
||||
}
|
||||
|
||||
/** Sets a value to a variable without calling its callback function.
|
||||
@@ -1773,7 +1779,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
newvalue = var->value - 1;
|
||||
do
|
||||
{
|
||||
if(increment > 0) // Going up!
|
||||
if (increment > 0) // Going up!
|
||||
{
|
||||
if (++newvalue == NUMMAPS)
|
||||
newvalue = -1;
|
||||
@@ -1787,7 +1793,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
if (newvalue == oldvalue)
|
||||
break; // don't loop forever if there's none of a certain gametype
|
||||
|
||||
if(!mapheaderinfo[newvalue])
|
||||
if (newvalue >= 0 && newvalue < NUMMAPS && !mapheaderinfo[newvalue])
|
||||
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
||||
|
||||
} while (!M_CanShowLevelInList(newvalue, gt));
|
||||
@@ -1799,7 +1805,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
}
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||
else if (var->PossibleValue[MINVAL].strvalue && fastcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||
{ // SRB2Kart
|
||||
#ifdef PARANOIA
|
||||
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||
@@ -1916,13 +1922,14 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
max = (M_SecretUnlocked(SECRET_HARDSPEED) ? 3 : 2);
|
||||
}
|
||||
#ifdef PARANOIA
|
||||
if (currentindice == -1)
|
||||
I_Error("CV_AddValue: current value %d not found in possible value\n",
|
||||
var->value);
|
||||
if (currentindice == -1 || max == 0)
|
||||
I_Error("CV_AddValue: current value %d not found in possible value\n", var->value);
|
||||
#endif
|
||||
|
||||
newindice = (currentindice + increment + max) % max;
|
||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||
if (max > 0)
|
||||
{
|
||||
newindice = (currentindice + increment + max) % max;
|
||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1970,12 +1977,12 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
|
||||
{
|
||||
if (joyaxis_default[i])
|
||||
{
|
||||
if (!stricmp(v->name, "joyaxis_fire"))
|
||||
if (fasticmp(v->name, "joyaxis_fire"))
|
||||
{
|
||||
if (joyaxis_count[i] > 7) return false;
|
||||
else if (joyaxis_count[i] == 7) return true;
|
||||
|
||||
if (!stricmp(valstr, "None")) joyaxis_count[i]++;
|
||||
if (fasticmp(valstr, "None")) joyaxis_count[i]++;
|
||||
else joyaxis_default[i] = false;
|
||||
}
|
||||
// reset all axis settings to defaults
|
||||
@@ -2007,37 +2014,37 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
|
||||
// Block the Xbox DInput default axes and reset to the current defaults
|
||||
static boolean CV_FilterJoyAxisVars2(consvar_t *v, const char *valstr)
|
||||
{
|
||||
if (!stricmp(v->name, "joyaxis_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis2_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis3_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis4_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis2_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis3_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis4_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis2_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis3_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis4_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis2_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis3_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis4_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -2054,8 +2061,8 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
|
||||
|
||||
if (GETMAJOREXECVERSION(cv_execversion.value) < 8) // 8 = 1.4
|
||||
{
|
||||
if (!stricmp(v->name, "masterserver") // Replaces a hack in MasterServer_OnChange for the original SRB2 MS.
|
||||
|| !stricmp(v->name, "gamma")) // Too easy to accidentially change in prior versions.
|
||||
if (fasticmp(v->name, "masterserver") // Replaces a hack in MasterServer_OnChange for the original SRB2 MS.
|
||||
|| fasticmp(v->name, "gamma")) // Too easy to accidentially change in prior versions.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2138,7 +2145,7 @@ void CV_SaveVariables(FILE *f)
|
||||
char stringtowrite[MAXTEXTCMD+1];
|
||||
|
||||
// Silly hack for Min/Max vars
|
||||
if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN"))
|
||||
if (fastcmp(cvar->string, "MAX") || fastcmp(cvar->string, "MIN"))
|
||||
{
|
||||
if (cvar->flags & CV_FLOAT)
|
||||
sprintf(stringtowrite, "%f", FixedToFloat(cvar->value));
|
||||
|
||||
+4
-4
@@ -13,13 +13,13 @@
|
||||
#ifndef __COMMAND_H__
|
||||
#define __COMMAND_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include "doomdef.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "doomdef.h"
|
||||
|
||||
//===================================
|
||||
// Command buffer & command execution
|
||||
//===================================
|
||||
@@ -182,7 +182,7 @@ void CV_SaveVariables(FILE *f);
|
||||
|
||||
// load/save gamesate (load and save option and for network join in game)
|
||||
void CV_SaveNetVars(UINT8 **p, boolean isdemorecording);
|
||||
void CV_LoadNetVars(UINT8 **p);
|
||||
size_t CV_LoadNetVars(const UINT8 *p);
|
||||
|
||||
// reset cheat netvars after cheats is deactivated
|
||||
void CV_ResetCheatNetVars(void);
|
||||
|
||||
+3
-38
@@ -11,21 +11,6 @@
|
||||
|
||||
#ifdef CMAKECONFIG
|
||||
|
||||
// Base SRB2 hashes
|
||||
#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}"
|
||||
#ifdef USE_PATCH_DTA
|
||||
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
|
||||
#endif
|
||||
|
||||
// SRB2Kart-specific hashes
|
||||
#define ASSET_HASH_GFX_KART "${SRB2_ASSET_gfx.kart_HASH}"
|
||||
#define ASSET_HASH_TEXTURES_KART "${SRB2_ASSET_textures.kart_HASH}"
|
||||
#define ASSET_HASH_CHARS_KART "${SRB2_ASSET_chars.kart_HASH}"
|
||||
#define ASSET_HASH_MAPS_KART "${SRB2_ASSET_maps.kart_HASH}"
|
||||
#ifdef USE_PATCH_KART
|
||||
#define ASSET_HASH_PATCH_KART "00000000000000000000000000000000"
|
||||
#endif
|
||||
|
||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
|
||||
|
||||
@@ -33,30 +18,10 @@
|
||||
|
||||
#else
|
||||
|
||||
/* Manually defined asset hashes for non-CMake builds
|
||||
* Last updated 2015 / 05 / 03 - SRB2 v2.1.15 - srb2.srb
|
||||
* Last updated 2018 / 12 / 23 - SRB2 v2.1.22 - patch.dta
|
||||
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
|
||||
* Last updated 2020 / 08 / 30 - Kart v1.3 - patch.kart
|
||||
* Last updated 2022 / 08 / 16 - Kart v1.4 - Main assets
|
||||
* Last updated 2022 / 08 / 19 - Kart v1.5 - gfx.kart
|
||||
* Last updated 2022 / 11 / 01 - Kart v1.6 - gfx.kart, maps.kart
|
||||
*/
|
||||
#define SRB2_COMP_REVISION ""
|
||||
#define SRB2_COMP_BRANCH ""
|
||||
|
||||
// Base SRB2 hashes
|
||||
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
|
||||
#ifdef USE_PATCH_DTA
|
||||
#define ASSET_HASH_PATCH_DTA "b04fd9624bfd94dc96dcf4f400f7deb4"
|
||||
#endif
|
||||
|
||||
// SRB2Kart-specific hashes
|
||||
#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034"
|
||||
#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80"
|
||||
#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964"
|
||||
#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98"
|
||||
#ifdef USE_PATCH_KART
|
||||
#define ASSET_HASH_PATCH_KART "00000000000000000000000000000000"
|
||||
#endif
|
||||
#define CMAKE_ASSETS_DIR ""
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+71
-59
@@ -33,6 +33,8 @@
|
||||
#include "d_main.h"
|
||||
#include "m_menu.h"
|
||||
#include "m_textinput.h"
|
||||
#include "m_emotes.h"
|
||||
#include "i_time.h"
|
||||
#include "filesrch.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
@@ -58,7 +60,7 @@ I_mutex con_mutex;
|
||||
static boolean con_started = false; // console has been initialised
|
||||
boolean con_startup = false; // true at game startup, screen need refreshing
|
||||
static boolean con_forcepic = true; // at startup toggle console translucency when first off
|
||||
boolean con_recalc; // set true when screen size has changed
|
||||
boolean con_recalc = false; // set true when screen size has changed
|
||||
|
||||
static tic_t con_tick; // console ticker for anim or blinking prompt cursor
|
||||
// con_scrollup should use time (currenttime - lasttime)..
|
||||
@@ -66,17 +68,12 @@ static tic_t con_tick; // console ticker for anim or blinking prompt cursor
|
||||
static boolean consoletoggle; // true when console key pushed, ticker will handle
|
||||
static boolean consoleready; // console prompt is ready
|
||||
|
||||
INT32 con_destlines; // vid lines used by console at final position
|
||||
static INT32 con_curlines; // vid lines currently used by console
|
||||
|
||||
INT32 con_clipviewtop; // (useless)
|
||||
INT32 con_destlines = 0; // vid lines used by console at final position
|
||||
static INT32 con_curlines; // vid lines currently used by console
|
||||
|
||||
static UINT8 con_hudlines; // number of console heads up message lines
|
||||
static UINT32 con_hudtime[MAXHUDLINES]; // remaining time of display for hud msg lines
|
||||
|
||||
INT32 con_clearlines; // top screen lines to refresh when view reduced
|
||||
boolean con_hudupdate; // when messages scroll, we need a backgrnd refresh
|
||||
|
||||
// console text output
|
||||
static char *con_line; // console text output current line
|
||||
static size_t con_cx; // cursor position in current line
|
||||
@@ -88,7 +85,7 @@ static size_t con_totallines; // lines of console text into the console buf
|
||||
static size_t con_width; // columns of chars, depend on vid mode width
|
||||
|
||||
static size_t con_scrollup; // how many rows of text to scroll up (pgup/pgdn)
|
||||
UINT32 con_scalefactor; // text size scale factor
|
||||
UINT32 con_scalefactor = 0; // text size scale factor
|
||||
|
||||
// hold 32 last lines of input for history
|
||||
#define CON_MAXPROMPTCHARS 256
|
||||
@@ -172,6 +169,8 @@ static CV_PossibleValue_t menuhighlight_cons_t[] =
|
||||
};
|
||||
consvar_t cons_menuhighlight = {"menuhighlight", "Gametype Default", CV_SAVE, menuhighlight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cons_consoleprintinmenu = {"consoleprintinmenu", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static void CON_Print(char *msg);
|
||||
|
||||
//
|
||||
@@ -393,9 +392,6 @@ void CON_Init(void)
|
||||
|
||||
Lock_state();
|
||||
|
||||
//note: CON_Ticker should always execute at least once before D_Display()
|
||||
con_clipviewtop = -1; // -1 does not clip
|
||||
|
||||
con_hudlines = atoi(cons_hudlines.defaultvalue);
|
||||
|
||||
Unlock_state();
|
||||
@@ -432,6 +428,7 @@ void CON_Init(void)
|
||||
CV_RegisterVar(&cons_backpic);
|
||||
CV_RegisterVar(&cons_backcolor);
|
||||
CV_RegisterVar(&cons_menuhighlight);
|
||||
CV_RegisterVar(&cons_consoleprintinmenu);
|
||||
COM_AddCommand("bind", CONS_Bind_f);
|
||||
}
|
||||
else
|
||||
@@ -479,18 +476,18 @@ static void CON_RecalcSize(void)
|
||||
|
||||
switch (cv_constextsize.value)
|
||||
{
|
||||
case V_NOSCALEPATCH:
|
||||
con_scalefactor = 1;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
con_scalefactor = vid.smalldupx;
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
con_scalefactor = vid.meddupx;
|
||||
break;
|
||||
default: // Full scaling
|
||||
con_scalefactor = vid.dupx;
|
||||
break;
|
||||
case V_NOSCALEPATCH:
|
||||
con_scalefactor = 1;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
con_scalefactor = vid.smalldup;
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
con_scalefactor = vid.meddup;
|
||||
break;
|
||||
default: // Full scaling
|
||||
con_scalefactor = vid.dup;
|
||||
break;
|
||||
}
|
||||
|
||||
con_recalc = false;
|
||||
@@ -529,7 +526,7 @@ static void CON_RecalcSize(void)
|
||||
oldcon_width = con_width;
|
||||
oldnumlines = con_totallines;
|
||||
oldcon_cy = con_cy;
|
||||
M_Memcpy(tmp_buffer, con_buffer, CON_BUFFERSIZE);
|
||||
memcpy(tmp_buffer, con_buffer, CON_BUFFERSIZE);
|
||||
|
||||
if (conw < 1)
|
||||
con_width = (BASEVIDWIDTH>>3) - 2;
|
||||
@@ -555,7 +552,7 @@ static void CON_RecalcSize(void)
|
||||
{
|
||||
if (tmp_buffer[(i%oldnumlines)*oldcon_width])
|
||||
{
|
||||
M_Memcpy(string, &tmp_buffer[(i%oldnumlines)*oldcon_width], oldcon_width);
|
||||
memcpy(string, &tmp_buffer[(i%oldnumlines)*oldcon_width], oldcon_width);
|
||||
conw = oldcon_width - 1;
|
||||
while (string[conw] == ' ' && conw)
|
||||
conw--;
|
||||
@@ -592,12 +589,18 @@ static void CON_ChangeHeight(void)
|
||||
|
||||
// Handles Console moves in/out of screen (per frame)
|
||||
//
|
||||
static void CON_MoveConsole(void)
|
||||
void CON_MoveConsole(void)
|
||||
{
|
||||
static fixed_t fracmovement = 0;
|
||||
|
||||
Lock_state();
|
||||
|
||||
if (con_curlines == con_destlines)
|
||||
{
|
||||
Unlock_state();
|
||||
return;
|
||||
}
|
||||
|
||||
// instant
|
||||
if (!cons_speed.value)
|
||||
{
|
||||
@@ -607,7 +610,7 @@ static void CON_MoveConsole(void)
|
||||
}
|
||||
|
||||
// Not instant - Increment fracmovement fractionally
|
||||
fracmovement += FixedMul(cons_speed.value*vid.fdupy, (cv_uncappedhud.value ? renderdeltatics : FRACUNIT));
|
||||
fracmovement += FixedMul(cons_speed.value*vid.fdup, (cv_uncappedhud.value ? renderdeltatics : FRACUNIT));
|
||||
|
||||
if (con_curlines < con_destlines) // Move the console downwards
|
||||
{
|
||||
@@ -727,7 +730,8 @@ void CON_ToggleOff(void)
|
||||
con_curlines = 0;
|
||||
CON_ClearHUD();
|
||||
con_forcepic = 0;
|
||||
con_clipviewtop = -1; // remove console clipping of view
|
||||
|
||||
I_SetTextInput(false);
|
||||
|
||||
Unlock_state();
|
||||
}
|
||||
@@ -768,28 +772,24 @@ void CON_Ticker(void)
|
||||
{
|
||||
con_destlines = 0;
|
||||
CON_ClearHUD();
|
||||
I_SetTextInput(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CON_ChangeHeight();
|
||||
}
|
||||
|
||||
// clip the view, so that the part under the console is not drawn
|
||||
con_clipviewtop = -1;
|
||||
if (cons_backpic.value) // clip only when using an opaque background
|
||||
{
|
||||
if (con_curlines > 0)
|
||||
con_clipviewtop = con_curlines - viewwindowy - 1 - 10;
|
||||
// NOTE: BIG HACK::SUBTRACT 10, SO THAT WATER DON'T COPY LINES OF THE CONSOLE
|
||||
// WINDOW!!! (draw some more lines behind the bottom of the console)
|
||||
if (con_clipviewtop < 0)
|
||||
con_clipviewtop = -1; // maybe not necessary, provided it's < 0
|
||||
I_SetTextInput(true);
|
||||
}
|
||||
}
|
||||
|
||||
// check if console ready for prompt
|
||||
if (con_destlines >= minheight)
|
||||
{
|
||||
consoleready = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
consoleready = false;
|
||||
}
|
||||
|
||||
// make overlay messages disappear after a while
|
||||
for (i = 0; i < con_hudlines; i++)
|
||||
@@ -1021,7 +1021,7 @@ boolean CON_Responder(event_t *ev)
|
||||
Lock_state();
|
||||
|
||||
// Only add command to history if it differs from previous one
|
||||
if (strcmp(input.buffer, inputlines[(inputline-1) & 31]))
|
||||
if (!fastcmp(input.buffer, inputlines[(inputline-1) & 31]))
|
||||
{
|
||||
inputline = (inputline+1) & 31;
|
||||
M_TextInputInit(&input, inputlines[inputline], CON_MAXPROMPTCHARS);
|
||||
@@ -1090,9 +1090,6 @@ static void CON_Linefeed(void)
|
||||
|
||||
con_line = &con_buffer[(con_cy%con_totallines)*con_width];
|
||||
memset(con_line, ' ', con_width);
|
||||
|
||||
// make sure the view borders are refreshed if hud messages scroll
|
||||
con_hudupdate = true; // see HU_Erase()
|
||||
}
|
||||
|
||||
// Outputs text into the console text buffer
|
||||
@@ -1272,7 +1269,7 @@ void CONS_Alert(alerttype_t level, const char *fmt, ...)
|
||||
txt = malloc(8192);
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(txt, fmt, argptr);
|
||||
vsnprintf(txt, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
switch (level)
|
||||
@@ -1308,7 +1305,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...)
|
||||
txt = malloc(8192);
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(txt, fmt, argptr);
|
||||
vsnprintf(txt, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
// Again I am lazy, oh well
|
||||
@@ -1467,7 +1464,18 @@ static void CON_DrawHudlines(void)
|
||||
}
|
||||
if (c >= con_width)
|
||||
break;
|
||||
if (*p < HU_FONTSTART)
|
||||
|
||||
int emotelen;
|
||||
emote_t *emote;
|
||||
|
||||
if ((emote = M_VerifyEmote((const char *)p, &emotelen)))
|
||||
{
|
||||
M_DrawScaledEmote(x<<FRACBITS, (y+2*con_scalefactor)<<FRACBITS, charwidth*FRACUNIT/EMOTEWIDTH, emote, V_NOSCALESTART|V_NOSCALEPATCH);
|
||||
p += emotelen-1;
|
||||
c += emotelen-1;
|
||||
continue;
|
||||
}
|
||||
else if (*p < HU_FONTSTART)
|
||||
;//charwidth = 4 * con_scalefactor;
|
||||
else
|
||||
{
|
||||
@@ -1479,9 +1487,6 @@ static void CON_DrawHudlines(void)
|
||||
//V_DrawCharacter(x, y, (p[c]&0xff) | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||
y += charheight;
|
||||
}
|
||||
|
||||
// top screen lines that might need clearing when view is reduced
|
||||
con_clearlines = y; // this is handled by HU_Erase();
|
||||
}
|
||||
|
||||
// draw the console background, text, and prompt if enough place
|
||||
@@ -1499,14 +1504,10 @@ static void CON_DrawConsole(void)
|
||||
if (con_curlines <= 0)
|
||||
return;
|
||||
|
||||
//FIXME: refresh borders only when console bg is translucent
|
||||
con_clearlines = con_curlines; // clear console draw from view borders
|
||||
con_hudupdate = true; // always refresh while console is on
|
||||
|
||||
// draw console background
|
||||
if (cons_backpic.value || con_forcepic)
|
||||
{
|
||||
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_PATCH_LOWPRIORITY);
|
||||
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_PATCH);
|
||||
|
||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
|
||||
@@ -1548,8 +1549,20 @@ static void CON_DrawConsole(void)
|
||||
p++;
|
||||
c++;
|
||||
}
|
||||
|
||||
if (c >= con_width)
|
||||
break;
|
||||
|
||||
int emotelen;
|
||||
emote_t *emote;
|
||||
|
||||
if ((emote = M_VerifyEmote((const char *)p, &emotelen)))
|
||||
{
|
||||
M_DrawScaledEmote(x<<FRACBITS, (y+2*con_scalefactor)<<FRACBITS, charwidth*FRACUNIT/EMOTEWIDTH, emote, V_NOSCALESTART|V_NOSCALEPATCH);
|
||||
p += emotelen-1;
|
||||
c += emotelen-1;
|
||||
continue;
|
||||
}
|
||||
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||
}
|
||||
}
|
||||
@@ -1580,13 +1593,12 @@ void CON_Drawer(void)
|
||||
}
|
||||
|
||||
// console movement
|
||||
if (con_curlines != con_destlines)
|
||||
CON_MoveConsole();
|
||||
CON_MoveConsole();
|
||||
|
||||
if (con_curlines > 0)
|
||||
CON_DrawConsole();
|
||||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS
|
||||
|| gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS)
|
||||
|| gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS || (cons_consoleprintinmenu.value && gamestate == GS_TITLESCREEN))
|
||||
CON_DrawHudlines();
|
||||
|
||||
Unlock_state();
|
||||
|
||||
+2
-5
@@ -30,17 +30,13 @@ extern boolean con_recalc;
|
||||
|
||||
extern boolean con_startup;
|
||||
|
||||
// top clip value for view render: do not draw part of view hidden by console
|
||||
extern INT32 con_clipviewtop;
|
||||
|
||||
// 0 means console if off, or moving out
|
||||
extern INT32 con_destlines;
|
||||
|
||||
extern INT32 con_clearlines; // lines of top of screen to refresh
|
||||
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
||||
extern UINT32 con_scalefactor; // console text scale factor
|
||||
|
||||
extern consvar_t cons_backcolor, cons_menuhighlight;
|
||||
extern consvar_t cons_consoleprintinmenu;
|
||||
|
||||
extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\
|
||||
*skymap, *goldmap, *lavendermap, *teamap, *steelmap, *pinkmap, *brownmap, *peachmap;
|
||||
@@ -56,6 +52,7 @@ void CON_ClearHUD(void); // clear heads up messages
|
||||
|
||||
void CON_Ticker(void);
|
||||
void CON_Drawer(void);
|
||||
void CON_MoveConsole(void);
|
||||
void CONS_Error(const char *msg); // print out error msg, and wait a key
|
||||
|
||||
// force console to move out
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
@@ -147,6 +147,51 @@ public:
|
||||
template <class T>
|
||||
NotNull(T) -> NotNull<T>;
|
||||
|
||||
// does a super safe cast from floating point to interger types
|
||||
// this prob could be better since i suck at ceepeepee
|
||||
// but atleast we can just template shit to our desired types
|
||||
template <typename FloatT, typename IntT>
|
||||
static inline IntT floattoint(FloatT val)
|
||||
{
|
||||
// :chaosleep:
|
||||
static_assert(std::is_floating_point_v<FloatT>, "Input must be a floating-point type");
|
||||
static_assert(std::is_integral_v<IntT>, "Output must be a integer type");
|
||||
|
||||
if (std::fpclassify(val) == FP_NAN)
|
||||
return 0; // if stuffs not a number we sure screwed up lmao
|
||||
|
||||
// treat inifinity as "int min/max"
|
||||
if (std::fpclassify(val) == FP_INFINITE)
|
||||
{
|
||||
// yes infinity can be signed kek
|
||||
if (std::signbit(val))
|
||||
return std::numeric_limits<IntT>::min(); // negative infinity, so return min
|
||||
else
|
||||
return std::numeric_limits<IntT>::max();
|
||||
}
|
||||
|
||||
// make sure we fit into our targettype uwu
|
||||
if (val > static_cast<FloatT>(std::numeric_limits<IntT>::max()))
|
||||
return std::numeric_limits<IntT>::max();
|
||||
else if (val < static_cast<FloatT>(std::numeric_limits<IntT>::min()))
|
||||
return std::numeric_limits<IntT>::min();
|
||||
|
||||
return static_cast<IntT>(val);
|
||||
}
|
||||
|
||||
// safe float to fixed
|
||||
// which handles nan and inf
|
||||
// pretty much the same stuff as the above, but uh, idk how id use the above with this
|
||||
template <typename FloatT> // can use both float and doubles yay
|
||||
static inline int32_t floattofixed(FloatT val)
|
||||
{
|
||||
// :chaosleep:
|
||||
static_assert(std::is_floating_point_v<FloatT>, "Input must be a floating-point type");
|
||||
|
||||
// fixed_t is just an int32_t, i dont wanna include doomtype here if it can be avoided
|
||||
return floattoint<FloatT, int32_t>(val * 65535.);
|
||||
}
|
||||
|
||||
} // namespace srb2
|
||||
|
||||
#endif // __SRB2_CXXUTIL_HPP__
|
||||
+284
-294
File diff suppressed because it is too large.
Load diff
+5
-31
@@ -133,10 +133,6 @@ void Command_Droprate(void);
|
||||
void Command_Numnodes(void);
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
// Client to server packet
|
||||
typedef struct
|
||||
{
|
||||
@@ -176,10 +172,6 @@ typedef struct
|
||||
ticcmd_t cmd, cmd2, cmd3, cmd4;
|
||||
} ATTRPACK client4cmd_pak;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4200)
|
||||
#endif
|
||||
|
||||
// Server to client packet
|
||||
// this packet is too large
|
||||
typedef struct
|
||||
@@ -372,10 +364,6 @@ typedef struct {
|
||||
UINT8 data[0]; // Size is variable using hardware_MAXPACKETLENGTH
|
||||
} ATTRPACK filetx_pak;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4200)
|
||||
#endif
|
||||
|
||||
#define MAXAPPLICATION 16
|
||||
|
||||
typedef struct
|
||||
@@ -519,10 +507,6 @@ typedef struct
|
||||
} u; // This is needed to pack diff packet types data together
|
||||
} ATTRPACK doomdata_t;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#define MAXSERVERLIST (MAXNETNODES-1)
|
||||
typedef struct
|
||||
{
|
||||
@@ -532,7 +516,6 @@ typedef struct
|
||||
|
||||
extern serverelem_t serverlist[MAXSERVERLIST];
|
||||
extern UINT32 serverlistcount;
|
||||
extern UINT32 serverlistultimatecount;
|
||||
extern INT32 mapchangepending;
|
||||
|
||||
// Points inside doomcom
|
||||
@@ -598,10 +581,9 @@ extern tic_t simulated_lag;
|
||||
extern tic_t lowest_lag;
|
||||
extern consvar_t cv_mindelay, cv_gentlemens;
|
||||
|
||||
extern consvar_t cv_usefakeseed, cv_fakeseedname;
|
||||
|
||||
extern consvar_t
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
cv_joinnextround,
|
||||
#endif
|
||||
cv_netticbuffer, cv_allownewplayer,
|
||||
#ifdef SATURNJOIN
|
||||
cv_allownewsaturnplayer,
|
||||
@@ -623,7 +605,7 @@ extern consvar_t cv_serverinfoscreen;
|
||||
void D_ClientServerInit(void);
|
||||
|
||||
// Initialise the other field
|
||||
void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum));
|
||||
void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(const UINT8 **p, INT32 playernum));
|
||||
void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_t nparam);
|
||||
#define SendNetXCmd(id, param, nparam) SendNetXCmdForPlayer(0, id, param, nparam) // Shortcut for P1
|
||||
void SendKick(UINT8 playernum, UINT8 msg);
|
||||
@@ -644,7 +626,6 @@ void CL_ClearPlayer(INT32 playernum);
|
||||
void CL_RemovePlayer(INT32 playernum, INT32 reason);
|
||||
void CL_QueryServerList(msg_server_t *list);
|
||||
void CL_UpdateServerList(void);
|
||||
void CL_TimeoutServerList(void);
|
||||
|
||||
void CL_AbortConnection(void);
|
||||
|
||||
@@ -658,16 +639,9 @@ void D_QuitNetGame(void);
|
||||
//? How many ticks to run?
|
||||
boolean TryRunTics(tic_t realtic);
|
||||
|
||||
// extra data for lmps
|
||||
// these functions scare me. they contain magic.
|
||||
/*boolean AddLmpExtradata(UINT8 **demo_p, INT32 playernum);
|
||||
void ReadLmpExtraData(UINT8 **demo_pointer, INT32 playernum);*/
|
||||
|
||||
#ifndef NONET
|
||||
// translate a playername in a player number return -1 if not found and
|
||||
// print a error message in the console
|
||||
SINT8 nametonum(const char *name);
|
||||
#endif
|
||||
|
||||
extern char motd[254], server_context[8];
|
||||
extern UINT8 playernode[MAXPLAYERS];
|
||||
@@ -679,7 +653,6 @@ INT32 D_NumPlayers(void);
|
||||
void D_ResetTiccmds(void);
|
||||
|
||||
tic_t GetLag(INT32 node);
|
||||
//UINT8 GetFreeXCmdSize(UINT8 playerid);
|
||||
|
||||
extern UINT8 hu_resynching;
|
||||
#ifdef SATURNPAK
|
||||
@@ -687,7 +660,8 @@ extern UINT8 hu_redownloadinggamestate;
|
||||
#endif
|
||||
extern boolean hu_stopped; // kart, true when the game is stopped for players due to a disconnecting or connecting player
|
||||
|
||||
typedef struct rewind_s {
|
||||
typedef struct rewind_s
|
||||
{
|
||||
UINT8 savebuffer[(768*1024)];
|
||||
tic_t leveltime;
|
||||
size_t demopos;
|
||||
|
||||
+296
-348
File diff suppressed because it is too large.
Load diff
@@ -61,9 +61,6 @@ extern boolean minilighticon; // mkwii-style minimap headlight
|
||||
//
|
||||
|
||||
// autoload stuff
|
||||
extern boolean autoloading;
|
||||
extern boolean autoloaded;
|
||||
extern boolean postautoloaded;
|
||||
void D_AddPostloadFiles(void);
|
||||
|
||||
// the infinite loop of D_SRB2Loop() called from win_main for windows version
|
||||
@@ -83,8 +80,6 @@ void D_ProcessEvents(void);
|
||||
|
||||
const char *D_Home(void);
|
||||
|
||||
void D_ResetDeviceLED(void);
|
||||
|
||||
//
|
||||
// BASE LEVEL
|
||||
//
|
||||
|
||||
+23
-67
@@ -59,7 +59,7 @@ static INT16 reboundsize[MAXREBOUND];
|
||||
static INT32 rebound_head, rebound_tail;
|
||||
|
||||
/// \brief max length per packet
|
||||
INT16 hardware_MAXPACKETLENGTH;
|
||||
INT16 hardware_MAXPACKETLENGTH = 0;
|
||||
|
||||
boolean (*I_NetGet)(void) = NULL;
|
||||
void (*I_NetSend)(void) = NULL;
|
||||
@@ -95,9 +95,9 @@ static INT32 sendackpacket = 0, getackpacket = 0;
|
||||
INT32 ticruned = 0, ticmiss = 0;
|
||||
|
||||
// globals
|
||||
INT32 getbps, sendbps;
|
||||
float lostpercent, duppercent, gamelostpercent;
|
||||
INT32 packetheaderlength;
|
||||
INT32 getbps = 0, sendbps = 0;
|
||||
float lostpercent = 0.0f, duppercent = 0.0f, gamelostpercent = 0.0f;
|
||||
INT32 packetheaderlength = 0;
|
||||
|
||||
boolean Net_GetNetStat(void)
|
||||
{
|
||||
@@ -145,7 +145,6 @@ boolean Net_GetNetStat(void)
|
||||
#define URGENTFREESLOTNUM 10
|
||||
#define ACKTOSENDTIMEOUT (TICRATE/11)
|
||||
|
||||
#ifndef NONET
|
||||
typedef struct
|
||||
{
|
||||
UINT8 acknum;
|
||||
@@ -159,7 +158,6 @@ typedef struct
|
||||
doomdata_t data;
|
||||
} pak;
|
||||
} ackpak_t;
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -167,10 +165,8 @@ typedef enum
|
||||
NF_TIMEOUT = 2, // Flag is set when the node got a timeout
|
||||
} node_flags_t;
|
||||
|
||||
#ifndef NONET
|
||||
// Table of packets that were not acknowleged can be resent (the sender window)
|
||||
static ackpak_t ackpak[MAXACKPACKETS];
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -198,7 +194,6 @@ typedef struct
|
||||
static node_t nodes[MAXNETNODES];
|
||||
#define NODETIMEOUT 14
|
||||
|
||||
#ifndef NONET
|
||||
// return <0 if a < b (mod 256)
|
||||
// 0 if a = n (mod 256)
|
||||
// >0 if a > b (mod 256)
|
||||
@@ -248,7 +243,7 @@ static boolean GetFreeAcknum(UINT8 *freeack)
|
||||
ackpak[i].length = doomcom->datalength;
|
||||
ackpak[i].senttime = I_GetTime();
|
||||
ackpak[i].resentnum = 0;
|
||||
M_Memcpy(ackpak[i].pak.raw, netbuffer, ackpak[i].length);
|
||||
memcpy(ackpak[i].pak.raw, netbuffer, ackpak[i].length);
|
||||
|
||||
*freeack = ackpak[i].acknum;
|
||||
|
||||
@@ -411,22 +406,16 @@ static boolean Processackpak(void)
|
||||
}
|
||||
return goodpacket;
|
||||
}
|
||||
#endif
|
||||
|
||||
// send special packet with only ack on it
|
||||
void Net_SendAcks(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
netbuffer->packettype = PT_NOTHING;
|
||||
M_Memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND);
|
||||
memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND);
|
||||
HSendPacket(node, false, 0, MAXACKTOSEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static void GotAcks(void)
|
||||
{
|
||||
INT32 i, j;
|
||||
@@ -457,7 +446,6 @@ static void GotAcks(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Net_ConnectionTimeout(INT32 node)
|
||||
{
|
||||
@@ -484,7 +472,6 @@ void Net_ConnectionTimeout(INT32 node)
|
||||
// Resend the data if needed
|
||||
void Net_AckTicker(void)
|
||||
{
|
||||
#ifndef NONET
|
||||
INT32 i;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -505,9 +492,10 @@ void Net_AckTicker(void)
|
||||
ackpak[i].acknum = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBFILE(va("Resend ack %d, %u<%d at %u\n", ackpak[i].acknum, ackpak[i].senttime,
|
||||
NODETIMEOUT, I_GetTime()));
|
||||
M_Memcpy(netbuffer, ackpak[i].pak.raw, ackpak[i].length);
|
||||
memcpy(netbuffer, ackpak[i].pak.raw, ackpak[i].length);
|
||||
ackpak[i].senttime = I_GetTime();
|
||||
ackpak[i].resentnum++;
|
||||
ackpak[i].nextacknum = node->nextacknum;
|
||||
@@ -534,16 +522,12 @@ void Net_AckTicker(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Remove last packet received ack before resending the ackreturn
|
||||
// (the higher layer doesn't have room, or something else ....)
|
||||
void Net_UnAcknowledgePacket(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
||||
DEBFILE(va("UnAcknowledge node %d\n", node));
|
||||
|
||||
@@ -580,10 +564,8 @@ void Net_UnAcknowledgePacket(INT32 node)
|
||||
if (!nodes[node].firstacktosend)
|
||||
nodes[node].firstacktosend = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
/** Checks if all acks have been received
|
||||
*
|
||||
* \return True if all acks have been received
|
||||
@@ -601,7 +583,6 @@ static boolean Net_AllAcksReceived(void)
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Waits for all ackreturns
|
||||
*
|
||||
@@ -610,9 +591,6 @@ static boolean Net_AllAcksReceived(void)
|
||||
*/
|
||||
void Net_WaitAllAckReceived(UINT32 timeout)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)timeout;
|
||||
#else
|
||||
tic_t tictac = I_GetTime();
|
||||
timeout = tictac + timeout*NEWTICRATE;
|
||||
|
||||
@@ -630,7 +608,6 @@ void Net_WaitAllAckReceived(UINT32 timeout)
|
||||
HGetPacket();
|
||||
Net_AckTicker();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void InitNode(node_t *node)
|
||||
@@ -647,10 +624,8 @@ static void InitAck(void)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
#ifndef NONET
|
||||
for (i = 0; i < MAXACKPACKETS; i++)
|
||||
ackpak[i].acknum = 0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAXNETNODES; i++)
|
||||
InitNode(&nodes[i]);
|
||||
@@ -663,9 +638,6 @@ static void InitAck(void)
|
||||
*/
|
||||
void Net_AbortPacketType(UINT8 packettype)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)packettype;
|
||||
#else
|
||||
for (INT32 i = 0; i < MAXACKPACKETS; i++)
|
||||
{
|
||||
if (ackpak[i].acknum && (ackpak[i].pak.data.packettype == packettype
|
||||
@@ -674,7 +646,6 @@ void Net_AbortPacketType(UINT8 packettype)
|
||||
ackpak[i].acknum = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
@@ -684,9 +655,6 @@ void Net_AbortPacketType(UINT8 packettype)
|
||||
// remove a node, clear all ack from this node and reset askret
|
||||
void Net_CloseConnection(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
INT32 i;
|
||||
|
||||
if (node == -1)
|
||||
@@ -738,10 +706,8 @@ void Net_CloseConnection(INT32 node)
|
||||
InitNode(&nodes[node]);
|
||||
SV_AbortSendFiles(node);
|
||||
I_NetFreeNodenum(node);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
//
|
||||
// Checksum
|
||||
//
|
||||
@@ -757,10 +723,8 @@ static UINT32 NetbufferChecksum(void)
|
||||
|
||||
return LONG(c);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUGFILE
|
||||
|
||||
static void fprintfstring(char *s, size_t len)
|
||||
{
|
||||
INT32 mode = 0;
|
||||
@@ -842,16 +806,16 @@ const char *packettypename[NUMPACKETTYPE] =
|
||||
"TELLFILESNEEDED",
|
||||
"MOREFILESNEEDED",
|
||||
|
||||
"PING"
|
||||
"PING",
|
||||
#ifdef SATURNPAK
|
||||
,
|
||||
|
||||
"WILLRESENDGAMESTATE",
|
||||
"CANRECEIVEGAMESTATE",
|
||||
"RECEIVEDGAMESTATE",
|
||||
|
||||
"ISSATURN" // special packet to identify saturn clients
|
||||
"ISSATURN", // special packet to identify saturn clients
|
||||
#endif
|
||||
"MAPICON", // Send map image icon (gamespy).
|
||||
"NEEDMAPICON" // Request missed map icon (gamespy).
|
||||
};
|
||||
|
||||
const char *Net_GetPacketName(UINT8 packettype)
|
||||
@@ -1032,7 +996,6 @@ void Command_Droprate(void)
|
||||
packetdroprate = droprate;
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static boolean ShouldDropPacket(void)
|
||||
{
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -1040,7 +1003,6 @@ static boolean ShouldDropPacket(void)
|
||||
|| (packetdroprate != 0 && rand() < (((double)RAND_MAX) * (packetdroprate / 100.f))) || packetdroprate == 100;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// HSendPacket
|
||||
@@ -1060,7 +1022,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||
return false;
|
||||
}
|
||||
netbuffer->ack = netbuffer->ackreturn = 0; // don't hold over values from last packet sent/received
|
||||
M_Memcpy(&reboundstore[rebound_head], netbuffer,
|
||||
memcpy(&reboundstore[rebound_head], netbuffer,
|
||||
doomcom->datalength);
|
||||
reboundsize[rebound_head] = doomcom->datalength;
|
||||
rebound_head = (rebound_head+1) % MAXREBOUND;
|
||||
@@ -1077,11 +1039,6 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||
if (!netgame)
|
||||
I_Error("Tried to transmit to another node");
|
||||
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
(void)reliable;
|
||||
(void)acknum;
|
||||
#else
|
||||
// do this before GetFreeAcknum because this function backups
|
||||
// the current packet
|
||||
doomcom->remotenode = (INT16)node;
|
||||
@@ -1136,8 +1093,6 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ndef NONET
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1153,7 +1108,7 @@ boolean HGetPacket(void)
|
||||
// Get a packet from self
|
||||
if (rebound_tail != rebound_head)
|
||||
{
|
||||
M_Memcpy(netbuffer, &reboundstore[rebound_tail], reboundsize[rebound_tail]);
|
||||
memcpy(netbuffer, &reboundstore[rebound_tail], reboundsize[rebound_tail]);
|
||||
doomcom->datalength = reboundsize[rebound_tail];
|
||||
if (netbuffer->packettype == PT_NODETIMEOUT)
|
||||
doomcom->remotenode = netbuffer->u.textcmd[0];
|
||||
@@ -1171,13 +1126,9 @@ boolean HGetPacket(void)
|
||||
if (!netgame)
|
||||
return false;
|
||||
|
||||
#ifndef NONET
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
I_NetGet();
|
||||
|
||||
if (doomcom->remotenode == -1) // No packet received
|
||||
if (!I_NetGet()) // No packets received
|
||||
return false;
|
||||
|
||||
getbytes += packetheaderlength + doomcom->datalength; // For stat
|
||||
@@ -1213,10 +1164,10 @@ boolean HGetPacket(void)
|
||||
GotAcks();
|
||||
continue;
|
||||
}
|
||||
|
||||
doomcom->datalength -= BASEPACKETSIZE;
|
||||
break;
|
||||
}
|
||||
#endif // ifndef NONET
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1274,7 +1225,7 @@ void D_SetDoomcom(void)
|
||||
if (doomcom)
|
||||
return;
|
||||
|
||||
doomcom = Z_Calloc(sizeof (doomcom_t), PU_STATIC, NULL);
|
||||
doomcom = Z_Calloc(sizeof(doomcom_t), PU_STATIC, NULL);
|
||||
doomcom->id = DOOMCOM_ID;
|
||||
doomcom->numslots = doomcom->numnodes = 1;
|
||||
}
|
||||
@@ -1316,6 +1267,7 @@ boolean D_CheckNetGame(void)
|
||||
ret = true;
|
||||
if (client && netgame)
|
||||
netgame = false;
|
||||
|
||||
server = true; // WTF? server always true???
|
||||
// no! The deault mode is server. Client is set elsewhere
|
||||
// when the client executes connect command.
|
||||
@@ -1351,6 +1303,7 @@ boolean D_CheckNetGame(void)
|
||||
|
||||
if (doomcom->id != DOOMCOM_ID)
|
||||
I_Error("Doomcom buffer invalid!");
|
||||
|
||||
if (doomcom->numnodes > MAXNETNODES)
|
||||
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
|
||||
|
||||
@@ -1359,14 +1312,17 @@ boolean D_CheckNetGame(void)
|
||||
{
|
||||
char filename[21];
|
||||
INT32 k = doomcom->consoleplayer - 1;
|
||||
|
||||
if (M_IsNextParm())
|
||||
k = atoi(M_GetNextParm()) - 1;
|
||||
|
||||
while (!debugfile && k < MAXPLAYERS)
|
||||
{
|
||||
k++;
|
||||
sprintf(filename, "debug%d.txt", k);
|
||||
debugfile = fopen(va("%s" PATHSEP "%s", srb2home, filename), "w");
|
||||
}
|
||||
|
||||
if (debugfile)
|
||||
CONS_Printf(M_GetText("debug output to: %s\n"), va("%s" PATHSEP "%s", srb2home, filename));
|
||||
else
|
||||
|
||||
Loaded 100 of 299 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user