Compare commits
836
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3113d96de6 | ||
|
|
ebdb590018 | ||
|
|
bb47b976a7 | ||
|
|
6c419ff22e | ||
|
|
522904527f | ||
|
|
d828613b6a | ||
|
|
30539371c2 | ||
|
|
e2ecc315b4 | ||
|
|
eb2f186205 | ||
|
|
bbf06b3376 | ||
|
|
a1f70b0b31 | ||
|
|
2e0f5c02a4 | ||
|
|
0f7001ef5c | ||
|
|
4600da5782 | ||
|
|
a3557fadef | ||
|
|
d9a67faf47 | ||
|
|
bb4baafd1e | ||
|
|
96eaf8850e | ||
|
|
e7efd46419 | ||
|
|
346b1456cd | ||
|
|
9f5a5a735b | ||
|
|
8e4b304bed | ||
|
|
ea21b25711 | ||
|
|
8038c5aff4 | ||
|
|
7dbb08315c | ||
|
|
b1ff1bb531 | ||
|
|
8eaf4a73f4 | ||
|
|
607fbc54fc | ||
|
|
276cf0a8cb | ||
|
|
59c9af97c2 | ||
|
|
4e75d99026 | ||
|
|
8e91c16e97 | ||
|
|
186421fe85 | ||
|
|
af952870c3 | ||
|
|
4eeb0b4b20 | ||
|
|
cb2c65e9d9 | ||
|
|
f7bbde3982 | ||
|
|
c9fc3b4820 | ||
|
|
f5195dd137 | ||
|
|
5289f13891 | ||
|
|
073b35690b | ||
|
|
5f19ff2c6a | ||
|
|
39436339ad | ||
|
|
d4a494d7ae | ||
|
|
43d3ac102d | ||
|
|
2af0140300 | ||
|
|
aa96f9ceb3 | ||
|
|
31f81a4a53 | ||
|
|
104b8260fb | ||
|
|
edebc728ef | ||
|
|
08e7ce3b5b | ||
|
|
29f187b751 | ||
|
|
420424bbb6 | ||
|
|
0adaceaf3b | ||
|
|
ac3a1ad5eb | ||
|
|
1b8d7b1541 | ||
|
|
b812d61da2 | ||
|
|
6fd64383d3 | ||
|
|
e984e7a6c8 | ||
|
|
96f90ff9c4 | ||
|
|
51aec0e012 | ||
|
|
faadd3e89f | ||
|
|
0c091256f4 | ||
|
|
7a0fb01626 | ||
|
|
c01818e2e3 | ||
|
|
e17a8a505c | ||
|
|
ab654deba7 | ||
|
|
b145d7fd0e | ||
|
|
264c9e38ad | ||
|
|
e88773da4e | ||
|
|
310f67a06c | ||
|
|
0914d5b8e2 | ||
|
|
7487cc1752 | ||
|
|
4e22d3e61a | ||
|
|
bf1aa47854 | ||
|
|
291a4dbb25 | ||
|
|
8fe3d13935 | ||
|
|
bdc326b14e | ||
|
|
ec5bff710d | ||
|
|
d938e38ad3 | ||
|
|
3d4772455b | ||
|
|
e1f0089627 | ||
|
|
6f5115f6cb | ||
|
|
be423b2910 | ||
|
|
3bf3bdf641 | ||
|
|
e923777eb6 | ||
|
|
cf6eb0010e | ||
|
|
5184115216 | ||
|
|
ec9ff014c8 | ||
|
|
b9f9462f92 | ||
|
|
edbebbf082 | ||
|
|
242dee499d | ||
|
|
39a46e8f79 | ||
|
|
a2de1e24c5 | ||
|
|
c1dda61094 | ||
|
|
7d64ec103d | ||
|
|
c0cce90e60 | ||
|
|
d9712cf85e | ||
|
|
9ccd62b5cb | ||
|
|
2077315f24 | ||
|
|
6af1c41e73 | ||
|
|
67e74b5874 | ||
|
|
c7dd38ed9f | ||
|
|
9bea6eddbd | ||
|
|
f4e5f7249c | ||
|
|
9639ace28a | ||
|
|
a2616778cc | ||
|
|
e1f0b97926 | ||
|
|
0691e2d9e2 | ||
|
|
132fc98211 | ||
|
|
2e52a7c7cb | ||
|
|
80ffa12848 | ||
|
|
98c8e965e5 | ||
|
|
495c34dd40 | ||
|
|
f38ca9aa28 | ||
|
|
8e67e0bace | ||
|
|
b0bf588c27 | ||
|
|
35e4f35f6e | ||
|
|
7866b769cc | ||
|
|
1af1e42dab | ||
|
|
40bd3e5e19 | ||
|
|
25dd3b4976 | ||
|
|
08864e27b2 | ||
|
|
4a3c9ccfbb | ||
|
|
cedd789a27 | ||
|
|
0fe3086a5a | ||
|
|
c9afd4a2cd | ||
|
|
7518a6f181 | ||
|
|
2bf4c44259 | ||
|
|
1c95e5f40e | ||
|
|
7c848f4be5 | ||
|
|
a4af254643 | ||
|
|
cc3ced8cd2 | ||
|
|
860dc37fe4 | ||
|
|
8b3d55fbc8 | ||
|
|
0540b5656a | ||
|
|
6c98440f27 | ||
|
|
3828a9f8e0 | ||
|
|
2c7c9ec32a | ||
|
|
1ccd3e37bc | ||
|
|
6ad344f65d | ||
|
|
6fec71196b | ||
|
|
1c289d73ca | ||
|
|
05a8f1822e | ||
|
|
44ba69cf53 | ||
|
|
4cea0c1414 | ||
|
|
4ee468f5c6 | ||
|
|
9a58eb3010 | ||
|
|
6209f4fc1b | ||
|
|
59ff5e61bf | ||
|
|
821c061f82 | ||
|
|
cb27730622 | ||
|
|
decaa79d20 | ||
|
|
aeb06a26ee | ||
|
|
fd2c208612 | ||
|
|
8f91707164 | ||
|
|
37eba186f5 | ||
|
|
eb4d9bbdd5 | ||
|
|
c19c80d797 | ||
|
|
a2feaa7fde | ||
|
|
3cb4e86b48 | ||
|
|
ed758fc921 | ||
|
|
8f3b7158e3 | ||
|
|
a191c8b71e | ||
|
|
3f2e0bd349 | ||
|
|
3bdc745bd1 | ||
|
|
536b141935 | ||
|
|
cfe90cce7d | ||
|
|
f578781418 | ||
|
|
0bb63ee0af | ||
|
|
2ae9563ab3 | ||
|
|
6b429e4388 | ||
|
|
ea1075d330 | ||
|
|
0321b0d94a | ||
|
|
ac57b7fd2d | ||
|
|
7013e63142 | ||
|
|
b76ce836a0 | ||
|
|
4e1ef7c0cd | ||
|
|
fd1e415731 | ||
|
|
41c887f2bf | ||
|
|
8091d825d5 | ||
|
|
699113fb25 | ||
|
|
3996abef36 | ||
|
|
66a68396a5 | ||
|
|
514b5a86a2 | ||
|
|
c806e92743 | ||
|
|
e438c818ae | ||
|
|
2f960296a3 | ||
|
|
892f2253ea | ||
|
|
bebe62346f | ||
|
|
834a94e429 | ||
|
|
fcf833ff48 | ||
|
|
f2a27539d3 | ||
|
|
05d26654df | ||
|
|
cee6a27340 | ||
|
|
66e35a9d67 | ||
|
|
ad739706c3 | ||
|
|
938a9ef813 | ||
|
|
8dc81de608 | ||
|
|
d87f675f38 | ||
|
|
7677b7f616 | ||
|
|
ad096ccd42 | ||
|
|
7a9e81828a | ||
|
|
48dfe5cb75 | ||
|
|
ed57c27629 | ||
|
|
71e7dacb56 | ||
|
|
f9c0ee865f | ||
|
|
154eaaf027 | ||
|
|
66f5f9b2a2 | ||
|
|
8e5633a23f | ||
|
|
8bcada1fda | ||
|
|
771152b919 | ||
|
|
b4277c88c1 | ||
|
|
63026cc11d | ||
|
|
b8385d1579 | ||
|
|
916cc9d8ca | ||
|
|
347000a326 | ||
|
|
4967313720 | ||
|
|
19b64a8b61 | ||
|
|
6a7b2b9721 | ||
|
|
e167d7b641 | ||
|
|
b27275b887 | ||
|
|
c81c2c1d8d | ||
|
|
2d426ac38c | ||
|
|
7eb2ad1e35 | ||
|
|
f49e57a38c | ||
|
|
265f4a50ef | ||
|
|
e83e2659a7 | ||
|
|
c680dd3222 | ||
|
|
96aaaf5261 | ||
|
|
efb29e6be5 | ||
|
|
0844c02668 | ||
|
|
ee2afb7047 | ||
|
|
52713c0112 | ||
|
|
ec5afd3caf | ||
|
|
ccfab57a8c | ||
|
|
56d1343f1b | ||
|
|
9b8a86a47d | ||
|
|
bdece8deb5 | ||
|
|
b273bc3ca8 | ||
|
|
d4f58a885b | ||
|
|
04458f18f8 | ||
|
|
64152eea0d | ||
|
|
0e0a690e3c | ||
|
|
f283d3ca43 | ||
|
|
982fff959f | ||
|
|
b0e968e3c3 | ||
|
|
7647a3dfb5 | ||
|
|
ba549148ac | ||
|
|
23732faf35 | ||
|
|
e5bbb14ce0 | ||
|
|
327cca2e8e | ||
|
|
e02e9a12d7 | ||
|
|
9e2fd091a8 | ||
|
|
0a04fca634 | ||
|
|
8a3f793324 | ||
|
|
e91892849c | ||
|
|
6b4e3c9d13 | ||
|
|
70942af38e | ||
|
|
88390555c6 | ||
|
|
5f55b81fbf | ||
|
|
5c6f5c7f9e | ||
|
|
ca68bab002 | ||
|
|
7e05c707c7 | ||
|
|
339eb1879e | ||
|
|
f3e46f8bfd | ||
|
|
1adb49c65c | ||
|
|
25f200574e | ||
|
|
1d33a05a85 | ||
|
|
cfcd20d44a | ||
|
|
204607e272 | ||
|
|
b89a8ca6f9 | ||
|
|
d4aa352d59 | ||
|
|
e1dadce2ad | ||
|
|
c489841732 | ||
|
|
a6a97b4c4f | ||
|
|
fba070f82e | ||
|
|
10c117f95f | ||
|
|
bceda5beb4 | ||
|
|
c50c936b1f | ||
|
|
99d5590435 | ||
|
|
22a6be76b5 | ||
|
|
d3d25df3c5 | ||
|
|
2a3f9e9ee6 | ||
|
|
31f01fd5da | ||
|
|
bb9a4a0da0 | ||
|
|
3bac722562 | ||
|
|
3769ab74ac | ||
|
|
c3d6cdd272 | ||
|
|
093602fd6b | ||
|
|
9b2cfe51d6 | ||
|
|
a80d119c58 | ||
|
|
66619f42f9 | ||
|
|
1cdc92a62b | ||
|
|
6b8de308b7 | ||
|
|
310e64d8be | ||
|
|
890677e2b5 | ||
|
|
d2d3afc7f4 | ||
|
|
c26d2faee9 | ||
|
|
1c82c338a5 | ||
|
|
c81cd48552 | ||
|
|
306f7d455e | ||
|
|
dc40befa88 | ||
|
|
2222272d6f | ||
|
|
1849d5aade | ||
|
|
3878c2f72a | ||
|
|
7cf3bceaff | ||
|
|
1e394b0530 | ||
|
|
b09660204a | ||
|
|
7b4592377e | ||
|
|
45ba69a45a | ||
|
|
4d9c345202 | ||
|
|
1105526eb1 | ||
|
|
d963df36f1 | ||
|
|
0437952027 | ||
|
|
d188839d0b | ||
|
|
86ac11f877 | ||
|
|
0f59e0e270 | ||
|
|
cd32270ec0 | ||
|
|
f2a7f9ccaa | ||
|
|
846967cb91 | ||
|
|
6c8862ee4b | ||
|
|
2c2ffe36d7 | ||
|
|
951b880acb | ||
|
|
ecfa973e6b | ||
|
|
749b87b4ca | ||
|
|
7f671e4e30 | ||
|
|
ee0e4836f5 | ||
|
|
a01cd628ab | ||
|
|
4a4e668d21 | ||
|
|
03c579769c | ||
|
|
2e88b6a1dd | ||
|
|
a49ea4defd | ||
|
|
5265b147f5 | ||
|
|
b4a37a2fa4 | ||
|
|
93eb2b336d | ||
|
|
30acdca9d3 | ||
|
|
677b34c174 | ||
|
|
3c776b321d | ||
|
|
1ed9bfc9b4 | ||
|
|
a05413d925 | ||
|
|
fa9637fba4 | ||
|
|
b3be7bcedc | ||
|
|
19c10be76b | ||
|
|
60222f2f00 | ||
|
|
34edd0a2e3 | ||
|
|
46b485df14 | ||
|
|
8d3632caca | ||
|
|
b5ae9ba733 | ||
|
|
7f50a09bcd | ||
|
|
2a823ecd60 | ||
|
|
940327210f | ||
|
|
e25191d7df | ||
|
|
20a08df1e1 | ||
|
|
4cf27d40e9 | ||
|
|
d18c9a257a | ||
|
|
f4d8a903e8 | ||
|
|
8a8cbffd12 | ||
|
|
0adf356325 | ||
|
|
0fef290858 | ||
|
|
65dc5bb1fd | ||
|
|
e18be33c91 | ||
|
|
9ad6751719 | ||
|
|
86ab994408 | ||
|
|
21f0d603c3 | ||
|
|
971513e7d3 | ||
|
|
03929e551f | ||
|
|
db5ae247b6 | ||
|
|
d46beab34e | ||
|
|
2516873ba1 | ||
|
|
c650394c31 | ||
|
|
9a794232d7 | ||
|
|
db635e5c5b | ||
|
|
8a105a9679 | ||
|
|
46b968a351 | ||
|
|
a9836307b2 | ||
|
|
b6515bb0ae | ||
|
|
b8257e9037 | ||
|
|
1fb6c63097 | ||
|
|
e95382075c | ||
|
|
416a2565f9 | ||
|
|
fa75ad4cdd | ||
|
|
cedddaadfc | ||
|
|
43ec517cdd | ||
|
|
495ad5ce06 | ||
|
|
31ce643311 | ||
|
|
2d9776d792 | ||
|
|
7fa3d119e8 | ||
|
|
b5c1f21ac1 | ||
|
|
86c1b2cbef | ||
|
|
ad828b8f4b | ||
|
|
5dda681c8a | ||
|
|
92df8ffe01 | ||
|
|
2ee8dc09d1 | ||
|
|
b8f9392efd | ||
|
|
e65741acaa | ||
|
|
b36ab31a56 | ||
|
|
99f1166eb1 | ||
|
|
a335da3473 | ||
|
|
7ab8bf1bbf | ||
|
|
c312380944 | ||
|
|
b5bb2b42bf | ||
|
|
d074f375ca | ||
|
|
6fd14f0a80 | ||
|
|
d6bbb2c1b3 | ||
|
|
fa66b87965 | ||
|
|
c59d5db03e | ||
|
|
a994d7c050 | ||
|
|
d2f3d5aa4d | ||
|
|
913b8878d8 | ||
|
|
f02b9f953e | ||
|
|
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 | ||
|
|
5c8c1e91b8 | ||
|
|
24163a7c92 | ||
|
|
d934197246 | ||
|
|
76747b4677 | ||
|
|
5268fc2d19 | ||
|
|
bcd54110d5 | ||
|
|
83d538b16a | ||
|
|
2a6a7e1d2b | ||
|
|
c977c4fc45 | ||
|
|
b6edc90553 | ||
|
|
23735121ff | ||
|
|
20950b698f | ||
|
|
44df85d6a4 | ||
|
|
42d53f1f6f | ||
|
|
48f2d0ff83 | ||
|
|
517723f9c1 | ||
|
|
6915077e0f | ||
|
|
87e0b55f01 | ||
|
|
406dbf333d | ||
|
|
a730dfd212 | ||
|
|
3058d365f3 | ||
|
|
ccc453e0b0 | ||
|
|
c3d02090e4 | ||
|
|
20cd7621c3 | ||
|
|
54f5b5ebfb | ||
|
|
b421893646 | ||
|
|
237aeb7834 | ||
|
|
945218bead | ||
|
|
bd3cedf233 | ||
|
|
8ffff231e1 | ||
|
|
dda1d59ec9 | ||
|
|
7dbd95d556 | ||
|
|
1e4ba39691 | ||
|
|
a7805ae3f0 | ||
|
|
325338bfbf | ||
|
|
01a54e4d0b | ||
|
|
e2df018e38 | ||
|
|
33b62cba33 | ||
|
|
29b4f78b64 | ||
|
|
bce18e3d61 | ||
|
|
e9c2b982c6 | ||
|
|
67e1793f49 | ||
|
|
80613a8a49 | ||
|
|
b017a72026 | ||
|
|
a7c5254a32 | ||
|
|
9dd1a47969 | ||
|
|
bbbd42e653 | ||
|
|
6014b4c79d | ||
|
|
2b7f2da5ee | ||
|
|
23ba827726 | ||
|
|
326a28ec36 | ||
|
|
19d6a1600e | ||
|
|
3095303a4b | ||
|
|
2a1807422c | ||
|
|
4676885521 | ||
|
|
30cea37248 | ||
|
|
16377d603d | ||
|
|
080d3c6b18 | ||
|
|
0fcef67d2a | ||
|
|
eaa1976a47 | ||
|
|
df10855483 | ||
|
|
dc6bf05f35 | ||
|
|
871545024d | ||
|
|
aeb172f2ab | ||
|
|
ec757ceb2c | ||
|
|
e00783da82 | ||
|
|
52a9486974 | ||
|
|
26b26b8f25 | ||
|
|
81f7335b05 | ||
|
|
f603106ac8 | ||
|
|
5675eefeb2 | ||
|
|
1d0fb17da4 | ||
|
|
f53d37052a | ||
|
|
cae5e73d7d | ||
|
|
91036129aa | ||
|
|
4fccb48d2a | ||
|
|
556068281e | ||
|
|
3e0150d4f3 | ||
|
|
7c1f17bb8d | ||
|
|
c8ae4a89d9 | ||
|
|
42b1f849c0 | ||
|
|
c0f24ebbbc | ||
|
|
de73c53665 | ||
|
|
908e073628 | ||
|
|
eaee95a026 | ||
|
|
21a24cf48e | ||
|
|
456a380e3a | ||
|
|
c428472c6f | ||
|
|
feff5a7c17 | ||
|
|
ae306351ba | ||
|
|
18e574fe98 | ||
|
|
caf8d35464 | ||
|
|
5ca33a8b6e | ||
|
|
b676e1d420 | ||
|
|
69797b883b | ||
|
|
28800b72f7 | ||
|
|
c4d964297c | ||
|
|
2594834886 | ||
|
|
03de30df3e | ||
|
|
e45c72f525 | ||
|
|
4a3e059bc3 | ||
|
|
36c43d89e6 | ||
|
|
f34a47c50d | ||
|
|
2bbc71c5e0 | ||
|
|
bcbb495a71 | ||
|
|
bddf3c0c30 | ||
|
|
eb4e6b5c87 | ||
|
|
005c742d57 | ||
|
|
cab6247acf | ||
|
|
befc598bab | ||
|
|
19b1eed0f5 | ||
|
|
978fb619bc | ||
|
|
66d406ef22 | ||
|
|
993366f485 | ||
|
|
24895874ed | ||
|
|
129f88b6a7 | ||
|
|
cb5c4e482e | ||
|
|
db2062ed1d | ||
|
|
105be82f45 | ||
|
|
39389bda8f | ||
|
|
89c0859423 | ||
|
|
7792c7a6d2 | ||
|
|
cd61b2cba8 | ||
|
|
675a873485 | ||
|
|
45ee50b47d | ||
|
|
694a8eeb69 | ||
|
|
908bba2c8a | ||
|
|
7325c8dbfd | ||
|
|
88363cf45d | ||
|
|
e5c18ae1f1 | ||
|
|
4bb5b8fa04 | ||
|
|
509e7140e3 | ||
|
|
056f919bbe | ||
|
|
2f023e00d8 | ||
|
|
8dd8f655ec | ||
|
|
548cad76b2 | ||
|
|
8ce8f8f7f2 | ||
|
|
95d8864faa | ||
|
|
8b395274c0 | ||
|
|
52ef8a9e77 | ||
|
|
2429aa5dc0 | ||
|
|
85286593b0 | ||
|
|
e26fb91350 | ||
|
|
ba23e1233b | ||
|
|
842a79071a | ||
|
|
da67f6feb8 | ||
|
|
8cc73bc482 | ||
|
|
28685ea658 | ||
|
|
6000bb952a | ||
|
|
f73657aa79 | ||
|
|
a69df8807d | ||
|
|
fa3b8652ca | ||
|
|
23a29767e9 | ||
|
|
d4a130f1dc | ||
|
|
8ccf4eb9ba | ||
|
|
cdb7b6fede | ||
|
|
fcae072625 | ||
|
|
2503c891e1 | ||
|
|
67facba812 | ||
|
|
a7dabea6a3 | ||
|
|
7b5129e2fe | ||
|
|
30418950cb | ||
|
|
26fc417555 | ||
|
|
042bc7b4d3 | ||
|
|
bb3dd435f0 | ||
|
|
16a531272f | ||
|
|
ba5b79e48a | ||
|
|
59470ddbd4 | ||
|
|
53be790fbf | ||
|
|
82c4191516 | ||
|
|
8b04ca5d6c | ||
|
|
8a305d3c79 | ||
|
|
7c507c7b3b | ||
|
|
ca27dad6c1 | ||
|
|
da7429f768 | ||
|
|
17d03c6b43 | ||
|
|
fd86f13150 | ||
|
|
383d55cac6 | ||
|
|
0e2ffdeb1d | ||
|
|
b84d101337 | ||
|
|
eb04271c83 | ||
|
|
852aa74d62 | ||
|
|
aa06459c09 | ||
|
|
54e7ad571e | ||
|
|
1d3dae01e9 | ||
|
|
736a626ccf | ||
|
|
a4cc8b0585 | ||
|
|
333c94be52 | ||
|
|
92ec4e65c1 | ||
|
|
a3e97b90f6 | ||
|
|
facacbd64c | ||
|
|
c07502bf5a | ||
|
|
11aa7dbecb | ||
|
|
f751161693 | ||
|
|
e61c526b7d | ||
|
|
7515f05d80 | ||
|
|
1bd291f1fe | ||
|
|
e7e09b46bd | ||
|
|
a14f6de20c | ||
|
|
4997374710 | ||
|
|
abc224dd56 | ||
|
|
2f865f97c7 | ||
|
|
228292f779 | ||
|
|
ed16c4fd9f | ||
|
|
41407538d4 | ||
|
|
3defed0d12 | ||
|
|
5f394cd938 | ||
|
|
e5bae89d0f | ||
|
|
f749800276 | ||
|
|
5289027272 | ||
|
|
cdbeead3ce | ||
|
|
77f4d4ef3b | ||
|
|
a94740f5e9 | ||
|
|
ab27090ecf | ||
|
|
93d0106c28 | ||
|
|
95979597ca | ||
|
|
27433f6fb5 | ||
|
|
f8e5049d76 | ||
|
|
2009cdeaeb | ||
|
|
0f43f19b71 | ||
|
|
1ac7852bd2 | ||
|
|
f5e7b65ae0 | ||
|
|
4c5d34e82c | ||
|
|
0dad927c05 | ||
|
|
f231417465 | ||
|
|
51b8dc9101 | ||
|
|
71e9c4f5af | ||
|
|
1acae3e4af | ||
|
|
4c04d09d18 | ||
|
|
b99cd88947 | ||
|
|
3cc86141c8 | ||
|
|
4a786449c4 | ||
|
|
aef6dcdbc9 | ||
|
|
88f8abf00e | ||
|
|
fb9132859c | ||
|
|
0e9ec096c2 | ||
|
|
50ce3c4431 | ||
|
|
c6c1dbd066 | ||
|
|
ece8d9e80c | ||
|
|
fdcbd276e9 | ||
|
|
d49a735c42 | ||
|
|
6d77672ee3 | ||
|
|
28aec6cad5 | ||
|
|
1f028f523e | ||
|
|
349bf06e4b | ||
|
|
e044db73f5 | ||
|
|
7555d689db | ||
|
|
a6438da531 | ||
|
|
8c6893cff6 | ||
|
|
af03b51191 | ||
|
|
80595133be | ||
|
|
b0c4d129c6 | ||
|
|
178d8b7b53 | ||
|
|
de99a3036d | ||
|
|
5c613f6c8f | ||
|
|
59628377fa | ||
|
|
278f3c3ef6 | ||
|
|
3ba1596976 | ||
|
|
02f6fa0665 | ||
|
|
62883a8504 | ||
|
|
30b5db9c96 | ||
|
|
e0bcdd6d90 | ||
|
|
7f9ccfbc34 | ||
|
|
658241c4ba | ||
|
|
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 | ||
|
|
ab79a02462 | ||
|
|
221079e393 | ||
|
|
d7422b8ec9 | ||
|
|
0bbd8246cc | ||
|
|
9e8ddd5f9e | ||
|
|
3964d4e188 | ||
|
|
005af4362e | ||
|
|
f817676033 | ||
|
|
79140b3bdc | ||
|
|
48722ef591 | ||
|
|
6be5478fa8 | ||
|
|
953d9d15d6 | ||
|
|
0c56755e09 | ||
|
|
c166075754 | ||
|
|
90ff1c4fc0 | ||
|
|
1d0fedddfd | ||
|
|
f5b60c3f36 | ||
|
|
78ad3e9710 | ||
|
|
b03d5c53ed | ||
|
|
c5dce0e785 | ||
|
|
f85c7ef961 | ||
|
|
0ceaca4b2f | ||
|
|
4d211f8f82 | ||
|
|
af9fa77501 | ||
|
|
21920112ee | ||
|
|
9b7bf5e7d8 | ||
|
|
524168b20b | ||
|
|
016f89fd55 | ||
|
|
3b6b8cc1bf | ||
|
|
2049353647 |
No files matched your search
+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)
|
||||
+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
|
||||
|
||||
@@ -22,13 +22,14 @@ We also have a Flatpak available on [Flathub](https://flathub.org/en/apps/org.sr
|
||||
|
||||
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
|
||||
|
||||
Currently only the Makefile build system with GCC or Clang compiler is supported.
|
||||
|
||||
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
|
||||
|
||||
@@ -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,3 +1,69 @@
|
||||
2.8.1:
|
||||
* Added Stop/Start/Pause/Resume for Fluidsynth
|
||||
|
||||
2.8.0:
|
||||
* Added support for loading wavpack sound files (https://www.wavpack.com/)
|
||||
* Added support for loading classic console sound files using Game_Music_Emu (https://github.com/libgme/game-music-emu)
|
||||
* Use minimp3 instead of dr_mp3 as the default backend for MP3 music
|
||||
* Use libxmp instead of modplug as the default backend for MOD music
|
||||
To use libmodplug instead, configure using --enable-music-mod-modplug --disable-music-mod-xmp
|
||||
* Added support for FLAC audio in Ogg containers
|
||||
* Added Mix_PauseAudio() to pause and resume all audio playback
|
||||
* Added Mix_GetNumTracks() and Mix_StartTrack() for managing tracks in GME files
|
||||
|
||||
2.6.2:
|
||||
* Updated autotools to use ax_compute_relative_paths, fixing homebrew on macOS
|
||||
|
||||
2.6.1:
|
||||
* Fixed issue with incorrect version reported by pkg-config
|
||||
|
||||
2.6.0:
|
||||
* Added support for building with CMake
|
||||
* Added support for playing Ogg files using stb_vorbis, which is now the default Vorbis backend.
|
||||
To use libvorbis instead, configure using --disable-music-ogg-stb --enable-music-ogg-vorbis
|
||||
* Added support for playing FLAC files using dr_flac, which is now the default FLAC music backend.
|
||||
To use libflac instead, configure using --disable-music-flac-drflac --enable-music-flac-libflac
|
||||
* Added support for playing MP3 files using dr_mp3, which is now the default MP3 music backend.
|
||||
To use libmpg123 instead, configure using --disable-music-mp3-drmp3 --enable-music-mp3-mpg123
|
||||
* Added libxmp support for mod music playback. Modplug is still the default backend for MOD music.
|
||||
To use libxmp instead, configure using --disable-music-mod-modplug --enable-music-mod-xmp
|
||||
* Removed support for libmad as a MP3 music backend.
|
||||
* Removed support for libmikmod as a MOD music backend.
|
||||
* Added Mix_MasterVolume() for additional volume control over all channels
|
||||
* Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules
|
||||
* Added Mix_HasMusicDecoder()
|
||||
* Memory leak fixes and F32 format support to fluidsynth player
|
||||
* Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits
|
||||
* Added Mix_ModMusicJumpToOrder() for mod music formats
|
||||
* Enabled module internal loops in modplug player
|
||||
* Respect original mp3 file offset
|
||||
* Support setting soundfont via SDL_SOUNDFONTS in OSX native midi
|
||||
* Fixed mp3 file detection
|
||||
* Fixes to ogg playback on big-endian devices
|
||||
* Added functions to get metadata information:
|
||||
Mix_GetMusicTitle()
|
||||
Mix_GetMusicTitleTag()
|
||||
Mix_GetMusicArtistTag()
|
||||
Mix_GetMusicAlbumTag()
|
||||
Mix_GetMusicCopyrightTag()
|
||||
* Add functions to get loop point information:
|
||||
Mix_GetMusicLoopStartTime()
|
||||
Mix_GetMusicLoopEndTime()
|
||||
Mix_GetMusicLoopLengthTime()
|
||||
* Added Mix_GetMusicVolume() and Mix_GetMusicPosition()
|
||||
* Added Mix_MusicDuration() to return music duration in seconds
|
||||
* Fixed music_mpg123 seek bug when sample rate of the file and the stream don't match
|
||||
* Timidity improvements, added Mix_SetTimidityCfg()
|
||||
* Improved mp3 tag detection/skipping
|
||||
* Extended support for WAV files
|
||||
* Allow rmid files be opened by native midi
|
||||
* Fixed possible crash in win32 native midi
|
||||
* Prevent clipping due to volume settings in modplug music
|
||||
* Added looping support for Opus files
|
||||
* Added looping support for FLAC files
|
||||
* Improved OGG looping support
|
||||
* Fixed loading Opus audio as audio chunks
|
||||
|
||||
2.0.4:
|
||||
Ozkan Sezer - Wed, 10 Oct 2018 14:56:10
|
||||
* Removed smpeg support for mp3 music, now that it's replaced by libmpg123
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
SDL_mixer: An audio mixer library based on the SDL library
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
@@ -1,32 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_mixer/file/default/external
|
||||
---
|
||||
|
||||
Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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 FOUNDATION 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.
|
||||
@@ -1,5 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_mixer/file/default/external
|
||||
---
|
||||
|
||||
ModPlug-XMMS and libmodplug are now in the public domain.
|
||||
@@ -1,776 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_mixer/file/default/external
|
||||
---
|
||||
|
||||
This is the file that contains the terms of use, copying, etc. for the mpg123 distribution package.
|
||||
|
||||
Main message, to include in "About ..." boxes, etc:
|
||||
|
||||
Copyright (c) 1995-2013 by Michael Hipp and others,
|
||||
free software under the terms of the LGPL v2.1
|
||||
|
||||
There is an attempt to cover the actual list of authors in the AUTHORS file.
|
||||
Project maintainer since 2006 is Thomas Orgis and many people have contributed
|
||||
since the Michael Hipp era, but he stays the initial source and it would
|
||||
be impractical to count them all individually, so it's "and others".
|
||||
Source files contain the phrase "the mpg123 project" to the same effect
|
||||
in their license boilerplate; especially those that were added after
|
||||
maintainership changed. The person mainly responsible for the first version
|
||||
is usually named in the phrase "initially written by ...".
|
||||
|
||||
All files in the distribution that don't carry a license note on their own are
|
||||
licensed under the terms of the LGPL 2.1; exceptions may apply, especially to
|
||||
files not in the official distribution but in the revision control repository.
|
||||
|
||||
The formal license text follows.
|
||||
|
||||
=======================
|
||||
1. The LGPL version 2.1
|
||||
=======================
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
====================
|
||||
2. The GPL version 2
|
||||
====================
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,32 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_image/file/default/external
|
||||
---
|
||||
|
||||
Copyright (c) 2002-2008 Xiph.org Foundation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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 FOUNDATION
|
||||
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.
|
||||
@@ -1,48 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_mixer/file/default/external
|
||||
---
|
||||
|
||||
Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
|
||||
Jean-Marc Valin, Timothy B. Terriberry,
|
||||
CSIRO, Gregory Maxwell, Mark Borgerding,
|
||||
Erik de Castro Lopo
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of Internet Society, IETF or IETF Trust, nor the
|
||||
names of specific contributors, may be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
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.
|
||||
|
||||
Opus is subject to the royalty-free patent licenses which are
|
||||
specified at:
|
||||
|
||||
Xiph.Org Foundation:
|
||||
https://datatracker.ietf.org/ipr/1524/
|
||||
|
||||
Microsoft Corporation:
|
||||
https://datatracker.ietf.org/ipr/1914/
|
||||
|
||||
Broadcom Corporation:
|
||||
https://datatracker.ietf.org/ipr/1526/
|
||||
@@ -1,32 +0,0 @@
|
||||
The source code to this library used with SDL_mixer can be found here:
|
||||
https://hg.libsdl.org/SDL_mixer/file/default/external
|
||||
---
|
||||
|
||||
Copyright (c) 1994-2013 Xiph.Org Foundation and contributors
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Xiph.Org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
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 FOUNDATION
|
||||
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.
|
||||
@@ -0,0 +1,17 @@
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
+16
-39
@@ -1,54 +1,31 @@
|
||||
|
||||
SDL_mixer 2.0
|
||||
|
||||
The latest version of this library is available from:
|
||||
http://www.libsdl.org/projects/SDL_mixer/
|
||||
The latest version of this library is available from GitHub:
|
||||
https://github.com/libsdl-org/SDL_mixer/releases
|
||||
|
||||
Due to popular demand, here is a simple multi-channel audio mixer.
|
||||
It supports 8 channels of 16 bit stereo audio, plus a single channel
|
||||
of music.
|
||||
It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, Ogg, VOC, and WAV format audio. It can also load MIDI, MOD, and Opus audio, depending on build options (see the note below for details.)
|
||||
|
||||
See the header file SDL_mixer.h and the examples playwave.c and playmus.c
|
||||
for documentation on this mixer library.
|
||||
See the header file SDL_mixer.h and the examples playwave.c and playmus.c for documentation on this mixer library. This documentation is also available online at https://wiki.libsdl.org/SDL2_mixer
|
||||
|
||||
The mixer can currently load Microsoft WAVE files and Creative Labs VOC
|
||||
files as audio samples, it can load FLAC files with libFLAC, it can load
|
||||
Ogg Vorbis files with Ogg Vorbis or Tremor libraries, it can load MP3 files
|
||||
using mpg123 or libmad, and it can load MIDI files with Timidity,
|
||||
FluidSynth, and natively on Windows, Mac OSX, and Linux, and finally it can
|
||||
load the following file formats via ModPlug or MikMod: .MOD .S3M .IT .XM.
|
||||
The process of mixing MIDI files to wave output is very CPU intensive, so if playing regular WAVE files sound great, but playing MIDI files sound choppy, try using 8-bit audio, mono audio, or lower frequencies.
|
||||
|
||||
Tremor decoding is disabled by default; you can enable it by passing
|
||||
--enable-music-ogg-tremor
|
||||
to configure, or by defining MUSIC_OGG and OGG_USE_TREMOR.
|
||||
|
||||
libmad decoding is disabled by default; you can enable it by passing
|
||||
--enable-music-mp3-mad
|
||||
to configure, or by defining MUSIC_MP3_MAD
|
||||
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
WARNING: The license for libmad is GPL, which means that in order to
|
||||
use it your application must also be GPL!
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The process of mixing MIDI files to wave output is very CPU intensive,
|
||||
so if playing regular WAVE files sound great, but playing MIDI files
|
||||
sound choppy, try using 8-bit audio, mono audio, or lower frequencies.
|
||||
|
||||
To play MIDI files using FluidSynth, you'll need to set the SDL_SOUNDFONTS
|
||||
environment variable to a Sound Font 2 (.sf2) file containing the musical
|
||||
instruments you want to use for MIDI playback.
|
||||
If you have built with FluidSynth support, you'll need to set the SDL_SOUNDFONTS environment variable to a Sound Font 2 (.sf2) file containing the musical instruments you want to use for MIDI playback.
|
||||
(On some Linux distributions you can install the fluid-soundfont-gm package)
|
||||
|
||||
To play MIDI files using Timidity, you'll need to get a complete set of
|
||||
GUS patches from:
|
||||
To play MIDI files using Timidity, you'll need to get a complete set of GUS patches from:
|
||||
http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
|
||||
and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
|
||||
|
||||
iOS:
|
||||
In order to use this library on iOS, you should include the SDL.xcodeproj
|
||||
and Xcode-iOS/SDL_mixer.xcodeproj in your application, add the SDL/include
|
||||
and SDL_mixer directories to your "Header Search Paths" setting, then add the
|
||||
libSDL2.a and libSDL2_mixer.a to your "Link Binary with Libraries" setting.
|
||||
This library is under the zlib license, see the file "LICENSE.txt" for details.
|
||||
|
||||
This library is under the zlib license, see the file "COPYING.txt" for details.
|
||||
Note:
|
||||
Support for software MIDI, MOD, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
|
||||
- When building with CMake, you can enable the appropriate SDL2MIXER_* options defined in CMakeLists.txt. SDL2MIXER_VENDORED allows switching between system and vendored libraries.
|
||||
- When building with configure/make, you can build and install them normally and the configure script will detect and use them.
|
||||
- When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project.
|
||||
- When building with Xcode, you can edit the config at the top of the project to enable them, and you will need to include the appropriate framework in your application.
|
||||
- For Android, you can edit the config at the top of Android.mk to enable them.
|
||||
|
||||
The default MP3 support is provided using minimp3. SDL_mixer also supports using libmpg123: you can enable it by passing --enable-music-mp3-mpg123 to configure.
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLAC QUIET flac)
|
||||
|
||||
find_library(FLAC_LIBRARY
|
||||
NAMES FLAC
|
||||
HINTS ${PC_FLAC_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(FLAC_INCLUDE_PATH
|
||||
NAMES FLAC/all.h
|
||||
HINTS ${PC_FLAC_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_FLAC_FOUND)
|
||||
get_flags_from_pkg_config("${FLAC_LIBRARY}" "PC_FLAC" "_flac")
|
||||
endif()
|
||||
|
||||
set(FLAC_COMPILE_OPTIONS "${_flac_compile_options}" CACHE STRING "Extra compile options of FLAC")
|
||||
|
||||
set(FLAC_LINK_LIBRARIES "${_flac_link_libraries}" CACHE STRING "Extra link libraries of FLAC")
|
||||
|
||||
set(FLAC_LINK_OPTIONS "${_flac_link_options}" CACHE STRING "Extra link flags of FLAC")
|
||||
|
||||
set(FLAC_LINK_DIRECTORIES "${_flac_link_directories}" CACHE PATH "Extra link directories of FLAC")
|
||||
|
||||
find_package_handle_standard_args(FLAC
|
||||
REQUIRED_VARS FLAC_LIBRARY FLAC_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(FLAC_FOUND)
|
||||
if(NOT TARGET FLAC::FLAC)
|
||||
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||
set_target_properties(FLAC::FLAC PROPERTIES
|
||||
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${FLAC_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${FLAC_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${FLAC_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${FLAC_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLUIDSYNTH QUIET fluidsynth)
|
||||
|
||||
find_library(FluidSynth_LIBRARY
|
||||
NAMES fluidsynth libfluidsynth
|
||||
HINTS ${PC_FLUIDSYNTH_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(FluidSynth_INCLUDE_PATH
|
||||
NAMES fluidsynth.h
|
||||
HINTS ${PC_FLUIDSYNTH_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_FLUIDSYNTH_FOUND)
|
||||
get_flags_from_pkg_config("${FluidSynth_LIBRARY}" "PC_FLUIDSYNTH" "_fluidsynth")
|
||||
endif()
|
||||
|
||||
set(FluidSynth_COMPILE_OPTIONS "${_fluidsynth_compile_options}" CACHE STRING "Extra compile options of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_LIBRARIES "${_fluidsynth_link_libraries}" CACHE STRING "Extra link libraries of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_OPTIONS "${_fluidsynth_link_options}" CACHE STRING "Extra link flags of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_DIRECTORIES "${_fluidsynth_link_directories}" CACHE PATH "Extra link directories of FluidSynth")
|
||||
|
||||
find_package_handle_standard_args(FluidSynth
|
||||
REQUIRED_VARS FluidSynth_LIBRARY FluidSynth_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(FluidSynth_FOUND)
|
||||
if(NOT TARGET FluidSynth::libfluidsynth)
|
||||
add_library(FluidSynth::libfluidsynth UNKNOWN IMPORTED)
|
||||
set_target_properties(FluidSynth::libfluidsynth PROPERTIES
|
||||
IMPORTED_LOCATION "${FluidSynth_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FluidSynth_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${FluidSynth_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${FluidSynth_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${FluidSynth_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${FluidSynth_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,49 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OPUSFILE QUIET opusfile)
|
||||
|
||||
find_library(OpusFile_LIBRARY
|
||||
NAMES opusfile
|
||||
HINTS ${PC_OPUSFILE_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(OpusFile_INCLUDE_PATH
|
||||
NAMES opusfile.h
|
||||
PATH_SUFFIXES opus
|
||||
HINTS ${PC_OPUSFILE_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_OPUSFILE_FOUND)
|
||||
get_flags_from_pkg_config("${OpusFile_LIBRARY}" "PC_OPUSFILE" "_opusfile")
|
||||
endif()
|
||||
|
||||
set(OpusFile_COMPILE_OPTIONS "${_opusfile_compile_options}" CACHE STRING "Extra compile options of opusfile")
|
||||
|
||||
set(OpusFile_LINK_LIBRARIES "${_opusfile_link_libraries}" CACHE STRING "Extra link libraries of opusfile")
|
||||
|
||||
set(OpusFile_LINK_OPTIONS "${_opusfile_link_options}" CACHE STRING "Extra link flags of opusfile")
|
||||
|
||||
set(OpusFile_LINK_DIRECTORIES "${_opusfile_link_directories}" CACHE PATH "Extra link directories of opusfile")
|
||||
|
||||
find_package_handle_standard_args(OpusFile
|
||||
REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (OpusFile_FOUND)
|
||||
set(OpusFile_dirs ${OpusFile_INCLUDE_PATH})
|
||||
if(EXISTS "${OpusFile_INCLUDE_PATH}/opus")
|
||||
list(APPEND OpusFile_dirs "${OpusFile_INCLUDE_PATH}/opus")
|
||||
endif()
|
||||
if (NOT TARGET OpusFile::opusfile)
|
||||
add_library(OpusFile::opusfile UNKNOWN IMPORTED)
|
||||
set_target_properties(OpusFile::opusfile PROPERTIES
|
||||
IMPORTED_LOCATION "${OpusFile_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs}"
|
||||
INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${OpusFile_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${OpusFile_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${OpusFile_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_VORBIS QUIET vorbisfile)
|
||||
|
||||
find_library(Vorbis_vorbisfile_LIBRARY
|
||||
NAMES vorbisfile
|
||||
HINTS ${PC_VORBIS_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(Vorbis_vorbisfile_INCLUDE_PATH
|
||||
NAMES vorbis/vorbisfile.h
|
||||
HINTS ${PC_VORBIS_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_VORBIS_FOUND)
|
||||
get_flags_from_pkg_config("${Vorbis_vorbisfile_LIBRARY}" "PC_VORBIS" "_vorbisfile")
|
||||
endif()
|
||||
|
||||
set(Vorbis_vorbisfile_COMPILE_OPTIONS "${_vorbisfile_compile_options}" CACHE STRING "Extra compile options of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_LIBRARIES "${_vorbisfile_link_libraries}" CACHE STRING "Extra link libraries of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_OPTIONS "${_vorbisfile_link_options}" CACHE STRING "Extra link flags of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_DIRECTORIES "${_vorbisfile_link_directories}" CACHE PATH "Extra link directories of vorbisfile")
|
||||
|
||||
find_package_handle_standard_args(Vorbis
|
||||
REQUIRED_VARS Vorbis_vorbisfile_LIBRARY Vorbis_vorbisfile_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (Vorbis_FOUND)
|
||||
if (NOT TARGET Vorbis::vorbisfile)
|
||||
add_library(Vorbis::vorbisfile UNKNOWN IMPORTED)
|
||||
set_target_properties(Vorbis::vorbisfile PROPERTIES
|
||||
IMPORTED_LOCATION "${Vorbis_vorbisfile_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_vorbisfile_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${Vorbis_vorbisfile_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${Vorbis_vorbisfile_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${Vorbis_vorbisfile_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${Vorbis_vorbisfile_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,48 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_GME QUIET libgme)
|
||||
|
||||
find_library(gme_LIBRARY
|
||||
NAMES gme
|
||||
HINTS ${PC_GME_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(gme_INCLUDE_PATH
|
||||
NAMES gme/gme.h
|
||||
HINTS ${PC_GME_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_GME_FOUND)
|
||||
get_flags_from_pkg_config("${gme_LIBRARY}" "PC_GME" "_gme")
|
||||
endif()
|
||||
|
||||
set(gme_COMPILE_OPTIONS "${_gme_compile_options}" CACHE STRING "Extra compile options of gme")
|
||||
|
||||
set(gme_LINK_LIBRARIES "${_gme_link_libraries}" CACHE STRING "Extra link libraries of gme")
|
||||
|
||||
set(gme_LINK_OPTIONS "${_gme_link_options}" CACHE STRING "Extra link flags of gme")
|
||||
|
||||
set(gme_LINK_DIRECTORIES "${_gme_link_directories}" CACHE PATH "Extra link directories of gme")
|
||||
|
||||
find_package_handle_standard_args(gme
|
||||
REQUIRED_VARS gme_LIBRARY gme_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(gme_FOUND)
|
||||
set(gme_dirs ${gme_INCLUDE_PATH})
|
||||
if(EXISTS "${gme_INCLUDE_PATH}/gme")
|
||||
list(APPEND gme_dirs "${gme_INCLUDE_PATH}/gme")
|
||||
endif()
|
||||
if(NOT TARGET gme::gme)
|
||||
add_library(gme::gme UNKNOWN IMPORTED)
|
||||
set_target_properties(gme::gme PROPERTIES
|
||||
IMPORTED_LOCATION "${gme_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${gme_dirs}"
|
||||
INTERFACE_COMPILE_OPTIONS "${gme_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${gme_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${gme_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${gme_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,45 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_XMPLITE QUIET libxmp-lite)
|
||||
|
||||
find_library(libxmp_lite_LIBRARY
|
||||
NAMES xmp-lite libxmp-lite
|
||||
HINTS ${PC_XMPLITE_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(libxmp_lite_INCLUDE_PATH
|
||||
NAMES xmp.h
|
||||
PATH_SUFFIXES libxmp-lite
|
||||
HINTS ${PC_XMPLITE_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_XMPLITE_FOUND)
|
||||
get_flags_from_pkg_config("${libxmp_lite_LIBRARY}" "PC_XMPLITE" "_libxmp_lite")
|
||||
endif()
|
||||
|
||||
set(libxmp_lite_COMPILE_OPTIONS "${_libxmp_lite_compile_options}" CACHE STRING "Extra compile options of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_LIBRARIES "${_libxmp_lite_link_libraries}" CACHE STRING "Extra link libraries of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_OPTIONS "${_libxmp_lite_link_options}" CACHE STRING "Extra link flags of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_DIRECTORIES "${_libxmp_lite_link_directories}" CACHE PATH "Extra link directories of libxmp_lite")
|
||||
|
||||
find_package_handle_standard_args(libxmp-lite
|
||||
REQUIRED_VARS libxmp_lite_LIBRARY libxmp_lite_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(libxmp-lite_FOUND)
|
||||
if(NOT TARGET libxmp-lite::libxmp-lite)
|
||||
add_library(libxmp-lite::libxmp-lite UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp-lite::libxmp-lite PROPERTIES
|
||||
IMPORTED_LOCATION "${libxmp_lite_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libxmp_lite_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${libxmp_lite_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${libxmp_lite_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${libxmp_lite_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${libxmp_lite_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_XMP QUIET libxmp)
|
||||
|
||||
find_library(libxmp_LIBRARY
|
||||
NAMES xmp
|
||||
HINTS ${PC_XMP_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(libxmp_INCLUDE_PATH
|
||||
NAMES xmp.h
|
||||
HINTS ${PC_XMP_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_XMP_FOUND)
|
||||
get_flags_from_pkg_config("${libxmp_LIBRARY}" "PC_XMP" "_libxmp")
|
||||
endif()
|
||||
|
||||
set(libxmp_COMPILE_OPTIONS "${_libxmp_compile_options}" CACHE STRING "Extra compile options of libxmp")
|
||||
|
||||
set(libxmp_LINK_LIBRARIES "${_libxmp_link_libraries}" CACHE STRING "Extra link libraries of libxmp")
|
||||
|
||||
set(libxmp_LINK_OPTIONS "${_libxmp_link_options}" CACHE STRING "Extra link flags of libxmp")
|
||||
|
||||
set(libxmp_LINK_DIRECTORIES "${_libxmp_link_directories}" CACHE PATH "Extra link flags of libxmp")
|
||||
|
||||
find_package_handle_standard_args(libxmp
|
||||
REQUIRED_VARS libxmp_LIBRARY libxmp_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(libxmp_FOUND)
|
||||
if(NOT TARGET libxmp::libxmp)
|
||||
add_library(libxmp::libxmp UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp::libxmp PROPERTIES
|
||||
IMPORTED_LOCATION "${libxmp_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libxmp_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${libxmp_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${libxmp_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${libxmp_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${libxmp_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,43 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_MODPLUG QUIET libmodplug)
|
||||
|
||||
find_library(modplug_LIBRARY
|
||||
NAMES modplug
|
||||
)
|
||||
|
||||
find_path(modplug_INCLUDE_PATH
|
||||
NAMES libmodplug/modplug.h
|
||||
)
|
||||
|
||||
if(PC_MODPLUG_FOUND)
|
||||
get_flags_from_pkg_config("${modplug_LIBRARY}" "PC_MODPLUG" "_modplug")
|
||||
endif()
|
||||
|
||||
set(modplug_COMPILE_OPTIONS "${_modplug_compile_options}" CACHE STRING "Extra compile options of modplug")
|
||||
|
||||
set(modplug_LINK_LIBRARIES "${_modplug_link_libraries}" CACHE STRING "Extra link libraries of modplug")
|
||||
|
||||
set(modplug_LINK_OPTIONS "${_modplug_link_options}" CACHE STRING "Extra link flags of modplug")
|
||||
|
||||
set(modplug_LINK_DIRECTORIES "${_modplug_link_directories}" CACHE PATH "Extra link directories of modplug")
|
||||
|
||||
find_package_handle_standard_args(modplug
|
||||
REQUIRED_VARS modplug_LIBRARY modplug_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (modplug_FOUND)
|
||||
if (NOT TARGET modplug::modplug)
|
||||
add_library(modplug::modplug UNKNOWN IMPORTED)
|
||||
set_target_properties(modplug::modplug PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${modplug_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${modplug_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${modplug_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${modplug_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${modplug_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${modplug_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_MPG123 QUIET libmpg123)
|
||||
|
||||
find_library(mpg123_LIBRARY
|
||||
NAMES mpg123
|
||||
HINTS ${PC_MPG123_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(mpg123_INCLUDE_PATH
|
||||
NAMES mpg123.h
|
||||
HINTS ${PC_MPG123_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_MPG123_FOUND)
|
||||
get_flags_from_pkg_config("${mpg123_LIBRARY}" "PC_MPG123" "_mpg123")
|
||||
endif()
|
||||
|
||||
set(mpg123_COMPILE_OPTIONS "${_mpg123_compile_options}" CACHE STRING "Extra compile options of mpg123")
|
||||
|
||||
set(mpg123_LINK_LIBRARIES "${_mpg123_link_libraries}" CACHE STRING "Extra link libraries of mpg123")
|
||||
|
||||
set(mpg123_LINK_OPTIONS "${_mpg123_link_options}" CACHE STRING "Extra link flags of mpg123")
|
||||
|
||||
set(mpg123_LINK_DIRECTORIES "${_mpg123_link_directories}" CACHE PATH "Extra link directories of mpg123")
|
||||
|
||||
find_package_handle_standard_args(mpg123
|
||||
REQUIRED_VARS mpg123_LIBRARY mpg123_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(mpg123_FOUND)
|
||||
if(NOT TARGET MPG123::libmpg123)
|
||||
add_library(MPG123::libmpg123 UNKNOWN IMPORTED)
|
||||
set_target_properties(MPG123::libmpg123 PROPERTIES
|
||||
IMPORTED_LOCATION "${mpg123_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${mpg123_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${mpg123_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${mpg123_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${mpg123_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${mpg123_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_TREMOR QUIET vorbisidec)
|
||||
|
||||
find_library(tremor_LIBRARY
|
||||
NAMES vorbisidec libvorbisidec
|
||||
HINTS ${PC_TREMOR_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(tremor_INCLUDE_PATH
|
||||
NAMES tremor/ivorbisfile.h
|
||||
HINTS ${PC_TREMOR_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_TREMOR_FOUND)
|
||||
get_flags_from_pkg_config("${tremor_LIBRARY}" "PC_TREMOR" "_tremor")
|
||||
endif()
|
||||
|
||||
set(tremor_COMPILE_OPTIONS "${_tremor_compile_options}" CACHE STRING "Extra compile options of vorbis")
|
||||
|
||||
set(tremor_LINK_LIBRARIES "${_tremor_link_libraries}" CACHE STRING "Extra link libraries of vorbis")
|
||||
|
||||
set(tremor_LINK_OPTIONS "${_tremor_link_options}" CACHE STRING "Extra link flags of vorbis")
|
||||
|
||||
set(tremor_LINK_DIRECTORIES "${_tremor_link_directories}" CACHE PATH "Extra link directories of vorbis")
|
||||
|
||||
find_package_handle_standard_args(tremor
|
||||
REQUIRED_VARS tremor_LIBRARY tremor_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (tremor_FOUND)
|
||||
if (NOT TARGET tremor::tremor)
|
||||
add_library(tremor::tremor UNKNOWN IMPORTED)
|
||||
set_target_properties(tremor::tremor PROPERTIES
|
||||
IMPORTED_LOCATION "${tremor_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${tremor_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${tremor_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${tremor_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${tremor_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${tremor_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,37 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(WIN32)
|
||||
set(wavpack_find_names wavpack libwavpack wavpackdll)
|
||||
else()
|
||||
set(wavpack_find_names wavpack)
|
||||
endif()
|
||||
find_library(wavpack_LIBRARY
|
||||
NAMES ${wavpack_find_names}
|
||||
)
|
||||
|
||||
find_path(wavpack_INCLUDE_PATH
|
||||
NAMES wavpack/wavpack.h
|
||||
)
|
||||
|
||||
set(wavpack_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of wavpack")
|
||||
|
||||
set(wavpack_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of wavpack")
|
||||
|
||||
set(wavpack_LINK_OPTIONS "" CACHE STRING "Extra link flags of wavpack")
|
||||
|
||||
find_package_handle_standard_args(wavpack
|
||||
REQUIRED_VARS wavpack_LIBRARY wavpack_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (wavpack_FOUND)
|
||||
if (NOT TARGET WavPack::WavPack)
|
||||
add_library(WavPack::WavPack UNKNOWN IMPORTED)
|
||||
set_target_properties(WavPack::WavPack PROPERTIES
|
||||
IMPORTED_LOCATION "${wavpack_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${wavpack_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${wavpack_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${wavpack_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${wavpack_LINK_OPTIONS}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,34 @@
|
||||
# Helper for Find modules
|
||||
|
||||
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||
if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
|
||||
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
||||
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
||||
else()
|
||||
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
||||
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
||||
endif()
|
||||
|
||||
# The *_LIBRARIES lists always start with the library itself
|
||||
list(POP_FRONT "${_link_libraries}")
|
||||
|
||||
# Work around CMake's flag deduplication when pc files use `-framework A` instead of `-Wl,-framework,A`
|
||||
string(REPLACE "-framework;" "-Wl,-framework," "_filtered_link_options" "${${_link_options}}")
|
||||
|
||||
set(${_out_prefix}_compile_options
|
||||
"${${_cflags}}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_libraries
|
||||
"${${_link_libraries}}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_options
|
||||
"${_filtered_link_options}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_directories
|
||||
"${${_library_dirs}}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -0,0 +1,12 @@
|
||||
# sdl2_mixer cmake project-config-version input for ./configure scripts
|
||||
|
||||
set(PACKAGE_VERSION "2.8.1")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,195 @@
|
||||
# sdl2_mixer cmake project-config input for ./configure scripts
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2_mixer PROPERTIES
|
||||
URL "https://www.libsdl.org/projects/SDL_mixer/"
|
||||
DESCRIPTION "SDL_mixer is a sample multi-channel audio mixer library"
|
||||
)
|
||||
|
||||
set(SDL2_mixer_FOUND TRUE)
|
||||
|
||||
set(SDL2MIXER_VENDORED 0)
|
||||
|
||||
set(SDL2MIXER_CMD 0)
|
||||
|
||||
set(SDL2MIXER_FLAC_LIBFLAC 0)
|
||||
set(SDL2MIXER_FLAC_DRFLAC 1)
|
||||
if(SDL2MIXER_FLAC_LIBFLAC OR SDL2MIXER_FLAC_DRFLAC)
|
||||
set(SDL2MIXER_FLAC 1)
|
||||
else()
|
||||
set(SDL2MIXER_FLAC 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_GME 1)
|
||||
|
||||
set(SDL2MIXER_MOD_MODPLUG 0)
|
||||
set(SDL2MIXER_MOD_XMP 1)
|
||||
set(SDL2MIXER_MOD_XMP_LITE 0)
|
||||
if(SDL2MIXER_MOD_MODPLUG OR SDL2MIXER_MOD_XMP OR SDL2MIXER_MOD_XMP_LITE)
|
||||
set(SDL2MIXER_MOD 1)
|
||||
else()
|
||||
set(SDL2MIXER_MOD 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_MP3_MINIMP3 1)
|
||||
set(SDL2MIXER_MP3_MPG123 0)
|
||||
if(SDL2MIXER_MP3_MINIMP3 OR SDL2MIXER_MP3_MPG123)
|
||||
set(SDL2MIXER_MP3 1)
|
||||
else()
|
||||
set(SDL2MIXER_MP3 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_MIDI_FLUIDSYNTH 0)
|
||||
set(SDL2MIXER_MIDI_NATIVE 1)
|
||||
set(SDL2MIXER_MIDI_TIMIDITY 1)
|
||||
if(SDL2MIXER_MIDI_FLUIDSYNTH OR SDL2MIXER_MIDI_NATIVE OR SDL2MIXER_MIDI_TIMIDITY)
|
||||
set(SDL2MIXER_MIDI 1)
|
||||
else()
|
||||
set(SDL2MIXER_MIDI 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_OPUS 1)
|
||||
|
||||
set(SDL2MIXER_VORBIS)
|
||||
set(SDL2MIXER_VORBIS_STB 1)
|
||||
set(SDL2MIXER_VORBIS_VORBISFILE 0)
|
||||
set(SDL2MIXER_VORBIS_TREMOR 0)
|
||||
if(SDL2MIXER_VORBIS_STB)
|
||||
set(SDL2MIXER_VORBIS STB)
|
||||
endif()
|
||||
if(SDL2MIXER_VORBIS_VORBISFILE)
|
||||
set(SDL2MIXER_VORBIS VORBISFILE)
|
||||
endif()
|
||||
if(SDL2MIXER_VORBIS_TREMOR)
|
||||
set(SDL2MIXER_VORBIS TREMOR)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_WAVE 1)
|
||||
|
||||
set(SDL2MIXER_WAVPACK 1)
|
||||
|
||||
set(SDL2MIXER_SDL2_REQUIRED_VERSION 2.0.9)
|
||||
|
||||
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR} REALPATH)
|
||||
get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE)
|
||||
set(exec_prefix "${prefix}")
|
||||
set(bindir "${prefix}/bin")
|
||||
set(includedir "${prefix}/include")
|
||||
set(libdir "${prefix}/lib")
|
||||
set(_sdl2mixer_extra_static_libraries ";winmm")
|
||||
string(REGEX REPLACE "(^[;]+|[;]+$)" "" _sdl2mixer_extra_static_libraries "${_sdl2mixer_extra_static_libraries}")
|
||||
|
||||
set(_sdl2mixer_bindir "${bindir}")
|
||||
set(_sdl2mixer_libdir "${libdir}")
|
||||
set(_sdl2mixer_incdir "${includedir}/SDL2")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set(_original_cmake_module_path "${CMAKE_MODULE_PATH}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PkgConfigHelper.cmake")
|
||||
|
||||
if("modplug::modplug" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(modplug)
|
||||
endif()
|
||||
|
||||
if("libxmp::libxmp" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(libxmp)
|
||||
endif()
|
||||
|
||||
if("libxmp-lite::libxmp-lite" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(libxmp-lite)
|
||||
endif()
|
||||
|
||||
if("FluidSynth::libfluidsynth" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(FluidSynth)
|
||||
endif()
|
||||
|
||||
if("Vorbis::vorbisfile" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(Vorbis)
|
||||
endif()
|
||||
|
||||
if("tremor::tremor" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(tremor)
|
||||
endif()
|
||||
|
||||
if("FLAC::FLAC" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(FLAC)
|
||||
endif()
|
||||
|
||||
if("MPG123::libmpg123" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(mpg123)
|
||||
endif()
|
||||
|
||||
if("OpusFile::opusfile" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(OpusFile)
|
||||
endif()
|
||||
|
||||
if("WavPack::WavPack" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(wavpack)
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${_original_cmake_module_path}")
|
||||
unset(_original_cmake_module_path)
|
||||
|
||||
unset(prefix)
|
||||
unset(exec_prefix)
|
||||
unset(bindir)
|
||||
unset(includedir)
|
||||
unset(libdir)
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(NOT TARGET SDL2_mixer::SDL2_mixer)
|
||||
if(WIN32)
|
||||
set(_sdl2mixer_dll "${_sdl2mixer_bindir}/SDL2_mixer.dll")
|
||||
set(_sdl2mixer_imp "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer.dll${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_dll}" AND EXISTS "${_sdl2mixer_imp}")
|
||||
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2mixer_dll}"
|
||||
IMPORTED_IMPLIB "${_sdl2mixer_imp}"
|
||||
)
|
||||
endif()
|
||||
unset(_sdl2mixer_dll)
|
||||
unset(_sdl2mixer_imp)
|
||||
else()
|
||||
set(_sdl2mixer_shl "${_sdl2mixer_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_mixer${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_shl}")
|
||||
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2mixer_shl}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(TARGET SDL2_mixer::SDL2_mixer)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SDL2_mixer::SDL2_mixer-static)
|
||||
set(_sdl2mixer_stl "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_stl}")
|
||||
add_library(SDL2_mixer::SDL2_mixer-static STATIC IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer-static
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
|
||||
IMPORTED_LOCATION "${_sdl2mixer_stl}"
|
||||
INTERFACE_LINK_LIBRARIES "${_sdl2mixer_extra_static_libraries}"
|
||||
)
|
||||
endif()
|
||||
unset(_sdl2mixer_stl)
|
||||
endif()
|
||||
|
||||
unset(_sdl2mixer_extra_static_libraries)
|
||||
unset(_sdl2mixer_bindir)
|
||||
unset(_sdl2mixer_libdir)
|
||||
unset(_sdl2mixer_incdir)
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,15 +17,15 @@ old_library='libSDL2_mixer.a'
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -L/opt/local/i686-w64-mingw32/lib -lmingw32 /opt/local/i686-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lwinmm'
|
||||
dependency_libs=' -L/tmp/tardir/SDL2_mixer-2.8.1/VisualC/external/optional/x86 -L/home/runner/work/SDL_mixer/SDL_mixer/deps/mingw-deps/i686-w64-mingw32/lib -lmingw32 /home/runner/work/SDL_mixer/SDL_mixer/deps/mingw-deps/i686-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lwinmm'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libSDL2_mixer.
|
||||
current=2
|
||||
age=2
|
||||
revision=2
|
||||
current=800
|
||||
age=800
|
||||
revision=1
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
@@ -38,4 +38,4 @@ dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/Users/valve/release/SDL_mixer/SDL2_mixer-2.0.4/i686-w64-mingw32/lib'
|
||||
libdir='/tmp/tardir/SDL2_mixer-2.8.1/build-mingw/install-i686-w64-mingw32/lib'
|
||||
@@ -1,12 +1,13 @@
|
||||
prefix=/opt/local/i686-w64-mingw32
|
||||
prefix=/tmp/tardir/SDL2_mixer-2.8.1/build-mingw/install-i686-w64-mingw32
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SDL2_mixer
|
||||
Description: mixer library for Simple DirectMedia Layer
|
||||
Version: 2.0.4
|
||||
Requires: sdl2 >= 2.0.7
|
||||
Version: 2.8.1
|
||||
Requires: sdl2 >= 2.0.9
|
||||
Libs: -L${libdir} -lSDL2_mixer
|
||||
Cflags: -I${includedir}/SDL2
|
||||
|
||||
Requires.private:
|
||||
Libs.private: -lwinmm
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLAC QUIET flac)
|
||||
|
||||
find_library(FLAC_LIBRARY
|
||||
NAMES FLAC
|
||||
HINTS ${PC_FLAC_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(FLAC_INCLUDE_PATH
|
||||
NAMES FLAC/all.h
|
||||
HINTS ${PC_FLAC_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_FLAC_FOUND)
|
||||
get_flags_from_pkg_config("${FLAC_LIBRARY}" "PC_FLAC" "_flac")
|
||||
endif()
|
||||
|
||||
set(FLAC_COMPILE_OPTIONS "${_flac_compile_options}" CACHE STRING "Extra compile options of FLAC")
|
||||
|
||||
set(FLAC_LINK_LIBRARIES "${_flac_link_libraries}" CACHE STRING "Extra link libraries of FLAC")
|
||||
|
||||
set(FLAC_LINK_OPTIONS "${_flac_link_options}" CACHE STRING "Extra link flags of FLAC")
|
||||
|
||||
set(FLAC_LINK_DIRECTORIES "${_flac_link_directories}" CACHE PATH "Extra link directories of FLAC")
|
||||
|
||||
find_package_handle_standard_args(FLAC
|
||||
REQUIRED_VARS FLAC_LIBRARY FLAC_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(FLAC_FOUND)
|
||||
if(NOT TARGET FLAC::FLAC)
|
||||
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||
set_target_properties(FLAC::FLAC PROPERTIES
|
||||
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${FLAC_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${FLAC_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${FLAC_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${FLAC_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLUIDSYNTH QUIET fluidsynth)
|
||||
|
||||
find_library(FluidSynth_LIBRARY
|
||||
NAMES fluidsynth libfluidsynth
|
||||
HINTS ${PC_FLUIDSYNTH_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(FluidSynth_INCLUDE_PATH
|
||||
NAMES fluidsynth.h
|
||||
HINTS ${PC_FLUIDSYNTH_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_FLUIDSYNTH_FOUND)
|
||||
get_flags_from_pkg_config("${FluidSynth_LIBRARY}" "PC_FLUIDSYNTH" "_fluidsynth")
|
||||
endif()
|
||||
|
||||
set(FluidSynth_COMPILE_OPTIONS "${_fluidsynth_compile_options}" CACHE STRING "Extra compile options of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_LIBRARIES "${_fluidsynth_link_libraries}" CACHE STRING "Extra link libraries of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_OPTIONS "${_fluidsynth_link_options}" CACHE STRING "Extra link flags of FluidSynth")
|
||||
|
||||
set(FluidSynth_LINK_DIRECTORIES "${_fluidsynth_link_directories}" CACHE PATH "Extra link directories of FluidSynth")
|
||||
|
||||
find_package_handle_standard_args(FluidSynth
|
||||
REQUIRED_VARS FluidSynth_LIBRARY FluidSynth_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(FluidSynth_FOUND)
|
||||
if(NOT TARGET FluidSynth::libfluidsynth)
|
||||
add_library(FluidSynth::libfluidsynth UNKNOWN IMPORTED)
|
||||
set_target_properties(FluidSynth::libfluidsynth PROPERTIES
|
||||
IMPORTED_LOCATION "${FluidSynth_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FluidSynth_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${FluidSynth_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${FluidSynth_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${FluidSynth_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${FluidSynth_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,49 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OPUSFILE QUIET opusfile)
|
||||
|
||||
find_library(OpusFile_LIBRARY
|
||||
NAMES opusfile
|
||||
HINTS ${PC_OPUSFILE_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(OpusFile_INCLUDE_PATH
|
||||
NAMES opusfile.h
|
||||
PATH_SUFFIXES opus
|
||||
HINTS ${PC_OPUSFILE_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_OPUSFILE_FOUND)
|
||||
get_flags_from_pkg_config("${OpusFile_LIBRARY}" "PC_OPUSFILE" "_opusfile")
|
||||
endif()
|
||||
|
||||
set(OpusFile_COMPILE_OPTIONS "${_opusfile_compile_options}" CACHE STRING "Extra compile options of opusfile")
|
||||
|
||||
set(OpusFile_LINK_LIBRARIES "${_opusfile_link_libraries}" CACHE STRING "Extra link libraries of opusfile")
|
||||
|
||||
set(OpusFile_LINK_OPTIONS "${_opusfile_link_options}" CACHE STRING "Extra link flags of opusfile")
|
||||
|
||||
set(OpusFile_LINK_DIRECTORIES "${_opusfile_link_directories}" CACHE PATH "Extra link directories of opusfile")
|
||||
|
||||
find_package_handle_standard_args(OpusFile
|
||||
REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (OpusFile_FOUND)
|
||||
set(OpusFile_dirs ${OpusFile_INCLUDE_PATH})
|
||||
if(EXISTS "${OpusFile_INCLUDE_PATH}/opus")
|
||||
list(APPEND OpusFile_dirs "${OpusFile_INCLUDE_PATH}/opus")
|
||||
endif()
|
||||
if (NOT TARGET OpusFile::opusfile)
|
||||
add_library(OpusFile::opusfile UNKNOWN IMPORTED)
|
||||
set_target_properties(OpusFile::opusfile PROPERTIES
|
||||
IMPORTED_LOCATION "${OpusFile_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs}"
|
||||
INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${OpusFile_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${OpusFile_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${OpusFile_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_VORBIS QUIET vorbisfile)
|
||||
|
||||
find_library(Vorbis_vorbisfile_LIBRARY
|
||||
NAMES vorbisfile
|
||||
HINTS ${PC_VORBIS_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(Vorbis_vorbisfile_INCLUDE_PATH
|
||||
NAMES vorbis/vorbisfile.h
|
||||
HINTS ${PC_VORBIS_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_VORBIS_FOUND)
|
||||
get_flags_from_pkg_config("${Vorbis_vorbisfile_LIBRARY}" "PC_VORBIS" "_vorbisfile")
|
||||
endif()
|
||||
|
||||
set(Vorbis_vorbisfile_COMPILE_OPTIONS "${_vorbisfile_compile_options}" CACHE STRING "Extra compile options of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_LIBRARIES "${_vorbisfile_link_libraries}" CACHE STRING "Extra link libraries of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_OPTIONS "${_vorbisfile_link_options}" CACHE STRING "Extra link flags of vorbisfile")
|
||||
|
||||
set(Vorbis_vorbisfile_LINK_DIRECTORIES "${_vorbisfile_link_directories}" CACHE PATH "Extra link directories of vorbisfile")
|
||||
|
||||
find_package_handle_standard_args(Vorbis
|
||||
REQUIRED_VARS Vorbis_vorbisfile_LIBRARY Vorbis_vorbisfile_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (Vorbis_FOUND)
|
||||
if (NOT TARGET Vorbis::vorbisfile)
|
||||
add_library(Vorbis::vorbisfile UNKNOWN IMPORTED)
|
||||
set_target_properties(Vorbis::vorbisfile PROPERTIES
|
||||
IMPORTED_LOCATION "${Vorbis_vorbisfile_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_vorbisfile_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${Vorbis_vorbisfile_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${Vorbis_vorbisfile_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${Vorbis_vorbisfile_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${Vorbis_vorbisfile_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,48 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_GME QUIET libgme)
|
||||
|
||||
find_library(gme_LIBRARY
|
||||
NAMES gme
|
||||
HINTS ${PC_GME_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(gme_INCLUDE_PATH
|
||||
NAMES gme/gme.h
|
||||
HINTS ${PC_GME_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_GME_FOUND)
|
||||
get_flags_from_pkg_config("${gme_LIBRARY}" "PC_GME" "_gme")
|
||||
endif()
|
||||
|
||||
set(gme_COMPILE_OPTIONS "${_gme_compile_options}" CACHE STRING "Extra compile options of gme")
|
||||
|
||||
set(gme_LINK_LIBRARIES "${_gme_link_libraries}" CACHE STRING "Extra link libraries of gme")
|
||||
|
||||
set(gme_LINK_OPTIONS "${_gme_link_options}" CACHE STRING "Extra link flags of gme")
|
||||
|
||||
set(gme_LINK_DIRECTORIES "${_gme_link_directories}" CACHE PATH "Extra link directories of gme")
|
||||
|
||||
find_package_handle_standard_args(gme
|
||||
REQUIRED_VARS gme_LIBRARY gme_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(gme_FOUND)
|
||||
set(gme_dirs ${gme_INCLUDE_PATH})
|
||||
if(EXISTS "${gme_INCLUDE_PATH}/gme")
|
||||
list(APPEND gme_dirs "${gme_INCLUDE_PATH}/gme")
|
||||
endif()
|
||||
if(NOT TARGET gme::gme)
|
||||
add_library(gme::gme UNKNOWN IMPORTED)
|
||||
set_target_properties(gme::gme PROPERTIES
|
||||
IMPORTED_LOCATION "${gme_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${gme_dirs}"
|
||||
INTERFACE_COMPILE_OPTIONS "${gme_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${gme_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${gme_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${gme_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,45 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_XMPLITE QUIET libxmp-lite)
|
||||
|
||||
find_library(libxmp_lite_LIBRARY
|
||||
NAMES xmp-lite libxmp-lite
|
||||
HINTS ${PC_XMPLITE_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(libxmp_lite_INCLUDE_PATH
|
||||
NAMES xmp.h
|
||||
PATH_SUFFIXES libxmp-lite
|
||||
HINTS ${PC_XMPLITE_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_XMPLITE_FOUND)
|
||||
get_flags_from_pkg_config("${libxmp_lite_LIBRARY}" "PC_XMPLITE" "_libxmp_lite")
|
||||
endif()
|
||||
|
||||
set(libxmp_lite_COMPILE_OPTIONS "${_libxmp_lite_compile_options}" CACHE STRING "Extra compile options of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_LIBRARIES "${_libxmp_lite_link_libraries}" CACHE STRING "Extra link libraries of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_OPTIONS "${_libxmp_lite_link_options}" CACHE STRING "Extra link flags of libxmp_lite")
|
||||
|
||||
set(libxmp_lite_LINK_DIRECTORIES "${_libxmp_lite_link_directories}" CACHE PATH "Extra link directories of libxmp_lite")
|
||||
|
||||
find_package_handle_standard_args(libxmp-lite
|
||||
REQUIRED_VARS libxmp_lite_LIBRARY libxmp_lite_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(libxmp-lite_FOUND)
|
||||
if(NOT TARGET libxmp-lite::libxmp-lite)
|
||||
add_library(libxmp-lite::libxmp-lite UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp-lite::libxmp-lite PROPERTIES
|
||||
IMPORTED_LOCATION "${libxmp_lite_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libxmp_lite_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${libxmp_lite_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${libxmp_lite_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${libxmp_lite_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${libxmp_lite_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_XMP QUIET libxmp)
|
||||
|
||||
find_library(libxmp_LIBRARY
|
||||
NAMES xmp
|
||||
HINTS ${PC_XMP_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(libxmp_INCLUDE_PATH
|
||||
NAMES xmp.h
|
||||
HINTS ${PC_XMP_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_XMP_FOUND)
|
||||
get_flags_from_pkg_config("${libxmp_LIBRARY}" "PC_XMP" "_libxmp")
|
||||
endif()
|
||||
|
||||
set(libxmp_COMPILE_OPTIONS "${_libxmp_compile_options}" CACHE STRING "Extra compile options of libxmp")
|
||||
|
||||
set(libxmp_LINK_LIBRARIES "${_libxmp_link_libraries}" CACHE STRING "Extra link libraries of libxmp")
|
||||
|
||||
set(libxmp_LINK_OPTIONS "${_libxmp_link_options}" CACHE STRING "Extra link flags of libxmp")
|
||||
|
||||
set(libxmp_LINK_DIRECTORIES "${_libxmp_link_directories}" CACHE PATH "Extra link flags of libxmp")
|
||||
|
||||
find_package_handle_standard_args(libxmp
|
||||
REQUIRED_VARS libxmp_LIBRARY libxmp_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(libxmp_FOUND)
|
||||
if(NOT TARGET libxmp::libxmp)
|
||||
add_library(libxmp::libxmp UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp::libxmp PROPERTIES
|
||||
IMPORTED_LOCATION "${libxmp_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libxmp_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${libxmp_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${libxmp_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${libxmp_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${libxmp_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,43 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_MODPLUG QUIET libmodplug)
|
||||
|
||||
find_library(modplug_LIBRARY
|
||||
NAMES modplug
|
||||
)
|
||||
|
||||
find_path(modplug_INCLUDE_PATH
|
||||
NAMES libmodplug/modplug.h
|
||||
)
|
||||
|
||||
if(PC_MODPLUG_FOUND)
|
||||
get_flags_from_pkg_config("${modplug_LIBRARY}" "PC_MODPLUG" "_modplug")
|
||||
endif()
|
||||
|
||||
set(modplug_COMPILE_OPTIONS "${_modplug_compile_options}" CACHE STRING "Extra compile options of modplug")
|
||||
|
||||
set(modplug_LINK_LIBRARIES "${_modplug_link_libraries}" CACHE STRING "Extra link libraries of modplug")
|
||||
|
||||
set(modplug_LINK_OPTIONS "${_modplug_link_options}" CACHE STRING "Extra link flags of modplug")
|
||||
|
||||
set(modplug_LINK_DIRECTORIES "${_modplug_link_directories}" CACHE PATH "Extra link directories of modplug")
|
||||
|
||||
find_package_handle_standard_args(modplug
|
||||
REQUIRED_VARS modplug_LIBRARY modplug_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (modplug_FOUND)
|
||||
if (NOT TARGET modplug::modplug)
|
||||
add_library(modplug::modplug UNKNOWN IMPORTED)
|
||||
set_target_properties(modplug::modplug PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${modplug_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${modplug_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${modplug_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${modplug_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${modplug_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${modplug_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_MPG123 QUIET libmpg123)
|
||||
|
||||
find_library(mpg123_LIBRARY
|
||||
NAMES mpg123
|
||||
HINTS ${PC_MPG123_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(mpg123_INCLUDE_PATH
|
||||
NAMES mpg123.h
|
||||
HINTS ${PC_MPG123_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_MPG123_FOUND)
|
||||
get_flags_from_pkg_config("${mpg123_LIBRARY}" "PC_MPG123" "_mpg123")
|
||||
endif()
|
||||
|
||||
set(mpg123_COMPILE_OPTIONS "${_mpg123_compile_options}" CACHE STRING "Extra compile options of mpg123")
|
||||
|
||||
set(mpg123_LINK_LIBRARIES "${_mpg123_link_libraries}" CACHE STRING "Extra link libraries of mpg123")
|
||||
|
||||
set(mpg123_LINK_OPTIONS "${_mpg123_link_options}" CACHE STRING "Extra link flags of mpg123")
|
||||
|
||||
set(mpg123_LINK_DIRECTORIES "${_mpg123_link_directories}" CACHE PATH "Extra link directories of mpg123")
|
||||
|
||||
find_package_handle_standard_args(mpg123
|
||||
REQUIRED_VARS mpg123_LIBRARY mpg123_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if(mpg123_FOUND)
|
||||
if(NOT TARGET MPG123::libmpg123)
|
||||
add_library(MPG123::libmpg123 UNKNOWN IMPORTED)
|
||||
set_target_properties(MPG123::libmpg123 PROPERTIES
|
||||
IMPORTED_LOCATION "${mpg123_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${mpg123_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${mpg123_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${mpg123_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${mpg123_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${mpg123_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,44 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_TREMOR QUIET vorbisidec)
|
||||
|
||||
find_library(tremor_LIBRARY
|
||||
NAMES vorbisidec libvorbisidec
|
||||
HINTS ${PC_TREMOR_LIBDIR}
|
||||
)
|
||||
|
||||
find_path(tremor_INCLUDE_PATH
|
||||
NAMES tremor/ivorbisfile.h
|
||||
HINTS ${PC_TREMOR_INCLUDEDIR}
|
||||
)
|
||||
|
||||
if(PC_TREMOR_FOUND)
|
||||
get_flags_from_pkg_config("${tremor_LIBRARY}" "PC_TREMOR" "_tremor")
|
||||
endif()
|
||||
|
||||
set(tremor_COMPILE_OPTIONS "${_tremor_compile_options}" CACHE STRING "Extra compile options of vorbis")
|
||||
|
||||
set(tremor_LINK_LIBRARIES "${_tremor_link_libraries}" CACHE STRING "Extra link libraries of vorbis")
|
||||
|
||||
set(tremor_LINK_OPTIONS "${_tremor_link_options}" CACHE STRING "Extra link flags of vorbis")
|
||||
|
||||
set(tremor_LINK_DIRECTORIES "${_tremor_link_directories}" CACHE PATH "Extra link directories of vorbis")
|
||||
|
||||
find_package_handle_standard_args(tremor
|
||||
REQUIRED_VARS tremor_LIBRARY tremor_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (tremor_FOUND)
|
||||
if (NOT TARGET tremor::tremor)
|
||||
add_library(tremor::tremor UNKNOWN IMPORTED)
|
||||
set_target_properties(tremor::tremor PROPERTIES
|
||||
IMPORTED_LOCATION "${tremor_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${tremor_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${tremor_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${tremor_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${tremor_LINK_OPTIONS}"
|
||||
INTERFACE_LINK_DIRECTORIES "${tremor_LINK_DIRECTORIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,37 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(WIN32)
|
||||
set(wavpack_find_names wavpack libwavpack wavpackdll)
|
||||
else()
|
||||
set(wavpack_find_names wavpack)
|
||||
endif()
|
||||
find_library(wavpack_LIBRARY
|
||||
NAMES ${wavpack_find_names}
|
||||
)
|
||||
|
||||
find_path(wavpack_INCLUDE_PATH
|
||||
NAMES wavpack/wavpack.h
|
||||
)
|
||||
|
||||
set(wavpack_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of wavpack")
|
||||
|
||||
set(wavpack_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of wavpack")
|
||||
|
||||
set(wavpack_LINK_OPTIONS "" CACHE STRING "Extra link flags of wavpack")
|
||||
|
||||
find_package_handle_standard_args(wavpack
|
||||
REQUIRED_VARS wavpack_LIBRARY wavpack_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (wavpack_FOUND)
|
||||
if (NOT TARGET WavPack::WavPack)
|
||||
add_library(WavPack::WavPack UNKNOWN IMPORTED)
|
||||
set_target_properties(WavPack::WavPack PROPERTIES
|
||||
IMPORTED_LOCATION "${wavpack_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${wavpack_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${wavpack_COMPILE_OPTIONS}"
|
||||
INTERFACE_LINK_LIBRARIES "${wavpack_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_OPTIONS "${wavpack_LINK_OPTIONS}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,34 @@
|
||||
# Helper for Find modules
|
||||
|
||||
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||
if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
|
||||
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
||||
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
||||
else()
|
||||
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
||||
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
||||
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
||||
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
||||
endif()
|
||||
|
||||
# The *_LIBRARIES lists always start with the library itself
|
||||
list(POP_FRONT "${_link_libraries}")
|
||||
|
||||
# Work around CMake's flag deduplication when pc files use `-framework A` instead of `-Wl,-framework,A`
|
||||
string(REPLACE "-framework;" "-Wl,-framework," "_filtered_link_options" "${${_link_options}}")
|
||||
|
||||
set(${_out_prefix}_compile_options
|
||||
"${${_cflags}}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_libraries
|
||||
"${${_link_libraries}}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_options
|
||||
"${_filtered_link_options}"
|
||||
PARENT_SCOPE)
|
||||
set(${_out_prefix}_link_directories
|
||||
"${${_library_dirs}}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
# sdl2_mixer cmake project-config-version input for ./configure scripts
|
||||
|
||||
set(PACKAGE_VERSION "2.8.1")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,195 @@
|
||||
# sdl2_mixer cmake project-config input for ./configure scripts
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2_mixer PROPERTIES
|
||||
URL "https://www.libsdl.org/projects/SDL_mixer/"
|
||||
DESCRIPTION "SDL_mixer is a sample multi-channel audio mixer library"
|
||||
)
|
||||
|
||||
set(SDL2_mixer_FOUND TRUE)
|
||||
|
||||
set(SDL2MIXER_VENDORED 0)
|
||||
|
||||
set(SDL2MIXER_CMD 0)
|
||||
|
||||
set(SDL2MIXER_FLAC_LIBFLAC 0)
|
||||
set(SDL2MIXER_FLAC_DRFLAC 1)
|
||||
if(SDL2MIXER_FLAC_LIBFLAC OR SDL2MIXER_FLAC_DRFLAC)
|
||||
set(SDL2MIXER_FLAC 1)
|
||||
else()
|
||||
set(SDL2MIXER_FLAC 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_GME 1)
|
||||
|
||||
set(SDL2MIXER_MOD_MODPLUG 0)
|
||||
set(SDL2MIXER_MOD_XMP 1)
|
||||
set(SDL2MIXER_MOD_XMP_LITE 0)
|
||||
if(SDL2MIXER_MOD_MODPLUG OR SDL2MIXER_MOD_XMP OR SDL2MIXER_MOD_XMP_LITE)
|
||||
set(SDL2MIXER_MOD 1)
|
||||
else()
|
||||
set(SDL2MIXER_MOD 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_MP3_MINIMP3 1)
|
||||
set(SDL2MIXER_MP3_MPG123 0)
|
||||
if(SDL2MIXER_MP3_MINIMP3 OR SDL2MIXER_MP3_MPG123)
|
||||
set(SDL2MIXER_MP3 1)
|
||||
else()
|
||||
set(SDL2MIXER_MP3 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_MIDI_FLUIDSYNTH 0)
|
||||
set(SDL2MIXER_MIDI_NATIVE 1)
|
||||
set(SDL2MIXER_MIDI_TIMIDITY 1)
|
||||
if(SDL2MIXER_MIDI_FLUIDSYNTH OR SDL2MIXER_MIDI_NATIVE OR SDL2MIXER_MIDI_TIMIDITY)
|
||||
set(SDL2MIXER_MIDI 1)
|
||||
else()
|
||||
set(SDL2MIXER_MIDI 0)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_OPUS 1)
|
||||
|
||||
set(SDL2MIXER_VORBIS)
|
||||
set(SDL2MIXER_VORBIS_STB 1)
|
||||
set(SDL2MIXER_VORBIS_VORBISFILE 0)
|
||||
set(SDL2MIXER_VORBIS_TREMOR 0)
|
||||
if(SDL2MIXER_VORBIS_STB)
|
||||
set(SDL2MIXER_VORBIS STB)
|
||||
endif()
|
||||
if(SDL2MIXER_VORBIS_VORBISFILE)
|
||||
set(SDL2MIXER_VORBIS VORBISFILE)
|
||||
endif()
|
||||
if(SDL2MIXER_VORBIS_TREMOR)
|
||||
set(SDL2MIXER_VORBIS TREMOR)
|
||||
endif()
|
||||
|
||||
set(SDL2MIXER_WAVE 1)
|
||||
|
||||
set(SDL2MIXER_WAVPACK 1)
|
||||
|
||||
set(SDL2MIXER_SDL2_REQUIRED_VERSION 2.0.9)
|
||||
|
||||
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR} REALPATH)
|
||||
get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE)
|
||||
set(exec_prefix "${prefix}")
|
||||
set(bindir "${prefix}/bin")
|
||||
set(includedir "${prefix}/include")
|
||||
set(libdir "${prefix}/lib")
|
||||
set(_sdl2mixer_extra_static_libraries ";winmm")
|
||||
string(REGEX REPLACE "(^[;]+|[;]+$)" "" _sdl2mixer_extra_static_libraries "${_sdl2mixer_extra_static_libraries}")
|
||||
|
||||
set(_sdl2mixer_bindir "${bindir}")
|
||||
set(_sdl2mixer_libdir "${libdir}")
|
||||
set(_sdl2mixer_incdir "${includedir}/SDL2")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set(_original_cmake_module_path "${CMAKE_MODULE_PATH}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PkgConfigHelper.cmake")
|
||||
|
||||
if("modplug::modplug" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(modplug)
|
||||
endif()
|
||||
|
||||
if("libxmp::libxmp" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(libxmp)
|
||||
endif()
|
||||
|
||||
if("libxmp-lite::libxmp-lite" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(libxmp-lite)
|
||||
endif()
|
||||
|
||||
if("FluidSynth::libfluidsynth" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(FluidSynth)
|
||||
endif()
|
||||
|
||||
if("Vorbis::vorbisfile" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(Vorbis)
|
||||
endif()
|
||||
|
||||
if("tremor::tremor" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(tremor)
|
||||
endif()
|
||||
|
||||
if("FLAC::FLAC" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(FLAC)
|
||||
endif()
|
||||
|
||||
if("MPG123::libmpg123" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(mpg123)
|
||||
endif()
|
||||
|
||||
if("OpusFile::opusfile" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(OpusFile)
|
||||
endif()
|
||||
|
||||
if("WavPack::WavPack" IN_LIST _sdl2mixer_extra_static_libraries)
|
||||
find_dependency(wavpack)
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${_original_cmake_module_path}")
|
||||
unset(_original_cmake_module_path)
|
||||
|
||||
unset(prefix)
|
||||
unset(exec_prefix)
|
||||
unset(bindir)
|
||||
unset(includedir)
|
||||
unset(libdir)
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(NOT TARGET SDL2_mixer::SDL2_mixer)
|
||||
if(WIN32)
|
||||
set(_sdl2mixer_dll "${_sdl2mixer_bindir}/SDL2_mixer.dll")
|
||||
set(_sdl2mixer_imp "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer.dll${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_dll}" AND EXISTS "${_sdl2mixer_imp}")
|
||||
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2mixer_dll}"
|
||||
IMPORTED_IMPLIB "${_sdl2mixer_imp}"
|
||||
)
|
||||
endif()
|
||||
unset(_sdl2mixer_dll)
|
||||
unset(_sdl2mixer_imp)
|
||||
else()
|
||||
set(_sdl2mixer_shl "${_sdl2mixer_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_mixer${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_shl}")
|
||||
add_library(SDL2_mixer::SDL2_mixer SHARED IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2mixer_shl}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(TARGET SDL2_mixer::SDL2_mixer)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SDL2_mixer::SDL2_mixer-static)
|
||||
set(_sdl2mixer_stl "${_sdl2mixer_libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2_mixer${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
if(EXISTS "${_sdl2mixer_stl}")
|
||||
add_library(SDL2_mixer::SDL2_mixer-static STATIC IMPORTED)
|
||||
set_target_properties(SDL2_mixer::SDL2_mixer-static
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_sdl2mixer_incdir}"
|
||||
IMPORTED_LOCATION "${_sdl2mixer_stl}"
|
||||
INTERFACE_LINK_LIBRARIES "${_sdl2mixer_extra_static_libraries}"
|
||||
)
|
||||
endif()
|
||||
unset(_sdl2mixer_stl)
|
||||
endif()
|
||||
|
||||
unset(_sdl2mixer_extra_static_libraries)
|
||||
unset(_sdl2mixer_bindir)
|
||||
unset(_sdl2mixer_libdir)
|
||||
unset(_sdl2mixer_incdir)
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,15 +17,15 @@ old_library='libSDL2_mixer.a'
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -L/opt/local/x86_64-w64-mingw32/lib -lmingw32 /opt/local/x86_64-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lwinmm'
|
||||
dependency_libs=' -L/tmp/tardir/SDL2_mixer-2.8.1/VisualC/external/optional/x64 -L/home/runner/work/SDL_mixer/SDL_mixer/deps/mingw-deps/x86_64-w64-mingw32/lib -lmingw32 /home/runner/work/SDL_mixer/SDL_mixer/deps/mingw-deps/x86_64-w64-mingw32/lib/libSDL2.la -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lwinmm'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libSDL2_mixer.
|
||||
current=2
|
||||
age=2
|
||||
revision=2
|
||||
current=800
|
||||
age=800
|
||||
revision=1
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
@@ -38,4 +38,4 @@ dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/Users/valve/release/SDL_mixer/SDL2_mixer-2.0.4/x86_64-w64-mingw32/lib'
|
||||
libdir='/tmp/tardir/SDL2_mixer-2.8.1/build-mingw/install-x86_64-w64-mingw32/lib'
|
||||
@@ -1,12 +1,13 @@
|
||||
prefix=/opt/local/x86_64-w64-mingw32
|
||||
prefix=/tmp/tardir/SDL2_mixer-2.8.1/build-mingw/install-x86_64-w64-mingw32
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SDL2_mixer
|
||||
Description: mixer library for Simple DirectMedia Layer
|
||||
Version: 2.0.4
|
||||
Requires: sdl2 >= 2.0.7
|
||||
Version: 2.8.1
|
||||
Requires: sdl2 >= 2.0.9
|
||||
Libs: -L${libdir} -lSDL2_mixer
|
||||
Cflags: -I${includedir}/SDL2
|
||||
|
||||
Requires.private:
|
||||
Libs.private: -lwinmm
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,4 @@
|
||||
/cscope.out
|
||||
*.json
|
||||
*.idx
|
||||
*.gdb_history
|
||||
+88
-32
@@ -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
|
||||
w_wad.cpp
|
||||
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)
|
||||
@@ -469,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
|
||||
@@ -493,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
|
||||
@@ -512,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})
|
||||
@@ -525,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
|
||||
|
||||
+29
-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,39 @@ 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
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
-6
@@ -1,3 +1,4 @@
|
||||
string.c
|
||||
am_map.c
|
||||
b_bot.c
|
||||
command.c
|
||||
@@ -42,19 +43,18 @@ s_sound.c
|
||||
screen.c
|
||||
sounds.c
|
||||
st_stuff.c
|
||||
string.c
|
||||
tables.c
|
||||
v_video.c
|
||||
w_wad.c
|
||||
w_wad.cpp
|
||||
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
|
||||
|
||||
@@ -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?!");
|
||||
|
||||
+2
-12
@@ -50,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 * restrict scr, INT32 scale)
|
||||
{
|
||||
(void)scr;
|
||||
}
|
||||
|
||||
void I_BeginRead(void){}
|
||||
|
||||
void I_EndRead(void){}
|
||||
+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;
|
||||
|
||||
+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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+69
-4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+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 */
|
||||
};
|
||||
|
||||
+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
-3
@@ -772,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
|
||||
|
||||
|
||||
+103
-40
@@ -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;
|
||||
@@ -377,6 +410,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,9 +437,9 @@ 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++;
|
||||
@@ -442,7 +493,9 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_GETTABLE: {
|
||||
Protect(luaV_gettable(L, RB(i), RKC(i), ra));
|
||||
StkId rb = RB(i);
|
||||
TValue *rc = RKC(i);
|
||||
gettableProtected(L, rb, rc, ra);
|
||||
continue;
|
||||
}
|
||||
case OP_SETGLOBAL: {
|
||||
@@ -459,7 +512,9 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_SETTABLE: {
|
||||
Protect(luaV_settable(L, ra, RKB(i), RKC(i)));
|
||||
TValue *rb = RKB(i);
|
||||
TValue *rc = RKC(i);
|
||||
settableProtected(L, ra, rb, rc);
|
||||
continue;
|
||||
}
|
||||
case OP_NEWTABLE: {
|
||||
@@ -470,9 +525,15 @@ void luaV_execute (lua_State *L, int nexeccalls) {
|
||||
continue;
|
||||
}
|
||||
case OP_SELF: {
|
||||
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: {
|
||||
@@ -822,3 +883,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 { \
|
||||
|
||||
+90
-81
@@ -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,11 +711,11 @@ 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++)
|
||||
{
|
||||
strlcpy(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strlcat(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strlcat(cechotext, " ", sizeof(cechotext)-1);
|
||||
}
|
||||
|
||||
@@ -835,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)
|
||||
{
|
||||
@@ -878,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);
|
||||
@@ -938,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;
|
||||
@@ -1126,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
|
||||
@@ -1143,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
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
@@ -1173,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;
|
||||
@@ -1363,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
|
||||
@@ -1376,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;
|
||||
@@ -1408,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)
|
||||
{
|
||||
@@ -1421,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)
|
||||
@@ -1471,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();
|
||||
@@ -1497,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)
|
||||
@@ -1515,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);
|
||||
|
||||
@@ -1573,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;
|
||||
|
||||
@@ -1585,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);
|
||||
@@ -1607,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.
|
||||
@@ -1619,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;
|
||||
}
|
||||
@@ -1640,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)
|
||||
@@ -1650,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;
|
||||
}
|
||||
}
|
||||
@@ -1681,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.
|
||||
@@ -1771,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;
|
||||
@@ -1785,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 && !mapheaderinfo[newvalue])
|
||||
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
||||
|
||||
} while (!M_CanShowLevelInList(newvalue, gt));
|
||||
@@ -1797,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)
|
||||
@@ -1914,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
|
||||
@@ -1968,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
|
||||
@@ -2005,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;
|
||||
@@ -2052,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;
|
||||
}
|
||||
|
||||
@@ -2136,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
|
||||
+48
-46
@@ -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
|
||||
@@ -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)
|
||||
{
|
||||
@@ -727,7 +730,6 @@ void CON_ToggleOff(void)
|
||||
con_curlines = 0;
|
||||
CON_ClearHUD();
|
||||
con_forcepic = 0;
|
||||
con_clipviewtop = -1; // remove console clipping of view
|
||||
|
||||
I_SetTextInput(false);
|
||||
|
||||
@@ -779,18 +781,6 @@ void CON_Ticker(void)
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// check if console ready for prompt
|
||||
if (con_destlines >= minheight)
|
||||
{
|
||||
@@ -1031,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);
|
||||
@@ -1100,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
|
||||
@@ -1282,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)
|
||||
@@ -1318,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
|
||||
@@ -1477,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
|
||||
{
|
||||
@@ -1489,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
|
||||
@@ -1509,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);
|
||||
@@ -1558,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);
|
||||
}
|
||||
}
|
||||
@@ -1590,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();
|
||||
|
||||
+10
-5
@@ -13,6 +13,10 @@
|
||||
#ifndef __CONSOLE__
|
||||
#define __CONSOLE__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "d_event.h"
|
||||
#include "command.h"
|
||||
#include "i_threads.h"
|
||||
@@ -30,17 +34,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 +56,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
|
||||
@@ -66,4 +67,8 @@ boolean CON_Ready(void);
|
||||
|
||||
void CON_LogMessage(const char *msg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -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__
|
||||
Loaded 100 of 288 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user